@adaptabletools/adaptable 23.0.0-canary.6 → 23.0.0-canary.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (332) hide show
  1. package/icons/sort-asc.svg +1 -1
  2. package/index.css +755 -256
  3. package/package.json +1 -1
  4. package/src/AdaptableOptions/DataSetOptions.d.ts +26 -2
  5. package/src/AdaptableOptions/DefaultAdaptableOptions.js +0 -1
  6. package/src/AdaptableOptions/SettingsPanelOptions.d.ts +42 -10
  7. package/src/AdaptableState/Common/AdaptableFormat.d.ts +7 -0
  8. package/src/AdaptableState/Common/AdaptableMessageType.d.ts +1 -1
  9. package/src/AdaptableState/Common/Enums.d.ts +1 -1
  10. package/src/AdaptableState/Common/Enums.js +1 -1
  11. package/src/AdaptableState/StyledColumnState.d.ts +2 -2
  12. package/src/Api/Internal/AlertInternalApi.js +1 -1
  13. package/src/Api/Internal/DataSetInternalApi.d.ts +3 -0
  14. package/src/Api/Internal/DataSetInternalApi.js +73 -13
  15. package/src/Redux/Store/AdaptableStore.js +6 -4
  16. package/src/Strategy/CalculatedColumnModule.js +1 -0
  17. package/src/Strategy/ColumnFilterModule.js +1 -0
  18. package/src/Strategy/FlashingCellModule.js +6 -2
  19. package/src/Strategy/FormatColumnModule.js +2 -2
  20. package/src/Strategy/FreeTextColumnModule.js +38 -28
  21. package/src/Strategy/Interface/IModule.d.ts +3 -1
  22. package/src/Strategy/LayoutModule.js +15 -66
  23. package/src/Strategy/StyledColumnModule.js +12 -29
  24. package/src/Strategy/Utilities/CustomSort/getCustomSortColumnViewItems.d.ts +1 -0
  25. package/src/Strategy/Utilities/CustomSort/getCustomSortColumnViewItems.js +1 -0
  26. package/src/Strategy/Utilities/Export/getExportColumnsViewItems.d.ts +2 -0
  27. package/src/Strategy/Utilities/Export/getExportColumnsViewItems.js +14 -0
  28. package/src/Strategy/Utilities/Export/getExportRowsViewItems.d.ts +1 -0
  29. package/src/Strategy/Utilities/Export/getExportRowsViewItems.js +3 -0
  30. package/src/Strategy/Utilities/Layout/aggregationSummaryHelpers.d.ts +11 -0
  31. package/src/Strategy/Utilities/Layout/aggregationSummaryHelpers.js +105 -0
  32. package/src/Strategy/Utilities/Layout/columnsSummaryHelpers.d.ts +48 -0
  33. package/src/Strategy/Utilities/Layout/columnsSummaryHelpers.js +166 -0
  34. package/src/Strategy/Utilities/Layout/getLayoutSortViewItems.d.ts +1 -0
  35. package/src/Strategy/Utilities/Layout/getLayoutSortViewItems.js +1 -0
  36. package/src/Strategy/Utilities/Layout/rowGroupSummaryHelpers.d.ts +26 -0
  37. package/src/Strategy/Utilities/Layout/rowGroupSummaryHelpers.js +85 -0
  38. package/src/Utilities/Defaults/DefaultSettingsPanel.d.ts +3 -5
  39. package/src/Utilities/Defaults/DefaultSettingsPanel.js +46 -41
  40. package/src/Utilities/Helpers/FormatHelper.js +3 -0
  41. package/src/Utilities/Helpers/ScheduleHelper.js +2 -0
  42. package/src/Utilities/Helpers/StyleHelper.d.ts +18 -0
  43. package/src/Utilities/Helpers/StyleHelper.js +27 -0
  44. package/src/Utilities/Helpers/StyledColumnGradientHelper.js +7 -5
  45. package/src/Utilities/Helpers/resolveSettingsPanelNavigation.d.ts +3 -0
  46. package/src/Utilities/Helpers/resolveSettingsPanelNavigation.js +15 -0
  47. package/src/Utilities/getScopeViewItems.js +2 -0
  48. package/src/Utilities/wizardSelection.d.ts +10 -0
  49. package/src/Utilities/wizardSelection.js +15 -0
  50. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/AdaptableOptionsForm.js +2 -2
  51. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsSidebarForm.js +2 -2
  52. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsStatusbarForm.js +3 -3
  53. package/src/View/Alert/AlertViewPanel.js +2 -2
  54. package/src/View/Alert/Utilities/getAlertButtonStyle.js +7 -4
  55. package/src/View/Alert/Wizard/AlertBehaviourWizardSection.d.ts +0 -1
  56. package/src/View/Alert/Wizard/AlertBehaviourWizardSection.js +0 -4
  57. package/src/View/Alert/Wizard/AlertButtonsEditor.js +2 -1
  58. package/src/View/Alert/Wizard/AlertMessageWizardSection.d.ts +1 -1
  59. package/src/View/Alert/Wizard/AlertMessageWizardSection.js +1 -2
  60. package/src/View/Alert/Wizard/AlertNotificationWizardSection.d.ts +1 -1
  61. package/src/View/Alert/Wizard/AlertNotificationWizardSection.js +3 -4
  62. package/src/View/Alert/Wizard/AlertScheduledWizardSection.d.ts +1 -1
  63. package/src/View/Alert/Wizard/AlertScheduledWizardSection.js +1 -2
  64. package/src/View/Alert/Wizard/AlertTypeWizardSection.d.ts +1 -1
  65. package/src/View/Alert/Wizard/AlertTypeWizardSection.js +31 -7
  66. package/src/View/Alert/Wizard/AlertWizard.js +4 -4
  67. package/src/View/Alert/Wizard/BaseAlertScopeWizardSection.d.ts +2 -1
  68. package/src/View/Alert/Wizard/BaseAlertScopeWizardSection.js +4 -14
  69. package/src/View/BulkUpdate/BulkUpdatePopup.js +1 -1
  70. package/src/View/BulkUpdate/BulkUpdateViewPanel.js +4 -6
  71. package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.d.ts +1 -1
  72. package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.js +1 -2
  73. package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +1 -1
  74. package/src/View/CalculatedColumn/Wizard/CalculatedColumnTypeSection.js +30 -4
  75. package/src/View/CellSummary/CellSummaryViewPanel.js +4 -4
  76. package/src/View/Charting/ShowChartButton.js +8 -8
  77. package/src/View/ColumnInfo/ColumnInfo.js +21 -1
  78. package/src/View/Components/AdaptableObjectCollection/index.js +2 -2
  79. package/src/View/Components/AdaptableObjectList/AdaptableObjectCompactList.js +1 -1
  80. package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +4 -4
  81. package/src/View/Components/AdaptableObjectRow/index.js +2 -2
  82. package/src/View/Components/Buttons/ButtonBase/index.js +2 -3
  83. package/src/View/Components/Buttons/ButtonNew.d.ts +2 -0
  84. package/src/View/Components/Buttons/ButtonNew.js +1 -1
  85. package/src/View/Components/Buttons/EntityListActionButtons.js +3 -3
  86. package/src/View/Components/Buttons/SuspendToggleButton/SuspendToggleButton.js +2 -2
  87. package/src/View/Components/ColumnFilter/ColumnFilter.js +2 -3
  88. package/src/View/Components/ColumnFilter/components/ColumnFilterMenu.js +2 -2
  89. package/src/View/Components/ColumnSelector/index.d.ts +12 -0
  90. package/src/View/Components/ColumnSelector/index.js +30 -6
  91. package/src/View/Components/EntityRulesEditor/EntityRulePredicatesEditor/EntityRulePredicatesEditor.js +2 -2
  92. package/src/View/Components/ModuleValueSelector/index.js +2 -1
  93. package/src/View/Components/NewScopeComponent.js +4 -9
  94. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopup.js +5 -4
  95. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupDialog.js +4 -4
  96. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupModuleView.js +1 -1
  97. package/src/View/Components/Popups/AdaptablePopup/Navigation.d.ts +3 -2
  98. package/src/View/Components/Popups/AdaptablePopup/Navigation.js +38 -28
  99. package/src/View/Components/Popups/AdaptablePopup/PopupPanel.js +3 -3
  100. package/src/View/Components/Popups/AdaptablePopup/TopBar.js +2 -2
  101. package/src/View/Components/Popups/AdaptablePopup/settingsPanelNavigationTypes.d.ts +11 -0
  102. package/src/View/Components/Popups/AdaptablePopup/settingsPanelNavigationTypes.js +1 -0
  103. package/src/View/Components/Popups/AdaptablePopup/useMenuItems.d.ts +3 -1
  104. package/src/View/Components/Popups/AdaptablePopup/useMenuItems.js +25 -27
  105. package/src/View/Components/PredicateEditor/PredicateEditor.js +1 -1
  106. package/src/View/Components/RangesComponent.d.ts +2 -4
  107. package/src/View/Components/RangesComponent.js +95 -66
  108. package/src/View/Components/ReorderDraggable/index.js +2 -2
  109. package/src/View/Components/Selectors/BulkUpdateValueSelector.d.ts +0 -2
  110. package/src/View/Components/Selectors/BulkUpdateValueSelector.js +3 -3
  111. package/src/View/Components/StyleComponent.js +32 -65
  112. package/src/View/Components/ToolPanel/AdaptableToolPanel.js +10 -7
  113. package/src/View/Components/ToolPanel/ToolPanelPopup.d.ts +3 -13
  114. package/src/View/Components/ToolPanel/ToolPanelPopup.js +5 -81
  115. package/src/View/Components/ToolPanel/ToolPanelPopupSections.d.ts +17 -0
  116. package/src/View/Components/ToolPanel/ToolPanelPopupSections.js +76 -0
  117. package/src/View/Components/ValueSelector/index.d.ts +29 -0
  118. package/src/View/Components/ValueSelector/index.js +113 -30
  119. package/src/View/Components/wizardColumnListStyles.d.ts +10 -0
  120. package/src/View/Components/wizardColumnListStyles.js +10 -0
  121. package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.d.ts +2 -1
  122. package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.js +5 -7
  123. package/src/View/CustomSort/Wizard/CustomSortWizard.js +2 -2
  124. package/src/View/Dashboard/DashboardPopup.d.ts +1 -11
  125. package/src/View/Dashboard/DashboardPopup.js +3 -67
  126. package/src/View/Dashboard/DashboardPopupSections.d.ts +20 -0
  127. package/src/View/Dashboard/DashboardPopupSections.js +68 -0
  128. package/src/View/Dashboard/PinnedToolbarsSelector.js +2 -2
  129. package/src/View/DataChangeHistory/DataChangeHistoryPopup.d.ts +1 -6
  130. package/src/View/DataChangeHistory/DataChangeHistoryPopup.js +8 -20
  131. package/src/View/DataChangeHistory/DataChangeHistoryTable.d.ts +8 -0
  132. package/src/View/DataChangeHistory/DataChangeHistoryTable.js +94 -0
  133. package/src/View/DataChangeHistory/buildActionColumnButton.d.ts +5 -3
  134. package/src/View/DataChangeHistory/buildActionColumnButton.js +30 -39
  135. package/src/View/DataChangeHistory/dataChangeHistoryHelpers.d.ts +15 -0
  136. package/src/View/DataChangeHistory/dataChangeHistoryHelpers.js +37 -0
  137. package/src/View/DataImport/DataImportWizard/DataImportWizard.js +1 -1
  138. package/src/View/DataImport/DataImportWizard/sections/ColumnsSection.js +32 -19
  139. package/src/View/DataImport/DataImportWizard/sections/DataPreview.js +1 -1
  140. package/src/View/DataSet/DataSetViewPanel.d.ts +2 -2
  141. package/src/View/Export/ExportDestinationPicker.js +3 -3
  142. package/src/View/Export/ExportViewPanel.js +2 -2
  143. package/src/View/Export/Wizard/ReportColumnsWizardSection.d.ts +2 -1
  144. package/src/View/Export/Wizard/ReportColumnsWizardSection.js +4 -9
  145. package/src/View/Export/Wizard/ReportRowsWizardSection.d.ts +2 -1
  146. package/src/View/Export/Wizard/ReportRowsWizardSection.js +3 -6
  147. package/src/View/FlashingCell/FlashingCellStyle.d.ts +4 -2
  148. package/src/View/FlashingCell/FlashingCellStyle.js +4 -2
  149. package/src/View/FlashingCell/Wizard/FlashingCellRulesWizardSection.d.ts +2 -1
  150. package/src/View/FlashingCell/Wizard/FlashingCellRulesWizardSection.js +7 -11
  151. package/src/View/FlashingCell/Wizard/FlashingCellScopeSummary.d.ts +9 -0
  152. package/src/View/FlashingCell/Wizard/FlashingCellScopeSummary.js +5 -0
  153. package/src/View/FlashingCell/Wizard/FlashingCellScopeWizardSection.d.ts +1 -1
  154. package/src/View/FlashingCell/Wizard/FlashingCellScopeWizardSection.js +1 -0
  155. package/src/View/FlashingCell/Wizard/FlashingCellStyleWizardSection.d.ts +0 -5
  156. package/src/View/FlashingCell/Wizard/FlashingCellStyleWizardSection.js +1 -5
  157. package/src/View/FlashingCell/Wizard/FlashingCellWizard.js +2 -3
  158. package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.d.ts +1 -1
  159. package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +99 -42
  160. package/src/View/FormatColumn/Wizard/FormatColumnRuleWizardSection.d.ts +0 -1
  161. package/src/View/FormatColumn/Wizard/FormatColumnRuleWizardSection.js +0 -4
  162. package/src/View/FormatColumn/Wizard/FormatColumnScopeWizardSection.js +56 -15
  163. package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.js +1 -1
  164. package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.d.ts +2 -3
  165. package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.js +5 -8
  166. package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +8 -13
  167. package/src/View/FreeTextColumn/Utilities/getFreeTextColumnSettingsTags.js +3 -2
  168. package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.js +1 -2
  169. package/src/View/GridFilter/GridFilterPopupUI/index.js +3 -2
  170. package/src/View/GridFilter/GridFilterViewPanel.js +5 -5
  171. package/src/View/GridInfo/GridInfoPopup/AdaptableObjectsSummary.js +2 -2
  172. package/src/View/GridInfo/GridInfoPopup/GridInfoPopup.js +2 -2
  173. package/src/View/Layout/LayoutViewPanel.js +1 -1
  174. package/src/View/Layout/Wizard/LayoutWizard.js +24 -28
  175. package/src/View/Layout/Wizard/sections/AggregationsSection.d.ts +13 -1
  176. package/src/View/Layout/Wizard/sections/AggregationsSection.js +73 -33
  177. package/src/View/Layout/Wizard/sections/ColumnsSection.d.ts +4 -1
  178. package/src/View/Layout/Wizard/sections/ColumnsSection.js +155 -276
  179. package/src/View/Layout/Wizard/sections/PivotAggregationsSection.d.ts +4 -1
  180. package/src/View/Layout/Wizard/sections/PivotAggregationsSection.js +148 -145
  181. package/src/View/Layout/Wizard/sections/PivotColumnsSection.d.ts +5 -2
  182. package/src/View/Layout/Wizard/sections/PivotColumnsSection.js +24 -12
  183. package/src/View/Layout/Wizard/sections/PivotRowGroupingSection.d.ts +4 -1
  184. package/src/View/Layout/Wizard/sections/PivotRowGroupingSection.js +23 -12
  185. package/src/View/Layout/Wizard/sections/RowGroupingSection.d.ts +5 -2
  186. package/src/View/Layout/Wizard/sections/RowGroupingSection.js +19 -12
  187. package/src/View/Layout/Wizard/sections/RowSelectionSection.js +8 -4
  188. package/src/View/Layout/Wizard/sections/RowSummarySection.js +11 -11
  189. package/src/View/Layout/Wizard/sections/SortSection.d.ts +12 -2
  190. package/src/View/Layout/Wizard/sections/SortSection.js +41 -17
  191. package/src/View/Layout/Wizard/sections/columnLayoutCards.d.ts +20 -0
  192. package/src/View/Layout/Wizard/sections/columnLayoutCards.js +159 -0
  193. package/src/View/Layout/Wizard/sections/columnLayoutHelpers.d.ts +30 -0
  194. package/src/View/Layout/Wizard/sections/columnLayoutHelpers.js +201 -0
  195. package/src/View/Layout/Wizard/sections/layoutWizardAccordionHelpers.d.ts +8 -0
  196. package/src/View/Layout/Wizard/sections/layoutWizardAccordionHelpers.js +63 -0
  197. package/src/View/Layout/Wizard/sections/layoutWizardColumns.d.ts +11 -0
  198. package/src/View/Layout/Wizard/sections/layoutWizardColumns.js +52 -0
  199. package/src/View/License/LicenseWatermark.js +1 -1
  200. package/src/View/NamedQuery/Wizard/NamedQueryExpressionWizardSection.d.ts +1 -1
  201. package/src/View/NamedQuery/Wizard/NamedQueryExpressionWizardSection.js +1 -2
  202. package/src/View/Note/NoteEditor.js +2 -2
  203. package/src/View/QuickSearch/QuickSearchPopup.js +2 -3
  204. package/src/View/Schedule/Wizard/ScheduleScheduleWizard.js +1 -1
  205. package/src/View/Shortcut/Wizard/ShortcutSettingsWizard.js +1 -1
  206. package/src/View/SmartEdit/SmartEditPopup.js +2 -2
  207. package/src/View/SmartEdit/SmartEditViewPanel.js +2 -2
  208. package/src/View/StateManagement/StateManagementPopup.js +1 -1
  209. package/src/View/StateManagement/components/ExportDropdown.d.ts +2 -2
  210. package/src/View/StateManagement/components/ExportDropdown.js +12 -12
  211. package/src/View/StatusBar/StatusBarPanel.js +2 -2
  212. package/src/View/StatusBar/StatusBarPopup.js +33 -5
  213. package/src/View/StatusBar/statusBarPanelHelpers.d.ts +2 -0
  214. package/src/View/StatusBar/statusBarPanelHelpers.js +7 -0
  215. package/src/View/StyledColumn/Wizard/BadgePillStyleEditor.d.ts +2 -0
  216. package/src/View/StyledColumn/Wizard/BadgePillStyleEditor.js +14 -11
  217. package/src/View/StyledColumn/Wizard/StyledColumnBadgeSection.d.ts +2 -2
  218. package/src/View/StyledColumn/Wizard/StyledColumnBadgeSection.js +137 -119
  219. package/src/View/StyledColumn/Wizard/StyledColumnSliceStyleEditors.js +8 -14
  220. package/src/View/StyledColumn/Wizard/StyledColumnSparklineSettingsSection.js +2 -1
  221. package/src/View/StyledColumn/Wizard/StyledColumnTypeThumbnail.d.ts +5 -0
  222. package/src/View/StyledColumn/Wizard/StyledColumnTypeThumbnail.js +50 -0
  223. package/src/View/StyledColumn/Wizard/StyledColumnWizard.d.ts +2 -0
  224. package/src/View/StyledColumn/Wizard/StyledColumnWizard.js +26 -5
  225. package/src/View/StyledColumn/Wizard/StyledColumnWizardBulletSection.js +8 -17
  226. package/src/View/StyledColumn/Wizard/StyledColumnWizardGradientSection.js +2 -1
  227. package/src/View/StyledColumn/Wizard/StyledColumnWizardIconSection.js +46 -28
  228. package/src/View/StyledColumn/Wizard/StyledColumnWizardRangeBarSection.js +98 -43
  229. package/src/View/StyledColumn/Wizard/StyledColumnWizardRatingSection.js +2 -1
  230. package/src/View/StyledColumn/Wizard/StyledColumnWizardScopeSection.d.ts +1 -1
  231. package/src/View/StyledColumn/Wizard/StyledColumnWizardScopeSection.js +32 -46
  232. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardStyleSection.js +11 -6
  233. package/src/View/StyledColumn/Wizard/StyledColumnWizardTypeSection.js +94 -7
  234. package/src/View/UIHelper.d.ts +0 -2
  235. package/src/View/UIHelper.js +8 -23
  236. package/src/View/Wizard/CollapsibleWizardCard.d.ts +68 -0
  237. package/src/View/Wizard/CollapsibleWizardCard.js +81 -0
  238. package/src/View/Wizard/OnePageWizards.js +6 -6
  239. package/src/View/Wizard/SummaryColorTag.d.ts +24 -0
  240. package/src/View/Wizard/SummaryColorTag.js +67 -0
  241. package/src/View/Wizard/WizardTypeSelection.d.ts +34 -0
  242. package/src/View/Wizard/WizardTypeSelection.js +31 -0
  243. package/src/View/Wizard/rowGroupSummaryTags.d.ts +18 -0
  244. package/src/View/Wizard/rowGroupSummaryTags.js +14 -0
  245. package/src/View/Wizard/scopeSummaryTags.d.ts +6 -0
  246. package/src/View/Wizard/scopeSummaryTags.js +33 -0
  247. package/src/agGrid/AgGridAdapter.js +0 -5
  248. package/src/agGrid/AgGridColumnAdapter.js +2 -2
  249. package/src/agGrid/cellRenderers/ActionColumnRenderer.js +4 -7
  250. package/src/components/AdaptableFormComponent/AdaptableFormComponent.js +1 -1
  251. package/src/components/Card/index.js +5 -6
  252. package/src/components/CheckBox/index.js +2 -3
  253. package/src/components/CodeBlock/index.js +2 -2
  254. package/src/components/ColorPicker/ColorPicker.d.ts +1 -0
  255. package/src/components/ColorPicker/ColorPicker.js +8 -6
  256. package/src/components/ColorPicker/OptionalColorPicker.d.ts +12 -0
  257. package/src/components/ColorPicker/OptionalColorPicker.js +26 -0
  258. package/src/components/ColorPicker/index.d.ts +1 -0
  259. package/src/components/ColorPicker/index.js +1 -0
  260. package/src/components/Combobox/comboboxUtils.d.ts +1 -0
  261. package/src/components/Combobox/index.js +19 -18
  262. package/src/components/Dashboard/DashboardManager.js +2 -4
  263. package/src/components/Dialog/index.js +4 -4
  264. package/src/components/DragAndDropContext/DragAndDropContext.d.ts +5 -0
  265. package/src/components/DragAndDropContext/DragAndDropContext.js +3 -0
  266. package/src/components/DragAndDropContext/ModuleManager.d.ts +15 -3
  267. package/src/components/DragAndDropContext/ModuleManager.js +47 -8
  268. package/src/components/DragAndDropContext/TabList.d.ts +11 -4
  269. package/src/components/DragAndDropContext/TabList.js +52 -38
  270. package/src/components/DragAndDropContext/UnusedPanel.d.ts +4 -3
  271. package/src/components/DragAndDropContext/UnusedPanel.js +15 -11
  272. package/src/components/DragAndDropContext/dragScope.d.ts +6 -0
  273. package/src/components/DragAndDropContext/dragScope.js +26 -0
  274. package/src/components/DragAndDropContext/types.d.ts +7 -0
  275. package/src/components/DropdownButton/index.d.ts +33 -25
  276. package/src/components/DropdownButton/index.js +24 -158
  277. package/src/components/EmptyContent/index.js +2 -2
  278. package/src/components/ErrorBox/index.js +2 -2
  279. package/src/components/ExpressionEditor/BaseEditorInput.js +3 -3
  280. package/src/components/ExpressionEditor/QueryBuilder/QueryBuilderInputs.js +3 -3
  281. package/src/components/ExpressionEditor/QueryBuilder/QueryPredicateBuilder.js +6 -6
  282. package/src/components/FieldWrap/index.js +2 -2
  283. package/src/components/Flex.js +2 -2
  284. package/src/components/FormLayout/index.d.ts +1 -1
  285. package/src/components/HelpBlock/index.js +3 -3
  286. package/src/components/IconSelector/IconSelector.d.ts +8 -0
  287. package/src/components/IconSelector/IconSelector.js +11 -7
  288. package/src/components/IconSelector/index.d.ts +1 -0
  289. package/src/components/IconSelector/index.js +1 -0
  290. package/src/components/Modal/index.js +2 -2
  291. package/src/components/NewSelect/index.js +11 -1
  292. package/src/components/Panel/index.js +7 -7
  293. package/src/components/Radio/index.d.ts +1 -1
  294. package/src/components/Radio/index.js +8 -6
  295. package/src/components/SimpleButton/index.js +7 -7
  296. package/src/components/StylePreview.js +2 -2
  297. package/src/components/Tabs/index.js +4 -4
  298. package/src/components/Tag/Tag.d.ts +16 -0
  299. package/src/components/Tag/Tag.js +14 -4
  300. package/src/components/Tag/columnScopeTagHelpers.d.ts +8 -0
  301. package/src/components/Tag/columnScopeTagHelpers.js +6 -0
  302. package/src/components/Tag/index.d.ts +1 -1
  303. package/src/components/Tag/index.js +1 -1
  304. package/src/components/Textarea/index.js +2 -3
  305. package/src/components/Toggle/Toggle.d.ts +2 -0
  306. package/src/components/Toggle/Toggle.js +14 -7
  307. package/src/components/Toggle/ToggleGroup.js +2 -2
  308. package/src/components/ToggleButton/index.js +4 -4
  309. package/src/components/Tree/TreeDropdown/index.js +3 -4
  310. package/src/components/WarningBox/index.js +2 -2
  311. package/src/components/icons/sort-asc.js +1 -1
  312. package/src/components/ui/button.d.ts +2 -2
  313. package/src/components/ui/combobox.d.ts +3 -1
  314. package/src/components/ui/combobox.js +2 -2
  315. package/src/components/ui/input-group.d.ts +1 -1
  316. package/src/components/ui/select.js +3 -2
  317. package/src/components/ui/textarea.js +1 -1
  318. package/src/env.js +2 -2
  319. package/src/layout-manager/src/index.js +7 -3
  320. package/src/metamodel/adaptable.metamodel.js +1 -1
  321. package/src/types.d.ts +1 -1
  322. package/tsconfig.esm.tsbuildinfo +1 -1
  323. package/src/View/DataChangeHistory/DataChangeHistoryGrid.d.ts +0 -17
  324. package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +0 -290
  325. package/src/components/DropdownButton/DropdownButtonItem.d.ts +0 -12
  326. package/src/components/DropdownButton/DropdownButtonItem.js +0 -1
  327. package/src/components/DropdownButton/renderItem.d.ts +0 -14
  328. package/src/components/DropdownButton/renderItem.js +0 -11
  329. package/src/components/DropdownButton/useExpanded.d.ts +0 -24
  330. package/src/components/DropdownButton/useExpanded.js +0 -56
  331. package/src/components/NewDropdownButton/index.d.ts +0 -27
  332. package/src/components/NewDropdownButton/index.js +0 -24
@@ -0,0 +1,201 @@
1
+ export const COLUMN_PINNING_OPTIONS = [
2
+ { value: 'left', label: 'Left' },
3
+ { value: 'None', label: 'None' },
4
+ { value: 'right', label: 'Right' },
5
+ ];
6
+ export const COLUMN_SORT_OPTIONS = [
7
+ { value: 'Asc', label: 'Asc' },
8
+ { value: 'Desc', label: 'Desc' },
9
+ { value: 'None', label: 'None' },
10
+ ];
11
+ export function getLayoutPinnedColumnIds(layout, side) {
12
+ const pinning = layout.ColumnPinning ?? {};
13
+ return Object.entries(pinning)
14
+ .filter(([, pin]) => pin === side)
15
+ .map(([columnId]) => columnId);
16
+ }
17
+ /** Whether this column has sizing stored in the Layout that differs from grid defaults. */
18
+ export function hasExplicitLayoutSizing(columnId, sizing, resolveDefaultWidth) {
19
+ if (!sizing) {
20
+ return false;
21
+ }
22
+ if (sizing.Flex != null) {
23
+ return true;
24
+ }
25
+ if (sizing.MinWidth != null || sizing.MaxWidth != null) {
26
+ return true;
27
+ }
28
+ if (sizing.Width != null) {
29
+ if (resolveDefaultWidth) {
30
+ return sizing.Width !== resolveDefaultWidth(columnId);
31
+ }
32
+ return true;
33
+ }
34
+ return false;
35
+ }
36
+ export function getLayoutExplicitSizedColumnIds(layout, resolveDefaultWidth) {
37
+ const sizing = layout.ColumnSizing ?? {};
38
+ return Object.keys(sizing).filter((columnId) => hasExplicitLayoutSizing(columnId, sizing[columnId], resolveDefaultWidth));
39
+ }
40
+ export function formatColumnSizingBrief(columnId, sizing, resolveDefaultWidth) {
41
+ if (!hasExplicitLayoutSizing(columnId, sizing, resolveDefaultWidth)) {
42
+ return '';
43
+ }
44
+ const display = getExplicitSizingDisplayValues(columnId, sizing, resolveDefaultWidth);
45
+ const parts = [];
46
+ if (display.flex != null) {
47
+ parts.push(`flex ${display.flex}`);
48
+ }
49
+ else if (display.width != null) {
50
+ parts.push(String(display.width));
51
+ }
52
+ if (display.minWidth != null) {
53
+ parts.push(`min ${display.minWidth}`);
54
+ }
55
+ if (display.maxWidth != null) {
56
+ parts.push(`max ${display.maxWidth}`);
57
+ }
58
+ return parts.join(', ');
59
+ }
60
+ /** Width/flex values to show in the sizing editor (default grid widths are omitted). */
61
+ export function getExplicitSizingDisplayValues(columnId, sizing, resolveDefaultWidth) {
62
+ if (!sizing) {
63
+ return {
64
+ width: undefined,
65
+ flex: undefined,
66
+ minWidth: undefined,
67
+ maxWidth: undefined,
68
+ };
69
+ }
70
+ const width = sizing.Width != null &&
71
+ (!resolveDefaultWidth || sizing.Width !== resolveDefaultWidth(columnId))
72
+ ? sizing.Width
73
+ : undefined;
74
+ return {
75
+ width,
76
+ flex: sizing.Flex ?? undefined,
77
+ minWidth: sizing.MinWidth ?? undefined,
78
+ maxWidth: sizing.MaxWidth ?? undefined,
79
+ };
80
+ }
81
+ export function formatColumnInspectorPinning(layout, columnId) {
82
+ const pin = layout.ColumnPinning?.[columnId];
83
+ if (pin === 'left') {
84
+ return 'Left';
85
+ }
86
+ if (pin === 'right') {
87
+ return 'Right';
88
+ }
89
+ return 'None';
90
+ }
91
+ export function formatColumnInspectorSizing(columnId, sizing, resolveDefaultWidth) {
92
+ if (!hasExplicitLayoutSizing(columnId, sizing, resolveDefaultWidth)) {
93
+ return 'Default';
94
+ }
95
+ const display = getExplicitSizingDisplayValues(columnId, sizing, resolveDefaultWidth);
96
+ const parts = [];
97
+ if (display.width != null) {
98
+ parts.push(String(display.width));
99
+ }
100
+ if (display.flex != null) {
101
+ parts.push(`flex ${display.flex}`);
102
+ }
103
+ if (display.minWidth != null) {
104
+ parts.push(`min ${display.minWidth}`);
105
+ }
106
+ if (display.maxWidth != null) {
107
+ parts.push(`max ${display.maxWidth}`);
108
+ }
109
+ return parts.length ? parts.join(', ') : 'Default';
110
+ }
111
+ export function formatColumnInspectorSorting(layout, columnId) {
112
+ return getColumnSortSelection(layout, columnId);
113
+ }
114
+ export function getColumnSortSelection(layout, columnId) {
115
+ const sort = (layout.ColumnSorts ?? []).find((entry) => entry.ColumnId === columnId);
116
+ return sort?.SortOrder ?? 'None';
117
+ }
118
+ export function applyColumnPinChange(layout, columnId, pinning) {
119
+ const ColumnPinning = { ...layout.ColumnPinning };
120
+ if (pinning) {
121
+ ColumnPinning[columnId] = pinning;
122
+ }
123
+ else {
124
+ delete ColumnPinning[columnId];
125
+ }
126
+ return {
127
+ ...layout,
128
+ ColumnPinning,
129
+ };
130
+ }
131
+ export function applyColumnSortChange(layout, columnId, sortOrder) {
132
+ const existing = layout.ColumnSorts ?? [];
133
+ if (sortOrder === 'None') {
134
+ return {
135
+ ...layout,
136
+ ColumnSorts: existing.filter((entry) => entry.ColumnId !== columnId),
137
+ };
138
+ }
139
+ const current = existing.find((entry) => entry.ColumnId === columnId);
140
+ if (current) {
141
+ return {
142
+ ...layout,
143
+ ColumnSorts: existing.map((entry) => entry.ColumnId === columnId ? { ...entry, SortOrder: sortOrder } : entry),
144
+ };
145
+ }
146
+ return {
147
+ ...layout,
148
+ ColumnSorts: [...existing, { ColumnId: columnId, SortOrder: sortOrder }],
149
+ };
150
+ }
151
+ export function applyColumnSizingFieldChange(layout, columnId, field, value, resolveDefaultWidth) {
152
+ const ColumnSizing = { ...layout.ColumnSizing };
153
+ const colSizingForCol = { ...(ColumnSizing[columnId] ?? {}) };
154
+ const next = { ...colSizingForCol };
155
+ switch (field) {
156
+ case 'width':
157
+ if (value == null || value === resolveDefaultWidth(columnId)) {
158
+ delete next.Width;
159
+ }
160
+ else {
161
+ delete next.Flex;
162
+ next.Width = value;
163
+ }
164
+ break;
165
+ case 'flex':
166
+ if (value == null) {
167
+ delete next.Flex;
168
+ }
169
+ else {
170
+ delete next.Width;
171
+ next.Flex = value;
172
+ }
173
+ break;
174
+ case 'minWidth':
175
+ if (value == null) {
176
+ delete next.MinWidth;
177
+ }
178
+ else {
179
+ next.MinWidth = value;
180
+ }
181
+ break;
182
+ case 'maxWidth':
183
+ if (value == null) {
184
+ delete next.MaxWidth;
185
+ }
186
+ else {
187
+ next.MaxWidth = value;
188
+ }
189
+ break;
190
+ }
191
+ if (hasExplicitLayoutSizing(columnId, next, resolveDefaultWidth)) {
192
+ ColumnSizing[columnId] = next;
193
+ }
194
+ else {
195
+ delete ColumnSizing[columnId];
196
+ }
197
+ return {
198
+ ...layout,
199
+ ColumnSizing,
200
+ };
201
+ }
@@ -0,0 +1,8 @@
1
+ import { Layout, PivotLayout, TableLayout } from '../../../../types';
2
+ export declare function getLayoutWizardInitialExpandedCardId(layoutWizardMode: 'create' | 'edit' | undefined, firstCardId: string, isSectionConfigured: boolean): string | null;
3
+ export declare function isColumnsSectionConfigured(layout: TableLayout): boolean;
4
+ export declare function isRowGroupingSectionConfigured(layout: Layout): boolean;
5
+ export declare function isPivotRowGroupingSectionConfigured(layout: PivotLayout): boolean;
6
+ export declare function isTableAggregationsSectionConfigured(layout: TableLayout): boolean;
7
+ export declare function isPivotAggregationsSectionConfigured(layout: PivotLayout): boolean;
8
+ export declare function isPivotColumnsSectionConfigured(layout: PivotLayout): boolean;
@@ -0,0 +1,63 @@
1
+ export function getLayoutWizardInitialExpandedCardId(layoutWizardMode, firstCardId, isSectionConfigured) {
2
+ if (layoutWizardMode !== 'create' || isSectionConfigured) {
3
+ return null;
4
+ }
5
+ return firstCardId;
6
+ }
7
+ export function isColumnsSectionConfigured(layout) {
8
+ if ((layout.TableColumns?.length ?? 0) > 0) {
9
+ return true;
10
+ }
11
+ if (layout.ColumnPinning && Object.keys(layout.ColumnPinning).length > 0) {
12
+ return true;
13
+ }
14
+ if ((layout.ColumnSorts?.length ?? 0) > 0) {
15
+ return true;
16
+ }
17
+ if (layout.ColumnSizing && Object.keys(layout.ColumnSizing).length > 0) {
18
+ return true;
19
+ }
20
+ return false;
21
+ }
22
+ export function isRowGroupingSectionConfigured(layout) {
23
+ return (layout.RowGroupedColumns?.length ?? 0) > 0;
24
+ }
25
+ export function isPivotRowGroupingSectionConfigured(layout) {
26
+ return (layout.PivotGroupedColumns?.length ?? 0) > 0;
27
+ }
28
+ export function isTableAggregationsSectionConfigured(layout) {
29
+ if ((layout.TableAggregationColumns?.length ?? 0) > 0) {
30
+ return true;
31
+ }
32
+ if (layout.GrandTotalRow != null && layout.GrandTotalRow !== false) {
33
+ return true;
34
+ }
35
+ return false;
36
+ }
37
+ export function isPivotAggregationsSectionConfigured(layout) {
38
+ if ((layout.PivotAggregationColumns?.length ?? 0) > 0) {
39
+ return true;
40
+ }
41
+ if (layout.GrandTotalRow != null && layout.GrandTotalRow !== false) {
42
+ return true;
43
+ }
44
+ if (layout.PivotGrandTotal != null && layout.PivotGrandTotal !== false) {
45
+ return true;
46
+ }
47
+ if (layout.PivotColumnTotal != null && layout.PivotColumnTotal !== false) {
48
+ return true;
49
+ }
50
+ return false;
51
+ }
52
+ export function isPivotColumnsSectionConfigured(layout) {
53
+ if ((layout.PivotColumns?.length ?? 0) > 0) {
54
+ return true;
55
+ }
56
+ if (layout.PivotResultColumnsOrder) {
57
+ return true;
58
+ }
59
+ if ((layout.ColumnSorts?.length ?? 0) > 0) {
60
+ return true;
61
+ }
62
+ return false;
63
+ }
@@ -0,0 +1,11 @@
1
+ import { AdaptableColumn } from '../../../../AdaptableState/Common/AdaptableColumn';
2
+ import type { IAdaptable } from '../../../../AdaptableInterfaces/IAdaptable';
3
+ import type { Layout } from '../../../../../types';
4
+ /** ValueSelector row sizing — matches Visibility and Order list rows. */
5
+ export declare const LAYOUT_WIZARD_COLUMN_LIST_OPTION_CLASS = "twa:!py-1 twa:!px-1.5";
6
+ /** Compact list header — spacing between Select All, Show Selected Only, and search. */
7
+ export declare const LAYOUT_WIZARD_COLUMN_LIST_HEADER_CLASS = "twa:gap-4";
8
+ /** Narrow search field (matches Visibility list column width, not full card width). */
9
+ export declare const LAYOUT_WIZARD_COLUMN_LIST_SEARCH_CLASS = "twa:w-[12rem] twa:shrink-0 twa:min-w-0";
10
+ /** Columns shown in Layout wizard column steps, in layout table order. */
11
+ export declare function getLayoutWizardOrderedColumns(adaptable: IAdaptable, layout: Layout): AdaptableColumn[];
@@ -0,0 +1,52 @@
1
+ import { generateAutoRowGroupColumnForColumn, generateAutoRowGroupSingleColumn, generateAutoTreeSingleColumn, generateSelectionColumn, } from '../../../../Api/Implementation/ColumnApiImpl';
2
+ import ArrayExtensions from '../../../../Utilities/Extensions/ArrayExtensions';
3
+ import { AG_GRID_GROUPED_COLUMN, AG_GRID_SELECTION_COLUMN } from '../../../../Utilities/Constants/GeneralConstants';
4
+ import { WIZARD_COLUMN_LIST_HEADER_CLASS, WIZARD_COLUMN_LIST_OPTION_CLASS, WIZARD_COLUMN_LIST_SEARCH_CLASS, } from '../../../Components/wizardColumnListStyles';
5
+ /** ValueSelector row sizing — matches Visibility and Order list rows. */
6
+ export const LAYOUT_WIZARD_COLUMN_LIST_OPTION_CLASS = WIZARD_COLUMN_LIST_OPTION_CLASS;
7
+ /** Compact list header — spacing between Select All, Show Selected Only, and search. */
8
+ export const LAYOUT_WIZARD_COLUMN_LIST_HEADER_CLASS = WIZARD_COLUMN_LIST_HEADER_CLASS;
9
+ /** Narrow search field (matches Visibility list column width, not full card width). */
10
+ export const LAYOUT_WIZARD_COLUMN_LIST_SEARCH_CLASS = WIZARD_COLUMN_LIST_SEARCH_CLASS;
11
+ /** Columns shown in Layout wizard column steps, in layout table order. */
12
+ export function getLayoutWizardOrderedColumns(adaptable, layout) {
13
+ const hasSelectionColumn = adaptable.api.columnApi
14
+ .getColumns()
15
+ .some((col) => col.isGeneratedSelectionColumn);
16
+ const allColumns = adaptable.api.columnApi
17
+ .getUIAvailableColumns()
18
+ .filter((col) => !col.isGeneratedRowGroupColumn)
19
+ .filter((col) => !col.isGeneratedPivotResultColumn)
20
+ .filter((col) => !col.isGeneratedSelectionColumn);
21
+ if (layout.RowGroupedColumns && layout.RowGroupedColumns.length > 0) {
22
+ if (layout.RowGroupDisplayType === 'single') {
23
+ allColumns.unshift(generateAutoRowGroupSingleColumn());
24
+ }
25
+ else if (layout.RowGroupDisplayType === 'multi') {
26
+ [...layout.RowGroupedColumns].reverse().forEach((col) => {
27
+ const groupCol = generateAutoRowGroupColumnForColumn(adaptable.api.columnApi.getColumnWithColumnId(col));
28
+ allColumns.unshift(groupCol);
29
+ });
30
+ }
31
+ }
32
+ if (adaptable.api.gridApi.isTreeDataGrid() &&
33
+ !allColumns.find((col) => col.columnId === AG_GRID_GROUPED_COLUMN)) {
34
+ allColumns.unshift(generateAutoTreeSingleColumn());
35
+ }
36
+ if (hasSelectionColumn) {
37
+ allColumns.unshift(generateSelectionColumn());
38
+ }
39
+ const colIdToCol = allColumns.reduce((acc, col) => {
40
+ if (col) {
41
+ acc[col.columnId] = col;
42
+ }
43
+ return acc;
44
+ }, {});
45
+ let tableColumns = layout.TableColumns ?? [];
46
+ if (hasSelectionColumn && !tableColumns.includes(AG_GRID_SELECTION_COLUMN)) {
47
+ tableColumns = [AG_GRID_SELECTION_COLUMN, ...tableColumns];
48
+ }
49
+ return ArrayExtensions.sortArrayWithOrder(allColumns.map((col) => col.columnId), tableColumns, { sortUnorderedItems: false })
50
+ .map((colId) => colIdToCol[colId])
51
+ .filter(Boolean);
52
+ }
@@ -1 +1 @@
1
- import{jsx as r,jsxs as t}from"react/jsx-runtime";import*as e from"react";import{Logo as o}from"../../components/Logo";import{Flex as n}from"../../components/Flex";const i={border:"1px solid var(--ab-color-error)",padding:"5px",fontWeight:600,margin:"5px",fontSize:"14px",alignItems:"center",color:"var(--ab-color-foreground)",background:"var(--ab-color-background)"},s=r=>{const t=[["display","none"],["opacity","0"],["position","absolute"],["position","fixed"],["position","relative"],["visibility","hidden"]];for(const[e,o]of t)if(r.style[e]===o)return!1;return!0};export const LicenseWatermark=l=>{const a=e.useRef(null);return e.useEffect(()=>{const r=setInterval(()=>{a.current?.isConnected||alert("It is not allowed to remove the Adaptable watermark."),s(a.current)||alert("It is not allowed to modify the Adaptable watermark."),a?.current?.style&&(a.current.style.border=i.border,a.current.style.padding=i.padding,a.current.style.fontWeight=`${i.fontWeight}`,a.current.style.margin=i.margin,a.current.style.fontSize=i.fontSize,a.current.style.color=i.color,a.current.style.background=i.background,a.current.style.display="flex",a.current.style.position="static",a.current.style.opacity="1",a.current.style.visibility="visible")},5e3);return()=>clearTimeout(r)},[]),t(n,{style:i,ref:a,children:[r(o,{style:{marginRight:10}}),r("div",{children:l.children})]})};
1
+ import{jsx as t,jsxs as e}from"react/jsx-runtime";import*as r from"react";import{Logo as o}from"../../components/Logo";import{Flex as n}from"../../components/Flex";const i={border:"1px solid red",padding:"5px",fontWeight:600,margin:"5px",fontSize:"14px",alignItems:"center",color:"var(--ab-color-foreground)",background:"var(--ab-color-background)"},s=t=>{const e=[["display","none"],["opacity","0"],["position","absolute"],["position","fixed"],["position","relative"],["visibility","hidden"]];for(const[r,o]of e)if(t.style[r]===o)return!1;return!0};export const LicenseWatermark=l=>{const a=r.useRef(null);return r.useEffect(()=>{const t=setInterval(()=>{a.current?.isConnected||alert("It is not allowed to remove the Adaptable watermark."),s(a.current)||alert("It is not allowed to modify the Adaptable watermark."),a?.current?.style&&(a.current.style.border=i.border,a.current.style.padding=i.padding,a.current.style.fontWeight=`${i.fontWeight}`,a.current.style.margin=i.margin,a.current.style.fontSize=i.fontSize,a.current.style.color=i.color,a.current.style.background=i.background,a.current.style.display="flex",a.current.style.position="static",a.current.style.opacity="1",a.current.style.visibility="visible")},5e3);return()=>clearTimeout(t)},[]),e(n,{style:i,ref:a,children:[t(o,{style:{marginRight:10}}),t("div",{children:l.children})]})};
@@ -5,5 +5,5 @@ export interface NamedQueryExpressionWizardSectionProps {
5
5
  onChange: (data: NamedQuery) => void;
6
6
  }
7
7
  export declare const isValidNamedQueryExpression: (data: NamedQuery, api: AdaptableApi) => string | true;
8
- export declare const renderNamedQueryExpressionSummary: (data: NamedQuery) => React.JSX.Element;
8
+ export declare const renderNamedQueryExpressionSummary: (data: NamedQuery, api: AdaptableApi) => React.JSX.Element;
9
9
  export declare const NamedQueryExpressionWizardSection: (props: NamedQueryExpressionWizardSectionProps) => React.JSX.Element;
@@ -15,8 +15,7 @@ export const isValidNamedQueryExpression = (data, api) => {
15
15
  }
16
16
  return valid;
17
17
  };
18
- export const renderNamedQueryExpressionSummary = (data) => {
19
- const { api } = useOnePageAdaptableWizardContext();
18
+ export const renderNamedQueryExpressionSummary = (data, api) => {
20
19
  return (_jsxs(Box, { className: "twa:text-2", children: ["Expression: ", _jsx(Tag, { children: api.internalApi.getAdaptableQueryExpressionText(data) })] }));
21
20
  };
22
21
  export const NamedQueryExpressionWizardSection = (props) => {
@@ -4,7 +4,7 @@ import * as React from 'react';
4
4
  import Textarea from '../../components/Textarea';
5
5
  import SimpleButton from '../../components/SimpleButton';
6
6
  import { useAdaptable } from '../AdaptableContext';
7
- import clsx from 'clsx';
7
+ import { cn } from '../../lib/utils';
8
8
  export const NoteEditor = ({ note, onNoteChange, onClose, editMode, isReadonly }) => {
9
9
  const { api } = useAdaptable();
10
10
  const showPopupCloseButton = api.optionsApi.getNoteOptions()?.showPopupCloseButton ?? true;
@@ -25,7 +25,7 @@ export const NoteEditor = ({ note, onNoteChange, onClose, editMode, isReadonly }
25
25
  if (note === undefined || note === null) {
26
26
  return null;
27
27
  }
28
- return (_jsxs(_Fragment, { children: [_jsx(Textarea, { readOnly: isReadonly, ref: textAreaRef, className: clsx('twa:min-w-[180px] twa:min-h-[120px] twa:w-full', {
28
+ return (_jsxs(_Fragment, { children: [_jsx(Textarea, { readOnly: isReadonly, ref: textAreaRef, className: cn('twa:min-w-[180px] twa:min-h-[120px] twa:w-full', {
29
29
  'twa:pr-[30px]': showPopupCloseButton,
30
30
  'twa:pr-0': !showPopupCloseButton,
31
31
  }), value: liveValue, onBlur: () => onClose(), onKeyDown: (event) => {
@@ -10,10 +10,9 @@ import { Tabs } from '../../components/Tabs';
10
10
  import StringExtensions from '../../Utilities/Extensions/StringExtensions';
11
11
  import { useQuickSearchDebounced } from './useQuickSearchDebounced';
12
12
  import { QuickSearchInput } from './QuickSearchInput';
13
- import HelpBlock from '../../components/HelpBlock';
14
13
  import { Card } from '../../components/Card';
15
14
  import { isQuickSearchStyleUnset, resolveQuickSearchCurrentTextMatchStyle, resolveQuickSearchTextMatchStyle, } from '../../Utilities/Helpers/QuickSearchStyleHelper';
16
- const QuickSearchStyleEditor = ({ api, helpText, headerText, style, updateStyle }) => (_jsxs(Flex, { flexDirection: "column", className: "twa:gap-2", children: [_jsx(HelpBlock, { className: "twa:text-2", children: helpText }), _jsx(StyleComponent, { headless: true, hidePreview: true, className: "twa:h-full twa:flex-1 twa:rounded-none", headerText: headerText, api: api, Style: style, UpdateStyle: updateStyle })] }));
15
+ const QuickSearchStyleEditor = ({ api, helpText, headerText, style, updateStyle }) => (_jsxs(Card, { shadow: false, children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: headerText }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: helpText })] }), _jsx(Card.Body, { className: "twa:p-1", children: _jsx(StyleComponent, { headless: true, hidePreview: true, className: "twa:h-full twa:flex-1 twa:rounded-none", api: api, Style: style, UpdateStyle: updateStyle }) })] }));
17
16
  const QuickSearchPopupComponent = (props) => {
18
17
  const [searchText, search] = useQuickSearchDebounced(props);
19
18
  const [state, setState] = useState({
@@ -25,7 +24,7 @@ const QuickSearchPopupComponent = (props) => {
25
24
  checked;
26
25
  };
27
26
  const isServerSideRowModel = props.api.agGridApi.getGridOption('rowModelType') === 'serverSide';
28
- return (_jsx(PopupPanel, { headerText: props.moduleInfo.FriendlyName, glyphicon: props.moduleInfo.Glyph, infoLink: props.moduleInfo.HelpPage, infoLinkDisabled: !props.api.internalApi.isDocumentationLinksDisplayed(), bodyClassName: "twa:gap-3 twa:flex twa:flex-col", children: _jsxs(Flex, { flexDirection: "column", className: "twa:h-full twa:gap-4", children: [_jsxs(Card, { children: [_jsx(Card.Title, { children: "Search Text" }), _jsx(Card.Body, { className: "twa:p-1 twa:w-fit", children: _jsx(QuickSearchInput, {}) })] }), _jsxs(Card, { children: [_jsx(Card.Title, { children: "Behaviour" }), _jsxs(Card.Body, { className: "twa:p-1", gap: 2, children: [_jsxs(HelpBlock, { className: "twa:text-2 twa:w-fit", children: ["Filter Grid when searching to only show rows with matching cells; ", _jsx("b", { children: "use with care" }), " as can cause performance issues"] }), _jsx(CheckBox, { "data-name": "filter-quick-search-results", value: "existing", checked: state.RunQueryAfterQuickSearch, disabled: StringExtensions.IsNotNullOrEmpty(searchText), onChange: onQuickSearchBehaviourChange, children: "Filter using Quick Search Results" })] })] }), _jsxs(Card, { children: [_jsx(Card.Title, { children: "Matching Styles" }), _jsx(Card.Body, { className: "twa:p-0", children: isServerSideRowModel ? (_jsx(Box, { className: "twa:p-2", children: _jsx(QuickSearchStyleEditor, { api: props.api, helpText: "Server-side row model: styles the whole matching cell.", headerText: "Cell Matching Style", style: props.QuickSearchCellMatchStyle, updateStyle: props.onSetCellMatchingStyle }) })) : (_jsxs(Tabs, { defaultValue: "text", className: "twa:min-h-0", children: [_jsx(Tabs.Tab, { value: "text", children: "Text Match" }), _jsx(Tabs.Tab, { value: "current", children: "Current Match" }), _jsx(Tabs.Tab, { value: "cell", children: "Cell Match" }), _jsx(Tabs.Content, { value: "text", children: _jsx(QuickSearchStyleEditor, { api: props.api, helpText: "Highlights the matching text within each cell (AG Grid Find).", headerText: "Text Matching Style", style: props.QuickSearchTextMatchStyle, updateStyle: props.onSetTextMatchingStyle }) }), _jsx(Tabs.Content, { value: "current", children: _jsx(QuickSearchStyleEditor, { api: props.api, helpText: "Applied to the active match when cycling through results.", headerText: "Current Match Style", style: props.QuickSearchCurrentTextMatchStyle, updateStyle: props.onSetCurrentTextMatchingStyle }) }), _jsx(Tabs.Content, { value: "cell", children: _jsx(QuickSearchStyleEditor, { api: props.api, helpText: "Optional background for whole matching cells. When unset, only matching text is highlighted.", headerText: "Cell Matching Style", style: props.QuickSearchCellMatchStyle, updateStyle: props.onSetCellMatchingStyle }) })] })) })] })] }) }));
27
+ return (_jsx(PopupPanel, { headerText: props.moduleInfo.FriendlyName, glyphicon: props.moduleInfo.Glyph, infoLink: props.moduleInfo.HelpPage, infoLinkDisabled: !props.api.internalApi.isDocumentationLinksDisplayed(), bodyClassName: "twa:gap-3 twa:flex twa:flex-col", children: _jsxs(Flex, { flexDirection: "column", className: "twa:h-full twa:gap-3", children: [_jsxs(Card, { shadow: false, children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Search Text" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Enter the text to find across visible grid cells" })] }), _jsx(Card.Body, { className: "twa:p-1 twa:w-fit", children: _jsx(QuickSearchInput, {}) })] }), _jsxs(Card, { shadow: false, children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Behaviour" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Filter the grid to matching rows only when searching; use with care as this can affect performance" })] }), _jsx(Card.Body, { className: "twa:p-1", gap: 2, children: _jsx(CheckBox, { "data-name": "filter-quick-search-results", value: "existing", checked: state.RunQueryAfterQuickSearch, disabled: StringExtensions.IsNotNullOrEmpty(searchText), onChange: onQuickSearchBehaviourChange, children: "Filter using Quick Search Results" }) })] }), _jsxs(Card, { shadow: false, children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Matching Styles" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Configure colours and fonts for how search matches appear in the grid" })] }), _jsx(Card.Body, { className: "twa:p-1", children: isServerSideRowModel ? (_jsx(QuickSearchStyleEditor, { api: props.api, helpText: "Server-side row model: styles the whole matching cell.", headerText: "Cell Matching Style", style: props.QuickSearchCellMatchStyle, updateStyle: props.onSetCellMatchingStyle })) : (_jsxs(Tabs, { defaultValue: "text", className: "twa:min-h-0", children: [_jsx(Tabs.Tab, { value: "text", children: "Text Match" }), _jsx(Tabs.Tab, { value: "current", children: "Current Match" }), _jsx(Tabs.Tab, { value: "cell", children: "Cell Match" }), _jsx(Tabs.Content, { value: "text", children: _jsx(Box, { className: "twa:pt-2", children: _jsx(QuickSearchStyleEditor, { api: props.api, helpText: "Highlights the matching text within each cell (AG Grid Find).", headerText: "Text Matching Style", style: props.QuickSearchTextMatchStyle, updateStyle: props.onSetTextMatchingStyle }) }) }), _jsx(Tabs.Content, { value: "current", children: _jsx(Box, { className: "twa:pt-2", children: _jsx(QuickSearchStyleEditor, { api: props.api, helpText: "Applied to the active match when cycling through results.", headerText: "Current Match Style", style: props.QuickSearchCurrentTextMatchStyle, updateStyle: props.onSetCurrentTextMatchingStyle }) }) }), _jsx(Tabs.Content, { value: "cell", children: _jsx(Box, { className: "twa:pt-2", children: _jsx(QuickSearchStyleEditor, { api: props.api, helpText: "Optional background for whole matching cells. When unset, only matching text is highlighted.", headerText: "Cell Matching Style", style: props.QuickSearchCellMatchStyle, updateStyle: props.onSetCellMatchingStyle }) }) })] })) })] })] }) }));
29
28
  };
30
29
  function mapStateToProps(state, ownProps) {
31
30
  const quickSearch = state.QuickSearch;
@@ -155,5 +155,5 @@ export const ScheduleBuilderWizard = (props) => {
155
155
  commit({ customCron: value, preset: 'custom' });
156
156
  };
157
157
  const timeValue = `${`${hour}`.padStart(2, '0')}:${`${minute}`.padStart(2, '0')}`;
158
- return (_jsx(Box, { "data-name": "schedule-setup", children: _jsxs(Card, { shadow: false, children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Schedule" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Configure when this should run" })] }), _jsx(Card.Body, { children: _jsxs(FormLayout, { children: [_jsxs(FormRow, { label: "Frequency", children: [_jsx(Radio, { "data-name": "frequency-recurring", className: "twa:mr-2", value: "recurring", checked: !isOneOff, onChange: (checked) => checked && handleFrequencyChange(false), children: "Recurring" }), _jsx(Radio, { "data-name": "frequency-one-off", checked: isOneOff, value: "oneoff", onChange: (checked) => checked && handleFrequencyChange(true), children: "One-off" })] }), isOneOff ? (_jsx(FormRow, { label: "Date", children: _jsx(AdaptableInput, { "data-name": "one-off-date", className: "twa:w-[300px]", type: "date", placeholder: "Date", onChange: handleOneOffDateChange, value: oneOffDate }) })) : (_jsxs(_Fragment, { children: [_jsx(FormRow, { label: "Pattern", children: _jsx(Box, { className: "twa:max-w-[300px]", children: _jsx(SingleSelect, { className: "twa:w-full", "data-name": "recurrence-preset", items: PRESET_OPTIONS, value: preset, placeholder: "Select pattern", onValueChange: handlePresetChange }) }) }), preset === 'selectedDays' && (_jsx(FormRow, { label: "Days", children: daysMap.map((day) => (_jsx(CheckBox, { "data-name": `day-${day.value}`, className: "twa:ml-2 twa:w-1/3", value: day.value, checked: selectedDays.includes(day.value), onChange: (checked) => handleDayChange(checked, day.value), children: day.label }, day.value))) })), preset === 'monthly' && (_jsx(FormRow, { label: "Day of month", children: _jsx(AdaptableInput, { "data-name": "day-of-month", className: "twa:w-[120px]", type: "number", min: 1, max: 31, value: dayOfMonth, onChange: handleDayOfMonthChange }) })), preset === 'custom' && (_jsx(FormRow, { label: "Cron expression", children: _jsx(AdaptableInput, { "data-name": "custom-cron", className: "twa:w-[300px]", placeholder: "minute hour day month weekday", value: customCron, onChange: handleCustomCronChange }) }))] })), _jsx(FormRow, { label: "Time", children: _jsx(AdaptableInput, { "data-name": "time", className: "twa:w-[300px]", value: timeValue, type: "time", onChange: handleTimeChange }) })] }) })] }) }));
158
+ return (_jsx(Box, { "data-name": "schedule-setup", children: _jsxs(Card, { shadow: false, children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Schedule" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Configure when this should run" })] }), _jsx(Card.Body, { children: _jsxs(FormLayout, { children: [_jsxs(FormRow, { label: "Frequency", children: [_jsx(Radio, { "data-name": "frequency-recurring", className: "twa:mr-2", value: "recurring", checked: !isOneOff, onChange: (checked) => checked && handleFrequencyChange(false), children: "Recurring" }), _jsx(Radio, { "data-name": "frequency-one-off", checked: isOneOff, value: "oneoff", onChange: (checked) => checked && handleFrequencyChange(true), children: "One-off" })] }), isOneOff ? (_jsx(FormRow, { label: "Date", children: _jsx(AdaptableInput, { "data-name": "one-off-date", className: "twa:w-[300px]", type: "date", placeholder: "Date", onChange: handleOneOffDateChange, value: oneOffDate }) })) : (_jsxs(_Fragment, { children: [_jsx(FormRow, { label: "Pattern", children: _jsx(Box, { className: "twa:max-w-[300px]", children: _jsx(SingleSelect, { className: "twa:w-full", "data-name": "recurrence-preset", items: PRESET_OPTIONS, value: preset, placeholder: "Select pattern", onValueChange: handlePresetChange }) }) }), preset === 'selectedDays' && (_jsx(FormRow, { label: "Days", children: daysMap.map((day) => (_jsx(CheckBox, { "data-name": `day-${day.value}`, className: "twa:ml-2 twa:w-1/3", value: day.value, checked: selectedDays.includes(day.value), onChange: (checked) => handleDayChange(checked, day.value), children: day.label }, day.value))) })), preset === 'monthly' && (_jsx(FormRow, { label: "Day of month", children: _jsx(AdaptableInput, { "data-name": "day-of-month", className: "twa:w-[120px]", type: "number", min: 1, max: 31, value: dayOfMonth, onChange: handleDayOfMonthChange }) })), preset === 'custom' && (_jsx(FormRow, { label: "Cron expression", children: _jsx(AdaptableInput, { "data-name": "custom-cron", className: "twa:w-[300px]", placeholder: "minute hour day month weekday", value: customCron, onChange: handleCustomCronChange }) }))] })), (isOneOff || preset !== 'custom') && (_jsx(FormRow, { label: "Time", children: _jsx(AdaptableInput, { "data-name": "time", className: "twa:w-[300px]", value: timeValue, type: "time", onChange: handleTimeChange }) }))] }) })] }) }));
159
159
  };
@@ -75,5 +75,5 @@ export const ShortcutSettingsWizard = (props) => {
75
75
  result,
76
76
  };
77
77
  }, [shortcut.ShortcutOperation, shortcut.ShortcutValue]);
78
- return (_jsx(Box, { "data-name": "shortcut-column-settings", children: _jsxs(Flex, { flexDirection: "column", className: "twa:gap-3 twa:p-3", children: [_jsxs(Card, { shadow: false, children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Name" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Provide a unique name for the Shortcut" })] }), _jsx(Card.Body, { className: "twa:p-1", children: _jsx(Input, { "data-name": "shortcut-name", className: "twa:max-w-[300px] twa:w-full", onChange: handleNameChange, placeholder: "Enter Name", value: shortcut.Name ?? '' }) })] }), _jsxs(Card, { shadow: false, children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Key" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Keyboard key that, when pressed, triggers the Shortcut" })] }), _jsx(Card.Body, { className: "twa:p-1", children: _jsx(SingleSelect, { "data-name": "shortcut-key", ariaLabel: "Select Key", placeholder: "Select Key", items: optionKeys, className: "twa:max-w-[300px]", onValueChange: (key) => handleKeyChange(key), value: shortcut.ShortcutKey || undefined }) })] }), _jsxs(Card, { shadow: false, children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Operation" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Mathematical operation performed on the cell's current value" })] }), _jsx(Card.Body, { className: "twa:p-1", children: _jsx(SingleSelect, { "data-name": "shortcut-operation", placeholder: "Select Operation", ariaLabel: "Select Operation", className: "twa:max-w-[300px]", items: optionActions, onValueChange: (operation) => handleOperationChange(operation), value: shortcut.ShortcutOperation }) })] }), _jsxs(Card, { shadow: false, children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Value" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Number used with the operation and current cell value to calculate the new total" })] }), _jsx(Card.Body, { className: "twa:p-1", children: _jsx(Input, { "data-name": "shortcut-value", className: "twa:max-w-[300px] twa:w-full", onChange: handleOperationValueChange, placeholder: "Enter Number", type: "number", value: shortcut.ShortcutValue ?? '' }) })] }), preview ? (_jsxs(Card, { shadow: false, children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Example" }), _jsxs(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: ["If a cell contains ", SHORTCUT_PREVIEW_EXAMPLE_VALUE, ", pressing this Shortcut would change it to:"] })] }), _jsx(Card.Body, { children: 'error' in preview ? (_jsx(Box, { className: "twa:text-2 twa:text-error", children: preview.error })) : (_jsxs(Box, { className: "twa:text-3 twa:font-medium", children: [preview.expression, " \u2192 ", preview.result] })) })] })) : null] }) }));
78
+ return (_jsx(Box, { "data-name": "shortcut-column-settings", children: _jsxs(Flex, { flexDirection: "column", className: "twa:gap-3 twa:p-3", children: [_jsxs(Card, { shadow: false, children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Name" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Provide a unique name for the Shortcut" })] }), _jsx(Card.Body, { className: "twa:p-1", children: _jsx(Input, { "data-name": "shortcut-name", className: "twa:max-w-[300px] twa:w-full", onChange: handleNameChange, placeholder: "Enter Name", value: shortcut.Name ?? '' }) })] }), _jsxs(Card, { shadow: false, children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Key" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Keyboard key that, when pressed, triggers the Shortcut" })] }), _jsx(Card.Body, { className: "twa:p-1", children: _jsx(SingleSelect, { "data-name": "shortcut-key", ariaLabel: "Select Key", placeholder: "Select Key", items: optionKeys, className: "twa:max-w-[300px]", onValueChange: (key) => handleKeyChange(key), value: shortcut.ShortcutKey || undefined }) })] }), _jsxs(Card, { shadow: false, children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Operation" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Mathematical operation performed on the cell's current value" })] }), _jsx(Card.Body, { className: "twa:p-1", children: _jsx(SingleSelect, { "data-name": "shortcut-operation", placeholder: "Select Operation", ariaLabel: "Select Operation", className: "twa:max-w-[300px]", items: optionActions, onValueChange: (operation) => handleOperationChange(operation), value: shortcut.ShortcutOperation }) })] }), _jsxs(Card, { shadow: false, children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Value" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Number used with the operation and current cell value to calculate the new total" })] }), _jsx(Card.Body, { className: "twa:p-1", children: _jsx(Input, { "data-name": "shortcut-value", className: "twa:max-w-[300px] twa:w-full", onChange: handleOperationValueChange, placeholder: "Enter Number", type: "number", value: shortcut.ShortcutValue ?? '' }) })] }), preview ? (_jsxs(Card, { shadow: false, children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Example" }), _jsxs(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: ["If a cell contains ", SHORTCUT_PREVIEW_EXAMPLE_VALUE, ", pressing this Shortcut would change it to:"] })] }), _jsx(Card.Body, { children: 'error' in preview ? (_jsx(Box, { className: "twa:text-2 twa:text-destructive", children: preview.error })) : (_jsxs(Box, { className: "twa:text-3 twa:font-medium", children: [preview.expression, " \u2192 ", preview.result] })) })] })) : null] }) }));
79
79
  };
@@ -11,7 +11,7 @@ import { PreviewResultsPanel } from '../Components/PreviewResultsPanel';
11
11
  import { PreviewHelper } from '../../Utilities/Helpers/PreviewHelper';
12
12
  import { StringExtensions } from '../../Utilities/Extensions/StringExtensions';
13
13
  import Input from '../../components/Input';
14
- import DropdownButton from '../../components/DropdownButton';
14
+ import { NewDropdownButton } from '../../components/DropdownButton';
15
15
  import SimpleButton from '../../components/SimpleButton';
16
16
  import { Flex } from '../../components/Flex';
17
17
  const preventDefault = (e) => e.preventDefault();
@@ -54,7 +54,7 @@ class SmartEditPopupComponent extends React.Component {
54
54
  if (e.key === 'Enter') {
55
55
  this.submit();
56
56
  }
57
- }, children: [_jsxs(Flex, { flexDirection: "row", "data-name": "smart-edit-operation", className: "twa:p-2", children: [_jsx(DropdownButton, { "data-name": "smart-edit-operation-dropdown", items: operationMenuItems, columns: ['label'], onMouseDown: preventDefault, children: typeof this.props.SmartEditOperation === 'object'
57
+ }, children: [_jsxs(Flex, { flexDirection: "row", "data-name": "smart-edit-operation", className: "twa:p-2", children: [_jsx(NewDropdownButton, { "data-name": "smart-edit-operation-dropdown", items: operationMenuItems, onMouseDown: preventDefault, children: typeof this.props.SmartEditOperation === 'object'
58
58
  ? this.props.SmartEditOperation.name
59
59
  : this.props.SmartEditOperation }), _jsx(Input, { "data-name": "smart-edit-value", value: this.props.SmartEditValue.toString(), className: "twa:mx-2", type: "number", placeholder: "Enter a Number", onChange: (e) => this.onSmartEditValueChange(e) }), _jsx(SimpleButton, { "data-name": "smart-edit-apply-button", className: "twa:mr-2", tone: this.getButtonStyle(), variant: "raised", disabled: StringExtensions.IsNullOrEmpty(`${this.props.SmartEditValue}`) ||
60
60
  (this.props.PreviewInfo &&
@@ -13,8 +13,8 @@ import { AdaptablePopover } from '../AdaptablePopover';
13
13
  import { UIHelper } from '../UIHelper';
14
14
  import { connect } from 'react-redux';
15
15
  import { Flex } from '../../components/Flex';
16
- import clsx from 'clsx';
17
16
  import { SingleSelect } from '../../components/NewSelect';
17
+ import { cn } from '../../lib/utils';
18
18
  class SmartEditViewPanelComponent extends React.Component {
19
19
  cleanupEvent;
20
20
  constructor(props) {
@@ -68,7 +68,7 @@ class SmartEditViewPanelComponent extends React.Component {
68
68
  !this.props.IsValidSelection ||
69
69
  this.props.api.layoutApi.isCurrentLayoutPivot() == true;
70
70
  const elementType = this.props.viewType === 'Toolbar' ? 'DashboardToolbar' : 'ToolPanel';
71
- return (_jsxs(Flex, { flexDirection: "row", className: clsx(`ab-${elementType}__SmartEdit__wrap twa:gap-1 twa:flex-row`, {
71
+ return (_jsxs(Flex, { flexDirection: "row", className: cn(`ab-${elementType}__SmartEdit__wrap twa:gap-1 twa:flex-row`, {
72
72
  'twa:flex-nowrap': this.props.viewType === 'Toolbar',
73
73
  'twa:flex-wrap': this.props.viewType !== 'Toolbar',
74
74
  }), flexWrap: this.props.viewType === 'ToolPanel' ? 'wrap' : 'nowrap', children: [_jsxs(Flex, { className: "twa:gap-1", children: [_jsx(SingleSelect, { ariaLabel: 'Select Smart Edit Operation', value: typeof this.props.SmartEditOperation === 'object'
@@ -7,5 +7,5 @@ import { ExportDropdown } from './components/ExportDropdown';
7
7
  import Panel from '../../components/Panel';
8
8
  export const StateManagementPopup = (props) => {
9
9
  const baseClassName = 'ab-ManageState';
10
- return (_jsxs(PopupPanel, { className: baseClassName, headerText: props.moduleInfo.FriendlyName, glyphicon: props.moduleInfo.Glyph, infoLink: props.moduleInfo.HelpPage, infoLinkDisabled: !props.api.internalApi.isDocumentationLinksDisplayed(), children: [_jsxs(Panel, { className: `${baseClassName}__panel twa:mr-2 twa:mb-2 twa:h-auto twa:rounded-none`, "data-name": "user-state", header: 'User State', variant: "default", children: [_jsx(HelpBlock, { className: "twa:mb-2", children: 'Clear all current user state that has been persisted' }), _jsx(HelpBlock, { style: { color: 'var(--ab-color-warn)' }, children: 'This will cause this window to close and any State you have previously created will be lost, and the Initial Adaptable State will be reapplied' }), _jsx(ClearButton, { "data-name": "clear-user-state-button", tone: "info", variant: "raised", className: "twa:mt-2", accessLevel: props.accessLevel, onClick: () => props.api.stateApi.reloadInitialState(), children: "Clear User State" })] }), _jsxs(Panel, { className: `${baseClassName}__panel twa:mt-3 twa:mr-2 twa:mb-2 twa:h-auto twa:rounded-none`, "data-name": "initial-state", header: 'Initial Adaptable State', variant: "default", children: [_jsx(HelpBlock, { className: "twa:mt-2", children: 'Load Initial Adaptable State (from a .json file) - this will cause this window to close' }), ' ', _jsx(LoadButton, { tone: "info", variant: "raised", className: "twa:mt-2", accessLevel: props.accessLevel, onLoad: (json) => props.api.stateApi.reloadInitialState(json), "data-name": "load-initial-state-button", children: "Load Initial Adaptable State" })] }), _jsxs(Panel, { className: `${baseClassName}__panel twa:mt-3 twa:mr-2 twa:mb-2 twa:h-auto twa:rounded-none`, "data-name": "adaptable-state", header: 'Export Adaptable State', children: [_jsx(HelpBlock, { className: "twa:my-2", children: 'Exports the currently persisted Adaptable State' }), ' ', _jsx(ExportDropdown, { api: props.api, type: "adaptableState", className: "twa:mr-3 twa:flex-1 twa:max-w-none", columns: ['label'], "data-name": "export-adaptable-state-dropdown", children: "Select Export Destination" })] }), _jsxs(Panel, { className: `${baseClassName}__panel twa:mt-3 twa:mr-2 twa:mb-2 twa:h-auto twa:rounded-none`, "data-name": "initial-state", header: 'Export Initial Adaptable State', variant: "default", children: [_jsx(HelpBlock, { className: "twa:my-2", children: 'Exports the Initial Adaptable State which was provided at design time' }), ' ', _jsx(ExportDropdown, { api: props.api, type: "initialState", className: "twa:mr-3 twa:flex-1 twa:max-w-none", columns: ['label'], "data-name": "export-initial-state-dropdown", children: "Select Export Destination" })] })] }));
10
+ return (_jsxs(PopupPanel, { className: baseClassName, headerText: props.moduleInfo.FriendlyName, glyphicon: props.moduleInfo.Glyph, infoLink: props.moduleInfo.HelpPage, infoLinkDisabled: !props.api.internalApi.isDocumentationLinksDisplayed(), children: [_jsxs(Panel, { className: `${baseClassName}__panel twa:mr-2 twa:mb-2 twa:h-auto twa:rounded-none`, "data-name": "user-state", header: 'User State', variant: "default", children: [_jsx(HelpBlock, { className: "twa:mb-2", children: 'Clear all current user state that has been persisted' }), _jsx(HelpBlock, { className: "twa:text-warn twa:mb-2", children: 'This will cause this window to close and any State you have previously created will be lost, and the Initial Adaptable State will be reapplied' }), _jsx(ClearButton, { "data-name": "clear-user-state-button", tone: "info", variant: "raised", accessLevel: props.accessLevel, onClick: () => props.api.stateApi.reloadInitialState(), children: "Clear User State" })] }), _jsxs(Panel, { className: `${baseClassName}__panel twa:mt-3 twa:mr-2 twa:mb-2 twa:h-auto twa:rounded-none`, "data-name": "initial-state", header: 'Initial Adaptable State', variant: "default", children: [_jsx(HelpBlock, { className: "twa:mb-2", children: 'Load Initial Adaptable State (from a .json file) - this will cause this window to close' }), ' ', _jsx(LoadButton, { tone: "info", variant: "raised", accessLevel: props.accessLevel, onLoad: (json) => props.api.stateApi.reloadInitialState(json), "data-name": "load-initial-state-button", children: "Load Initial Adaptable State" })] }), _jsxs(Panel, { className: `${baseClassName}__panel twa:mt-3 twa:mr-2 twa:mb-2 twa:h-auto twa:rounded-none`, "data-name": "adaptable-state", header: 'Export Adaptable State', children: [_jsx(HelpBlock, { className: "twa:my-2", children: 'Exports the currently persisted Adaptable State' }), ' ', _jsx(ExportDropdown, { api: props.api, type: "adaptableState", className: "twa:mr-3 twa:flex-1 twa:max-w-none", "data-name": "export-adaptable-state-dropdown", children: "Select Export Destination" })] }), _jsxs(Panel, { className: `${baseClassName}__panel twa:mt-3 twa:mr-2 twa:mb-2 twa:h-auto twa:rounded-none`, "data-name": "initial-state", header: 'Export Initial Adaptable State', variant: "default", children: [_jsx(HelpBlock, { className: "twa:my-2", children: 'Exports the Initial Adaptable State which was provided at design time' }), ' ', _jsx(ExportDropdown, { api: props.api, type: "initialState", className: "twa:mr-3 twa:flex-1 twa:max-w-none", "data-name": "export-initial-state-dropdown", children: "Select Export Destination" })] })] }));
11
11
  };
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { AdaptableApi } from '../../../../types';
3
- import { DropdownButtonProps } from '../../../components/DropdownButton';
4
- export interface ExportDropdownProps extends Omit<DropdownButtonProps, 'options' | 'value'> {
3
+ import { type NewDropdownButtonProps } from '../../../components/DropdownButton';
4
+ export interface ExportDropdownProps extends Omit<NewDropdownButtonProps, 'items'> {
5
5
  api: AdaptableApi;
6
6
  type: 'adaptableState' | 'initialState';
7
7
  }
@@ -1,35 +1,35 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import DropdownButton from '../../../components/DropdownButton';
2
+ import { NewDropdownButton } from '../../../components/DropdownButton';
3
3
  import { handleExportState } from '../handleExportState';
4
4
  export const ExportDropdown = (props) => {
5
+ const { api, type, ...rest } = props;
5
6
  const handleChange = (destination) => {
6
- switch (props.type) {
7
- case 'adaptableState':
8
- const adaptableState = props.api.stateApi.getPersistentState();
9
- handleExportState(destination, 'adaptableState', adaptableState, props.api);
7
+ switch (type) {
8
+ case 'adaptableState': {
9
+ const adaptableState = api.stateApi.getPersistentState();
10
+ handleExportState(destination, 'adaptableState', adaptableState, api);
10
11
  break;
11
- case 'initialState':
12
- const initialState = props.api.stateApi.getInitialState();
13
- handleExportState(destination, 'initialState', initialState, props.api);
12
+ }
13
+ case 'initialState': {
14
+ const initialState = api.stateApi.getInitialState();
15
+ handleExportState(destination, 'initialState', initialState, api);
14
16
  break;
17
+ }
15
18
  }
16
19
  };
17
20
  const destinationOptions = [
18
21
  {
19
- value: 'Clipboard',
20
22
  label: 'Clipboard',
21
23
  onClick: () => handleChange('Clipboard'),
22
24
  },
23
25
  {
24
- value: 'Console',
25
26
  label: 'Console',
26
27
  onClick: () => handleChange('Console'),
27
28
  },
28
29
  {
29
- value: 'JSON',
30
30
  label: 'JSON',
31
31
  onClick: () => handleChange('JSON'),
32
32
  },
33
33
  ];
34
- return (_jsx(DropdownButton, { className: "ab-StateManagement__Export-Dropdown", ...props, items: destinationOptions, value: undefined }));
34
+ return (_jsx(NewDropdownButton, { variant: "outlined", className: "ab-StateManagement__Export-Dropdown", ...rest, items: destinationOptions }));
35
35
  };
@@ -4,7 +4,7 @@ import SimpleButton from '../../components/SimpleButton';
4
4
  import ArrayExtensions from '../../Utilities/Extensions/ArrayExtensions';
5
5
  import { AdaptablePopover } from '../AdaptablePopover';
6
6
  import { Flex, Box } from '../../components/Flex';
7
- import clsx from 'clsx';
7
+ import { cn } from '../../lib/utils';
8
8
  /**
9
9
  * Statusbar sub panel are similar to vs code:
10
10
  * - text
@@ -36,5 +36,5 @@ export const StatusBarPanel = (props) => {
36
36
  const preparedContent = typeof content === 'function'
37
37
  ? React.createElement(content)
38
38
  : content;
39
- return (_jsxs(Flex, { ...flexProps, alignItems: "center", justifyContent: "center", className: clsx(baseClassName, flexProps.className, shouldTriggerActionOnWrapperClick ? 'twa:cursor-pointer' : 'twa:cursor-default'), onClick: handleWrapperClick, children: [props.icon && (_jsx(SimpleButton, { tooltip: tooltip, color: props.color, icon: props.icon, iconSize: 15, variant: "text", onClick: handleIconClick, className: preparedContent ? 'twa:mr-1' : 'twa:mr-0' })), popover ? (_jsx(AdaptablePopover, { alignPosition: [['BottomCenter', 'TopCenter']], tooltipText: tooltip, showIcon: false, bodyText: [popoverContent], MessageType: 'Info', showEvent: 'focus', hideEvent: "blur", popoverMinWidth: popoverMinWidth, children: preparedContent })) : (preparedContent), ArrayExtensions.IsNotNullOrEmpty(extraActions) && (_jsx(Box, { className: "twa:ml-1", children: extraActions?.map?.((action, index) => React.createElement(action, { key: index })) }))] }));
39
+ return (_jsxs(Flex, { ...flexProps, alignItems: "center", justifyContent: "center", className: cn(baseClassName, flexProps.className, shouldTriggerActionOnWrapperClick ? 'twa:cursor-pointer' : 'twa:cursor-default'), onClick: handleWrapperClick, children: [props.icon && (_jsx(SimpleButton, { tooltip: tooltip, color: props.color, icon: props.icon, iconSize: 15, variant: "text", onClick: handleIconClick, className: preparedContent ? 'twa:mr-1' : 'twa:mr-0' })), popover ? (_jsx(AdaptablePopover, { alignPosition: [['BottomCenter', 'TopCenter']], tooltipText: tooltip, showIcon: false, bodyText: [popoverContent], MessageType: 'Info', showEvent: 'focus', hideEvent: "blur", popoverMinWidth: popoverMinWidth, children: preparedContent })) : (preparedContent), ArrayExtensions.IsNotNullOrEmpty(extraActions) && (_jsx(Box, { className: "twa:ml-1", children: extraActions?.map?.((action, index) => React.createElement(action, { key: index })) }))] }));
40
40
  };