@finos/legend-application-repl 0.0.31 → 0.0.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (170) hide show
  1. package/lib/components/LegendREPLFrameworkProvider.js +1 -1
  2. package/lib/components/LegendREPLFrameworkProvider.js.map +1 -1
  3. package/lib/components/REPLStoreProvider.d.ts +1 -1
  4. package/lib/components/REPLStoreProvider.d.ts.map +1 -1
  5. package/lib/components/REPLStoreProvider.js +1 -1
  6. package/lib/components/REPLStoreProvider.js.map +1 -1
  7. package/lib/components/REPLWindow.d.ts +33 -0
  8. package/lib/components/REPLWindow.d.ts.map +1 -0
  9. package/lib/components/REPLWindow.js +117 -0
  10. package/lib/components/REPLWindow.js.map +1 -0
  11. package/lib/components/dataCube/DataCube.js +1 -1
  12. package/lib/components/dataCube/DataCube.js.map +1 -1
  13. package/lib/components/dataCube/editor/DataCubeEditor.d.ts.map +1 -1
  14. package/lib/components/dataCube/editor/DataCubeEditor.js +12 -91
  15. package/lib/components/dataCube/editor/DataCubeEditor.js.map +1 -1
  16. package/lib/components/dataCube/editor/DataCubeEditorCodePanel.d.ts.map +1 -1
  17. package/lib/components/dataCube/editor/DataCubeEditorCodePanel.js +3 -2
  18. package/lib/components/dataCube/editor/DataCubeEditorCodePanel.js.map +1 -1
  19. package/lib/components/dataCube/editor/DataCubeEditorColumnPropertiesPanel.d.ts.map +1 -1
  20. package/lib/components/dataCube/editor/DataCubeEditorColumnPropertiesPanel.js +161 -87
  21. package/lib/components/dataCube/editor/DataCubeEditorColumnPropertiesPanel.js.map +1 -1
  22. package/lib/components/dataCube/editor/DataCubeEditorColumnsPanel.js +1 -1
  23. package/lib/components/dataCube/editor/DataCubeEditorColumnsPanel.js.map +1 -1
  24. package/lib/components/dataCube/editor/DataCubeEditorColumnsSelector.d.ts.map +1 -1
  25. package/lib/components/dataCube/editor/DataCubeEditorColumnsSelector.js +0 -1
  26. package/lib/components/dataCube/editor/DataCubeEditorColumnsSelector.js.map +1 -1
  27. package/lib/components/dataCube/editor/DataCubeEditorDeveloperPanel.d.ts.map +1 -1
  28. package/lib/components/dataCube/editor/DataCubeEditorDeveloperPanel.js +3 -2
  29. package/lib/components/dataCube/editor/DataCubeEditorDeveloperPanel.js.map +1 -1
  30. package/lib/components/dataCube/editor/DataCubeEditorExtendedColumnsPanel.d.ts.map +1 -1
  31. package/lib/components/dataCube/editor/DataCubeEditorExtendedColumnsPanel.js +3 -2
  32. package/lib/components/dataCube/editor/DataCubeEditorExtendedColumnsPanel.js.map +1 -1
  33. package/lib/components/dataCube/editor/DataCubeEditorFilterPanel.d.ts.map +1 -1
  34. package/lib/components/dataCube/editor/DataCubeEditorFilterPanel.js +3 -2
  35. package/lib/components/dataCube/editor/DataCubeEditorFilterPanel.js.map +1 -1
  36. package/lib/components/dataCube/editor/DataCubeEditorGeneralPropertiesPanel.d.ts.map +1 -1
  37. package/lib/components/dataCube/editor/DataCubeEditorGeneralPropertiesPanel.js +96 -55
  38. package/lib/components/dataCube/editor/DataCubeEditorGeneralPropertiesPanel.js.map +1 -1
  39. package/lib/components/dataCube/editor/DataCubeEditorHPivotsPanel.d.ts.map +1 -1
  40. package/lib/components/dataCube/editor/DataCubeEditorHPivotsPanel.js +3 -2
  41. package/lib/components/dataCube/editor/DataCubeEditorHPivotsPanel.js.map +1 -1
  42. package/lib/components/dataCube/editor/DataCubeEditorShared.d.ts +1 -0
  43. package/lib/components/dataCube/editor/DataCubeEditorShared.d.ts.map +1 -1
  44. package/lib/components/dataCube/editor/DataCubeEditorShared.js +44 -27
  45. package/lib/components/dataCube/editor/DataCubeEditorShared.js.map +1 -1
  46. package/lib/components/dataCube/editor/DataCubeEditorSortsPanel.js +1 -1
  47. package/lib/components/dataCube/editor/DataCubeEditorSortsPanel.js.map +1 -1
  48. package/lib/components/dataCube/editor/DataCubeEditorVPivotsPanel.d.ts.map +1 -1
  49. package/lib/components/dataCube/editor/DataCubeEditorVPivotsPanel.js +3 -2
  50. package/lib/components/dataCube/editor/DataCubeEditorVPivotsPanel.js.map +1 -1
  51. package/lib/components/dataCube/grid/DataCubeGrid.d.ts +3 -0
  52. package/lib/components/dataCube/grid/DataCubeGrid.d.ts.map +1 -1
  53. package/lib/components/dataCube/grid/DataCubeGrid.js +186 -75
  54. package/lib/components/dataCube/grid/DataCubeGrid.js.map +1 -1
  55. package/lib/components/dataCube/grid/DataCubeGridShared.d.ts +1 -1
  56. package/lib/components/dataCube/grid/DataCubeGridShared.d.ts.map +1 -1
  57. package/lib/components/dataCube/grid/DataCubeGridShared.js +1 -1
  58. package/lib/components/dataCube/grid/DataCubeGridShared.js.map +1 -1
  59. package/lib/components/dataCube/grid/menu/DataCubeGridMenu.d.ts.map +1 -1
  60. package/lib/components/dataCube/grid/menu/DataCubeGridMenu.js +60 -29
  61. package/lib/components/dataCube/grid/menu/DataCubeGridMenu.js.map +1 -1
  62. package/lib/components/dataCube/grid/menu/DataCubeGridSortsMenu.d.ts.map +1 -1
  63. package/lib/components/dataCube/grid/menu/DataCubeGridSortsMenu.js +10 -10
  64. package/lib/components/dataCube/grid/menu/DataCubeGridSortsMenu.js.map +1 -1
  65. package/lib/index.css +2 -2
  66. package/lib/index.css.map +1 -1
  67. package/lib/package.json +14 -14
  68. package/lib/stores/{dataCube/REPLStore.d.ts → REPLStore.d.ts} +5 -3
  69. package/lib/stores/REPLStore.d.ts.map +1 -0
  70. package/lib/stores/{dataCube/REPLStore.js → REPLStore.js} +5 -2
  71. package/lib/stores/REPLStore.js.map +1 -0
  72. package/lib/stores/dataCube/{core/DataCubeEngine.d.ts → DataCubeInfrastructure.d.ts} +20 -4
  73. package/lib/stores/dataCube/DataCubeInfrastructure.d.ts.map +1 -0
  74. package/lib/stores/dataCube/{core/DataCubeEngine.js → DataCubeInfrastructure.js} +31 -3
  75. package/lib/stores/dataCube/DataCubeInfrastructure.js.map +1 -0
  76. package/lib/stores/dataCube/DataCubeState.d.ts +4 -4
  77. package/lib/stores/dataCube/DataCubeState.d.ts.map +1 -1
  78. package/lib/stores/dataCube/DataCubeState.js +7 -8
  79. package/lib/stores/dataCube/DataCubeState.js.map +1 -1
  80. package/lib/stores/dataCube/core/DataCubeConfiguration.d.ts +42 -38
  81. package/lib/stores/dataCube/core/DataCubeConfiguration.d.ts.map +1 -1
  82. package/lib/stores/dataCube/core/DataCubeConfiguration.js +84 -78
  83. package/lib/stores/dataCube/core/DataCubeConfiguration.js.map +1 -1
  84. package/lib/stores/dataCube/core/DataCubeConfigurationBuilder.d.ts.map +1 -1
  85. package/lib/stores/dataCube/core/DataCubeConfigurationBuilder.js +2 -1
  86. package/lib/stores/dataCube/core/DataCubeConfigurationBuilder.js.map +1 -1
  87. package/lib/stores/dataCube/core/DataCubeCoreState.d.ts +1 -1
  88. package/lib/stores/dataCube/core/DataCubeCoreState.d.ts.map +1 -1
  89. package/lib/stores/dataCube/core/DataCubeCoreState.js +1 -1
  90. package/lib/stores/dataCube/core/DataCubeCoreState.js.map +1 -1
  91. package/lib/stores/dataCube/core/DataCubeQueryBuilder.js +6 -6
  92. package/lib/stores/dataCube/core/DataCubeQueryBuilder.js.map +1 -1
  93. package/lib/stores/dataCube/core/DataCubeQueryEngine.d.ts +46 -29
  94. package/lib/stores/dataCube/core/DataCubeQueryEngine.d.ts.map +1 -1
  95. package/lib/stores/dataCube/core/DataCubeQueryEngine.js +68 -50
  96. package/lib/stores/dataCube/core/DataCubeQueryEngine.js.map +1 -1
  97. package/lib/stores/dataCube/core/DataCubeQuerySnapshotBuilder.d.ts.map +1 -1
  98. package/lib/stores/dataCube/core/DataCubeQuerySnapshotBuilder.js +5 -5
  99. package/lib/stores/dataCube/core/DataCubeQuerySnapshotBuilder.js.map +1 -1
  100. package/lib/stores/dataCube/core/DataCubeQuerySnapshotSubscriber.d.ts +1 -3
  101. package/lib/stores/dataCube/core/DataCubeQuerySnapshotSubscriber.d.ts.map +1 -1
  102. package/lib/stores/dataCube/core/DataCubeQuerySnapshotSubscriber.js +2 -3
  103. package/lib/stores/dataCube/core/DataCubeQuerySnapshotSubscriber.js.map +1 -1
  104. package/lib/stores/dataCube/editor/DataCubeEditorColumnPropertiesPanelState.d.ts +3 -0
  105. package/lib/stores/dataCube/editor/DataCubeEditorColumnPropertiesPanelState.d.ts.map +1 -1
  106. package/lib/stores/dataCube/editor/DataCubeEditorColumnPropertiesPanelState.js +9 -0
  107. package/lib/stores/dataCube/editor/DataCubeEditorColumnPropertiesPanelState.js.map +1 -1
  108. package/lib/stores/dataCube/editor/DataCubeEditorState.d.ts +8 -7
  109. package/lib/stores/dataCube/editor/DataCubeEditorState.d.ts.map +1 -1
  110. package/lib/stores/dataCube/editor/DataCubeEditorState.js +21 -17
  111. package/lib/stores/dataCube/editor/DataCubeEditorState.js.map +1 -1
  112. package/lib/stores/dataCube/editor/DataCubeMutableConfiguration.d.ts +43 -38
  113. package/lib/stores/dataCube/editor/DataCubeMutableConfiguration.d.ts.map +1 -1
  114. package/lib/stores/dataCube/editor/DataCubeMutableConfiguration.js +209 -128
  115. package/lib/stores/dataCube/editor/DataCubeMutableConfiguration.js.map +1 -1
  116. package/lib/stores/dataCube/grid/DataCubeGridClientEngine.d.ts +32 -0
  117. package/lib/stores/dataCube/grid/DataCubeGridClientEngine.d.ts.map +1 -1
  118. package/lib/stores/dataCube/grid/DataCubeGridClientEngine.js +34 -1
  119. package/lib/stores/dataCube/grid/DataCubeGridClientEngine.js.map +1 -1
  120. package/lib/stores/dataCube/grid/DataCubeGridQuerySnapshotAnalyzer.d.ts +4 -1
  121. package/lib/stores/dataCube/grid/DataCubeGridQuerySnapshotAnalyzer.d.ts.map +1 -1
  122. package/lib/stores/dataCube/grid/DataCubeGridQuerySnapshotAnalyzer.js +327 -36
  123. package/lib/stores/dataCube/grid/DataCubeGridQuerySnapshotAnalyzer.js.map +1 -1
  124. package/lib/stores/dataCube/grid/DataCubeGridState.d.ts +16 -2
  125. package/lib/stores/dataCube/grid/DataCubeGridState.d.ts.map +1 -1
  126. package/lib/stores/dataCube/grid/DataCubeGridState.js +51 -21
  127. package/lib/stores/dataCube/grid/DataCubeGridState.js.map +1 -1
  128. package/package.json +20 -20
  129. package/src/components/LegendREPLFrameworkProvider.tsx +1 -1
  130. package/src/components/REPLStoreProvider.tsx +1 -1
  131. package/src/components/REPLWindow.tsx +179 -0
  132. package/src/components/dataCube/DataCube.tsx +1 -1
  133. package/src/components/dataCube/editor/DataCubeEditor.tsx +79 -190
  134. package/src/components/dataCube/editor/DataCubeEditorCodePanel.tsx +3 -1
  135. package/src/components/dataCube/editor/DataCubeEditorColumnPropertiesPanel.tsx +480 -279
  136. package/src/components/dataCube/editor/DataCubeEditorColumnsPanel.tsx +1 -1
  137. package/src/components/dataCube/editor/DataCubeEditorColumnsSelector.tsx +0 -1
  138. package/src/components/dataCube/editor/DataCubeEditorDeveloperPanel.tsx +3 -1
  139. package/src/components/dataCube/editor/DataCubeEditorExtendedColumnsPanel.tsx +3 -1
  140. package/src/components/dataCube/editor/DataCubeEditorFilterPanel.tsx +3 -1
  141. package/src/components/dataCube/editor/DataCubeEditorGeneralPropertiesPanel.tsx +235 -174
  142. package/src/components/dataCube/editor/DataCubeEditorHPivotsPanel.tsx +3 -1
  143. package/src/components/dataCube/editor/DataCubeEditorShared.tsx +69 -33
  144. package/src/components/dataCube/editor/DataCubeEditorSortsPanel.tsx +1 -1
  145. package/src/components/dataCube/editor/DataCubeEditorVPivotsPanel.tsx +3 -1
  146. package/src/components/dataCube/grid/DataCubeGrid.tsx +310 -149
  147. package/src/components/dataCube/grid/DataCubeGridShared.tsx +5 -1
  148. package/src/components/dataCube/grid/menu/DataCubeGridMenu.tsx +76 -29
  149. package/src/components/dataCube/grid/menu/DataCubeGridSortsMenu.tsx +10 -11
  150. package/src/stores/{dataCube/REPLStore.ts → REPLStore.ts} +6 -3
  151. package/src/stores/dataCube/{core/DataCubeEngine.ts → DataCubeInfrastructure.ts} +40 -3
  152. package/src/stores/dataCube/DataCubeState.ts +9 -9
  153. package/src/stores/dataCube/core/DataCubeConfiguration.ts +106 -86
  154. package/src/stores/dataCube/core/DataCubeConfigurationBuilder.ts +5 -1
  155. package/src/stores/dataCube/core/DataCubeCoreState.ts +4 -1
  156. package/src/stores/dataCube/core/DataCubeQueryBuilder.ts +11 -11
  157. package/src/stores/dataCube/core/DataCubeQueryEngine.ts +70 -49
  158. package/src/stores/dataCube/core/DataCubeQuerySnapshotBuilder.ts +6 -7
  159. package/src/stores/dataCube/core/DataCubeQuerySnapshotSubscriber.ts +6 -5
  160. package/src/stores/dataCube/editor/DataCubeEditorColumnPropertiesPanelState.ts +14 -0
  161. package/src/stores/dataCube/editor/DataCubeEditorState.ts +26 -19
  162. package/src/stores/dataCube/editor/DataCubeMutableConfiguration.ts +247 -139
  163. package/src/stores/dataCube/grid/DataCubeGridClientEngine.ts +55 -1
  164. package/src/stores/dataCube/grid/DataCubeGridQuerySnapshotAnalyzer.tsx +491 -43
  165. package/src/stores/dataCube/grid/DataCubeGridState.ts +73 -20
  166. package/tsconfig.json +3 -2
  167. package/lib/stores/dataCube/REPLStore.d.ts.map +0 -1
  168. package/lib/stores/dataCube/REPLStore.js.map +0 -1
  169. package/lib/stores/dataCube/core/DataCubeEngine.d.ts.map +0 -1
  170. package/lib/stores/dataCube/core/DataCubeEngine.js.map +0 -1
@@ -21,13 +21,26 @@ import {
21
21
  type DataCubeAggregateFunction,
22
22
  type DataCubeNumberScale,
23
23
  type DataCubeSelectionStat,
24
- type DataCubeFontFormatUnderlinedVariant,
24
+ type DataCubeFontFormatUnderlineVariant,
25
+ type DataCubeFontCase,
25
26
  type DataCubeFontTextAlignment,
26
27
  type DataCubeColumnDataType,
27
28
  type DataCubeColumnPinPlacement,
29
+ DEFAULT_FONT_FAMILY,
30
+ DEFAULT_FONT_SIZE,
31
+ DEFAULT_FONT_BOLD,
32
+ DEFAULT_FONT_ITALIC,
33
+ DEFAULT_FONT_UNDERLINED,
34
+ DEFAULT_FONT_STRIKETHROUGH,
35
+ DEFAULT_TEXT_ALIGN,
36
+ DEFAULT_FOREGROUND_COLOR,
37
+ DEFAULT_NEGATIVE_FOREGROUND_COLOR,
38
+ DEFAULT_ZERO_FOREGROUND_COLOR,
39
+ DEFAULT_ERROR_FOREGROUND_COLOR,
40
+ DEFAULT_BACKGROUND_COLOR,
28
41
  } from '../core/DataCubeQueryEngine.js';
29
42
  import { type PlainObject, type Writable } from '@finos/legend-shared';
30
- import { makeObservable, observable, action } from 'mobx';
43
+ import { makeObservable, observable, action, computed } from 'mobx';
31
44
  import {
32
45
  DataCubeColumnConfiguration,
33
46
  DataCubeConfiguration,
@@ -35,7 +48,6 @@ import {
35
48
 
36
49
  export class DataCubeMutableColumnConfiguration extends DataCubeColumnConfiguration {
37
50
  aggregateFunction?: DataCubeAggregateFunction | undefined;
38
- weightColumn?: string | undefined;
39
51
  excludedFromHPivot = true;
40
52
 
41
53
  readonly dataType!: DataCubeColumnDataType;
@@ -84,38 +96,41 @@ export class DataCubeMutableColumnConfiguration extends DataCubeColumnConfigurat
84
96
  fontItalic: observable,
85
97
  setFontItalic: action,
86
98
 
87
- fontUnderlined: observable,
88
- setFontUnderlined: action,
99
+ fontUnderline: observable,
100
+ setFontUnderline: action,
89
101
 
90
102
  fontStrikethrough: observable,
91
103
  setFontStrikethrough: action,
92
104
 
105
+ fontCase: observable,
106
+ setFontCase: action,
107
+
93
108
  textAlign: observable,
94
109
  setTextAlign: action,
95
110
 
96
- foregroundColor: observable,
97
- setForegroundColor: action,
111
+ normalForegroundColor: observable,
112
+ setNormalForegroundColor: action,
98
113
 
99
- foregroundNegativeColor: observable,
100
- setForegroundNegativeColor: action,
114
+ negativeForegroundColor: observable,
115
+ setNegativeForegroundColor: action,
101
116
 
102
- foregroundZeroColor: observable,
103
- setForegroundZeroColor: action,
117
+ zeroForegroundColor: observable,
118
+ setZeroForegroundColor: action,
104
119
 
105
- foregroundErrorColor: observable,
106
- setForegroundErrorColor: action,
120
+ errorForegroundColor: observable,
121
+ setErrorForegroundColor: action,
107
122
 
108
- backgroundColor: observable,
109
- setBackgroundColor: action,
123
+ normalBackgroundColor: observable,
124
+ setNormalBackgroundColor: action,
110
125
 
111
- backgroundNegativeColor: observable,
112
- setBackgroundNegativeColor: action,
126
+ negativeBackgroundColor: observable,
127
+ setNegativeBackgroundColor: action,
113
128
 
114
- backgroundZeroColor: observable,
115
- setBackgroundZeroColor: action,
129
+ zeroBackgroundColor: observable,
130
+ setZeroBackgroundColor: action,
116
131
 
117
- backgroundErrorColor: observable,
118
- setBackgroundErrorColor: action,
132
+ errorBackgroundColor: observable,
133
+ setErrorBackgroundColor: action,
119
134
 
120
135
  blur: observable,
121
136
  setBlur: action,
@@ -126,9 +141,6 @@ export class DataCubeMutableColumnConfiguration extends DataCubeColumnConfigurat
126
141
  aggregateFunction: observable,
127
142
  setAggregateFunction: action,
128
143
 
129
- weightColumn: observable,
130
- setWeightColumn: action,
131
-
132
144
  excludedFromHPivot: observable,
133
145
  setExcludedFromHPivot: action,
134
146
 
@@ -146,6 +158,12 @@ export class DataCubeMutableColumnConfiguration extends DataCubeColumnConfigurat
146
158
 
147
159
  displayAsLink: observable,
148
160
  setDisplayAsLink: action,
161
+
162
+ linkLabelParameter: observable,
163
+ setLinkLabelParameter: action,
164
+
165
+ isUsingDefaultStyling: computed,
166
+ useDefaultStyling: action,
149
167
  });
150
168
 
151
169
  return configuration;
@@ -155,6 +173,44 @@ export class DataCubeMutableColumnConfiguration extends DataCubeColumnConfigurat
155
173
  return DataCubeColumnConfiguration.serialization.toJson(this);
156
174
  }
157
175
 
176
+ get isUsingDefaultStyling(): boolean {
177
+ return (
178
+ this.fontFamily === undefined &&
179
+ this.fontSize === undefined &&
180
+ this.fontBold === undefined &&
181
+ this.fontItalic === undefined &&
182
+ this.fontUnderline === undefined &&
183
+ this.fontStrikethrough === undefined &&
184
+ this.textAlign === undefined &&
185
+ this.normalForegroundColor === undefined &&
186
+ this.negativeForegroundColor === undefined &&
187
+ this.zeroForegroundColor === undefined &&
188
+ this.errorForegroundColor === undefined &&
189
+ this.normalBackgroundColor === undefined &&
190
+ this.negativeBackgroundColor === undefined &&
191
+ this.zeroBackgroundColor === undefined &&
192
+ this.errorBackgroundColor === undefined
193
+ );
194
+ }
195
+
196
+ useDefaultStyling(): void {
197
+ this.fontFamily = undefined;
198
+ this.fontSize = undefined;
199
+ this.fontBold = undefined;
200
+ this.fontItalic = undefined;
201
+ this.fontUnderline = undefined;
202
+ this.fontStrikethrough = undefined;
203
+ this.textAlign = undefined;
204
+ this.normalForegroundColor = undefined;
205
+ this.negativeForegroundColor = undefined;
206
+ this.zeroForegroundColor = undefined;
207
+ this.errorForegroundColor = undefined;
208
+ this.normalBackgroundColor = undefined;
209
+ this.negativeBackgroundColor = undefined;
210
+ this.zeroBackgroundColor = undefined;
211
+ this.errorBackgroundColor = undefined;
212
+ }
213
+
158
214
  setKind(value: DataCubeColumnKind): void {
159
215
  this.kind = value;
160
216
  }
@@ -183,66 +239,70 @@ export class DataCubeMutableColumnConfiguration extends DataCubeColumnConfigurat
183
239
  this.hPivotSortFunction = value;
184
240
  }
185
241
 
186
- setFontFamily(value: DataCubeFont): void {
242
+ setFontFamily(value: DataCubeFont | undefined): void {
187
243
  this.fontFamily = value;
188
244
  }
189
245
 
190
- setFontSize(value: number): void {
246
+ setFontSize(value: number | undefined): void {
191
247
  this.fontSize = value;
192
248
  }
193
249
 
194
- setFontBold(value: boolean): void {
250
+ setFontBold(value: boolean | undefined): void {
195
251
  this.fontBold = value;
196
252
  }
197
253
 
198
- setFontItalic(value: boolean): void {
254
+ setFontItalic(value: boolean | undefined): void {
199
255
  this.fontItalic = value;
200
256
  }
201
257
 
202
- setFontUnderlined(
203
- value: DataCubeFontFormatUnderlinedVariant | undefined,
258
+ setFontUnderline(
259
+ value: DataCubeFontFormatUnderlineVariant | undefined,
204
260
  ): void {
205
- this.fontUnderlined = value;
261
+ this.fontUnderline = value;
206
262
  }
207
263
 
208
- setTextAlign(value: DataCubeFontTextAlignment): void {
209
- this.textAlign = value;
264
+ setFontStrikethrough(value: boolean | undefined): void {
265
+ this.fontStrikethrough = value;
210
266
  }
211
267
 
212
- setFontStrikethrough(value: boolean): void {
213
- this.fontStrikethrough = value;
268
+ setFontCase(value: DataCubeFontCase | undefined): void {
269
+ this.fontCase = value;
214
270
  }
215
271
 
216
- setForegroundColor(value: string): void {
217
- this.foregroundColor = value;
272
+ setTextAlign(value: DataCubeFontTextAlignment | undefined): void {
273
+ this.textAlign = value;
218
274
  }
219
275
 
220
- setForegroundNegativeColor(value: string): void {
221
- this.foregroundNegativeColor = value;
276
+ setNormalForegroundColor(value: string | undefined): void {
277
+ this.normalForegroundColor = value;
222
278
  }
223
279
 
224
- setForegroundZeroColor(value: string): void {
225
- this.foregroundZeroColor = value;
280
+ setNegativeForegroundColor(value: string | undefined): void {
281
+ this.negativeForegroundColor = value;
226
282
  }
227
283
 
228
- setForegroundErrorColor(value: string): void {
229
- this.foregroundErrorColor = value;
284
+ setZeroForegroundColor(value: string | undefined): void {
285
+ this.zeroForegroundColor = value;
230
286
  }
231
287
 
232
- setBackgroundColor(value: string): void {
233
- this.backgroundColor = value;
288
+ setErrorForegroundColor(value: string | undefined): void {
289
+ this.errorForegroundColor = value;
234
290
  }
235
291
 
236
- setBackgroundNegativeColor(value: string): void {
237
- this.backgroundNegativeColor = value;
292
+ setNormalBackgroundColor(value: string | undefined): void {
293
+ this.normalBackgroundColor = value;
238
294
  }
239
295
 
240
- setBackgroundZeroColor(value: string): void {
241
- this.backgroundZeroColor = value;
296
+ setNegativeBackgroundColor(value: string | undefined): void {
297
+ this.negativeBackgroundColor = value;
242
298
  }
243
299
 
244
- setBackgroundErrorColor(value: string): void {
245
- this.backgroundErrorColor = value;
300
+ setZeroBackgroundColor(value: string | undefined): void {
301
+ this.zeroBackgroundColor = value;
302
+ }
303
+
304
+ setErrorBackgroundColor(value: string | undefined): void {
305
+ this.errorBackgroundColor = value;
246
306
  }
247
307
 
248
308
  setBlur(value: boolean): void {
@@ -273,12 +333,12 @@ export class DataCubeMutableColumnConfiguration extends DataCubeColumnConfigurat
273
333
  this.displayAsLink = value;
274
334
  }
275
335
 
276
- setAggregateFunction(value: DataCubeAggregateFunction | undefined): void {
277
- this.aggregateFunction = value;
336
+ setLinkLabelParameter(value: string | undefined): void {
337
+ this.linkLabelParameter = value;
278
338
  }
279
339
 
280
- setWeightColumn(value: string | undefined): void {
281
- this.weightColumn = value;
340
+ setAggregateFunction(value: DataCubeAggregateFunction | undefined): void {
341
+ this.aggregateFunction = value;
282
342
  }
283
343
 
284
344
  setExcludedFromHPivot(value: boolean): void {
@@ -300,59 +360,65 @@ export class DataCubeMutableConfiguration extends DataCubeConfiguration {
300
360
  description: observable,
301
361
  setDescription: action,
302
362
 
303
- showTreeLine: observable,
304
- setShowTreeLine: action,
363
+ showTreeLines: observable,
364
+ setShowTreeLines: action,
305
365
 
306
- showHorizontalGridLine: observable,
307
- setShowHorizontalGridLine: action,
366
+ showHorizontalGridLines: observable,
367
+ setShowHorizontalGridLines: action,
308
368
 
309
- showVerticalGridLine: observable,
310
- setShowVerticalGridLine: action,
369
+ showVerticalGridLines: observable,
370
+ setShowVerticalGridLines: action,
311
371
 
312
- defaultFontFamily: observable,
313
- setDefaultFontFamily: action,
372
+ gridLineColor: observable,
373
+ setGridLineColor: action,
314
374
 
315
- defaultFontSize: observable,
316
- setDefaultFontSize: action,
375
+ fontFamily: observable,
376
+ setFontFamily: action,
377
+
378
+ fontSize: observable,
379
+ setFontSize: action,
317
380
 
318
- defaultFontBold: observable,
319
- setDefaultFontBold: action,
381
+ fontBold: observable,
382
+ setFontBold: action,
383
+
384
+ fontItalic: observable,
385
+ setFontItalic: action,
320
386
 
321
- defaultFontItalic: observable,
322
- setDefaultFontItalic: action,
387
+ fontUnderline: observable,
388
+ setFontUnderline: action,
323
389
 
324
- defaultFontUnderlined: observable,
325
- setDefaultFontUnderlined: action,
390
+ fontStrikethrough: observable,
391
+ setFontStrikethrough: action,
326
392
 
327
- defaultFontStrikethrough: observable,
328
- setDefaultFontStrikethrough: action,
393
+ fontCase: observable,
394
+ setFontCase: action,
329
395
 
330
- defaultTextAlign: observable,
331
- setDefaultTextAlign: action,
396
+ textAlign: observable,
397
+ setTextAlign: action,
332
398
 
333
- defaultForegroundColor: observable,
334
- setDefaultForegroundColor: action,
399
+ normalForegroundColor: observable,
400
+ setNormalForegroundColor: action,
335
401
 
336
- defaultForegroundNegativeColor: observable,
337
- setDefaultForegroundNegativeColor: action,
402
+ negativeForegroundColor: observable,
403
+ setNegativeForegroundColor: action,
338
404
 
339
- defaultForegroundZeroColor: observable,
340
- setDefaultForegroundZeroColor: action,
405
+ zeroForegroundColor: observable,
406
+ setZeroForegroundColor: action,
341
407
 
342
- defaultForegroundErrorColor: observable,
343
- setDefaultForegroundErrorColor: action,
408
+ errorForegroundColor: observable,
409
+ setErrorForegroundColor: action,
344
410
 
345
- defaultBackgroundColor: observable,
346
- setDefaultBackgroundColor: action,
411
+ normalBackgroundColor: observable,
412
+ setNormalBackgroundColor: action,
347
413
 
348
- defaultBackgroundNegativeColor: observable,
349
- setDefaultBackgroundNegativeColor: action,
414
+ negativeBackgroundColor: observable,
415
+ setNegativeBackgroundColor: action,
350
416
 
351
- defaultBackgroundZeroColor: observable,
352
- setDefaultBackgroundZeroColor: action,
417
+ zeroBackgroundColor: observable,
418
+ setZeroBackgroundColor: action,
353
419
 
354
- defaultBackgroundErrorColor: observable,
355
- setDefaultBackgroundErrorColor: action,
420
+ errorBackgroundColor: observable,
421
+ setErrorBackgroundColor: action,
356
422
 
357
423
  alternateRows: observable,
358
424
  setAlternateRows: action,
@@ -363,15 +429,12 @@ export class DataCubeMutableConfiguration extends DataCubeConfiguration {
363
429
  alternateRowsCount: observable,
364
430
  setAlternateRowsCount: action,
365
431
 
366
- numberScale: observable,
367
- setNumberScale: action,
432
+ alternateRowsStandardMode: observable,
433
+ setAlternateRowsStandardMode: action,
368
434
 
369
435
  selectionStats: observable,
370
436
  setSelectionStats: action,
371
437
 
372
- rowBuffer: observable,
373
- setRowBuffer: action,
374
-
375
438
  showWarningForTruncatedResult: observable,
376
439
  setShowWarningForTruncatedResult: action,
377
440
 
@@ -392,11 +455,52 @@ export class DataCubeMutableConfiguration extends DataCubeConfiguration {
392
455
 
393
456
  treeGroupSortFunction: observable,
394
457
  setTreeGroupSortFunction: action,
458
+
459
+ isUsingDefaultStyling: computed,
460
+ useDefaultStyling: action,
395
461
  });
396
462
 
397
463
  return configuration;
398
464
  }
399
465
 
466
+ get isUsingDefaultStyling(): boolean {
467
+ return (
468
+ this.fontFamily === DEFAULT_FONT_FAMILY &&
469
+ this.fontSize === DEFAULT_FONT_SIZE &&
470
+ this.fontBold === DEFAULT_FONT_BOLD &&
471
+ this.fontItalic === DEFAULT_FONT_ITALIC &&
472
+ this.fontUnderline === DEFAULT_FONT_UNDERLINED &&
473
+ this.fontStrikethrough === DEFAULT_FONT_STRIKETHROUGH &&
474
+ this.textAlign === DEFAULT_TEXT_ALIGN &&
475
+ this.normalForegroundColor === DEFAULT_FOREGROUND_COLOR &&
476
+ this.negativeForegroundColor === DEFAULT_NEGATIVE_FOREGROUND_COLOR &&
477
+ this.zeroForegroundColor === DEFAULT_ZERO_FOREGROUND_COLOR &&
478
+ this.errorForegroundColor === DEFAULT_ERROR_FOREGROUND_COLOR &&
479
+ this.normalBackgroundColor === DEFAULT_BACKGROUND_COLOR &&
480
+ this.negativeBackgroundColor === DEFAULT_BACKGROUND_COLOR &&
481
+ this.zeroBackgroundColor === DEFAULT_BACKGROUND_COLOR &&
482
+ this.errorBackgroundColor === DEFAULT_BACKGROUND_COLOR
483
+ );
484
+ }
485
+
486
+ useDefaultStyling(): void {
487
+ this.fontFamily = DEFAULT_FONT_FAMILY;
488
+ this.fontSize = DEFAULT_FONT_SIZE;
489
+ this.fontBold = DEFAULT_FONT_BOLD;
490
+ this.fontItalic = DEFAULT_FONT_ITALIC;
491
+ this.fontUnderline = DEFAULT_FONT_UNDERLINED;
492
+ this.fontStrikethrough = DEFAULT_FONT_STRIKETHROUGH;
493
+ this.textAlign = DEFAULT_TEXT_ALIGN;
494
+ this.normalForegroundColor = DEFAULT_FOREGROUND_COLOR;
495
+ this.negativeForegroundColor = DEFAULT_NEGATIVE_FOREGROUND_COLOR;
496
+ this.zeroForegroundColor = DEFAULT_ZERO_FOREGROUND_COLOR;
497
+ this.errorForegroundColor = DEFAULT_ERROR_FOREGROUND_COLOR;
498
+ this.normalBackgroundColor = DEFAULT_BACKGROUND_COLOR;
499
+ this.negativeBackgroundColor = DEFAULT_BACKGROUND_COLOR;
500
+ this.zeroBackgroundColor = DEFAULT_BACKGROUND_COLOR;
501
+ this.errorBackgroundColor = DEFAULT_BACKGROUND_COLOR;
502
+ }
503
+
400
504
  serialize(): PlainObject<DataCubeConfiguration> {
401
505
  return DataCubeConfiguration.serialization.toJson(this);
402
506
  }
@@ -405,78 +509,86 @@ export class DataCubeMutableConfiguration extends DataCubeConfiguration {
405
509
  this.description = value;
406
510
  }
407
511
 
408
- setShowTreeLine(value: boolean): void {
409
- this.showTreeLine = value;
512
+ setShowTreeLines(value: boolean): void {
513
+ this.showTreeLines = value;
514
+ }
515
+
516
+ setShowHorizontalGridLines(value: boolean): void {
517
+ this.showHorizontalGridLines = value;
410
518
  }
411
519
 
412
- setShowHorizontalGridLine(value: boolean): void {
413
- this.showHorizontalGridLine = value;
520
+ setShowVerticalGridLines(value: boolean): void {
521
+ this.showVerticalGridLines = value;
414
522
  }
415
523
 
416
- setShowVerticalGridLine(value: boolean): void {
417
- this.showVerticalGridLine = value;
524
+ setGridLineColor(value: string): void {
525
+ this.gridLineColor = value;
418
526
  }
419
527
 
420
- setDefaultFontFamily(value: DataCubeFont): void {
421
- this.defaultFontFamily = value;
528
+ setFontFamily(value: DataCubeFont): void {
529
+ this.fontFamily = value;
422
530
  }
423
531
 
424
- setDefaultFontSize(value: number): void {
425
- this.defaultFontSize = value;
532
+ setFontSize(value: number): void {
533
+ this.fontSize = value;
426
534
  }
427
535
 
428
- setDefaultFontBold(value: boolean): void {
429
- this.defaultFontBold = value;
536
+ setFontBold(value: boolean): void {
537
+ this.fontBold = value;
430
538
  }
431
539
 
432
- setDefaultFontItalic(value: boolean): void {
433
- this.defaultFontItalic = value;
540
+ setFontItalic(value: boolean): void {
541
+ this.fontItalic = value;
434
542
  }
435
543
 
436
- setDefaultFontUnderlined(
437
- value: DataCubeFontFormatUnderlinedVariant | undefined,
544
+ setFontUnderline(
545
+ value: DataCubeFontFormatUnderlineVariant | undefined,
438
546
  ): void {
439
- this.defaultFontUnderlined = value;
547
+ this.fontUnderline = value;
440
548
  }
441
549
 
442
- setDefaultFontStrikethrough(value: boolean): void {
443
- this.defaultFontStrikethrough = value;
550
+ setFontStrikethrough(value: boolean): void {
551
+ this.fontStrikethrough = value;
444
552
  }
445
553
 
446
- setDefaultTextAlign(value: DataCubeFontTextAlignment): void {
447
- this.defaultTextAlign = value;
554
+ setFontCase(value: DataCubeFontCase | undefined): void {
555
+ this.fontCase = value;
448
556
  }
449
557
 
450
- setDefaultForegroundColor(value: string): void {
451
- this.defaultForegroundColor = value;
558
+ setTextAlign(value: DataCubeFontTextAlignment): void {
559
+ this.textAlign = value;
560
+ }
561
+
562
+ setNormalForegroundColor(value: string): void {
563
+ this.normalForegroundColor = value;
452
564
  }
453
565
 
454
- setDefaultForegroundNegativeColor(value: string): void {
455
- this.defaultForegroundNegativeColor = value;
566
+ setNegativeForegroundColor(value: string): void {
567
+ this.negativeForegroundColor = value;
456
568
  }
457
569
 
458
- setDefaultForegroundZeroColor(value: string): void {
459
- this.defaultForegroundZeroColor = value;
570
+ setZeroForegroundColor(value: string): void {
571
+ this.zeroForegroundColor = value;
460
572
  }
461
573
 
462
- setDefaultForegroundErrorColor(value: string): void {
463
- this.defaultForegroundErrorColor = value;
574
+ setErrorForegroundColor(value: string): void {
575
+ this.errorForegroundColor = value;
464
576
  }
465
577
 
466
- setDefaultBackgroundColor(value: string): void {
467
- this.defaultBackgroundColor = value;
578
+ setNormalBackgroundColor(value: string): void {
579
+ this.normalBackgroundColor = value;
468
580
  }
469
581
 
470
- setDefaultBackgroundNegativeColor(value: string): void {
471
- this.defaultBackgroundNegativeColor = value;
582
+ setNegativeBackgroundColor(value: string): void {
583
+ this.negativeBackgroundColor = value;
472
584
  }
473
585
 
474
- setDefaultBackgroundZeroColor(value: string): void {
475
- this.defaultBackgroundZeroColor = value;
586
+ setZeroBackgroundColor(value: string): void {
587
+ this.zeroBackgroundColor = value;
476
588
  }
477
589
 
478
- setDefaultBackgroundErrorColor(value: string): void {
479
- this.defaultBackgroundErrorColor = value;
590
+ setErrorBackgroundColor(value: string): void {
591
+ this.errorBackgroundColor = value;
480
592
  }
481
593
 
482
594
  setAlternateRows(value: boolean): void {
@@ -491,18 +603,14 @@ export class DataCubeMutableConfiguration extends DataCubeConfiguration {
491
603
  this.alternateRowsCount = value;
492
604
  }
493
605
 
494
- setNumberScale(value: DataCubeNumberScale | undefined): void {
495
- this.numberScale = value;
606
+ setAlternateRowsStandardMode(value: boolean): void {
607
+ this.alternateRowsStandardMode = value;
496
608
  }
497
609
 
498
610
  setSelectionStats(value: DataCubeSelectionStat[]): void {
499
611
  this.selectionStats = value;
500
612
  }
501
613
 
502
- setRowBuffer(value: number): void {
503
- this.rowBuffer = value;
504
- }
505
-
506
614
  setShowWarningForTruncatedResult(value: boolean): void {
507
615
  this.showWarningForTruncatedResult = value;
508
616
  }
@@ -33,18 +33,71 @@ import { APPLICATION_EVENT } from '@finos/legend-application';
33
33
  import { buildQuerySnapshot } from './DataCubeGridQuerySnapshotBuilder.js';
34
34
  import { generateRowGroupingDrilldownExecutableQueryPostProcessor } from './DataCubeGridQueryBuilder.js';
35
35
  import { makeObservable, observable, runInAction } from 'mobx';
36
+ import type { DataCubeConfigurationColorKey } from '../core/DataCubeConfiguration.js';
36
37
 
37
38
  type GridClientCellValue = string | number | boolean | null | undefined;
38
39
  type GridClientRowData = {
39
40
  [key: string]: GridClientCellValue;
40
41
  };
41
42
 
43
+ export enum INTERNAL__GRID_CLIENT_UTILITY_CSS_CLASS_NAME {
44
+ ROOT = 'data-cube-grid.ag-theme-balham',
45
+ HIGHLIGHT_ROW = 'data-cube-grid__utility--highlight-row',
46
+ SHOW_VERTICAL_GRID_LINES = 'data-cube-grid__utility--show-vertical-grid-lines',
47
+ SHOW_HORIZONTAL_GRID_LINES = 'data-cube-grid__utility--show-horizontal-grid-lines',
48
+
49
+ BLUR = 'data-cube-grid__utility--blur',
50
+
51
+ FONT_FAMILY_PREFIX = 'data-cube-grid__utility--font-family-',
52
+ FONT_SIZE_PREFIX = 'data-cube-grid__utility--font-size-',
53
+ FONT_BOLD = 'data-cube-grid__utility--font-style-bold',
54
+ FONT_ITALIC = 'data-cube-grid__utility--font-style-italic',
55
+ FONT_UNDERLINE_PREFIX = 'data-cube-grid__utility--font-style-underline-',
56
+ FONT_STRIKETHROUGH = 'data-cube-grid__utility--font-style-strikethrough',
57
+ FONT_CASE_PREFIX = 'data-cube-grid__utility--font-style-case-',
58
+ TEXT_ALIGN_PREFIX = 'data-cube-grid__utility--text-align-',
59
+ TEXT_COLOR_PREFIX = 'data-cube-grid__utility--text-color-',
60
+ BACKGROUND_COLOR_PREFIX = 'data-cube-grid__utility--background-color-',
61
+ }
62
+ export const generateFontFamilyUtilityClassName = (fontFamily: string) =>
63
+ `${INTERNAL__GRID_CLIENT_UTILITY_CSS_CLASS_NAME.FONT_FAMILY_PREFIX}${fontFamily.replaceAll(' ', '-')}`;
64
+ export const generateFontSizeUtilityClassName = (fontSize: number) =>
65
+ `${INTERNAL__GRID_CLIENT_UTILITY_CSS_CLASS_NAME.FONT_SIZE_PREFIX}${fontSize}`;
66
+ export const generateFontUnderlineUtilityClassName = (
67
+ variant: string | undefined,
68
+ ) =>
69
+ `${INTERNAL__GRID_CLIENT_UTILITY_CSS_CLASS_NAME.FONT_UNDERLINE_PREFIX}${variant ?? 'none'}`;
70
+ export const generateFontCaseUtilityClassName = (
71
+ fontCase: string | undefined,
72
+ ) =>
73
+ `${INTERNAL__GRID_CLIENT_UTILITY_CSS_CLASS_NAME.FONT_CASE_PREFIX}${fontCase ?? 'none'}`;
74
+ export const generateTextAlignUtilityClassName = (alignment: string) =>
75
+ `${INTERNAL__GRID_CLIENT_UTILITY_CSS_CLASS_NAME.TEXT_ALIGN_PREFIX}${alignment}`;
76
+ export const generateTextColorUtilityClassName = (
77
+ color: string,
78
+ key: DataCubeConfigurationColorKey,
79
+ ) =>
80
+ `${INTERNAL__GRID_CLIENT_UTILITY_CSS_CLASS_NAME.TEXT_COLOR_PREFIX}${key}-${color.substring(1)}`;
81
+ export const generateBackgroundColorUtilityClassName = (
82
+ color: string,
83
+ key: DataCubeConfigurationColorKey,
84
+ ) =>
85
+ `${INTERNAL__GRID_CLIENT_UTILITY_CSS_CLASS_NAME.BACKGROUND_COLOR_PREFIX}${key}-${color.substring(1)}`;
86
+
87
+ export const INTERNAL__GRID_CLIENT_COLUMN_MIN_WIDTH = 50;
42
88
  export const INTERNAL__GRID_CLIENT_HEADER_HEIGHT = 24;
43
89
  export const INTERNAL__GRID_CLIENT_ROW_HEIGHT = 20;
90
+ export const INTERNAL__GRID_CLIENT_TOOLTIP_SHOW_DELAY = 1000;
91
+ export const INTERNAL__GRID_CLIENT_AUTO_RESIZE_PADDING = 10;
44
92
  export const INTERNAL__GRID_CLIENT_TREE_COLUMN_ID = 'INTERNAL__tree';
45
93
  export const INTERNAL__GRID_CLIENT_ROW_GROUPING_COUNT_AGG_COLUMN_ID =
46
94
  'INTERNAL__count';
47
95
 
96
+ export enum GridClientPinnedAlignement {
97
+ LEFT = 'left',
98
+ RIGHT = 'right',
99
+ }
100
+
48
101
  export enum GridClientSortDirection {
49
102
  ASCENDING = 'asc',
50
103
  DESCENDING = 'desc',
@@ -162,7 +215,8 @@ export class DataCubeGridClientServerSideDataSource
162
215
  });
163
216
  const lambda = new V1_Lambda();
164
217
  lambda.body.push(executableQuery);
165
- const result = await this.grid.dataCube.engine.executeQuery(lambda);
218
+ const result =
219
+ await this.grid.dataCube.infrastructure.engine.executeQuery(lambda);
166
220
  const rowData = TDStoRowData(result.result);
167
221
  if (this.grid.isPaginationEnabled) {
168
222
  params.success({ rowData });