@adaptabletools/adaptable 24.0.0-canary.0 → 24.0.0-canary.10

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 (393) hide show
  1. package/agGrid.d.ts +2 -3
  2. package/agGrid.js +2 -3
  3. package/aql.d.ts +132 -0
  4. package/aql.js +260 -0
  5. package/devtools.d.ts +237 -2
  6. package/index.css +323 -306
  7. package/index.d.ts +2 -3
  8. package/index.js +2 -3
  9. package/package.json +8 -7
  10. package/src/AdaptableInterfaces/IAdaptable.d.ts +4 -4
  11. package/src/AdaptableOptions/ActionColumnOptions.d.ts +24 -0
  12. package/src/AdaptableOptions/AdaptableOptions.d.ts +97 -69
  13. package/src/AdaptableOptions/AdaptablePlugin.d.ts +113 -1
  14. package/src/AdaptableOptions/AlertOptions.d.ts +0 -2
  15. package/src/AdaptableOptions/ChartingOptions.d.ts +11 -5
  16. package/src/AdaptableOptions/ColumnMenuOptions.d.ts +30 -0
  17. package/src/AdaptableOptions/ColumnOptions.d.ts +0 -2
  18. package/src/AdaptableOptions/CommentOptions.d.ts +12 -4
  19. package/src/AdaptableOptions/ContextMenuOptions.d.ts +31 -1
  20. package/src/AdaptableOptions/DashboardOptions.d.ts +0 -3
  21. package/src/AdaptableOptions/DataChangeHistoryOptions.d.ts +3 -2
  22. package/src/AdaptableOptions/DefaultAdaptableOptions.js +11 -5
  23. package/src/AdaptableOptions/EditOptions.d.ts +18 -2
  24. package/src/AdaptableOptions/ExportOptions.d.ts +23 -0
  25. package/src/AdaptableOptions/ExpressionOptions.d.ts +0 -3
  26. package/src/AdaptableOptions/Fdc3Options.d.ts +77 -3
  27. package/src/AdaptableOptions/FilterOptions.d.ts +13 -8
  28. package/src/AdaptableOptions/FlashingCellOptions.d.ts +3 -3
  29. package/src/AdaptableOptions/LayoutOptions.d.ts +16 -3
  30. package/src/AdaptableOptions/NotificationsOptions.d.ts +0 -1
  31. package/src/AdaptableOptions/QuickSearchOptions.d.ts +0 -2
  32. package/src/AdaptableOptions/RowFormOptions.d.ts +9 -0
  33. package/src/AdaptableOptions/SettingsPanelOptions.d.ts +16 -5
  34. package/src/AdaptableOptions/StateOptions.d.ts +37 -13
  35. package/src/AdaptableOptions/ToolPanelOptions.d.ts +0 -1
  36. package/src/AdaptableOptions/UserInterfaceOptions.d.ts +89 -6
  37. package/src/AdaptableState/AdaptableState.d.ts +99 -3
  38. package/src/AdaptableState/AlertState.d.ts +20 -21
  39. package/src/AdaptableState/ApplicationState.d.ts +5 -3
  40. package/src/AdaptableState/BaseState.d.ts +9 -2
  41. package/src/AdaptableState/CalculatedColumnState.d.ts +10 -8
  42. package/src/AdaptableState/ChartingState.d.ts +10 -5
  43. package/src/AdaptableState/CommentState.d.ts +10 -4
  44. package/src/AdaptableState/Common/AdaptableAlert.d.ts +21 -2
  45. package/src/AdaptableState/Common/AdaptableAlert.js +9 -0
  46. package/src/AdaptableState/Common/AdaptableButton.d.ts +3 -1
  47. package/src/AdaptableState/Common/AdaptableColumn.d.ts +38 -1
  48. package/src/AdaptableState/Common/AdaptableFilterState.d.ts +3 -1
  49. package/src/AdaptableState/Common/AdaptableFlashingCell.d.ts +3 -1
  50. package/src/AdaptableState/Common/AdaptableForm.d.ts +9 -0
  51. package/src/AdaptableState/Common/AdaptableFormat.d.ts +27 -1
  52. package/src/AdaptableState/Common/AdaptableIcon.d.ts +4 -2
  53. package/src/AdaptableState/Common/AdaptableObject.d.ts +9 -1
  54. package/src/AdaptableState/Common/AdaptableQuery.d.ts +9 -0
  55. package/src/AdaptableState/Common/AdaptableStyle.d.ts +6 -8
  56. package/src/AdaptableState/Common/AggregationColumns.d.ts +15 -6
  57. package/src/AdaptableState/Common/ButtonStyle.d.ts +3 -1
  58. package/src/AdaptableState/Common/CellDataChangedInfo.d.ts +6 -2
  59. package/src/AdaptableState/Common/CellHighlightInfo.d.ts +4 -2
  60. package/src/AdaptableState/Common/CellSummary.d.ts +33 -0
  61. package/src/AdaptableState/Common/ColumnFilter.d.ts +3 -1
  62. package/src/AdaptableState/Common/ColumnHighlightInfo.d.ts +4 -2
  63. package/src/AdaptableState/Common/ColumnScope.d.ts +32 -1
  64. package/src/AdaptableState/Common/ColumnSetupInfo.d.ts +17 -0
  65. package/src/AdaptableState/Common/ColumnSort.d.ts +3 -1
  66. package/src/AdaptableState/Common/CompactCalculatedColumnEditorInfo.d.ts +3 -0
  67. package/src/AdaptableState/Common/DataChangedScope.d.ts +3 -1
  68. package/src/AdaptableState/Common/DataUpdateConfig.d.ts +3 -1
  69. package/src/AdaptableState/Common/Entitlement.d.ts +4 -2
  70. package/src/AdaptableState/Common/Enums.d.ts +21 -0
  71. package/src/AdaptableState/Common/ExtendedLayout.d.ts +3 -1
  72. package/src/AdaptableState/Common/Fdc3Context.d.ts +9 -0
  73. package/src/AdaptableState/Common/Fdc3Intent.d.ts +6 -0
  74. package/src/AdaptableState/Common/GridFilter.d.ts +3 -1
  75. package/src/AdaptableState/Common/MenuItem.d.ts +9 -0
  76. package/src/AdaptableState/Common/RowHighlightInfo.d.ts +4 -2
  77. package/src/AdaptableState/Common/RowScope.d.ts +3 -1
  78. package/src/AdaptableState/Common/RowSummary.d.ts +14 -4
  79. package/src/AdaptableState/Common/RowsHighlightInfo.d.ts +5 -3
  80. package/src/AdaptableState/Common/Schedule.d.ts +10 -2
  81. package/src/AdaptableState/Common/SpecialColumnSettings.d.ts +3 -1
  82. package/src/AdaptableState/Common/SystemStatusMessageInfo.d.ts +4 -2
  83. package/src/AdaptableState/Common/TransposeConfig.d.ts +1 -1
  84. package/src/AdaptableState/Common/Types.d.ts +9 -0
  85. package/src/AdaptableState/CustomSortState.d.ts +8 -5
  86. package/src/AdaptableState/DashboardState.d.ts +14 -10
  87. package/src/AdaptableState/ExportState.d.ts +12 -4
  88. package/src/AdaptableState/FlashingCellState.d.ts +8 -5
  89. package/src/AdaptableState/FormatColumnState.d.ts +28 -8
  90. package/src/AdaptableState/FreeTextColumnState.d.ts +14 -8
  91. package/src/AdaptableState/IPushPullState.d.ts +39 -3
  92. package/src/AdaptableState/InitialState.d.ts +9 -9
  93. package/src/AdaptableState/InternalState.d.ts +183 -3
  94. package/src/AdaptableState/LayoutState.d.ts +64 -21
  95. package/src/AdaptableState/NamedQueryState.d.ts +16 -4
  96. package/src/AdaptableState/NoteState.d.ts +7 -3
  97. package/src/AdaptableState/OpenFinState.d.ts +12 -2
  98. package/src/AdaptableState/PlusMinusState.d.ts +8 -4
  99. package/src/AdaptableState/PopupState.d.ts +29 -1
  100. package/src/AdaptableState/QuickSearchState.d.ts +9 -3
  101. package/src/AdaptableState/Selection/GridCell.d.ts +5 -3
  102. package/src/AdaptableState/Selection/GridCellRange.d.ts +8 -7
  103. package/src/AdaptableState/Selection/SelectedCellInfo.d.ts +1 -1
  104. package/src/AdaptableState/ShortcutState.d.ts +7 -3
  105. package/src/AdaptableState/StatusBarState.d.ts +7 -6
  106. package/src/AdaptableState/StyledColumnState.d.ts +46 -14
  107. package/src/AdaptableState/StyledColumns/GradientStyle.d.ts +4 -0
  108. package/src/AdaptableState/TeamSharingState.d.ts +46 -2
  109. package/src/AdaptableState/ThemeState.d.ts +24 -2
  110. package/src/AdaptableState/ToolPanelState.d.ts +10 -5
  111. package/src/AdaptableState/UserInterfaceState.d.ts +2 -2
  112. package/src/AdaptableState/Uuid.d.ts +6 -0
  113. package/src/Api/ActionColumnApi.d.ts +3 -1
  114. package/src/Api/AdaptableApi.d.ts +54 -50
  115. package/src/Api/AlertApi.d.ts +20 -12
  116. package/src/Api/ApplicationApi.d.ts +6 -2
  117. package/src/Api/BulkUpdateApi.d.ts +2 -1
  118. package/src/Api/CalculatedColumnApi.d.ts +4 -1
  119. package/src/Api/CalendarApi.d.ts +10 -0
  120. package/src/Api/CellSummaryApi.d.ts +9 -3
  121. package/src/Api/ChartingApi.d.ts +22 -7
  122. package/src/Api/ColumnApi.d.ts +71 -4
  123. package/src/Api/ColumnFilterApi.d.ts +13 -3
  124. package/src/Api/ColumnMenuApi.d.ts +13 -2
  125. package/src/Api/ColumnScopeApi.d.ts +27 -1
  126. package/src/Api/CommentApi.d.ts +10 -7
  127. package/src/Api/ContextMenuApi.d.ts +11 -1
  128. package/src/Api/CustomSortApi.d.ts +6 -2
  129. package/src/Api/DashboardApi.d.ts +30 -9
  130. package/src/Api/DataChangeHistoryApi.d.ts +9 -3
  131. package/src/Api/DataImportApi.d.ts +1 -1
  132. package/src/Api/EntitlementApi.d.ts +6 -1
  133. package/src/Api/EventApi.d.ts +67 -19
  134. package/src/Api/Events/AdaptableReady.d.ts +6 -2
  135. package/src/Api/Events/AdaptableStateChanged.d.ts +9 -5
  136. package/src/Api/Events/AdaptableStateReloaded.d.ts +7 -3
  137. package/src/Api/Events/AlertFired.d.ts +8 -2
  138. package/src/Api/Events/BeforeAdaptableStateChange.d.ts +6 -2
  139. package/src/Api/Events/CalculatedColumnChanged.d.ts +7 -3
  140. package/src/Api/Events/CellChanged.d.ts +6 -2
  141. package/src/Api/Events/CellSelectionChanged.d.ts +6 -2
  142. package/src/Api/Events/ChartChanged.d.ts +16 -8
  143. package/src/Api/Events/CommentChanged.d.ts +8 -2
  144. package/src/Api/Events/CustomToolbarConfigured.d.ts +6 -2
  145. package/src/Api/Events/DashboardChanged.d.ts +27 -6
  146. package/src/Api/Events/DataImported.d.ts +8 -4
  147. package/src/Api/Events/DataSetSelected.d.ts +6 -2
  148. package/src/Api/Events/Fdc3MessageInfo.d.ts +14 -4
  149. package/src/Api/Events/FlashingCellDisplayed.d.ts +6 -2
  150. package/src/Api/Events/GridFilterApplied.d.ts +11 -3
  151. package/src/Api/Events/GridSorted.d.ts +6 -2
  152. package/src/Api/Events/LayoutChanged.d.ts +41 -8
  153. package/src/Api/Events/LiveDataChanged.d.ts +21 -5
  154. package/src/Api/Events/NoteChanged.d.ts +5 -1
  155. package/src/Api/Events/ReportScheduleRan.d.ts +7 -3
  156. package/src/Api/Events/RowChanged.d.ts +6 -2
  157. package/src/Api/Events/RowFormSubmitted.d.ts +28 -12
  158. package/src/Api/Events/RowSelectionChanged.d.ts +6 -2
  159. package/src/Api/Events/SystemStatusMessageDisplayed.d.ts +6 -2
  160. package/src/Api/Events/TeamSharingEntityChanged.d.ts +6 -2
  161. package/src/Api/Events/ThemeSelected.d.ts +6 -2
  162. package/src/Api/ExportApi.d.ts +59 -32
  163. package/src/Api/ExpressionApi.d.ts +27 -16
  164. package/src/Api/Fdc3Api.d.ts +16 -3
  165. package/src/Api/FlashingCellApi.d.ts +6 -1
  166. package/src/Api/FormatColumnApi.d.ts +18 -11
  167. package/src/Api/FreeTextColumnApi.d.ts +4 -2
  168. package/src/Api/GridApi.d.ts +92 -19
  169. package/src/Api/IPushPullApi.d.ts +19 -2
  170. package/src/Api/Implementation/AlertApiImpl.d.ts +5 -5
  171. package/src/Api/Implementation/AlertApiImpl.js +26 -19
  172. package/src/Api/Implementation/ColumnScopeApiImpl.js +3 -3
  173. package/src/Api/Implementation/ExpressionApiImpl.d.ts +1 -3
  174. package/src/Api/Implementation/ExpressionApiImpl.js +5 -6
  175. package/src/Api/Implementation/QuickSearchApiImpl.js +2 -2
  176. package/src/Api/Implementation/StateApiImpl.d.ts +1 -1
  177. package/src/Api/Implementation/StateApiImpl.js +4 -3
  178. package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +0 -1
  179. package/src/Api/Implementation/UserInterfaceApiImpl.js +9 -15
  180. package/src/Api/Internal/AdaptableInternalApi.d.ts +2 -2
  181. package/src/Api/Internal/AdaptableInternalApi.js +11 -7
  182. package/src/Api/Internal/AlertInternalApi.js +12 -7
  183. package/src/Api/Internal/CalculatedColumnInternalApi.js +1 -1
  184. package/src/Api/Internal/EventInternalApi.d.ts +2 -1
  185. package/src/Api/Internal/EventInternalApi.js +7 -0
  186. package/src/Api/Internal/StateInternalApi.d.ts +1 -1
  187. package/src/Api/Internal/StateInternalApi.js +6 -5
  188. package/src/Api/InteropioPluginApi.d.ts +2 -1
  189. package/src/Api/LayoutApi.d.ts +29 -15
  190. package/src/Api/NamedQueryApi.d.ts +10 -6
  191. package/src/Api/NoteApi.d.ts +15 -11
  192. package/src/Api/OpenFinApi.d.ts +8 -2
  193. package/src/Api/OptionsApi.d.ts +43 -1
  194. package/src/Api/PluginsApi.d.ts +6 -1
  195. package/src/Api/PlusMinusApi.d.ts +2 -1
  196. package/src/Api/QuickSearchApi.d.ts +6 -1
  197. package/src/Api/RowFormApi.d.ts +8 -7
  198. package/src/Api/ShortcutApi.d.ts +3 -1
  199. package/src/Api/SmartEditApi.d.ts +4 -1
  200. package/src/Api/StateApi.d.ts +32 -4
  201. package/src/Api/StatusBarApi.d.ts +2 -0
  202. package/src/Api/StyledColumnApi.d.ts +23 -12
  203. package/src/Api/SystemStatusApi.d.ts +18 -6
  204. package/src/Api/TeamSharingApi.d.ts +8 -1
  205. package/src/Api/ThemeApi.d.ts +17 -8
  206. package/src/Api/ToolPanelApi.d.ts +12 -7
  207. package/src/Api/UserInterfaceApi.d.ts +10 -5
  208. package/src/Redux/ActionsReducers/LayoutRedux.d.ts +3 -3
  209. package/src/Redux/ActionsReducers/QuickSearchRedux.d.ts +9 -4
  210. package/src/Redux/ActionsReducers/QuickSearchRedux.js +12 -7
  211. package/src/Redux/Store/AdaptableReduxLocalStorageEngine.d.ts +8 -0
  212. package/src/Redux/Store/AdaptableReduxLocalStorageEngine.js +12 -12
  213. package/src/Redux/Store/AdaptableStore.d.ts +8 -5
  214. package/src/Redux/Store/AdaptableStore.js +75 -41
  215. package/src/Redux/Store/Interface/IAdaptableStore.d.ts +5 -5
  216. package/src/Redux/Store/Interface/IStorageEngine.d.ts +4 -4
  217. package/src/Redux/Store/StateOptionsGuards.d.ts +58 -0
  218. package/src/Redux/Store/StateOptionsGuards.js +112 -0
  219. package/src/Redux/Store/isTransientReduxAction.d.ts +5 -0
  220. package/src/Redux/Store/isTransientReduxAction.js +19 -0
  221. package/src/Strategy/AlertModule.js +2 -2
  222. package/src/Strategy/FormatColumnModule.js +2 -2
  223. package/src/Utilities/Constants/DocumentationLinkConstants.d.ts +1 -0
  224. package/src/Utilities/Constants/DocumentationLinkConstants.js +1 -0
  225. package/src/Utilities/Constants/ReduxConstants.d.ts +2 -2
  226. package/src/Utilities/Constants/ReduxConstants.js +5 -5
  227. package/src/Utilities/Helpers/AlertTypeHelper.d.ts +1 -1
  228. package/src/Utilities/Helpers/SettingsPanelHelper.d.ts +14 -0
  229. package/src/Utilities/Helpers/SettingsPanelHelper.js +37 -1
  230. package/src/Utilities/Helpers/UIHelper.d.ts +12 -14
  231. package/src/Utilities/Helpers/UIHelper.js +12 -35
  232. package/src/Utilities/ObjectFactory.js +3 -3
  233. package/src/Utilities/Services/QueryLanguageService.js +0 -2
  234. package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.js +1 -1
  235. package/src/View/Components/Popups/AdaptablePopup/Navigation.js +9 -11
  236. package/src/View/Components/StyleComponent.js +2 -2
  237. package/src/View/Dashboard/Dashboard.d.ts +1 -1
  238. package/src/View/Dashboard/Dashboard.js +1 -1
  239. package/src/View/Dashboard/DashboardPopupSections.js +1 -1
  240. package/src/View/Filter/ColumnFilter/ColumnFilterNew.js +15 -11
  241. package/src/View/GridInfo/GridInfoPopup.js +62 -25
  242. package/src/View/QuickSearch/QuickSearchInput.js +1 -1
  243. package/src/View/QuickSearch/QuickSearchPopup.d.ts +1 -1
  244. package/src/View/QuickSearch/QuickSearchPopup.js +1 -1
  245. package/src/View/QuickSearch/Utilities/useQuickSearchDebounced.d.ts +2 -2
  246. package/src/View/StyledColumn/RangesComponent.js +13 -16
  247. package/src/View/StyledColumn/Wizard/BadgePillStyleEditor.d.ts +0 -2
  248. package/src/View/StyledColumn/Wizard/BadgePillStyleEditor.js +2 -2
  249. package/src/View/StyledColumn/Wizard/StyledColumnBadgeSection.js +2 -3
  250. package/src/View/StyledColumn/Wizard/StyledColumnSliceStyleEditors.d.ts +0 -3
  251. package/src/View/StyledColumn/Wizard/StyledColumnSliceStyleEditors.js +3 -3
  252. package/src/View/StyledColumn/Wizard/StyledColumnSparklineSettingsSection.js +7 -11
  253. package/src/View/StyledColumn/Wizard/StyledColumnWizardBulletSection.js +6 -6
  254. package/src/View/StyledColumn/Wizard/StyledColumnWizardGradientSection.js +2 -2
  255. package/src/View/StyledColumn/Wizard/StyledColumnWizardIconSection.js +2 -2
  256. package/src/View/StyledColumn/Wizard/StyledColumnWizardRangeBarSection.js +8 -8
  257. package/src/View/StyledColumn/Wizard/StyledColumnWizardRatingSection.js +4 -4
  258. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardRangesSection.js +2 -2
  259. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardStyleSection.js +4 -4
  260. package/src/View/Wizard/CollapsibleWizardCard.d.ts +3 -1
  261. package/src/View/Wizard/CollapsibleWizardCard.js +17 -9
  262. package/src/agGrid/Adaptable.d.ts +0 -12
  263. package/src/agGrid/Adaptable.js +0 -52
  264. package/src/agGrid/AdaptableAgGrid.d.ts +4 -4
  265. package/src/agGrid/AdaptableAgGrid.js +2 -0
  266. package/src/agGrid/AdaptableFrameworkComponent.d.ts +12 -0
  267. package/src/agGrid/AdaptableLogger.d.ts +74 -1
  268. package/src/agGrid/AgGridColumnAdapter.d.ts +1 -1
  269. package/src/agGrid/AgGridColumnAdapter.js +7 -5
  270. package/src/agGrid/editors/AdaptableDateEditor/index.d.ts +3 -0
  271. package/src/agGrid/editors/AdaptableNumberEditor/index.d.ts +3 -0
  272. package/src/agGrid/index.d.ts +1 -6
  273. package/src/agGrid/index.js +1 -3
  274. package/src/aql/ExpressionEvaluation.d.ts +27 -0
  275. package/src/aql/types.d.ts +22 -0
  276. package/src/components/ColorField/index.d.ts +13 -0
  277. package/src/components/ColorField/index.js +26 -0
  278. package/src/components/aql/CompactEditor/CompactEditor.js +1 -1
  279. package/src/components/aql/ExpressionEditor/BaseEditorInput.js +1 -1
  280. package/src/components/aql/ExpressionEditor/CompactExpressionToolbar.d.ts +5 -0
  281. package/src/components/aql/ExpressionEditor/CompactExpressionToolbar.js +12 -5
  282. package/src/components/aql/ExpressionEditor/ExpressionPreview.js +1 -1
  283. package/src/components/aql/ExpressionEditor/index.d.ts +3 -2
  284. package/src/components/aql/QueryBuilder/GroupEditor.js +1 -1
  285. package/src/components/aql/QueryBuilder/QueryBuilder.d.ts +5 -0
  286. package/src/components/aql/QueryBuilder/QueryBuilder.js +1 -1
  287. package/src/components/aql/QueryBuilder/QueryBuilderInputs.js +12 -2
  288. package/src/components/aql/QueryBuilder/context.d.ts +7 -0
  289. package/src/components/aql/QueryBuilder/context.js +3 -1
  290. package/src/env.js +2 -2
  291. package/src/layout-manager/src/normalizeLayoutModel.d.ts +1 -1
  292. package/src/layout-manager/src/simplifyLayoutModel.d.ts +1 -1
  293. package/src/migration/AdaptableUpgradeHelper.d.ts +7 -2
  294. package/src/migration/VersionUpgrade17.js +13 -8
  295. package/src/migration/VersionUpgrade24.d.ts +9 -0
  296. package/src/migration/VersionUpgrade24.js +27 -0
  297. package/src/migration/legacyAdaptableQuery.d.ts +29 -4
  298. package/src/setupDevTools.js +827 -111
  299. package/src/types.d.ts +2 -4
  300. package/tsconfig.esm.tsbuildinfo +1 -1
  301. package/upgrade.d.ts +1 -0
  302. package/upgrade.js +1 -0
  303. package/vendor/components/Button/index.d.ts +1 -1
  304. package/vendor/components/Button/index.d.ts.map +1 -1
  305. package/vendor/components/Button/index.js.map +1 -1
  306. package/vendor/components/CheckBox/index.d.ts +1 -1
  307. package/vendor/components/CheckBox/index.d.ts.map +1 -1
  308. package/vendor/components/CheckBox/index.js.map +1 -1
  309. package/vendor/components/ColorField/index.d.ts +53 -0
  310. package/vendor/components/ColorField/index.d.ts.map +1 -0
  311. package/vendor/components/ColorField/index.js +80 -0
  312. package/vendor/components/ColorField/index.js.map +1 -0
  313. package/vendor/components/ColorPicker/colorPickerTab.d.ts +4 -0
  314. package/vendor/components/ColorPicker/colorPickerTab.d.ts.map +1 -0
  315. package/vendor/components/ColorPicker/colorPickerTab.js +28 -0
  316. package/vendor/components/ColorPicker/colorPickerTab.js.map +1 -0
  317. package/vendor/components/ColorPicker/index.d.ts +98 -0
  318. package/vendor/components/ColorPicker/index.d.ts.map +1 -0
  319. package/vendor/components/ColorPicker/index.js +322 -0
  320. package/vendor/components/ColorPicker/index.js.map +1 -0
  321. package/vendor/components/ColorPicker/themeColors.d.ts +94 -0
  322. package/vendor/components/ColorPicker/themeColors.d.ts.map +1 -0
  323. package/vendor/components/ColorPicker/themeColors.js +240 -0
  324. package/vendor/components/ColorPicker/themeColors.js.map +1 -0
  325. package/vendor/components/Combobox/VirtualizedList.d.ts +1 -1
  326. package/vendor/components/Combobox/VirtualizedList.d.ts.map +1 -1
  327. package/vendor/components/Combobox/VirtualizedList.js.map +1 -1
  328. package/vendor/components/Combobox/comboboxUtils.d.ts +9 -0
  329. package/vendor/components/Combobox/comboboxUtils.d.ts.map +1 -1
  330. package/vendor/components/Combobox/comboboxUtils.js +41 -2
  331. package/vendor/components/Combobox/comboboxUtils.js.map +1 -1
  332. package/vendor/components/Combobox/index.d.ts +1 -1
  333. package/vendor/components/Combobox/index.d.ts.map +1 -1
  334. package/vendor/components/Combobox/index.js +14 -9
  335. package/vendor/components/Combobox/index.js.map +1 -1
  336. package/vendor/components/NumberInput/index.d.ts +51 -0
  337. package/vendor/components/NumberInput/index.d.ts.map +1 -0
  338. package/vendor/components/NumberInput/index.js +82 -0
  339. package/vendor/components/NumberInput/index.js.map +1 -0
  340. package/vendor/components/index.css +286 -24
  341. package/vendor/components/index.d.ts +6 -0
  342. package/vendor/components/index.d.ts.map +1 -1
  343. package/vendor/components/index.js +3 -0
  344. package/vendor/components/index.js.map +1 -1
  345. package/vendor/components/twMerge.d.ts +3 -2
  346. package/vendor/components/twMerge.d.ts.map +1 -1
  347. package/vendor/components/twMerge.js.map +1 -1
  348. package/vendor/components/ui/combobox.d.ts.map +1 -1
  349. package/vendor/components/ui/combobox.js +1 -1
  350. package/vendor/components/ui/combobox.js.map +1 -1
  351. package/vendor/components/ui/input-group.d.ts.map +1 -1
  352. package/vendor/components/ui/input-group.js +5 -4
  353. package/vendor/components/ui/input-group.js.map +1 -1
  354. package/src/AdaptableInterfaces/AdaptableNoCodeWizard.d.ts +0 -99
  355. package/src/AdaptableInterfaces/AdaptableNoCodeWizard.js +0 -1
  356. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/AdaptableConfig.d.ts +0 -15
  357. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/AdaptableConfig.js +0 -1
  358. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ColumnsList.d.ts +0 -19
  359. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ColumnsList.js +0 -337
  360. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/Components/FormBox.d.ts +0 -5
  361. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/Components/FormBox.js +0 -4
  362. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizard.d.ts +0 -30
  363. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizard.js +0 -162
  364. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizardColumnsStep.d.ts +0 -18
  365. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizardColumnsStep.js +0 -12
  366. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/EntitlementsForm.d.ts +0 -8
  367. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/EntitlementsForm.js +0 -131
  368. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/GridOptionsForm.d.ts +0 -8
  369. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/GridOptionsForm.js +0 -30
  370. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsSidebarForm.d.ts +0 -6
  371. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsSidebarForm.js +0 -80
  372. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsStatusbarForm.d.ts +0 -6
  373. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsStatusbarForm.js +0 -100
  374. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UiOptionsForm.d.ts +0 -11
  375. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UiOptionsForm.js +0 -8
  376. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/index.d.ts +0 -2
  377. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/index.js +0 -2
  378. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/useSelection.d.ts +0 -21
  379. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/useSelection.js +0 -63
  380. package/src/View/AdaptableWizardView/Utilities/Utils.d.ts +0 -1
  381. package/src/View/AdaptableWizardView/Utilities/Utils.js +0 -21
  382. package/src/View/AdaptableWizardView/Utilities/helper.d.ts +0 -19
  383. package/src/View/AdaptableWizardView/Utilities/helper.js +0 -81
  384. package/src/View/AdaptableWizardView/Wizard.d.ts +0 -57
  385. package/src/View/AdaptableWizardView/Wizard.js +0 -98
  386. package/src/View/AdaptableWizardView/index.d.ts +0 -4
  387. package/src/View/AdaptableWizardView/index.js +0 -4
  388. package/src/components/ColorPicker/ColorPicker.d.ts +0 -12
  389. package/src/components/ColorPicker/ColorPicker.js +0 -48
  390. package/src/components/ColorPicker/OptionalColorPicker.d.ts +0 -12
  391. package/src/components/ColorPicker/OptionalColorPicker.js +0 -13
  392. package/src/components/ColorPicker/index.d.ts +0 -2
  393. package/src/components/ColorPicker/index.js +0 -2
@@ -8,12 +8,14 @@ import { Tabs } from '../../components/Tabs';
8
8
  import { PopupPanel } from '../Components/Popups/AdaptablePopup/PopupPanel';
9
9
  import { AdaptableObjectsSummary } from './AdaptableObjectsSummary';
10
10
  import { getDefaultAdaptableOptions } from '../../AdaptableOptions/DefaultAdaptableOptions';
11
+ import { isPivotLayout } from '../../Utilities/Helpers/Layouts/LayoutHelper';
11
12
  import { cn } from '../../lib/utils';
12
13
  const adaptableVersion = ADAPTABLE_VERSION;
13
14
  const agGridVersion = AG_GRID_VERSION;
14
15
  export const GridInfoPopup = (props) => {
15
16
  const api = props.api;
16
- const keyValuePairs = [];
17
+ const summaryKeyValuePairs = [];
18
+ const layoutKeyValuePairs = [];
17
19
  const calcColumns = api.calculatedColumnApi
18
20
  .getCalculatedColumns()
19
21
  .map((c) => c.ColumnId);
@@ -32,40 +34,74 @@ export const GridInfoPopup = (props) => {
32
34
  : null;
33
35
  const selectedRowInfo = api.gridApi.getSelectedRowInfo();
34
36
  if (api.optionsApi.getUserInterfaceOptions()?.showAdapTableVersion) {
35
- keyValuePairs.push({ Key: 'AdapTable Version', Value: adaptableVersion });
37
+ summaryKeyValuePairs.push({ Key: 'AdapTable Version', Value: adaptableVersion });
36
38
  }
37
39
  if (api.optionsApi.getUserInterfaceOptions()?.showAgGridVersion) {
38
- keyValuePairs.push({ Key: 'AG Grid Version', Value: agGridVersion });
40
+ summaryKeyValuePairs.push({ Key: 'AG Grid Version', Value: agGridVersion });
39
41
  }
40
- keyValuePairs.push({ Key: 'License Key', Value: api.optionsApi.getAdaptableOptions().licenseKey });
41
- keyValuePairs.push({ Key: 'Sorted Columns', Value: ArrayExtensions.IsNotNullOrEmpty(sorts) ? sorts.join('; ') : 'None' });
42
- keyValuePairs.push({ Key: 'Column Filters', Value: columnFilterDescription });
43
- keyValuePairs.push({ Key: 'Grid Filter', Value: gridFilterExpression });
44
- keyValuePairs.push({ Key: 'All Rows', Value: props.api.gridApi.getRowCount() });
45
- keyValuePairs.push({ Key: 'Visible Rows', Value: props.api.gridApi.getVisibleRowCount() });
46
- keyValuePairs.push({ Key: 'Selected Rows', Value: selectedRowInfo?.gridRows.length });
47
- keyValuePairs.push({ Key: 'Visible Selected Rows', Value: selectedRowInfo?.gridRows.filter((gr) => gr.rowNode?.displayed == true).length });
48
- keyValuePairs.push({ Key: 'All Columns', Value: props.api.gridApi.getColumnCount() });
49
- keyValuePairs.push({ Key: 'Visible Columns', Value: props.api.gridApi.getVisibleColumnCount() });
50
- keyValuePairs.push({ Key: 'Calculated Columns', Value: ArrayExtensions.IsNotNullOrEmpty(calcColumns)
42
+ summaryKeyValuePairs.push({ Key: 'License Key', Value: api.optionsApi.getAdaptableOptions().licenseKey });
43
+ summaryKeyValuePairs.push({ Key: 'Adaptable Id', Value: api.optionsApi.getAdaptableId() });
44
+ summaryKeyValuePairs.push({ Key: 'State Key', Value: api.optionsApi.getAdaptableStateKey() });
45
+ summaryKeyValuePairs.push({ Key: 'User Name', Value: api.optionsApi.getUserName() });
46
+ const primaryKey = api.optionsApi.getPrimaryKey();
47
+ const primaryKeyFriendly = primaryKey
48
+ ? api.columnApi.getFriendlyNameForColumnId(primaryKey)
49
+ : undefined;
50
+ const primaryKeyLabel = primaryKeyFriendly && primaryKeyFriendly !== primaryKey
51
+ ? `${primaryKeyFriendly} (${primaryKey})`
52
+ : primaryKey;
53
+ summaryKeyValuePairs.push({
54
+ Key: 'Primary Key',
55
+ Value: api.optionsApi.isAutogeneratePrimaryKey()
56
+ ? `${primaryKeyLabel} (auto-generated)`
57
+ : primaryKeyLabel,
58
+ });
59
+ const currentLayout = api.layoutApi.getCurrentLayout();
60
+ const isPivot = isPivotLayout(currentLayout);
61
+ const columnLabels = (columnIds) => ArrayExtensions.IsNotNullOrEmpty(columnIds)
62
+ ? columnIds
63
+ .map((columnId) => api.columnApi.getFriendlyNameForColumnId(columnId) || columnId)
64
+ .join(', ')
65
+ : 'None';
66
+ layoutKeyValuePairs.push({
67
+ Key: 'Current Layout',
68
+ Value: api.layoutApi.getCurrentLayoutName() || 'None',
69
+ });
70
+ layoutKeyValuePairs.push({
71
+ Key: 'Layout Type',
72
+ Value: isPivot ? 'Pivot' : 'Table',
73
+ });
74
+ layoutKeyValuePairs.push({
75
+ Key: 'Row Groups',
76
+ Value: columnLabels(api.layoutApi.getCurrentRowGroupsColumnIds()),
77
+ });
78
+ if (isPivot) {
79
+ layoutKeyValuePairs.push({
80
+ Key: 'Pivot Columns',
81
+ Value: columnLabels(currentLayout.PivotColumns),
82
+ });
83
+ }
84
+ layoutKeyValuePairs.push({ Key: 'Sorted Columns', Value: ArrayExtensions.IsNotNullOrEmpty(sorts) ? sorts.join('; ') : 'None' });
85
+ layoutKeyValuePairs.push({ Key: 'Column Filters', Value: columnFilterDescription });
86
+ layoutKeyValuePairs.push({ Key: 'Grid Filter', Value: gridFilterExpression });
87
+ layoutKeyValuePairs.push({ Key: 'All Rows', Value: props.api.gridApi.getRowCount() });
88
+ layoutKeyValuePairs.push({ Key: 'Visible Rows', Value: props.api.gridApi.getVisibleRowCount() });
89
+ layoutKeyValuePairs.push({ Key: 'Selected Rows', Value: selectedRowInfo?.gridRows.length });
90
+ layoutKeyValuePairs.push({ Key: 'Visible Selected Rows', Value: selectedRowInfo?.gridRows.filter((gr) => gr.rowNode?.displayed == true).length });
91
+ layoutKeyValuePairs.push({ Key: 'All Columns', Value: props.api.gridApi.getColumnCount() });
92
+ layoutKeyValuePairs.push({ Key: 'Visible Columns', Value: props.api.gridApi.getVisibleColumnCount() });
93
+ layoutKeyValuePairs.push({ Key: 'Calculated Columns', Value: ArrayExtensions.IsNotNullOrEmpty(calcColumns)
51
94
  ? ArrayExtensions.createCommaSeparatedString(calcColumns)
52
95
  : 'None' });
53
- keyValuePairs.push({ Key: 'Free Text Columns', Value: ArrayExtensions.IsNotNullOrEmpty(freeTextColumns)
96
+ layoutKeyValuePairs.push({ Key: 'Free Text Columns', Value: ArrayExtensions.IsNotNullOrEmpty(freeTextColumns)
54
97
  ? ArrayExtensions.createCommaSeparatedString(freeTextColumns)
55
98
  : 'None' });
56
- keyValuePairs.push({ Key: 'Action Columns', Value: ArrayExtensions.IsNotNullOrEmpty(actionColumns)
99
+ layoutKeyValuePairs.push({ Key: 'Action Columns', Value: ArrayExtensions.IsNotNullOrEmpty(actionColumns)
57
100
  ? ArrayExtensions.createCommaSeparatedString(actionColumns)
58
101
  : 'None' });
59
102
  const domProps = {
60
103
  className: 'twa:flex-1 twa:min-h-0 twa:w-full',
61
104
  };
62
- keyValuePairs.map((keyValuePair) => {
63
- return {
64
- Key: keyValuePair.Key,
65
- Value: keyValuePair.Value === 'Ignore' ? null : keyValuePair.Value,
66
- };
67
- })
68
- .filter((x) => x.Value);
69
105
  const columnsMap = {
70
106
  Key: { field: 'Key', header: 'Property', defaultFlex: 1 },
71
107
  Value: { field: 'Value', header: 'Value', defaultFlex: 3 },
@@ -199,12 +235,13 @@ export const GridInfoPopup = (props) => {
199
235
  return Math.min(total + 40, 400);
200
236
  };
201
237
  const enabledTabs = api.optionsApi.getSettingsPanelOptions()?.gridInfoTabs ??
202
- ['Grid Options', 'Grid Summary', 'Grid State'];
238
+ ['Grid Summary', 'Layout', 'Grid State', 'Grid Options'];
203
239
  const showSummary = enabledTabs.includes('Grid Summary');
240
+ const showLayout = enabledTabs.includes('Layout');
204
241
  const showState = enabledTabs.includes('Grid State');
205
242
  const showOptions = enabledTabs.includes('Grid Options');
206
243
  const baseClassName = 'ab-GridInfo';
207
- return (_jsx(PopupPanel, { className: cn(baseClassName), headerText: 'Grid Info', glyphicon: 'info', scrollable: false, children: _jsx(Panel, { className: "twa:flex-1 twa:border-none twa:shadow-md twa:overflow-hidden", children: _jsx(Panel.FlexBody, { children: _jsxs(Tabs, { className: "twa:flex-1 twa:min-h-0", children: [showSummary ? _jsx(Tabs.Tab, { children: "Grid Summary" }) : null, showState ? _jsx(Tabs.Tab, { children: "Grid State" }) : null, showOptions ? _jsx(Tabs.Tab, { children: "Grid Options" }) : null, showSummary ? (_jsx(Tabs.Content, { children: _jsx(DataSource, { data: keyValuePairs, primaryKey: "Key", children: _jsx(InfiniteTableGrid, { domProps: domProps, columns: columnsMap }) }) })) : null, showState ? (_jsx(Tabs.Content, { children: _jsx(AdaptableObjectsSummary, { className: "twa:min-h-0 twa:overflow-auto twa:p-2" }) })) : null, showOptions ? (_jsx(Tabs.Content, { children: _jsx("div", { className: "twa:min-h-0 twa:overflow-auto twa:p-2 twa:flex twa:flex-col twa:gap-4", children: gridOptionsSections.map((section) => (_jsxs("div", { children: [_jsx("h4", { className: "twa:font-semibold twa:mb-1", children: section.title }), _jsx(DataSource, { data: section.rows, primaryKey: "Key", children: _jsx(InfiniteTableGrid, { domProps: {
244
+ return (_jsx(PopupPanel, { className: cn(baseClassName), headerText: 'Grid Info', glyphicon: 'info', scrollable: false, children: _jsx(Panel, { className: "twa:flex-1 twa:border-none twa:shadow-md twa:overflow-hidden", children: _jsx(Panel.FlexBody, { children: _jsxs(Tabs, { className: "twa:flex-1 twa:min-h-0", children: [showSummary ? _jsx(Tabs.Tab, { children: "Summary" }) : null, showLayout ? _jsx(Tabs.Tab, { children: "Layout" }) : null, showState ? _jsx(Tabs.Tab, { children: "State" }) : null, showOptions ? _jsx(Tabs.Tab, { children: "Options" }) : null, showSummary ? (_jsx(Tabs.Content, { children: _jsx(DataSource, { data: summaryKeyValuePairs, primaryKey: "Key", children: _jsx(InfiniteTableGrid, { domProps: domProps, columns: columnsMap }) }) })) : null, showLayout ? (_jsx(Tabs.Content, { children: _jsx(DataSource, { data: layoutKeyValuePairs, primaryKey: "Key", children: _jsx(InfiniteTableGrid, { domProps: domProps, columns: columnsMap }) }) })) : null, showState ? (_jsx(Tabs.Content, { children: _jsx(AdaptableObjectsSummary, { className: "twa:min-h-0 twa:overflow-auto twa:p-2" }) })) : null, showOptions ? (_jsx(Tabs.Content, { children: _jsx("div", { className: "twa:min-h-0 twa:overflow-auto twa:p-2 twa:flex twa:flex-col twa:gap-4", children: gridOptionsSections.map((section) => (_jsxs("div", { children: [_jsx("h4", { className: "twa:font-semibold twa:mb-1", children: section.title }), _jsx(DataSource, { data: section.rows, primaryKey: "Key", children: _jsx(InfiniteTableGrid, { domProps: {
208
245
  style: { height: sectionHeight(section.rows), width: '100%' },
209
246
  }, rowHeight: (rowInfo) => calculateRowHeight(rowInfo.data), columns: optionsColumnsMap }) })] }, section.title))) }) })) : null] }) }) }) }));
210
247
  };
@@ -12,7 +12,7 @@ export const QuickSearchInput = (props) => {
12
12
  const adaptable = useAdaptable();
13
13
  const QuickSearchText = useSelector((state) => state.QuickSearch.QuickSearchText);
14
14
  const dispatch = useDispatch();
15
- const onRunQuickSearch = React.useCallback((newQuickSearchText) => dispatch(QuickSearchRedux.QuickSearchRun(newQuickSearchText)), []);
15
+ const onRunQuickSearch = React.useCallback((newQuickSearchText) => dispatch(QuickSearchRedux.QuickSearchTextAction(newQuickSearchText)), []);
16
16
  const isServerSideRowModel = adaptable.api.gridApi.getAgGridRowModelType() === 'serverSide';
17
17
  const [searchText, search] = useQuickSearchDebounced({
18
18
  QuickSearchText,
@@ -7,7 +7,7 @@ interface QuickSearchPopupProps extends ModuleViewPopupProps<any> {
7
7
  QuickSearchTextMatchStyle: AdaptableStyle;
8
8
  QuickSearchCurrentTextMatchStyle: AdaptableStyle;
9
9
  QuickSearchCellMatchStyle: AdaptableStyle;
10
- onRunQuickSearch: (quickSearchText: string) => QuickSearchRedux.QuickSearchRunAction;
10
+ onRunQuickSearch: (quickSearchText: string) => QuickSearchRedux.QuickSearchRunAction | QuickSearchRedux.QuickSearchClearAction;
11
11
  onSetTextMatchingStyle: (style: AdaptableStyle) => QuickSearchRedux.QuickSearchSetTextMatchingStyleAction;
12
12
  onSetCurrentTextMatchingStyle: (style: AdaptableStyle) => QuickSearchRedux.QuickSearchSetCurrentTextMatchingStyleAction;
13
13
  onSetCellMatchingStyle: (style: AdaptableStyle) => QuickSearchRedux.QuickSearchSetMatchingCellStyleAction;
@@ -39,7 +39,7 @@ function mapStateToProps(state, ownProps) {
39
39
  }
40
40
  function mapDispatchToProps(dispatch) {
41
41
  return {
42
- onRunQuickSearch: (quickSearchText) => dispatch(QuickSearchRedux.QuickSearchRun(quickSearchText)),
42
+ onRunQuickSearch: (quickSearchText) => dispatch(QuickSearchRedux.QuickSearchTextAction(quickSearchText)),
43
43
  onSetTextMatchingStyle: (style) => dispatch(QuickSearchRedux.QuickSearchSetTextMatchingStyle(style)),
44
44
  onSetCurrentTextMatchingStyle: (style) => dispatch(QuickSearchRedux.QuickSearchSetCurrentTextMatchingStyle(style)),
45
45
  onSetCellMatchingStyle: (style) => dispatch(QuickSearchRedux.QuickSearchSetCellMatchingStyle(style)),
@@ -1,6 +1,6 @@
1
- import { QuickSearchRunAction } from '../../../Redux/ActionsReducers/QuickSearchRedux';
1
+ import { QuickSearchClearAction, QuickSearchRunAction } from '../../../Redux/ActionsReducers/QuickSearchRedux';
2
2
  type UseQuickSearchProps = {
3
- onRunQuickSearch: (quickSearchText: string) => QuickSearchRunAction;
3
+ onRunQuickSearch: (quickSearchText: string) => QuickSearchRunAction | QuickSearchClearAction;
4
4
  QuickSearchText: string;
5
5
  };
6
6
  export declare const useQuickSearchDebounced: (props: UseQuickSearchProps) => [string, (s: string) => void];
@@ -1,13 +1,13 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import * as React from 'react';
3
- import { ColorPicker } from '../../components/ColorPicker';
3
+ import { ColorField } from '../../components/ColorField';
4
4
  import { clamp } from '../../Utilities/Extensions/NumberExtensions';
5
5
  import { CheckBox } from '../../components/CheckBox';
6
6
  import FormLayout, { FormRow } from '../../components/FormLayout';
7
7
  import { NumberInput } from '../../components/Input/NumberInput';
8
8
  import SimpleButton from '../../components/SimpleButton';
9
9
  import { ButtonNew } from '../Components/Buttons/ButtonNew';
10
- import { getGraySwatchColor } from '../../Utilities/Helpers/UIHelper';
10
+ import { getDefaultRangeColor, getDefaultZeroCentredColors, } from '../../Utilities/Helpers/UIHelper';
11
11
  import { ColumnSelector } from '../Components/Selectors/ColumnSelector';
12
12
  import { Tabs } from '../../components/Tabs';
13
13
  import Radio from '../../components/Radio';
@@ -16,10 +16,7 @@ import { SingleSelect } from '../../components/Select';
16
16
  import { InputGroup } from '../../components/InputGroup';
17
17
  import { Icon } from '../../components/icons';
18
18
  import HelpBlock from '../../components/HelpBlock';
19
- const DEFAULT_ZERO_CENTRED_COLORS = {
20
- NegativeColor: 'rgba(220, 53, 69, 0.55)',
21
- PositiveColor: 'rgba(40, 167, 69, 0.55)',
22
- };
19
+ const DEFAULT_ZERO_CENTRED_COLORS = getDefaultZeroCentredColors();
23
20
  const hasConfiguredRanges = (ranges) => (ranges?.length ?? 0) > 0;
24
21
  function deriveInitialRangesType(props) {
25
22
  if (props.columnComparison) {
@@ -82,7 +79,7 @@ export class RangesComponent extends React.Component {
82
79
  range.Max === 'Col-Max' ||
83
80
  (index === list.length - 1 && !isRangeValueTypeNumber), onChange: (value) => {
84
81
  this.changeRangeMax(index, value);
85
- } })] }), _jsx(ColorPicker, { api: this.props.api, value: range.Color, onChange: (color) => {
82
+ } })] }), _jsx(ColorField, { clearable: false, value: range.Color, onChange: (color) => {
86
83
  this.changeRangeColor(index, color);
87
84
  }, className: "twa:h-[33px] twa:pl-2" }), this.props.showRangeDirection && (_jsx(CheckBox, { disabled: this.props.disabled, checked: !!range.ReverseGradient, onChange: (checked) => this.changeRangeDirectionUp(index, checked), children: "Reverse Gradient" })), _jsx(SimpleButton, { icon: "delete", disabled: this.props.disabled ||
88
85
  (!this.props.allowEmptyRanges &&
@@ -93,7 +90,7 @@ export class RangesComponent extends React.Component {
93
90
  const apply = (next) => this.props.onApplyZeroCentred?.(next);
94
91
  const minLabel = this.props.minMaxRangeValues != null ? this.props.minMaxRangeValues.min : 'column min';
95
92
  const maxLabel = this.props.minMaxRangeValues != null ? this.props.minMaxRangeValues.max : 'column max';
96
- return (_jsxs(Flex, { flexDirection: "column", "data-name": "zero-centred-ranges", children: [_jsxs(HelpBlock, { className: "twa:my-2 twa:text-3", children: [_jsx(Box, { children: "Colour cells on a diverging scale centred at zero." }), _jsx(Box, { children: "Negative values shade toward the column minimum, positive values toward the maximum \u2014 deeper as they move away from 0." })] }), _jsxs(FormLayout, { columns: ['label', 'colour'], sizes: ['200px', '1fr'], className: "twa:ml-2", children: [_jsx(FormRow, { label: `Negative (${minLabel} → 0):`, children: _jsx(Flex, { alignItems: "center", className: "twa:ml-2", children: _jsx(ColorPicker, { disabled: this.props.disabled, api: this.props.api, value: zc.NegativeColor, onChange: (color) => apply({ ...zc, NegativeColor: color }) }) }) }), _jsx(FormRow, { label: `Positive (0 → ${maxLabel}):`, children: _jsx(Flex, { alignItems: "center", className: "twa:ml-2", children: _jsx(ColorPicker, { disabled: this.props.disabled, api: this.props.api, value: zc.PositiveColor, onChange: (color) => apply({ ...zc, PositiveColor: color }) }) }) })] })] }));
93
+ return (_jsxs(Flex, { flexDirection: "column", "data-name": "zero-centred-ranges", children: [_jsxs(HelpBlock, { className: "twa:my-2 twa:text-3", children: [_jsx(Box, { children: "Colour cells on a diverging scale centred at zero." }), _jsx(Box, { children: "Negative values shade toward the column minimum, positive values toward the maximum \u2014 deeper as they move away from 0." })] }), _jsxs(FormLayout, { columns: ['label', 'colour'], sizes: ['200px', '1fr'], className: "twa:ml-2", children: [_jsx(FormRow, { label: `Negative (${minLabel} → 0):`, children: _jsx(Flex, { alignItems: "center", className: "twa:ml-2", children: _jsx(ColorField, { clearable: false, disabled: this.props.disabled, value: zc.NegativeColor, onChange: (color) => apply({ ...zc, NegativeColor: color }) }) }) }), _jsx(FormRow, { label: `Positive (0 → ${maxLabel}):`, children: _jsx(Flex, { alignItems: "center", className: "twa:ml-2", children: _jsx(ColorField, { clearable: false, disabled: this.props.disabled, value: zc.PositiveColor, onChange: (color) => apply({ ...zc, PositiveColor: color }) }) }) })] })] }));
97
94
  };
98
95
  const describeBound = (bound) => {
99
96
  if (bound == null || bound === '') {
@@ -105,7 +102,7 @@ export class RangesComponent extends React.Component {
105
102
  const friendlyName = this.props.api.columnApi.getFriendlyNameForColumnId(String(bound));
106
103
  return (_jsxs(_Fragment, { children: [_jsx("strong", { children: friendlyName }), " ", _jsx("span", { className: "twa:opacity-60", children: "(per row)" })] }));
107
104
  };
108
- const renderColumnComparisonContent = () => (_jsxs(Flex, { flexDirection: "column", "data-name": "percent-bar-column-comparison", children: [_jsxs(HelpBlock, { className: "twa:my-2 twa:text-3", children: [_jsxs(Box, { children: ["Scale each cell's bar between a ", _jsx("strong", { children: "Minimum" }), " and a", ' ', _jsx("strong", { children: "Maximum" }), "."] }), _jsxs(Box, { children: ["Set each to a fixed ", _jsx("strong", { children: "Value" }), " (same for all rows) or a", ' ', _jsx("strong", { children: "Column" }), " (read from that column on each row)."] })] }), _jsxs(FormLayout, { columns: ['label', 'first'], sizes: ['auto', '1fr'], children: [_jsx(FormRow, { label: "Minimum:", first: _jsx(ColumnComparisonBoundInput, { disabled: this.props.disabled, value: this.props.columnComparison?.MinValue, onChange: (value) => this.setColumnComparisonMin(value) }) }), _jsx(FormRow, { label: "Maximum:", first: _jsx(ColumnComparisonBoundInput, { disabled: this.props.disabled, value: this.props.columnComparison?.MaxValue, onChange: (value) => this.setColumnComparisonMax(value) }) }), _jsx(FormRow, { label: `Bar ${this.props.api.internalApi.getCorrectEnglishVariant('Colour')}`, first: _jsx(ColorPicker, { disabled: this.props.disabled, api: this.props.api, value: comparisonColor, onChange: (color) => {
105
+ const renderColumnComparisonContent = () => (_jsxs(Flex, { flexDirection: "column", "data-name": "percent-bar-column-comparison", children: [_jsxs(HelpBlock, { className: "twa:my-2 twa:text-3", children: [_jsxs(Box, { children: ["Scale each cell's bar between a ", _jsx("strong", { children: "Minimum" }), " and a", ' ', _jsx("strong", { children: "Maximum" }), "."] }), _jsxs(Box, { children: ["Set each to a fixed ", _jsx("strong", { children: "Value" }), " (same for all rows) or a", ' ', _jsx("strong", { children: "Column" }), " (read from that column on each row)."] })] }), _jsxs(FormLayout, { columns: ['label', 'first'], sizes: ['auto', '1fr'], children: [_jsx(FormRow, { label: "Minimum:", first: _jsx(ColumnComparisonBoundInput, { disabled: this.props.disabled, value: this.props.columnComparison?.MinValue, onChange: (value) => this.setColumnComparisonMin(value) }) }), _jsx(FormRow, { label: "Maximum:", first: _jsx(ColumnComparisonBoundInput, { disabled: this.props.disabled, value: this.props.columnComparison?.MaxValue, onChange: (value) => this.setColumnComparisonMax(value) }) }), _jsx(FormRow, { label: `Bar ${this.props.api.internalApi.getCorrectEnglishVariant('Colour')}`, first: _jsx(ColorField, { clearable: false, disabled: this.props.disabled, value: comparisonColor, onChange: (color) => {
109
106
  this.changeColumnComparisonColor(color);
110
107
  } }) })] }), _jsxs(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'));
111
108
  const tabFlex = { flex: 1 };
@@ -159,7 +156,7 @@ export class RangesComponent extends React.Component {
159
156
  }
160
157
  if (value === 'ColumnComparison') {
161
158
  const columnComparison = {
162
- Color: getGraySwatchColor(),
159
+ Color: getDefaultRangeColor(),
163
160
  MinValue: undefined,
164
161
  MaxValue: undefined,
165
162
  };
@@ -252,7 +249,7 @@ export class RangesComponent extends React.Component {
252
249
  {
253
250
  Min: isPercentage ? 0 : 'Col-Min',
254
251
  Max: isPercentage ? 100 : 'Col-Max',
255
- Color: getGraySwatchColor(),
252
+ Color: getDefaultRangeColor(),
256
253
  },
257
254
  ]
258
255
  : (() => {
@@ -263,12 +260,12 @@ export class RangesComponent extends React.Component {
263
260
  {
264
261
  Min: isPercentage ? 0 : 'Col-Min',
265
262
  Max: mid,
266
- Color: 'rgba(128, 128, 128, 0.25)',
263
+ Color: getDefaultRangeColor(),
267
264
  },
268
265
  {
269
266
  Min: mid,
270
267
  Max: isPercentage ? 100 : 'Col-Max',
271
- Color: 'rgba(128, 128, 128, 0.55)',
268
+ Color: getDefaultRangeColor(),
272
269
  },
273
270
  ];
274
271
  })();
@@ -298,7 +295,7 @@ export class RangesComponent extends React.Component {
298
295
  const newRange = {
299
296
  Min,
300
297
  Max: lastRange.Max,
301
- Color: getGraySwatchColor(),
298
+ Color: getDefaultRangeColor(),
302
299
  };
303
300
  const newRanges = [...existingRanges.slice(0, -1), previousRange, newRange];
304
301
  this.props.updateRanges(newRanges);
@@ -311,7 +308,7 @@ export class RangesComponent extends React.Component {
311
308
  }
312
309
  return [
313
310
  { ...onlyRange, Max: 50 },
314
- { Min: 50, Max: 100, Color: getGraySwatchColor() },
311
+ { Min: 50, Max: 100, Color: getDefaultRangeColor() },
315
312
  ];
316
313
  }
317
314
  if (onlyRange.Min !== 'Col-Min' || onlyRange.Max !== 'Col-Max') {
@@ -322,7 +319,7 @@ export class RangesComponent extends React.Component {
322
319
  const mid = Math.round((min + max) / 2);
323
320
  return [
324
321
  { ...onlyRange, Max: mid },
325
- { Min: mid, Max: 'Col-Max', Color: getGraySwatchColor() },
322
+ { Min: mid, Max: 'Col-Max', Color: getDefaultRangeColor() },
326
323
  ];
327
324
  }
328
325
  setColumnComparisonMin(value) {
@@ -1,8 +1,6 @@
1
1
  import * as React from 'react';
2
- import { AdaptableApi } from '../../../Api/AdaptableApi';
3
2
  import { BadgePillStyle } from '../../../AdaptableState/StyledColumns/BadgeStyle';
4
3
  export interface BadgePillStyleEditorProps {
5
- api: AdaptableApi;
6
4
  /** Current pill style (may be undefined / partial). */
7
5
  value: BadgePillStyle | undefined;
8
6
  /**
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { OptionalColorPicker } from '../../../components/ColorPicker';
2
+ import { ColorField } from '../../../components/ColorField';
3
3
  import FormLayout, { FormRow } from '../../../components/FormLayout';
4
4
  import { Box, Flex } from '../../../components/Flex';
5
5
  import { Toggle, ToggleGroup } from '../../../components/Toggle';
@@ -25,7 +25,7 @@ export const BadgePillStyleEditor = (props) => {
25
25
  }
26
26
  };
27
27
  const disabledClass = disabled ? 'twa:opacity-50 twa:pointer-events-none' : '';
28
- const form = (_jsxs(FormLayout, { columns: [LABEL_COLUMN, CHILD_COLUMN], sizes: ['7.5rem', '1fr'], gridColumnGap: "0.75rem", children: [_jsx(FormRow, { label: "Background", children: _jsx(OptionalColorPicker, { disabled: disabled, api: props.api, value: pill.BackColor, defaultColor: "#cccccc", onChange: (c) => update({ BackColor: c }) }) }), _jsx(FormRow, { label: "Text", children: _jsx(OptionalColorPicker, { disabled: disabled, api: props.api, value: pill.ForeColor, defaultColor: "#000000", onChange: (c) => update({ ForeColor: c }) }) }), _jsx(FormRow, { label: "Border", children: _jsx(OptionalColorPicker, { disabled: disabled, api: props.api, value: pill.BorderColor, defaultColor: "#000000", onChange: (c) => update({ BorderColor: c }) }) }), _jsx(FormRow, { label: "Font", children: _jsx(Box, { className: disabledClass, children: _jsxs(Flex, { alignItems: "center", className: "twa:gap-2 twa:flex-wrap", children: [_jsxs(Flex, { alignItems: "center", className: "twa:gap-2", children: [_jsx(Toggle, { standalone: true, pressed: pill.FontStyle === 'Italic', onPressedChange: (pressed) => update({ FontStyle: pressed ? 'Italic' : undefined }), icon: "italic" }), _jsx(Toggle, { standalone: true, pressed: pill.FontWeight === 'Bold', onPressedChange: (pressed) => update({ FontWeight: pressed ? 'Bold' : undefined }), icon: "bold" })] }), _jsxs(ToggleGroup, { children: [_jsx(Toggle, { pressed: pill.TextDecoration === 'Underline', onPressedChange: (pressed) => update({ TextDecoration: pressed ? 'Underline' : undefined }), icon: "underline" }), _jsx(Toggle, { pressed: pill.TextDecoration === 'LineThrough', onPressedChange: (pressed) => update({ TextDecoration: pressed ? 'LineThrough' : undefined }), icon: "strikethrough" }), _jsx(Toggle, { pressed: pill.TextDecoration === 'Overline', onPressedChange: (pressed) => update({ TextDecoration: pressed ? 'Overline' : undefined }), icon: "overline" })] })] }) }) })] }));
28
+ const form = (_jsxs(FormLayout, { columns: [LABEL_COLUMN, CHILD_COLUMN], sizes: ['7.5rem', '1fr'], gridColumnGap: "0.75rem", children: [_jsx(FormRow, { label: "Background", children: _jsx(ColorField, { disabled: disabled, value: pill.BackColor, defaultColor: "#cccccc", onChange: (c) => update({ BackColor: c }) }) }), _jsx(FormRow, { label: "Text", children: _jsx(ColorField, { disabled: disabled, value: pill.ForeColor, defaultColor: "#000000", onChange: (c) => update({ ForeColor: c }) }) }), _jsx(FormRow, { label: "Border", children: _jsx(ColorField, { disabled: disabled, value: pill.BorderColor, defaultColor: "#000000", onChange: (c) => update({ BorderColor: c }) }) }), _jsx(FormRow, { label: "Font", children: _jsx(Box, { className: disabledClass, children: _jsxs(Flex, { alignItems: "center", className: "twa:gap-2 twa:flex-wrap", children: [_jsxs(Flex, { alignItems: "center", className: "twa:gap-2", children: [_jsx(Toggle, { standalone: true, pressed: pill.FontStyle === 'Italic', onPressedChange: (pressed) => update({ FontStyle: pressed ? 'Italic' : undefined }), icon: "italic" }), _jsx(Toggle, { standalone: true, pressed: pill.FontWeight === 'Bold', onPressedChange: (pressed) => update({ FontWeight: pressed ? 'Bold' : undefined }), icon: "bold" })] }), _jsxs(ToggleGroup, { children: [_jsx(Toggle, { pressed: pill.TextDecoration === 'Underline', onPressedChange: (pressed) => update({ TextDecoration: pressed ? 'Underline' : undefined }), icon: "underline" }), _jsx(Toggle, { pressed: pill.TextDecoration === 'LineThrough', onPressedChange: (pressed) => update({ TextDecoration: pressed ? 'LineThrough' : undefined }), icon: "strikethrough" }), _jsx(Toggle, { pressed: pill.TextDecoration === 'Overline', onPressedChange: (pressed) => update({ TextDecoration: pressed ? 'Overline' : undefined }), icon: "overline" })] })] }) }) })] }));
29
29
  if (props.embedded) {
30
30
  return form;
31
31
  }
@@ -75,7 +75,6 @@ const getBadgeDefinitionSummaryItems = (badge, api) => {
75
75
  const BadgePreview = ({ badge, density, previewValue }) => (_jsx(Badge, { pillStyle: badge.PillStyle, icon: badge.IconProperties?.Icon, iconPosition: badge.IconProperties?.Position, shape: badge.Shape, density: density, iconGap: badge.IconProperties?.Gap, children: badge.IconProperties?.IconOnly ? '' : previewValue }));
76
76
  const BadgeCardSummary = ({ badge, api }) => (_jsx(CollapsibleWizardValueSummary, { value: renderSummaryLabelValueTags(getBadgeDefinitionSummaryItems(badge, api)) }));
77
77
  const BadgeEditorForm = (props) => {
78
- const { api } = useOnePageAdaptableWizardContext();
79
78
  const { badge, columnId, onChange } = props;
80
79
  const currentShape = badge.Shape ?? 'Rounded';
81
80
  const iconProps = badge.IconProperties;
@@ -93,7 +92,7 @@ const BadgeEditorForm = (props) => {
93
92
  }
94
93
  onChange({ ...badge, IconProperties: next });
95
94
  };
96
- return (_jsxs(Flex, { flexDirection: "column", className: "twa:gap-3 twa:p-2", children: [_jsxs(Card, { shadow: false, children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Shape" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Define shape of the corners for this badge" })] }), _jsx(Card.Body, { className: "twa:p-1", children: _jsx(RadioGroup, { orientation: "horizontal", name: `ab-badge-shape-${columnId}`, value: currentShape, onRadioChange: (value) => onChange({ ...badge, Shape: value }), className: "twa:gap-3", children: SHAPE_CHOICES.map((choice) => (_jsx(Radio, { value: choice.value, children: choice.label }, choice.value))) }) })] }), _jsxs(Card, { shadow: false, children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Style" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Colours and font styling for the badge pill" })] }), _jsx(Card.Body, { className: "twa:p-1", children: _jsx(BadgePillStyleEditor, { embedded: true, api: api, value: badge.PillStyle, onChange: (next) => {
95
+ return (_jsxs(Flex, { flexDirection: "column", className: "twa:gap-3 twa:p-2", children: [_jsxs(Card, { shadow: false, children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Shape" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Define shape of the corners for this badge" })] }), _jsx(Card.Body, { className: "twa:p-1", children: _jsx(RadioGroup, { orientation: "horizontal", name: `ab-badge-shape-${columnId}`, value: currentShape, onRadioChange: (value) => onChange({ ...badge, Shape: value }), className: "twa:gap-3", children: SHAPE_CHOICES.map((choice) => (_jsx(Radio, { value: choice.value, children: choice.label }, choice.value))) }) })] }), _jsxs(Card, { shadow: false, children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Style" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Colours and font styling for the badge pill" })] }), _jsx(Card.Body, { className: "twa:p-1", children: _jsx(BadgePillStyleEditor, { embedded: true, value: badge.PillStyle, onChange: (next) => {
97
96
  if (next) {
98
97
  onChange({ ...badge, PillStyle: next });
99
98
  }
@@ -263,7 +262,7 @@ export const StyledColumnBadgeStyleSection = (props) => {
263
262
  updateBadgeStyle({
264
263
  Spacing: typeof value === 'number' && value >= 0 ? value : undefined,
265
264
  });
266
- } }), _jsx(Box, { className: "twa:text-xs twa:opacity-70", children: "px between adjacent badges" })] }) }) }) })] }), _jsxs(Card, { shadow: false, className: "twa:mb-3", children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Overflow" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Configure the overflow mode for badges" })] }), _jsx(Card.Body, { children: _jsx(FormLayout, { sizes: [...BADGE_STYLE_FORM_SIZES], children: _jsx(FormRow, { label: "Overflow mode", children: _jsx(Box, { className: "twa:ml-2", children: _jsx(RadioGroup, { orientation: "vertical", name: "ab-badgestyle-overflow", value: currentOverflow, onRadioChange: (value) => updateBadgeStyle({ OverflowMode: value }), children: OVERFLOW_CHOICES.map((choice) => (_jsx(Radio, { value: choice.value, disabled: disabled, children: _jsxs(Flex, { alignItems: "center", children: [_jsx(Box, { className: "twa:min-w-[110px]", children: choice.label }), _jsx(Box, { className: "twa:text-xs twa:opacity-70", children: choice.hint })] }) }, choice.value))) }) }) }) }) })] })] })), _jsxs(Card, { shadow: false, children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Cell Style" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Styling and alignment to apply to Badge cells (overrides Format Column)" })] }), _jsxs(Card.Body, { children: [_jsx(FormLayout, { sizes: [...BADGE_STYLE_FORM_SIZES], children: _jsx(FormRow, { label: "Alignment:", children: _jsx(Flex, { alignItems: "center", className: "twa:gap-2", children: _jsxs(ToggleGroup, { children: [_jsx(Toggle, { icon: "align-left", pressed: currentAlignment === 'Left', onPressedChange: (pressed) => updateBadgeRowAlignment(pressed ? 'Left' : undefined) }), _jsx(Toggle, { icon: "align-center", pressed: currentAlignment === 'Center', onPressedChange: (pressed) => updateBadgeRowAlignment(pressed ? 'Center' : undefined) }), _jsx(Toggle, { icon: "align-right", pressed: currentAlignment === 'Right', onPressedChange: (pressed) => updateBadgeRowAlignment(pressed ? 'Right' : undefined) })] }) }) }) }), _jsx(Box, { className: "twa:mt-3", children: _jsx(StyledColumnCellStyleEditor, { api: api, disabled: disabled, value: badgeStyle.Cell, onChange: (next) => {
265
+ } }), _jsx(Box, { className: "twa:text-xs twa:opacity-70", children: "px between adjacent badges" })] }) }) }) })] }), _jsxs(Card, { shadow: false, className: "twa:mb-3", children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Overflow" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Configure the overflow mode for badges" })] }), _jsx(Card.Body, { children: _jsx(FormLayout, { sizes: [...BADGE_STYLE_FORM_SIZES], children: _jsx(FormRow, { label: "Overflow mode", children: _jsx(Box, { className: "twa:ml-2", children: _jsx(RadioGroup, { orientation: "vertical", name: "ab-badgestyle-overflow", value: currentOverflow, onRadioChange: (value) => updateBadgeStyle({ OverflowMode: value }), children: OVERFLOW_CHOICES.map((choice) => (_jsx(Radio, { value: choice.value, disabled: disabled, children: _jsxs(Flex, { alignItems: "center", children: [_jsx(Box, { className: "twa:min-w-[110px]", children: choice.label }), _jsx(Box, { className: "twa:text-xs twa:opacity-70", children: choice.hint })] }) }, choice.value))) }) }) }) }) })] })] })), _jsxs(Card, { shadow: false, children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Cell Style" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Styling and alignment to apply to Badge cells (overrides Format Column)" })] }), _jsxs(Card.Body, { children: [_jsx(FormLayout, { sizes: [...BADGE_STYLE_FORM_SIZES], children: _jsx(FormRow, { label: "Alignment:", children: _jsx(Flex, { alignItems: "center", className: "twa:gap-2", children: _jsxs(ToggleGroup, { children: [_jsx(Toggle, { icon: "align-left", pressed: currentAlignment === 'Left', onPressedChange: (pressed) => updateBadgeRowAlignment(pressed ? 'Left' : undefined) }), _jsx(Toggle, { icon: "align-center", pressed: currentAlignment === 'Center', onPressedChange: (pressed) => updateBadgeRowAlignment(pressed ? 'Center' : undefined) }), _jsx(Toggle, { icon: "align-right", pressed: currentAlignment === 'Right', onPressedChange: (pressed) => updateBadgeRowAlignment(pressed ? 'Right' : undefined) })] }) }) }) }), _jsx(Box, { className: "twa:mt-3", children: _jsx(StyledColumnCellStyleEditor, { disabled: disabled, value: badgeStyle.Cell, onChange: (next) => {
267
266
  if (next) {
268
267
  updateBadgeStyle({ Cell: next });
269
268
  }
@@ -1,8 +1,6 @@
1
1
  import * as React from 'react';
2
- import { AdaptableApi } from '../../../Api/AdaptableApi';
3
2
  import { CellBoxStyle, CellFontStyle } from '../../../AdaptableState/Common/AdaptableStyle';
4
3
  export interface StyledColumnFontStyleEditorProps {
5
- api: AdaptableApi;
6
4
  /** Current Font slice (may be undefined / partial). */
7
5
  value: CellFontStyle | undefined;
8
6
  /**
@@ -19,7 +17,6 @@ export interface StyledColumnFontStyleEditorProps {
19
17
  }
20
18
  export declare const StyledColumnFontStyleEditor: React.FunctionComponent<StyledColumnFontStyleEditorProps>;
21
19
  export interface StyledColumnCellStyleEditorProps {
22
- api: AdaptableApi;
23
20
  /** Current Cell slice (may be undefined / partial). */
24
21
  value: CellBoxStyle | undefined;
25
22
  /**
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import * as React from 'react';
3
- import { OptionalColorPicker } from '../../../components/ColorPicker';
3
+ import { ColorField } from '../../../components/ColorField';
4
4
  import FormLayout, { FormRow } from '../../../components/FormLayout';
5
5
  import { Box, Flex } from '../../../components/Flex';
6
6
  import { NumberInput } from '../../../components/Input/NumberInput';
@@ -42,7 +42,7 @@ export const StyledColumnFontStyleEditor = (props) => {
42
42
  const onAlignmentChange = (alignment) => {
43
43
  update({ Alignment: alignment });
44
44
  };
45
- return (_jsx(Box, { children: _jsxs(FormLayout, { className: "twa:ml-2", sizes: [...FORM_SIZES], children: [_jsx(FormRow, { label: "Text Colour:", children: _jsx(OptionalColorPicker, { className: "twa:ml-2", disabled: disabled, api: props.api, value: font.ForeColor, defaultColor: "#000000", onChange: onForeColorChange }) }), _jsx(FormRow, { label: "Font:", children: _jsx(Box, { className: disabledClass, children: _jsxs(Flex, { alignItems: "center", className: "twa:ml-2 twa:gap-2 twa:flex-wrap", children: [_jsxs(Flex, { alignItems: "center", className: "twa:gap-2", children: [_jsx(Toggle, { standalone: true, pressed: font.FontStyle === 'Italic', onPressedChange: (pressed) => update({ FontStyle: pressed ? 'Italic' : undefined }), icon: "italic" }), _jsx(Toggle, { standalone: true, pressed: font.FontWeight === 'Bold', onPressedChange: (pressed) => update({ FontWeight: pressed ? 'Bold' : undefined }), icon: "bold" })] }), _jsxs(ToggleGroup, { children: [_jsx(Toggle, { pressed: font.TextDecoration === 'Underline', onPressedChange: (pressed) => update({ TextDecoration: pressed ? 'Underline' : undefined }), icon: "underline" }), _jsx(Toggle, { pressed: font.TextDecoration === 'LineThrough', onPressedChange: (pressed) => update({ TextDecoration: pressed ? 'LineThrough' : undefined }), icon: "strikethrough" }), _jsx(Toggle, { pressed: font.TextDecoration === 'Overline', onPressedChange: (pressed) => update({ TextDecoration: pressed ? 'Overline' : undefined }), icon: "overline" })] }), _jsx(Box, { className: "twa:w-32", children: _jsx(SingleSelect, { placeholder: "Default size", items: FONT_SIZE_ITEMS, value: font.FontSize ?? '', onValueChange: (value) => update({
45
+ return (_jsx(Box, { children: _jsxs(FormLayout, { className: "twa:ml-2", sizes: [...FORM_SIZES], children: [_jsx(FormRow, { label: "Text Colour:", children: _jsx(ColorField, { className: "twa:ml-2", disabled: disabled, value: font.ForeColor, defaultColor: "#000000", onChange: onForeColorChange }) }), _jsx(FormRow, { label: "Font:", children: _jsx(Box, { className: disabledClass, children: _jsxs(Flex, { alignItems: "center", className: "twa:ml-2 twa:gap-2 twa:flex-wrap", children: [_jsxs(Flex, { alignItems: "center", className: "twa:gap-2", children: [_jsx(Toggle, { standalone: true, pressed: font.FontStyle === 'Italic', onPressedChange: (pressed) => update({ FontStyle: pressed ? 'Italic' : undefined }), icon: "italic" }), _jsx(Toggle, { standalone: true, pressed: font.FontWeight === 'Bold', onPressedChange: (pressed) => update({ FontWeight: pressed ? 'Bold' : undefined }), icon: "bold" })] }), _jsxs(ToggleGroup, { children: [_jsx(Toggle, { pressed: font.TextDecoration === 'Underline', onPressedChange: (pressed) => update({ TextDecoration: pressed ? 'Underline' : undefined }), icon: "underline" }), _jsx(Toggle, { pressed: font.TextDecoration === 'LineThrough', onPressedChange: (pressed) => update({ TextDecoration: pressed ? 'LineThrough' : undefined }), icon: "strikethrough" }), _jsx(Toggle, { pressed: font.TextDecoration === 'Overline', onPressedChange: (pressed) => update({ TextDecoration: pressed ? 'Overline' : undefined }), icon: "overline" })] }), _jsx(Box, { className: "twa:w-32", children: _jsx(SingleSelect, { placeholder: "Default size", items: FONT_SIZE_ITEMS, value: font.FontSize ?? '', onValueChange: (value) => update({
46
46
  FontSize: (value || undefined),
47
47
  }) }) })] }) }) }), !hideAlignment && (_jsx(FormRow, { label: "Alignment:", children: _jsx(Box, { className: disabledClass, children: _jsx(Flex, { alignItems: "center", className: "twa:ml-2 twa:gap-2", children: _jsxs(ToggleGroup, { children: [_jsx(Toggle, { icon: "align-left", pressed: font.Alignment === 'Left', onPressedChange: (pressed) => onAlignmentChange(pressed ? 'Left' : undefined) }), _jsx(Toggle, { icon: "align-center", pressed: font.Alignment === 'Center', onPressedChange: (pressed) => onAlignmentChange(pressed ? 'Center' : undefined) }), _jsx(Toggle, { icon: "align-right", pressed: font.Alignment === 'Right', onPressedChange: (pressed) => onAlignmentChange(pressed ? 'Right' : undefined) })] }) }) }) }))] }) }));
48
48
  };
@@ -66,7 +66,7 @@ export const StyledColumnCellStyleEditor = (props) => {
66
66
  props.onChange(next);
67
67
  }
68
68
  };
69
- return (_jsx(Box, { children: _jsxs(FormLayout, { className: "twa:ml-2", sizes: [...FORM_SIZES], children: [_jsx(FormRow, { label: "Background:", children: _jsx(OptionalColorPicker, { className: "twa:ml-2", disabled: disabled, api: props.api, value: cell.BackColor, defaultColor: "#ffffff", onChange: (c) => update({ BackColor: c }) }) }), _jsx(FormRow, { label: "Border colour:", children: _jsx(OptionalColorPicker, { className: "twa:ml-2", disabled: disabled, api: props.api, value: cell.BorderColor, defaultColor: "#000000", onChange: (c) => update({ BorderColor: c }) }) }), _jsx(FormRow, { label: "Border radius:", children: _jsxs(Flex, { alignItems: "center", className: "twa:ml-2 twa:gap-2", children: [_jsx(NumberInput, { disabled: disabled, className: "twa:w-20", value: cell.BorderRadius, min: 0, max: 64, step: 1, onChange: (v) => update({ BorderRadius: v === undefined || isNaN(Number(v)) ? undefined : v }) }), _jsx(Box, { className: "twa:text-xs twa:opacity-70", children: "px" })] }) })] }) }));
69
+ return (_jsx(Box, { children: _jsxs(FormLayout, { className: "twa:ml-2", sizes: [...FORM_SIZES], children: [_jsx(FormRow, { label: "Background:", children: _jsx(ColorField, { className: "twa:ml-2", disabled: disabled, value: cell.BackColor, defaultColor: "#ffffff", onChange: (c) => update({ BackColor: c }) }) }), _jsx(FormRow, { label: "Border colour:", children: _jsx(ColorField, { className: "twa:ml-2", disabled: disabled, value: cell.BorderColor, defaultColor: "#000000", onChange: (c) => update({ BorderColor: c }) }) }), _jsx(FormRow, { label: "Border radius:", children: _jsxs(Flex, { alignItems: "center", className: "twa:ml-2 twa:gap-2", children: [_jsx(NumberInput, { disabled: disabled, className: "twa:w-20", value: cell.BorderRadius, min: 0, max: 64, step: 1, onChange: (v) => update({ BorderRadius: v === undefined || isNaN(Number(v)) ? undefined : v }) }), _jsx(Box, { className: "twa:text-xs twa:opacity-70", children: "px" })] }) })] }) }));
70
70
  };
71
71
  export const getCellFontStyleSummaryItems = (font) => {
72
72
  if (!font) {
@@ -6,7 +6,7 @@ import FormLayout, { FormRow } from '../../../components/FormLayout';
6
6
  import { Tag } from '../../../components/Tag';
7
7
  import { renderSummaryStringTags } from '../../Wizard/SummaryColorTag';
8
8
  import AdaptableInput from '../../Components/AdaptableInput';
9
- import { ColorPicker } from '../../../components/ColorPicker';
9
+ import { ColorField } from '../../../components/ColorField';
10
10
  import { CheckBox } from '../../../components/CheckBox';
11
11
  import { Box, Flex } from '../../../components/Flex';
12
12
  import { getCellBoxStyleSummaryItems, StyledColumnCellStyleEditor, } from './StyledColumnSliceStyleEditors';
@@ -144,7 +144,7 @@ export const StyledColumnSparklineSettingsSection = ({ onChange }) => {
144
144
  }), placeholder: 'Auto', title: "User override for the automatically determined min value (based on series data)" }) }), _jsx(FormRow, { label: "Max Value:", children: _jsx(AdaptableInput, { disabled: disabled, type: "number", value: sparklineOptions.max ?? '', onChange: (e) => handleOptionsChange({
145
145
  ...sparklineOptions,
146
146
  max: e.target.value === '' ? undefined : Number(e.target.value),
147
- }), placeholder: 'Auto', title: "User override for the automatically determined max value (based on series data)" }) })] }) })] }), _jsxs(Card, { shadow: false, className: "twa:mb-3", children: [_jsx(Card.Title, { children: "Theming" }), _jsx(Card.Body, { children: _jsx(SparklineThemingOptions, { options: sparklineOptions, onChange: handleOptionsChange }) })] }), _jsxs(Card, { shadow: false, className: "twa:mb-3", children: [_jsx(Card.Title, { children: "Axis" }), _jsx(Card.Body, { children: _jsx(SparklineAxisOptions, { options: sparklineOptions, onChange: handleOptionsChange }) })] }), sparklineOptions.type !== 'bar' && (_jsxs(Card, { shadow: false, className: "twa:mb-3", children: [_jsx(Card.Title, { children: "Markers" }), _jsx(Card.Body, { children: _jsx(SparklineMarkerOptions, { options: sparklineOptions, onChange: handleOptionsChange }) })] })), _jsxs(Card, { shadow: false, className: "twa:mb-3", children: [_jsx(Card.Title, { children: "Tooltip" }), _jsx(Card.Body, { children: _jsx(SparklineTooltipOptions, { options: sparklineOptions, onChange: handleOptionsChange }) })] }), _jsxs(Card, { shadow: false, className: "twa:mb-3", children: [_jsx(Card.Title, { children: "Highlight" }), _jsx(Card.Body, { children: _jsx(SparklineHighlightOptions, { options: sparklineOptions, onChange: handleOptionsChange }) })] }), _jsxs(Card, { shadow: false, className: "twa:mb-3", children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Cell" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[500px]", children: "Optional cell-box styling behind the sparkline" })] }), _jsx(Card.Body, { children: _jsx(StyledColumnCellStyleEditor, { api: api, disabled: disabled, value: data.SparklineStyle?.Cell, onChange: (next) => {
147
+ }), placeholder: 'Auto', title: "User override for the automatically determined max value (based on series data)" }) })] }) })] }), _jsxs(Card, { shadow: false, className: "twa:mb-3", children: [_jsx(Card.Title, { children: "Theming" }), _jsx(Card.Body, { children: _jsx(SparklineThemingOptions, { options: sparklineOptions, onChange: handleOptionsChange }) })] }), _jsxs(Card, { shadow: false, className: "twa:mb-3", children: [_jsx(Card.Title, { children: "Axis" }), _jsx(Card.Body, { children: _jsx(SparklineAxisOptions, { options: sparklineOptions, onChange: handleOptionsChange }) })] }), sparklineOptions.type !== 'bar' && (_jsxs(Card, { shadow: false, className: "twa:mb-3", children: [_jsx(Card.Title, { children: "Markers" }), _jsx(Card.Body, { children: _jsx(SparklineMarkerOptions, { options: sparklineOptions, onChange: handleOptionsChange }) })] })), _jsxs(Card, { shadow: false, className: "twa:mb-3", children: [_jsx(Card.Title, { children: "Tooltip" }), _jsx(Card.Body, { children: _jsx(SparklineTooltipOptions, { options: sparklineOptions, onChange: handleOptionsChange }) })] }), _jsxs(Card, { shadow: false, className: "twa:mb-3", children: [_jsx(Card.Title, { children: "Highlight" }), _jsx(Card.Body, { children: _jsx(SparklineHighlightOptions, { options: sparklineOptions, onChange: handleOptionsChange }) })] }), _jsxs(Card, { shadow: false, className: "twa:mb-3", children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Cell" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[500px]", children: "Optional cell-box styling behind the sparkline" })] }), _jsx(Card.Body, { children: _jsx(StyledColumnCellStyleEditor, { disabled: disabled, value: data.SparklineStyle?.Cell, onChange: (next) => {
148
148
  const sparkStyle = { ...(data.SparklineStyle ?? {}) };
149
149
  if (next) {
150
150
  sparkStyle.Cell = next;
@@ -181,7 +181,6 @@ const SparklineObjectArrayProperties = ({ options, onChange, }) => {
181
181
  return (_jsxs(_Fragment, { children: [_jsx(FormRow, { label: "X Key", children: _jsx(AdaptableInput, { value: options.xKey ?? 'x', onChange: (e) => onChange({ ...options, xKey: e.target.value }) }) }), _jsx(FormRow, { label: "Y Key", children: _jsx(AdaptableInput, { value: options.yKey ?? 'y', onChange: (e) => onChange({ ...options, yKey: e.target.value }) }) }), previewData && (_jsx(FormRow, { label: "Preview", children: _jsx(Tag, { children: previewData }) }))] }));
182
182
  };
183
183
  const SparklineThemingOptions = ({ options, onChange, }) => {
184
- const { api } = useOnePageAdaptableWizardContext();
185
184
  const sparklineOptions = options;
186
185
  const handleChange = (key, value) => {
187
186
  onChange({ ...options, [key]: value });
@@ -219,7 +218,7 @@ const SparklineThemingOptions = ({ options, onChange, }) => {
219
218
  { value: 'ag-financial', label: 'Financial' },
220
219
  { value: 'ag-financial-dark', label: 'Financial Dark' },
221
220
  ];
222
- return (_jsxs(FormLayout, { children: [sparklineOptions.type !== 'line' && (_jsx(FormRow, { label: "Fill", children: _jsxs(Box, { children: [_jsx(ColorPicker, { title: "The colour for filling shapes", api: api, value: cssColorToString(sparklineOptions.fill) ?? '', onChange: (color) => applySeriesColour({ fill: color }) }), _jsx(Box, { className: "twa:mt-1 twa:text-1 twa:opacity-70", children: "Bar, column, and area body colour." })] }) })), _jsx(FormRow, { label: "Stroke", children: _jsxs(Box, { children: [_jsxs(Flex, { alignItems: "center", children: [_jsx(ColorPicker, { title: "The colour for the stroke", api: api, value: cssColorToString(sparklineOptions.stroke) ?? '', onChange: (color) => applySeriesColour({ stroke: color }) }), _jsx(Box, { className: "twa:ml-2 twa:mr-1", children: "Width" }), _jsx(AdaptableInput, { title: "The width of the stroke in pixels", type: "number", className: "twa:w-[70px]", min: 0, value: sparklineOptions.strokeWidth ?? '', onChange: (e) => handleChange('strokeWidth', Number(e.target.value)) })] }), _jsx(Box, { className: "twa:mt-1 twa:text-1 twa:opacity-70", children: sparklineOptions.type === 'line'
221
+ return (_jsxs(FormLayout, { children: [sparklineOptions.type !== 'line' && (_jsx(FormRow, { label: "Fill", children: _jsxs(Box, { children: [_jsx(ColorField, { clearable: false, title: "The colour for filling shapes", value: cssColorToString(sparklineOptions.fill) ?? '', onChange: (color) => applySeriesColour({ fill: color }) }), _jsx(Box, { className: "twa:mt-1 twa:text-1 twa:opacity-70", children: "Bar, column, and area body colour." })] }) })), _jsx(FormRow, { label: "Stroke", children: _jsxs(Box, { children: [_jsxs(Flex, { alignItems: "center", children: [_jsx(ColorField, { clearable: false, title: "The colour for the stroke", value: cssColorToString(sparklineOptions.stroke) ?? '', onChange: (color) => applySeriesColour({ stroke: color }) }), _jsx(Box, { className: "twa:ml-2 twa:mr-1", children: "Width" }), _jsx(AdaptableInput, { title: "The width of the stroke in pixels", type: "number", className: "twa:w-[70px]", min: 0, value: sparklineOptions.strokeWidth ?? '', onChange: (e) => handleChange('strokeWidth', Number(e.target.value)) })] }), _jsx(Box, { className: "twa:mt-1 twa:text-1 twa:opacity-70", children: sparklineOptions.type === 'line'
223
222
  ? 'Line colour. Marker colours are in the Markers card.'
224
223
  : 'Outline colour — increase width to see it on bars and columns.' })] }) }), _jsx(FormRow, { label: "Padding", children: _jsxs(Flex, { alignItems: "center", children: [_jsx(Box, { className: "twa:mr-1", children: "Top" }), _jsx(AdaptableInput, { type: "number", min: 0, value: getPaddingOptions().top ?? '', onChange: (e) => handlePaddingChange('top', Number(e.target.value)), className: "twa:w-[70px]", title: "The number of pixels of padding at the top of the chart area" }), _jsx(Box, { className: "twa:ml-2 twa:mr-1", children: "Right" }), _jsx(AdaptableInput, { type: "number", min: 0, value: getPaddingOptions().right ?? '', onChange: (e) => handlePaddingChange('right', Number(e.target.value)), className: "twa:w-[70px]", title: "The number of pixels of padding at the right of the chart area" }), _jsx(Box, { className: "twa:ml-2 twa:mr-1", children: "Bottom" }), _jsx(AdaptableInput, { type: "number", min: 0, value: getPaddingOptions().bottom ?? '', onChange: (e) => handlePaddingChange('bottom', Number(e.target.value)), className: "twa:w-[70px]", title: "The number of pixels of padding at the bottom of the chart area" }), _jsx(Box, { className: "twa:ml-2 twa:mr-1", children: "Left" }), _jsx(AdaptableInput, { type: "number", min: 0, value: getPaddingOptions().left ?? '', onChange: (e) => handlePaddingChange('left', Number(e.target.value)), className: "twa:w-[70px]", title: "The number of pixels of padding at the left of the chart area" })] }) }), _jsx(FormRow, { label: "Line Dash", children: _jsx(AdaptableInput, { title: "Length of dashes and gaps in pixels (comma-separated values, e.g. '3,6,9')", value: sparklineOptions.lineDash?.join(',') ?? '', onChange: (e) => {
225
224
  const value = e.target.value;
@@ -233,7 +232,7 @@ const SparklineThemingOptions = ({ options, onChange, }) => {
233
232
  } }) }), _jsx(FormRow, { label: "Line Dash Offset", children: _jsx(AdaptableInput, { title: "The offset of the line dash pattern in pixels", type: "number", min: 0, value: sparklineOptions.lineDashOffset ?? '', onChange: (e) => handleChange('lineDashOffset', Number(e.target.value)) }) }), _jsx(FormRow, { label: "Background", children: _jsxs(Flex, { alignItems: "center", children: [_jsx(CheckBox, { checked: sparklineOptions.background?.visible ?? false, onChange: (visible) => handleChange('background', {
234
233
  ...sparklineOptions.background,
235
234
  visible,
236
- }) }), _jsx(Box, { className: "twa:ml-2", children: _jsx(ColorPicker, { disabled: !sparklineOptions.background?.visible, title: "The colour of the chart background", api: api, value: cssColorToString(sparklineOptions.background?.fill) ?? '', onChange: (fill) => handleChange('background', {
235
+ }) }), _jsx(Box, { className: "twa:ml-2", children: _jsx(ColorField, { clearable: false, title: "The colour of the chart background", disabled: !sparklineOptions.background?.visible, value: cssColorToString(sparklineOptions.background?.fill) ?? '', onChange: (fill) => handleChange('background', {
237
236
  ...sparklineOptions.background,
238
237
  fill,
239
238
  }) }) })] }) }), typeof sparklineOptions.theme !== 'object' && (_jsx(FormRow, { label: "Theme", children: _jsxs(Box, { children: [_jsx(Box, { className: "twa:max-w-[160px]", children: _jsx(SingleSelect, { className: "twa:w-full", value: sparklineOptions.theme ?? SPARKLINE_CUSTOM_COLOURS_THEME, onValueChange: (themeName) => {
@@ -247,7 +246,6 @@ const SparklineThemingOptions = ({ options, onChange, }) => {
247
246
  }, items: themes }) }), _jsx(Box, { className: "twa:mt-1 twa:text-1 twa:opacity-70", children: "Palette preset. Use Custom colours when Fill / Stroke above should control the chart." })] }) }))] }));
248
247
  };
249
248
  const SparklineAxisOptions = ({ options, onChange, }) => {
250
- const { api } = useOnePageAdaptableWizardContext();
251
249
  const sparklineOptions = {
252
250
  ...(options ?? {}),
253
251
  axis: {
@@ -270,7 +268,7 @@ const SparklineAxisOptions = ({ options, onChange, }) => {
270
268
  { value: 'time', label: 'Time' },
271
269
  ];
272
270
  const isAxisEnabled = sparklineOptions.axis?.visible ?? false;
273
- return (_jsxs(FormLayout, { children: [_jsx(FormRow, { label: "Show Axis", children: _jsx(CheckBox, { checked: isAxisEnabled, onChange: (visible) => handleChange({ visible }) }) }), _jsx(FormRow, { label: "Axis Type", children: _jsx(Box, { className: "twa:max-w-[160px]", children: _jsx(SingleSelect, { className: "twa:w-full", disabled: !isAxisEnabled, value: sparklineOptions.axis.type, onValueChange: (type) => handleChange({ type }), items: axisTypes }) }) }), _jsx(FormRow, { label: "Stroke", children: _jsxs(Flex, { alignItems: "center", children: [_jsx(ColorPicker, { disabled: !isAxisEnabled, title: "The colour of the axis line", api: api, value: cssColorToString(sparklineOptions.axis?.stroke) ?? '', onChange: (stroke) => handleChange({ stroke }) }), _jsx(Box, { className: "twa:ml-2 twa:mr-1", children: "Width" }), _jsx(AdaptableInput, { disabled: !isAxisEnabled, className: "twa:w-[70px]", title: "The width in pixels of the axis line", type: "number", min: 0, value: sparklineOptions.axis?.strokeWidth ?? '', onChange: (e) => handleChange({ strokeWidth: Number(e.target.value) }) })] }) }), _jsx(FormRow, { label: "Reverse Scale", children: _jsx(CheckBox, { disabled: !isAxisEnabled, checked: sparklineOptions.axis?.reverse, onChange: (reverse) => handleChange({ reverse }) }) }), sparklineOptions.axis.type === 'category' && (_jsx(_Fragment, { children: _jsx(FormRow, { label: "Padding", children: _jsxs(Flex, { alignItems: "center", children: [_jsx(Box, { className: "twa:mr-1", children: "Inner" }), _jsx(AdaptableInput, { disabled: !isAxisEnabled, title: "The size of the gap between categories (0-1)", type: "number", min: 0, max: 1, step: 0.1, value: sparklineOptions.axis?.paddingInner ?? '', onChange: (e) => handleChange({ paddingInner: Number(e.target.value) }) }), _jsx(Box, { className: "twa:ml-2 twa:mr-1", children: "Outer" }), _jsx(AdaptableInput, { disabled: !isAxisEnabled, title: "The padding on the outside of first and last categories (0-1)", type: "number", min: 0, max: 1, step: 0.1, value: sparklineOptions.axis?.paddingOuter ?? '', onChange: (e) => handleChange({ paddingOuter: Number(e.target.value) }) })] }) }) }))] }));
271
+ return (_jsxs(FormLayout, { children: [_jsx(FormRow, { label: "Show Axis", children: _jsx(CheckBox, { checked: isAxisEnabled, onChange: (visible) => handleChange({ visible }) }) }), _jsx(FormRow, { label: "Axis Type", children: _jsx(Box, { className: "twa:max-w-[160px]", children: _jsx(SingleSelect, { className: "twa:w-full", disabled: !isAxisEnabled, value: sparklineOptions.axis.type, onValueChange: (type) => handleChange({ type }), items: axisTypes }) }) }), _jsx(FormRow, { label: "Stroke", children: _jsxs(Flex, { alignItems: "center", children: [_jsx(ColorField, { clearable: false, title: "The colour of the axis line", disabled: !isAxisEnabled, value: cssColorToString(sparklineOptions.axis?.stroke) ?? '', onChange: (stroke) => handleChange({ stroke }) }), _jsx(Box, { className: "twa:ml-2 twa:mr-1", children: "Width" }), _jsx(AdaptableInput, { disabled: !isAxisEnabled, className: "twa:w-[70px]", title: "The width in pixels of the axis line", type: "number", min: 0, value: sparklineOptions.axis?.strokeWidth ?? '', onChange: (e) => handleChange({ strokeWidth: Number(e.target.value) }) })] }) }), _jsx(FormRow, { label: "Reverse Scale", children: _jsx(CheckBox, { disabled: !isAxisEnabled, checked: sparklineOptions.axis?.reverse, onChange: (reverse) => handleChange({ reverse }) }) }), sparklineOptions.axis.type === 'category' && (_jsx(_Fragment, { children: _jsx(FormRow, { label: "Padding", children: _jsxs(Flex, { alignItems: "center", children: [_jsx(Box, { className: "twa:mr-1", children: "Inner" }), _jsx(AdaptableInput, { disabled: !isAxisEnabled, title: "The size of the gap between categories (0-1)", type: "number", min: 0, max: 1, step: 0.1, value: sparklineOptions.axis?.paddingInner ?? '', onChange: (e) => handleChange({ paddingInner: Number(e.target.value) }) }), _jsx(Box, { className: "twa:ml-2 twa:mr-1", children: "Outer" }), _jsx(AdaptableInput, { disabled: !isAxisEnabled, title: "The padding on the outside of first and last categories (0-1)", type: "number", min: 0, max: 1, step: 0.1, value: sparklineOptions.axis?.paddingOuter ?? '', onChange: (e) => handleChange({ paddingOuter: Number(e.target.value) }) })] }) }) }))] }));
274
272
  };
275
273
  const SparklineTooltipOptions = ({ options, onChange, }) => {
276
274
  const sparklineOptions = options;
@@ -315,7 +313,6 @@ const SparklineTooltipOptions = ({ options, onChange, }) => {
315
313
  }) }) }) })] }));
316
314
  };
317
315
  const SparklineMarkerOptions = ({ options, onChange }) => {
318
- const { api } = useOnePageAdaptableWizardContext();
319
316
  const sparklineOptions = options;
320
317
  const handleChange = (value) => {
321
318
  onChange({
@@ -338,10 +335,9 @@ const SparklineMarkerOptions = ({ options, onChange }) => {
338
335
  { value: 'triangle', label: 'Triangle' },
339
336
  ];
340
337
  const isMarkerEnabled = sparklineOptions.marker?.enabled ?? false;
341
- return (_jsxs(FormLayout, { children: [_jsx(FormRow, { label: "Show Markers", children: _jsx(CheckBox, { checked: isMarkerEnabled, onChange: (enabled) => handleChange({ enabled }) }) }), _jsx(FormRow, { label: "Marker Size", children: _jsx(Box, { className: "twa:max-w-[160px]", children: _jsx(AdaptableInput, { disabled: !isMarkerEnabled, type: "number", className: "twa:w-full", min: 1, value: sparklineOptions.marker?.size ?? '', onChange: (e) => handleChange({ size: Number(e.target.value) }), title: "The size in pixels of the markers" }) }) }), _jsx(FormRow, { label: "Marker Shape", children: _jsx(Box, { className: "twa:max-w-[160px]", children: _jsx(SingleSelect, { className: "twa:w-full", disabled: !isMarkerEnabled, value: sparklineOptions.marker?.shape, onValueChange: (shape) => handleChange({ shape: shape }), items: markerShapes }) }) }), _jsx(FormRow, { label: "Fill", children: _jsx(ColorPicker, { disabled: !isMarkerEnabled, title: "The colour for filling markers", api: api, value: sparklineOptions.marker?.fill, onChange: (fill) => handleChange({ fill }) }) }), _jsx(FormRow, { label: "Stroke", children: _jsxs(Flex, { alignItems: "center", children: [_jsx(ColorPicker, { disabled: !isMarkerEnabled, title: "The colour for the marker stroke", api: api, value: cssColorToString(sparklineOptions.marker?.stroke) ?? '', onChange: (stroke) => handleChange({ stroke }) }), _jsx(Box, { className: "twa:ml-2 twa:mr-1", children: "Width" }), _jsx(AdaptableInput, { disabled: !isMarkerEnabled, className: "twa:w-[70px]", type: "number", min: 0, value: sparklineOptions.marker?.strokeWidth ?? '', onChange: (e) => handleChange({ strokeWidth: Number(e.target.value) }), title: "The width of the marker stroke in pixels" })] }) })] }));
338
+ return (_jsxs(FormLayout, { children: [_jsx(FormRow, { label: "Show Markers", children: _jsx(CheckBox, { checked: isMarkerEnabled, onChange: (enabled) => handleChange({ enabled }) }) }), _jsx(FormRow, { label: "Marker Size", children: _jsx(Box, { className: "twa:max-w-[160px]", children: _jsx(AdaptableInput, { disabled: !isMarkerEnabled, type: "number", className: "twa:w-full", min: 1, value: sparklineOptions.marker?.size ?? '', onChange: (e) => handleChange({ size: Number(e.target.value) }), title: "The size in pixels of the markers" }) }) }), _jsx(FormRow, { label: "Marker Shape", children: _jsx(Box, { className: "twa:max-w-[160px]", children: _jsx(SingleSelect, { className: "twa:w-full", disabled: !isMarkerEnabled, value: sparklineOptions.marker?.shape, onValueChange: (shape) => handleChange({ shape: shape }), items: markerShapes }) }) }), _jsx(FormRow, { label: "Fill", children: _jsx(ColorField, { clearable: false, title: "The colour for filling markers", disabled: !isMarkerEnabled, value: sparklineOptions.marker?.fill, onChange: (fill) => handleChange({ fill }) }) }), _jsx(FormRow, { label: "Stroke", children: _jsxs(Flex, { alignItems: "center", children: [_jsx(ColorField, { clearable: false, title: "The colour for the marker stroke", disabled: !isMarkerEnabled, value: cssColorToString(sparklineOptions.marker?.stroke) ?? '', onChange: (stroke) => handleChange({ stroke }) }), _jsx(Box, { className: "twa:ml-2 twa:mr-1", children: "Width" }), _jsx(AdaptableInput, { disabled: !isMarkerEnabled, className: "twa:w-[70px]", type: "number", min: 0, value: sparklineOptions.marker?.strokeWidth ?? '', onChange: (e) => handleChange({ strokeWidth: Number(e.target.value) }), title: "The width of the marker stroke in pixels" })] }) })] }));
342
339
  };
343
340
  const SparklineHighlightOptions = ({ options, onChange, }) => {
344
- const { api } = useOnePageAdaptableWizardContext();
345
341
  const highlightOptions = options.highlight;
346
342
  const handleBaseChange = (value) => {
347
343
  onChange({
@@ -376,5 +372,5 @@ const SparklineHighlightOptions = ({ options, onChange, }) => {
376
372
  },
377
373
  });
378
374
  };
379
- return (_jsxs(FormLayout, { children: [_jsx(FormRow, { label: "Item Fill", children: _jsx(ColorPicker, { title: "The colour for filling highlighted items", api: api, value: highlightOptions?.highlightedItem?.fill, onChange: (fill) => handleItemChange({ fill }) }) }), _jsx(FormRow, { label: "Item Stroke", children: _jsxs(Flex, { alignItems: "center", children: [_jsx(ColorPicker, { title: "The colour for the highlighted item stroke", api: api, value: cssColorToString(highlightOptions?.highlightedItem?.stroke) ?? '', onChange: (stroke) => handleItemChange({ stroke }) }), _jsx(Box, { className: "twa:ml-2 twa:mr-1", children: "Width" }), _jsx(AdaptableInput, { className: "twa:w-[70px]", type: "number", min: 0, value: highlightOptions?.highlightedItem?.strokeWidth ?? '', onChange: (e) => handleItemChange({ strokeWidth: Number(e.target.value) }), title: "The width of the highlighted item stroke in pixels" })] }) }), _jsx(FormRow, { label: "Series", children: _jsxs(Flex, { alignItems: "center", children: [_jsx(CheckBox, { checked: highlightOptions?.enabled ?? false, onChange: (enabled) => handleBaseChange({ enabled }) }), _jsx(Box, { className: "twa:ml-2 twa:mr-1", children: "Stroke Width" }), _jsx(AdaptableInput, { disabled: !highlightOptions?.enabled, className: "twa:w-[70px]", type: "number", min: 0, value: highlightOptions?.highlightedSeries?.strokeWidth ?? '', onChange: (e) => handleSeriesChange({ strokeWidth: Number(e.target.value) }), title: "The stroke width when markers are hovered or tooltip is shown" })] }) })] }));
375
+ return (_jsxs(FormLayout, { children: [_jsx(FormRow, { label: "Item Fill", children: _jsx(ColorField, { clearable: false, title: "The colour for filling highlighted items", value: highlightOptions?.highlightedItem?.fill, onChange: (fill) => handleItemChange({ fill }) }) }), _jsx(FormRow, { label: "Item Stroke", children: _jsxs(Flex, { alignItems: "center", children: [_jsx(ColorField, { clearable: false, title: "The colour for the highlighted item stroke", value: cssColorToString(highlightOptions?.highlightedItem?.stroke) ?? '', onChange: (stroke) => handleItemChange({ stroke }) }), _jsx(Box, { className: "twa:ml-2 twa:mr-1", children: "Width" }), _jsx(AdaptableInput, { className: "twa:w-[70px]", type: "number", min: 0, value: highlightOptions?.highlightedItem?.strokeWidth ?? '', onChange: (e) => handleItemChange({ strokeWidth: Number(e.target.value) }), title: "The width of the highlighted item stroke in pixels" })] }) }), _jsx(FormRow, { label: "Series", children: _jsxs(Flex, { alignItems: "center", children: [_jsx(CheckBox, { checked: highlightOptions?.enabled ?? false, onChange: (enabled) => handleBaseChange({ enabled }) }), _jsx(Box, { className: "twa:ml-2 twa:mr-1", children: "Stroke Width" }), _jsx(AdaptableInput, { disabled: !highlightOptions?.enabled, className: "twa:w-[70px]", type: "number", min: 0, value: highlightOptions?.highlightedSeries?.strokeWidth ?? '', onChange: (e) => handleSeriesChange({ strokeWidth: Number(e.target.value) }), title: "The stroke width when markers are hovered or tooltip is shown" })] }) })] }));
380
376
  };