@adaptabletools/adaptable-cjs 23.0.0-canary.5 → 23.0.0-canary.7

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 (335) hide show
  1. package/icons/sort-asc.svg +1 -1
  2. package/index.css +756 -257
  3. package/package.json +1 -1
  4. package/src/AdaptableOptions/DataSetOptions.d.ts +26 -2
  5. package/src/AdaptableOptions/DefaultAdaptableOptions.js +0 -1
  6. package/src/AdaptableOptions/SettingsPanelOptions.d.ts +42 -10
  7. package/src/AdaptableState/Common/AdaptableFormat.d.ts +7 -0
  8. package/src/AdaptableState/Common/AdaptableMessageType.d.ts +1 -1
  9. package/src/AdaptableState/Common/Enums.d.ts +1 -1
  10. package/src/AdaptableState/Common/Enums.js +1 -1
  11. package/src/AdaptableState/StyledColumnState.d.ts +2 -2
  12. package/src/Api/Internal/AlertInternalApi.js +1 -1
  13. package/src/Api/Internal/DataSetInternalApi.d.ts +3 -0
  14. package/src/Api/Internal/DataSetInternalApi.js +73 -13
  15. package/src/Redux/Store/AdaptableStore.js +6 -4
  16. package/src/Strategy/CalculatedColumnModule.js +1 -0
  17. package/src/Strategy/ColumnFilterModule.js +1 -0
  18. package/src/Strategy/FlashingCellModule.js +6 -2
  19. package/src/Strategy/FormatColumnModule.js +1 -1
  20. package/src/Strategy/FreeTextColumnModule.js +38 -28
  21. package/src/Strategy/Interface/IModule.d.ts +3 -1
  22. package/src/Strategy/LayoutModule.js +15 -66
  23. package/src/Strategy/StyledColumnModule.js +11 -28
  24. package/src/Strategy/Utilities/CustomSort/getCustomSortColumnViewItems.d.ts +1 -0
  25. package/src/Strategy/Utilities/CustomSort/getCustomSortColumnViewItems.js +1 -0
  26. package/src/Strategy/Utilities/Export/getExportColumnsViewItems.d.ts +2 -0
  27. package/src/Strategy/Utilities/Export/getExportColumnsViewItems.js +17 -1
  28. package/src/Strategy/Utilities/Export/getExportRowsViewItems.d.ts +1 -0
  29. package/src/Strategy/Utilities/Export/getExportRowsViewItems.js +5 -1
  30. package/src/Strategy/Utilities/Layout/aggregationSummaryHelpers.d.ts +11 -0
  31. package/src/Strategy/Utilities/Layout/aggregationSummaryHelpers.js +111 -0
  32. package/src/Strategy/Utilities/Layout/columnsSummaryHelpers.d.ts +48 -0
  33. package/src/Strategy/Utilities/Layout/columnsSummaryHelpers.js +177 -0
  34. package/src/Strategy/Utilities/Layout/getLayoutSortViewItems.d.ts +1 -0
  35. package/src/Strategy/Utilities/Layout/getLayoutSortViewItems.js +1 -0
  36. package/src/Strategy/Utilities/Layout/rowGroupSummaryHelpers.d.ts +26 -0
  37. package/src/Strategy/Utilities/Layout/rowGroupSummaryHelpers.js +97 -0
  38. package/src/Utilities/Defaults/DefaultSettingsPanel.d.ts +3 -5
  39. package/src/Utilities/Defaults/DefaultSettingsPanel.js +48 -42
  40. package/src/Utilities/Helpers/FormatHelper.js +3 -0
  41. package/src/Utilities/Helpers/ScheduleHelper.js +2 -0
  42. package/src/Utilities/Helpers/StyleHelper.d.ts +18 -0
  43. package/src/Utilities/Helpers/StyleHelper.js +30 -1
  44. package/src/Utilities/Helpers/StyledColumnGradientHelper.js +6 -4
  45. package/src/Utilities/Helpers/resolveSettingsPanelNavigation.d.ts +3 -0
  46. package/src/Utilities/Helpers/resolveSettingsPanelNavigation.js +19 -0
  47. package/src/Utilities/getScopeViewItems.js +2 -0
  48. package/src/Utilities/wizardSelection.d.ts +10 -0
  49. package/src/Utilities/wizardSelection.js +22 -0
  50. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/AdaptableOptionsForm.js +2 -2
  51. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsSidebarForm.js +2 -2
  52. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsStatusbarForm.js +3 -3
  53. package/src/View/Alert/AlertViewPanel.js +2 -2
  54. package/src/View/Alert/Utilities/getAlertButtonStyle.js +7 -4
  55. package/src/View/Alert/Wizard/AlertBehaviourWizardSection.d.ts +0 -1
  56. package/src/View/Alert/Wizard/AlertBehaviourWizardSection.js +1 -6
  57. package/src/View/Alert/Wizard/AlertButtonsEditor.js +2 -1
  58. package/src/View/Alert/Wizard/AlertMessageWizardSection.d.ts +1 -1
  59. package/src/View/Alert/Wizard/AlertMessageWizardSection.js +1 -2
  60. package/src/View/Alert/Wizard/AlertNotificationWizardSection.d.ts +1 -1
  61. package/src/View/Alert/Wizard/AlertNotificationWizardSection.js +3 -4
  62. package/src/View/Alert/Wizard/AlertScheduledWizardSection.d.ts +1 -1
  63. package/src/View/Alert/Wizard/AlertScheduledWizardSection.js +1 -2
  64. package/src/View/Alert/Wizard/AlertTypeWizardSection.d.ts +1 -1
  65. package/src/View/Alert/Wizard/AlertTypeWizardSection.js +30 -7
  66. package/src/View/Alert/Wizard/AlertWizard.js +3 -3
  67. package/src/View/Alert/Wizard/BaseAlertScopeWizardSection.d.ts +2 -1
  68. package/src/View/Alert/Wizard/BaseAlertScopeWizardSection.js +3 -14
  69. package/src/View/BulkUpdate/BulkUpdatePopup.js +1 -1
  70. package/src/View/BulkUpdate/BulkUpdateViewPanel.js +4 -6
  71. package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.d.ts +1 -1
  72. package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.js +1 -2
  73. package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +1 -1
  74. package/src/View/CalculatedColumn/Wizard/CalculatedColumnTypeSection.js +29 -3
  75. package/src/View/CellSummary/CellSummaryViewPanel.js +4 -4
  76. package/src/View/Charting/ShowChartButton.js +8 -8
  77. package/src/View/ColumnInfo/ColumnInfo.js +21 -1
  78. package/src/View/Components/AdaptableObjectCollection/index.js +2 -3
  79. package/src/View/Components/AdaptableObjectList/AdaptableObjectCompactList.js +1 -1
  80. package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +4 -4
  81. package/src/View/Components/AdaptableObjectRow/index.js +2 -2
  82. package/src/View/Components/Buttons/ButtonBase/index.js +2 -3
  83. package/src/View/Components/Buttons/ButtonNew.d.ts +2 -0
  84. package/src/View/Components/Buttons/ButtonNew.js +1 -1
  85. package/src/View/Components/Buttons/EntityListActionButtons.js +3 -3
  86. package/src/View/Components/Buttons/SuspendToggleButton/SuspendToggleButton.js +2 -2
  87. package/src/View/Components/ColumnFilter/ColumnFilter.js +1 -2
  88. package/src/View/Components/ColumnFilter/components/ColumnFilterInput.js +0 -1
  89. package/src/View/Components/ColumnFilter/components/ColumnFilterInputList.js +3 -1
  90. package/src/View/Components/ColumnFilter/components/ColumnFilterMenu.js +2 -2
  91. package/src/View/Components/ColumnSelector/index.d.ts +12 -0
  92. package/src/View/Components/ColumnSelector/index.js +30 -6
  93. package/src/View/Components/EntityRulesEditor/EntityRulePredicatesEditor/EntityRulePredicatesEditor.js +2 -2
  94. package/src/View/Components/ModuleValueSelector/index.js +2 -1
  95. package/src/View/Components/NewScopeComponent.js +3 -8
  96. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopup.js +5 -4
  97. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupDialog.js +4 -4
  98. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupModuleView.js +2 -2
  99. package/src/View/Components/Popups/AdaptablePopup/Navigation.d.ts +3 -2
  100. package/src/View/Components/Popups/AdaptablePopup/Navigation.js +38 -28
  101. package/src/View/Components/Popups/AdaptablePopup/PopupPanel.js +3 -4
  102. package/src/View/Components/Popups/AdaptablePopup/TopBar.js +2 -3
  103. package/src/View/Components/Popups/AdaptablePopup/settingsPanelNavigationTypes.d.ts +11 -0
  104. package/src/View/Components/Popups/AdaptablePopup/settingsPanelNavigationTypes.js +5 -0
  105. package/src/View/Components/Popups/AdaptablePopup/useMenuItems.d.ts +3 -1
  106. package/src/View/Components/Popups/AdaptablePopup/useMenuItems.js +27 -28
  107. package/src/View/Components/PredicateEditor/PredicateEditor.js +1 -1
  108. package/src/View/Components/RangesComponent.d.ts +2 -4
  109. package/src/View/Components/RangesComponent.js +95 -66
  110. package/src/View/Components/ReorderDraggable/index.js +2 -3
  111. package/src/View/Components/Selectors/BulkUpdateValueSelector.d.ts +0 -2
  112. package/src/View/Components/Selectors/BulkUpdateValueSelector.js +3 -3
  113. package/src/View/Components/StyleComponent.js +30 -63
  114. package/src/View/Components/ToolPanel/AdaptableToolPanel.js +9 -6
  115. package/src/View/Components/ToolPanel/ToolPanelPopup.d.ts +3 -13
  116. package/src/View/Components/ToolPanel/ToolPanelPopup.js +5 -80
  117. package/src/View/Components/ToolPanel/ToolPanelPopupSections.d.ts +17 -0
  118. package/src/View/Components/ToolPanel/ToolPanelPopupSections.js +81 -0
  119. package/src/View/Components/ValueSelector/index.d.ts +29 -0
  120. package/src/View/Components/ValueSelector/index.js +112 -29
  121. package/src/View/Components/wizardColumnListStyles.d.ts +10 -0
  122. package/src/View/Components/wizardColumnListStyles.js +13 -0
  123. package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.d.ts +2 -1
  124. package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.js +4 -6
  125. package/src/View/CustomSort/Wizard/CustomSortWizard.js +2 -2
  126. package/src/View/Dashboard/DashboardPopup.d.ts +1 -11
  127. package/src/View/Dashboard/DashboardPopup.js +3 -67
  128. package/src/View/Dashboard/DashboardPopupSections.d.ts +20 -0
  129. package/src/View/Dashboard/DashboardPopupSections.js +73 -0
  130. package/src/View/Dashboard/PinnedToolbarsSelector.js +2 -2
  131. package/src/View/DataChangeHistory/DataChangeHistoryPopup.d.ts +1 -6
  132. package/src/View/DataChangeHistory/DataChangeHistoryPopup.js +8 -20
  133. package/src/View/DataChangeHistory/DataChangeHistoryTable.d.ts +8 -0
  134. package/src/View/DataChangeHistory/DataChangeHistoryTable.js +99 -0
  135. package/src/View/DataChangeHistory/buildActionColumnButton.d.ts +5 -3
  136. package/src/View/DataChangeHistory/buildActionColumnButton.js +33 -41
  137. package/src/View/DataChangeHistory/dataChangeHistoryHelpers.d.ts +15 -0
  138. package/src/View/DataChangeHistory/dataChangeHistoryHelpers.js +46 -0
  139. package/src/View/DataImport/DataImportWizard/DataImportWizard.js +1 -1
  140. package/src/View/DataImport/DataImportWizard/sections/ColumnsSection.js +32 -19
  141. package/src/View/DataImport/DataImportWizard/sections/DataPreview.js +1 -1
  142. package/src/View/DataSet/DataSetViewPanel.d.ts +2 -2
  143. package/src/View/Export/ExportDestinationPicker.js +4 -5
  144. package/src/View/Export/ExportViewPanel.js +2 -2
  145. package/src/View/Export/Wizard/ReportColumnsWizardSection.d.ts +2 -1
  146. package/src/View/Export/Wizard/ReportColumnsWizardSection.js +2 -7
  147. package/src/View/Export/Wizard/ReportRowsWizardSection.d.ts +2 -1
  148. package/src/View/Export/Wizard/ReportRowsWizardSection.js +2 -5
  149. package/src/View/FlashingCell/FlashingCellStyle.d.ts +4 -2
  150. package/src/View/FlashingCell/FlashingCellStyle.js +5 -3
  151. package/src/View/FlashingCell/Wizard/FlashingCellRulesWizardSection.d.ts +2 -1
  152. package/src/View/FlashingCell/Wizard/FlashingCellRulesWizardSection.js +5 -9
  153. package/src/View/FlashingCell/Wizard/FlashingCellScopeSummary.d.ts +9 -0
  154. package/src/View/FlashingCell/Wizard/FlashingCellScopeSummary.js +10 -0
  155. package/src/View/FlashingCell/Wizard/FlashingCellScopeWizardSection.d.ts +1 -1
  156. package/src/View/FlashingCell/Wizard/FlashingCellScopeWizardSection.js +5 -1
  157. package/src/View/FlashingCell/Wizard/FlashingCellStyleWizardSection.d.ts +0 -5
  158. package/src/View/FlashingCell/Wizard/FlashingCellStyleWizardSection.js +3 -8
  159. package/src/View/FlashingCell/Wizard/FlashingCellWizard.js +1 -2
  160. package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.d.ts +1 -1
  161. package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +101 -44
  162. package/src/View/FormatColumn/Wizard/FormatColumnRuleWizardSection.d.ts +0 -1
  163. package/src/View/FormatColumn/Wizard/FormatColumnRuleWizardSection.js +1 -6
  164. package/src/View/FormatColumn/Wizard/FormatColumnScopeWizardSection.js +55 -15
  165. package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.js +1 -1
  166. package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.d.ts +2 -3
  167. package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.js +5 -9
  168. package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +4 -9
  169. package/src/View/FreeTextColumn/Utilities/getFreeTextColumnSettingsTags.js +3 -2
  170. package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.js +1 -2
  171. package/src/View/GridFilter/GridFilterPopupUI/index.js +3 -2
  172. package/src/View/GridFilter/GridFilterViewPanel.js +5 -5
  173. package/src/View/GridInfo/GridInfoPopup/AdaptableObjectsSummary.js +2 -3
  174. package/src/View/GridInfo/GridInfoPopup/GridInfoPopup.js +2 -2
  175. package/src/View/Layout/LayoutViewPanel.js +2 -2
  176. package/src/View/Layout/Wizard/LayoutWizard.js +24 -28
  177. package/src/View/Layout/Wizard/sections/AggregationsSection.d.ts +13 -1
  178. package/src/View/Layout/Wizard/sections/AggregationsSection.js +77 -33
  179. package/src/View/Layout/Wizard/sections/ColumnsSection.d.ts +4 -1
  180. package/src/View/Layout/Wizard/sections/ColumnsSection.js +154 -275
  181. package/src/View/Layout/Wizard/sections/PivotAggregationsSection.d.ts +4 -1
  182. package/src/View/Layout/Wizard/sections/PivotAggregationsSection.js +146 -143
  183. package/src/View/Layout/Wizard/sections/PivotColumnsSection.d.ts +5 -2
  184. package/src/View/Layout/Wizard/sections/PivotColumnsSection.js +22 -10
  185. package/src/View/Layout/Wizard/sections/PivotRowGroupingSection.d.ts +4 -1
  186. package/src/View/Layout/Wizard/sections/PivotRowGroupingSection.js +21 -10
  187. package/src/View/Layout/Wizard/sections/RowGroupingSection.d.ts +5 -2
  188. package/src/View/Layout/Wizard/sections/RowGroupingSection.js +23 -12
  189. package/src/View/Layout/Wizard/sections/RowSelectionSection.js +7 -3
  190. package/src/View/Layout/Wizard/sections/RowSummarySection.js +10 -10
  191. package/src/View/Layout/Wizard/sections/SortSection.d.ts +12 -2
  192. package/src/View/Layout/Wizard/sections/SortSection.js +43 -18
  193. package/src/View/Layout/Wizard/sections/columnLayoutCards.d.ts +20 -0
  194. package/src/View/Layout/Wizard/sections/columnLayoutCards.js +167 -0
  195. package/src/View/Layout/Wizard/sections/columnLayoutHelpers.d.ts +30 -0
  196. package/src/View/Layout/Wizard/sections/columnLayoutHelpers.js +216 -0
  197. package/src/View/Layout/Wizard/sections/layoutWizardAccordionHelpers.d.ts +8 -0
  198. package/src/View/Layout/Wizard/sections/layoutWizardAccordionHelpers.js +72 -0
  199. package/src/View/Layout/Wizard/sections/layoutWizardColumns.d.ts +11 -0
  200. package/src/View/Layout/Wizard/sections/layoutWizardColumns.js +57 -0
  201. package/src/View/License/LicenseWatermark.js +1 -1
  202. package/src/View/NamedQuery/Wizard/NamedQueryExpressionWizardSection.d.ts +1 -1
  203. package/src/View/NamedQuery/Wizard/NamedQueryExpressionWizardSection.js +1 -2
  204. package/src/View/Note/NoteEditor.js +2 -2
  205. package/src/View/QuickSearch/QuickSearchPopup.js +2 -3
  206. package/src/View/Schedule/Wizard/ScheduleScheduleWizard.js +1 -1
  207. package/src/View/Shortcut/Wizard/ShortcutSettingsWizard.js +1 -1
  208. package/src/View/SmartEdit/SmartEditPopup.js +2 -2
  209. package/src/View/SmartEdit/SmartEditViewPanel.js +2 -2
  210. package/src/View/StateManagement/StateManagementPopup.js +1 -1
  211. package/src/View/StateManagement/components/ExportDropdown.d.ts +2 -2
  212. package/src/View/StateManagement/components/ExportDropdown.js +12 -13
  213. package/src/View/StatusBar/StatusBarPanel.js +2 -2
  214. package/src/View/StatusBar/StatusBarPopup.js +33 -5
  215. package/src/View/StatusBar/statusBarPanelHelpers.d.ts +2 -0
  216. package/src/View/StatusBar/statusBarPanelHelpers.js +11 -0
  217. package/src/View/StyledColumn/Wizard/BadgePillStyleEditor.d.ts +2 -0
  218. package/src/View/StyledColumn/Wizard/BadgePillStyleEditor.js +13 -10
  219. package/src/View/StyledColumn/Wizard/StyledColumnBadgeSection.d.ts +2 -2
  220. package/src/View/StyledColumn/Wizard/StyledColumnBadgeSection.js +137 -119
  221. package/src/View/StyledColumn/Wizard/StyledColumnSliceStyleEditors.js +7 -13
  222. package/src/View/StyledColumn/Wizard/StyledColumnSparklineSettingsSection.js +2 -1
  223. package/src/View/StyledColumn/Wizard/StyledColumnTypeThumbnail.d.ts +5 -0
  224. package/src/View/StyledColumn/Wizard/StyledColumnTypeThumbnail.js +54 -0
  225. package/src/View/StyledColumn/Wizard/StyledColumnWizard.d.ts +2 -0
  226. package/src/View/StyledColumn/Wizard/StyledColumnWizard.js +28 -6
  227. package/src/View/StyledColumn/Wizard/StyledColumnWizardBulletSection.js +8 -17
  228. package/src/View/StyledColumn/Wizard/StyledColumnWizardGradientSection.js +2 -1
  229. package/src/View/StyledColumn/Wizard/StyledColumnWizardIconSection.js +46 -28
  230. package/src/View/StyledColumn/Wizard/StyledColumnWizardRangeBarSection.js +97 -42
  231. package/src/View/StyledColumn/Wizard/StyledColumnWizardRatingSection.js +2 -1
  232. package/src/View/StyledColumn/Wizard/StyledColumnWizardScopeSection.d.ts +1 -1
  233. package/src/View/StyledColumn/Wizard/StyledColumnWizardScopeSection.js +31 -45
  234. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardStyleSection.js +10 -5
  235. package/src/View/StyledColumn/Wizard/StyledColumnWizardTypeSection.js +93 -6
  236. package/src/View/UIHelper.d.ts +0 -2
  237. package/src/View/UIHelper.js +8 -24
  238. package/src/View/Wizard/CollapsibleWizardCard.d.ts +68 -0
  239. package/src/View/Wizard/CollapsibleWizardCard.js +90 -0
  240. package/src/View/Wizard/OnePageWizards.js +6 -6
  241. package/src/View/Wizard/SummaryColorTag.d.ts +24 -0
  242. package/src/View/Wizard/SummaryColorTag.js +79 -0
  243. package/src/View/Wizard/WizardTypeSelection.d.ts +34 -0
  244. package/src/View/Wizard/WizardTypeSelection.js +40 -0
  245. package/src/View/Wizard/rowGroupSummaryTags.d.ts +18 -0
  246. package/src/View/Wizard/rowGroupSummaryTags.js +21 -0
  247. package/src/View/Wizard/scopeSummaryTags.d.ts +6 -0
  248. package/src/View/Wizard/scopeSummaryTags.js +38 -0
  249. package/src/agGrid/AdaptableAgGrid.js +1 -1
  250. package/src/agGrid/AgGridAdapter.js +0 -5
  251. package/src/agGrid/AgGridColumnAdapter.js +1 -1
  252. package/src/agGrid/cellRenderers/ActionColumnRenderer.js +4 -7
  253. package/src/components/AdaptableFormComponent/AdaptableFormComponent.js +1 -1
  254. package/src/components/Card/index.js +5 -7
  255. package/src/components/CheckBox/index.js +2 -3
  256. package/src/components/CodeBlock/index.js +2 -3
  257. package/src/components/ColorPicker/ColorPicker.d.ts +1 -0
  258. package/src/components/ColorPicker/ColorPicker.js +8 -6
  259. package/src/components/ColorPicker/OptionalColorPicker.d.ts +12 -0
  260. package/src/components/ColorPicker/OptionalColorPicker.js +31 -0
  261. package/src/components/ColorPicker/index.d.ts +1 -0
  262. package/src/components/ColorPicker/index.js +1 -0
  263. package/src/components/Combobox/comboboxUtils.d.ts +1 -0
  264. package/src/components/Combobox/index.js +19 -18
  265. package/src/components/Dashboard/DashboardManager.js +2 -4
  266. package/src/components/Dialog/index.js +4 -4
  267. package/src/components/DragAndDropContext/DragAndDropContext.d.ts +5 -0
  268. package/src/components/DragAndDropContext/DragAndDropContext.js +4 -1
  269. package/src/components/DragAndDropContext/ModuleManager.d.ts +15 -3
  270. package/src/components/DragAndDropContext/ModuleManager.js +43 -4
  271. package/src/components/DragAndDropContext/TabList.d.ts +11 -4
  272. package/src/components/DragAndDropContext/TabList.js +52 -38
  273. package/src/components/DragAndDropContext/UnusedPanel.d.ts +4 -3
  274. package/src/components/DragAndDropContext/UnusedPanel.js +13 -9
  275. package/src/components/DragAndDropContext/dragScope.d.ts +6 -0
  276. package/src/components/DragAndDropContext/dragScope.js +34 -0
  277. package/src/components/DragAndDropContext/types.d.ts +7 -0
  278. package/src/components/DropdownButton/index.d.ts +33 -25
  279. package/src/components/DropdownButton/index.js +24 -158
  280. package/src/components/EmptyContent/index.js +2 -3
  281. package/src/components/ErrorBox/index.js +2 -3
  282. package/src/components/ExpressionEditor/BaseEditorInput.js +3 -3
  283. package/src/components/ExpressionEditor/QueryBuilder/QueryBuilderInputs.js +3 -3
  284. package/src/components/ExpressionEditor/QueryBuilder/QueryPredicateBuilder.js +9 -9
  285. package/src/components/FieldWrap/index.js +2 -3
  286. package/src/components/Flex.js +2 -2
  287. package/src/components/FormLayout/index.d.ts +1 -1
  288. package/src/components/HelpBlock/index.js +3 -4
  289. package/src/components/IconSelector/IconSelector.d.ts +8 -0
  290. package/src/components/IconSelector/IconSelector.js +13 -8
  291. package/src/components/IconSelector/index.d.ts +1 -0
  292. package/src/components/IconSelector/index.js +3 -0
  293. package/src/components/Modal/index.js +2 -2
  294. package/src/components/NewSelect/index.js +11 -1
  295. package/src/components/Panel/index.js +7 -7
  296. package/src/components/Radio/index.d.ts +1 -1
  297. package/src/components/Radio/index.js +8 -6
  298. package/src/components/SimpleButton/index.js +7 -7
  299. package/src/components/StylePreview.js +2 -3
  300. package/src/components/Tabs/index.js +4 -4
  301. package/src/components/Tag/Tag.d.ts +16 -0
  302. package/src/components/Tag/Tag.js +16 -5
  303. package/src/components/Tag/columnScopeTagHelpers.d.ts +8 -0
  304. package/src/components/Tag/columnScopeTagHelpers.js +12 -0
  305. package/src/components/Tag/index.d.ts +1 -1
  306. package/src/components/Tag/index.js +3 -1
  307. package/src/components/Textarea/index.js +2 -3
  308. package/src/components/Toggle/Toggle.d.ts +2 -0
  309. package/src/components/Toggle/Toggle.js +14 -7
  310. package/src/components/Toggle/ToggleGroup.js +2 -2
  311. package/src/components/ToggleButton/index.js +4 -5
  312. package/src/components/Tree/TreeDropdown/index.js +3 -5
  313. package/src/components/WarningBox/index.js +2 -3
  314. package/src/components/icons/sort-asc.js +1 -1
  315. package/src/components/ui/button.d.ts +2 -2
  316. package/src/components/ui/combobox.d.ts +3 -1
  317. package/src/components/ui/combobox.js +2 -2
  318. package/src/components/ui/input-group.d.ts +1 -1
  319. package/src/components/ui/select.js +3 -2
  320. package/src/components/ui/textarea.js +1 -1
  321. package/src/env.js +2 -2
  322. package/src/layout-manager/src/index.js +7 -3
  323. package/src/metamodel/adaptable.metamodel.js +1 -1
  324. package/src/types.d.ts +1 -1
  325. package/tsconfig.cjs.tsbuildinfo +1 -1
  326. package/src/View/DataChangeHistory/DataChangeHistoryGrid.d.ts +0 -17
  327. package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +0 -295
  328. package/src/components/DropdownButton/DropdownButtonItem.d.ts +0 -12
  329. package/src/components/DropdownButton/DropdownButtonItem.js +0 -2
  330. package/src/components/DropdownButton/renderItem.d.ts +0 -14
  331. package/src/components/DropdownButton/renderItem.js +0 -14
  332. package/src/components/DropdownButton/useExpanded.d.ts +0 -24
  333. package/src/components/DropdownButton/useExpanded.js +0 -59
  334. package/src/components/NewDropdownButton/index.d.ts +0 -27
  335. package/src/components/NewDropdownButton/index.js +0 -28
@@ -1,57 +1,56 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useMenuItems = void 0;
3
+ exports.getSettingsPanelNavigationItems = exports.useMenuItems = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const React = tslib_1.__importStar(require("react"));
6
6
  const react_redux_1 = require("react-redux");
7
- const DefaultSettingsPanel_1 = require("../../../../Utilities/Defaults/DefaultSettingsPanel");
8
7
  const AdaptableContext_1 = require("../../../AdaptableContext");
9
8
  const PopupRedux = tslib_1.__importStar(require("../../../../Redux/ActionsReducers/PopupRedux"));
10
9
  const GeneralConstants_1 = require("../../../../Utilities/Constants/GeneralConstants");
10
+ const resolveSettingsPanelNavigation_1 = require("../../../../Utilities/Helpers/resolveSettingsPanelNavigation");
11
+ const settingsPanelNavigationTypes_1 = require("./settingsPanelNavigationTypes");
11
12
  const useMenuItems = () => {
12
13
  const adaptable = (0, AdaptableContext_1.useAdaptable)();
13
14
  const settingsPanelOptions = adaptable.adaptableOptions.settingsPanelOptions;
14
15
  const allMenuItems = (0, react_redux_1.useSelector)((state) => state?.Internal?.SettingsPanelModuleEntries);
15
16
  return React.useMemo(() => {
16
- let navigationItems = settingsPanelOptions?.navigation?.items;
17
- if (!navigationItems) {
18
- navigationItems = [...DefaultSettingsPanel_1.DEFAULT_SETTINGS_PANEL_NAVIGATION_ITEMS];
19
- if (settingsPanelOptions.customSettingsPanels) {
20
- navigationItems.push(...settingsPanelOptions.customSettingsPanels.map((panel) => panel.name));
21
- }
22
- }
17
+ const navigation = (0, resolveSettingsPanelNavigation_1.resolveSettingsPanelNavigation)(adaptable.api, settingsPanelOptions);
23
18
  const visibleItems = allMenuItems.filter((item) => item.category !== 'General' &&
24
19
  item.category !== 'CustomSettingsPanel' &&
25
20
  item.category !== 'Group' &&
26
21
  !GeneralConstants_1.STANDALONE_MODULE_POPUPS.includes(item.category) &&
27
22
  item.isVisible);
28
- let navItems = navigationItems
29
- .map((moduleName) => {
30
- if (moduleName === '-') {
31
- return moduleName;
32
- }
23
+ const resolveNavigationItem = (moduleName) => {
33
24
  const customSettingsPanel = settingsPanelOptions?.customSettingsPanels?.find?.((panel) => panel.name === moduleName);
34
- let customPanelMenuItem = null;
35
25
  if (customSettingsPanel) {
36
- // @ts-ignore
37
- customPanelMenuItem = {
26
+ // @ts-ignore custom settings panel menu items are not part of the standard menu name union
27
+ return {
38
28
  category: 'CustomSettingsPanel',
39
29
  label: customSettingsPanel.name,
40
30
  isVisible: true,
41
31
  reduxAction: PopupRedux.PopupShowScreen(null, customSettingsPanel.name),
42
32
  };
43
33
  }
44
- return customPanelMenuItem || visibleItems.find((item) => item.category === moduleName);
45
- })
46
- .filter(Boolean);
47
- // remove sequential '-' items
48
- navItems = navItems.filter((item, index) => {
49
- if (item === '-' && navItems[index - 1] === '-') {
50
- return false;
34
+ return visibleItems.find((item) => item.category === moduleName) ?? null;
35
+ };
36
+ const entries = [];
37
+ for (const group of navigation.groups) {
38
+ const groupMenuItems = group.items
39
+ .map((moduleName) => resolveNavigationItem(moduleName))
40
+ .filter(Boolean);
41
+ if (!groupMenuItems.length) {
42
+ continue;
51
43
  }
52
- return true;
53
- });
54
- return navItems;
55
- }, [allMenuItems]);
44
+ if (group.label) {
45
+ entries.push({ type: 'header', label: group.label });
46
+ }
47
+ for (const menuItem of groupMenuItems) {
48
+ entries.push({ type: 'item', menuItem });
49
+ }
50
+ }
51
+ return entries;
52
+ }, [allMenuItems, adaptable.api, settingsPanelOptions]);
56
53
  };
57
54
  exports.useMenuItems = useMenuItems;
55
+ const getSettingsPanelNavigationItems = (entries) => entries.filter(settingsPanelNavigationTypes_1.isSettingsPanelNavigationItem).map((entry) => entry.menuItem);
56
+ exports.getSettingsPanelNavigationItems = getSettingsPanelNavigationItems;
@@ -69,7 +69,7 @@ const PredicateEditor = (props) => {
69
69
  }
70
70
  }, []);
71
71
  const { skipDefaultSearch } = quickFilterValues;
72
- return ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: baseClassName, children: [(0, jsx_runtime_1.jsxs)(Flex_1.Flex, { alignItems: "center", className: "twa:justify-stretch", children: [icon && (0, jsx_runtime_1.jsx)(Tag_1.Tag, { className: "twa:mr-2", children: icon }), (0, jsx_runtime_1.jsx)(NewSelect_1.SingleSelect, { items: predicateDefsOptions, "data-name": "select-predicate", placeholder: "Select Rule", value: currentPredicateDef?.id, onValueChange: (value) => {
72
+ return ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: baseClassName, children: [(0, jsx_runtime_1.jsxs)(Flex_1.Flex, { alignItems: "center", className: "twa:justify-stretch", children: [icon && (0, jsx_runtime_1.jsx)(Tag_1.Tag, { className: "twa:mr-2", children: icon }), (0, jsx_runtime_1.jsx)(NewSelect_1.SingleSelect, { items: predicateDefsOptions, "data-name": "select-predicate", placeholder: "Select Rule", value: props.predicate?.PredicateId ?? null, onValueChange: (value) => {
73
73
  const option = predicateDefsOptions.find((x) => x.value === value);
74
74
  props.onChange({
75
75
  ...props.predicate,
@@ -65,9 +65,7 @@ export declare class RangesComponent extends React.Component<RangesComponentProp
65
65
  * 0→100), split at the midpoint instead of at the column maximum.
66
66
  */
67
67
  private splitFullSpanRangeAtMidpoint;
68
- changeColumnComparisonMinValue(value: number): void;
69
- private onMinColumnSelectedChanged;
70
- changeColumnComparisonMaxValue(value: number): void;
71
- private onMaxColumnSelectedChanged;
68
+ setColumnComparisonMin(value: number | string | undefined): void;
69
+ setColumnComparisonMax(value: number | string | undefined): void;
72
70
  changeColumnComparisonColor(value: string): void;
73
71
  }
@@ -10,11 +10,16 @@ const CheckBox_1 = require("../../components/CheckBox");
10
10
  const FormLayout_1 = tslib_1.__importStar(require("../../components/FormLayout"));
11
11
  const NumberInput_1 = require("../../components/Input/NumberInput");
12
12
  const SimpleButton_1 = tslib_1.__importDefault(require("../../components/SimpleButton"));
13
+ const ButtonNew_1 = require("./Buttons/ButtonNew");
13
14
  const UIHelper_1 = require("../UIHelper");
14
15
  const ColumnSelector_1 = require("./Selectors/ColumnSelector");
15
16
  const Tabs_1 = require("../../components/Tabs");
16
17
  const Radio_1 = tslib_1.__importDefault(require("../../components/Radio"));
17
18
  const Flex_1 = require("../../components/Flex");
19
+ const NewSelect_1 = require("../../components/NewSelect");
20
+ const InputGroup_1 = require("../../components/InputGroup");
21
+ const icons_1 = require("../../components/icons");
22
+ const HelpBlock_1 = tslib_1.__importDefault(require("../../components/HelpBlock"));
18
23
  const DEFAULT_ZERO_CENTRED_COLORS = {
19
24
  NegativeColor: 'rgba(220, 53, 69, 0.55)',
20
25
  PositiveColor: 'rgba(40, 167, 69, 0.55)',
@@ -42,32 +47,53 @@ function deriveInitialRangesType(props) {
42
47
  }
43
48
  return props.rangeValueType === 'Percentage' ? 'PercentageRange' : 'NumberRange';
44
49
  }
50
+ /**
51
+ * A single Column Comparison bound (Min or Max). The user picks whether the
52
+ * bound is a fixed `Value` (a number applied to every row) or a `Column`
53
+ * (read from another column and evaluated per row). The underlying
54
+ * `ColumnComparison.MinValue`/`MaxValue` stays a `number | string` — number =>
55
+ * fixed value, non-numeric string => columnId — so the type is derived from the
56
+ * stored value via `isNaN`, mirroring how the runtime resolver discriminates it.
57
+ */
58
+ const ColumnComparisonBoundInput = ({ value, disabled, onChange }) => {
59
+ const [type, setType] = React.useState(value != null && value !== '' && isNaN(Number(value)) ? 'column' : 'value');
60
+ const typeOptions = [
61
+ {
62
+ value: 'value',
63
+ label: ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { alignItems: "center", children: [(0, jsx_runtime_1.jsx)(icons_1.Icon, { name: "edit" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:ml-2", children: "Value" })] })),
64
+ },
65
+ {
66
+ value: 'column',
67
+ label: ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { alignItems: "center", children: [(0, jsx_runtime_1.jsx)(icons_1.Icon, { name: "columns" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:ml-2", children: "Column" })] })),
68
+ },
69
+ ];
70
+ const editor = type === 'value' ? ((0, jsx_runtime_1.jsx)(NumberInput_1.NumberInput, { className: "twa:w-full", disabled: disabled, type: "number", value: value != null && !isNaN(Number(value)) ? Number(value) : '', onChange: (v) => onChange(v) })) : ((0, jsx_runtime_1.jsx)(ColumnSelector_1.ColumnSelector, { disabled: disabled, type: "number", value: value != null && isNaN(Number(value)) ? String(value) : undefined, onChange: (columnId) => onChange(columnId || undefined) }));
71
+ // The select trigger, the `NumberInput` (`.ab-Input`) and the `ColumnSelector`
72
+ // (a Combobox that does NOT forward `className`, rendering its border on a
73
+ // `[data-slot="input-group"]` wrapper) all hard-code `rounded-input`, so the
74
+ // InputGroup CSS-variable joining has no effect. We flatten the touching
75
+ // corners directly (important, to beat `rounded-input`) and overlap the shared
76
+ // border via `-ml-px` so the two controls read as a single block. The editor
77
+ // side targets both inner border elements through descendant arbitrary
78
+ // variants and forces them to fill the flex item.
79
+ const editorWrapperClassName = [
80
+ 'twa:flex-1 twa:basis-0 twa:min-w-0 twa:-ml-px',
81
+ 'twa:[&_.ab-Input]:w-full twa:[&_.ab-Input]:rounded-l-none!',
82
+ 'twa:[&_[data-slot=input-group]]:w-full! twa:[&_[data-slot=input-group]]:rounded-l-none!',
83
+ ].join(' ');
84
+ return ((0, jsx_runtime_1.jsxs)(InputGroup_1.InputGroup, { Component: Flex_1.Flex, className: "twa:items-stretch twa:max-w-[20rem]", children: [(0, jsx_runtime_1.jsx)(NewSelect_1.SingleSelect, { className: "twa:w-[120px] twa:max-w-none twa:shrink-0 twa:box-border twa:rounded-r-none!", disabled: disabled, value: type, items: typeOptions, onValueChange: (next) => {
85
+ // Switching type clears the stale bound so a fixed number can never
86
+ // be misread as a columnId (or vice versa).
87
+ onChange(undefined);
88
+ setType(next);
89
+ } }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: editorWrapperClassName, children: editor })] }));
90
+ };
45
91
  class RangesComponent extends React.Component {
46
92
  constructor(props) {
47
93
  super(props);
48
94
  this.state = { rangesType: deriveInitialRangesType(props) };
49
95
  }
50
96
  render() {
51
- let comparisonMinValueNumber = this.props.columnComparison != null &&
52
- this.props.columnComparison.MinValue != null &&
53
- !isNaN(Number(this.props.columnComparison.MinValue))
54
- ? Number(this.props.columnComparison.MinValue)
55
- : '';
56
- let comparisonMaxValueNumber = this.props.columnComparison != null &&
57
- this.props.columnComparison.MaxValue != null &&
58
- !isNaN(Number(this.props.columnComparison.MaxValue))
59
- ? Number(this.props.columnComparison.MaxValue)
60
- : '';
61
- let comparisonMinValueColumnId = this.props.columnComparison != null &&
62
- this.props.columnComparison.MinValue != null &&
63
- isNaN(Number(this.props.columnComparison.MinValue))
64
- ? String(this.props.columnComparison.MinValue)
65
- : undefined;
66
- let comparisonMaxValueColumnId = this.props.columnComparison != null &&
67
- this.props.columnComparison.MaxValue != null &&
68
- isNaN(Number(this.props.columnComparison.MaxValue))
69
- ? String(this.props.columnComparison.MaxValue)
70
- : undefined;
71
97
  let comparisonColor = this.props.columnComparison != null && this.props.columnComparison.Color != null
72
98
  ? this.props.columnComparison.Color
73
99
  : undefined;
@@ -76,34 +102,54 @@ class RangesComponent extends React.Component {
76
102
  // is shared between the two range tabs and parameterised on this flag.
77
103
  const isRangeValueTypeNumber = this.state.rangesType === 'NumberRange';
78
104
  const renderNoneContent = () => ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-2 twa:opacity-70 twa:py-2 twa:max-w-[520px]", children: "No coloured bands configured" }));
79
- const renderRangesContent = () => ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [this.props.ranges?.map((range, index, list) => ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { alignItems: "end", className: "twa:mb-2", "data-name": "percent-bar-range", children: [(0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "column", children: [isRangeValueTypeNumber && index === 0 && ((0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { onClick: () => this.setRangeColMin(range), checked: range.Min === 'Col-Min', className: "twa:mt-0 twa:mb-1 twa:text-3", disabled: this.props.disabled, children: "Col Min" })), (0, jsx_runtime_1.jsx)(NumberInput_1.NumberInput, { disabled: this.props.disabled ||
80
- range.Min === 'Col-Min' ||
81
- (index === 0 && !isRangeValueTypeNumber), value: range.Min, onChange: (value) => {
82
- this.changeRangeMin(index, value);
83
- }, className: "twa:mr-2" })] }), (0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "column", children: [isRangeValueTypeNumber && index === list.length - 1 && ((0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { className: "twa:mt-0 twa:mb-1 twa:text-3", onClick: () => this.setRangeColMax(range), checked: range.Max === 'Col-Max', disabled: this.props.disabled, children: "Col Max" })), (0, jsx_runtime_1.jsx)(NumberInput_1.NumberInput, { value: range.Max, disabled: this.props.disabled ||
84
- range.Max === 'Col-Max' ||
85
- (index === list.length - 1 && !isRangeValueTypeNumber), onChange: (value) => {
86
- this.changeRangeMax(index, value);
87
- }, className: "twa:mr-2" })] }), (0, jsx_runtime_1.jsx)(Flex_1.Flex, { alignItems: "center", className: "twa:h-full", children: (0, jsx_runtime_1.jsx)(ColorPicker_1.ColorPicker, { api: this.props.api, value: range.Color, onChange: (color) => {
105
+ // Columns: Min, Max, Colour, [Reverse Gradient], Delete. Using one shared
106
+ // grid (rows are `display: contents`) keeps every band's cells aligned and
107
+ // spacing uniform via grid gaps, even with a single row.
108
+ const rangeGridTemplateColumns = [
109
+ 'max-content',
110
+ 'max-content',
111
+ 'max-content',
112
+ ...(this.props.showRangeDirection ? ['max-content'] : []),
113
+ 'max-content',
114
+ ].join(' ');
115
+ const renderRangesContent = () => ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [isRangeValueTypeNumber ? ((0, jsx_runtime_1.jsxs)(HelpBlock_1.default, { className: "twa:my-2 twa:text-3", children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { children: "Define value bands from low to high, each with its own colour." }), (0, jsx_runtime_1.jsxs)(Flex_1.Box, { children: ["Tick ", (0, jsx_runtime_1.jsx)("strong", { children: "Use column min" }), " or ", (0, jsx_runtime_1.jsx)("strong", { children: "Use column max" }), " to anchor the first and last band to the column's actual lowest and highest values."] })] })) : ((0, jsx_runtime_1.jsxs)(HelpBlock_1.default, { className: "twa:my-2 twa:text-3", children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { children: "Define bands as percentages (0\u2013100) of the column's value range." }), (0, jsx_runtime_1.jsxs)(Flex_1.Box, { children: [(0, jsx_runtime_1.jsx)("strong", { children: "0%" }), " is the column's lowest value and ", (0, jsx_runtime_1.jsx)("strong", { children: "100%" }), " its highest; each band gets its own colour."] })] })), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:grid twa:items-end twa:gap-x-2 twa:gap-y-3 twa:mb-3 twa:w-fit", style: { gridTemplateColumns: rangeGridTemplateColumns }, children: this.props.ranges?.map((range, index, list) => ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:contents", "data-name": "percent-bar-range", children: [(0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "column", children: [isRangeValueTypeNumber && index === 0 && ((0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { onClick: () => this.setRangeColMin(range), checked: range.Min === 'Col-Min', className: "twa:mt-0 twa:mb-1 twa:text-3", disabled: this.props.disabled, children: "Use column min" })), (0, jsx_runtime_1.jsx)(NumberInput_1.NumberInput, { disabled: this.props.disabled ||
116
+ range.Min === 'Col-Min' ||
117
+ (index === 0 && !isRangeValueTypeNumber), value: range.Min === 'Col-Min'
118
+ ? this.props.minMaxRangeValues?.min ?? ''
119
+ : range.Min, onChange: (value) => {
120
+ this.changeRangeMin(index, value);
121
+ } })] }), (0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "column", children: [isRangeValueTypeNumber && index === list.length - 1 && ((0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { className: "twa:mt-0 twa:mb-1 twa:text-3", onClick: () => this.setRangeColMax(range), checked: range.Max === 'Col-Max', disabled: this.props.disabled, children: "Use column max" })), (0, jsx_runtime_1.jsx)(NumberInput_1.NumberInput, { value: range.Max === 'Col-Max'
122
+ ? this.props.minMaxRangeValues?.max ?? ''
123
+ : range.Max, disabled: this.props.disabled ||
124
+ range.Max === 'Col-Max' ||
125
+ (index === list.length - 1 && !isRangeValueTypeNumber), onChange: (value) => {
126
+ this.changeRangeMax(index, value);
127
+ } })] }), (0, jsx_runtime_1.jsx)(ColorPicker_1.ColorPicker, { api: this.props.api, value: range.Color, onChange: (color) => {
88
128
  this.changeRangeColor(index, color);
89
- }, className: "twa:mr-2 twa:h-[33px]" }) }), this.props.showRangeDirection && ((0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { disabled: this.props.disabled, checked: !!range.ReverseGradient, onChange: (checked) => this.changeRangeDirectionUp(index, checked), className: "twa:ml-2", children: "Reverse Gradient" })), (0, jsx_runtime_1.jsx)(SimpleButton_1.default, { className: "twa:ml-2 twa:mb-1", icon: "delete", disabled: this.props.disabled ||
90
- (!this.props.allowEmptyRanges &&
91
- !!this.props.ranges &&
92
- this.props.ranges.length === 1), onClick: () => this.removeRange(index) })] }, index))), (0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(SimpleButton_1.default, { disabled: this.props.disabled, variant: "raised", "data-name": "add", onClick: () => this.addRange(), children: "Add New Range" }) })] }));
129
+ }, className: "twa:h-[33px] twa:pl-2" }), this.props.showRangeDirection && ((0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { disabled: this.props.disabled, checked: !!range.ReverseGradient, onChange: (checked) => this.changeRangeDirectionUp(index, checked), children: "Reverse Gradient" })), (0, jsx_runtime_1.jsx)(SimpleButton_1.default, { icon: "delete", disabled: this.props.disabled ||
130
+ (!this.props.allowEmptyRanges &&
131
+ !!this.props.ranges &&
132
+ this.props.ranges.length === 1), onClick: () => this.removeRange(index) })] }, index))) }), (0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(ButtonNew_1.ButtonNew, { disabled: this.props.disabled, dataName: "add-range", onClick: () => this.addRange(), children: "Add Range" }) })] }));
93
133
  const renderZeroCentredContent = () => {
94
134
  const zc = this.props.zeroCentred ?? DEFAULT_ZERO_CENTRED_COLORS;
95
135
  const apply = (next) => this.props.onApplyZeroCentred?.(next);
96
- return ((0, jsx_runtime_1.jsx)(Flex_1.Flex, { flexDirection: "column", "data-name": "zero-centred-ranges", children: (0, jsx_runtime_1.jsxs)(FormLayout_1.default, { columns: ['label', 'colour'], sizes: ['200px', '1fr'], className: "twa:ml-2", children: [(0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Negative (Col-Min \u2192 0):", children: (0, jsx_runtime_1.jsx)(Flex_1.Flex, { alignItems: "center", className: "twa:ml-2", children: (0, jsx_runtime_1.jsx)(ColorPicker_1.ColorPicker, { disabled: this.props.disabled, api: this.props.api, value: zc.NegativeColor, onChange: (color) => apply({ ...zc, NegativeColor: color }) }) }) }), (0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Positive (0 \u2192 Col-Max):", children: (0, jsx_runtime_1.jsx)(Flex_1.Flex, { alignItems: "center", className: "twa:ml-2", children: (0, jsx_runtime_1.jsx)(ColorPicker_1.ColorPicker, { disabled: this.props.disabled, api: this.props.api, value: zc.PositiveColor, onChange: (color) => apply({ ...zc, PositiveColor: color }) }) }) })] }) }));
136
+ const minLabel = this.props.minMaxRangeValues != null ? this.props.minMaxRangeValues.min : 'column min';
137
+ const maxLabel = this.props.minMaxRangeValues != null ? this.props.minMaxRangeValues.max : 'column max';
138
+ return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "column", "data-name": "zero-centred-ranges", children: [(0, jsx_runtime_1.jsxs)(HelpBlock_1.default, { className: "twa:my-2 twa:text-3", children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { children: "Colour cells on a diverging scale centred at zero." }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { children: "Negative values shade toward the column minimum, positive values toward the maximum \u2014 deeper as they move away from 0." })] }), (0, jsx_runtime_1.jsxs)(FormLayout_1.default, { columns: ['label', 'colour'], sizes: ['200px', '1fr'], className: "twa:ml-2", children: [(0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: `Negative (${minLabel} → 0):`, children: (0, jsx_runtime_1.jsx)(Flex_1.Flex, { alignItems: "center", className: "twa:ml-2", children: (0, jsx_runtime_1.jsx)(ColorPicker_1.ColorPicker, { disabled: this.props.disabled, api: this.props.api, value: zc.NegativeColor, onChange: (color) => apply({ ...zc, NegativeColor: color }) }) }) }), (0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: `Positive (0 → ${maxLabel}):`, children: (0, jsx_runtime_1.jsx)(Flex_1.Flex, { alignItems: "center", className: "twa:ml-2", children: (0, jsx_runtime_1.jsx)(ColorPicker_1.ColorPicker, { disabled: this.props.disabled, api: this.props.api, value: zc.PositiveColor, onChange: (color) => apply({ ...zc, PositiveColor: color }) }) }) })] })] }));
97
139
  };
98
- const renderColumnComparisonContent = () => ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "column", "data-name": "percent-bar-column-comparison", children: [(0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:p-2 twa:text-2", children: ["Create Minimum and Maximum Values by providing a value or selecting another Column, and choose a ", this.props.api.internalApi.getCorrectEnglishVariant('Colour'), " for the Bar."] }), (0, jsx_runtime_1.jsxs)(FormLayout_1.default, { columns: ['label', 'first', 'or', 'second'], sizes: ['auto', 'auto', 'auto', '1fr'], children: [(0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Min Value:", first: (0, jsx_runtime_1.jsx)(NumberInput_1.NumberInput, { disabled: this.props.disabled, type: "number", value: comparisonMinValueNumber, onChange: (value) => {
99
- this.changeColumnComparisonMinValue(value);
100
- } }), or: "OR", second: (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:max-w-[15rem]", children: (0, jsx_runtime_1.jsx)(ColumnSelector_1.ColumnSelector, { disabled: this.props.disabled, value: comparisonMinValueColumnId, type: "number", onChange: (columnId) => {
101
- this.onMinColumnSelectedChanged(columnId);
102
- } }) }) }), ' ', (0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Max Value:", first: (0, jsx_runtime_1.jsx)(NumberInput_1.NumberInput, { disabled: this.props.disabled, type: "number", value: comparisonMaxValueNumber, onChange: (value) => {
103
- this.changeColumnComparisonMaxValue(value);
104
- } }), or: "OR", second: (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:max-w-[15rem]", children: (0, jsx_runtime_1.jsx)(ColumnSelector_1.ColumnSelector, { disabled: this.props.disabled, value: comparisonMaxValueColumnId, type: "number", onChange: (columnId) => this.onMaxColumnSelectedChanged(columnId) }) }) }), (0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: `Bar ${this.props.api.internalApi.getCorrectEnglishVariant('Colour')}`, first: (0, jsx_runtime_1.jsx)(ColorPicker_1.ColorPicker, { disabled: this.props.disabled, api: this.props.api, value: comparisonColor, onChange: (color) => {
140
+ const describeBound = (bound) => {
141
+ if (bound == null || bound === '') {
142
+ return (0, jsx_runtime_1.jsx)("em", { children: "not set" });
143
+ }
144
+ if (!isNaN(Number(bound))) {
145
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("strong", { children: Number(bound) }), " ", (0, jsx_runtime_1.jsx)("span", { className: "twa:opacity-60", children: "(fixed)" })] }));
146
+ }
147
+ const friendlyName = this.props.api.columnApi.getFriendlyNameForColumnId(String(bound));
148
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("strong", { children: friendlyName }), " ", (0, jsx_runtime_1.jsx)("span", { className: "twa:opacity-60", children: "(per row)" })] }));
149
+ };
150
+ const renderColumnComparisonContent = () => ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "column", "data-name": "percent-bar-column-comparison", children: [(0, jsx_runtime_1.jsxs)(HelpBlock_1.default, { className: "twa:my-2 twa:text-3", children: [(0, jsx_runtime_1.jsxs)(Flex_1.Box, { children: ["Scale each cell's bar between a ", (0, jsx_runtime_1.jsx)("strong", { children: "Minimum" }), " and a", ' ', (0, jsx_runtime_1.jsx)("strong", { children: "Maximum" }), "."] }), (0, jsx_runtime_1.jsxs)(Flex_1.Box, { children: ["Set each to a fixed ", (0, jsx_runtime_1.jsx)("strong", { children: "Value" }), " (same for all rows) or a", ' ', (0, jsx_runtime_1.jsx)("strong", { children: "Column" }), " (read from that column on each row)."] })] }), (0, jsx_runtime_1.jsxs)(FormLayout_1.default, { columns: ['label', 'first'], sizes: ['auto', '1fr'], children: [(0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Minimum:", first: (0, jsx_runtime_1.jsx)(ColumnComparisonBoundInput, { disabled: this.props.disabled, value: this.props.columnComparison?.MinValue, onChange: (value) => this.setColumnComparisonMin(value) }) }), (0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Maximum:", first: (0, jsx_runtime_1.jsx)(ColumnComparisonBoundInput, { disabled: this.props.disabled, value: this.props.columnComparison?.MaxValue, onChange: (value) => this.setColumnComparisonMax(value) }) }), (0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: `Bar ${this.props.api.internalApi.getCorrectEnglishVariant('Colour')}`, first: (0, jsx_runtime_1.jsx)(ColorPicker_1.ColorPicker, { disabled: this.props.disabled, api: this.props.api, value: comparisonColor, onChange: (color) => {
105
151
  this.changeColumnComparisonColor(color);
106
- } }) })] })] }, 'cc'));
152
+ } }) })] }), (0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:mt-2 twa:p-2 twa:text-3 twa:opacity-80", "data-name": "cc-summary", children: ["Each row's bar runs from ", describeBound(this.props.columnComparison?.MinValue), " to", ' ', describeBound(this.props.columnComparison?.MaxValue), "."] })] }, 'cc'));
107
153
  const tabFlex = { flex: 1 };
108
154
  const radioCls = 'twa:m-0 twa:align-baseline';
109
155
  const renderTabRadio = (label, value) => ((0, jsx_runtime_1.jsx)(Radio_1.default, { tabIndex: -1, className: radioCls, checked: this.state.rangesType === value, children: label }));
@@ -128,8 +174,7 @@ class RangesComponent extends React.Component {
128
174
  // tab — keep the active tab in sync. We deliberately do NOT react when the
129
175
  // user is on Zero Centred / Column Comparison tabs (parent code can still
130
176
  // set RangeValueType: 'Number' as part of those flows).
131
- if ((this.state.rangesType === 'NumberRange' ||
132
- this.state.rangesType === 'PercentageRange') &&
177
+ if ((this.state.rangesType === 'NumberRange' || this.state.rangesType === 'PercentageRange') &&
133
178
  prevProps.rangeValueType !== this.props.rangeValueType) {
134
179
  this.setState({
135
180
  rangesType: this.props.rangeValueType === 'Percentage' ? 'PercentageRange' : 'NumberRange',
@@ -227,9 +272,7 @@ class RangesComponent extends React.Component {
227
272
  setRangeColMin(range) {
228
273
  const newRanges = this.props.ranges.map((rangeItem) => {
229
274
  if (rangeItem === range) {
230
- let newMin = rangeItem.Min === 'Col-Min'
231
- ? (this.props.minMaxRangeValues?.min ?? 0)
232
- : 'Col-Min';
275
+ let newMin = rangeItem.Min === 'Col-Min' ? this.props.minMaxRangeValues?.min ?? 0 : 'Col-Min';
233
276
  return {
234
277
  ...rangeItem,
235
278
  Min: newMin,
@@ -255,7 +298,7 @@ class RangesComponent extends React.Component {
255
298
  addRange() {
256
299
  // Most callers seed `ranges` with at least one entry, but Range Bar
257
300
  // legitimately leaves `CellRanges` undefined (bands are optional). Handle
258
- // both cases so the "Add New Range" button always works.
301
+ // both cases so the "Add Range" button always works.
259
302
  //
260
303
  // When starting from empty we seed TWO bands split at the midpoint — a
261
304
  // single full-width band would just look like a back colour and wouldn't
@@ -347,25 +390,11 @@ class RangesComponent extends React.Component {
347
390
  { Min: mid, Max: 'Col-Max', Color: (0, UIHelper_1.getGraySwatchColor)() },
348
391
  ];
349
392
  }
350
- changeColumnComparisonMinValue(value) {
351
- const { columnComparison } = this.props;
352
- columnComparison.MinValue = value;
353
- this.props.updateColumnComparison(columnComparison);
354
- }
355
- onMinColumnSelectedChanged(columnId) {
356
- const { columnComparison } = this.props;
357
- columnComparison.MinValue = columnId || undefined;
358
- this.props.updateColumnComparison(columnComparison);
393
+ setColumnComparisonMin(value) {
394
+ this.props.updateColumnComparison({ ...this.props.columnComparison, MinValue: value });
359
395
  }
360
- changeColumnComparisonMaxValue(value) {
361
- const { columnComparison } = this.props;
362
- columnComparison.MaxValue = value;
363
- this.props.updateColumnComparison(columnComparison);
364
- }
365
- onMaxColumnSelectedChanged(columnId) {
366
- const { columnComparison } = this.props;
367
- columnComparison.MaxValue = columnId || undefined;
368
- this.props.updateColumnComparison(columnComparison);
396
+ setColumnComparisonMax(value) {
397
+ this.props.updateColumnComparison({ ...this.props.columnComparison, MaxValue: value });
369
398
  }
370
399
  changeColumnComparisonColor(value) {
371
400
  const { columnComparison } = this.props;
@@ -1,12 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ReorderDraggable = ReorderDraggable;
4
- const tslib_1 = require("tslib");
5
4
  const jsx_runtime_1 = require("react/jsx-runtime");
6
5
  const dnd_1 = require("../../../components/dnd");
7
6
  const icons_1 = require("../../../components/icons");
8
7
  const Flex_1 = require("../../../components/Flex");
9
- const clsx_1 = tslib_1.__importDefault(require("clsx"));
8
+ const utils_1 = require("../../../lib/utils");
10
9
  function ReorderDraggable(props) {
11
10
  const { onChange, order, toIdentifier, isOptionDraggable, disabled } = props;
12
11
  const baseClassName = 'ab-ReorderDraggable';
@@ -19,7 +18,7 @@ function ReorderDraggable(props) {
19
18
  const reorderable = isOptionDraggable ? isOptionDraggable(option) : true;
20
19
  return ((0, jsx_runtime_1.jsx)(dnd_1.DragList.DraggableItem, { id: `${identifier}`, children: (itemDomProps, itemContext) => {
21
20
  const { onPointerDown, ...restDomProps } = itemDomProps;
22
- return ((0, jsx_runtime_1.jsx)(Flex_1.Flex, { alignItems: "center", "data-index": index, "data-id": identifier, "data-name": "option", ...restDomProps, className: (0, clsx_1.default)(`${baseClassName}__option`, index ? 'twa:mt-1' : 'twa:mt-0', 'twa:bg-primary twa:p-2', itemContext.active ? 'twa:shadow-md' : '', restDomProps.className, props.optionClassName?.(option)), onClick: (e) => props.onOptionClick?.(option, e), children: (0, jsx_runtime_1.jsxs)(Flex_1.Flex, { className: "twa:flex-1", flexDirection: "row", alignItems: "center", children: [reorderable && !disabled ? ((0, jsx_runtime_1.jsx)(Flex_1.Box, { onPointerDown: onPointerDown, className: "twa:mr-3", children: (0, jsx_runtime_1.jsx)(icons_1.Icon, { name: "drag", style: { cursor: 'grab' } }) })) : ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:mr-3", children: (0, jsx_runtime_1.jsx)(icons_1.Icon, { name: "drag", style: { cursor: 'not-allowed', opacity: 0.3 } }) })), props.renderOption(option, index)] }) }));
21
+ return ((0, jsx_runtime_1.jsx)(Flex_1.Flex, { alignItems: "center", "data-index": index, "data-id": identifier, "data-name": "option", ...restDomProps, className: (0, utils_1.cn)(`${baseClassName}__option`, 'ab-DraggableListItem', index ? 'twa:mt-0.5' : 'twa:mt-0', 'twa:py-1 twa:px-1.5', itemContext.active ? 'twa:shadow-md' : '', restDomProps.className, props.optionClassName?.(option)), onClick: (e) => props.onOptionClick?.(option, e), children: (0, jsx_runtime_1.jsxs)(Flex_1.Flex, { className: "twa:flex-1", flexDirection: "row", alignItems: "center", children: [reorderable && !disabled ? ((0, jsx_runtime_1.jsx)(Flex_1.Box, { onPointerDown: onPointerDown, className: "twa:mr-2", children: (0, jsx_runtime_1.jsx)(icons_1.Icon, { name: "drag", style: { cursor: 'grab' } }) })) : ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:mr-2", children: (0, jsx_runtime_1.jsx)(icons_1.Icon, { name: "drag", style: { cursor: 'not-allowed', opacity: 0.3 } }) })), props.renderOption(option, index)] }) }));
23
22
  } }, identifier));
24
23
  }) })) }) }) }) }));
25
24
  }
@@ -1,6 +1,5 @@
1
1
  import * as React from 'react';
2
2
  import { AdaptableColumn } from '../../../AdaptableState/Common/AdaptableColumn';
3
- import { DropdownButtonProps } from '../../../components/DropdownButton';
4
3
  import { AdaptableApi } from '../../../Api/AdaptableApi';
5
4
  import { GridCell } from '../../../types';
6
5
  export interface BulkUpdateValueSelectorProps {
@@ -12,7 +11,6 @@ export interface BulkUpdateValueSelectorProps {
12
11
  style?: React.CSSProperties;
13
12
  newLabel?: string;
14
13
  existingLabel?: string;
15
- dropdownButtonProps?: DropdownButtonProps;
16
14
  selectedGridCells: GridCell[];
17
15
  disabled?: boolean;
18
16
  className?: string;
@@ -9,11 +9,11 @@ const UIHelper_1 = tslib_1.__importDefault(require("../../UIHelper"));
9
9
  const AdaptableInput_1 = tslib_1.__importDefault(require("../AdaptableInput"));
10
10
  const PermittedValuesSelector_1 = require("./PermittedValuesSelector");
11
11
  const AdaptableContext_1 = require("../../AdaptableContext");
12
- const clsx_1 = tslib_1.__importDefault(require("clsx"));
13
12
  const Flex_1 = require("../../../components/Flex");
14
13
  const icons_1 = require("../../../components/icons");
15
14
  const InputGroup_1 = require("../../../components/InputGroup");
16
- const NewDropdownButton_1 = require("../../../components/NewDropdownButton");
15
+ const DropdownButton_1 = require("../../../components/DropdownButton");
16
+ const utils_1 = require("../../../lib/utils");
17
17
  const BulkUpdateValueSelector = (props) => {
18
18
  const [valueType, setValueType] = React.useState('existing');
19
19
  const adaptable = (0, AdaptableContext_1.useAdaptable)();
@@ -46,7 +46,7 @@ const BulkUpdateValueSelector = (props) => {
46
46
  : 'Enter Value', autoFocus: true, disabled: props.disabled, className: "twa:w-full", value: props.selectedColumnValue, onChange: (e) => {
47
47
  props.onColumnValueChange(e.target.value);
48
48
  } }));
49
- return ((0, jsx_runtime_1.jsx)(Flex_1.Flex, { className: (0, clsx_1.default)('twa:overflow-visible twa:max-w-full', props.className), style: props.style, children: isDateType ? ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsxs)(InputGroup_1.InputGroup, { Component: Flex_1.Flex, "data-id": "bulk-update-input-wrapper", className: "twa:w-full twa:gap-0.5", children: [(0, jsx_runtime_1.jsx)(NewDropdownButton_1.NewDropdownButton, { "aria-label": "Bulk Update Value Selector", "data-id": "bulk-update-value-type-selector", "data-value": valueType, variant: "outlined", items: [
49
+ return ((0, jsx_runtime_1.jsx)(Flex_1.Flex, { className: (0, utils_1.cn)('twa:overflow-visible twa:max-w-full', props.className), style: props.style, children: isDateType ? ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsxs)(InputGroup_1.InputGroup, { Component: Flex_1.Flex, "data-id": "bulk-update-input-wrapper", className: "twa:w-full twa:gap-0.5", children: [(0, jsx_runtime_1.jsx)(DropdownButton_1.NewDropdownButton, { "aria-label": "Bulk Update Value Selector", "data-id": "bulk-update-value-type-selector", "data-value": valueType, variant: "outlined", items: [
50
50
  { label: 'New', icon: (0, jsx_runtime_1.jsx)(icons_1.Icon, { name: "edit" }), onClick: () => setValueType('new') },
51
51
  {
52
52
  label: 'Existing',