@finos/legend-data-cube 0.0.2
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/LICENSE +201 -0
- package/README.md +3 -0
- package/lib/application/DataCubeDocumentation.d.ts +22 -0
- package/lib/application/DataCubeDocumentation.d.ts.map +1 -0
- package/lib/application/DataCubeDocumentation.js +23 -0
- package/lib/application/DataCubeDocumentation.js.map +1 -0
- package/lib/components/DataCube.d.ts +19 -0
- package/lib/components/DataCube.d.ts.map +1 -0
- package/lib/components/DataCube.js +67 -0
- package/lib/components/DataCube.js.map +1 -0
- package/lib/components/DataCubeProvider.d.ts +27 -0
- package/lib/components/DataCubeProvider.d.ts.map +1 -0
- package/lib/components/DataCubeProvider.js +34 -0
- package/lib/components/DataCubeProvider.js.map +1 -0
- package/lib/components/application/DataCubeAlert.d.ts +44 -0
- package/lib/components/application/DataCubeAlert.d.ts.map +1 -0
- package/lib/components/application/DataCubeAlert.js +83 -0
- package/lib/components/application/DataCubeAlert.js.map +1 -0
- package/lib/components/application/DataCubeDocumentationPanel.d.ts +19 -0
- package/lib/components/application/DataCubeDocumentationPanel.d.ts.map +1 -0
- package/lib/components/application/DataCubeDocumentationPanel.js +32 -0
- package/lib/components/application/DataCubeDocumentationPanel.js.map +1 -0
- package/lib/components/application/DataCubeLayoutManager.d.ts +27 -0
- package/lib/components/application/DataCubeLayoutManager.d.ts.map +1 -0
- package/lib/components/application/DataCubeLayoutManager.js +116 -0
- package/lib/components/application/DataCubeLayoutManager.js.map +1 -0
- package/lib/components/application/DataCubeSettingsPanel.d.ts +19 -0
- package/lib/components/application/DataCubeSettingsPanel.d.ts.map +1 -0
- package/lib/components/application/DataCubeSettingsPanel.js +53 -0
- package/lib/components/application/DataCubeSettingsPanel.js.map +1 -0
- package/lib/components/editor/DataCubeEditor.d.ts +22 -0
- package/lib/components/editor/DataCubeEditor.d.ts.map +1 -0
- package/lib/components/editor/DataCubeEditor.js +51 -0
- package/lib/components/editor/DataCubeEditor.js.map +1 -0
- package/lib/components/editor/DataCubeEditorColumnPropertiesPanel.d.ts +22 -0
- package/lib/components/editor/DataCubeEditorColumnPropertiesPanel.d.ts.map +1 -0
- package/lib/components/editor/DataCubeEditorColumnPropertiesPanel.js +274 -0
- package/lib/components/editor/DataCubeEditorColumnPropertiesPanel.js.map +1 -0
- package/lib/components/editor/DataCubeEditorColumnsPanel.d.ts +22 -0
- package/lib/components/editor/DataCubeEditorColumnsPanel.d.ts.map +1 -0
- package/lib/components/editor/DataCubeEditorColumnsPanel.js +35 -0
- package/lib/components/editor/DataCubeEditorColumnsPanel.js.map +1 -0
- package/lib/components/editor/DataCubeEditorColumnsSelector.d.ts +32 -0
- package/lib/components/editor/DataCubeEditorColumnsSelector.d.ts.map +1 -0
- package/lib/components/editor/DataCubeEditorColumnsSelector.js +307 -0
- package/lib/components/editor/DataCubeEditorColumnsSelector.js.map +1 -0
- package/lib/components/editor/DataCubeEditorGeneralPropertiesPanel.d.ts +22 -0
- package/lib/components/editor/DataCubeEditorGeneralPropertiesPanel.d.ts.map +1 -0
- package/lib/components/editor/DataCubeEditorGeneralPropertiesPanel.js +167 -0
- package/lib/components/editor/DataCubeEditorGeneralPropertiesPanel.js.map +1 -0
- package/lib/components/editor/DataCubeEditorHorizontalPivotsPanel.d.ts +22 -0
- package/lib/components/editor/DataCubeEditorHorizontalPivotsPanel.d.ts.map +1 -0
- package/lib/components/editor/DataCubeEditorHorizontalPivotsPanel.js +29 -0
- package/lib/components/editor/DataCubeEditorHorizontalPivotsPanel.js.map +1 -0
- package/lib/components/editor/DataCubeEditorSortsPanel.d.ts +22 -0
- package/lib/components/editor/DataCubeEditorSortsPanel.d.ts.map +1 -0
- package/lib/components/editor/DataCubeEditorSortsPanel.js +62 -0
- package/lib/components/editor/DataCubeEditorSortsPanel.js.map +1 -0
- package/lib/components/editor/DataCubeEditorVerticalPivotsPanel.d.ts +22 -0
- package/lib/components/editor/DataCubeEditorVerticalPivotsPanel.d.ts.map +1 -0
- package/lib/components/editor/DataCubeEditorVerticalPivotsPanel.js +25 -0
- package/lib/components/editor/DataCubeEditorVerticalPivotsPanel.js.map +1 -0
- package/lib/components/extend/DataCubeColumnEditor.d.ts +22 -0
- package/lib/components/extend/DataCubeColumnEditor.d.ts.map +1 -0
- package/lib/components/extend/DataCubeColumnEditor.js +169 -0
- package/lib/components/extend/DataCubeColumnEditor.js.map +1 -0
- package/lib/components/filter/DataCubeFilterEditor.d.ts +22 -0
- package/lib/components/filter/DataCubeFilterEditor.d.ts.map +1 -0
- package/lib/components/filter/DataCubeFilterEditor.js +312 -0
- package/lib/components/filter/DataCubeFilterEditor.js.map +1 -0
- package/lib/components/grid/DataCubeGrid.d.ts +27 -0
- package/lib/components/grid/DataCubeGrid.d.ts.map +1 -0
- package/lib/components/grid/DataCubeGrid.js +241 -0
- package/lib/components/grid/DataCubeGrid.js.map +1 -0
- package/lib/components/grid/DataCubeGridShared.d.ts +18 -0
- package/lib/components/grid/DataCubeGridShared.d.ts.map +1 -0
- package/lib/components/grid/DataCubeGridShared.js +25 -0
- package/lib/components/grid/DataCubeGridShared.js.map +1 -0
- package/lib/components/shared/DataCubeFormUtils.d.ts +54 -0
- package/lib/components/shared/DataCubeFormUtils.d.ts.map +1 -0
- package/lib/components/shared/DataCubeFormUtils.js +251 -0
- package/lib/components/shared/DataCubeFormUtils.js.map +1 -0
- package/lib/components/shared/DataCubePureCodeEditorUtils.d.ts +22 -0
- package/lib/components/shared/DataCubePureCodeEditorUtils.d.ts.map +1 -0
- package/lib/components/shared/DataCubePureCodeEditorUtils.js +64 -0
- package/lib/components/shared/DataCubePureCodeEditorUtils.js.map +1 -0
- package/lib/index.css +17 -0
- package/lib/index.css.map +1 -0
- package/lib/index.d.ts +21 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +21 -0
- package/lib/index.js.map +1 -0
- package/lib/package.json +89 -0
- package/lib/stores/DataCubeState.d.ts +32 -0
- package/lib/stores/DataCubeState.d.ts.map +1 -0
- package/lib/stores/DataCubeState.js +84 -0
- package/lib/stores/DataCubeState.js.map +1 -0
- package/lib/stores/DataCubeViewState.d.ts +50 -0
- package/lib/stores/DataCubeViewState.d.ts.map +1 -0
- package/lib/stores/DataCubeViewState.js +109 -0
- package/lib/stores/DataCubeViewState.js.map +1 -0
- package/lib/stores/core/DataCubeConfiguration.d.ts +107 -0
- package/lib/stores/core/DataCubeConfiguration.d.ts.map +1 -0
- package/lib/stores/core/DataCubeConfiguration.js +185 -0
- package/lib/stores/core/DataCubeConfiguration.js.map +1 -0
- package/lib/stores/core/DataCubeConfigurationBuilder.d.ts +25 -0
- package/lib/stores/core/DataCubeConfigurationBuilder.d.ts.map +1 -0
- package/lib/stores/core/DataCubeConfigurationBuilder.js +50 -0
- package/lib/stores/core/DataCubeConfigurationBuilder.js.map +1 -0
- package/lib/stores/core/DataCubeInfoState.d.ts +33 -0
- package/lib/stores/core/DataCubeInfoState.d.ts.map +1 -0
- package/lib/stores/core/DataCubeInfoState.js +48 -0
- package/lib/stores/core/DataCubeInfoState.js.map +1 -0
- package/lib/stores/core/DataCubeQueryBuilder.d.ts +35 -0
- package/lib/stores/core/DataCubeQueryBuilder.d.ts.map +1 -0
- package/lib/stores/core/DataCubeQueryBuilder.js +130 -0
- package/lib/stores/core/DataCubeQueryBuilder.js.map +1 -0
- package/lib/stores/core/DataCubeQueryBuilderUtils.d.ts +50 -0
- package/lib/stores/core/DataCubeQueryBuilderUtils.d.ts.map +1 -0
- package/lib/stores/core/DataCubeQueryBuilderUtils.js +320 -0
- package/lib/stores/core/DataCubeQueryBuilderUtils.js.map +1 -0
- package/lib/stores/core/DataCubeQueryEngine.d.ts +224 -0
- package/lib/stores/core/DataCubeQueryEngine.d.ts.map +1 -0
- package/lib/stores/core/DataCubeQueryEngine.js +286 -0
- package/lib/stores/core/DataCubeQueryEngine.js.map +1 -0
- package/lib/stores/core/DataCubeQuerySnapshot.d.ts +89 -0
- package/lib/stores/core/DataCubeQuerySnapshot.d.ts.map +1 -0
- package/lib/stores/core/DataCubeQuerySnapshot.js +82 -0
- package/lib/stores/core/DataCubeQuerySnapshot.js.map +1 -0
- package/lib/stores/core/DataCubeQuerySnapshotBuilder.d.ts +33 -0
- package/lib/stores/core/DataCubeQuerySnapshotBuilder.d.ts.map +1 -0
- package/lib/stores/core/DataCubeQuerySnapshotBuilder.js +260 -0
- package/lib/stores/core/DataCubeQuerySnapshotBuilder.js.map +1 -0
- package/lib/stores/core/DataCubeQuerySnapshotBuilderUtils.d.ts +30 -0
- package/lib/stores/core/DataCubeQuerySnapshotBuilderUtils.d.ts.map +1 -0
- package/lib/stores/core/DataCubeQuerySnapshotBuilderUtils.js +125 -0
- package/lib/stores/core/DataCubeQuerySnapshotBuilderUtils.js.map +1 -0
- package/lib/stores/core/DataCubeQuerySnapshotManager.d.ts +47 -0
- package/lib/stores/core/DataCubeQuerySnapshotManager.d.ts.map +1 -0
- package/lib/stores/core/DataCubeQuerySnapshotManager.js +84 -0
- package/lib/stores/core/DataCubeQuerySnapshotManager.js.map +1 -0
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation.d.ts +28 -0
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation.d.ts.map +1 -0
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation.js +25 -0
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation.js.map +1 -0
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__Average.d.ts +27 -0
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__Average.d.ts.map +1 -0
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__Average.js +39 -0
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__Average.js.map +1 -0
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__Count.d.ts +27 -0
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__Count.d.ts.map +1 -0
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__Count.js +47 -0
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__Count.js.map +1 -0
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__First.d.ts +27 -0
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__First.d.ts.map +1 -0
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__First.js +44 -0
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__First.js.map +1 -0
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__JoinStrings.d.ts +27 -0
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__JoinStrings.d.ts.map +1 -0
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__JoinStrings.js +53 -0
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__JoinStrings.js.map +1 -0
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__Last.d.ts +27 -0
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__Last.d.ts.map +1 -0
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__Last.js +44 -0
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__Last.js.map +1 -0
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__Max.d.ts +27 -0
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__Max.d.ts.map +1 -0
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__Max.js +39 -0
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__Max.js.map +1 -0
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__Min.d.ts +27 -0
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__Min.d.ts.map +1 -0
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__Min.js +39 -0
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__Min.js.map +1 -0
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__StdDevPopulation.d.ts +27 -0
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__StdDevPopulation.d.ts.map +1 -0
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__StdDevPopulation.js +39 -0
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__StdDevPopulation.js.map +1 -0
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__StdDevSample.d.ts +27 -0
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__StdDevSample.d.ts.map +1 -0
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__StdDevSample.js +39 -0
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__StdDevSample.js.map +1 -0
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__Sum.d.ts +27 -0
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__Sum.d.ts.map +1 -0
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__Sum.js +39 -0
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__Sum.js.map +1 -0
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__UniqueValue.d.ts +27 -0
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__UniqueValue.d.ts.map +1 -0
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__UniqueValue.js +44 -0
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__UniqueValue.js.map +1 -0
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__VariancePopulation.d.ts +27 -0
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__VariancePopulation.d.ts.map +1 -0
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__VariancePopulation.js +39 -0
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__VariancePopulation.js.map +1 -0
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__VarianceSample.d.ts +27 -0
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__VarianceSample.d.ts.map +1 -0
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__VarianceSample.js +39 -0
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__VarianceSample.js.map +1 -0
- package/lib/stores/core/filter/DataCubeQueryFilterEditorState.d.ts +36 -0
- package/lib/stores/core/filter/DataCubeQueryFilterEditorState.d.ts.map +1 -0
- package/lib/stores/core/filter/DataCubeQueryFilterEditorState.js +153 -0
- package/lib/stores/core/filter/DataCubeQueryFilterEditorState.js.map +1 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation.d.ts +32 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation.d.ts.map +1 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation.js +48 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation.js.map +1 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__Contain.d.ts +34 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__Contain.d.ts.map +1 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__Contain.js +59 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__Contain.js.map +1 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__ContainCaseInsensitive.d.ts +34 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__ContainCaseInsensitive.d.ts.map +1 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__ContainCaseInsensitive.js +64 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__ContainCaseInsensitive.js.map +1 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__EndWith.d.ts +34 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__EndWith.d.ts.map +1 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__EndWith.js +59 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__EndWith.js.map +1 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__EndWithCaseInsensitive.d.ts +34 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__EndWithCaseInsensitive.d.ts.map +1 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__EndWithCaseInsensitive.js +64 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__EndWithCaseInsensitive.js.map +1 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__Equal.d.ts +34 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__Equal.d.ts.map +1 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__Equal.js +136 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__Equal.js.map +1 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__EqualCaseInsensitive.d.ts +34 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__EqualCaseInsensitive.d.ts.map +1 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__EqualCaseInsensitive.js +64 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__EqualCaseInsensitive.js.map +1 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__EqualCaseInsensitiveColumn.d.ts +34 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__EqualCaseInsensitiveColumn.d.ts.map +1 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__EqualCaseInsensitiveColumn.js +64 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__EqualCaseInsensitiveColumn.js.map +1 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__EqualColumn.d.ts +34 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__EqualColumn.d.ts.map +1 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__EqualColumn.js +65 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__EqualColumn.js.map +1 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__GreaterThan.d.ts +34 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__GreaterThan.d.ts.map +1 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__GreaterThan.js +67 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__GreaterThan.js.map +1 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__GreaterThanColumn.d.ts +34 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__GreaterThanColumn.d.ts.map +1 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__GreaterThanColumn.js +64 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__GreaterThanColumn.js.map +1 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__GreaterThanOrEqual.d.ts +34 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__GreaterThanOrEqual.d.ts.map +1 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__GreaterThanOrEqual.js +67 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__GreaterThanOrEqual.js.map +1 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__GreaterThanOrEqualColumn.d.ts +34 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__GreaterThanOrEqualColumn.d.ts.map +1 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__GreaterThanOrEqualColumn.js +64 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__GreaterThanOrEqualColumn.js.map +1 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__IsNotNull.d.ts +31 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__IsNotNull.d.ts.map +1 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__IsNotNull.js +64 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__IsNotNull.js.map +1 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__IsNull.d.ts +31 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__IsNull.d.ts.map +1 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__IsNull.js +64 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__IsNull.js.map +1 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__LessThan.d.ts +34 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__LessThan.d.ts.map +1 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__LessThan.js +67 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__LessThan.js.map +1 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__LessThanColumn.d.ts +34 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__LessThanColumn.d.ts.map +1 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__LessThanColumn.js +64 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__LessThanColumn.js.map +1 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__LessThanOrEqual.d.ts +34 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__LessThanOrEqual.d.ts.map +1 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__LessThanOrEqual.js +67 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__LessThanOrEqual.js.map +1 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__LessThanOrEqualColumn.d.ts +34 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__LessThanOrEqualColumn.d.ts.map +1 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__LessThanOrEqualColumn.js +64 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__LessThanOrEqualColumn.js.map +1 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotContain.d.ts +34 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotContain.d.ts.map +1 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotContain.js +59 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotContain.js.map +1 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotEndWith.d.ts +34 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotEndWith.d.ts.map +1 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotEndWith.js +59 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotEndWith.js.map +1 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotEqual.d.ts +34 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotEqual.d.ts.map +1 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotEqual.js +69 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotEqual.js.map +1 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotEqualCaseInsensitive.d.ts +34 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotEqualCaseInsensitive.d.ts.map +1 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotEqualCaseInsensitive.js +64 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotEqualCaseInsensitive.js.map +1 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotEqualCaseInsensitiveColumn.d.ts +34 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotEqualCaseInsensitiveColumn.d.ts.map +1 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotEqualCaseInsensitiveColumn.js +64 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotEqualCaseInsensitiveColumn.js.map +1 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotEqualColumn.d.ts +34 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotEqualColumn.d.ts.map +1 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotEqualColumn.js +65 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotEqualColumn.js.map +1 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotStartWith.d.ts +34 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotStartWith.d.ts.map +1 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotStartWith.js +59 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotStartWith.js.map +1 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__StartWith.d.ts +34 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__StartWith.d.ts.map +1 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__StartWith.js +59 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__StartWith.js.map +1 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__StartWithCaseInsensitive.d.ts +34 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__StartWithCaseInsensitive.d.ts.map +1 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__StartWithCaseInsensitive.js +64 -0
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__StartWithCaseInsensitive.js.map +1 -0
- package/lib/stores/editor/DataCubeEditorColumnPropertiesPanelState.d.ts +37 -0
- package/lib/stores/editor/DataCubeEditorColumnPropertiesPanelState.d.ts.map +1 -0
- package/lib/stores/editor/DataCubeEditorColumnPropertiesPanelState.js +68 -0
- package/lib/stores/editor/DataCubeEditorColumnPropertiesPanelState.js.map +1 -0
- package/lib/stores/editor/DataCubeEditorColumnsPanelState.d.ts +58 -0
- package/lib/stores/editor/DataCubeEditorColumnsPanelState.d.ts.map +1 -0
- package/lib/stores/editor/DataCubeEditorColumnsPanelState.js +127 -0
- package/lib/stores/editor/DataCubeEditorColumnsPanelState.js.map +1 -0
- package/lib/stores/editor/DataCubeEditorColumnsSelectorState.d.ts +42 -0
- package/lib/stores/editor/DataCubeEditorColumnsSelectorState.d.ts.map +1 -0
- package/lib/stores/editor/DataCubeEditorColumnsSelectorState.js +75 -0
- package/lib/stores/editor/DataCubeEditorColumnsSelectorState.js.map +1 -0
- package/lib/stores/editor/DataCubeEditorGeneralPropertiesPanelState.d.ts +35 -0
- package/lib/stores/editor/DataCubeEditorGeneralPropertiesPanelState.d.ts.map +1 -0
- package/lib/stores/editor/DataCubeEditorGeneralPropertiesPanelState.js +59 -0
- package/lib/stores/editor/DataCubeEditorGeneralPropertiesPanelState.js.map +1 -0
- package/lib/stores/editor/DataCubeEditorHorizontalPivotsPanelState.d.ts +38 -0
- package/lib/stores/editor/DataCubeEditorHorizontalPivotsPanelState.d.ts.map +1 -0
- package/lib/stores/editor/DataCubeEditorHorizontalPivotsPanelState.js +75 -0
- package/lib/stores/editor/DataCubeEditorHorizontalPivotsPanelState.js.map +1 -0
- package/lib/stores/editor/DataCubeEditorMutableConfiguration.d.ts +107 -0
- package/lib/stores/editor/DataCubeEditorMutableConfiguration.d.ts.map +1 -0
- package/lib/stores/editor/DataCubeEditorMutableConfiguration.js +467 -0
- package/lib/stores/editor/DataCubeEditorMutableConfiguration.js.map +1 -0
- package/lib/stores/editor/DataCubeEditorPanelState.d.ts +29 -0
- package/lib/stores/editor/DataCubeEditorPanelState.d.ts.map +1 -0
- package/lib/stores/editor/DataCubeEditorPanelState.js +17 -0
- package/lib/stores/editor/DataCubeEditorPanelState.js.map +1 -0
- package/lib/stores/editor/DataCubeEditorSortsPanelState.d.ts +41 -0
- package/lib/stores/editor/DataCubeEditorSortsPanelState.d.ts.map +1 -0
- package/lib/stores/editor/DataCubeEditorSortsPanelState.js +86 -0
- package/lib/stores/editor/DataCubeEditorSortsPanelState.js.map +1 -0
- package/lib/stores/editor/DataCubeEditorState.d.ts +64 -0
- package/lib/stores/editor/DataCubeEditorState.d.ts.map +1 -0
- package/lib/stores/editor/DataCubeEditorState.js +155 -0
- package/lib/stores/editor/DataCubeEditorState.js.map +1 -0
- package/lib/stores/editor/DataCubeEditorVerticalPivotsPanelState.d.ts +35 -0
- package/lib/stores/editor/DataCubeEditorVerticalPivotsPanelState.d.ts.map +1 -0
- package/lib/stores/editor/DataCubeEditorVerticalPivotsPanelState.js +58 -0
- package/lib/stores/editor/DataCubeEditorVerticalPivotsPanelState.js.map +1 -0
- package/lib/stores/engine/DataCubeApplicationEngine.d.ts +55 -0
- package/lib/stores/engine/DataCubeApplicationEngine.d.ts.map +1 -0
- package/lib/stores/engine/DataCubeApplicationEngine.js +33 -0
- package/lib/stores/engine/DataCubeApplicationEngine.js.map +1 -0
- package/lib/stores/engine/DataCubeEngine.d.ts +124 -0
- package/lib/stores/engine/DataCubeEngine.d.ts.map +1 -0
- package/lib/stores/engine/DataCubeEngine.js +182 -0
- package/lib/stores/engine/DataCubeEngine.js.map +1 -0
- package/lib/stores/engine/DataCubeLayoutManagerState.d.ts +62 -0
- package/lib/stores/engine/DataCubeLayoutManagerState.d.ts.map +1 -0
- package/lib/stores/engine/DataCubeLayoutManagerState.js +133 -0
- package/lib/stores/engine/DataCubeLayoutManagerState.js.map +1 -0
- package/lib/stores/engine/DataCubeQuery.d.ts +40 -0
- package/lib/stores/engine/DataCubeQuery.d.ts.map +1 -0
- package/lib/stores/engine/DataCubeQuery.js +79 -0
- package/lib/stores/engine/DataCubeQuery.js.map +1 -0
- package/lib/stores/extend/DataCubeColumnEditorState.d.ts +61 -0
- package/lib/stores/extend/DataCubeColumnEditorState.d.ts.map +1 -0
- package/lib/stores/extend/DataCubeColumnEditorState.js +260 -0
- package/lib/stores/extend/DataCubeColumnEditorState.js.map +1 -0
- package/lib/stores/extend/DataCubeExtendManagerState.d.ts +46 -0
- package/lib/stores/extend/DataCubeExtendManagerState.d.ts.map +1 -0
- package/lib/stores/extend/DataCubeExtendManagerState.js +119 -0
- package/lib/stores/extend/DataCubeExtendManagerState.js.map +1 -0
- package/lib/stores/filter/DataCubeFilterEditorState.d.ts +61 -0
- package/lib/stores/filter/DataCubeFilterEditorState.d.ts.map +1 -0
- package/lib/stores/filter/DataCubeFilterEditorState.js +228 -0
- package/lib/stores/filter/DataCubeFilterEditorState.js.map +1 -0
- package/lib/stores/grid/DataCubeGridClientEngine.d.ts +93 -0
- package/lib/stores/grid/DataCubeGridClientEngine.d.ts.map +1 -0
- package/lib/stores/grid/DataCubeGridClientEngine.js +364 -0
- package/lib/stores/grid/DataCubeGridClientEngine.js.map +1 -0
- package/lib/stores/grid/DataCubeGridClientExportEngine.d.ts +31 -0
- package/lib/stores/grid/DataCubeGridClientExportEngine.d.ts.map +1 -0
- package/lib/stores/grid/DataCubeGridClientExportEngine.js +152 -0
- package/lib/stores/grid/DataCubeGridClientExportEngine.js.map +1 -0
- package/lib/stores/grid/DataCubeGridConfigurationBuilder.d.ts +180 -0
- package/lib/stores/grid/DataCubeGridConfigurationBuilder.d.ts.map +1 -0
- package/lib/stores/grid/DataCubeGridConfigurationBuilder.js +649 -0
- package/lib/stores/grid/DataCubeGridConfigurationBuilder.js.map +1 -0
- package/lib/stores/grid/DataCubeGridControllerState.d.ts +89 -0
- package/lib/stores/grid/DataCubeGridControllerState.d.ts.map +1 -0
- package/lib/stores/grid/DataCubeGridControllerState.js +342 -0
- package/lib/stores/grid/DataCubeGridControllerState.js.map +1 -0
- package/lib/stores/grid/DataCubeGridMenuBuilder.d.ts +19 -0
- package/lib/stores/grid/DataCubeGridMenuBuilder.d.ts.map +1 -0
- package/lib/stores/grid/DataCubeGridMenuBuilder.js +687 -0
- package/lib/stores/grid/DataCubeGridMenuBuilder.js.map +1 -0
- package/lib/stores/grid/DataCubeGridQueryBuilder.d.ts +23 -0
- package/lib/stores/grid/DataCubeGridQueryBuilder.d.ts.map +1 -0
- package/lib/stores/grid/DataCubeGridQueryBuilder.js +130 -0
- package/lib/stores/grid/DataCubeGridQueryBuilder.js.map +1 -0
- package/lib/stores/grid/DataCubeGridQuerySnapshotBuilder.d.ts +27 -0
- package/lib/stores/grid/DataCubeGridQuerySnapshotBuilder.d.ts.map +1 -0
- package/lib/stores/grid/DataCubeGridQuerySnapshotBuilder.js +66 -0
- package/lib/stores/grid/DataCubeGridQuerySnapshotBuilder.js.map +1 -0
- package/lib/stores/grid/DataCubeGridState.d.ts +55 -0
- package/lib/stores/grid/DataCubeGridState.d.ts.map +1 -0
- package/lib/stores/grid/DataCubeGridState.js +114 -0
- package/lib/stores/grid/DataCubeGridState.js.map +1 -0
- package/package.json +89 -0
- package/src/application/DataCubeDocumentation.ts +22 -0
- package/src/components/DataCube.tsx +157 -0
- package/src/components/DataCubeProvider.tsx +58 -0
- package/src/components/application/DataCubeAlert.tsx +173 -0
- package/src/components/application/DataCubeDocumentationPanel.tsx +42 -0
- package/src/components/application/DataCubeLayoutManager.tsx +190 -0
- package/src/components/application/DataCubeSettingsPanel.tsx +205 -0
- package/src/components/editor/DataCubeEditor.tsx +114 -0
- package/src/components/editor/DataCubeEditorColumnPropertiesPanel.tsx +1210 -0
- package/src/components/editor/DataCubeEditorColumnsPanel.tsx +121 -0
- package/src/components/editor/DataCubeEditorColumnsSelector.tsx +596 -0
- package/src/components/editor/DataCubeEditorGeneralPropertiesPanel.tsx +786 -0
- package/src/components/editor/DataCubeEditorHorizontalPivotsPanel.tsx +61 -0
- package/src/components/editor/DataCubeEditorSortsPanel.tsx +166 -0
- package/src/components/editor/DataCubeEditorVerticalPivotsPanel.tsx +43 -0
- package/src/components/extend/DataCubeColumnEditor.tsx +366 -0
- package/src/components/filter/DataCubeFilterEditor.tsx +907 -0
- package/src/components/grid/DataCubeGrid.tsx +384 -0
- package/src/components/grid/DataCubeGridShared.tsx +45 -0
- package/src/components/shared/DataCubeFormUtils.tsx +574 -0
- package/src/components/shared/DataCubePureCodeEditorUtils.tsx +91 -0
- package/src/index.tsx +22 -0
- package/src/stores/DataCubeState.tsx +100 -0
- package/src/stores/DataCubeViewState.ts +129 -0
- package/src/stores/core/DataCubeConfiguration.ts +240 -0
- package/src/stores/core/DataCubeConfigurationBuilder.ts +66 -0
- package/src/stores/core/DataCubeInfoState.ts +61 -0
- package/src/stores/core/DataCubeQueryBuilder.ts +296 -0
- package/src/stores/core/DataCubeQueryBuilderUtils.ts +514 -0
- package/src/stores/core/DataCubeQueryEngine.ts +327 -0
- package/src/stores/core/DataCubeQuerySnapshot.ts +191 -0
- package/src/stores/core/DataCubeQuerySnapshotBuilder.ts +406 -0
- package/src/stores/core/DataCubeQuerySnapshotBuilderUtils.ts +197 -0
- package/src/stores/core/DataCubeQuerySnapshotManager.ts +148 -0
- package/src/stores/core/aggregation/DataCubeQueryAggregateOperation.ts +47 -0
- package/src/stores/core/aggregation/DataCubeQueryAggregateOperation__Average.tsx +52 -0
- package/src/stores/core/aggregation/DataCubeQueryAggregateOperation__Count.tsx +61 -0
- package/src/stores/core/aggregation/DataCubeQueryAggregateOperation__First.tsx +57 -0
- package/src/stores/core/aggregation/DataCubeQueryAggregateOperation__JoinStrings.tsx +81 -0
- package/src/stores/core/aggregation/DataCubeQueryAggregateOperation__Last.tsx +57 -0
- package/src/stores/core/aggregation/DataCubeQueryAggregateOperation__Max.tsx +52 -0
- package/src/stores/core/aggregation/DataCubeQueryAggregateOperation__Min.tsx +52 -0
- package/src/stores/core/aggregation/DataCubeQueryAggregateOperation__StdDevPopulation.tsx +55 -0
- package/src/stores/core/aggregation/DataCubeQueryAggregateOperation__StdDevSample.tsx +52 -0
- package/src/stores/core/aggregation/DataCubeQueryAggregateOperation__Sum.tsx +52 -0
- package/src/stores/core/aggregation/DataCubeQueryAggregateOperation__UniqueValue.tsx +57 -0
- package/src/stores/core/aggregation/DataCubeQueryAggregateOperation__VariancePopulation.tsx +52 -0
- package/src/stores/core/aggregation/DataCubeQueryAggregateOperation__VarianceSample.tsx +52 -0
- package/src/stores/core/filter/DataCubeQueryFilterEditorState.ts +231 -0
- package/src/stores/core/filter/DataCubeQueryFilterOperation.ts +96 -0
- package/src/stores/core/filter/DataCubeQueryFilterOperation__Contain.tsx +88 -0
- package/src/stores/core/filter/DataCubeQueryFilterOperation__ContainCaseInsensitive.tsx +94 -0
- package/src/stores/core/filter/DataCubeQueryFilterOperation__EndWith.tsx +88 -0
- package/src/stores/core/filter/DataCubeQueryFilterOperation__EndWithCaseInsensitive.tsx +94 -0
- package/src/stores/core/filter/DataCubeQueryFilterOperation__Equal.tsx +170 -0
- package/src/stores/core/filter/DataCubeQueryFilterOperation__EqualCaseInsensitive.tsx +94 -0
- package/src/stores/core/filter/DataCubeQueryFilterOperation__EqualCaseInsensitiveColumn.tsx +92 -0
- package/src/stores/core/filter/DataCubeQueryFilterOperation__EqualColumn.tsx +93 -0
- package/src/stores/core/filter/DataCubeQueryFilterOperation__GreaterThan.tsx +96 -0
- package/src/stores/core/filter/DataCubeQueryFilterOperation__GreaterThanColumn.tsx +92 -0
- package/src/stores/core/filter/DataCubeQueryFilterOperation__GreaterThanOrEqual.tsx +96 -0
- package/src/stores/core/filter/DataCubeQueryFilterOperation__GreaterThanOrEqualColumn.tsx +92 -0
- package/src/stores/core/filter/DataCubeQueryFilterOperation__IsNotNull.tsx +92 -0
- package/src/stores/core/filter/DataCubeQueryFilterOperation__IsNull.tsx +89 -0
- package/src/stores/core/filter/DataCubeQueryFilterOperation__LessThan.tsx +96 -0
- package/src/stores/core/filter/DataCubeQueryFilterOperation__LessThanColumn.tsx +92 -0
- package/src/stores/core/filter/DataCubeQueryFilterOperation__LessThanOrEqual.tsx +96 -0
- package/src/stores/core/filter/DataCubeQueryFilterOperation__LessThanOrEqualColumn.tsx +92 -0
- package/src/stores/core/filter/DataCubeQueryFilterOperation__NotContain.tsx +91 -0
- package/src/stores/core/filter/DataCubeQueryFilterOperation__NotEndWith.tsx +91 -0
- package/src/stores/core/filter/DataCubeQueryFilterOperation__NotEqual.tsx +101 -0
- package/src/stores/core/filter/DataCubeQueryFilterOperation__NotEqualCaseInsensitive.tsx +97 -0
- package/src/stores/core/filter/DataCubeQueryFilterOperation__NotEqualCaseInsensitiveColumn.tsx +95 -0
- package/src/stores/core/filter/DataCubeQueryFilterOperation__NotEqualColumn.tsx +96 -0
- package/src/stores/core/filter/DataCubeQueryFilterOperation__NotStartWith.tsx +91 -0
- package/src/stores/core/filter/DataCubeQueryFilterOperation__StartWith.tsx +88 -0
- package/src/stores/core/filter/DataCubeQueryFilterOperation__StartWithCaseInsensitive.tsx +94 -0
- package/src/stores/editor/DataCubeEditorColumnPropertiesPanelState.ts +111 -0
- package/src/stores/editor/DataCubeEditorColumnsPanelState.ts +198 -0
- package/src/stores/editor/DataCubeEditorColumnsSelectorState.ts +115 -0
- package/src/stores/editor/DataCubeEditorGeneralPropertiesPanelState.ts +87 -0
- package/src/stores/editor/DataCubeEditorHorizontalPivotsPanelState.ts +132 -0
- package/src/stores/editor/DataCubeEditorMutableConfiguration.ts +677 -0
- package/src/stores/editor/DataCubeEditorPanelState.ts +37 -0
- package/src/stores/editor/DataCubeEditorSortsPanelState.ts +147 -0
- package/src/stores/editor/DataCubeEditorState.tsx +206 -0
- package/src/stores/editor/DataCubeEditorVerticalPivotsPanelState.ts +110 -0
- package/src/stores/engine/DataCubeApplicationEngine.tsx +120 -0
- package/src/stores/engine/DataCubeEngine.ts +276 -0
- package/src/stores/engine/DataCubeLayoutManagerState.ts +184 -0
- package/src/stores/engine/DataCubeQuery.ts +130 -0
- package/src/stores/extend/DataCubeColumnEditorState.tsx +365 -0
- package/src/stores/extend/DataCubeExtendManagerState.tsx +175 -0
- package/src/stores/filter/DataCubeFilterEditorState.tsx +327 -0
- package/src/stores/grid/DataCubeGridClientEngine.ts +506 -0
- package/src/stores/grid/DataCubeGridClientExportEngine.ts +173 -0
- package/src/stores/grid/DataCubeGridConfigurationBuilder.tsx +940 -0
- package/src/stores/grid/DataCubeGridControllerState.ts +493 -0
- package/src/stores/grid/DataCubeGridMenuBuilder.tsx +861 -0
- package/src/stores/grid/DataCubeGridQueryBuilder.ts +195 -0
- package/src/stores/grid/DataCubeGridQuerySnapshotBuilder.ts +125 -0
- package/src/stores/grid/DataCubeGridState.ts +155 -0
- package/tsconfig.json +164 -0
|
@@ -0,0 +1,649 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright (c) 2020-present, Goldman Sachs
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
/***************************************************************************************
|
|
18
|
+
* [GRID]
|
|
19
|
+
*
|
|
20
|
+
* These are utilities used to build the configuration for the grid client,
|
|
21
|
+
* AG Grid, from the query snapshot.
|
|
22
|
+
***************************************************************************************/
|
|
23
|
+
import { _findCol, } from '../core/DataCubeQuerySnapshot.js';
|
|
24
|
+
import { GridClientSortDirection, INTERNAL__GRID_CLIENT_COLUMN_MIN_WIDTH, INTERNAL__GridClientUtilityCssClassName, generateFontFamilyUtilityClassName, generateFontSizeUtilityClassName, generateFontUnderlineUtilityClassName, generateTextAlignUtilityClassName, generateTextColorUtilityClassName, generateBackgroundColorUtilityClassName, generateFontCaseUtilityClassName, GridClientPinnedAlignement, INTERNAL__GRID_CLIENT_ROW_HEIGHT, INTERNAL__GRID_CLIENT_AUTO_RESIZE_PADDING, INTERNAL__GRID_CLIENT_HEADER_HEIGHT, INTERNAL__GRID_CLIENT_TOOLTIP_SHOW_DELAY, INTERNAL__GRID_CLIENT_SIDE_BAR_WIDTH, INTERNAL__GRID_CLIENT_ROW_GROUPING_COUNT_AGG_COLUMN_ID, INTERNAL__GRID_CLIENT_MISSING_VALUE, INTERNAL__GRID_CLIENT_DATA_FETCH_MANUAL_TRIGGER_COLUMN_ID, INTERNAL__GRID_CLIENT_PIVOT_COLUMN_GROUP_COLOR_ROTATION_SIZE, INTERNAL__GRID_CLIENT_TREE_COLUMN_ID, } from './DataCubeGridClientEngine.js';
|
|
25
|
+
import { getNonNullableEntry, getNullableLastEntry, getQueryParameters, getQueryParameterValue, guaranteeNonNullable, isNonNullable, isNullable, isNumber, isValidUrl, } from '@finos/legend-shared';
|
|
26
|
+
import { DataCubeColumnDataType, DataCubeColumnPinPlacement, DataCubeNumberScale, DEFAULT_ROW_BUFFER, DEFAULT_URL_LABEL_QUERY_PARAM, getDataType, DataCubeQuerySortOperator, DataCubeColumnKind, DEFAULT_MISSING_VALUE_DISPLAY_TEXT, PIVOT_COLUMN_NAME_VALUE_SEPARATOR, isPivotResultColumnName, } from '../core/DataCubeQueryEngine.js';
|
|
27
|
+
import { DataCubeIcon } from '@finos/legend-art';
|
|
28
|
+
// --------------------------------- UTILITIES ---------------------------------
|
|
29
|
+
function scaleNumber(value, type) {
|
|
30
|
+
switch (type) {
|
|
31
|
+
case DataCubeNumberScale.PERCENT:
|
|
32
|
+
return { value: value * 1e2, unit: '%' };
|
|
33
|
+
case DataCubeNumberScale.BASIS_POINT:
|
|
34
|
+
return { value: value * 1e4, unit: 'bp' };
|
|
35
|
+
case DataCubeNumberScale.THOUSANDS:
|
|
36
|
+
return { value: value / 1e3, unit: 'k' };
|
|
37
|
+
case DataCubeNumberScale.MILLIONS:
|
|
38
|
+
return { value: value / 1e6, unit: 'm' };
|
|
39
|
+
case DataCubeNumberScale.BILLIONS:
|
|
40
|
+
return { value: value / 1e9, unit: 'b' };
|
|
41
|
+
case DataCubeNumberScale.TRILLIONS:
|
|
42
|
+
return { value: value / 1e12, unit: 't' };
|
|
43
|
+
case DataCubeNumberScale.AUTO:
|
|
44
|
+
return scaleNumber(value, value >= 1e12
|
|
45
|
+
? DataCubeNumberScale.TRILLIONS
|
|
46
|
+
: value >= 1e9
|
|
47
|
+
? DataCubeNumberScale.BILLIONS
|
|
48
|
+
: value >= 1e6
|
|
49
|
+
? DataCubeNumberScale.MILLIONS
|
|
50
|
+
: value >= 1e3
|
|
51
|
+
? DataCubeNumberScale.THOUSANDS
|
|
52
|
+
: undefined);
|
|
53
|
+
default:
|
|
54
|
+
return { value, unit: undefined };
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
function DataCubeGridLoadingCellRenderer(props) {
|
|
58
|
+
if (props.node.failedLoad) {
|
|
59
|
+
return _jsx("span", { className: "inline-flex items-center", children: "#ERR" });
|
|
60
|
+
}
|
|
61
|
+
return (_jsxs("span", { className: "inline-flex items-center", children: [_jsx(DataCubeIcon.Loader, { className: "mr-1 animate-spin stroke-2" }), "Loading"] }));
|
|
62
|
+
}
|
|
63
|
+
function getCellRenderer(columnData) {
|
|
64
|
+
const { column } = columnData;
|
|
65
|
+
const dataType = getDataType(column.type);
|
|
66
|
+
if (dataType === DataCubeColumnDataType.TEXT && column.displayAsLink) {
|
|
67
|
+
return function LinkRenderer(params) {
|
|
68
|
+
const isUrl = isValidUrl(params.value);
|
|
69
|
+
if (!isUrl) {
|
|
70
|
+
return params.value;
|
|
71
|
+
}
|
|
72
|
+
const url = params.value;
|
|
73
|
+
const label = getQueryParameterValue(column.linkLabelParameter ?? DEFAULT_URL_LABEL_QUERY_PARAM, getQueryParameters(url, true));
|
|
74
|
+
return (_jsx("a", { href: url, target: "_blank", rel: "noreferrer", className: "text-blue-600 underline", children: label ?? url }));
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
return null;
|
|
78
|
+
}
|
|
79
|
+
function _displaySpec(columnData) {
|
|
80
|
+
const { name, snapshot, column, configuration } = columnData;
|
|
81
|
+
const dataType = getDataType(column.type);
|
|
82
|
+
const fontFamily = column.fontFamily ?? configuration.fontFamily;
|
|
83
|
+
const fontSize = column.fontSize ?? configuration.fontSize;
|
|
84
|
+
const fontBold = column.fontBold ?? configuration.fontBold;
|
|
85
|
+
const fontItalic = column.fontItalic ?? configuration.fontItalic;
|
|
86
|
+
const fontStrikethrough = column.fontStrikethrough ?? configuration.fontStrikethrough;
|
|
87
|
+
const fontUnderline = column.fontUnderline ?? configuration.fontUnderline;
|
|
88
|
+
const fontCase = column.fontCase ?? configuration.fontCase;
|
|
89
|
+
const textAlign = column.textAlign ?? configuration.textAlign;
|
|
90
|
+
const normalForegroundColor = column.normalForegroundColor ?? configuration.normalForegroundColor;
|
|
91
|
+
const normalBackgroundColor = column.normalBackgroundColor ?? configuration.normalBackgroundColor;
|
|
92
|
+
const negativeForegroundColor = column.negativeForegroundColor ?? configuration.negativeForegroundColor;
|
|
93
|
+
const negativeBackgroundColor = column.negativeBackgroundColor ?? configuration.negativeBackgroundColor;
|
|
94
|
+
const zeroForegroundColor = column.zeroForegroundColor ?? configuration.zeroForegroundColor;
|
|
95
|
+
const zeroBackgroundColor = column.zeroBackgroundColor ?? configuration.zeroBackgroundColor;
|
|
96
|
+
const errorForegroundColor = column.errorForegroundColor ?? configuration.errorForegroundColor;
|
|
97
|
+
const errorBackgroundColor = column.errorBackgroundColor ?? configuration.errorBackgroundColor;
|
|
98
|
+
return {
|
|
99
|
+
// disabling cell data type inference can grid performance
|
|
100
|
+
// especially when this information is only necessary for cell value editor
|
|
101
|
+
cellDataType: false,
|
|
102
|
+
hide: column.hideFromView ||
|
|
103
|
+
!column.isSelected ||
|
|
104
|
+
Boolean(snapshot.data.pivot &&
|
|
105
|
+
!snapshot.data.pivot.castColumns.find((col) => col.name === name)),
|
|
106
|
+
lockVisible: !column.isSelected ||
|
|
107
|
+
Boolean(snapshot.data.pivot &&
|
|
108
|
+
!snapshot.data.pivot.castColumns.find((col) => col.name === name)),
|
|
109
|
+
pinned: column.pinned !== undefined
|
|
110
|
+
? column.pinned === DataCubeColumnPinPlacement.RIGHT
|
|
111
|
+
? GridClientPinnedAlignement.RIGHT
|
|
112
|
+
: GridClientPinnedAlignement.LEFT
|
|
113
|
+
: null,
|
|
114
|
+
headerClass: isPivotResultColumnName(name)
|
|
115
|
+
? 'pl-1 border border-neutral-300'
|
|
116
|
+
: 'pl-1 border border-neutral-200',
|
|
117
|
+
cellClassRules: {
|
|
118
|
+
[generateFontFamilyUtilityClassName(fontFamily)]: () => true,
|
|
119
|
+
[generateFontSizeUtilityClassName(fontSize)]: () => true,
|
|
120
|
+
[INTERNAL__GridClientUtilityCssClassName.FONT_BOLD]: () => fontBold,
|
|
121
|
+
[INTERNAL__GridClientUtilityCssClassName.FONT_ITALIC]: () => fontItalic,
|
|
122
|
+
[INTERNAL__GridClientUtilityCssClassName.FONT_STRIKETHROUGH]: () => fontStrikethrough,
|
|
123
|
+
[generateFontUnderlineUtilityClassName(fontUnderline)]: () => Boolean(fontUnderline),
|
|
124
|
+
[generateFontCaseUtilityClassName(fontCase)]: (params) => dataType === DataCubeColumnDataType.TEXT && Boolean(fontCase),
|
|
125
|
+
[generateTextAlignUtilityClassName(textAlign)]: () => true,
|
|
126
|
+
[generateTextColorUtilityClassName(normalForegroundColor, 'normal')]: () => true,
|
|
127
|
+
[generateBackgroundColorUtilityClassName(normalBackgroundColor, 'normal')]: () => true,
|
|
128
|
+
[generateTextColorUtilityClassName(zeroForegroundColor, 'zero')]: (params) => dataType === DataCubeColumnDataType.NUMBER &&
|
|
129
|
+
isNumber(params.value) &&
|
|
130
|
+
params.value === 0,
|
|
131
|
+
[generateBackgroundColorUtilityClassName(zeroBackgroundColor, 'zero')]: (params) => dataType === DataCubeColumnDataType.NUMBER &&
|
|
132
|
+
isNumber(params.value) &&
|
|
133
|
+
params.value === 0,
|
|
134
|
+
[generateTextColorUtilityClassName(negativeForegroundColor, 'negative')]: (params) => dataType === DataCubeColumnDataType.NUMBER &&
|
|
135
|
+
isNumber(params.value) &&
|
|
136
|
+
params.value < 0,
|
|
137
|
+
[generateBackgroundColorUtilityClassName(negativeBackgroundColor, 'negative')]: (params) => dataType === DataCubeColumnDataType.NUMBER &&
|
|
138
|
+
isNumber(params.value) &&
|
|
139
|
+
params.value < 0,
|
|
140
|
+
[generateTextColorUtilityClassName(errorForegroundColor, 'error')]: (params) => Boolean(params.node.failedLoad),
|
|
141
|
+
[generateBackgroundColorUtilityClassName(errorBackgroundColor, 'error')]: (params) => Boolean(params.node.failedLoad),
|
|
142
|
+
[INTERNAL__GridClientUtilityCssClassName.BLUR]: () => column.blur,
|
|
143
|
+
},
|
|
144
|
+
valueFormatter: dataType === DataCubeColumnDataType.NUMBER
|
|
145
|
+
? (params) => {
|
|
146
|
+
const value = params.value;
|
|
147
|
+
if (isNullable(value) ||
|
|
148
|
+
value ===
|
|
149
|
+
INTERNAL__GRID_CLIENT_MISSING_VALUE) {
|
|
150
|
+
return (column.missingValueDisplayText ??
|
|
151
|
+
DEFAULT_MISSING_VALUE_DISPLAY_TEXT);
|
|
152
|
+
}
|
|
153
|
+
const showNegativeNumberInParens = column.negativeNumberInParens && value < 0;
|
|
154
|
+
// 1. apply the number scale
|
|
155
|
+
const scaledNumber = scaleNumber(value, column.numberScale);
|
|
156
|
+
// 2. apply the number formatter
|
|
157
|
+
const formattedValue = (showNegativeNumberInParens
|
|
158
|
+
? Math.abs(scaledNumber.value)
|
|
159
|
+
: scaledNumber.value).toLocaleString(undefined, {
|
|
160
|
+
useGrouping: column.displayCommas,
|
|
161
|
+
...(column.decimals !== undefined
|
|
162
|
+
? {
|
|
163
|
+
minimumFractionDigits: column.decimals,
|
|
164
|
+
maximumFractionDigits: column.decimals,
|
|
165
|
+
}
|
|
166
|
+
: {}),
|
|
167
|
+
});
|
|
168
|
+
// 3. add the parentheses (and then the unit)
|
|
169
|
+
return ((showNegativeNumberInParens
|
|
170
|
+
? `(${formattedValue})`
|
|
171
|
+
: formattedValue) +
|
|
172
|
+
(scaledNumber.unit ? ` ${scaledNumber.unit}` : ''));
|
|
173
|
+
}
|
|
174
|
+
: (params) => params.value === INTERNAL__GRID_CLIENT_MISSING_VALUE
|
|
175
|
+
? (column.missingValueDisplayText ??
|
|
176
|
+
DEFAULT_MISSING_VALUE_DISPLAY_TEXT)
|
|
177
|
+
: params.value,
|
|
178
|
+
tooltipValueGetter: (params) => isNonNullable(params.value) &&
|
|
179
|
+
params.value !== INTERNAL__GRID_CLIENT_MISSING_VALUE
|
|
180
|
+
? `Value = ${params.value === '' ? "''" : params.value === true ? 'TRUE' : params.value === false ? 'FALSE' : params.value}`
|
|
181
|
+
: `Missing Value`,
|
|
182
|
+
loadingCellRenderer: DataCubeGridLoadingCellRenderer,
|
|
183
|
+
cellRenderer: getCellRenderer(columnData),
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
function _groupDisplaySpec(snapshot, configuration) {
|
|
187
|
+
// TODO?: we can technically alternate the styling based on the column at various drilldown level
|
|
188
|
+
// but for now,we will simply use the same styling as the (default) grid styling
|
|
189
|
+
const fontFamily = configuration.fontFamily;
|
|
190
|
+
const fontSize = configuration.fontSize;
|
|
191
|
+
const fontBold = configuration.fontBold;
|
|
192
|
+
const fontItalic = configuration.fontItalic;
|
|
193
|
+
const fontStrikethrough = configuration.fontStrikethrough;
|
|
194
|
+
const fontUnderline = configuration.fontUnderline;
|
|
195
|
+
const fontCase = configuration.fontCase;
|
|
196
|
+
const textAlign = configuration.textAlign;
|
|
197
|
+
const normalForegroundColor = configuration.normalForegroundColor;
|
|
198
|
+
const normalBackgroundColor = configuration.normalBackgroundColor;
|
|
199
|
+
return {
|
|
200
|
+
cellDataType: false, // no point in specifying a type here since it can be of multiple types
|
|
201
|
+
hide: !snapshot.data.groupBy,
|
|
202
|
+
lockPosition: true,
|
|
203
|
+
lockPinned: true,
|
|
204
|
+
pinned: GridClientPinnedAlignement.LEFT,
|
|
205
|
+
cellClassRules: {
|
|
206
|
+
[generateFontFamilyUtilityClassName(fontFamily)]: () => true,
|
|
207
|
+
[generateFontSizeUtilityClassName(fontSize)]: () => true,
|
|
208
|
+
[INTERNAL__GridClientUtilityCssClassName.FONT_BOLD]: () => fontBold,
|
|
209
|
+
[INTERNAL__GridClientUtilityCssClassName.FONT_ITALIC]: () => fontItalic,
|
|
210
|
+
[INTERNAL__GridClientUtilityCssClassName.FONT_STRIKETHROUGH]: () => fontStrikethrough,
|
|
211
|
+
[generateFontUnderlineUtilityClassName(fontUnderline)]: () => Boolean(fontUnderline),
|
|
212
|
+
[generateFontCaseUtilityClassName(fontCase)]: (params) => Boolean(fontCase),
|
|
213
|
+
[generateTextAlignUtilityClassName(textAlign)]: () => true,
|
|
214
|
+
[generateTextColorUtilityClassName(normalForegroundColor, 'normal')]: () => true,
|
|
215
|
+
[generateBackgroundColorUtilityClassName(normalBackgroundColor, 'normal')]: () => true,
|
|
216
|
+
},
|
|
217
|
+
tooltipValueGetter: (params) => {
|
|
218
|
+
if (isNonNullable(params.value) &&
|
|
219
|
+
params.value !== INTERNAL__GRID_CLIENT_MISSING_VALUE) {
|
|
220
|
+
return (`Group Value = ${params.value === '' ? "''" : params.value === true ? 'TRUE' : params.value === false ? 'FALSE' : params.value}` +
|
|
221
|
+
`${params.data[INTERNAL__GRID_CLIENT_ROW_GROUPING_COUNT_AGG_COLUMN_ID] !== undefined ? ` (${params.data[INTERNAL__GRID_CLIENT_ROW_GROUPING_COUNT_AGG_COLUMN_ID]})` : ''}`);
|
|
222
|
+
}
|
|
223
|
+
return null;
|
|
224
|
+
},
|
|
225
|
+
loadingCellRenderer: DataCubeGridLoadingCellRenderer,
|
|
226
|
+
};
|
|
227
|
+
}
|
|
228
|
+
function _sizeSpec(columnData) {
|
|
229
|
+
const { column } = columnData;
|
|
230
|
+
return {
|
|
231
|
+
// NOTE: there is a problem with ag-grid when scrolling horizontally, the header row
|
|
232
|
+
// lags behind the data, it seems to be caused by synchronizing scroll not working properly
|
|
233
|
+
// There is currently, no way around this
|
|
234
|
+
// See https://github.com/ag-grid/ag-grid/issues/5233
|
|
235
|
+
// See https://github.com/ag-grid/ag-grid/issues/7620
|
|
236
|
+
// See https://github.com/ag-grid/ag-grid/issues/6292
|
|
237
|
+
// See https://issues.chromium.org/issues/40890343#comment11
|
|
238
|
+
//
|
|
239
|
+
// TODO: if we support column resize to fit content, should we disable this behavior?
|
|
240
|
+
resizable: column.fixedWidth === undefined,
|
|
241
|
+
suppressAutoSize: column.fixedWidth !== undefined,
|
|
242
|
+
suppressSizeToFit: column.fixedWidth !== undefined,
|
|
243
|
+
width: column.fixedWidth,
|
|
244
|
+
minWidth: Math.max(column.minWidth ?? INTERNAL__GRID_CLIENT_COLUMN_MIN_WIDTH, INTERNAL__GRID_CLIENT_COLUMN_MIN_WIDTH),
|
|
245
|
+
maxWidth: column.maxWidth,
|
|
246
|
+
// Make sure the column spans the width if possible so when total width
|
|
247
|
+
// is less than grid width, removing/adding one column will cause the other
|
|
248
|
+
// columns to take/give up space
|
|
249
|
+
flex: column.fixedWidth === undefined ? 1 : undefined,
|
|
250
|
+
};
|
|
251
|
+
}
|
|
252
|
+
function _sortSpec(columnData) {
|
|
253
|
+
const { name, snapshot } = columnData;
|
|
254
|
+
const sortColumns = snapshot.data.sortColumns;
|
|
255
|
+
const sortCol = _findCol(sortColumns, name);
|
|
256
|
+
return {
|
|
257
|
+
sortable: true, // if this is pivot column, no sorting is supported yet
|
|
258
|
+
sort: sortCol
|
|
259
|
+
? sortCol.operation === DataCubeQuerySortOperator.ASCENDING
|
|
260
|
+
? GridClientSortDirection.ASCENDING
|
|
261
|
+
: GridClientSortDirection.DESCENDING
|
|
262
|
+
: null,
|
|
263
|
+
sortIndex: sortCol ? sortColumns.indexOf(sortCol) : null,
|
|
264
|
+
};
|
|
265
|
+
}
|
|
266
|
+
function _aggregationSpec(columnData) {
|
|
267
|
+
const { name, snapshot, column } = columnData;
|
|
268
|
+
const data = snapshot.data;
|
|
269
|
+
const pivotCol = _findCol(data.pivot?.columns, name);
|
|
270
|
+
const groupByCol = _findCol(data.groupBy?.columns, name);
|
|
271
|
+
const isGroupExtendedColumn = Boolean(_findCol(data.groupExtendedColumns, name));
|
|
272
|
+
return {
|
|
273
|
+
enableRowGroup: !isGroupExtendedColumn && column.kind === DataCubeColumnKind.DIMENSION,
|
|
274
|
+
rowGroup: !isGroupExtendedColumn && Boolean(groupByCol),
|
|
275
|
+
rowGroupIndex: !isGroupExtendedColumn && groupByCol
|
|
276
|
+
? (data.groupBy?.columns.indexOf(groupByCol) ?? null)
|
|
277
|
+
: null,
|
|
278
|
+
enablePivot: !isGroupExtendedColumn && column.kind === DataCubeColumnKind.DIMENSION,
|
|
279
|
+
pivot: !isGroupExtendedColumn && Boolean(pivotCol),
|
|
280
|
+
pivotIndex: !isGroupExtendedColumn && pivotCol
|
|
281
|
+
? (data.pivot?.columns.indexOf(pivotCol) ?? null)
|
|
282
|
+
: null,
|
|
283
|
+
// NOTE: we don't quite care about populating these accurately
|
|
284
|
+
// since ag-grid aggregation does not support parameters, so
|
|
285
|
+
// its set of supported aggregators will never match that specified
|
|
286
|
+
// in the editor. But we MUST set this to make sure sorting works
|
|
287
|
+
// when row grouping is used, so we need to set a non-null value here.
|
|
288
|
+
aggFunc: !isGroupExtendedColumn ? column.aggregateOperator : null,
|
|
289
|
+
enableValue: false, // disable GUI interactions to modify this column's aggregate function
|
|
290
|
+
allowedAggFuncs: [], // disable GUI for options of the agg functions
|
|
291
|
+
};
|
|
292
|
+
}
|
|
293
|
+
// --------------------------------- MAIN ---------------------------------
|
|
294
|
+
export function generateBaseGridOptions(view) {
|
|
295
|
+
const grid = view.grid;
|
|
296
|
+
return {
|
|
297
|
+
// -------------------------------------- README --------------------------------------
|
|
298
|
+
// NOTE: we observe performance degradataion when configuring the grid via React component
|
|
299
|
+
// props when the options is non-static, i.e. changed when the query configuration changes.
|
|
300
|
+
// As such, we must ONLY ADD STATIC CONFIGURATION HERE, and dynamic configuration should be
|
|
301
|
+
// programatically updated when the query is modified.
|
|
302
|
+
//
|
|
303
|
+
//
|
|
304
|
+
// -------------------------------------- ROW GROUPING --------------------------------------
|
|
305
|
+
rowGroupPanelShow: 'always',
|
|
306
|
+
// use the auto-generated group column to make it work with pivot mode
|
|
307
|
+
// See https://github.com/ag-grid/ag-grid/issues/8088
|
|
308
|
+
groupDisplayType: 'singleColumn',
|
|
309
|
+
suppressRowGroupHidesColumns: true, // keeps the column set stable even when row grouping is used
|
|
310
|
+
suppressAggFuncInHeader: true, // keeps the columns stable when aggregation is used
|
|
311
|
+
getChildCount: (data) => data[INTERNAL__GRID_CLIENT_ROW_GROUPING_COUNT_AGG_COLUMN_ID],
|
|
312
|
+
// -------------------------------------- PIVOT --------------------------------------
|
|
313
|
+
// NOTE: when enabled, pivot mode will show the pivot panel (allowing drag and drop)
|
|
314
|
+
// and pivot section in column tools panel, but it comes with many restrictions/opinionated
|
|
315
|
+
// behaviors on column grouping: i.e. it disallow full control of column definitions, so we
|
|
316
|
+
// couldn't display dimension columns which are not part of pivot while pivoting.
|
|
317
|
+
//
|
|
318
|
+
// Even setting flag pivotSuppressAutoColumn=true does not seem to remove the column
|
|
319
|
+
// auto-grouping behavior
|
|
320
|
+
//
|
|
321
|
+
// As such, we will just make use of column pivot settings to trigger server-side row
|
|
322
|
+
// model data-fetching when pivot changes, and would opt out from all GUI features
|
|
323
|
+
// that pivot mode offers by disabling pivot mode and will re-assess its usage in the future.
|
|
324
|
+
//
|
|
325
|
+
// pivotMode: Boolean(snapshot.data.pivot),
|
|
326
|
+
// pivotPanelShow: 'always',
|
|
327
|
+
// pivotSuppressAutoColumn: true,
|
|
328
|
+
// -------------------------------------- SORT --------------------------------------
|
|
329
|
+
// Force multi-sorting since this is what the query supports anyway
|
|
330
|
+
alwaysMultiSort: true,
|
|
331
|
+
// -------------------------------------- DISPLAY --------------------------------------
|
|
332
|
+
rowHeight: INTERNAL__GRID_CLIENT_ROW_HEIGHT,
|
|
333
|
+
headerHeight: INTERNAL__GRID_CLIENT_HEADER_HEIGHT,
|
|
334
|
+
noRowsOverlayComponent: () => (_jsxs("div", { className: "flex items-center border-[1.5px] border-neutral-300 p-2 font-medium text-neutral-400", children: [_jsx("div", { children: _jsx(DataCubeIcon.WarningCircle, { className: "mr-1 stroke-2 text-lg" }) }), "0 rows"] })),
|
|
335
|
+
loadingOverlayComponent: () => (_jsxs("div", { className: "flex items-center border-[1.5px] border-neutral-300 p-2 font-medium text-neutral-400", children: [_jsx("div", { children: _jsx(DataCubeIcon.Loader, { className: "mr-1 animate-spin stroke-2 text-lg" }) }), "Loading..."] })),
|
|
336
|
+
// Show cursor position when scrolling
|
|
337
|
+
onBodyScroll: (event) => {
|
|
338
|
+
const rowCount = event.api.getDisplayedRowCount();
|
|
339
|
+
const range = event.api.getVerticalPixelRange();
|
|
340
|
+
const start = Math.max(1, Math.ceil(range.top / INTERNAL__GRID_CLIENT_ROW_HEIGHT) + 1);
|
|
341
|
+
const end = Math.min(rowCount, Math.floor(range.bottom / INTERNAL__GRID_CLIENT_ROW_HEIGHT));
|
|
342
|
+
grid.setScrollHintText(`${start}-${end}/${rowCount}`);
|
|
343
|
+
event.api.hidePopupMenu(); // hide context-menu while scrolling
|
|
344
|
+
},
|
|
345
|
+
onBodyScrollEnd: () => grid.setScrollHintText(undefined),
|
|
346
|
+
scrollbarWidth: 10,
|
|
347
|
+
alwaysShowVerticalScroll: true, // this is needed to ensure column resize calculation is accurate
|
|
348
|
+
// -------------------------------------- CONTEXT MENU --------------------------------------
|
|
349
|
+
preventDefaultOnContextMenu: true, // prevent showing the browser's context menu
|
|
350
|
+
columnMenu: 'new', // ensure context menu works on header
|
|
351
|
+
// NOTE: dynamically generate the content of the context menu to make sure the items are not stale
|
|
352
|
+
getContextMenuItems: (params) => grid.controller.menuBuilder?.(params, false) ?? [],
|
|
353
|
+
getMainMenuItems: (params) => grid.controller.menuBuilder?.(params, true) ?? [],
|
|
354
|
+
// NOTE: when right-clicking empty space in the header, a menu will show up
|
|
355
|
+
// with 2 default options: 'Choose Columns` and `Reset Columns`, which is not
|
|
356
|
+
// a desired behavior, so we hide the popup menu immediately
|
|
357
|
+
onColumnMenuVisibleChanged: (event) => {
|
|
358
|
+
if (!event.column) {
|
|
359
|
+
const menuElement = document.querySelector(`.${INTERNAL__GridClientUtilityCssClassName.ROOT} .ag-popup .ag-menu`);
|
|
360
|
+
if (menuElement) {
|
|
361
|
+
menuElement.style.display = 'none';
|
|
362
|
+
}
|
|
363
|
+
event.api.hidePopupMenu();
|
|
364
|
+
}
|
|
365
|
+
},
|
|
366
|
+
// -------------------------------------- COLUMN SIZING --------------------------------------
|
|
367
|
+
autoSizePadding: INTERNAL__GRID_CLIENT_AUTO_RESIZE_PADDING,
|
|
368
|
+
// ensure columns are resized to fit the grid width initially and on window resize
|
|
369
|
+
// NOTE: this has to be used with `alwaysShowVerticalScroll` to ensure accurate sizing
|
|
370
|
+
// otherwise on initial load, the computation will be done when no data is rendered,
|
|
371
|
+
// so when data is rendered and the vertical scrollbar shows up, it will block a part of
|
|
372
|
+
// the last column.
|
|
373
|
+
autoSizeStrategy: {
|
|
374
|
+
type: 'fitGridWidth',
|
|
375
|
+
},
|
|
376
|
+
onGridSizeChanged: (event) => {
|
|
377
|
+
event.api.sizeColumnsToFit();
|
|
378
|
+
},
|
|
379
|
+
// -------------------------------------- TOOLTIP --------------------------------------
|
|
380
|
+
tooltipShowDelay: INTERNAL__GRID_CLIENT_TOOLTIP_SHOW_DELAY,
|
|
381
|
+
// though this is a nice behavior to have enabled, ag-grid not dismissing tooltip
|
|
382
|
+
// when context-menu is triggered makes it an undesirable interaction.
|
|
383
|
+
tooltipInteraction: false,
|
|
384
|
+
// -------------------------------------- COLUMN MOVING --------------------------------------
|
|
385
|
+
suppressDragLeaveHidesColumns: true, // disable this since it's quite easy to accidentally hide columns while moving
|
|
386
|
+
// -------------------------------------- SERVER SIDE ROW MODEL --------------------------------------
|
|
387
|
+
suppressScrollOnNewData: true,
|
|
388
|
+
suppressServerSideFullWidthLoadingRow: true, // make sure each column has its own loading indicator instead of the whole row
|
|
389
|
+
// -------------------------------------- SELECTION --------------------------------------
|
|
390
|
+
cellSelection: true,
|
|
391
|
+
// -------------------------------------- SIDEBAR --------------------------------------
|
|
392
|
+
sideBar: {
|
|
393
|
+
toolPanels: [
|
|
394
|
+
{
|
|
395
|
+
id: 'columns',
|
|
396
|
+
labelDefault: 'Columns',
|
|
397
|
+
labelKey: 'columns',
|
|
398
|
+
iconKey: 'columns',
|
|
399
|
+
toolPanel: 'agColumnsToolPanel',
|
|
400
|
+
minWidth: INTERNAL__GRID_CLIENT_SIDE_BAR_WIDTH,
|
|
401
|
+
width: INTERNAL__GRID_CLIENT_SIDE_BAR_WIDTH,
|
|
402
|
+
toolPanelParams: {
|
|
403
|
+
suppressValues: true,
|
|
404
|
+
suppressPivotMode: true,
|
|
405
|
+
},
|
|
406
|
+
},
|
|
407
|
+
],
|
|
408
|
+
position: 'right',
|
|
409
|
+
},
|
|
410
|
+
allowDragFromColumnsToolPanel: true,
|
|
411
|
+
// -------------------------------------- PERFORMANCE --------------------------------------
|
|
412
|
+
animateRows: false, // improve performance
|
|
413
|
+
suppressColumnMoveAnimation: true, // improve performance
|
|
414
|
+
};
|
|
415
|
+
}
|
|
416
|
+
function generatePivotResultColumnHeaderTooltip(id, snapshot, configuration) {
|
|
417
|
+
const values = id.split(PIVOT_COLUMN_NAME_VALUE_SEPARATOR);
|
|
418
|
+
if (!snapshot.data.pivot ||
|
|
419
|
+
values.length > snapshot.data.pivot.columns.length + 1) {
|
|
420
|
+
return values.join(' / ');
|
|
421
|
+
}
|
|
422
|
+
if (values.length === snapshot.data.pivot.columns.length + 1) {
|
|
423
|
+
const baseColumnName = guaranteeNonNullable(values[values.length - 1]);
|
|
424
|
+
const columnConfiguration = _findCol(configuration.columns, baseColumnName);
|
|
425
|
+
return `Column = ${columnConfiguration
|
|
426
|
+
? columnConfiguration.displayName
|
|
427
|
+
? `${columnConfiguration.displayName} (${columnConfiguration.name})`
|
|
428
|
+
: columnConfiguration.name
|
|
429
|
+
: baseColumnName} ~ [ ${snapshot.data.pivot.columns.map((col, i) => `${_findCol(configuration.columns, col.name)?.displayName ?? col.name} = ${values[i]}`).join(', ')} ]`;
|
|
430
|
+
}
|
|
431
|
+
return `[ ${snapshot.data.pivot.columns
|
|
432
|
+
.slice(0, values.length)
|
|
433
|
+
.map((col, i) => `${_findCol(configuration.columns, col.name)?.displayName ?? col.name} = ${values[i]}`)
|
|
434
|
+
.join(', ')} ]`;
|
|
435
|
+
}
|
|
436
|
+
function generateDefinitionForPivotResultColumns(pivotResultColumns, snapshot, configuration, view) {
|
|
437
|
+
const columns = pivotResultColumns
|
|
438
|
+
.map((col) => ({
|
|
439
|
+
...col,
|
|
440
|
+
values: col.name.split(PIVOT_COLUMN_NAME_VALUE_SEPARATOR),
|
|
441
|
+
}))
|
|
442
|
+
.filter((col) => col.values.length > 1);
|
|
443
|
+
const columnDefs = [];
|
|
444
|
+
columns.forEach((col) => {
|
|
445
|
+
const groups = [];
|
|
446
|
+
let leaf = undefined;
|
|
447
|
+
let id = '';
|
|
448
|
+
for (let i = 0; i < col.values.length; i++) {
|
|
449
|
+
const value = getNonNullableEntry(col.values, i);
|
|
450
|
+
id =
|
|
451
|
+
id === ''
|
|
452
|
+
? getNonNullableEntry(col.values, i)
|
|
453
|
+
: `${id}${PIVOT_COLUMN_NAME_VALUE_SEPARATOR}${value}`;
|
|
454
|
+
if (i !== col.values.length - 1) {
|
|
455
|
+
groups.push({
|
|
456
|
+
groupId: id,
|
|
457
|
+
children: [],
|
|
458
|
+
suppressColumnsToolPanel: true,
|
|
459
|
+
headerName: value,
|
|
460
|
+
headerTooltip: generatePivotResultColumnHeaderTooltip(id, snapshot, configuration),
|
|
461
|
+
});
|
|
462
|
+
}
|
|
463
|
+
else {
|
|
464
|
+
const column = _findCol(configuration.columns, value);
|
|
465
|
+
if (column) {
|
|
466
|
+
const columnData = {
|
|
467
|
+
name: col.name,
|
|
468
|
+
snapshot,
|
|
469
|
+
column,
|
|
470
|
+
configuration,
|
|
471
|
+
};
|
|
472
|
+
leaf = {
|
|
473
|
+
headerName: column.displayName ?? column.name,
|
|
474
|
+
colId: col.name,
|
|
475
|
+
field: col.name,
|
|
476
|
+
menuTabs: [],
|
|
477
|
+
..._displaySpec(columnData),
|
|
478
|
+
..._sizeSpec(columnData),
|
|
479
|
+
// disallow pinning and moving pivot result columns
|
|
480
|
+
pinned: false,
|
|
481
|
+
lockPinned: true,
|
|
482
|
+
lockPosition: true,
|
|
483
|
+
suppressColumnsToolPanel: true, // hide from column tool panel
|
|
484
|
+
headerTooltip: generatePivotResultColumnHeaderTooltip(id, snapshot, configuration),
|
|
485
|
+
};
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
}
|
|
489
|
+
let currentCollection = columnDefs;
|
|
490
|
+
groups.forEach((group) => {
|
|
491
|
+
const existingGroup = currentCollection.find((collection) => 'groupId' in collection && collection.groupId === group.groupId);
|
|
492
|
+
if (existingGroup) {
|
|
493
|
+
currentCollection = existingGroup.children;
|
|
494
|
+
}
|
|
495
|
+
else {
|
|
496
|
+
const newGroup = {
|
|
497
|
+
...group,
|
|
498
|
+
headerClass: `${INTERNAL__GridClientUtilityCssClassName.PIVOT_COLUMN_GROUP} ${INTERNAL__GridClientUtilityCssClassName.PIVOT_COLUMN_GROUP_PREFIX}${currentCollection.length % INTERNAL__GRID_CLIENT_PIVOT_COLUMN_GROUP_COLOR_ROTATION_SIZE}`,
|
|
499
|
+
};
|
|
500
|
+
currentCollection.push(newGroup);
|
|
501
|
+
currentCollection = newGroup.children;
|
|
502
|
+
}
|
|
503
|
+
});
|
|
504
|
+
if (leaf) {
|
|
505
|
+
currentCollection.push(leaf);
|
|
506
|
+
// sort the leaf level columns based on the order of selected/configuration columns
|
|
507
|
+
currentCollection.sort((a, b) => {
|
|
508
|
+
const colAName = getNullableLastEntry(a.colId?.split(PIVOT_COLUMN_NAME_VALUE_SEPARATOR) ?? []);
|
|
509
|
+
const colAConf = colAName
|
|
510
|
+
? _findCol(configuration.columns, colAName)
|
|
511
|
+
: undefined;
|
|
512
|
+
const colBName = getNullableLastEntry(b.colId?.split(PIVOT_COLUMN_NAME_VALUE_SEPARATOR) ?? []);
|
|
513
|
+
const colBConf = colBName
|
|
514
|
+
? _findCol(configuration.columns, colBName)
|
|
515
|
+
: undefined;
|
|
516
|
+
return ((colAConf
|
|
517
|
+
? configuration.columns.indexOf(colAConf)
|
|
518
|
+
: Number.MAX_VALUE) -
|
|
519
|
+
(colBConf
|
|
520
|
+
? configuration.columns.indexOf(colBConf)
|
|
521
|
+
: Number.MAX_VALUE));
|
|
522
|
+
});
|
|
523
|
+
}
|
|
524
|
+
});
|
|
525
|
+
return columnDefs;
|
|
526
|
+
}
|
|
527
|
+
export function generateColumnDefs(snapshot, configuration, view) {
|
|
528
|
+
// NOTE: only show columns which are fetched in select() as we
|
|
529
|
+
// can't solely rely on column selection because of certain restrictions
|
|
530
|
+
// from ag-grid, e.g. in the case of row grouping tree column: the columns
|
|
531
|
+
// which are grouped must be present in the column definitions, so even
|
|
532
|
+
// when some of these might not be selected explicitly by the users, they
|
|
533
|
+
// must still be included in the column definitions, and made hidden instead.
|
|
534
|
+
const columns = configuration.columns.filter((col) => snapshot.data.selectColumns.find((column) => column.name === col.name));
|
|
535
|
+
let pivotResultColumns = [];
|
|
536
|
+
if (snapshot.data.pivot) {
|
|
537
|
+
const castColumns = snapshot.data.pivot.castColumns;
|
|
538
|
+
pivotResultColumns = castColumns.filter((col) => isPivotResultColumnName(col.name));
|
|
539
|
+
}
|
|
540
|
+
return [
|
|
541
|
+
// NOTE: Internal column used for programatically trigger data fetch when filter is modified
|
|
542
|
+
{
|
|
543
|
+
colId: INTERNAL__GRID_CLIENT_DATA_FETCH_MANUAL_TRIGGER_COLUMN_ID,
|
|
544
|
+
hide: true,
|
|
545
|
+
enableValue: false, // disable GUI interactions to modify this column's aggregate function
|
|
546
|
+
allowedAggFuncs: [], // disable GUI for options of the agg functions
|
|
547
|
+
enablePivot: false,
|
|
548
|
+
enableRowGroup: false,
|
|
549
|
+
filter: 'agTextColumnFilter',
|
|
550
|
+
suppressColumnsToolPanel: true,
|
|
551
|
+
},
|
|
552
|
+
...generateDefinitionForPivotResultColumns(pivotResultColumns, snapshot, configuration, view),
|
|
553
|
+
...columns.map((column) => {
|
|
554
|
+
const columnData = {
|
|
555
|
+
name: column.name,
|
|
556
|
+
snapshot,
|
|
557
|
+
column,
|
|
558
|
+
configuration,
|
|
559
|
+
};
|
|
560
|
+
return {
|
|
561
|
+
headerName: column.displayName ?? column.name,
|
|
562
|
+
headerTooltip: `Column = ${column.displayName
|
|
563
|
+
? `${column.displayName} (${column.name})`
|
|
564
|
+
: column.name}`,
|
|
565
|
+
suppressSpanHeaderHeight: true,
|
|
566
|
+
colId: column.name,
|
|
567
|
+
field: column.name,
|
|
568
|
+
menuTabs: [],
|
|
569
|
+
..._displaySpec(columnData),
|
|
570
|
+
..._sizeSpec(columnData),
|
|
571
|
+
..._sortSpec(columnData),
|
|
572
|
+
..._aggregationSpec(columnData),
|
|
573
|
+
};
|
|
574
|
+
}),
|
|
575
|
+
];
|
|
576
|
+
}
|
|
577
|
+
export function generateGridOptionsFromSnapshot(snapshot, configuration, view) {
|
|
578
|
+
const gridOptions = {
|
|
579
|
+
/**
|
|
580
|
+
* NOTE: there is a strange issue where if we put dynamic configuration directly
|
|
581
|
+
* such as rowClassRules which depends on some changing state (e.g. alternateRows)
|
|
582
|
+
* as the grid component's props, the grid performance will be heavily compromised
|
|
583
|
+
* while if we programatically set it like this, it does not seem so taxing to the
|
|
584
|
+
* performance; perhaps something to do with React component rendering on props change
|
|
585
|
+
* so in general for grid options which are not static, we must configure them here
|
|
586
|
+
*/
|
|
587
|
+
rowClassRules: configuration.alternateRows
|
|
588
|
+
? {
|
|
589
|
+
[INTERNAL__GridClientUtilityCssClassName.HIGHLIGHT_ROW]: (params) => params.rowIndex % (configuration.alternateRowsCount * 2) >=
|
|
590
|
+
configuration.alternateRowsCount,
|
|
591
|
+
}
|
|
592
|
+
: {},
|
|
593
|
+
rowBuffer: DEFAULT_ROW_BUFFER,
|
|
594
|
+
// -------------------------------------- EVENT HANDLERS --------------------------------------
|
|
595
|
+
// NOTE: make sure the event source must not be 'api' since these handlers are meant for direct
|
|
596
|
+
// user interaction with the grid. Actions through context menu (i.e. grid controller) or programatic
|
|
597
|
+
// update of the grid options due to change in query snapshot should not trigger these handlers.
|
|
598
|
+
onColumnPinned: (event) => {
|
|
599
|
+
if (event.source !== 'api' && event.column) {
|
|
600
|
+
const column = event.column;
|
|
601
|
+
const pinned = column.getPinned();
|
|
602
|
+
view.grid.controller.pinColumn(column.getColId(), pinned === null
|
|
603
|
+
? undefined
|
|
604
|
+
: pinned === GridClientPinnedAlignement.LEFT
|
|
605
|
+
? DataCubeColumnPinPlacement.LEFT
|
|
606
|
+
: DataCubeColumnPinPlacement.RIGHT);
|
|
607
|
+
}
|
|
608
|
+
},
|
|
609
|
+
onColumnMoved: (event) => {
|
|
610
|
+
// make sure the move event is finished before syncing the changes
|
|
611
|
+
if (event.source !== 'api' && event.column && event.finished) {
|
|
612
|
+
view.grid.controller.rearrangeColumns((event.api.getColumnDefs() ?? [])
|
|
613
|
+
.filter((col) => !('children' in col))
|
|
614
|
+
.map((col) => col.colId ?? ''));
|
|
615
|
+
}
|
|
616
|
+
},
|
|
617
|
+
onColumnVisible: (event) => {
|
|
618
|
+
if (event.source !== 'api' && event.column) {
|
|
619
|
+
const column = event.column;
|
|
620
|
+
const isVisible = column.isVisible();
|
|
621
|
+
view.grid.controller.showColumn(column.getColId(), isVisible);
|
|
622
|
+
}
|
|
623
|
+
},
|
|
624
|
+
// -------------------------------------- COLUMNS --------------------------------------
|
|
625
|
+
columnDefs: generateColumnDefs(snapshot, configuration, view),
|
|
626
|
+
autoGroupColumnDef: {
|
|
627
|
+
// NOTE: the column ID here is set for explicitness, but this is not something ag-grid
|
|
628
|
+
// allows setting for auto-group column, for more advanced use cases, we might want to
|
|
629
|
+
// look into custom group columns
|
|
630
|
+
// See https://www.ag-grid.com/react-data-grid/grouping-custom-group-columns/
|
|
631
|
+
colId: INTERNAL__GRID_CLIENT_TREE_COLUMN_ID,
|
|
632
|
+
headerName: '',
|
|
633
|
+
cellRenderer: 'agGroupCellRenderer',
|
|
634
|
+
// display
|
|
635
|
+
..._groupDisplaySpec(snapshot, configuration),
|
|
636
|
+
// size
|
|
637
|
+
suppressAutoSize: true,
|
|
638
|
+
suppressSizeToFit: true,
|
|
639
|
+
minWidth: 200,
|
|
640
|
+
// sorting
|
|
641
|
+
sortable: true,
|
|
642
|
+
// aggregation
|
|
643
|
+
showRowGroup: true,
|
|
644
|
+
suppressSpanHeaderHeight: true,
|
|
645
|
+
},
|
|
646
|
+
};
|
|
647
|
+
return gridOptions;
|
|
648
|
+
}
|
|
649
|
+
//# sourceMappingURL=DataCubeGridConfigurationBuilder.js.map
|