@adaptabletools/adaptable 23.0.4-canary.0 → 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
@@ -63,7 +63,6 @@ const OverlayTrigger = React.forwardRef((givenProps, ref) => {
63
63
  ensurePortalElement();
64
64
  const adaptable = useAdaptable();
65
65
  let { visible: _, showTriangle, showEvent, hideEvent, render, targetOffset, preventPortalEventPropagation = false, anchor, hideDelay = 0, opacityTransitionDuration, onVisibleChange, alignPosition = [
66
- // overlay - target
67
66
  ['TopLeft', 'BottomLeft'],
68
67
  ['TopRight', 'BottomRight'],
69
68
  ['TopCenter', 'BottomCenter'],
@@ -89,14 +88,7 @@ const OverlayTrigger = React.forwardRef((givenProps, ref) => {
89
88
  const overlayRef = useRef(null);
90
89
  const [visible, doSetVisible] = useProperty(props, 'visible', false);
91
90
  const hideTimeoutRef = useRef(null);
92
- const setVisible = React.useCallback(
93
- // visible state may quickly change from true -> false -> true
94
- // when moving the mouse cursor from the trigger to the overlay
95
- // for this case we debounce the visible change for a very small amount of time
96
- debounce((visible) => {
97
- // if (!visible) {
98
- // return;
99
- // }
91
+ const setVisible = React.useCallback(debounce((visible) => {
100
92
  onVisibleChange?.(visible);
101
93
  if (!visible) {
102
94
  hideTimeoutRef.current = setTimeout(() => {
@@ -115,9 +107,6 @@ const OverlayTrigger = React.forwardRef((givenProps, ref) => {
115
107
  const onShow = React.useCallback((event) => {
116
108
  const target = targetRef.current;
117
109
  if (event && preventPortalEventPropagation && !contains(target, event.target)) {
118
- // because of how React portals behave - see https://github.com/facebook/react/issues/11387
119
- // after the portal is rendered, even though an item is in a separate dom parent, if it's in the portal,
120
- // events from it are propagated to the components in the portal and thus break some stuff
121
110
  return;
122
111
  }
123
112
  batchUpdate(() => {
@@ -202,12 +191,11 @@ const OverlayTrigger = React.forwardRef((givenProps, ref) => {
202
191
  if (constrainTo) {
203
192
  preparedConstrainTo = getConstrainElement(targetRef.current, constrainTo);
204
193
  }
205
- // show only if visible or if it was visible and now it is invisible
206
194
  const alignToRect = getRect(target, targetOffset ?? 0);
207
195
  const showOverlayOptions = {
208
- id: 'overlay-trigger', // add id on props so component is not unmounted
196
+ id: 'overlay-trigger',
209
197
  alignPosition,
210
- constrainTo: preparedConstrainTo?.getBoundingClientRect?.() ?? true, // at least constrain to document
198
+ constrainTo: preparedConstrainTo?.getBoundingClientRect?.() ?? true,
211
199
  alignTo: alignToRect,
212
200
  };
213
201
  showOverlay(() => overlayContent, showOverlayOptions);
@@ -39,8 +39,6 @@ export const ProgressIndicator = () => {
39
39
  disableAdaptableGrid(adaptable.getAdaptableContainerElement(), active);
40
40
  disableAdaptableGrid(adaptable.getAgGridContainerElement(), active);
41
41
  updateGridContainerCoordinates(adaptable.getAgGridContainerElement());
42
- // #raf_progress_indicator
43
- // without rAF the progress indicator would be rendered instantly, without the 'transition-delay' defined via CSS
44
42
  requestAnimationFrame(() => {
45
43
  setVisible(active);
46
44
  });
@@ -49,19 +47,8 @@ export const ProgressIndicator = () => {
49
47
  if (render || frameworkComponent) {
50
48
  customEl = _jsx(ExternalRenderer, { render: render, frameworkComponent: frameworkComponent });
51
49
  }
52
- // Check if we should replace the default content
53
50
  const replaceContent = renderMode === 'dialog' && customEl;
54
- return (_jsx(
55
- _Fragment,
56
- { children: active && (_jsx(Dialog, { modal: true, isOpen: true, showCloseButton: false, className: `ab-ProgressIndicator ${visible ? 'ab-ProgressIndicator--visible' : ''}`, modalProps: {
57
- style: progressIndicatorCoordinates,
58
- }, children: replaceContent ? (
59
- // If renderMode is 'dialog', replace the entire content with custom element
60
- customEl) : (
61
- // Otherwise use the default Flex layout
62
- (_jsxs(
63
- Flex,
64
- { alignItems: "center", flexDirection: "column", className: "ab-ProgressIndicator-body twa:p-3", children: [_jsx(LoaderSpinner, {}), _jsxs(Box, { className: "twa:mt-3", children: [text && _jsx(Box, { children: text }), customEl] })] }
65
- ))) })) }
66
- ));
51
+ return (_jsx(_Fragment, { children: active && (_jsx(Dialog, { modal: true, isOpen: true, showCloseButton: false, className: `ab-ProgressIndicator ${visible ? 'ab-ProgressIndicator--visible' : ''}`, modalProps: {
52
+ style: progressIndicatorCoordinates,
53
+ }, children: replaceContent ? (customEl) : (_jsxs(Flex, { alignItems: "center", flexDirection: "column", className: "ab-ProgressIndicator-body twa:p-3", children: [_jsx(LoaderSpinner, {}), _jsxs(Box, { className: "twa:mt-3", children: [text && _jsx(Box, { children: text }), customEl] })] })) })) }));
67
54
  };
@@ -14,7 +14,6 @@ export const setupResizeObserver = (node, callback) => {
14
14
  width = entry.borderBoxSize[0].inlineSize;
15
15
  }
16
16
  else {
17
- // this is needed for Safari and other browsers that don't have borderBoxSize on the entry object
18
17
  const rect = node.getBoundingClientRect();
19
18
  height = rect.height;
20
19
  width = rect.width;
@@ -26,12 +25,6 @@ export const setupResizeObserver = (node, callback) => {
26
25
  observer.disconnect();
27
26
  };
28
27
  };
29
- /**
30
- * A hook that notifies you when a certain DOM element has changed it's size
31
- *
32
- * @param ref A React ref to a DOM element
33
- * @param callback The function to be called when the element is resized.
34
- */
35
28
  export const useResizeObserver = (ref, callback, config = { earlyAttach: false }) => {
36
29
  const sizeRef = useRef({
37
30
  width: 0,
@@ -21,7 +21,6 @@ export const useSelectionEvent = () => {
21
21
  metaKey = true;
22
22
  }
23
23
  if (metaKey) {
24
- // as if shift key is not pressed
25
24
  shiftKey = false;
26
25
  }
27
26
  let itemId = `${getItemId(index)}`;
@@ -29,18 +28,13 @@ export const useSelectionEvent = () => {
29
28
  if (!shiftKey) {
30
29
  clickInfoRef.current.lastClickIndexWithoutShift = index;
31
30
  if (!metaKey && !toggleOnSimpleClick) {
32
- // a simple click, no key modifiers
33
- // so reset the selection
34
- // and only add one item, the currently clicked item
35
31
  newSelection = { [itemId]: true };
36
32
  }
37
33
  else {
38
34
  const currentRowSelected = selected[itemId];
39
35
  newSelection = { ...selected };
40
36
  if (currentRowSelected) {
41
- // unselected the current row
42
37
  delete newSelection[itemId];
43
- // also, when unselecting, the click position should not be remembered, so need to revert it back
44
38
  clickInfoRef.current.lastClickIndexWithoutShift = lastClickIndexWithoutShift;
45
39
  }
46
40
  else {
@@ -56,7 +50,6 @@ export const useSelectionEvent = () => {
56
50
  newSelection = { ...selected };
57
51
  if (lastShiftSelectionRange) {
58
52
  let { start, end } = lastShiftSelectionRange;
59
- // clear previous shift selection
60
53
  for (; start <= end; start++) {
61
54
  delete newSelection[getItemId(start)];
62
55
  }
@@ -37,10 +37,6 @@ const SimpleButton = React.forwardRef((givenProps, theRef) => {
37
37
  iconPosition === 'start' ? (_jsxs(React.Fragment, { children: [icon, children] })) : (_jsxs(React.Fragment, { children: [children, icon] }));
38
38
  }
39
39
  if (buttonProps.as == 'div') {
40
- // we have some cases when we want to nest a SimpleButton inside an html Button
41
- // so the SimpleButton cannot render a <button> tag
42
- // so we want it to be a DIV tag
43
- // but still keep the same keyboard accessibility
44
40
  buttonProps.tabIndex = buttonProps.tabIndex === undefined ? 0 : buttonProps.tabIndex;
45
41
  buttonProps.role = buttonProps.role || 'button';
46
42
  const onKeyDown = buttonProps.onKeyDown;
@@ -73,15 +69,7 @@ const SimpleButton = React.forwardRef((givenProps, theRef) => {
73
69
  if (ariaLabel != null && ariaLabel !== '') {
74
70
  extraButtonProps['aria-label'] = ariaLabel;
75
71
  }
76
- const btn = (_jsx(Box, { ...buttonProps, ...extraButtonProps, as: buttonProps.as || 'button', disabled: disabled, className: cn(baseClassName, 'twa:p-1', 'twa:rounded-button', 'twa:inline-flex twa:flex-row twa:flex-none twa:items-center', 'twa:fill-current', 'twa:overflow-hidden twa:relative twa:align-middle',
77
- // direct children should be above the before pseudo element
78
- 'twa:*:z-1',
79
- // all svgs inside should be aligned middle
80
- 'twa:[&_svg]:align-middle',
81
- // 'twa:text-primary-foreground',
82
- // the text variant has the background applied on the before pseudo element
83
- // so let's configure the before pseudo element for all buttons here
84
- 'twa:before:content-[""] twa:before:absolute twa:before:inset-0 twa:before:block', 'twa:before:z-0 twa:before:pointer-events-none twa:before:rounded-[inherit]', 'twa:outline-none twa:focus-visible:border-ring twa:focus-visible:ring-3 twa:focus-visible:ring-ring/50', disabled ? `${baseClassName}--disabled` : '', `${baseClassName}--variant-${variant}`, `${baseClassName}--tone-${tone}`, 'twa:transition-opacity twa:duration-200', {
72
+ const btn = (_jsx(Box, { ...buttonProps, ...extraButtonProps, as: buttonProps.as || 'button', disabled: disabled, className: cn(baseClassName, 'twa:p-1', 'twa:rounded-button', 'twa:inline-flex twa:flex-row twa:flex-none twa:items-center', 'twa:fill-current', 'twa:overflow-hidden twa:relative twa:align-middle', 'twa:*:z-1', 'twa:[&_svg]:align-middle', 'twa:before:content-[""] twa:before:absolute twa:before:inset-0 twa:before:block', 'twa:before:z-0 twa:before:pointer-events-none twa:before:rounded-[inherit]', 'twa:outline-none twa:focus-visible:border-ring twa:focus-visible:ring-3 twa:focus-visible:ring-ring/50', disabled ? `${baseClassName}--disabled` : '', `${baseClassName}--variant-${variant}`, `${baseClassName}--tone-${tone}`, 'twa:transition-opacity twa:duration-200', {
85
73
  'twa:text-primary-foreground': tone == 'neutral',
86
74
  'twa:text-inherit': tone === 'none',
87
75
  'twa:text-success': tone === 'success',
@@ -104,9 +92,7 @@ const SimpleButton = React.forwardRef((givenProps, theRef) => {
104
92
  'twa:bg-warn twa:text-warn-foreground': tone == 'warning',
105
93
  'twa:bg-info twa:text-info-foreground': tone == 'info',
106
94
  }
107
- : '',
108
- // opacity transitioning for the background applied on the before pseudo element
109
- variant === 'outlined' || variant === 'text'
95
+ : '', variant === 'outlined' || variant === 'text'
110
96
  ? {
111
97
  'twa:before:opacity-0 twa:before:transition-opacity twa:before:duration-200': true,
112
98
  'twa:hover:before:opacity-15 twa:hover:before:bg-current': !disabled,
@@ -26,7 +26,6 @@ export const Tabs = (props) => {
26
26
  const tabs = allChildren.filter(isTab).map((tab, index) => {
27
27
  values.push(tab.props.value);
28
28
  return React.cloneElement(tab, {
29
- // @ts-ignore ignore
30
29
  index,
31
30
  keyboardNavigation,
32
31
  autoFocus,
@@ -83,8 +82,6 @@ export const Tab = (props) => {
83
82
  }, [active, autoFocus]);
84
83
  const mountedRef = React.useRef(false);
85
84
  React.useEffect(() => {
86
- // don't focus initially,
87
- // so we don't steal focus, if autoFocus is false
88
85
  if (!mountedRef.current) {
89
86
  return;
90
87
  }
@@ -5,7 +5,6 @@ import { twMerge } from '../../twMerge';
5
5
  import { Box, Flex } from '../Flex';
6
6
  const COLUMN_TAG_CLASS = 'ab-Tag--column';
7
7
  export const Tag = React.forwardRef(({ variant = 'default', className, ...props }, ref) => (_jsx(Flex, { ...props, ref: ref, className: twMerge(`ab-Tag twa:text-2 twa:py-2 twa:px-2 twa:inline-flex twa:w-fit twa:rounded-standard`, variant === 'column' ? COLUMN_TAG_CLASS : 'twa:bg-primary', className), style: props.style })));
8
- /** Tag styled for column names — accent tint and left stripe for quick recognition. */
9
8
  export const ColumnTag = React.forwardRef((props, ref) => _jsx(Tag, { ...props, ref: ref, variant: "column" }));
10
9
  export const TagBox = (props) => {
11
10
  return (_jsx(Box, { className: cn('twa:flex twa:flex-wrap twa:flex-row twa:gap-1', props.className), children: props.children }));
@@ -1,6 +1,4 @@
1
1
  const BRACKETED_SCOPE_LABEL = /^\[[^\]]+\]$/;
2
- /** True when a tag label is a scope placeholder (e.g. `[All Columns]`), not a column name. */
3
2
  export const isBracketedScopeTagLabel = (value) => BRACKETED_SCOPE_LABEL.test(value.trim());
4
- /** True when export column tags are actual column friendly names. */
5
3
  export const reportColumnTagsUseColumnVariant = (report) => report.ReportColumnScope === 'ScopeColumns' && 'ColumnIds' in (report.Scope ?? {});
6
4
  export const getScopeViewItemsTagVariant = (scope) => 'ColumnIds' in scope && Array.isArray(scope.ColumnIds) ? 'column' : undefined;
@@ -16,7 +16,7 @@ const Textarea = React.forwardRef((props, ref) => {
16
16
  }
17
17
  const expandToFitContent = () => {
18
18
  if (autoResizeOnFocus && initialHeight.current !== null && internalRef.current) {
19
- internalRef.current.style.height = `0px`; // makes sure it shrinks when needed
19
+ internalRef.current.style.height = `0px`;
20
20
  const height = internalRef.current.scrollHeight;
21
21
  internalRef.current.style.height = `${height}px`;
22
22
  }
@@ -37,16 +37,9 @@ const Textarea = React.forwardRef((props, ref) => {
37
37
  shrinkToInitialHeight();
38
38
  props.onBlur?.(e);
39
39
  }, ref: (elRef) => {
40
- // SAVE INITIAL HEIGHT
41
- // if (elRef && initialHeight.current === null) {
42
- // const height = elRef.getBoundingClientRect().height;
43
- // initialHeight.current = isNaN(height) ? 'auto' : height;
44
- // }
45
- // SAVE REF
46
40
  if (internalRef) {
47
41
  internalRef.current = elRef;
48
42
  }
49
- // CALL EXTERNAL REF
50
43
  if (ref) {
51
44
  if (typeof ref === 'function') {
52
45
  ref(elRef);
@@ -42,17 +42,13 @@ export const Toggle = ({ onPressedChange, pressed, icon, standalone = false, chi
42
42
  'twa:not-first:after:content-[""] twa:not-first:after:border-l-2 twa:not-first:after:border-accent-foreground twa:not-first:after:h-[10px] twa:not-first:after:absolute twa:not-first:after:-left-px twa:not-first:after:top-1/2 twa:not-first:after:-translate-y-1/2', standalone && [
43
43
  'ab-Toggle--standalone',
44
44
  'twa:shadow-sm twa:rounded-standard twa:bg-primary twa:text-primary-foreground',
45
- ],
46
- // backgrounds
47
- {
45
+ ], {
48
46
  'twa:text-inherit twa:bg-transparent': !pressed,
49
47
  'twa:hover:bg-primarylight twa:hover:text-primary-foreground': !pressed,
50
48
  [`${baseClassName}--pressed`]: pressed,
51
49
  'twa:bg-accent twa:hover:bg-accent/90 twa:text-accent-foreground': pressed,
52
50
  }, !standalone && {
53
51
  'twa:before:rounded-standard twa:before:content-[""] twa:before:absolute twa:before:inset-1 twa:before:z-20 twa:before:pointer-events-none': true,
54
- // let's display a shadow on the before pseudo element
55
- // when the toggle is active
56
52
  'twa:before:shadow-(--ab-focus-light__box-shadow)': isActive && pressed,
57
53
  'twa:before:shadow-(--ab-focus__box-shadow)': isActive && !pressed,
58
54
  }, standalone &&
@@ -20,9 +20,7 @@ export const ToggleGroup = (props) => {
20
20
  activeIndex: index,
21
21
  }));
22
22
  }, []);
23
- return (_jsx(ToggleGroupContext.Provider, { value: context, children: _jsx(Flex, { ref: ref, tabIndex: 0, className: cn('ab-Toggle-Group twa:shadow-sm', 'twa:bg-primary twa:text-primary-foreground', 'twa:rounded-standard twa:overflow-hidden', 'twa:inline-flex twa:w-fit', 'twa:focus:outline-0',
24
- // make the shadow of child Toggle buttons invisible when the group is not focused
25
- 'twa:not-focus-within:[--ab-focus-light__box-shadow:none]', 'twa:not-focus-within:[--ab-focus__box-shadow:none]'), onMouseDown: (event) => {
23
+ return (_jsx(ToggleGroupContext.Provider, { value: context, children: _jsx(Flex, { ref: ref, tabIndex: 0, className: cn('ab-Toggle-Group twa:shadow-sm', 'twa:bg-primary twa:text-primary-foreground', 'twa:rounded-standard twa:overflow-hidden', 'twa:inline-flex twa:w-fit', 'twa:focus:outline-0', 'twa:not-focus-within:[--ab-focus-light__box-shadow:none]', 'twa:not-focus-within:[--ab-focus__box-shadow:none]'), onMouseDown: (event) => {
26
24
  const index = context.toggleButtons.findIndex((btn) => contains(btn.node, event.target));
27
25
  if (index !== -1) {
28
26
  setActiveIndex(index);
@@ -22,9 +22,7 @@ export const ToggleButton = ({ checked, onChange, disabled, className, children,
22
22
  'twa:justify-start': isChecked,
23
23
  'twa:justify-end': !isChecked,
24
24
  'twa:opacity-50': disabled,
25
- },
26
- // the :before pseudo element
27
- 'twa:before:absolute twa:before:content-[""] twa:before:size-[24px]', 'twa:before:rounded-standard twa:before:bg-white'), children: _jsx("div", { className: cn(`${baseClassName}__text`, 'twa:font-semibold', 'twa:pr-2', 'twa:text-1', {
25
+ }, 'twa:before:absolute twa:before:content-[""] twa:before:size-[24px]', 'twa:before:rounded-standard twa:before:bg-white'), children: _jsx("div", { className: cn(`${baseClassName}__text`, 'twa:font-semibold', 'twa:pr-2', 'twa:text-1', {
28
26
  'twa:text-(--ab-cmp-toggle-button__color)': !isChecked,
29
27
  'twa:text-(--ab-cmp-toggle-button--checked__color)': isChecked,
30
28
  'twa:pl-2': isChecked,
@@ -38,8 +38,6 @@ function flattenOptions(options, primaryKey, labelField, parentPath = [], result
38
38
  function TreeItemLabel(props) {
39
39
  const { node, isExpanded, onToggleExpand, selected, reserveExpandSpace } = props;
40
40
  const handleChevronMouseDown = (e) => {
41
- // Prevent the combobox from stealing focus or treating the chevron click
42
- // as a selection toggle on the row.
43
41
  e.preventDefault();
44
42
  e.stopPropagation();
45
43
  };
@@ -48,12 +46,6 @@ function TreeItemLabel(props) {
48
46
  e.stopPropagation();
49
47
  onToggleExpand(node.path);
50
48
  };
51
- // These elements are rendered as `children` of the `ComboboxItem`, which is
52
- // a flex container. The built-in indicator is suppressed via
53
- // `renderCheckboxIndicator` on the list, so we render our own tri-state checkbox
54
- // at `order: 0` (middle). Chevron goes before (`-1`), label after (`1`).
55
- // Rendering the indicator here lets it reflect `null`/indeterminate state
56
- // that base-ui's boolean indicator can't.
57
49
  const indent = node.depth > 0 ? `calc(${node.depth} * var(--ab-tree-indent-size))` : 0;
58
50
  const iconProps = {
59
51
  className: 'twa:size-4',
@@ -64,8 +56,6 @@ export function TreeDropdown(props) {
64
56
  const { isLoading = false } = props;
65
57
  const labelField = (props.labelField ?? 'label');
66
58
  const primaryKey = (props.primaryKey ?? 'id');
67
- // Walk the tree once to get every node. This is independent of expand and
68
- // selection state, so it only recomputes when the options change.
69
59
  const allNodes = useMemo(() => {
70
60
  return flattenOptions(props.items, primaryKey, labelField);
71
61
  }, [props.items, primaryKey, labelField]);
@@ -76,20 +66,12 @@ export function TreeDropdown(props) {
76
66
  }
77
67
  return map;
78
68
  }, [allNodes]);
79
- // All paths in the tree, used to configure TreeSelectionState so it can
80
- // resolve tri-state selection across branches.
81
69
  const treePaths = useMemo(() => allNodes.map((n) => n.path), [allNodes]);
82
- // --- Selection state (backed by TreeSelectionStateObject) ----------------
83
70
  const [internalSelection, setInternalSelection] = useState(() => ({
84
71
  defaultSelection: false,
85
72
  selectedPaths: normalizePaths(props.value ?? props.defaultValue),
86
73
  deselectedPaths: [],
87
74
  }));
88
- // When used in controlled mode, sync external value into internal state
89
- // whenever the caller swaps the reference. We compare against the last
90
- // `value` we observed (captured in a state-paired variable, as recommended
91
- // for derived-from-props state) so we don't fight the caller on every
92
- // re-render while still ignoring our own onChange-driven updates.
93
75
  const [lastPropsValue, setLastPropsValue] = useState(props.value);
94
76
  if (props.value !== undefined && props.value !== lastPropsValue) {
95
77
  setLastPropsValue(props.value);
@@ -105,7 +87,6 @@ export function TreeDropdown(props) {
105
87
  strictCheckPaths: false,
106
88
  });
107
89
  }, [internalSelection, treePaths]);
108
- // --- Expand state (backed by TreeExpandStateObject) ----------------------
109
90
  const [internalExpand, setInternalExpand] = useState(() => ({
110
91
  defaultExpanded: false,
111
92
  expandedPaths: [],
@@ -119,13 +100,7 @@ export function TreeDropdown(props) {
119
100
  next.setNodeExpanded(path, !next.isNodeExpanded(path));
120
101
  setInternalExpand(next.getState());
121
102
  }, [internalExpand]);
122
- // Precompute branch nodes once so the Expand All / Collapse All toggle
123
- // can decide which action to offer without walking the tree on every render.
124
103
  const branchNodes = useMemo(() => allNodes.filter((n) => n.hasChildren), [allNodes]);
125
- // The toggle acts as "Collapse all" whenever *anything* is expanded, so a
126
- // single click after a partial expand (e.g. branches opened by a search)
127
- // collapses the whole tree. Only when every branch is already collapsed
128
- // does the toggle switch to "Expand all".
129
104
  const anyBranchExpanded = useMemo(() => {
130
105
  for (const n of branchNodes) {
131
106
  if (expandState.isNodeExpanded(n.path)) {
@@ -144,18 +119,7 @@ export function TreeDropdown(props) {
144
119
  }
145
120
  setInternalExpand(next.getState());
146
121
  }, [internalExpand, anyBranchExpanded]);
147
- // --- Search state --------------------------------------------------------
148
- // We track the search query ourselves so a query change can drive expand
149
- // state updates: when the user types, every branch on the path to a match
150
- // (and every branch within a matching subtree) is force-expanded so the
151
- // matches surface in the items list. The user can then collapse a branch
152
- // mid-search to hide that subtree again — and the next keystroke
153
- // re-expands everything matching, restoring the full filtered view.
154
122
  const [searchQuery, setSearchQuery] = useState('');
155
- // Set of pathKeys for every node that either matches the query or is an
156
- // ancestor of a matching node. Used by the filter callback so an ancestor
157
- // whose own label doesn't match still passes when one of its descendants
158
- // matches.
159
123
  const matchAncestorKeys = useMemo(() => {
160
124
  if (!searchQuery) {
161
125
  return null;
@@ -171,11 +135,6 @@ export function TreeDropdown(props) {
171
135
  }
172
136
  return keys;
173
137
  }, [allNodes, searchQuery]);
174
- // Expand every branch needed to display the current search's matches.
175
- // Called from the search input's onChange (so it's tied to user typing,
176
- // not to incidental re-renders) and only mutates expand state when there
177
- // is something new to expand — leaving any branches the user collapsed
178
- // mid-search untouched until the next keystroke.
179
138
  const expandPathsForQuery = useCallback((query) => {
180
139
  if (!query) {
181
140
  return;
@@ -199,10 +158,6 @@ export function TreeDropdown(props) {
199
158
  next.setNodeExpanded(node.path, true);
200
159
  mutated = true;
201
160
  }
202
- // allNodes is in depth-first order, so descendants of `node` are the
203
- // contiguous run of nodes with depth > node.depth that immediately
204
- // follow it. Walk that run and force every nested branch open so the
205
- // entire matching subtree (not just its first level) is visible.
206
161
  for (let j = i + 1; j < allNodes.length; j++) {
207
162
  const desc = allNodes[j];
208
163
  if (desc.depth <= node.depth) {
@@ -222,22 +177,6 @@ export function TreeDropdown(props) {
222
177
  setSearchQuery(value);
223
178
  expandPathsForQuery(value);
224
179
  }, [expandPathsForQuery]);
225
- // --- Combobox items & value ---------------------------------------------
226
- // Only nodes whose ancestors are currently expanded are surfaced to the
227
- // combobox. base-ui's `filter` prop is skipped when the search query is
228
- // empty (it shows every item verbatim), so collapsing a branch has to be
229
- // reflected directly in the items array rather than via a filter callback.
230
- //
231
- // Search doesn't override the items list directly. Instead, typing in the
232
- // search input expands every branch on the path to (and inside) any match
233
- // via `expandPathsForQuery`, which makes the matches part of `items`
234
- // naturally. Collapsing a branch mid-search hides that subtree again, even
235
- // if it contains matches — until the next keystroke re-expands everything.
236
- //
237
- // If no item anywhere in the tree has children (equivalent to "no top-level
238
- // item has children", since deeper branches can only exist under a
239
- // branching root), the tree is flat and leaf rows don't need to reserve
240
- // space for a chevron placeholder.
241
180
  const reserveExpandSpace = branchNodes.length > 0;
242
181
  const items = useMemo(() => {
243
182
  const visible = [];
@@ -253,9 +192,6 @@ export function TreeDropdown(props) {
253
192
  continue;
254
193
  }
255
194
  const isExpanded = expandState.isNodeExpanded(node.path);
256
- // Read tri-state from TreeSelectionState so branches with partial
257
- // selection render the indeterminate state (base-ui's built-in
258
- // indicator, suppressed via `renderCheckboxIndicator`, only knows boolean).
259
195
  const selected = selectionState.isNodeSelected(node.path);
260
196
  visible.push({
261
197
  value: node.pathKey,
@@ -269,17 +205,6 @@ export function TreeDropdown(props) {
269
205
  }
270
206
  return visible;
271
207
  }, [allNodes, expandState, toggleExpand, selectionState, reserveExpandSpace]);
272
- // Combobox `value` is the set of path keys for currently-visible nodes that
273
- // are fully selected (`TreeSelectionState.isNodeSelected(path) === true`).
274
- //
275
- // IMPORTANT: this must only contain *visible* items. Base-ui's combobox
276
- // filters `value` through its `itemByValue` map (built from visible items),
277
- // silently dropping any value whose item isn't present. If we then diffed
278
- // `onValueChange`'s result against a value that included hidden items, those
279
- // hidden items would look "removed" and we'd incorrectly deselect them —
280
- // e.g. expanding `fruits` → strawberry is selected, collapsing fruits and
281
- // clicking the `fruits` branch would select the subtree but then carve
282
- // strawberry back out in the second diff loop.
283
208
  const value = useMemo(() => {
284
209
  const result = [];
285
210
  for (const item of items) {
@@ -290,9 +215,6 @@ export function TreeDropdown(props) {
290
215
  return result;
291
216
  }, [items, selectionState]);
292
217
  const valueSet = useMemo(() => new Set(value), [value]);
293
- // Translate combobox value changes into TreeSelectionState mutations:
294
- // clicking a branch selects the whole subtree, clicking a leaf toggles
295
- // just that leaf, and Select All / Select None take the fast path.
296
218
  const { onValueChange: onValueChangeFromProps } = props;
297
219
  const onValueChange = useCallback((nextValues) => {
298
220
  const next = new TreeSelectionState(internalSelection, {
@@ -318,19 +240,6 @@ export function TreeDropdown(props) {
318
240
  setInternalSelection(next.getState());
319
241
  onValueChangeFromProps?.(next.getSelectedLeafNodePaths());
320
242
  }, [internalSelection, treePaths, valueSet, onValueChangeFromProps]);
321
- // --- Filtering: search query narrows the flattened items ---------------
322
- // Keep a node visible when:
323
- // 1. its own label matches the query, or
324
- // 2. any ancestor's label matches (so a whole matching subtree shows
325
- // alongside the branch the user typed), or
326
- // 3. any descendant's label matches (so parents of a deeply-nested match
327
- // stay in the list to convey the hierarchy, even if they were
328
- // collapsed when the search started).
329
- //
330
- // Rule (3) relies on `matchAncestorKeys`, which contains every ancestor of
331
- // every match. Combined with `items` returning the full flattened tree when
332
- // `searchQuery` is non-empty, this lets us surface matches buried inside
333
- // collapsed branches without implicitly expanding them.
334
243
  const filter = useCallback((item, query) => {
335
244
  const q = query.toLowerCase();
336
245
  if (item.textLabel.toLowerCase().includes(q)) {
@@ -347,7 +256,6 @@ export function TreeDropdown(props) {
347
256
  }
348
257
  return false;
349
258
  }, [nodeByKey, matchAncestorKeys]);
350
- // --- Chips: one per selected leaf path (mirrors withSelectedLeafNodesOnly)
351
259
  const selectedLeafPaths = useMemo(() => {
352
260
  return selectionState.getSelectedLeafNodePaths();
353
261
  }, [selectionState]);
@@ -363,10 +271,6 @@ export function TreeDropdown(props) {
363
271
  })
364
272
  .join('-');
365
273
  }, [nodeByKey, toDisplayValue]);
366
- // Deselect a single leaf path. Used by chip remove buttons — we can't rely on
367
- // base-ui's built-in `ChipRemove` because the combobox's `selectedValue`
368
- // contains both branches and leaves, so index-based removal would typically
369
- // target a branch and collapse its entire subtree.
370
274
  const deselectLeafPath = useCallback((path) => {
371
275
  const next = new TreeSelectionState(internalSelection, {
372
276
  treePaths,
@@ -379,8 +283,6 @@ export function TreeDropdown(props) {
379
283
  const showRemoveChip = showClear !== false;
380
284
  const { renderSelectedValues } = props;
381
285
  const renderInputValues = useCallback(() => {
382
- // Callers can swap out the default chip rendering (see
383
- // `GridFilterTreeDropdown` which renders a comma-separated summary).
384
286
  if (renderSelectedValues) {
385
287
  return renderSelectedValues({
386
288
  selectedLeafPaths,
@@ -396,12 +298,6 @@ export function TreeDropdown(props) {
396
298
  return (_jsx(ComboboxChip, { showRemove: showRemoveChip, onRemove: () => deselectLeafPath(path), className: 'twa:overflow-hidden', "aria-label": labelText, children: labelText }, key));
397
299
  }) }));
398
300
  }, [renderSelectedValues, selectedLeafPaths, chipLabelForPath, showRemoveChip, deselectLeafPath]);
399
- // --- Tree-aware Select All ----------------------------------------------
400
- // The built-in Select All reads `selectedItems.length === allItems.length`.
401
- // Since `allItems` here only contains nodes visible under the current
402
- // expand state, its tri-state would change as branches are expanded or
403
- // collapsed. Compute the state from every leaf in the tree instead so it
404
- // stays stable regardless of what's visible.
405
301
  const allLeafPaths = useMemo(() => allNodes.filter((n) => !n.hasChildren).map((n) => n.path), [allNodes]);
406
302
  const selectAllChecked = useMemo(() => {
407
303
  if (allLeafPaths.length === 0) {
@@ -435,23 +331,18 @@ export function TreeDropdown(props) {
435
331
  setInternalSelection(next.getState());
436
332
  onValueChangeFromProps?.(next.getSelectedLeafNodePaths());
437
333
  }, [internalSelection, treePaths, onValueChangeFromProps]);
438
- // --- Search-input trailing slot (Expand All / Collapse All toggle) ------
439
334
  const renderSearchInputTrailing = useCallback(() => {
440
335
  if (branchNodes.length === 0) {
441
336
  return null;
442
337
  }
443
338
  const title = anyBranchExpanded ? 'Collapse all' : 'Expand all';
444
339
  return (_jsx("button", { type: "button", "data-name": "tree-expand-all-toggle", title: title, "aria-label": title, onMouseDown: (e) => {
445
- // Keep focus on the search input so typing isn't interrupted.
446
340
  e.preventDefault();
447
341
  }, onClick: (e) => {
448
342
  e.preventDefault();
449
343
  toggleExpandAll();
450
- }, className: cn('ab-NewTreeDropdown-expand-all', 'twa:inline-flex twa:shrink-0 twa:items-center twa:justify-center', 'twa:bg-background', 'twa:size-6 twa:rounded-md twa:text-muted-foreground', 'twa:hover:text-foreground twa:hover:bg-ring/50 twa:cursor-pointer'
451
- // 'twa:-mr-1'
452
- ), children: anyBranchExpanded ? (_jsx(ChevronsDownUpIcon, { className: "twa:size-4" })) : (_jsx(ChevronsUpDownIcon, { className: "twa:size-4" })) }));
344
+ }, className: cn('ab-NewTreeDropdown-expand-all', 'twa:inline-flex twa:shrink-0 twa:items-center twa:justify-center', 'twa:bg-background', 'twa:size-6 twa:rounded-md twa:text-muted-foreground', 'twa:hover:text-foreground twa:hover:bg-ring/50 twa:cursor-pointer'), children: anyBranchExpanded ? (_jsx(ChevronsDownUpIcon, { className: "twa:size-4" })) : (_jsx(ChevronsUpDownIcon, { className: "twa:size-4" })) }));
453
345
  }, [branchNodes.length, anyBranchExpanded, toggleExpandAll]);
454
- // --- Open/close callbacks -----------------------------------------------
455
346
  const comboboxProps = {
456
347
  isLoading,
457
348
  items,
@@ -459,30 +350,19 @@ export function TreeDropdown(props) {
459
350
  onValueChange,
460
351
  searchable: 'menulist',
461
352
  virtualized: true,
462
- // Built-in Select All's default value is `visibleItems.length === totalCount`,
463
- // which would swing with expand/collapse. Override it with a tree-aware
464
- // value/handler computed from the full leaf set so it stays stable.
465
353
  showSelectAllCheckbox: true,
466
354
  selectAllCheckboxValue: selectAllChecked,
467
355
  onSelectAllCheckboxChange: onSelectAllChange,
468
- // Suppress base-ui's boolean checkbox indicator; `TreeItemLabel` renders
469
- // its own tri-state checkbox so partially-selected branches display the
470
- // indeterminate state.
471
356
  renderCheckboxIndicator: () => null,
472
357
  resizable: props.resizable,
473
358
  placeholder: props.placeholder,
474
359
  showClear: showRemoveChip,
475
- //@ts-ignore ignore
476
360
  'data-name': props['data-name'] ?? 'Select Values',
477
361
  renderItemLabel: (defaultLabel) => {
478
362
  return defaultLabel;
479
363
  },
480
364
  filter,
481
365
  onInputValueChange: handleSearchInputChange,
482
- // Reset the search query on close so the next open starts with no active
483
- // filter narrowing. The expand state itself is intentionally preserved
484
- // (the user explicitly expanded matches by typing), so re-opening the
485
- // dropdown keeps the previously-revealed branches open.
486
366
  onOpenChange: (open) => {
487
367
  if (!open) {
488
368
  setSearchQuery('');
@@ -493,15 +373,7 @@ export function TreeDropdown(props) {
493
373
  renderSearchInputTrailing,
494
374
  className: cn('ab-NewTreeDropdown', props.className),
495
375
  };
496
- return (
497
- // <div
498
- // className={cn('ab-NewTreeDropdown-wrap', 'twa:w-full')}
499
- // style={{ ...props.fieldStyle, ...props.style }}
500
- // onMouseDown={props.onMouseDown}
501
- // >
502
- // </div>
503
- (_jsx(MultiCombobox, { ...comboboxProps }))
504
- );
376
+ return (_jsx(MultiCombobox, { ...comboboxProps }));
505
377
  }
506
378
  export function GridFilterTreeDropdown(props) {
507
379
  const { showSelectedCount = false, placeholder = 'Select...', className, ...rest } = props;
@@ -4,10 +4,6 @@ export function toDisplayValueDefault(value) {
4
4
  }
5
5
  return value.map((v) => (Array.isArray(v) ? v.join('-') : v)).join(', ');
6
6
  }
7
- /**
8
- * Formats the closed TreeDropdown input using each option's `label` for the stored `value` path
9
- * segments (same shape as {@link toDisplayValueDefault}, but resolves raw values to labels).
10
- */
11
7
  export function toDisplayValueFromOptionTree(paths, options) {
12
8
  const valueToLabel = new Map();
13
9
  const walk = (node) => {
@@ -47,11 +47,6 @@ export const WindowModal = (props) => {
47
47
  };
48
48
  const positionRef = React.useRef(normalizedPosition);
49
49
  const stacking = useStacking();
50
- /**
51
- * This is needed because the function called in onDrop is saved when
52
- * it gets attached to the DOM element event handler.
53
- * This handler changes only when the underlying node changes.
54
- */
55
50
  positionRef.current = normalizedPosition;
56
51
  const style = {
57
52
  zIndex: stacking.zIndex,
@@ -100,12 +95,6 @@ export const WindowModal = (props) => {
100
95
  }
101
96
  }, []);
102
97
  const ResizableCmp = Resizable;
103
- // React propagates events through the component tree, not the DOM tree. A
104
- // nested popup (e.g. a modal wizard) rendered as a React child of this window
105
- // is portaled elsewhere in the DOM, so a mousedown inside it would bubble here
106
- // and incorrectly bring this window to the front (covering the popup). Guard
107
- // against this by only reacting to mousedowns that happen inside this window's
108
- // own DOM subtree.
109
98
  const handleMouseDown = (event) => {
110
99
  const node = targetRef.current;
111
100
  if (node && event.target instanceof Node && !node.contains(event.target)) {
@@ -113,9 +102,7 @@ export const WindowModal = (props) => {
113
102
  }
114
103
  stacking.bringInFront();
115
104
  };
116
- return createPortal(_jsx("div", { style: style,
117
- //@ts-ignore
118
- ref: targetRef, onMouseDown: handleMouseDown, children: _jsx(ResizableCmp, { minWidth: props.minWidth, minHeight: props.minHeight, onResizeStop: handleResizeStop, onResize: handleResize, bounds: "window", defaultSize: {
105
+ return createPortal(_jsx("div", { style: style, ref: targetRef, onMouseDown: handleMouseDown, children: _jsx(ResizableCmp, { minWidth: props.minWidth, minHeight: props.minHeight, onResizeStop: handleResizeStop, onResize: handleResize, bounds: "window", defaultSize: {
119
106
  width: props.size.width,
120
107
  height: props.size.height,
121
108
  }, children: props.children }) }), portalElement);