@finos/legend-application-repl 0.0.36 → 0.0.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/lib/__lib__/LegendREPLEvent.d.ts +1 -1
- package/lib/__lib__/LegendREPLEvent.d.ts.map +1 -1
- package/lib/__lib__/LegendREPLEvent.js +5 -5
- package/lib/__lib__/LegendREPLEvent.js.map +1 -1
- package/lib/__lib__/LegendREPLSetting.d.ts +1 -1
- package/lib/__lib__/LegendREPLSetting.d.ts.map +1 -1
- package/lib/__lib__/LegendREPLSetting.js +4 -4
- package/lib/__lib__/LegendREPLSetting.js.map +1 -1
- package/lib/application/LegendREPL.d.ts +1 -1
- package/lib/application/LegendREPL.d.ts.map +1 -1
- package/lib/application/LegendREPL.js +2 -2
- package/lib/application/LegendREPL.js.map +1 -1
- package/lib/application/LegendREPLDocumentation.d.ts +21 -0
- package/lib/application/LegendREPLDocumentation.d.ts.map +1 -0
- package/lib/application/LegendREPLDocumentation.js +22 -0
- package/lib/application/LegendREPLDocumentation.js.map +1 -0
- package/lib/components/Core_LegendREPLApplicationPlugin.js +2 -2
- package/lib/components/Core_LegendREPLApplicationPlugin.js.map +1 -1
- package/lib/components/LegendREPLApplication.d.ts.map +1 -1
- package/lib/components/LegendREPLApplication.js +3 -2
- package/lib/components/LegendREPLApplication.js.map +1 -1
- package/lib/components/LegendREPLFrameworkProvider.d.ts.map +1 -1
- package/lib/components/LegendREPLFrameworkProvider.js +2 -2
- package/lib/components/LegendREPLFrameworkProvider.js.map +1 -1
- package/lib/components/REPLStoreProvider.d.ts +4 -2
- package/lib/components/REPLStoreProvider.d.ts.map +1 -1
- package/lib/components/REPLStoreProvider.js +13 -7
- package/lib/components/REPLStoreProvider.js.map +1 -1
- package/lib/components/dataCube/DataCube.d.ts.map +1 -1
- package/lib/components/dataCube/DataCube.js +31 -13
- package/lib/components/dataCube/DataCube.js.map +1 -1
- package/lib/components/dataCube/editor/DataCubeEditor.d.ts +1 -3
- package/lib/components/dataCube/editor/DataCubeEditor.d.ts.map +1 -1
- package/lib/components/dataCube/editor/DataCubeEditor.js +18 -20
- package/lib/components/dataCube/editor/DataCubeEditor.js.map +1 -1
- package/lib/components/dataCube/editor/DataCubeEditorCodePanel.js +12 -12
- package/lib/components/dataCube/editor/DataCubeEditorCodePanel.js.map +1 -1
- package/lib/components/dataCube/editor/DataCubeEditorColumnPropertiesPanel.d.ts.map +1 -1
- package/lib/components/dataCube/editor/DataCubeEditorColumnPropertiesPanel.js +45 -43
- package/lib/components/dataCube/editor/DataCubeEditorColumnPropertiesPanel.js.map +1 -1
- package/lib/components/dataCube/editor/DataCubeEditorColumnsPanel.js +4 -4
- package/lib/components/dataCube/editor/DataCubeEditorColumnsPanel.js.map +1 -1
- package/lib/components/dataCube/editor/DataCubeEditorExtendedColumnsPanel.js +4 -4
- package/lib/components/dataCube/editor/DataCubeEditorExtendedColumnsPanel.js.map +1 -1
- package/lib/components/dataCube/editor/DataCubeEditorFilterPanel.js +4 -4
- package/lib/components/dataCube/editor/DataCubeEditorFilterPanel.js.map +1 -1
- package/lib/components/dataCube/editor/DataCubeEditorGeneralPropertiesPanel.d.ts.map +1 -1
- package/lib/components/dataCube/editor/DataCubeEditorGeneralPropertiesPanel.js +22 -22
- package/lib/components/dataCube/editor/DataCubeEditorGeneralPropertiesPanel.js.map +1 -1
- package/lib/components/dataCube/editor/DataCubeEditorHorizontalPivotsPanel.js +4 -4
- package/lib/components/dataCube/editor/DataCubeEditorHorizontalPivotsPanel.js.map +1 -1
- package/lib/components/dataCube/editor/DataCubeEditorSortsPanel.js +5 -5
- package/lib/components/dataCube/editor/DataCubeEditorSortsPanel.js.map +1 -1
- package/lib/components/dataCube/editor/DataCubeEditorVerticalPivotsPanel.js +2 -2
- package/lib/components/dataCube/editor/DataCubeEditorVerticalPivotsPanel.js.map +1 -1
- package/lib/components/dataCube/grid/DataCubeGrid.d.ts.map +1 -1
- package/lib/components/dataCube/grid/DataCubeGrid.js +37 -45
- package/lib/components/dataCube/grid/DataCubeGrid.js.map +1 -1
- package/lib/components/dataCube/grid/DataCubeGridShared.js +2 -2
- package/lib/components/dataCube/grid/DataCubeGridShared.js.map +1 -1
- package/lib/components/repl/Alert.d.ts +23 -0
- package/lib/components/repl/Alert.d.ts.map +1 -0
- package/lib/components/repl/Alert.js +73 -0
- package/lib/components/repl/Alert.js.map +1 -0
- package/lib/components/repl/DocumentationPanel.d.ts +24 -0
- package/lib/components/repl/DocumentationPanel.d.ts.map +1 -0
- package/lib/components/repl/DocumentationPanel.js +56 -0
- package/lib/components/repl/DocumentationPanel.js.map +1 -0
- package/lib/components/{dataCube/editor/DataCubeEditorShared.d.ts → repl/Form.d.ts} +11 -11
- package/lib/components/repl/Form.d.ts.map +1 -0
- package/lib/components/{dataCube/editor/DataCubeEditorShared.js → repl/Form.js} +13 -13
- package/lib/components/repl/Form.js.map +1 -0
- package/lib/components/{REPLWindow.d.ts → repl/LayoutManager.d.ts} +11 -17
- package/lib/components/repl/LayoutManager.d.ts.map +1 -0
- package/lib/components/repl/LayoutManager.js +116 -0
- package/lib/components/repl/LayoutManager.js.map +1 -0
- package/lib/components/{dataCube/editor/DataCubeEditorDeveloperPanel.d.ts → repl/SettingsPanel.d.ts} +2 -2
- package/lib/components/repl/SettingsPanel.d.ts.map +1 -0
- package/lib/components/repl/SettingsPanel.js +47 -0
- package/lib/components/repl/SettingsPanel.js.map +1 -0
- package/lib/index.css +1 -1
- package/lib/package.json +19 -22
- package/lib/server/DataCubeQuery.d.ts.map +1 -0
- package/lib/server/{models/DataCubeQuery.js → DataCubeQuery.js} +6 -6
- package/lib/server/DataCubeQuery.js.map +1 -0
- package/lib/server/{models/DataCubeEngineModels.d.ts → REPLEngine.d.ts} +7 -1
- package/lib/server/REPLEngine.d.ts.map +1 -0
- package/lib/server/{models/DataCubeEngineModels.js → REPLEngine.js} +9 -1
- package/lib/server/REPLEngine.js.map +1 -0
- package/lib/server/REPLServerClient.d.ts +2 -2
- package/lib/server/REPLServerClient.d.ts.map +1 -1
- package/lib/server/REPLServerClient.js +2 -2
- package/lib/server/REPLServerClient.js.map +1 -1
- package/lib/stores/LayoutManagerState.d.ts +62 -0
- package/lib/stores/LayoutManagerState.d.ts.map +1 -0
- package/lib/stores/LayoutManagerState.js +121 -0
- package/lib/stores/LayoutManagerState.js.map +1 -0
- package/lib/stores/LegendREPLApplicationPlugin.d.ts +1 -0
- package/lib/stores/LegendREPLApplicationPlugin.d.ts.map +1 -1
- package/lib/stores/LegendREPLApplicationPlugin.js +8 -0
- package/lib/stores/LegendREPLApplicationPlugin.js.map +1 -1
- package/lib/stores/LegendREPLBaseStore.d.ts +2 -2
- package/lib/stores/LegendREPLBaseStore.d.ts.map +1 -1
- package/lib/stores/LegendREPLBaseStore.js +4 -4
- package/lib/stores/LegendREPLBaseStore.js.map +1 -1
- package/lib/stores/REPLStore.d.ts +12 -4
- package/lib/stores/REPLStore.d.ts.map +1 -1
- package/lib/stores/REPLStore.js +77 -25
- package/lib/stores/REPLStore.js.map +1 -1
- package/lib/stores/dataCube/{DataCubeInfrastructure.d.ts → DataCubeEngine.d.ts} +21 -21
- package/lib/stores/dataCube/DataCubeEngine.d.ts.map +1 -0
- package/lib/stores/dataCube/{DataCubeInfrastructure.js → DataCubeEngine.js} +50 -35
- package/lib/stores/dataCube/DataCubeEngine.js.map +1 -0
- package/lib/stores/dataCube/DataCubeState.d.ts +4 -4
- package/lib/stores/dataCube/DataCubeState.d.ts.map +1 -1
- package/lib/stores/dataCube/DataCubeState.js +13 -8
- package/lib/stores/dataCube/DataCubeState.js.map +1 -1
- package/lib/stores/dataCube/core/DataCubeCoreState.d.ts +1 -1
- package/lib/stores/dataCube/core/DataCubeCoreState.d.ts.map +1 -1
- package/lib/stores/dataCube/core/DataCubeQueryEngine.d.ts +2 -2
- package/lib/stores/dataCube/core/DataCubeQueryEngine.d.ts.map +1 -1
- package/lib/stores/dataCube/core/DataCubeQueryEngine.js +2 -2
- package/lib/stores/dataCube/core/DataCubeQueryEngine.js.map +1 -1
- package/lib/stores/dataCube/core/DataCubeQuerySnapshotBuilder.d.ts +1 -1
- package/lib/stores/dataCube/core/DataCubeQuerySnapshotBuilder.d.ts.map +1 -1
- package/lib/stores/dataCube/core/DataCubeQuerySnapshotManager.d.ts +1 -1
- package/lib/stores/dataCube/core/DataCubeQuerySnapshotManager.d.ts.map +1 -1
- package/lib/stores/dataCube/core/DataCubeQuerySnapshotSubscriber.d.ts.map +1 -1
- package/lib/stores/dataCube/core/DataCubeQuerySnapshotSubscriber.js +4 -0
- package/lib/stores/dataCube/core/DataCubeQuerySnapshotSubscriber.js.map +1 -1
- package/lib/stores/dataCube/editor/DataCubeEditorCodePanelState.js +1 -1
- package/lib/stores/dataCube/editor/DataCubeEditorCodePanelState.js.map +1 -1
- package/lib/stores/dataCube/editor/DataCubeEditorState.d.ts +5 -8
- package/lib/stores/dataCube/editor/DataCubeEditorState.d.ts.map +1 -1
- package/lib/stores/dataCube/editor/DataCubeEditorState.js +19 -29
- package/lib/stores/dataCube/editor/DataCubeEditorState.js.map +1 -1
- package/lib/stores/dataCube/grid/DataCubeGridClientEngine.d.ts +1 -1
- package/lib/stores/dataCube/grid/DataCubeGridClientEngine.d.ts.map +1 -1
- package/lib/stores/dataCube/grid/DataCubeGridClientEngine.js +31 -28
- package/lib/stores/dataCube/grid/DataCubeGridClientEngine.js.map +1 -1
- package/lib/stores/dataCube/grid/DataCubeGridClientExportEngine.d.ts.map +1 -1
- package/lib/stores/dataCube/grid/DataCubeGridClientExportEngine.js +7 -2
- package/lib/stores/dataCube/grid/DataCubeGridClientExportEngine.js.map +1 -1
- package/lib/stores/dataCube/grid/DataCubeGridConfigurationBuilder.d.ts.map +1 -1
- package/lib/stores/dataCube/grid/DataCubeGridConfigurationBuilder.js +9 -8
- package/lib/stores/dataCube/grid/DataCubeGridConfigurationBuilder.js.map +1 -1
- package/lib/stores/dataCube/grid/DataCubeGridMenuBuilder.d.ts.map +1 -1
- package/lib/stores/dataCube/grid/DataCubeGridMenuBuilder.js +2 -6
- package/lib/stores/dataCube/grid/DataCubeGridMenuBuilder.js.map +1 -1
- package/lib/stores/dataCube/grid/DataCubeGridQuerySnapshotBuilder.d.ts.map +1 -1
- package/lib/stores/dataCube/grid/DataCubeGridQuerySnapshotBuilder.js +0 -2
- package/lib/stores/dataCube/grid/DataCubeGridQuerySnapshotBuilder.js.map +1 -1
- package/lib/stores/dataCube/grid/DataCubeGridState.d.ts +0 -2
- package/lib/stores/dataCube/grid/DataCubeGridState.d.ts.map +1 -1
- package/lib/stores/dataCube/grid/DataCubeGridState.js +1 -7
- package/lib/stores/dataCube/grid/DataCubeGridState.js.map +1 -1
- package/package.json +25 -28
- package/src/__lib__/LegendREPLEvent.ts +1 -1
- package/src/__lib__/LegendREPLSetting.ts +1 -1
- package/src/application/LegendREPL.tsx +2 -2
- package/{lib/grammar/parser.d.ts → src/application/LegendREPLDocumentation.ts} +6 -1
- package/src/components/Core_LegendREPLApplicationPlugin.tsx +2 -2
- package/src/components/LegendREPLApplication.tsx +2 -0
- package/src/components/LegendREPLFrameworkProvider.tsx +2 -4
- package/src/components/REPLStoreProvider.tsx +24 -18
- package/src/components/dataCube/DataCube.tsx +69 -26
- package/src/components/dataCube/editor/DataCubeEditor.tsx +89 -98
- package/src/components/dataCube/editor/DataCubeEditorCodePanel.tsx +12 -12
- package/src/components/dataCube/editor/DataCubeEditorColumnPropertiesPanel.tsx +112 -115
- package/src/components/dataCube/editor/DataCubeEditorColumnsPanel.tsx +4 -4
- package/src/components/dataCube/editor/DataCubeEditorExtendedColumnsPanel.tsx +4 -4
- package/src/components/dataCube/editor/DataCubeEditorFilterPanel.tsx +4 -4
- package/src/components/dataCube/editor/DataCubeEditorGeneralPropertiesPanel.tsx +76 -88
- package/src/components/dataCube/editor/DataCubeEditorHorizontalPivotsPanel.tsx +4 -4
- package/src/components/dataCube/editor/DataCubeEditorSortsPanel.tsx +5 -5
- package/src/components/dataCube/editor/DataCubeEditorVerticalPivotsPanel.tsx +2 -2
- package/src/components/dataCube/grid/DataCubeGrid.tsx +45 -53
- package/src/components/dataCube/grid/DataCubeGridShared.tsx +2 -2
- package/src/components/repl/Alert.tsx +138 -0
- package/src/components/repl/DocumentationPanel.tsx +88 -0
- package/src/components/{dataCube/editor/DataCubeEditorShared.tsx → repl/Form.tsx} +12 -12
- package/src/components/repl/LayoutManager.tsx +190 -0
- package/src/components/repl/SettingsPanel.tsx +148 -0
- package/src/server/{models/DataCubeQuery.ts → DataCubeQuery.ts} +3 -3
- package/src/server/{models/DataCubeEngineModels.ts → REPLEngine.ts} +13 -0
- package/src/server/REPLServerClient.ts +4 -3
- package/src/stores/LayoutManagerState.ts +168 -0
- package/src/stores/LegendREPLApplicationPlugin.ts +9 -0
- package/src/stores/LegendREPLBaseStore.ts +4 -4
- package/src/stores/REPLStore.tsx +145 -0
- package/src/stores/dataCube/{DataCubeInfrastructure.ts → DataCubeEngine.ts} +66 -46
- package/src/stores/dataCube/DataCubeState.ts +14 -9
- package/src/stores/dataCube/core/DataCubeCoreState.ts +1 -1
- package/src/stores/dataCube/core/DataCubeQueryEngine.ts +2 -3
- package/src/stores/dataCube/core/DataCubeQuerySnapshotBuilder.ts +1 -1
- package/src/stores/dataCube/core/DataCubeQuerySnapshotManager.ts +1 -1
- package/src/stores/dataCube/core/DataCubeQuerySnapshotSubscriber.ts +10 -0
- package/src/stores/dataCube/editor/DataCubeEditorCodePanelState.ts +1 -1
- package/src/stores/dataCube/editor/{DataCubeEditorState.ts → DataCubeEditorState.tsx} +12 -24
- package/src/stores/dataCube/grid/DataCubeGridClientEngine.ts +23 -12
- package/src/stores/dataCube/grid/DataCubeGridClientExportEngine.ts +4 -1
- package/src/stores/dataCube/grid/DataCubeGridConfigurationBuilder.tsx +9 -11
- package/src/stores/dataCube/grid/DataCubeGridMenuBuilder.tsx +2 -6
- package/src/stores/dataCube/grid/DataCubeGridQuerySnapshotBuilder.ts +0 -3
- package/src/stores/dataCube/grid/DataCubeGridState.ts +1 -11
- package/tsconfig.json +12 -8
- package/grammar/datacube_filter__lexer.g4 +0 -40
- package/grammar/datacube_filter__parser.g4 +0 -14
- package/grammar/generateGrammar.js +0 -43
- package/grammar/parser/generated/datacube_filter__lexer.interp +0 -59
- package/grammar/parser/generated/datacube_filter__lexer.tokens +0 -14
- package/grammar/parser/generated/datacube_filter__lexer.ts +0 -142
- package/grammar/parser/generated/datacube_filter__parser.interp +0 -38
- package/grammar/parser/generated/datacube_filter__parser.tokens +0 -14
- package/grammar/parser/generated/datacube_filter__parser.ts +0 -514
- package/grammar/parser/parser.ts +0 -55
- package/lib/components/REPLWindow.d.ts.map +0 -1
- package/lib/components/REPLWindow.js +0 -117
- package/lib/components/REPLWindow.js.map +0 -1
- package/lib/components/dataCube/editor/DataCubeEditorDeveloperPanel.d.ts.map +0 -1
- package/lib/components/dataCube/editor/DataCubeEditorDeveloperPanel.js +0 -28
- package/lib/components/dataCube/editor/DataCubeEditorDeveloperPanel.js.map +0 -1
- package/lib/components/dataCube/editor/DataCubeEditorShared.d.ts.map +0 -1
- package/lib/components/dataCube/editor/DataCubeEditorShared.js.map +0 -1
- package/lib/grammar/generated/datacube_filter__lexer.d.ts +0 -31
- package/lib/grammar/generated/datacube_filter__lexer.js +0 -118
- package/lib/grammar/generated/datacube_filter__parser.d.ts +0 -91
- package/lib/grammar/generated/datacube_filter__parser.js +0 -485
- package/lib/grammar/parser.js +0 -39
- package/lib/server/models/DataCubeEngineModels.d.ts.map +0 -1
- package/lib/server/models/DataCubeEngineModels.js.map +0 -1
- package/lib/server/models/DataCubeQuery.d.ts.map +0 -1
- package/lib/server/models/DataCubeQuery.js.map +0 -1
- package/lib/stores/dataCube/DataCubeInfrastructure.d.ts.map +0 -1
- package/lib/stores/dataCube/DataCubeInfrastructure.js.map +0 -1
- package/src/components/REPLWindow.tsx +0 -179
- package/src/components/dataCube/editor/DataCubeEditorDeveloperPanel.tsx +0 -43
- package/src/stores/REPLStore.ts +0 -48
- /package/lib/server/{models/DataCubeQuery.d.ts → DataCubeQuery.d.ts} +0 -0
|
@@ -15,7 +15,6 @@
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
import { observer } from 'mobx-react-lite';
|
|
18
|
-
import { LicenseManager } from '@ag-grid-enterprise/core';
|
|
19
18
|
import { ClientSideRowModelModule } from '@ag-grid-community/client-side-row-model';
|
|
20
19
|
import { ServerSideRowModelModule } from '@ag-grid-enterprise/server-side-row-model';
|
|
21
20
|
import { RowGroupingModule } from '@ag-grid-enterprise/row-grouping';
|
|
@@ -26,7 +25,6 @@ import { ColumnsToolPanelModule } from '@ag-grid-enterprise/column-tool-panel';
|
|
|
26
25
|
import { AgGridReact } from '@ag-grid-community/react';
|
|
27
26
|
import { CsvExportModule } from '@ag-grid-community/csv-export';
|
|
28
27
|
import { ExcelExportModule } from '@ag-grid-enterprise/excel-export';
|
|
29
|
-
import { useEffect } from 'react';
|
|
30
28
|
import { useREPLStore } from '../../REPLStoreProvider.js';
|
|
31
29
|
import { DataCubeIcon, Switch, cn, Global, css } from '@finos/legend-art';
|
|
32
30
|
import {
|
|
@@ -37,7 +35,7 @@ import {
|
|
|
37
35
|
generateFontUnderlineUtilityClassName,
|
|
38
36
|
generateTextAlignUtilityClassName,
|
|
39
37
|
generateTextColorUtilityClassName,
|
|
40
|
-
|
|
38
|
+
INTERNAL__GridClientUtilityCssClassName,
|
|
41
39
|
} from '../../../stores/dataCube/grid/DataCubeGridClientEngine.js';
|
|
42
40
|
import { RangeSelectionModule } from '@ag-grid-enterprise/range-selection';
|
|
43
41
|
import {
|
|
@@ -62,7 +60,7 @@ import { generateBaseGridOptions } from '../../../stores/dataCube/grid/DataCubeG
|
|
|
62
60
|
const __INTERNAL__original_console_error = console.error; // eslint-disable-line no-console
|
|
63
61
|
// eslint-disable-next-line no-console
|
|
64
62
|
console.error = (message?: unknown, ...agrs: unknown[]): void => {
|
|
65
|
-
console.
|
|
63
|
+
console.debug(`%c ${message}`, 'color: silver'); // eslint-disable-line no-console
|
|
66
64
|
};
|
|
67
65
|
|
|
68
66
|
function textColorStyle(
|
|
@@ -79,7 +77,7 @@ function textColorStyle(
|
|
|
79
77
|
)
|
|
80
78
|
.map(
|
|
81
79
|
(color) =>
|
|
82
|
-
`.${
|
|
80
|
+
`.${INTERNAL__GridClientUtilityCssClassName.ROOT} .${generateTextColorUtilityClassName(color, key)}{color:${color};}`,
|
|
83
81
|
)
|
|
84
82
|
.join('\n')}`;
|
|
85
83
|
}
|
|
@@ -98,21 +96,21 @@ function backgroundColorStyle(
|
|
|
98
96
|
)
|
|
99
97
|
.map(
|
|
100
98
|
(color) =>
|
|
101
|
-
`.${
|
|
99
|
+
`.${INTERNAL__GridClientUtilityCssClassName.ROOT} .${generateBackgroundColorUtilityClassName(color, key)}{background-color:${color};}`,
|
|
102
100
|
)
|
|
103
101
|
.join('\n')};`;
|
|
104
102
|
}
|
|
105
103
|
|
|
106
104
|
export const DataCubeGridStyleController = observer(() => {
|
|
107
|
-
const
|
|
108
|
-
const dataCube =
|
|
105
|
+
const repl = useREPLStore();
|
|
106
|
+
const dataCube = repl.dataCube;
|
|
109
107
|
const grid = dataCube.grid;
|
|
110
108
|
const configuration = grid.queryConfiguration;
|
|
111
109
|
|
|
112
110
|
return (
|
|
113
111
|
<Global
|
|
114
112
|
styles={css`
|
|
115
|
-
.${
|
|
113
|
+
.${INTERNAL__GridClientUtilityCssClassName.ROOT} {
|
|
116
114
|
--ag-odd-row-background-color: ${grid.queryConfiguration
|
|
117
115
|
.alternateRowsStandardMode && !grid.queryConfiguration.alternateRows
|
|
118
116
|
? DEFAULT_ROW_HIGHLIGHT_BACKGROUND_COLOR
|
|
@@ -127,8 +125,8 @@ export const DataCubeGridStyleController = observer(() => {
|
|
|
127
125
|
? grid.queryConfiguration.gridLineColor
|
|
128
126
|
: 'transparent'};
|
|
129
127
|
}
|
|
130
|
-
.${
|
|
131
|
-
.${
|
|
128
|
+
.${INTERNAL__GridClientUtilityCssClassName.ROOT}
|
|
129
|
+
.${INTERNAL__GridClientUtilityCssClassName.HIGHLIGHT_ROW} {
|
|
132
130
|
background-color: ${grid.queryConfiguration.alternateRows
|
|
133
131
|
? grid.queryConfiguration.alternateRowsColor
|
|
134
132
|
: DEFAULT_ROW_BACKGROUND_COLOR};
|
|
@@ -140,7 +138,7 @@ export const DataCubeGridStyleController = observer(() => {
|
|
|
140
138
|
]
|
|
141
139
|
.map(
|
|
142
140
|
(fontFamily) =>
|
|
143
|
-
`.${
|
|
141
|
+
`.${INTERNAL__GridClientUtilityCssClassName.ROOT} .${generateFontFamilyUtilityClassName(fontFamily)}{font-family:${fontFamily},sans-serif;}`,
|
|
144
142
|
)
|
|
145
143
|
.join('\n')}
|
|
146
144
|
${[
|
|
@@ -150,7 +148,7 @@ export const DataCubeGridStyleController = observer(() => {
|
|
|
150
148
|
]
|
|
151
149
|
.map(
|
|
152
150
|
(fontFamily) =>
|
|
153
|
-
`.${
|
|
151
|
+
`.${INTERNAL__GridClientUtilityCssClassName.ROOT} .${generateFontFamilyUtilityClassName(fontFamily)}{font-family:${fontFamily},serif;}`,
|
|
154
152
|
)
|
|
155
153
|
.join('\n')}
|
|
156
154
|
${[
|
|
@@ -160,10 +158,10 @@ export const DataCubeGridStyleController = observer(() => {
|
|
|
160
158
|
]
|
|
161
159
|
.map(
|
|
162
160
|
(fontFamily) =>
|
|
163
|
-
`.${
|
|
161
|
+
`.${INTERNAL__GridClientUtilityCssClassName.ROOT} .${generateFontFamilyUtilityClassName(fontFamily)}{font-family:${fontFamily},monospace;}`,
|
|
164
162
|
)
|
|
165
163
|
.join('\n')}
|
|
166
|
-
.${
|
|
164
|
+
.${INTERNAL__GridClientUtilityCssClassName.FONT_BOLD} {
|
|
167
165
|
font-weight: 700;
|
|
168
166
|
}
|
|
169
167
|
${[
|
|
@@ -172,11 +170,11 @@ export const DataCubeGridStyleController = observer(() => {
|
|
|
172
170
|
]
|
|
173
171
|
.map(
|
|
174
172
|
(fontSize) =>
|
|
175
|
-
`.${
|
|
173
|
+
`.${INTERNAL__GridClientUtilityCssClassName.ROOT} .${generateFontSizeUtilityClassName(fontSize)}{font-size:${fontSize}px;}`,
|
|
176
174
|
)
|
|
177
175
|
.join('\n')}
|
|
178
|
-
.${
|
|
179
|
-
.${
|
|
176
|
+
.${INTERNAL__GridClientUtilityCssClassName.ROOT}
|
|
177
|
+
.${INTERNAL__GridClientUtilityCssClassName.FONT_ITALIC} {
|
|
180
178
|
font-style: italic;
|
|
181
179
|
}
|
|
182
180
|
${[
|
|
@@ -188,10 +186,10 @@ export const DataCubeGridStyleController = observer(() => {
|
|
|
188
186
|
]
|
|
189
187
|
.map(
|
|
190
188
|
(variant) =>
|
|
191
|
-
`.${
|
|
189
|
+
`.${INTERNAL__GridClientUtilityCssClassName.ROOT} .${generateFontUnderlineUtilityClassName(variant)}{text-decoration:underline ${variant};}`,
|
|
192
190
|
)
|
|
193
191
|
.join('\n')}
|
|
194
|
-
.${
|
|
192
|
+
.${INTERNAL__GridClientUtilityCssClassName.ROOT} .${INTERNAL__GridClientUtilityCssClassName.FONT_STRIKETHROUGH} {
|
|
195
193
|
text-decoration: line-through;
|
|
196
194
|
}
|
|
197
195
|
${[
|
|
@@ -201,7 +199,7 @@ export const DataCubeGridStyleController = observer(() => {
|
|
|
201
199
|
]
|
|
202
200
|
.map(
|
|
203
201
|
(fontCase) =>
|
|
204
|
-
`.${
|
|
202
|
+
`.${INTERNAL__GridClientUtilityCssClassName.ROOT} .${generateFontCaseUtilityClassName(fontCase)}{text-transform:${fontCase};}`,
|
|
205
203
|
)
|
|
206
204
|
.join('\n')}
|
|
207
205
|
${[
|
|
@@ -211,7 +209,7 @@ export const DataCubeGridStyleController = observer(() => {
|
|
|
211
209
|
]
|
|
212
210
|
.map(
|
|
213
211
|
(alignment) =>
|
|
214
|
-
`.${
|
|
212
|
+
`.${INTERNAL__GridClientUtilityCssClassName.ROOT} .${generateTextAlignUtilityClassName(alignment)}{text-align:${alignment};}`,
|
|
215
213
|
)
|
|
216
214
|
.join('\n')};
|
|
217
215
|
${backgroundColorStyle('normal', configuration)}
|
|
@@ -222,12 +220,12 @@ export const DataCubeGridStyleController = observer(() => {
|
|
|
222
220
|
${textColorStyle('zero', configuration)}
|
|
223
221
|
${textColorStyle('negative', configuration)}
|
|
224
222
|
${textColorStyle('error', configuration)}
|
|
225
|
-
.${
|
|
226
|
-
.${
|
|
223
|
+
.${INTERNAL__GridClientUtilityCssClassName.ROOT}
|
|
224
|
+
.${INTERNAL__GridClientUtilityCssClassName.BLUR} {
|
|
227
225
|
filter: blur(3px);
|
|
228
226
|
}
|
|
229
|
-
.${
|
|
230
|
-
.${
|
|
227
|
+
.${INTERNAL__GridClientUtilityCssClassName.ROOT}
|
|
228
|
+
.${INTERNAL__GridClientUtilityCssClassName.BLUR}:hover {
|
|
231
229
|
filter: none;
|
|
232
230
|
}
|
|
233
231
|
`}
|
|
@@ -236,22 +234,28 @@ export const DataCubeGridStyleController = observer(() => {
|
|
|
236
234
|
});
|
|
237
235
|
|
|
238
236
|
const DataCubeGridScroller = observer(() => {
|
|
239
|
-
const
|
|
240
|
-
const dataCube =
|
|
237
|
+
const repl = useREPLStore();
|
|
238
|
+
const dataCube = repl.dataCube;
|
|
241
239
|
const grid = dataCube.grid;
|
|
242
240
|
const scrollHintText = grid.scrollHintText;
|
|
243
241
|
const gridClientSideBarElement = document.querySelector(
|
|
244
242
|
'.data-cube-grid .ag-side-bar',
|
|
245
243
|
);
|
|
244
|
+
const gridVerticalScrollbar = document.querySelector(
|
|
245
|
+
'.data-cube-grid .ag-body-vertical-scroll',
|
|
246
|
+
);
|
|
246
247
|
|
|
247
248
|
return (
|
|
248
249
|
<div
|
|
249
250
|
className="absolute -top-9 flex items-center rounded-sm border border-neutral-300 bg-neutral-100 p-1 pr-2 text-neutral-500 shadow-sm"
|
|
250
251
|
style={{
|
|
251
252
|
right:
|
|
252
|
-
gridClientSideBarElement !== null
|
|
253
|
+
(gridClientSideBarElement !== null
|
|
253
254
|
? gridClientSideBarElement.getBoundingClientRect().width + 12
|
|
254
|
-
: 16
|
|
255
|
+
: 16) +
|
|
256
|
+
(gridVerticalScrollbar !== null
|
|
257
|
+
? gridVerticalScrollbar.getBoundingClientRect().width
|
|
258
|
+
: 0),
|
|
255
259
|
}}
|
|
256
260
|
>
|
|
257
261
|
<DataCubeIcon.TableScroll className="text-lg" />
|
|
@@ -261,8 +265,8 @@ const DataCubeGridScroller = observer(() => {
|
|
|
261
265
|
});
|
|
262
266
|
|
|
263
267
|
const DataCubeGridStatusBar = observer(() => {
|
|
264
|
-
const
|
|
265
|
-
const dataCube =
|
|
268
|
+
const repl = useREPLStore();
|
|
269
|
+
const dataCube = repl.dataCube;
|
|
266
270
|
const grid = dataCube.grid;
|
|
267
271
|
|
|
268
272
|
return (
|
|
@@ -332,8 +336,8 @@ const DataCubeGridStatusBar = observer(() => {
|
|
|
332
336
|
});
|
|
333
337
|
|
|
334
338
|
const DataCubeGridClient = observer(() => {
|
|
335
|
-
const
|
|
336
|
-
const dataCube =
|
|
339
|
+
const repl = useREPLStore();
|
|
340
|
+
const dataCube = repl.dataCube;
|
|
337
341
|
const grid = dataCube.grid;
|
|
338
342
|
|
|
339
343
|
return (
|
|
@@ -370,22 +374,10 @@ const DataCubeGridClient = observer(() => {
|
|
|
370
374
|
);
|
|
371
375
|
});
|
|
372
376
|
|
|
373
|
-
export const DataCubeGrid = observer(() =>
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
LicenseManager.setLicenseKey(grid.clientLicenseKey);
|
|
381
|
-
}
|
|
382
|
-
}, [grid.clientLicenseKey]);
|
|
383
|
-
|
|
384
|
-
return (
|
|
385
|
-
<div className="flex-1">
|
|
386
|
-
<DataCubeGridStyleController />
|
|
387
|
-
<DataCubeGridClient />
|
|
388
|
-
<DataCubeGridStatusBar />
|
|
389
|
-
</div>
|
|
390
|
-
);
|
|
391
|
-
});
|
|
377
|
+
export const DataCubeGrid = observer(() => (
|
|
378
|
+
<div className="h-full w-full">
|
|
379
|
+
<DataCubeGridStyleController />
|
|
380
|
+
<DataCubeGridClient />
|
|
381
|
+
<DataCubeGridStatusBar />
|
|
382
|
+
</div>
|
|
383
|
+
));
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
useGridMenuItem,
|
|
19
19
|
type CustomMenuItemProps,
|
|
20
20
|
} from '@ag-grid-community/react';
|
|
21
|
-
import {
|
|
21
|
+
import { FormBadge_WIP } from '../../repl/Form.js';
|
|
22
22
|
|
|
23
23
|
export function WIP_GridMenuItem({
|
|
24
24
|
name,
|
|
@@ -34,7 +34,7 @@ export function WIP_GridMenuItem({
|
|
|
34
34
|
<span className="ag-menu-option-part ag-menu-option-icon"></span>
|
|
35
35
|
<span className="ag-menu-option-part ag-menu-option-text !inline-flex items-center">
|
|
36
36
|
<span className="opacity-50">{name}</span>
|
|
37
|
-
<
|
|
37
|
+
<FormBadge_WIP />
|
|
38
38
|
</span>
|
|
39
39
|
<span className="ag-menu-option-part ag-menu-option-shortcut"></span>
|
|
40
40
|
<span className="ag-menu-option-part ag-menu-option-popup-pointer select-none">
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2020-present, Goldman Sachs
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import {
|
|
18
|
+
ActionAlertType,
|
|
19
|
+
useApplicationStore,
|
|
20
|
+
type ActionAlertInfo,
|
|
21
|
+
} from '@finos/legend-application';
|
|
22
|
+
import { DataCubeIcon, Dialog } from '@finos/legend-art';
|
|
23
|
+
import { noop } from '@finos/legend-shared';
|
|
24
|
+
import { observer } from 'mobx-react-lite';
|
|
25
|
+
|
|
26
|
+
export function ErrorAlert(props: {
|
|
27
|
+
message: string;
|
|
28
|
+
text?: string | undefined;
|
|
29
|
+
}) {
|
|
30
|
+
const { message, text } = props;
|
|
31
|
+
return (
|
|
32
|
+
<div className="h-full w-full overflow-auto p-4">
|
|
33
|
+
<div className="relative pl-2.5">
|
|
34
|
+
<DataCubeIcon.Error className="absolute -top-[1px] left-0 flex-shrink-0 stroke-[0.5px] text-2xl text-red-500" />
|
|
35
|
+
<pre className="ml-4 font-sans">{message}</pre>
|
|
36
|
+
</div>
|
|
37
|
+
<pre className="mt-1.5 font-sans text-neutral-500">{text}</pre>
|
|
38
|
+
</div>
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const ActionAlertContent = observer((props: { info: ActionAlertInfo }) => {
|
|
43
|
+
const { info } = props;
|
|
44
|
+
const { title, message, prompt, type, onClose, onEnter, actions } = info;
|
|
45
|
+
const application = useApplicationStore();
|
|
46
|
+
const handleClose = (): void => {
|
|
47
|
+
onClose?.();
|
|
48
|
+
application.alertService.setActionAlertInfo(undefined);
|
|
49
|
+
};
|
|
50
|
+
const handleEnter = (): void => onEnter?.();
|
|
51
|
+
const handleSubmit = (): void => {
|
|
52
|
+
actions.find((action) => action.default)?.handler?.();
|
|
53
|
+
handleClose();
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
return (
|
|
57
|
+
<Dialog
|
|
58
|
+
open={Boolean(application.alertService.actionAlertInfo)}
|
|
59
|
+
onClose={noop} // disallow closing dialog by using Esc key or clicking on the backdrop
|
|
60
|
+
TransitionProps={{
|
|
61
|
+
onEnter: handleEnter,
|
|
62
|
+
}}
|
|
63
|
+
PaperProps={{
|
|
64
|
+
elevation: 0,
|
|
65
|
+
}}
|
|
66
|
+
slotProps={{
|
|
67
|
+
backdrop: {
|
|
68
|
+
classes: {
|
|
69
|
+
root: 'bg-black !opacity-25',
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
}}
|
|
73
|
+
classes={{
|
|
74
|
+
root: 'h-full w-full flex items-center justify-center',
|
|
75
|
+
paper: 'min-h-10 min-w-40 rounded-none shadow-md',
|
|
76
|
+
}}
|
|
77
|
+
>
|
|
78
|
+
<div className="h-full w-full border border-neutral-400 bg-neutral-200 shadow-xl">
|
|
79
|
+
<div className="flex h-6 w-full select-none items-center justify-between border-b border-b-neutral-300 bg-white">
|
|
80
|
+
<div className="px-2">{title ?? ''}</div>
|
|
81
|
+
</div>
|
|
82
|
+
<form
|
|
83
|
+
className="w-full overflow-auto p-4"
|
|
84
|
+
onSubmit={(event) => {
|
|
85
|
+
event.preventDefault();
|
|
86
|
+
handleSubmit();
|
|
87
|
+
}}
|
|
88
|
+
>
|
|
89
|
+
<div className="relative pl-2.5">
|
|
90
|
+
{type === ActionAlertType.STANDARD && (
|
|
91
|
+
<DataCubeIcon.Info className="absolute -top-[1px] left-0 flex-shrink-0 stroke-[0.5px] text-2xl text-sky-500" />
|
|
92
|
+
)}
|
|
93
|
+
{type === ActionAlertType.CAUTION && (
|
|
94
|
+
<DataCubeIcon.Warning className="absolute -top-[1px] left-0 flex-shrink-0 stroke-2 text-2xl text-amber-500" />
|
|
95
|
+
)}
|
|
96
|
+
{type === ActionAlertType.ERROR && (
|
|
97
|
+
<DataCubeIcon.Error className="absolute -top-[1px] left-0 flex-shrink-0 stroke-[0.5px] text-2xl text-red-500" />
|
|
98
|
+
)}
|
|
99
|
+
<pre className="ml-4 font-sans">{message}</pre>
|
|
100
|
+
</div>
|
|
101
|
+
<pre className="mt-1.5 font-sans text-neutral-500">{prompt}</pre>
|
|
102
|
+
{actions.map((action, idx) => {
|
|
103
|
+
// NOTE: need to prevent default for the submit button, otherwise, we would get the warning "Form submission canceled because the form is not connected"
|
|
104
|
+
// See https://stackoverflow.com/a/58234405
|
|
105
|
+
const handler: React.ReactEventHandler<HTMLButtonElement> = (
|
|
106
|
+
e,
|
|
107
|
+
): void => {
|
|
108
|
+
e.preventDefault();
|
|
109
|
+
action.handler?.();
|
|
110
|
+
handleClose();
|
|
111
|
+
};
|
|
112
|
+
return (
|
|
113
|
+
<button
|
|
114
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
115
|
+
key={idx}
|
|
116
|
+
type={action.default ? 'submit' : 'button'}
|
|
117
|
+
onClick={handler}
|
|
118
|
+
autoFocus={Boolean(action.default)}
|
|
119
|
+
>
|
|
120
|
+
{action.label}
|
|
121
|
+
</button>
|
|
122
|
+
);
|
|
123
|
+
})}
|
|
124
|
+
</form>
|
|
125
|
+
</div>
|
|
126
|
+
</Dialog>
|
|
127
|
+
);
|
|
128
|
+
});
|
|
129
|
+
|
|
130
|
+
export const ActionAlert = observer(() => {
|
|
131
|
+
const application = useApplicationStore();
|
|
132
|
+
const info = application.alertService.actionAlertInfo;
|
|
133
|
+
|
|
134
|
+
if (!info) {
|
|
135
|
+
return null;
|
|
136
|
+
}
|
|
137
|
+
return <ActionAlertContent info={info} />;
|
|
138
|
+
});
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2020-present, Goldman Sachs
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import {
|
|
18
|
+
shouldDisplayVirtualAssistantDocumentationEntry,
|
|
19
|
+
useApplicationStore,
|
|
20
|
+
} from '@finos/legend-application';
|
|
21
|
+
import { cn, DataCubeIcon, MarkdownTextViewer } from '@finos/legend-art';
|
|
22
|
+
import { isString } from '@finos/legend-shared';
|
|
23
|
+
import { observer } from 'mobx-react-lite';
|
|
24
|
+
import { useREPLStore } from '../REPLStoreProvider.js';
|
|
25
|
+
|
|
26
|
+
export const DocumentationPanelLink: React.FC<{
|
|
27
|
+
documentationKey: string;
|
|
28
|
+
title?: string | undefined;
|
|
29
|
+
className?: string | undefined;
|
|
30
|
+
}> = ({ documentationKey, title, className }) => {
|
|
31
|
+
const application = useApplicationStore();
|
|
32
|
+
const repl = useREPLStore();
|
|
33
|
+
const documentationEntry =
|
|
34
|
+
application.documentationService.getDocEntry(documentationKey);
|
|
35
|
+
const openDocLink: React.MouseEventHandler<HTMLDivElement> = (
|
|
36
|
+
event,
|
|
37
|
+
): void => {
|
|
38
|
+
event.preventDefault();
|
|
39
|
+
event.stopPropagation();
|
|
40
|
+
const entry =
|
|
41
|
+
application.documentationService.getDocEntry(documentationKey);
|
|
42
|
+
if (entry) {
|
|
43
|
+
if (shouldDisplayVirtualAssistantDocumentationEntry(entry)) {
|
|
44
|
+
application.assistantService.openDocumentationEntry(documentationKey);
|
|
45
|
+
repl.documentationDisplay.open();
|
|
46
|
+
} else if (entry.url) {
|
|
47
|
+
application.navigationService.navigator.visitAddress(entry.url);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
if (
|
|
53
|
+
!documentationEntry ||
|
|
54
|
+
(!documentationEntry.url &&
|
|
55
|
+
!shouldDisplayVirtualAssistantDocumentationEntry(documentationEntry))
|
|
56
|
+
) {
|
|
57
|
+
return null;
|
|
58
|
+
}
|
|
59
|
+
return (
|
|
60
|
+
<div
|
|
61
|
+
onClick={openDocLink}
|
|
62
|
+
title={title ?? 'Click to see documentation'}
|
|
63
|
+
className={cn('cursor-pointer text-xl text-sky-500', className)}
|
|
64
|
+
>
|
|
65
|
+
<DataCubeIcon.DocumentationHint />
|
|
66
|
+
</div>
|
|
67
|
+
);
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
export const DocumentationPanel = observer(() => {
|
|
71
|
+
const application = useApplicationStore();
|
|
72
|
+
const entry = application.assistantService.currentDocumentationEntry;
|
|
73
|
+
|
|
74
|
+
if (!entry) {
|
|
75
|
+
return null;
|
|
76
|
+
}
|
|
77
|
+
return (
|
|
78
|
+
<div className="h-full w-full overflow-auto bg-white p-4">
|
|
79
|
+
<div className="mb-3 text-2xl font-bold">{entry.title}</div>
|
|
80
|
+
{entry.content &&
|
|
81
|
+
(isString(entry.content) ? (
|
|
82
|
+
<div className="">{entry.content}</div>
|
|
83
|
+
) : (
|
|
84
|
+
<MarkdownTextViewer value={entry.content} />
|
|
85
|
+
))}
|
|
86
|
+
</div>
|
|
87
|
+
);
|
|
88
|
+
});
|
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
import { toNumber } from '@finos/legend-shared';
|
|
35
35
|
import React, { forwardRef, useEffect, useState } from 'react';
|
|
36
36
|
|
|
37
|
-
export function
|
|
37
|
+
export function FormBadge_WIP() {
|
|
38
38
|
return (
|
|
39
39
|
<div
|
|
40
40
|
className="text-2xs ml-1 select-none rounded-md bg-sky-500 px-1 py-0.5 font-semibold text-white"
|
|
@@ -45,7 +45,7 @@ export function WIP_Badge() {
|
|
|
45
45
|
);
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
export function
|
|
48
|
+
export function FormBadge_Advanced() {
|
|
49
49
|
return (
|
|
50
50
|
<div
|
|
51
51
|
className="text-2xs ml-1 select-none rounded-md bg-amber-500 px-1 py-0.5 font-semibold text-white"
|
|
@@ -56,7 +56,7 @@ export function Advanced_Badge() {
|
|
|
56
56
|
);
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
export const
|
|
59
|
+
export const FormNumberInput = forwardRef(
|
|
60
60
|
function DataCubeEditorBaseNumberInput(
|
|
61
61
|
props: React.InputHTMLAttributes<HTMLInputElement> & {
|
|
62
62
|
min?: number | undefined;
|
|
@@ -146,7 +146,7 @@ export const DataCubeEditorNumberInput = forwardRef(
|
|
|
146
146
|
},
|
|
147
147
|
);
|
|
148
148
|
|
|
149
|
-
export function
|
|
149
|
+
export function FormTextInput(
|
|
150
150
|
props: React.InputHTMLAttributes<HTMLInputElement>,
|
|
151
151
|
) {
|
|
152
152
|
const { className, ...otherProps } = props;
|
|
@@ -161,7 +161,7 @@ export function DataCubeEditorTextInput(
|
|
|
161
161
|
);
|
|
162
162
|
}
|
|
163
163
|
|
|
164
|
-
export function
|
|
164
|
+
export function FormCheckbox(
|
|
165
165
|
props: CheckboxProps & {
|
|
166
166
|
label?: React.ReactNode;
|
|
167
167
|
onChange: () => void;
|
|
@@ -202,7 +202,7 @@ export function DataCubeEditorCheckbox(
|
|
|
202
202
|
);
|
|
203
203
|
}
|
|
204
204
|
|
|
205
|
-
export function
|
|
205
|
+
export function FormDropdownMenuTrigger(
|
|
206
206
|
props: React.ButtonHTMLAttributes<HTMLButtonElement>,
|
|
207
207
|
) {
|
|
208
208
|
const { children, className, ...otherProps } = props;
|
|
@@ -224,7 +224,7 @@ export function DataCubeEditorDropdownMenuTrigger(
|
|
|
224
224
|
);
|
|
225
225
|
}
|
|
226
226
|
|
|
227
|
-
export function
|
|
227
|
+
export function FormDropdownMenu(props: DropdownMenuProps) {
|
|
228
228
|
const { className, ...otherProps } = props;
|
|
229
229
|
return (
|
|
230
230
|
<DropdownMenu
|
|
@@ -242,7 +242,7 @@ export function DataCubeEditorDropdownMenu(props: DropdownMenuProps) {
|
|
|
242
242
|
);
|
|
243
243
|
}
|
|
244
244
|
|
|
245
|
-
export function
|
|
245
|
+
export function FormDropdownMenuItem(props: DropdownMenuItemProps) {
|
|
246
246
|
const { className, ...otherProps } = props;
|
|
247
247
|
return (
|
|
248
248
|
<DropdownMenuItem
|
|
@@ -255,11 +255,11 @@ export function DataCubeEditorDropdownMenuItem(props: DropdownMenuItemProps) {
|
|
|
255
255
|
);
|
|
256
256
|
}
|
|
257
257
|
|
|
258
|
-
export function
|
|
258
|
+
export function FormDropdownMenuItemSeparator() {
|
|
259
259
|
return <div className="my-0.5 h-[1px] w-full bg-neutral-200" />;
|
|
260
260
|
}
|
|
261
261
|
|
|
262
|
-
function
|
|
262
|
+
function FormColorPicker(props: {
|
|
263
263
|
color: string;
|
|
264
264
|
onChange: (value: string) => void;
|
|
265
265
|
onClose: () => void;
|
|
@@ -430,7 +430,7 @@ function DataCubeEditorColorPicker(props: {
|
|
|
430
430
|
);
|
|
431
431
|
}
|
|
432
432
|
|
|
433
|
-
export function
|
|
433
|
+
export function FormColorPickerButton(props: {
|
|
434
434
|
color: string;
|
|
435
435
|
onChange: (value: string) => void;
|
|
436
436
|
className?: string | undefined;
|
|
@@ -471,7 +471,7 @@ export function DataCubeEditorColorPickerButton(props: {
|
|
|
471
471
|
transformOrigin={{ vertical: 'center', horizontal: 'left' }}
|
|
472
472
|
onClose={() => setAnchorEl(null)}
|
|
473
473
|
>
|
|
474
|
-
<
|
|
474
|
+
<FormColorPicker
|
|
475
475
|
color={color}
|
|
476
476
|
onChange={onChange}
|
|
477
477
|
onClose={() => setAnchorEl(null)}
|