@adaptabletools/adaptable 23.0.4 → 23.0.5-canary.0

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 (441) hide show
  1. package/agGrid.js +0 -31
  2. package/index.js +0 -31
  3. package/package.json +1 -1
  4. package/src/AdaptableInterfaces/IAdaptable.d.ts +0 -2
  5. package/src/AdaptableOptions/AdaptablePlugin.js +1 -9
  6. package/src/AdaptableOptions/DefaultAdaptableOptions.js +3 -39
  7. package/src/AdaptableOptions/SettingsPanelOptions.d.ts +44 -16
  8. package/src/AdaptableState/Aggregations/only.js +0 -11
  9. package/src/AdaptableState/Aggregations/weightedAverage.js +0 -26
  10. package/src/AdaptableState/Common/AdaptableColumn.js +0 -1
  11. package/src/AdaptableState/Common/AdaptableForm.js +0 -49
  12. package/src/AdaptableState/Common/AdaptableFormatPresets.js +0 -13
  13. package/src/AdaptableState/Common/AdaptablePredicate.js +3 -125
  14. package/src/AdaptableState/Common/AggregationColumns.js +0 -10
  15. package/src/AdaptableState/Common/Enums.js +0 -3
  16. package/src/AdaptableState/Common/Menu.js +1 -7
  17. package/src/AdaptableState/Common/MenuItem.js +0 -2
  18. package/src/AdaptableState/Common/Types.js +2 -5
  19. package/src/AdaptableState/StatusBarState.js +0 -3
  20. package/src/AdaptableState/StyledColumns/BadgeStyle.js +0 -1
  21. package/src/AdaptableState/StyledColumns/Common/BarStyleProperties.js +0 -4
  22. package/src/AdaptableState/StyledColumns/Common/CellTextOptions.js +0 -5
  23. package/src/AdaptableState/StyledColumns/Common/NumericStyledColumn.js +0 -8
  24. package/src/AdaptableState/Uuid.js +0 -1
  25. package/src/Api/Implementation/AdaptableApiImpl.js +0 -4
  26. package/src/Api/Implementation/AlertApiImpl.js +0 -21
  27. package/src/Api/Implementation/ApiBase.js +0 -24
  28. package/src/Api/Implementation/CalculatedColumnApiImpl.js +0 -1
  29. package/src/Api/Implementation/ChartingApiImpl.js +0 -3
  30. package/src/Api/Implementation/ColumnApiImpl.js +1 -15
  31. package/src/Api/Implementation/ColumnFilterApiImpl.js +0 -9
  32. package/src/Api/Implementation/ColumnScopeApiImpl.js +0 -21
  33. package/src/Api/Implementation/DashboardApiImpl.js +0 -1
  34. package/src/Api/Implementation/EntitlementApiImpl.js +0 -1
  35. package/src/Api/Implementation/ExportApiImpl.js +0 -10
  36. package/src/Api/Implementation/ExpressionApiImpl.js +0 -1
  37. package/src/Api/Implementation/FormatColumnApiImpl.js +0 -3
  38. package/src/Api/Implementation/FreeTextColumnApiImpl.js +0 -2
  39. package/src/Api/Implementation/GridApiImpl.js +1 -22
  40. package/src/Api/Implementation/GridFilterApiImpl.js +0 -2
  41. package/src/Api/Implementation/LayoutApiImpl.js +0 -18
  42. package/src/Api/Implementation/LayoutHelpers.js +0 -16
  43. package/src/Api/Implementation/NamedQueryApiImpl.js +0 -1
  44. package/src/Api/Implementation/PredicateApiImpl.js +0 -5
  45. package/src/Api/Implementation/RowFormApiImpl.js +0 -2
  46. package/src/Api/Implementation/StateApiImpl.js +0 -7
  47. package/src/Api/Implementation/SystemStatusApiImpl.js +0 -2
  48. package/src/Api/Implementation/TeamSharingApiImpl.js +0 -3
  49. package/src/Api/Implementation/UserInterfaceApiImpl.js +0 -1
  50. package/src/Api/Internal/ActionColumnInternalApi.js +0 -1
  51. package/src/Api/Internal/AdaptableInternalApi.d.ts +0 -2
  52. package/src/Api/Internal/AdaptableInternalApi.js +1 -39
  53. package/src/Api/Internal/AlertInternalApi.js +1 -102
  54. package/src/Api/Internal/CalculatedColumnInternalApi.js +0 -17
  55. package/src/Api/Internal/ChartingInternalApi.js +0 -1
  56. package/src/Api/Internal/ColumnFilterInternalApi.js +0 -52
  57. package/src/Api/Internal/ColumnInternalApi.js +0 -32
  58. package/src/Api/Internal/CustomSortInternalApi.js +0 -5
  59. package/src/Api/Internal/DashboardInternalApi.js +0 -23
  60. package/src/Api/Internal/DataImportInternalApi.js +0 -1
  61. package/src/Api/Internal/EventInternalApi.js +0 -2
  62. package/src/Api/Internal/ExportInternalApi.js +1 -16
  63. package/src/Api/Internal/ExpressionInternalApi.js +0 -23
  64. package/src/Api/Internal/Fdc3InternalApi.js +0 -9
  65. package/src/Api/Internal/FlashingCellInternalApi.js +0 -5
  66. package/src/Api/Internal/FormatColumnInternalApi.js +5 -107
  67. package/src/Api/Internal/FreeTextColumnInternalApi.js +0 -8
  68. package/src/Api/Internal/GridFilterInternalApi.js +0 -3
  69. package/src/Api/Internal/GridInternalApi.js +0 -37
  70. package/src/Api/Internal/LayoutInternalApi.js +0 -18
  71. package/src/Api/Internal/NamedQueryInternalApi.js +0 -9
  72. package/src/Api/Internal/PredicateInternalApi.js +0 -23
  73. package/src/Api/Internal/RowFormInternalApi.js +0 -18
  74. package/src/Api/Internal/StateInternalApi.js +0 -25
  75. package/src/Api/Internal/StyledColumnInternalApi.js +0 -62
  76. package/src/Api/Internal/TeamSharingInternalApi.js +0 -9
  77. package/src/Redux/ActionsReducers/AlertRedux.js +0 -24
  78. package/src/Redux/ActionsReducers/ApplicationRedux.js +0 -9
  79. package/src/Redux/ActionsReducers/BulkUpdateRedux.js +0 -6
  80. package/src/Redux/ActionsReducers/CalculatedColumnRedux.js +1 -16
  81. package/src/Redux/ActionsReducers/ChartingRedux.js +0 -24
  82. package/src/Redux/ActionsReducers/CommentsRedux.js +0 -24
  83. package/src/Redux/ActionsReducers/CustomSortRedux.js +0 -24
  84. package/src/Redux/ActionsReducers/DashboardRedux.js +0 -33
  85. package/src/Redux/ActionsReducers/ExportRedux.js +0 -36
  86. package/src/Redux/ActionsReducers/FlashingCellRedux.js +0 -24
  87. package/src/Redux/ActionsReducers/FormatColumnRedux.js +0 -36
  88. package/src/Redux/ActionsReducers/FreeTextColumnRedux.js +1 -20
  89. package/src/Redux/ActionsReducers/InternalRedux.js +0 -42
  90. package/src/Redux/ActionsReducers/LayoutRedux.js +1 -67
  91. package/src/Redux/ActionsReducers/NamedQueryRedux.js +0 -15
  92. package/src/Redux/ActionsReducers/NoteRedux.js +0 -14
  93. package/src/Redux/ActionsReducers/PluginsRedux.js +0 -3
  94. package/src/Redux/ActionsReducers/PlusMinusRedux.js +0 -34
  95. package/src/Redux/ActionsReducers/PopupRedux.js +2 -6
  96. package/src/Redux/ActionsReducers/QuickSearchRedux.js +0 -15
  97. package/src/Redux/ActionsReducers/ShortcutRedux.js +0 -24
  98. package/src/Redux/ActionsReducers/SmartEditRedux.js +0 -6
  99. package/src/Redux/ActionsReducers/StatusBarRedux.js +0 -6
  100. package/src/Redux/ActionsReducers/StyledColumnRedux.js +0 -27
  101. package/src/Redux/ActionsReducers/SystemStatusRedux.js +0 -6
  102. package/src/Redux/ActionsReducers/TeamSharingRedux.js +0 -1
  103. package/src/Redux/ActionsReducers/ThemeRedux.js +0 -26
  104. package/src/Redux/ActionsReducers/ToolPanelRedux.js +0 -22
  105. package/src/Redux/ActionsReducers/UserInterfaceRedux.js +0 -3
  106. package/src/Redux/ActionsReducers/utils.js +0 -6
  107. package/src/Redux/Store/AdaptableReduxLocalStorageEngine.js +0 -1
  108. package/src/Redux/Store/AdaptableReduxMerger.js +0 -25
  109. package/src/Redux/Store/AdaptableStore.js +5 -301
  110. package/src/Strategy/AdaptableModuleBase.js +0 -35
  111. package/src/Strategy/AlertModule.js +0 -9
  112. package/src/Strategy/CellSummaryModule.js +0 -12
  113. package/src/Strategy/ChartingModule.js +0 -1
  114. package/src/Strategy/ColumnFilterModule.js +1 -11
  115. package/src/Strategy/CommentModule.js +0 -2
  116. package/src/Strategy/DashboardModule.js +0 -4
  117. package/src/Strategy/ExportModule.js +0 -1
  118. package/src/Strategy/FlashingCellModule.js +0 -8
  119. package/src/Strategy/FormatColumnModule.js +0 -3
  120. package/src/Strategy/FreeTextColumnModule.js +0 -3
  121. package/src/Strategy/LayoutModule.js +0 -26
  122. package/src/Strategy/NoteModule.js +0 -3
  123. package/src/Strategy/PlusMinusModule.js +0 -3
  124. package/src/Strategy/SettingsPanelModule.js +0 -1
  125. package/src/Strategy/ShortcutModule.js +0 -1
  126. package/src/Strategy/SmartEditModule.js +0 -5
  127. package/src/Strategy/StatusBarModule.js +0 -7
  128. package/src/Strategy/StyledColumnModule.js +1 -16
  129. package/src/Strategy/TeamSharingModule.js +0 -9
  130. package/src/Strategy/Utilities/Layout/columnsSummaryHelpers.js +0 -5
  131. package/src/Utilities/Constants/DocumentationLinkConstants.js +0 -1
  132. package/src/Utilities/Constants/GeneralConstants.js +0 -10
  133. package/src/Utilities/Constants/ObjectDefaultConstants.js +0 -3
  134. package/src/Utilities/Constants/ReduxConstants.js +4 -8
  135. package/src/Utilities/Emitter.js +0 -9
  136. package/src/Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions.js +0 -8
  137. package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +0 -15
  138. package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.js +0 -3
  139. package/src/Utilities/ExpressionFunctions/deepMap.js +0 -16
  140. package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.js +0 -9
  141. package/src/Utilities/ExpressionFunctions/groupingMap.js +0 -9
  142. package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +7 -78
  143. package/src/Utilities/ExpressionFunctions/scalarAggregationHelper.js +0 -9
  144. package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +2 -16
  145. package/src/Utilities/Extensions/ArrayExtensions.js +1 -63
  146. package/src/Utilities/Extensions/NumberExtensions.js +0 -27
  147. package/src/Utilities/Extensions/ObjectExtensions.js +0 -36
  148. package/src/Utilities/Extensions/StringExtensions.js +0 -27
  149. package/src/Utilities/Helpers/ActionColumnHelper.js +0 -4
  150. package/src/Utilities/Helpers/AdaptableHelper.js +0 -8
  151. package/src/Utilities/Helpers/DateHelper.js +0 -10
  152. package/src/Utilities/Helpers/DisplayFormatHelper.js +0 -8
  153. package/src/Utilities/Helpers/Helper.js +3 -9
  154. package/src/Utilities/Helpers/PlusMinusHelper.js +0 -20
  155. package/src/Utilities/Helpers/QuickSearchHelper.js +0 -5
  156. package/src/Utilities/Helpers/Scheduling/CronExpression.js +0 -43
  157. package/src/Utilities/Helpers/Scheduling/ScheduledReportHelper.js +0 -4
  158. package/src/Utilities/Helpers/SettingsPanelHelper.js +40 -4
  159. package/src/Utilities/Helpers/StyleHelper.js +0 -56
  160. package/src/Utilities/Helpers/StyledColumns/BarStylesHelper.js +0 -46
  161. package/src/Utilities/Helpers/StyledColumns/GradientStyleHelper.js +0 -38
  162. package/src/Utilities/Helpers/StyledColumns/IconStyleHelper.js +0 -39
  163. package/src/Utilities/Helpers/StyledColumns/PercentBarStyleHelper.js +0 -1
  164. package/src/Utilities/Helpers/StyledColumns/SparklineStyleHelper.js +0 -5
  165. package/src/Utilities/Helpers/StyledColumns/StyledColumnHelper.js +0 -37
  166. package/src/Utilities/Helpers/TimingHelper.js +0 -13
  167. package/src/Utilities/ObjectFactory.js +2 -4
  168. package/src/Utilities/Services/AggregatedScalarLiveValue.js +0 -7
  169. package/src/Utilities/Services/AlertService.js +0 -1
  170. package/src/Utilities/Services/AnnotationsService.js +0 -22
  171. package/src/Utilities/Services/CalculatedColumnExpressionService.js +0 -8
  172. package/src/Utilities/Services/ChartingService.js +0 -9
  173. package/src/Utilities/Services/DataService.js +0 -11
  174. package/src/Utilities/Services/Fdc3Service.js +0 -3
  175. package/src/Utilities/Services/FlashingCellService.js +0 -6
  176. package/src/Utilities/Services/ModuleService.js +0 -8
  177. package/src/Utilities/Services/QueryLanguageService.js +2 -25
  178. package/src/Utilities/Services/RowFormService.js +0 -1
  179. package/src/Utilities/Services/RowSummaryService.js +1 -20
  180. package/src/Utilities/Services/TeamSharingService.js +0 -15
  181. package/src/Utilities/Services/ThemeService.js +0 -7
  182. package/src/Utilities/Services/ValidationService.js +0 -21
  183. package/src/Utilities/createAgStatusPanelComponent.js +0 -3
  184. package/src/Utilities/getExpressionViewItems.js +0 -2
  185. package/src/Utilities/getObjectTagsViewItems.js +0 -1
  186. package/src/Utilities/getScrollbarSize.js +0 -1
  187. package/src/Utilities/logDeprecation.js +0 -3
  188. package/src/Utilities/resolveContainerElement.js +0 -21
  189. package/src/Utilities/runIfNotResolvedIn.js +0 -7
  190. package/src/Utilities/sortColumnStateForVisibleColumns.js +2 -12
  191. package/src/Utilities/waitForTimeout.js +0 -1
  192. package/src/Utilities/wizardSelection.js +0 -2
  193. package/src/View/AdaptablePopover/index.js +1 -1
  194. package/src/View/AdaptableView.js +1 -5
  195. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ColumnsList.js +0 -4
  196. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizard.js +0 -23
  197. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/EntitlementsForm.js +0 -2
  198. package/src/View/AdaptableWizardView/Wizard.js +0 -12
  199. package/src/View/AdaptableWizardView/helper.js +0 -11
  200. package/src/View/Alert/ActiveAlertsPanel.js +0 -2
  201. package/src/View/Alert/AlertStatusSubPanel.js +0 -8
  202. package/src/View/Alert/Utilities/getAlertType.js +0 -7
  203. package/src/View/Alert/Utilities/getDefaultAlertDefinition.js +0 -5
  204. package/src/View/Alert/Utilities/mapAlertDefinition.js +0 -3
  205. package/src/View/Alert/Wizard/AlertWizard.js +0 -2
  206. package/src/View/Alert/Wizard/isValidAlertRules.js +0 -1
  207. package/src/View/BulkUpdate/BulkUpdatePopup.js +0 -1
  208. package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +1 -3
  209. package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.js +0 -1
  210. package/src/View/CalculatedColumn/utils.d.ts +1 -1
  211. package/src/View/CellSummary/CellSummaryPopup.js +0 -3
  212. package/src/View/CellSummary/CellSummaryStatusBarSubPanelPopover.js +1 -7
  213. package/src/View/Charting/EditChartButton.js +1 -4
  214. package/src/View/Charting/ShowChartButton.js +0 -3
  215. package/src/View/Charting/useAgChartState.js +0 -5
  216. package/src/View/Charting/useChartingElements.js +0 -4
  217. package/src/View/Charting/useExternalChartState.js +0 -6
  218. package/src/View/ColumnInfo/ColumnInfo.js +7 -17
  219. package/src/View/Comments/CommentsEditor.js +1 -16
  220. package/src/View/Components/AdaptableButton/AdaptableButtonComponent.js +0 -1
  221. package/src/View/Components/AdaptableButton/AdaptableButtonView.js +0 -3
  222. package/src/View/Components/AdaptableDateInput/index.js +2 -9
  223. package/src/View/Components/AdaptableIconComponent/index.js +0 -4
  224. package/src/View/Components/AdaptableIconSelector/index.js +0 -3
  225. package/src/View/Components/AdaptableInput/index.js +0 -2
  226. package/src/View/Components/Badge/index.js +0 -8
  227. package/src/View/Components/Buttons/ButtonNewPage.js +1 -2
  228. package/src/View/Components/Buttons/EntityListActionButtons.js +0 -1
  229. package/src/View/Components/CellPopup/index.js +1 -2
  230. package/src/View/Components/ColumnFilter/AdaptableColumnFilter.js +0 -4
  231. package/src/View/Components/ColumnFilter/AdaptableFloatingFilter.js +0 -4
  232. package/src/View/Components/ColumnFilter/ColumnFilter.js +3 -46
  233. package/src/View/Components/ColumnFilter/ColumnFilterWindow.js +0 -2
  234. package/src/View/Components/ColumnFilter/FloatingFilter.js +1 -20
  235. package/src/View/Components/ColumnFilter/components/ColumnFilterInput.js +2 -16
  236. package/src/View/Components/ColumnFilter/components/ColumnFilterInputList.js +1 -4
  237. package/src/View/Components/ColumnFilter/components/ColumnFilterMenu.js +0 -1
  238. package/src/View/Components/ColumnFilter/components/FloatingFilterInputList.js +1 -6
  239. package/src/View/Components/ColumnFilter/components/FloatingFilterValues.js +0 -20
  240. package/src/View/Components/ColumnFilter/useAdaptableFilterWrapper.js +0 -5
  241. package/src/View/Components/ColumnFilter/utils.js +2 -9
  242. package/src/View/Components/EntityRulesEditor/EntityRulePredicatesEditor/EntityRulePredicateEditor.js +0 -2
  243. package/src/View/Components/EntityRulesEditor/EntityRulePredicatesEditor/EntityRulePredicatesEditor.js +0 -1
  244. package/src/View/Components/EntityRulesEditor/index.js +1 -11
  245. package/src/View/Components/ExternalRenderer.js +1 -3
  246. package/src/View/Components/FilterForm/ListBoxFilterForm.js +1 -52
  247. package/src/View/Components/ModuleValueSelector/index.js +0 -2
  248. package/src/View/Components/Panels/PanelWithImage.js +1 -5
  249. package/src/View/Components/Panels/PanelWithRow.js +0 -3
  250. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopup.js +0 -6
  251. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupBody.js +0 -3
  252. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupModuleView.js +0 -6
  253. package/src/View/Components/Popups/AdaptablePopup/PopupPanel.js +1 -2
  254. package/src/View/Components/Popups/AdaptablePopup/useMenuItems.js +0 -1
  255. package/src/View/Components/Popups/AdaptablePopupAlert.js +0 -3
  256. package/src/View/Components/Popups/AdaptableToaster.js +0 -2
  257. package/src/View/Components/Popups/WindowPopups/WindowPopups.js +0 -8
  258. package/src/View/Components/RangesComponent.js +0 -57
  259. package/src/View/Components/Selectors/BulkUpdateValueSelector.js +0 -3
  260. package/src/View/Components/Selectors/PermittedValuesSelector.js +1 -6
  261. package/src/View/Components/ToolPanel/AdaptableToolPanel.js +1 -18
  262. package/src/View/Components/ToolPanel/ToolPanelPopupSections.js +0 -4
  263. package/src/View/Components/ToolPanel/ToolPanelWrapper.js +1 -4
  264. package/src/View/Components/ValueSelector/index.js +0 -4
  265. package/src/View/Components/wizardColumnListStyles.js +0 -5
  266. package/src/View/Dashboard/CustomToolbar.js +1 -25
  267. package/src/View/Dashboard/PinnedToolbarsSelector.js +0 -1
  268. package/src/View/DataImport/DataImportWizard/DataImportWizard.js +1 -22
  269. package/src/View/DataImport/DataImportWizard/sections/DataPreview.js +0 -1
  270. package/src/View/DataImport/systemFileHandlers.js +1 -1
  271. package/src/View/FlashingCell/Wizard/isValidFlashingCellRules.js +0 -1
  272. package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +0 -27
  273. package/src/View/FormatColumn/Wizard/FormatColumnPreview.js +0 -1
  274. package/src/View/FormatColumn/Wizard/FormatColumnScopeWizardSection.js +0 -7
  275. package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.js +0 -12
  276. package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +0 -10
  277. package/src/View/GridFilter/GridFilterPopup.js +0 -1
  278. package/src/View/GridFilter/useGridFilterExpressionEditor.js +0 -2
  279. package/src/View/GridInfo/GridInfoPopup/GridInfoPopup.js +1 -31
  280. package/src/View/Layout/LayoutViewPanel.js +0 -2
  281. package/src/View/Layout/PivotDetailsPopoup.js +0 -2
  282. package/src/View/Layout/TransposedPopup.js +0 -7
  283. package/src/View/Layout/Wizard/LayoutWizard.js +1 -6
  284. package/src/View/Layout/Wizard/sections/AggregationsSection.js +0 -2
  285. package/src/View/Layout/Wizard/sections/ColumnsSection.js +1 -32
  286. package/src/View/Layout/Wizard/sections/RowSummarySection.js +0 -3
  287. package/src/View/Layout/Wizard/sections/columnLayoutHelpers.js +0 -2
  288. package/src/View/Layout/Wizard/sections/layoutWizardColumns.js +0 -4
  289. package/src/View/Note/NotePopup.js +0 -1
  290. package/src/View/QuickSearch/QuickSearchPopup.js +0 -1
  291. package/src/View/StatusBar/AdaptableStatusBar.js +0 -4
  292. package/src/View/StatusBar/StatusBarPanel.js +0 -8
  293. package/src/View/StatusBar/StatusBarPopup.js +0 -2
  294. package/src/View/StyledColumn/Wizard/BadgePillStyleEditor.js +0 -11
  295. package/src/View/StyledColumn/Wizard/StyledColumnSliceStyleEditors.js +0 -28
  296. package/src/View/StyledColumn/Wizard/StyledColumnSparklineSettingsSection.js +0 -13
  297. package/src/View/StyledColumn/Wizard/StyledColumnWizard.js +1 -25
  298. package/src/View/StyledColumn/Wizard/StyledColumnWizardBulletSection.js +0 -26
  299. package/src/View/StyledColumn/Wizard/StyledColumnWizardGradientSection.js +0 -3
  300. package/src/View/StyledColumn/Wizard/StyledColumnWizardIconSection.js +0 -40
  301. package/src/View/StyledColumn/Wizard/StyledColumnWizardRangeBarSection.js +0 -55
  302. package/src/View/StyledColumn/Wizard/StyledColumnWizardRatingSection.js +0 -15
  303. package/src/View/StyledColumn/Wizard/StyledColumnWizardScopeSection.js +0 -21
  304. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BarStyleCellTextPreview.js +0 -10
  305. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/GradientSummaryPreview.js +0 -5
  306. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/PercentBarStylePreview.js +0 -4
  307. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgePreview.js +0 -5
  308. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBulletPreview.js +0 -3
  309. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnChartListPreviews.js +0 -13
  310. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRangeBarPreview.js +0 -1
  311. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRatingPreview.js +0 -1
  312. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnSparklinePreview.js +0 -1
  313. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardRangesSection.js +0 -13
  314. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardStyleSection.js +1 -13
  315. package/src/View/StyledColumn/Wizard/StyledColumnWizardTypeSection.js +0 -21
  316. package/src/View/SystemStatus/SystemStatusPopup.js +0 -1
  317. package/src/View/TeamSharing/SharedEntityObjectView.js +0 -1
  318. package/src/View/Theme/ThemeSelector.js +0 -1
  319. package/src/View/UIHelper.js +0 -6
  320. package/src/View/UIInterfaces.js +0 -1
  321. package/src/View/Wizard/CollapsibleWizardCard.js +1 -8
  322. package/src/View/Wizard/OnePageWizards.js +2 -9
  323. package/src/View/Wizard/SummaryColorTag.js +0 -1
  324. package/src/View/Wizard/useKeyboardNavigation.js +1 -3
  325. package/src/agGrid/Adaptable.js +0 -12
  326. package/src/agGrid/AdaptableAgGrid.d.ts +0 -2
  327. package/src/agGrid/AdaptableAgGrid.js +3 -482
  328. package/src/agGrid/AdaptableFilterHandler.js +0 -5
  329. package/src/agGrid/AdaptableLogger.js +0 -6
  330. package/src/agGrid/AgGridAdapter.js +3 -90
  331. package/src/agGrid/AgGridColumnAdapter.js +6 -168
  332. package/src/agGrid/AgGridExportAdapter.js +4 -106
  333. package/src/agGrid/AgGridFilterAdapter.js +0 -5
  334. package/src/agGrid/AgGridFloatingFilterAdapter.js +0 -10
  335. package/src/agGrid/AgGridMenuAdapter.js +0 -143
  336. package/src/agGrid/AgGridModulesAdapter.js +0 -2
  337. package/src/agGrid/AgGridOptionsService.js +0 -2
  338. package/src/agGrid/AgGridThemeAdapter.js +0 -7
  339. package/src/agGrid/agGridDataTypeDefinitions.js +0 -8
  340. package/src/agGrid/cellRenderers/BadgeRenderer.js +0 -10
  341. package/src/agGrid/cellRenderers/BulletChartRenderer.js +1 -96
  342. package/src/agGrid/cellRenderers/IconRenderer.js +0 -55
  343. package/src/agGrid/cellRenderers/PercentBarRenderer.js +0 -51
  344. package/src/agGrid/cellRenderers/RangeBarRenderer.js +1 -50
  345. package/src/agGrid/cellRenderers/RatingRenderer.js +0 -40
  346. package/src/agGrid/editors/AdaptableDateEditor/index.js +0 -18
  347. package/src/agGrid/editors/AdaptableNumberEditor/InternalAdaptableNumberEditor.js +0 -3
  348. package/src/agGrid/editors/AdaptableNumberEditor/index.js +0 -11
  349. package/src/agGrid/editors/AdaptablePercentageEditor/index.js +0 -9
  350. package/src/agGrid/index.js +1 -9
  351. package/src/components/AdaptableFormComponent/AdaptableFormComponent.js +1 -73
  352. package/src/components/ColorPicker/ColorPicker.js +0 -6
  353. package/src/components/Combobox/VirtualizedList.js +0 -5
  354. package/src/components/Combobox/index.js +5 -63
  355. package/src/components/Dashboard/Dashboard.js +1 -4
  356. package/src/components/Datepicker/index.js +2 -97
  357. package/src/components/DragAndDropContext/TabList.js +2 -6
  358. package/src/components/Drawer/index.js +0 -7
  359. package/src/components/Dropdown/index.js +0 -1
  360. package/src/components/DropdownButton/index.js +0 -1
  361. package/src/components/ExpressionEditor/BaseEditorInput.js +1 -16
  362. package/src/components/ExpressionEditor/EditorButton.js +0 -1
  363. package/src/components/ExpressionEditor/EditorInput.js +1 -7
  364. package/src/components/ExpressionEditor/EditorInputWithWhereClause.js +0 -1
  365. package/src/components/ExpressionEditor/ExpressionPreview.js +4 -14
  366. package/src/components/ExpressionEditor/NamedQueryContext.js +0 -1
  367. package/src/components/ExpressionEditor/QueryBuilder/QueryBuilderInputs.js +1 -6
  368. package/src/components/ExpressionEditor/QueryBuilder/QueryPredicateBuilder.js +0 -12
  369. package/src/components/ExpressionEditor/QueryBuilder/utils.js +0 -4
  370. package/src/components/ExpressionEditor/index.js +5 -14
  371. package/src/components/Icon/index.js +0 -2
  372. package/src/components/Input/NumberInput.js +0 -10
  373. package/src/components/Modal/Backdrop.js +0 -1
  374. package/src/components/OverlayTrigger/Overlay.js +0 -1
  375. package/src/components/OverlayTrigger/index.js +3 -15
  376. package/src/components/ProgressIndicator/ProgressIndicator.js +3 -16
  377. package/src/components/ResizeObserver/index.js +0 -7
  378. package/src/components/SelectableList/index.js +0 -7
  379. package/src/components/SimpleButton/index.js +2 -16
  380. package/src/components/Tabs/index.js +0 -3
  381. package/src/components/Tag/Tag.js +0 -1
  382. package/src/components/Tag/columnScopeTagHelpers.js +0 -2
  383. package/src/components/Textarea/index.js +1 -8
  384. package/src/components/Toggle/Toggle.js +1 -5
  385. package/src/components/Toggle/ToggleGroup.js +1 -3
  386. package/src/components/ToggleButton/index.js +1 -3
  387. package/src/components/Tree/TreeDropdown/index.js +2 -130
  388. package/src/components/Tree/treeUtils.js +0 -4
  389. package/src/components/WindowModal/WindowModal.js +1 -14
  390. package/src/components/WindowModal/useStacking.js +0 -7
  391. package/src/components/icons/bullet-chart.js +0 -4
  392. package/src/components/icons/icon-style.js +0 -4
  393. package/src/components/icons/index.js +26 -36
  394. package/src/components/icons/range-bar.js +0 -5
  395. package/src/components/icons/star.js +0 -1
  396. package/src/components/twUtils.js +3 -12
  397. package/src/components/ui/calendar.js +1 -9
  398. package/src/components/ui/combobox.js +0 -4
  399. package/src/components/utils/captureTabNavigation/getFocusableChildren.js +0 -1
  400. package/src/components/utils/useDraggable.js +0 -4
  401. package/src/components/utils/useProperty.js +0 -18
  402. package/src/devTools/index.js +0 -1
  403. package/src/env.js +2 -2
  404. package/src/layout-manager/src/LMEmitter.js +0 -5
  405. package/src/layout-manager/src/destructurePivotColumnId.js +0 -19
  406. package/src/layout-manager/src/index.js +2 -182
  407. package/src/layout-manager/src/isLayoutEqual.js +0 -1
  408. package/src/layout-manager/src/isPivotColumnTotal.js +0 -2
  409. package/src/layout-manager/src/normalizeLayoutModel.js +0 -27
  410. package/src/layout-manager/src/simplifyLayoutModel.js +0 -11
  411. package/src/layout-manager/src/sortColumnIdsByOrder.js +2 -12
  412. package/src/lib/utils.js +0 -1
  413. package/src/migration/AdaptableUpgradeHelper.js +0 -2
  414. package/src/migration/VersionUpgrade17.js +0 -33
  415. package/src/migration/VersionUpgrade20.js +1 -21
  416. package/src/migration/VersionUpgrade21.js +0 -3
  417. package/src/migration/VersionUpgrade22.js +0 -11
  418. package/src/migration/VersionUpgrade23.js +0 -73
  419. package/src/parser/src/evaluator.js +0 -1
  420. package/src/parser/src/index.js +0 -1
  421. package/src/parser/src/parser.js +4 -103
  422. package/src/parser/src/predicate/mapExpressionToQlPredicate.js +0 -5
  423. package/src/parser/src/predicate/mapQlPredicateToExpression.js +0 -2
  424. package/src/parser/src/tokenizer.js +0 -2
  425. package/src/parser/src/utils.js +0 -1
  426. package/src/renderReactRoot.js +0 -12
  427. package/src/setupDevTools.js +0 -6
  428. package/src/twMerge.js +0 -1
  429. package/src/types.d.ts +1 -1
  430. package/src/types.js +0 -2
  431. package/tsconfig.esm.tsbuildinfo +1 -1
  432. package/src/Utilities/Services/Interface/IMetamodelService.d.ts +0 -20
  433. package/src/Utilities/Services/Interface/IMetamodelService.js +0 -1
  434. package/src/Utilities/Services/MetamodelService.d.ts +0 -17
  435. package/src/Utilities/Services/MetamodelService.js +0 -162
  436. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/AdaptableOptionsForm.d.ts +0 -6
  437. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/AdaptableOptionsForm.js +0 -99
  438. package/src/metamodel/adaptable-metamodel-model.d.ts +0 -26
  439. package/src/metamodel/adaptable-metamodel-model.js +0 -1
  440. package/src/metamodel/adaptable.metamodel.d.ts +0 -6244
  441. package/src/metamodel/adaptable.metamodel.js +0 -1
@@ -15,7 +15,6 @@ import { Calendar } from '../ui/calendar';
15
15
  import { InputGroup, InputGroupAddon } from '../ui/input-group';
16
16
  import { SingleSelect } from '../NewSelect';
17
17
  import { targetOwn } from '../twUtils';
18
- // ── Caption dropdown components (month/year) ──────────────────────────
19
18
  const onCaptionKeyDown = (e) => {
20
19
  if (e.key === 'Escape' || e.key === 'Enter') {
21
20
  e.stopPropagation();
@@ -36,15 +35,10 @@ const captionComponents = {
36
35
  YearsDropdown: DatepickerYearsDropdown,
37
36
  MonthsDropdown: DatepickerMonthsDropdown,
38
37
  };
39
- // ── Main component ────────────────────────────────────────────────────
40
38
  const END_MONTH = endOfYear(addYears(new Date(), 10));
41
39
  const START_MONTH = startOfYear(addYears(new Date(), -50));
42
40
  export const Datepicker = React.forwardRef((props, ref) => {
43
- const { dateProps, disabled, style, className, placeholder, showWeekNumber, showOutsideDays, datepickerButtons, showClearButton, autoFocus,
44
- // openOnFocus,
45
- onHide, value: _value, defaultValue: _defaultValue, onChange: _onChange,
46
- // ...boxProps
47
- } = props;
41
+ const { dateProps, disabled, style, className, placeholder, showWeekNumber, showOutsideDays, datepickerButtons, showClearButton, autoFocus, onHide, value: _value, defaultValue: _defaultValue, onChange: _onChange, } = props;
48
42
  void _value;
49
43
  void _defaultValue;
50
44
  void _onChange;
@@ -63,14 +57,11 @@ export const Datepicker = React.forwardRef((props, ref) => {
63
57
  setMonth(next ?? new Date());
64
58
  };
65
59
  const inputValue = DateFormatter(value, { Pattern: dateProps.format }) ?? '';
66
- // ── DOM refs for focus ownership ────────────────────────────────
67
60
  const triggerRef = React.useRef(null);
68
61
  const popupRef = React.useRef(null);
69
62
  const isInsideDatepicker = React.useCallback((node) => {
70
63
  if (!node)
71
64
  return false;
72
- // Focus often lands on `body` briefly when a focused control unmounts (month nav).
73
- // Treat as "still in session" so we don't close before focus settles.
74
65
  if (node === document.body || node === document.documentElement) {
75
66
  return true;
76
67
  }
@@ -84,8 +75,6 @@ export const Datepicker = React.forwardRef((props, ref) => {
84
75
  if (root === node || root.contains(node)) {
85
76
  return true;
86
77
  }
87
- // `popupRef` is on an inner div; Base UI may focus `PopoverPrimitive.Popup` / Positioner
88
- // (ancestors of `root`). Those must still count as inside the datepicker.
89
78
  if (node instanceof Element && root instanceof Element) {
90
79
  let p = root.parentElement;
91
80
  while (p) {
@@ -97,7 +86,6 @@ export const Datepicker = React.forwardRef((props, ref) => {
97
86
  }
98
87
  return false;
99
88
  }, []);
100
- // ── Open / close ──────────────────────────────────────────────────
101
89
  const [open, setOpen] = useState(false);
102
90
  const closedAtRef = React.useRef(0);
103
91
  const tabFromOverlayRef = React.useRef(false);
@@ -114,9 +102,6 @@ export const Datepicker = React.forwardRef((props, ref) => {
114
102
  onHide?.();
115
103
  }
116
104
  }, [datepickerContext, onHide]);
117
- // Only honour explicit, unambiguous close reasons.
118
- // focus-out / trigger-press are ignored — the document-level
119
- // focusin listener below handles blur-to-close reliably.
120
105
  const handleOpenChange = React.useCallback((next, eventDetails) => {
121
106
  if (next) {
122
107
  setPopoverOpen(true);
@@ -132,14 +117,11 @@ export const Datepicker = React.forwardRef((props, ref) => {
132
117
  return;
133
118
  }
134
119
  }, [setPopoverOpen]);
135
- // Close when focus moves to something truly outside the datepicker (e.g. Tab away).
136
120
  useEffect(() => {
137
121
  if (!open)
138
122
  return;
139
123
  const onFocusIn = (e) => {
140
124
  const target = e.target;
141
- // When Tab was pressed inside the overlay and focus landed outside the
142
- // popup (even on the trigger), close so the user can Tab away freely.
143
125
  if (tabFromOverlayRef.current) {
144
126
  const popup = popupRef.current;
145
127
  if (popup && target && !popup.contains(target) && popup !== target) {
@@ -156,8 +138,6 @@ export const Datepicker = React.forwardRef((props, ref) => {
156
138
  document.addEventListener('focusin', onFocusIn);
157
139
  return () => document.removeEventListener('focusin', onFocusIn);
158
140
  }, [open, isInsideDatepicker, setPopoverOpen]);
159
- // Move focus into the overlay when it opens (portal + positioner need a frame to settle).
160
- // Skip when autoFocus is set — the Calendar will focus a day cell itself.
161
141
  useLayoutEffect(() => {
162
142
  if (!open || disabled || autoFocus) {
163
143
  return;
@@ -167,7 +147,6 @@ export const Datepicker = React.forwardRef((props, ref) => {
167
147
  });
168
148
  return () => cancelAnimationFrame(id);
169
149
  }, [open, disabled, autoFocus]);
170
- // ── Footer buttons ────────────────────────────────────────────────
171
150
  const clearValue = () => updateValue(undefined);
172
151
  const renderButton = (label, onClick) => (_jsx(SimpleButton, { onClick: onClick, className: "twa:m-[2px]", children: label }));
173
152
  const todayDate = new Date();
@@ -183,68 +162,23 @@ export const Datepicker = React.forwardRef((props, ref) => {
183
162
  '|': _jsx("hr", { style: { width: '100%', height: 0, margin: 0, border: 'none' } }),
184
163
  };
185
164
  const footerButtons = datepickerButtons.map((buttonKey, index) => React.cloneElement(footerButtonsMap[buttonKey], { key: index }));
186
- // ── Inline buttons (clear / calendar icon) ────────────────────────
187
165
  const clearButton = showClearButton !== false ? (_jsx(SimpleButton, { "data-name": "clear", variant: "text", tooltip: "Clear", iconSize: 20, className: "twa:p-0", icon: "close", onMouseDown: (e) => {
188
166
  e.preventDefault();
189
- // e.stopPropagation();
190
167
  clearValue();
191
168
  console.log('onMouseDown', e);
192
169
  }, onClick: (e) => {
193
170
  console.log('onClick', e);
194
171
  e.stopPropagation();
195
- // also clear on click, as the user may have "clicked" using enter
196
172
  clearValue();
197
- // and focus the input
198
173
  triggerRef.current?.firstChild?.focus();
199
174
  }, accessLevel: ACCESS_LEVEL_FULL })) : null;
200
175
  const calendarButton = (_jsx(SimpleButton, { disabled: disabled, variant: "text", icon: "calendar", tooltip: "Date", iconSize: 20, className: "twa:p-0", type: "button" }));
201
- // ── Select-portal container (so month/year lists stay inside the popover) ──
202
176
  const [selectPortalRoot, setSelectPortalRoot] = React.useState(null);
203
- // Stable callback ref — avoids cleanup/re-call cycle that briefly nullifies popupRef.
204
177
  const popupRefCallback = React.useCallback((el) => {
205
178
  popupRef.current = el;
206
179
  setSelectPortalRoot(el);
207
180
  }, []);
208
- // ── Render ────────────────────────────────────────────────────────
209
- return (_jsxs(Popover, { open: open, onOpenChange: handleOpenChange, children: [_jsx(PopoverTrigger, { nativeButton: false, render:
210
- // <Flex
211
- // {...boxProps}
212
- // ref={triggerRef as React.Ref<HTMLDivElement>}
213
- // flexDirection="row"
214
- // alignItems="center"
215
- // style={{
216
- // borderRadius: style?.borderRadius,
217
- // width: style?.width,
218
- // maxWidth: style?.maxWidth,
219
- // border: style?.border,
220
- // }}
221
- // className={cn(
222
- // 'ab-Datepicker twa:focus-visible:outline-none twa:rounded-standard',
223
- // // targetOwn.focusWithinOutline,
224
- // // targetChildren.focusWithinOutline,
225
- // className
226
- // )}
227
- // // onMouseDown={() => {
228
- // // closedByTabOutRef.current = false;
229
- // // }}
230
- // // onFocusCapture={() => {
231
- // // if (closedByTabOutRef.current) {
232
- // // return;
233
- // // }
234
- // // if (!open && Date.now() - closedAtRef.current > 200) {
235
- // // setPopoverOpen(true);
236
- // // }
237
- // // }}
238
- // // onBlurCapture={(e: React.FocusEvent) => {
239
- // // if (closedByTabOutRef.current) {
240
- // // const related = e.relatedTarget as Node | null;
241
- // // if (!triggerRef.current?.contains(related)) {
242
- // // closedByTabOutRef.current = false;
243
- // // }
244
- // // }
245
- // // }}
246
- // />
247
- _jsxs(InputGroup, { ref: triggerRef, style: {
181
+ return (_jsxs(Popover, { open: open, onOpenChange: handleOpenChange, children: [_jsx(PopoverTrigger, { nativeButton: false, render: _jsxs(InputGroup, { ref: triggerRef, style: {
248
182
  borderRadius: style?.borderRadius,
249
183
  width: style?.width,
250
184
  maxWidth: style?.maxWidth,
@@ -255,34 +189,5 @@ export const Datepicker = React.forwardRef((props, ref) => {
255
189
  updateValue(date);
256
190
  }
257
191
  }, className: "twa:h-auto twa:min-w-0 twa:outline-none twa:min-h-auto twa:py-0 twa:flex-1 twa:rounded-none twa:border-0 twa:bg-transparent twa:shadow-none twa:ring-0 twa:focus-visible:ring-0 twa:dark:bg-transparent", style: style, disabled: disabled }), _jsxs(InputGroupAddon, { align: "inline-end", children: [inputValue ? clearButton : null, calendarButton] })] }) }), _jsx(PopoverContent, { className: "twa:w-auto twa:p-0", align: "start", sideOffset: 8, children: _jsx("div", { ref: popupRefCallback, tabIndex: -1, role: "region", "aria-label": "Calendar", className: cn('twa:relative twa:isolate twa:overflow-visible twa:outline-none twa:rounded-standard', targetOwn.focusWithinOutline), onKeyDown: () => {
258
- // console.log('onKeyDown', e.key);
259
- // return;
260
- // if (e.key === 'Tab') {
261
- // tabFromOverlayRef.current = true;
262
- // requestAnimationFrame(() => {
263
- // tabFromOverlayRef.current = false;
264
- // });
265
- // }
266
- // if (
267
- // (e.key === 'Enter' || e.key === ' ') &&
268
- // e.target instanceof HTMLElement &&
269
- // e.target.tagName === 'BUTTON' &&
270
- // e.target.closest('nav')
271
- // ) {
272
- // const nav = e.target.closest('nav')!;
273
- // const buttons = nav.querySelectorAll('button');
274
- // const btnIndex = Array.from(buttons).indexOf(e.target as HTMLButtonElement);
275
- // if (btnIndex >= 0) {
276
- // requestAnimationFrame(() => {
277
- // requestAnimationFrame(() => {
278
- // const popup = popupRef.current;
279
- // if (!popup) return;
280
- // const newNav = popup.querySelector('nav');
281
- // const newBtn = newNav?.querySelectorAll('button')[btnIndex];
282
- // (newBtn as HTMLElement | undefined)?.focus({ preventScroll: true });
283
- // });
284
- // });
285
- // }
286
- // }
287
192
  }, children: _jsx(DatepickerSelectPortalContext.Provider, { value: selectPortalRoot, children: _jsx(Calendar, { fixedWeeks: true, autoFocus: !!autoFocus, showWeekNumber: showWeekNumber, showOutsideDays: showOutsideDays, mode: "single", captionLayout: "dropdown", month: month && !isNaN(month.getTime()) ? month : new Date(), selected: value, onMonthChange: setMonth, onSelect: updateValue, startMonth: START_MONTH, endMonth: END_MONTH, locale: dateProps.locale, components: captionComponents, footer: _jsx(Flex, { justifyContent: "space-between", className: "twa:mt-2", flexWrap: 'wrap', children: footerButtons }) }) }) }) })] }));
288
193
  });
@@ -62,9 +62,7 @@ export function ToolbarList({ toolbars, tabIndex, tabs, onTabsChange, onRemove,
62
62
  });
63
63
  return sources;
64
64
  }, [dragScope, unusedListIds, tabIndex, tabs]);
65
- return (_jsx(DragList, { dragListId: scopedListId, orientation: orientation, acceptDropsFrom: [...acceptDropsFrom, scopedListId], onDragProxyMove: defaultDragProxyMove,
66
- // this is called when reordering inside the same list
67
- onDrop: (sortedIndexes) => {
65
+ return (_jsx(DragList, { dragListId: scopedListId, orientation: orientation, acceptDropsFrom: [...acceptDropsFrom, scopedListId], onDragProxyMove: defaultDragProxyMove, onDrop: (sortedIndexes) => {
68
66
  const newItems = sortedIndexes.map((i) => toolbars[i]);
69
67
  onTabsChange(tabs.map((t, i) => (i === tabIndex ? { ...t, Items: newItems } : t)));
70
68
  }, shouldAcceptDrop: ({ dragItem, dragSourceListId }) => {
@@ -74,9 +72,7 @@ export function ToolbarList({ toolbars, tabIndex, tabs, onTabsChange, onRemove,
74
72
  return true;
75
73
  }
76
74
  return !toolbars.includes(toolbarId);
77
- },
78
- // this is called when dropping an item from a different list
79
- onAcceptDrop: ({ dragItemId, dropIndex }) => {
75
+ }, onAcceptDrop: ({ dragItemId, dropIndex }) => {
80
76
  const toolbarId = unscopeDragId(dragItemId);
81
77
  onTabsChange(tabs.map((tab, i) => {
82
78
  if (i !== tabIndex || tab.Items.includes(toolbarId)) {
@@ -6,24 +6,17 @@ export const Drawer = (props) => {
6
6
  });
7
7
  const [show, setShow] = React.useState(props.open);
8
8
  React.useEffect(() => {
9
- // CLOSED -> OPEN
10
- // SHOW Element, with closed class
11
- // CHANGE class to opened
12
9
  if (!isOpen && props.open) {
13
10
  setShow(true);
14
11
  requestAnimationFrame(() => {
15
12
  setIsOpen(true);
16
13
  });
17
14
  }
18
- // OPEN -> CLOSED
19
- // CHANGE class to closed
20
- // HIDE Element, when animation is finsihed
21
15
  if (isOpen && !props.open) {
22
16
  setIsOpen(false);
23
17
  }
24
18
  }, [props.open]);
25
19
  const handleOnKeyDown = React.useCallback((event) => {
26
- // escape
27
20
  if (event.key === 'Escape') {
28
21
  props.onOpenChange?.(false);
29
22
  }
@@ -76,7 +76,6 @@ const Dropdown = (props) => {
76
76
  if (!selectedOption) {
77
77
  selectedText = placeholder;
78
78
  }
79
- //20 ... 20 16
80
79
  const renderClearButton = () => (_jsx(SimpleButton, { variant: "text", icon: "close", tone: "none", tooltip: "Clear", iconSize: 20, ...clearButtonProps, className: twMerge('twa:p-0 twa:mr-1 twa:z-10 twa:color-inherit', clearButtonProps?.className), style: {
81
80
  ...(clearButtonProps ? clearButtonProps.style : null),
82
81
  }, onClick: (e) => {
@@ -17,7 +17,6 @@ export const NewDropdownButton = React.forwardRef((props, ref) => {
17
17
  ? item.tooltip.length
18
18
  : 0), 0);
19
19
  return (_jsxs(DropdownMenu, { children: [tooltip ? _jsx(NewTooltip, { label: tooltip, children: trigger }) : trigger, _jsx(DropdownMenuContent, { side: side, align: align, style: {
20
- // minWidth: `min(max(${maxLabelLength + 5}ch, calc(var(--ab-base-space) * 32)),80vw)`,
21
20
  width: `max(${maxLabelLength + (props.extraWidthChars ?? 3)}ch, calc(var(--ab-base-space) * 20), var(--anchor-width))`,
22
21
  }, children: items.map((item, index) => {
23
22
  if (item.separator) {
@@ -67,7 +67,6 @@ const FunctionsDropdown = ({ expressionFunctions, baseClassName }) => {
67
67
  const groupedFunctions = React.useMemo(() => {
68
68
  return Object.keys(expressionFunctions).reduce((acc, key) => {
69
69
  const functionDef = expressionFunctions[key];
70
- // filter
71
70
  if (currentFunctionCategory !== 'all' && functionDef.category !== currentFunctionCategory) {
72
71
  return acc;
73
72
  }
@@ -111,11 +110,6 @@ const FunctionsDropdown = ({ expressionFunctions, baseClassName }) => {
111
110
  setOverFunction(null);
112
111
  };
113
112
  const [searchInputValue, setSearchInputValue] = React.useState('');
114
- /**
115
- * Hide when:
116
- * - mouse leaves
117
- * - a function is inserted
118
- */
119
113
  return (_jsx(OverlayTrigger, { ref: dropdownRef, showEvent: "mouseenter", hideEvent: "mouseleave", targetOffset: 5, render: () => (_jsxs(Flex, { className: `${baseClassName}__dropdown-functions-list-wrapper twa:max-w-[60vw] twa:shadow-md twa:bg-background twa:text-foreground twa:text-3 twa:rounded-standard twa:p-3`, flexDirection: "column", onMouseLeave: () => hidePopup(), children: [_jsx(Flex, { className: "twa:md:gap-3 twa:gap-2 twa:pb-2 twa:md:justify-between twa:justify-start twa:flex-wrap twa:border-b twa:border-primarydark/30 twa:mb-2", children: categoryOptions.map((option, index) => {
120
114
  return (_jsx(Radio, { onFocus: (event) => {
121
115
  event.preventDefault();
@@ -129,7 +123,6 @@ const FunctionsDropdown = ({ expressionFunctions, baseClassName }) => {
129
123
  return _jsx(React.Fragment, {}, groupName);
130
124
  }
131
125
  const getEditorButtonData = (functionName) => {
132
- // handle special cases
133
126
  if (functionName === 'CASE') {
134
127
  return `CASE <caseValue> WHEN <whenValue> THEN <thenValue> ELSE <defaultValue> END`;
135
128
  }
@@ -176,24 +169,20 @@ export function BaseEditorInput(props) {
176
169
  if (!firstRowNode || !firstRowNode.data) {
177
170
  return {};
178
171
  }
179
- // clone the class instance to still keep the prototype methods
180
172
  return Object.assign(Object.create(Object.getPrototypeOf(firstRowNode)), firstRowNode);
181
173
  }, []);
182
174
  const scopeColumnId = useMemo(() => {
183
175
  return props.api.columnScopeApi.getAnyColumnIdForScope(props.columnScope);
184
176
  }, [props.columnScope]);
185
177
  try {
186
- // explicitly parsing & evaluating the expression because we need full control of the resulted AST
187
178
  const expr = parser.parse(props.value || '');
188
179
  try {
189
180
  testRowNode.data = testData;
190
- // Mock datachangedevent for change-based functions e.g. PERCENT_CHANGE
191
181
  const dataChangedEvent = {
192
182
  newValue: 100,
193
183
  oldValue: 150,
194
184
  };
195
185
  result = expr.evaluate({
196
- // we need a fully-fledged rowNode as Adaptable accesses internal methods of it
197
186
  node: testRowNode,
198
187
  functions: expressionFunctions,
199
188
  evaluateCustomQueryVariable: props.api.internalApi.getQueryLanguageService().evaluateCustomQueryVariable,
@@ -207,7 +196,6 @@ export function BaseEditorInput(props) {
207
196
  evaluationError = err;
208
197
  }
209
198
  else {
210
- // unexpected error, pass it on to the enclosing handler
211
199
  throw err;
212
200
  }
213
201
  }
@@ -215,7 +203,6 @@ export function BaseEditorInput(props) {
215
203
  selectedFunctionName = path[0] ? path[0].type : null;
216
204
  }
217
205
  catch (e) {
218
- // parse errors should have a hash, otherwise it's an unexpected runtime error
219
206
  const isParserException = !!e.hash;
220
207
  if (isParserException) {
221
208
  expressionError = buildParserExceptionMessage(e);
@@ -226,7 +213,6 @@ export function BaseEditorInput(props) {
226
213
  }
227
214
  }
228
215
  useEffect(() => {
229
- // update selected function only for focused textareas (where cursor is present)
230
216
  if (cursor != undefined) {
231
217
  props.onSelectedFunctionChange(selectedFunctionName ? expressionFunctions[selectedFunctionName] : null);
232
218
  }
@@ -235,8 +221,7 @@ export function BaseEditorInput(props) {
235
221
  .filter((editorButtonDef) => !!expressionFunctions[editorButtonDef.functionName])
236
222
  .map((editorButtonDef) => (_jsx(EditorButton, { data: editorButtonDef.data, icon: editorButtonDef.icon, children: !editorButtonDef.icon && (editorButtonDef.text || editorButtonDef.functionName) }, `${editorButtonDef.functionName}-operator`)));
237
223
  const showDocumentationLink = props.api.internalApi.isDocumentationLinksDisplayed();
238
- return (_jsxs(_Fragment, { children: [_jsxs(Flex, { "data-name": "expression-toolbar", className: `${baseClassName} twa:py-2 twa:mb-2 twa:mt-2 twa:flex-wrap twa:w-full`, children: [_jsxs(Flex, { className: "twa:flex-1 twa:ml-1 twa:flex-wrap", children: [_jsx(FunctionsDropdown, { expressionFunctions: expressionFunctions, baseClassName: baseClassName }), operatorButtons] }), showDocumentationLink && (_jsx(Flex, { alignItems: "flex-start", children: _jsx(ButtonInfo, { className: "twa:mr-2", tooltip: 'Learn how to use the Expression Editor', onClick: () => window.open(ExpressionEditorDocsLink, '_blank') }) }))] }), _jsx(Textarea, { "data-name": `expression-input-${type}`, ref: textAreaRefCallback, value: props.value || '', placeholder: props.placeholder || 'Create Query', disabled: props.disabled || false, className: join('ab-ExpressionEditor__textarea', // left for backwards compatibility
239
- `${baseClassName}__textarea`, 'twa:w-full twa:min-h-[100px] twa:p-2 twa:text-4 twa:resize-y twa:font-mono'), autoFocus: true, spellCheck: "false", onChange: (event) => {
224
+ return (_jsxs(_Fragment, { children: [_jsxs(Flex, { "data-name": "expression-toolbar", className: `${baseClassName} twa:py-2 twa:mb-2 twa:mt-2 twa:flex-wrap twa:w-full`, children: [_jsxs(Flex, { className: "twa:flex-1 twa:ml-1 twa:flex-wrap", children: [_jsx(FunctionsDropdown, { expressionFunctions: expressionFunctions, baseClassName: baseClassName }), operatorButtons] }), showDocumentationLink && (_jsx(Flex, { alignItems: "flex-start", children: _jsx(ButtonInfo, { className: "twa:mr-2", tooltip: 'Learn how to use the Expression Editor', onClick: () => window.open(ExpressionEditorDocsLink, '_blank') }) }))] }), _jsx(Textarea, { "data-name": `expression-input-${type}`, ref: textAreaRefCallback, value: props.value || '', placeholder: props.placeholder || 'Create Query', disabled: props.disabled || false, className: join('ab-ExpressionEditor__textarea', `${baseClassName}__textarea`, 'twa:w-full twa:min-h-[100px] twa:p-2 twa:text-4 twa:resize-y twa:font-mono'), autoFocus: true, spellCheck: "false", onChange: (event) => {
240
225
  props.onChange(event.target.value);
241
226
  }, style: style }), props.isFullExpression !== true && (_jsxs(HelpBlock, { className: "twa:my-2 twa:p-2 twa:text-3", children: ["This Expression must resolve to a ", _jsx("b", { children: "boolean " }), "(i.e. true / false) value"] })), expressionError && (_jsx(ErrorBox, { className: "twa:mt-2 twa:whitespace-pre-wrap twa:w-full", children: expressionError })), evaluationError && (_jsx(ErrorBox, { className: "twa:mt-2 twa:whitespace-pre-wrap", children: `${evaluationError.expressionFnName} ${evaluationError.message}` })), !props.hideResultPreview && result !== undefined && (_jsx(Box, { className: `${baseClassName}__editor-feedback twa:mt-2 twa:p-2 twa:rounded-standard`, "data-name": "expression-editor-feedback", children: _jsxs("pre", { className: "twa:whitespace-pre-wrap twa:m-0", children: ["Result (using test data):", ' ', _jsx("b", { className: "twa:bg-accentlight twa:text-accent twa:rounded-full twa:p-1 twa:px-2", children: JSON.stringify(result) })] }) }))] }));
242
227
  }
@@ -8,7 +8,6 @@ function EditorButton(props) {
8
8
  const { textAreaRef } = useExpressionEditor();
9
9
  return (_jsx(SimpleButton, { "data-name": 'operator-or-fn', variant: "text", draggable: true, onDragStart: (event) => {
10
10
  if (!dragImage) {
11
- // we want to lazy init the image since otherwise it fails in SSR environments if it is declared outside the cmp - ReferenceError: Image is not defined
12
11
  dragImage = new Image(0, 0);
13
12
  dragImage.src = DRAG_IMAGE_SRC;
14
13
  }
@@ -15,15 +15,10 @@ function EditorInput(props) {
15
15
  let filteredCollection = [];
16
16
  if (type === 'aggregatedScalar') {
17
17
  const excludeSet = new Set([
18
- // we cannot have a hardcodede set of functions,
19
- // we need to allow custom expressions
20
18
  ...cumulativeAggregatedExpressionFunctions,
21
19
  ...quantileAggregatedExpressionFunctions,
22
20
  ]);
23
- filteredCollection = Object.keys(availableAggregatedExpressionFunctions).filter((key) =>
24
- // need to allow standard ones
25
- cumulativeAggregatedExpressionFunctions.includes(key) ||
26
- // and anything else that is not cumul or quantile
21
+ filteredCollection = Object.keys(availableAggregatedExpressionFunctions).filter((key) => cumulativeAggregatedExpressionFunctions.includes(key) ||
27
22
  !excludeSet.has(key));
28
23
  }
29
24
  else {
@@ -48,7 +43,6 @@ function EditorInput(props) {
48
43
  ...moduleExpressionFunctions.scalarFunctions,
49
44
  };
50
45
  if (!props.columnScope) {
51
- // filter out $SCOPE function if no columnScope is provided
52
46
  booleanAndScalarFunctions = Object.keys(booleanAndScalarFunctions)
53
47
  .filter((key) => key !== '$SCOPE')
54
48
  .reduce((obj, key) => {
@@ -48,7 +48,6 @@ function EditorInputWithWhereClause(props) {
48
48
  return (_jsxs(Flex, { flexDirection: "column", alignItems: "flex-start", children: [_jsx(BaseEditorInput, { type: 'main', value: reactiveValue || '', placeholder: `Create ${queryName}`, onChange: updateReactiveValue, onSelectedFunctionChange: setSelectedFunction, expressionFunctions: reactiveExpressionFns, editorButtons: props.type === 'observable' ? editorButtonsObservable : editorButtonsAggregatedBoolean, testData: props.testData, isFullExpression: true, hideResultPreview: true, api: props.api, style: { height: '75px' } }), _jsxs(Box, { className: "twa:text-2 twa:mt-2 twa:pl-3", children: ["Add a ", _jsx("i", { children: "WHERE" }), " Clause to narrow the scope of the Query"] }), _jsx(CheckBox, { disabled: IsNullOrEmptyOrWhiteSpace(reactiveValue), checked: showWhereClause, onChange: (checked) => {
49
49
  setShowWhereClause(checked);
50
50
  if (!checked) {
51
- // reset whereClause value if textarea is hidden
52
51
  updateWhereClauseValue(null);
53
52
  }
54
53
  }, className: "twa:pl-3 twa:items-center", children: "WHERE" }), showWhereClause && (_jsx(BaseEditorInput, { type: 'secondary', disabled: IsNullOrEmptyOrWhiteSpace(reactiveValue), value: whereClauseValue || '', placeholder: `Create BooleanQuery which narrows down the scope of the ${queryName}`, onChange: updateWhereClauseValue, onSelectedFunctionChange: setSelectedFunction, expressionFunctions: whereClauseExpressionsFns, editorButtons: editorButtonsSearch, testData: props.testData, isFullExpression: true, hideResultPreview: true, api: props.api, style: { height: '75px' } }))] }));
@@ -8,19 +8,9 @@ export const ExpressionPreview = (props) => {
8
8
  return _jsx(_Fragment, { children: adaptableApi.expressionApi.getAdaptableQueryExpression(props.query) });
9
9
  }
10
10
  const expressionWithFriendlyNames = adaptableApi.expressionApi.getAdaptableQueryExpressionWithColumnFriendlyNames(props.query);
11
- // '[Column Name] > 2' => ['[Column Name]', '>', '2']
12
- // not the prettiest
13
11
  const strWithMarkedGroupes = expressionWithFriendlyNames.replace(/\]/gi, '],').split(',');
14
- return (
15
- /**
16
- * The etra wrapper is neede because the tag has display inline-flex and makes the content inside <i> to be displayed on
17
- * multiple lines when the expression is too long.
18
- *
19
- * The div allows the text to flow normally.
20
- */
21
- (_jsx("div", { children: strWithMarkedGroupes.map((part, index) => {
22
- const partEl = part.includes('[') ? _jsx("i", { children: part.replace(/[\[\]]/g, '') }) : part;
23
- return _jsx(React.Fragment, { children: partEl }, index);
24
- }) }))
25
- );
12
+ return (_jsx("div", { children: strWithMarkedGroupes.map((part, index) => {
13
+ const partEl = part.includes('[') ? _jsx("i", { children: part.replace(/[\[\]]/g, '') }) : part;
14
+ return _jsx(React.Fragment, { children: partEl }, index);
15
+ }) }));
26
16
  };
@@ -2,7 +2,6 @@ import { createContext, useContext } from 'react';
2
2
  export const NamedQueryContext = createContext({
3
3
  namedQuery: false,
4
4
  setNamedQuery: () => { },
5
- // hasValidNamedQueryName: () => false,
6
5
  });
7
6
  export const useNamedQueryContext = () => {
8
7
  return useContext(NamedQueryContext);
@@ -18,10 +18,7 @@ import { SingleSelect } from '../../NewSelect';
18
18
  export const PrimitiveColumnOrFieldSelector = (props) => {
19
19
  const adaptable = useAdaptable();
20
20
  const [type, setType] = React.useState(() => {
21
- return (
22
- // default to column
23
- (!props.fieldOrColumn || props.fieldOrColumn.includes('[') ? 'column' : 'field')
24
- );
21
+ return (!props.fieldOrColumn || props.fieldOrColumn.includes('[') ? 'column' : 'field');
25
22
  });
26
23
  const hasFields = React.useMemo(() => {
27
24
  return adaptable.api.expressionApi.internalApi.getAvailableFields()?.length > 0;
@@ -73,7 +70,6 @@ export const PrimitiveValueInput = (props) => {
73
70
  });
74
71
  const handleTypeChange = (newType) => {
75
72
  if (type !== newType) {
76
- // need to reset value
77
73
  props.onChange(undefined);
78
74
  setType(newType);
79
75
  }
@@ -100,7 +96,6 @@ export const PrimitiveValueInput = (props) => {
100
96
  props.onChange(event.target.value);
101
97
  } }));
102
98
  case 'date':
103
- // date format = 'DATE(2020-01-01)'
104
99
  const dateStr = typeof props.value === 'string' ? props.value.replace('DATE(', '').replace(')', '') : '';
105
100
  return (_jsx(AdaptableInput, { ...common, type: "date", value: dateStr ?? '', onChange: (event) => {
106
101
  const stringified = `DATE("${event.target.value}")`;
@@ -53,7 +53,6 @@ const LogicalFunctionEditor = (props) => {
53
53
  if (typeof arg === 'object' &&
54
54
  'operator' in arg &&
55
55
  isQlLogicalOperator(arg.operator)) {
56
- // add as a child
57
56
  const newArg = {
58
57
  ...arg,
59
58
  args: [...arg.args, newPredicate],
@@ -66,7 +65,6 @@ const LogicalFunctionEditor = (props) => {
66
65
  });
67
66
  }
68
67
  else {
69
- // add as a sibling
70
68
  const prevArgs = [...props.predicate.args];
71
69
  prevArgs.splice(index + 1, 0, newPredicate);
72
70
  props.onChange({
@@ -171,16 +169,6 @@ const PrimitiveFunctionEditor = (props) => {
171
169
  }) })] }), _jsx(Box, { className: "twa:flex-1" }), _jsx(QueryPredicateButtons, { ...props })] }));
172
170
  } }));
173
171
  };
174
- /**
175
- * Two types:
176
- * - combinatory operator
177
- * - can contain both expressons and combinators
178
- * [handle] [combinator-dropdown]
179
- * [children]
180
- *
181
- * - boolean function: ars do not contain other combinators
182
- * [handle] [column] [operator-dropdown] [...args] [delete-button] [plus-button]
183
- */
184
172
  export const QueryPredicateBuilder = (props) => {
185
173
  if (isQlLogicalOperator(props.predicate.operator)) {
186
174
  return _jsx(LogicalFunctionEditor, { ...props });
@@ -5,11 +5,8 @@ import { deepClone } from '../../../Utilities/Extensions/ObjectExtensions';
5
5
  import { booleanExpressionsAvailableInQueryBuilder } from './booleanExpressions';
6
6
  export const reorder = (predicate, from, to) => {
7
7
  const predicateCopy = deepClone(predicate);
8
- // we start from the root so no need to traverse first level
9
8
  const [_, ...fromPath] = from.split('/');
10
9
  const [__, ...toPath] = to.split('/');
11
- // remove from old position and get the item
12
- // path = '0/1/2'
13
10
  let itemToMove = predicateCopy;
14
11
  let prev = null;
15
12
  for (const index of fromPath) {
@@ -17,7 +14,6 @@ export const reorder = (predicate, from, to) => {
17
14
  itemToMove = itemToMove.args[parseInt(index)];
18
15
  }
19
16
  prev.args.splice(parseInt(fromPath[fromPath.length - 1]), 1);
20
- // find the parent into wich we want to insert the item
21
17
  let cursor = predicateCopy;
22
18
  let parent = null;
23
19
  for (const index of toPath) {
@@ -31,22 +31,15 @@ export function ExpressionEditor(props) {
31
31
  const editorInput = type === 'observable' || type === 'aggregatedBoolean' ? (_jsx(EditorInputWithWhereClause, { type: type, module: module, value: props.value, onChange: (value) => {
32
32
  setExpressionText(value);
33
33
  props.onChange(value);
34
- }, testData: props.initialData, api: props.api })) : (
35
- // 'boolean','scalar','aggregatedScalar'/'cumulativeAggregatedScalar'/'quantileAggregatedScalar'
36
- (_jsx(
37
- EditorInput,
38
- { type: type, module: module, columnScope: props.columnScope, value: props.value, onChange: (value) => {
39
- setExpressionText(value);
40
- props.onChange(value);
41
- }, testData: props.initialData, isFullExpression: props.isFullExpression, api: props.api }
42
- )));
34
+ }, testData: props.initialData, api: props.api })) : (_jsx(EditorInput, { type: type, module: module, columnScope: props.columnScope, value: props.value, onChange: (value) => {
35
+ setExpressionText(value);
36
+ props.onChange(value);
37
+ }, testData: props.initialData, isFullExpression: props.isFullExpression, api: props.api }));
43
38
  const adaptableFields = props.api.expressionApi.internalApi.getAvailableFields();
44
- // currently only boolean and scalar expressions support nested calculated columns (calc cols which reference other calc cols)
45
39
  const queryableColumns = type === 'scalar' || type === 'boolean' || type === 'aggregatedScalar'
46
40
  ? props.columns
47
41
  : props.columns.filter((c) => !c.isCalculatedColumn);
48
42
  const showDocumentationLinks = props.api.internalApi.isDocumentationLinksDisplayed();
49
- // @Bogdan i did this to be sure but i think we can get rid of this as the button does the same (and better IMO)
50
43
  const showNamedQueryStuff = false;
51
44
  const queryDocumentationLink = queryDocumentationLinks[type];
52
45
  const saveAsNamedQueryElement = allowSaveNamedQuery &&
@@ -74,9 +67,7 @@ export function ExpressionEditor(props) {
74
67
  if (event.target.tagName === 'TEXTAREA') {
75
68
  textAreaRef.current = event.target;
76
69
  }
77
- }, children: _jsxs(Flex, { className: "twa:flex-1 twa:text-2", flexDirection: "row", "data-name": "expression-editor", style: { minHeight: 0 }, children: [_jsxs(Flex, { className: "twa:flex-1 twa:pr-2 twa:overflow-auto twa:min-h-0", "data-name": "expression-builder", flexDirection: "column", children: [editorInput, StringExtensions.IsNotNullOrEmpty(expressionText?.trim()) && (_jsx(ExpressionFunctionDocumentation, { expressionFunction: selectedFunction })),
78
- /* displayed for advanced queries (observable&Aggregation) to give the users a starting point */
79
- StringExtensions.IsNullOrEmpty(expressionText?.trim()) && renderQueryHints(type), showDocumentationLinks && (_jsxs(HelpBlock, { "data-name": "query-documentation", className: "twa:my-2 twa:p-2 twa:text-3", children: [_jsx(ButtonInfo, { className: "twa:mr-2", onClick: () => window.open(queryDocumentationLink, '_blank') }), "See documentation for more details and examples"] })), _jsx(Box, { className: "twa:flex-1" }), showNamedQueryStuff && saveAsNamedQueryElement] }), _jsx(Box, { className: `${baseClassName}__sidebar twa:pb-2 twa:px-2 twa:overflow-auto twa:h-full twa:w-[280px]`, "data-name": "expression-sidebar", children: _jsx(Box, { className: "twa:h-full twa:p-2 twa:rounded-standard twa:shadow-md twa:bg-background twa:text-foreground", children: _jsxs(Tabs, { className: "twa:h-full", children: [_jsx(Tabs.Tab, { value: "column", children: "Columns" }), _jsx(Tabs.Tab, { value: "field", children: "Fields" }), _jsx(Tabs.Tab, { value: "named-query", children: "Named Queries" }), _jsx(Tabs.Content, { className: "twa:flex-1 twa:h-full", children: _jsx(DataTableEditor, { type: "column", dataFormatter: (value) => `[${value}]`, fields: queryableColumns.map((column) => ({
70
+ }, children: _jsxs(Flex, { className: "twa:flex-1 twa:text-2", flexDirection: "row", "data-name": "expression-editor", style: { minHeight: 0 }, children: [_jsxs(Flex, { className: "twa:flex-1 twa:pr-2 twa:overflow-auto twa:min-h-0", "data-name": "expression-builder", flexDirection: "column", children: [editorInput, StringExtensions.IsNotNullOrEmpty(expressionText?.trim()) && (_jsx(ExpressionFunctionDocumentation, { expressionFunction: selectedFunction })), StringExtensions.IsNullOrEmpty(expressionText?.trim()) && renderQueryHints(type), showDocumentationLinks && (_jsxs(HelpBlock, { "data-name": "query-documentation", className: "twa:my-2 twa:p-2 twa:text-3", children: [_jsx(ButtonInfo, { className: "twa:mr-2", onClick: () => window.open(queryDocumentationLink, '_blank') }), "See documentation for more details and examples"] })), _jsx(Box, { className: "twa:flex-1" }), showNamedQueryStuff && saveAsNamedQueryElement] }), _jsx(Box, { className: `${baseClassName}__sidebar twa:pb-2 twa:px-2 twa:overflow-auto twa:h-full twa:w-[280px]`, "data-name": "expression-sidebar", children: _jsx(Box, { className: "twa:h-full twa:p-2 twa:rounded-standard twa:shadow-md twa:bg-background twa:text-foreground", children: _jsxs(Tabs, { className: "twa:h-full", children: [_jsx(Tabs.Tab, { value: "column", children: "Columns" }), _jsx(Tabs.Tab, { value: "field", children: "Fields" }), _jsx(Tabs.Tab, { value: "named-query", children: "Named Queries" }), _jsx(Tabs.Content, { className: "twa:flex-1 twa:h-full", children: _jsx(DataTableEditor, { type: "column", dataFormatter: (value) => `[${value}]`, fields: queryableColumns.map((column) => ({
80
71
  label: column.friendlyName,
81
72
  value: column.columnId,
82
73
  dataType: column.dataType,
@@ -21,8 +21,6 @@ export const IconComponent = (props) => {
21
21
  }
22
22
  else {
23
23
  htmlElement = icon.element;
24
- // THe element neets to be cloned.
25
- // when it is used in more than one plce the element is removed from the DOM
26
24
  htmlElement = htmlElement.cloneNode(true);
27
25
  }
28
26
  divRef.current.insertAdjacentElement('afterend', htmlElement);
@@ -2,28 +2,19 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import * as React from 'react';
3
3
  import Input, { baseClassName } from './index';
4
4
  import join from '../utils/join';
5
- /**
6
- * This component allows - and empty values as intermediery values
7
- * it calls change only with valid numeric values
8
- */
9
5
  export const NumberInput = React.forwardRef((props, ref) => {
10
6
  const [value, setValue] = React.useState(() => {
11
- // awlays controlled
12
7
  return props.value ?? '';
13
8
  });
14
9
  const handleChange = React.useCallback((event) => {
15
10
  const { value } = event.target;
16
11
  let newVal = Number(value);
17
12
  if (value === '-' || value === '') {
18
- // we are saving invalid values so we allow values as empty string and '-'
19
- // there is a validation that prevents the
20
13
  newVal = value;
21
- // the value may be empty or negative
22
14
  setValue(value);
23
15
  }
24
16
  else if (!isNaN(newVal)) {
25
17
  setValue(value);
26
- // only set when a valid numer
27
18
  props.onChange(newVal);
28
19
  }
29
20
  }, [props.onChange]);
@@ -32,7 +23,6 @@ export const NumberInput = React.forwardRef((props, ref) => {
32
23
  }, [props.value]);
33
24
  const handleBlur = React.useCallback((event) => {
34
25
  props?.onBlur?.(event);
35
- // show the prop value
36
26
  if (value !== props.value) {
37
27
  setValue(props.value);
38
28
  }
@@ -38,7 +38,6 @@ export const updatePositionInStack = (id, data) => {
38
38
  ...data,
39
39
  };
40
40
  });
41
- // sort pairs in ascending order
42
41
  pairs.sort((p1, p2) => p1.timestamp - p2.timestamp);
43
42
  const last = pairs.pop();
44
43
  pairs.forEach((data) => {
@@ -45,7 +45,6 @@ const Overlay = React.forwardRef((props, ref) => {
45
45
  if (prevOpacity && !opacity) {
46
46
  timeoutId = setTimeout(() => {
47
47
  if (renderTimeRef.current != renderTime) {
48
- //we had other renders, so dont do anything - bail out
49
48
  return;
50
49
  }
51
50
  if (!visible) {