@adaptabletools/adaptable 17.0.0-canary.0 → 17.0.0-canary.2

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 (399) hide show
  1. package/base.css +1203 -1207
  2. package/base.css.map +1 -1
  3. package/index.css +28 -1989
  4. package/index.css.map +1 -1
  5. package/package.json +9 -110
  6. package/src/AdaptableInterfaces/AdaptableNoCodeWizard.d.ts +2 -2
  7. package/src/AdaptableInterfaces/IAdaptable.d.ts +16 -11
  8. package/src/AdaptableOptions/ActionRowOptions.d.ts +25 -3
  9. package/src/AdaptableOptions/AdaptableFrameworkComponent.d.ts +3 -3
  10. package/src/AdaptableOptions/AdaptableOptions.d.ts +10 -1
  11. package/src/AdaptableOptions/AdaptablePlugin.d.ts +1 -1
  12. package/src/AdaptableOptions/AlertOptions.d.ts +2 -2
  13. package/src/AdaptableOptions/ColumnFilterOptions.d.ts +110 -91
  14. package/src/AdaptableOptions/DataChangeHistoryOptions.d.ts +1 -1
  15. package/src/AdaptableOptions/DateInputOptions.d.ts +1 -1
  16. package/src/AdaptableOptions/EditOptions.d.ts +2 -2
  17. package/src/AdaptableOptions/ExportOptions.d.ts +3 -3
  18. package/src/AdaptableOptions/ExpressionOptions.d.ts +2 -2
  19. package/src/AdaptableOptions/Fdc3Options.d.ts +10 -4
  20. package/src/AdaptableOptions/GridFilterOptions.d.ts +18 -0
  21. package/src/AdaptableOptions/LayoutOptions.d.ts +1 -1
  22. package/src/AdaptableOptions/MenuOptions.d.ts +10 -4
  23. package/src/AdaptableOptions/NotificationsOptions.d.ts +1 -1
  24. package/src/AdaptableOptions/QuickSearchOptions.d.ts +4 -4
  25. package/src/AdaptableOptions/UserInterfaceOptions.d.ts +1 -16
  26. package/src/Api/ColumnApi.d.ts +4 -0
  27. package/src/Api/ColumnFilterApi.d.ts +2 -5
  28. package/src/Api/DashboardApi.d.ts +0 -11
  29. package/src/Api/EventApi.d.ts +2 -30
  30. package/src/Api/Events/ActionRowSubmitted.d.ts +1 -5
  31. package/src/Api/Events/AdaptableSearchState.d.ts +2 -7
  32. package/src/Api/Events/Fdc3MessageInfo.d.ts +1 -1
  33. package/src/Api/Events/GridFilterApplied.d.ts +2 -1
  34. package/src/Api/ExportApi.d.ts +0 -4
  35. package/src/Api/GridFilterApi.d.ts +26 -8
  36. package/src/Api/Implementation/ColumnApiImpl.d.ts +1 -0
  37. package/src/Api/Implementation/ColumnApiImpl.js +4 -0
  38. package/src/Api/Implementation/ColumnFilterApiImpl.d.ts +1 -1
  39. package/src/Api/Implementation/ColumnFilterApiImpl.js +3 -3
  40. package/src/Api/Implementation/ConfigApiImpl.js +1 -2
  41. package/src/Api/Implementation/DashboardApiImpl.d.ts +0 -2
  42. package/src/Api/Implementation/DashboardApiImpl.js +0 -14
  43. package/src/Api/Implementation/ExportApiImpl.d.ts +0 -1
  44. package/src/Api/Implementation/ExportApiImpl.js +0 -3
  45. package/src/Api/Implementation/GridApiImpl.js +2 -2
  46. package/src/Api/Implementation/GridFilterApiImpl.d.ts +6 -1
  47. package/src/Api/Implementation/GridFilterApiImpl.js +22 -3
  48. package/src/Api/Implementation/NamedQueryApiImpl.d.ts +2 -5
  49. package/src/Api/Implementation/NamedQueryApiImpl.js +2 -2
  50. package/src/Api/Implementation/OptionsApiImpl.d.ts +2 -1
  51. package/src/Api/Implementation/OptionsApiImpl.js +3 -0
  52. package/src/Api/Implementation/UserInterfaceApiImpl.js +2 -2
  53. package/src/Api/Internal/ActionRowInternalApi.d.ts +1 -0
  54. package/src/Api/Internal/ActionRowInternalApi.js +17 -3
  55. package/src/Api/Internal/AlertInternalApi.d.ts +1 -7
  56. package/src/Api/Internal/ColumnFilterInternalApi.d.ts +2 -2
  57. package/src/Api/Internal/ColumnFilterInternalApi.js +9 -9
  58. package/src/Api/Internal/ColumnInternalApi.d.ts +0 -10
  59. package/src/Api/Internal/ColumnInternalApi.js +0 -28
  60. package/src/Api/Internal/Fdc3InternalApi.d.ts +2 -2
  61. package/src/Api/Internal/FormatColumnInternalApi.js +6 -6
  62. package/src/Api/Internal/GridFilterInternalApi.d.ts +1 -1
  63. package/src/Api/Internal/GridFilterInternalApi.js +5 -5
  64. package/src/Api/Internal/GridInternalApi.js +31 -9
  65. package/src/Api/Internal/LayoutInternalApi.js +8 -0
  66. package/src/Api/Internal/PredicateInternalApi.js +3 -3
  67. package/src/Api/Internal/StyledColumnInternalApi.d.ts +0 -3
  68. package/src/Api/Internal/StyledColumnInternalApi.js +0 -27
  69. package/src/Api/NamedQueryApi.d.ts +6 -5
  70. package/src/Api/OptionsApi.d.ts +5 -1
  71. package/src/PredefinedConfig/AlertState.d.ts +6 -6
  72. package/src/PredefinedConfig/CalculatedColumnState.d.ts +1 -1
  73. package/src/PredefinedConfig/ChartingState.d.ts +4 -1
  74. package/src/PredefinedConfig/Common/AdaptableAlert.d.ts +2 -2
  75. package/src/PredefinedConfig/Common/AdaptableColumn.d.ts +1 -1
  76. package/src/PredefinedConfig/Common/AdaptableComparerFunction.d.ts +2 -2
  77. package/src/PredefinedConfig/Common/AdaptableForm.d.ts +2 -2
  78. package/src/PredefinedConfig/Common/AdaptableFormat.d.ts +1 -1
  79. package/src/PredefinedConfig/Common/AdaptableIcon.d.ts +2 -2
  80. package/src/PredefinedConfig/Common/AdaptableMessageType.d.ts +1 -1
  81. package/src/PredefinedConfig/Common/AdaptableObject.d.ts +1 -1
  82. package/src/PredefinedConfig/Common/AdaptablePredicate.d.ts +3 -3
  83. package/src/PredefinedConfig/Common/AdaptablePredicate.js +45 -58
  84. package/src/PredefinedConfig/Common/AdaptableQuery.d.ts +1 -1
  85. package/src/PredefinedConfig/Common/AdaptableScope.d.ts +5 -5
  86. package/src/PredefinedConfig/Common/AggregationColumns.d.ts +1 -1
  87. package/src/PredefinedConfig/Common/ColumnFilter.d.ts +2 -2
  88. package/src/PredefinedConfig/Common/Entitlement.d.ts +1 -1
  89. package/src/PredefinedConfig/Common/Fdc3Context.d.ts +133 -37
  90. package/src/PredefinedConfig/Common/Fdc3Intent.d.ts +4 -4
  91. package/src/PredefinedConfig/Common/Schedule.d.ts +2 -2
  92. package/src/PredefinedConfig/Common/Types.d.ts +15 -15
  93. package/src/PredefinedConfig/ExportState.d.ts +4 -4
  94. package/src/PredefinedConfig/FlashingCellState.d.ts +4 -4
  95. package/src/PredefinedConfig/FormatColumnState.d.ts +4 -27
  96. package/src/PredefinedConfig/NotesState.d.ts +2 -2
  97. package/src/PredefinedConfig/PredefinedConfig.d.ts +0 -5
  98. package/src/PredefinedConfig/ShortcutState.d.ts +1 -1
  99. package/src/PredefinedConfig/StyledColumnState.d.ts +8 -13
  100. package/src/PredefinedConfig/SystemState.d.ts +3 -3
  101. package/src/PredefinedConfig/TeamSharingState.d.ts +3 -3
  102. package/src/PredefinedConfig/ToolPanelState.d.ts +1 -1
  103. package/src/PredefinedConfig/Uuid.d.ts +1 -1
  104. package/src/Redux/ActionsReducers/GridRedux.d.ts +6 -1
  105. package/src/Redux/ActionsReducers/GridRedux.js +18 -0
  106. package/src/Redux/ActionsReducers/LayoutRedux.d.ts +37 -16
  107. package/src/Redux/ActionsReducers/LayoutRedux.js +69 -16
  108. package/src/Redux/Store/AdaptableReduxMerger.d.ts +1 -1
  109. package/src/Redux/Store/AdaptableStore.d.ts +2 -2
  110. package/src/Redux/Store/AdaptableStore.js +46 -19
  111. package/src/Strategy/AdaptableModuleBase.d.ts +0 -1
  112. package/src/Strategy/AdaptableModuleBase.js +0 -30
  113. package/src/Strategy/AlertModule.js +1 -1
  114. package/src/Strategy/ChartingModule.js +8 -5
  115. package/src/Strategy/ColumnFilterModule.d.ts +2 -0
  116. package/src/Strategy/ColumnFilterModule.js +78 -40
  117. package/src/Strategy/CustomSortModule.js +1 -1
  118. package/src/Strategy/FlashingCellModule.js +1 -1
  119. package/src/Strategy/Interface/IModule.d.ts +3 -3
  120. package/src/Strategy/LayoutModule.js +5 -0
  121. package/src/Strategy/StyledColumnModule.js +2 -53
  122. package/src/Utilities/Constants/GeneralConstants.d.ts +3 -0
  123. package/src/Utilities/Constants/GeneralConstants.js +3 -0
  124. package/src/Utilities/Defaults/DefaultAdaptableOptions.js +31 -23
  125. package/src/Utilities/Defaults/DefaultSettingsPanel.d.ts +1 -1
  126. package/src/Utilities/Defaults/DefaultSettingsPanel.js +2 -2
  127. package/src/Utilities/Emitter.d.ts +2 -2
  128. package/src/Utilities/Emitter.js +2 -2
  129. package/src/Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions.d.ts +3 -3
  130. package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.d.ts +3 -3
  131. package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.d.ts +1 -1
  132. package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.js +55 -5
  133. package/src/Utilities/ExpressionFunctions/dateUtils.d.ts +1 -0
  134. package/src/Utilities/ExpressionFunctions/dateUtils.js +9 -0
  135. package/src/Utilities/ExpressionFunctions/deepMap.d.ts +3 -3
  136. package/src/Utilities/ExpressionFunctions/deepMap.js +7 -7
  137. package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.d.ts +1 -1
  138. package/src/Utilities/ExpressionFunctions/groupingMap.d.ts +7 -7
  139. package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.d.ts +1 -1
  140. package/src/Utilities/ExpressionFunctions/scalarAggregationHelper.d.ts +7 -7
  141. package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.d.ts +1 -1
  142. package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +11 -1
  143. package/src/Utilities/Extensions/TypeExtensions.d.ts +8 -8
  144. package/src/Utilities/Helpers/AdaptableHelper.js +4 -0
  145. package/src/Utilities/ObjectFactory.js +1 -1
  146. package/src/Utilities/Services/EntitlementService.d.ts +0 -1
  147. package/src/Utilities/Services/EntitlementService.js +0 -8
  148. package/src/Utilities/Services/Interface/IAlertService.d.ts +3 -3
  149. package/src/Utilities/Services/Interface/IEntitlementService.d.ts +0 -6
  150. package/src/Utilities/Services/Interface/IMetamodelService.d.ts +1 -1
  151. package/src/Utilities/Services/LicenseService/index.js +181 -1
  152. package/src/Utilities/Services/MetamodelService.js +1 -1
  153. package/src/Utilities/Services/ModuleService.js +1 -1
  154. package/src/Utilities/license/LicenseDetails.d.ts +1 -1
  155. package/src/Utilities/license/decode.js +65 -1
  156. package/src/Utilities/license/hashing.js +43 -1
  157. package/src/Utilities/logDeprecation.d.ts +5 -3
  158. package/src/View/AdaptablePopover/index.d.ts +1 -0
  159. package/src/View/AdaptablePopover/index.js +1 -1
  160. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/GridOptionsForm.js +1 -1
  161. package/src/View/Alert/AlertEmptyView.js +1 -1
  162. package/src/View/Alert/Utilities/getAvailablePredicates.js +1 -1
  163. package/src/View/Alert/Wizard/AlertBehaviourWizardSection.d.ts +1 -1
  164. package/src/View/Alert/Wizard/AlertBehaviourWizardSection.js +20 -4
  165. package/src/View/Alert/Wizard/AlertButtonsEditor.d.ts +1 -1
  166. package/src/View/Alert/Wizard/AlertButtonsEditor.js +21 -24
  167. package/src/View/Alert/Wizard/AlertMessageWizardSection.d.ts +1 -1
  168. package/src/View/Alert/Wizard/AlertNotificationWizardSection.d.ts +1 -1
  169. package/src/View/Alert/Wizard/AlertNotificationWizardSection.js +1 -1
  170. package/src/View/Alert/Wizard/AlertRulesWizardSection.js +1 -1
  171. package/src/View/Alert/Wizard/AlertScopeWizardSection.d.ts +1 -1
  172. package/src/View/Alert/Wizard/AlertScopeWizardSection.js +1 -1
  173. package/src/View/Alert/Wizard/AlertTypeWizardSection.d.ts +1 -1
  174. package/src/View/Alert/Wizard/AlertWizard.js +1 -1
  175. package/src/View/Alert/Wizard/isValidAlertRules.js +1 -1
  176. package/src/View/BulkUpdate/BulkUpdatePopup.js +3 -9
  177. package/src/View/BulkUpdate/BulkUpdateViewPanel.js +2 -2
  178. package/src/View/CalculatedColumn/Wizard/CalculatedColumnDefinitionWizardSection.d.ts +1 -1
  179. package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.d.ts +1 -1
  180. package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.d.ts +1 -1
  181. package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +9 -18
  182. package/src/View/CalculatedColumn/Wizard/CalculatedColumnTypeSection.d.ts +1 -1
  183. package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.d.ts +1 -1
  184. package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.js +2 -2
  185. package/src/View/CellSummary/CellSummaryStatusBarSubPanelPopover.js +5 -1
  186. package/src/View/CellSummary/CellSummaryViewPanel.js +5 -5
  187. package/src/View/ColumnInfo/ColumnInfo.js +7 -8
  188. package/src/View/Components/AdaptableDateInput/index.d.ts +2 -2
  189. package/src/View/Components/AdaptableInput/index.d.ts +1 -1
  190. package/src/View/Components/AdaptableObjectList/AdaptableObjectCompactList.js +2 -2
  191. package/src/View/Components/Buttons/ButtonBase/index.d.ts +1 -1
  192. package/src/View/Components/Buttons/ButtonOpen.d.ts +5 -0
  193. package/src/View/Components/Buttons/ButtonOpen.js +7 -0
  194. package/src/View/Components/Buttons/ButtonUnsuspend.d.ts +8 -0
  195. package/src/View/Components/Buttons/ButtonUnsuspend.js +17 -0
  196. package/src/View/Components/CellPopup/index.d.ts +1 -1
  197. package/src/View/Components/ColumnSelector/index.d.ts +1 -1
  198. package/src/View/Components/EntityRulesEditor/index.d.ts +2 -2
  199. package/src/View/Components/EntityRulesEditor/index.js +11 -3
  200. package/src/View/Components/ExternalRenderer.d.ts +1 -1
  201. package/src/View/Components/FilterForm/FilterForm.js +24 -24
  202. package/src/View/Components/FilterForm/QuickFilterForm.js +3 -3
  203. package/src/View/Components/FilterForm/QuickFilterValues.d.ts +2 -2
  204. package/src/View/Components/FilterForm/QuickFilterValues.js +2 -2
  205. package/src/View/Components/FilterForm/Waiting.d.ts +1 -1
  206. package/src/View/Components/Forms/AdaptableFormControlTextClear.d.ts +1 -1
  207. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupModuleView.js +1 -1
  208. package/src/View/Components/Popups/AdaptablePopup/useMenuItems.js +2 -2
  209. package/src/View/Components/PredicateEditor/PredicateEditor.js +10 -10
  210. package/src/View/Components/RangesComponent.js +11 -8
  211. package/src/View/Components/Selectors/ColumnSelector.d.ts +12 -17
  212. package/src/View/Components/Selectors/ColumnSelector.js +23 -42
  213. package/src/View/Components/Selectors/ColumnSelectorOld.d.ts +18 -0
  214. package/src/View/Components/Selectors/ColumnSelectorOld.js +46 -0
  215. package/src/View/Components/Selectors/ColumnValueSelector.d.ts +4 -23
  216. package/src/View/Components/Selectors/ColumnValueSelector.js +34 -126
  217. package/src/View/Components/Selectors/PermittedValuesSelector.d.ts +13 -0
  218. package/src/View/Components/Selectors/PermittedValuesSelector.js +46 -0
  219. package/src/View/Components/StyleComponent.d.ts +2 -3
  220. package/src/View/Components/StyleComponent.js +37 -40
  221. package/src/View/Components/ToolPanel/ToolPanelPopup.js +2 -2
  222. package/src/View/Components/ToolPanel/ToolPanelWrapper.d.ts +1 -1
  223. package/src/View/Components/ValueSelector/index.d.ts +2 -2
  224. package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.d.ts +1 -1
  225. package/src/View/CustomSort/Wizard/CustomSortValuesWizardSection.d.ts +1 -1
  226. package/src/View/CustomSort/Wizard/CustomSortWizard.js +1 -1
  227. package/src/View/Dashboard/DashboardPopup.js +4 -4
  228. package/src/View/Dashboard/DashboardToolbarFactory.js +0 -1
  229. package/src/View/Dashboard/PinnedDashboard.js +6 -3
  230. package/src/View/Dashboard/PinnedToolbarsSelector.js +1 -1
  231. package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +3 -1
  232. package/src/View/DataImport/DataImportPopup.js +1 -1
  233. package/src/View/DataImport/DataImportWizard/DataImportWizard.d.ts +1 -1
  234. package/src/View/DataImport/DataImportWizard/sections/UploadSection/UploadSection.d.ts +1 -1
  235. package/src/View/DataSet/DataSetViewPanel.js +3 -2
  236. package/src/View/Export/ExportViewPanel.js +12 -9
  237. package/src/View/Export/Wizard/ReportColumnsWizardSection.d.ts +1 -1
  238. package/src/View/Export/Wizard/ReportNameWizardSection.d.ts +1 -1
  239. package/src/View/Export/Wizard/ReportRowsWizardSection.d.ts +1 -1
  240. package/src/View/Filter/FilterViewPanel.js +1 -1
  241. package/src/View/FlashingCell/Wizard/FlashingCellRulesWizardSection.js +1 -1
  242. package/src/View/FlashingCell/Wizard/FlashingCellScopeWizardSection.d.ts +1 -1
  243. package/src/View/FlashingCell/Wizard/FlashingCellScopeWizardSection.js +2 -2
  244. package/src/View/FlashingCell/Wizard/FlashingCellSettingsWizardSection.d.ts +1 -1
  245. package/src/View/FlashingCell/Wizard/FlashingCellStyleWizardSection.d.ts +1 -1
  246. package/src/View/FlashingCell/Wizard/FlashingCellWizard.js +8 -8
  247. package/src/View/FlashingCell/Wizard/isValidFlashingCellRules.js +1 -1
  248. package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.d.ts +1 -1
  249. package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +10 -9
  250. package/src/View/FormatColumn/Wizard/FormatColumnRuleWizardSection.d.ts +1 -1
  251. package/src/View/FormatColumn/Wizard/FormatColumnScopeWizardSection.d.ts +1 -1
  252. package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.d.ts +1 -1
  253. package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.d.ts +1 -1
  254. package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +3 -1
  255. package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.d.ts +1 -1
  256. package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.js +7 -17
  257. package/src/View/GridFilter/GridFilterExpressionEditor.js +62 -9
  258. package/src/View/GridFilter/GridFilterPopup.js +36 -6
  259. package/src/View/GridFilter/GridFilterStatusbar.js +0 -1
  260. package/src/View/GridFilter/GridFilterViewPanel.d.ts +2 -26
  261. package/src/View/GridFilter/GridFilterViewPanel.js +49 -150
  262. package/src/View/GridFilter/NamedQuerySelector.d.ts +16 -0
  263. package/src/View/GridFilter/NamedQuerySelector.js +50 -0
  264. package/src/View/GridFilter/useGridFilterExpressionEditor.d.ts +24 -0
  265. package/src/View/GridFilter/useGridFilterExpressionEditor.js +123 -0
  266. package/src/View/GridFilter/useGridFilterOptionsForExpressionEditor.d.ts +4 -0
  267. package/src/View/GridFilter/useGridFilterOptionsForExpressionEditor.js +27 -0
  268. package/src/View/GridInfo/GridInfoPopup/GridInfoPopup.js +5 -3
  269. package/src/View/Layout/LayoutViewPanel.js +4 -3
  270. package/src/View/Layout/SaveLayoutButton.js +2 -1
  271. package/src/View/Layout/Wizard/LayoutWizard.js +10 -0
  272. package/src/View/Layout/Wizard/sections/FilterSection.js +15 -17
  273. package/src/View/Layout/Wizard/sections/GridFilterSection.d.ts +9 -0
  274. package/src/View/Layout/Wizard/sections/GridFilterSection.js +37 -0
  275. package/src/View/License/LicenseWatermark.js +61 -1
  276. package/src/View/NamedQuery/EditCurrentQueryButton.js +1 -1
  277. package/src/View/NamedQuery/Wizard/NamedQuerySettingsWizardSection.js +1 -1
  278. package/src/View/NamedQuery/Wizard/NamedQueryWizard.js +2 -2
  279. package/src/View/QuickSearch/QuickSearchPopup.js +1 -1
  280. package/src/View/QuickSearch/useQuickSearchDebounced.d.ts +1 -1
  281. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReminder.js +5 -2
  282. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReport.d.ts +1 -1
  283. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReport.js +6 -5
  284. package/src/View/Shortcut/Wizard/ShortcutSettingsWizard.js +6 -7
  285. package/src/View/Shortcut/Wizard/ShortcutWizard.js +4 -3
  286. package/src/View/SmartEdit/SmartEditViewPanel.js +7 -5
  287. package/src/View/SpecialColumnSettingsWizardStep.js +4 -1
  288. package/src/View/StateManagement/StateManagementPopup.js +6 -6
  289. package/src/View/StatusBar/StatusBarPopup.js +1 -1
  290. package/src/View/StyledColumn/Wizard/StyledColumnBadgeSection.js +16 -8
  291. package/src/View/StyledColumn/Wizard/StyledColumnSparklineSettingsSection.js +20 -23
  292. package/src/View/StyledColumn/Wizard/StyledColumnWizard.js +2 -3
  293. package/src/View/StyledColumn/Wizard/StyledColumnWizardColumnSection.d.ts +1 -1
  294. package/src/View/StyledColumn/Wizard/StyledColumnWizardColumnSection.js +7 -5
  295. package/src/View/StyledColumn/Wizard/StyledColumnWizardSettingsSection.d.ts +1 -1
  296. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgePreview.js +4 -4
  297. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardStyleSection.js +0 -8
  298. package/src/View/StyledColumn/Wizard/StyledColumnWizardTypeSection.js +2 -9
  299. package/src/View/SystemStatus/SystemStatusViewPanel.js +1 -1
  300. package/src/View/SystemStatus/Utilities/getStatusItemStyle.js +1 -1
  301. package/src/View/Theme/ThemeEditor.d.ts +1 -1
  302. package/src/View/Theme/ThemeViewPanel.js +4 -3
  303. package/src/View/UIHelper.d.ts +1 -1
  304. package/src/View/Wizard/ObjectTagsWizardSection.d.ts +1 -1
  305. package/src/View/Wizard/OnePageAdaptableWizard.d.ts +1 -1
  306. package/src/View/Wizard/OnePageWizards.d.ts +2 -2
  307. package/src/agGrid/Adaptable.d.ts +20 -17
  308. package/src/agGrid/Adaptable.js +193 -190
  309. package/src/agGrid/AdaptableLogger.js +15 -15
  310. package/src/agGrid/CheckboxRenderer.d.ts +5 -0
  311. package/src/agGrid/CheckboxRenderer.js +5 -1
  312. package/src/agGrid/ColumnSetupInfo.d.ts +1 -1
  313. package/src/agGrid/agGridHelper.d.ts +0 -1
  314. package/src/agGrid/agGridHelper.js +16 -14
  315. package/src/agGrid/editors/AdaptableDateEditor/InternalAdaptableDateEditor.d.ts +2 -2
  316. package/src/agGrid/editors/AdaptableNumberEditor/InternalAdaptableNumberEditor.d.ts +2 -2
  317. package/src/components/CheckBox/index.d.ts +1 -1
  318. package/src/components/ColorPicker/ColorPicker.d.ts +2 -2
  319. package/src/components/ColorPicker/ColorPicker.js +1 -1
  320. package/src/components/ContainerProps.d.ts +2 -2
  321. package/src/components/Dashboard/Dashboard.d.ts +2 -2
  322. package/src/components/Dashboard/DashboardTab.d.ts +1 -1
  323. package/src/components/Dashboard/DashboardToolbar.d.ts +1 -1
  324. package/src/components/Datepicker/index.d.ts +2 -2
  325. package/src/components/Dialog/index.d.ts +2 -2
  326. package/src/components/Dropdown/index.d.ts +2 -2
  327. package/src/components/DropdownButton/DropdownButtonItem.d.ts +1 -1
  328. package/src/components/DropdownButton/index.d.ts +1 -1
  329. package/src/components/DropdownButton/renderItem.d.ts +1 -1
  330. package/src/components/DropdownButton/useExpanded.d.ts +1 -1
  331. package/src/components/EllipsisContainer/index.d.ts +1 -1
  332. package/src/components/EmptyContent/index.d.ts +1 -1
  333. package/src/components/ExpressionEditor/BaseEditorInput.js +1 -1
  334. package/src/components/ExpressionEditor/NamedQueryContext.d.ts +1 -1
  335. package/src/components/ExpressionEditor/QueryBuilder/QueryBuilder.js +45 -15
  336. package/src/components/ExpressionEditor/QueryBuilder/QueryBuilderInputs.d.ts +7 -2
  337. package/src/components/ExpressionEditor/QueryBuilder/QueryBuilderInputs.js +48 -33
  338. package/src/components/ExpressionEditor/QueryBuilder/QueryPredicateBuilder.d.ts +1 -1
  339. package/src/components/ExpressionEditor/QueryBuilder/QueryPredicateBuilder.js +6 -6
  340. package/src/components/ExpressionEditor/QueryBuilder/booleanExpressions.js +2 -0
  341. package/src/components/ExpressionEditor/QueryBuilder/utils.d.ts +2 -1
  342. package/src/components/ExpressionEditor/QueryBuilder/utils.js +30 -0
  343. package/src/components/ExpressionEditor/index.d.ts +2 -1
  344. package/src/components/ExpressionEditor/index.js +81 -59
  345. package/src/components/FormLayout/index.d.ts +4 -4
  346. package/src/components/Input/NumberInput.d.ts +1 -1
  347. package/src/components/Input/index.d.ts +2 -2
  348. package/src/components/List/ListGroupItem/index.d.ts +2 -2
  349. package/src/components/Modal/Backdrop.d.ts +2 -2
  350. package/src/components/OverlayTrigger/index.d.ts +1 -1
  351. package/src/components/Panel/index.d.ts +1 -1
  352. package/src/components/Radio/index.d.ts +1 -1
  353. package/src/components/ResizeObserver/index.d.ts +1 -1
  354. package/src/components/Select/Select.d.ts +30 -0
  355. package/src/components/Select/Select.js +128 -0
  356. package/src/components/Select/index.d.ts +1 -0
  357. package/src/components/Select/index.js +1 -0
  358. package/src/components/SelectableList/index.d.ts +1 -1
  359. package/src/components/Tabs/index.d.ts +3 -3
  360. package/src/components/Textarea/index.d.ts +1 -1
  361. package/src/components/Toggle/Toggle.d.ts +1 -1
  362. package/src/components/WarningBox/index.d.ts +4 -0
  363. package/src/components/WarningBox/index.js +7 -0
  364. package/src/components/WindowModal/WindowModal.d.ts +2 -2
  365. package/src/components/icons/DefaultIcon.d.ts +1 -1
  366. package/src/components/icons/index.js +2 -0
  367. package/src/components/icons/resume.d.ts +3 -0
  368. package/src/components/icons/resume.js +4 -0
  369. package/src/components/utils/useContainerScrollObserver/index.d.ts +1 -1
  370. package/src/components/utils/uuid.d.ts +1 -1
  371. package/src/metamodel/adaptable-metamodel-model.d.ts +2 -2
  372. package/src/metamodel/adaptable.metamodel.d.ts +330 -27
  373. package/src/metamodel/adaptable.metamodel.js +9435 -1
  374. package/src/parser/src/predicate/mapExpressionToQlPredicate.js +1 -1
  375. package/src/parser/src/predicate/mapQlPredicateToExpression.js +3 -0
  376. package/src/parser/src/predicate/types.d.ts +2 -2
  377. package/src/parser/src/types.d.ts +23 -11
  378. package/src/renderReactRoot.d.ts +2 -4
  379. package/src/renderReactRoot.js +5 -46
  380. package/src/types.d.ts +6 -6
  381. package/themes/dark.css +1 -1
  382. package/themes/dark.css.map +1 -1
  383. package/themes/light.css +1 -1
  384. package/themes/light.css.map +1 -1
  385. package/tsconfig.esm.tsbuildinfo +1 -0
  386. package/publishTimestamp.d.ts +0 -2
  387. package/publishTimestamp.js +0 -1
  388. package/src/AdaptableOptions/FilterOptions.d.ts +0 -216
  389. package/src/AdaptableOptions/FinancePluginOptions.d.ts +0 -6
  390. package/src/AdaptableOptions/FinancePluginOptions.js +0 -1
  391. package/src/Api/Events/ChexboxColumnClicked.d.ts +0 -24
  392. package/src/Api/Events/ChexboxColumnClicked.js +0 -1
  393. package/src/Api/Events/QueryRun.d.ts +0 -15
  394. package/src/Api/Events/QueryRun.js +0 -1
  395. package/src/PredefinedConfig/ConditionalStyleState.d.ts +0 -41
  396. package/src/PredefinedConfig/ConditionalStyleState.js +0 -1
  397. package/version.d.ts +0 -2
  398. package/version.js +0 -1
  399. /package/src/AdaptableOptions/{FilterOptions.js → GridFilterOptions.js} +0 -0
@@ -1,46 +1,27 @@
1
1
  import * as React from 'react';
2
- import { StringExtensions } from '../../../Utilities/Extensions/StringExtensions';
3
- import { SortOrder } from '../../../PredefinedConfig/Common/Enums';
4
- import { ArrayExtensions } from '../../../Utilities/Extensions/ArrayExtensions';
5
- import FormLayout, { FormRow } from '../../../components/FormLayout';
6
- import DropdownButton from '../../../components/DropdownButton';
7
- export class ColumnSelector extends React.Component {
8
- render() {
2
+ import { Select } from '../../../components/Select';
3
+ import { useAdaptable } from '../../AdaptableContext';
4
+ export const ColumnSelector = function (props) {
5
+ const { api } = useAdaptable();
6
+ const columns = React.useMemo(() => {
7
+ return api.columnApi.getColumnsOfType(props.type);
8
+ }, []);
9
+ const getColumn = (columnId) => columns.find((c) => c.columnId === columnId);
10
+ const options = columns
11
+ .map((column) => {
9
12
  var _a;
10
- const sortedColumns = ArrayExtensions.sortArrayWithProperty(SortOrder.Asc, this.props.ColumnList, 'friendlyName');
11
- const selectedColumnIds = this.props.SelectedColumnIds.filter((x) => StringExtensions.IsNotNullOrEmpty(x));
12
- const isEmptySelectedColumnIds = this.props.SelectedColumnIds.filter((x) => StringExtensions.IsNotNullOrEmpty(x)).length == 0;
13
- let sortedColumnOptions = sortedColumns.map((column) => {
14
- return {
15
- label: column.friendlyName,
16
- value: column.columnId,
17
- disabled: this.props.disabled,
18
- onClick: () => {
19
- const selected = sortedColumns.filter((c) => c.columnId === column.columnId);
20
- if (!selected.length) {
21
- this.onClearButton();
22
- }
23
- else {
24
- this.onColumnChange(selected, isEmptySelectedColumnIds);
25
- }
26
- },
27
- };
13
+ return ({
14
+ label: (_a = column.friendlyName) !== null && _a !== void 0 ? _a : column.columnId,
15
+ value: column.columnId,
28
16
  });
29
- let currentColumnName = selectedColumnIds.length > 0
30
- ? (_a = this.props.ColumnList.find((c) => c.columnId == selectedColumnIds[0])) === null || _a === void 0 ? void 0 : _a.friendlyName
31
- : 'Select a column';
32
- return (React.createElement("div", { "data-name": 'column-selector' },
33
- React.createElement(FormLayout, { columns: [{ name: 'columnSelector', style: { display: 'flex' } }], style: this.props.style },
34
- React.createElement(FormRow, null,
35
- React.createElement(DropdownButton, { marginRight: 2, columns: ['label'], showClearButton: currentColumnName != 'Select a column', onClear: () => this.onClearButton(), style: { width: '100%', fontSize: 'small' }, items: sortedColumnOptions, disabled: this.props.disabled || sortedColumnOptions.length == 0 }, currentColumnName)))));
36
- }
37
- onClearButton() {
38
- this.props.onColumnChange([]);
39
- }
40
- onColumnChange(selected, isEmptySelection) {
41
- if (selected.length == 0 && isEmptySelection) {
42
- return; // must be a nicer way but we want to avoid ridiculous amounts of prop calls
17
+ })
18
+ .filter((option) => {
19
+ if (props.filterColumn) {
20
+ return props.filterColumn(getColumn(option.value));
43
21
  }
44
- this.props.onColumnChange(selected);
45
- }
46
- }
22
+ return true;
23
+ });
24
+ return (React.createElement(Select, { "data-name": "column-selector", disabled: props.disabled, isMulti: props.isMulti, menuPosition: props.menuPosition, value: props.value, onChange: (colId) => {
25
+ props.onChange(colId);
26
+ }, options: options }));
27
+ };
@@ -0,0 +1,18 @@
1
+ import * as React from 'react';
2
+ import { SelectionMode } from '../../../PredefinedConfig/Common/Enums';
3
+ import { AdaptableColumn } from '../../../PredefinedConfig/Common/AdaptableColumn';
4
+ export interface ColumnSelectorProps extends React.HTMLProps<ColumnSelector> {
5
+ ColumnList: AdaptableColumn[];
6
+ SelectedColumnIds: string[];
7
+ onColumnChange: (SelectedColumns: AdaptableColumn[]) => void;
8
+ SelectionMode: SelectionMode;
9
+ className?: string;
10
+ placeHolder?: string;
11
+ showClearButton?: boolean;
12
+ disabled?: boolean;
13
+ }
14
+ export declare class ColumnSelector extends React.Component<ColumnSelectorProps, {}> {
15
+ render(): JSX.Element;
16
+ onClearButton(): void;
17
+ onColumnChange(selected: AdaptableColumn[], isEmptySelection: boolean): void;
18
+ }
@@ -0,0 +1,46 @@
1
+ import * as React from 'react';
2
+ import { StringExtensions } from '../../../Utilities/Extensions/StringExtensions';
3
+ import { SortOrder } from '../../../PredefinedConfig/Common/Enums';
4
+ import { ArrayExtensions } from '../../../Utilities/Extensions/ArrayExtensions';
5
+ import FormLayout, { FormRow } from '../../../components/FormLayout';
6
+ import DropdownButton from '../../../components/DropdownButton';
7
+ export class ColumnSelector extends React.Component {
8
+ render() {
9
+ var _a;
10
+ const sortedColumns = ArrayExtensions.sortArrayWithProperty(SortOrder.Asc, this.props.ColumnList, 'friendlyName');
11
+ const selectedColumnIds = this.props.SelectedColumnIds.filter((x) => StringExtensions.IsNotNullOrEmpty(x));
12
+ const isEmptySelectedColumnIds = this.props.SelectedColumnIds.filter((x) => StringExtensions.IsNotNullOrEmpty(x)).length == 0;
13
+ let sortedColumnOptions = sortedColumns.map((column) => {
14
+ return {
15
+ label: column.friendlyName,
16
+ value: column.columnId,
17
+ disabled: this.props.disabled,
18
+ onClick: () => {
19
+ const selected = sortedColumns.filter((c) => c.columnId === column.columnId);
20
+ if (!selected.length) {
21
+ this.onClearButton();
22
+ }
23
+ else {
24
+ this.onColumnChange(selected, isEmptySelectedColumnIds);
25
+ }
26
+ },
27
+ };
28
+ });
29
+ let currentColumnName = selectedColumnIds.length > 0
30
+ ? (_a = this.props.ColumnList.find((c) => c.columnId == selectedColumnIds[0])) === null || _a === void 0 ? void 0 : _a.friendlyName
31
+ : 'Select a column';
32
+ return (React.createElement("div", { "data-name": 'column-selector' },
33
+ React.createElement(FormLayout, { columns: [{ name: 'columnSelector', style: { display: 'flex' } }], style: this.props.style },
34
+ React.createElement(FormRow, null,
35
+ React.createElement(DropdownButton, { marginRight: 2, columns: ['label'], showClearButton: currentColumnName != 'Select a column', onClear: () => this.onClearButton(), style: { width: '100%', fontSize: 'small' }, items: sortedColumnOptions, disabled: this.props.disabled || sortedColumnOptions.length == 0 }, currentColumnName)))));
36
+ }
37
+ onClearButton() {
38
+ this.props.onColumnChange([]);
39
+ }
40
+ onColumnChange(selected, isEmptySelection) {
41
+ if (selected.length == 0 && isEmptySelection) {
42
+ return; // must be a nicer way but we want to avoid ridiculous amounts of prop calls
43
+ }
44
+ this.props.onColumnChange(selected);
45
+ }
46
+ }
@@ -3,7 +3,7 @@ import { AdaptableColumn } from '../../../PredefinedConfig/Common/AdaptableColum
3
3
  import { DropdownButtonProps } from '../../../components/DropdownButton';
4
4
  import { AdaptableApi } from '../../../Api/AdaptableApi';
5
5
  import { GridCell } from '../../../types';
6
- export interface ColumnValueSelectorProps extends React.HTMLProps<ColumnValueSelector> {
6
+ export interface ColumnValueSelectorProps {
7
7
  selectedColumn: AdaptableColumn;
8
8
  selectedColumnValue: string;
9
9
  onColumnValueChange: (columnvalue: any) => void;
@@ -14,26 +14,7 @@ export interface ColumnValueSelectorProps extends React.HTMLProps<ColumnValueSel
14
14
  existingLabel?: string;
15
15
  dropdownButtonProps?: DropdownButtonProps;
16
16
  selectedGridCells: GridCell[];
17
+ disabled?: boolean;
18
+ className?: string;
17
19
  }
18
- declare enum NEW_OR_EXISTING {
19
- existing = "Existing value",
20
- new = "New value"
21
- }
22
- interface ColumnValueSelectorState {
23
- newOrExisting: NEW_OR_EXISTING;
24
- distinctColumnValues: any[];
25
- isDistinctColumnValuesLoading: boolean;
26
- }
27
- export declare class ColumnValueSelector extends React.Component<ColumnValueSelectorProps, ColumnValueSelectorState> {
28
- static defaultProps: {
29
- newLabel: string;
30
- existingLabel: string;
31
- };
32
- constructor(props: ColumnValueSelectorProps);
33
- componentDidUpdate(prevProps: ColumnValueSelectorProps): void;
34
- loadPermittedValues: () => Promise<void>;
35
- handleSelectedValueExpand: () => void;
36
- render(): JSX.Element;
37
- onSelectedValueChange(selected: any[]): void;
38
- }
39
- export {};
20
+ export declare const ColumnValueSelector: (props: ColumnValueSelectorProps) => JSX.Element;
@@ -1,133 +1,41 @@
1
1
  import * as React from 'react';
2
- import { StringExtensions } from '../../../Utilities/Extensions/StringExtensions';
3
- import { SortOrder } from '../../../PredefinedConfig/Common/Enums';
4
- import { ArrayExtensions } from '../../../Utilities/Extensions/ArrayExtensions';
5
2
  import FieldWrap from '../../../components/FieldWrap';
6
- import DropdownButton from '../../../components/DropdownButton';
7
3
  import UIHelper from '../../UIHelper';
8
4
  import AdaptableInput from '../AdaptableInput';
9
- import { runIfNotResolvedIn } from '../../../Utilities/runIfNotResolvedIn';
10
- import join from '../../../components/utils/join';
11
- var NEW_OR_EXISTING;
12
- (function (NEW_OR_EXISTING) {
13
- NEW_OR_EXISTING["existing"] = "Existing value";
14
- NEW_OR_EXISTING["new"] = "New value";
15
- })(NEW_OR_EXISTING || (NEW_OR_EXISTING = {}));
16
- export class ColumnValueSelector extends React.Component {
17
- constructor(props) {
18
- super(props);
19
- this.loadPermittedValues = async () => {
20
- var _a;
21
- if (!((_a = this.props.selectedColumn) === null || _a === void 0 ? void 0 : _a.columnId)) {
22
- return;
23
- }
24
- // JW "fixed" this by replacing display values with raw values but really we should do it nicer in some way
25
- // so that you we show the display value but we work on the raw value
26
- const columnDisplayValuePairs = await runIfNotResolvedIn(this.props.api.gridApi.internalApi.getDistinctBulkUpdateDisplayValuesForColumn(this.props.selectedColumn.columnId, this.props.selectedGridCells), () => this.setState({ isDistinctColumnValuesLoading: true }));
27
- this.setState({ isDistinctColumnValuesLoading: false });
28
- const newSortedColumnValues = ArrayExtensions.sortArray(columnDisplayValuePairs, SortOrder.Asc).map((v) => ({
29
- label: v,
30
- value: v,
31
- onClick: () => this.onSelectedValueChange([{ DisplayValue: v }]),
32
- }));
33
- this.setState({
34
- distinctColumnValues: newSortedColumnValues,
35
- });
36
- };
37
- this.handleSelectedValueExpand = () => {
38
- // load only if not loaded
39
- if (!this.state.distinctColumnValues.length) {
40
- this.loadPermittedValues();
41
- }
42
- };
43
- this.state = {
44
- newOrExisting: NEW_OR_EXISTING.existing,
45
- distinctColumnValues: [],
46
- isDistinctColumnValuesLoading: false,
47
- };
48
- }
49
- componentDidUpdate(prevProps) {
50
- if (this.props.selectedColumn !== prevProps.selectedColumn ||
51
- this.props.selectedGridCells !== prevProps.selectedGridCells) {
52
- this.loadPermittedValues();
53
- }
54
- }
55
- render() {
56
- let placeholderText = 'Select';
57
- let allowNew = this.props.allowNew != null ? this.props.allowNew : true;
58
- if (allowNew) {
59
- // placeholderText += ' or enter free text';
60
- }
61
- const baseClassName = 'ab-column-value-selector';
62
- const className = join('ab-column-value-selector', this.state.isDistinctColumnValuesLoading && `${baseClassName}--loading`);
63
- const fieldWidth = 150;
64
- const items = this.state.isDistinctColumnValuesLoading
65
- ? [
66
- {
67
- label: 'Loading',
68
- disabled: true,
69
- },
70
- ]
71
- : this.state.distinctColumnValues;
72
- const dd = (React.createElement("div", null,
73
- React.createElement(DropdownButton, { "data-name": "bulkupdate-value-selector", className: className, columns: ['label'], variant: "text", showClearButton: true, onClear: () => this.onSelectedValueChange([]), style: { fontSize: 'small' }, disabled: this.props.disabled, items: items, onExpand: this.handleSelectedValueExpand }, this.props.selectedColumnValue ? this.props.selectedColumnValue : placeholderText)));
74
- const input = (React.createElement(AdaptableInput, { "data-name": "bulkupdate-value-input", type: this.props.selectedColumn
75
- ? UIHelper.getDescriptionForDataType(this.props.selectedColumn.dataType)
76
- : 'text', placeholder: this.props.selectedColumn
77
- ? UIHelper.getPlaceHolderforDataType(this.props.selectedColumn.dataType)
78
- : 'Enter Value', autoFocus: true, disabled: this.props.disabled, style: { width: fieldWidth }, value: this.props.selectedColumnValue, onChange: (e) => {
79
- this.onSelectedValueChange([
80
- { customOption: true, DisplayValue: e.target.value },
81
- ]);
5
+ import { Box } from 'rebass';
6
+ import { PermittedValuesSelector } from './PermittedValuesSelector';
7
+ import { Select } from '../../../components/Select';
8
+ export const ColumnValueSelector = (props) => {
9
+ var _a, _b;
10
+ const [valueType, setValueType] = React.useState('existing');
11
+ const columnType = (_a = props.selectedColumn) === null || _a === void 0 ? void 0 : _a.dataType;
12
+ const isDateType = props.selectedColumn && columnType === 'Date';
13
+ const permittedValueSelector = (React.createElement(Box, null,
14
+ React.createElement(PermittedValuesSelector, { allowNewValues: true, disabled: props.disabled || !props.selectedColumn, value: props.selectedColumnValue === '' ? null : props.selectedColumnValue, columnId: (_b = props.selectedColumn) === null || _b === void 0 ? void 0 : _b.columnId, placeholder: isDateType ? 'Select' : 'Select or type new value', onChange: (value) => {
15
+ if (!value) {
16
+ props.onColumnValueChange(null);
17
+ }
18
+ else {
19
+ props.onColumnValueChange(value);
20
+ }
21
+ } })));
22
+ const input = (React.createElement(AdaptableInput, { "data-name": "bulkupdate-value-input", type: props.selectedColumn
23
+ ? UIHelper.getDescriptionForDataType(props.selectedColumn.dataType)
24
+ : 'text', placeholder: props.selectedColumn
25
+ ? UIHelper.getPlaceHolderforDataType(props.selectedColumn.dataType)
26
+ : 'Enter Value', autoFocus: true, disabled: props.disabled, style: { width: '100%' }, value: props.selectedColumnValue, onChange: (e) => {
27
+ props.onColumnValueChange(e.target.value);
28
+ } }));
29
+ let valueTypeSelector = null;
30
+ if (isDateType) {
31
+ valueTypeSelector = (React.createElement(Select, { options: [
32
+ { label: 'New', value: 'new' },
33
+ { label: 'Existing', value: 'existing' },
34
+ ], value: valueType, onChange: (value) => {
35
+ setValueType(value);
82
36
  } }));
83
- return (React.createElement(FieldWrap, { style: Object.assign(Object.assign({}, this.props.style), { overflow: 'visible' }) },
84
- this.state.newOrExisting === NEW_OR_EXISTING.existing ? dd : input,
85
- React.createElement(DropdownButton, Object.assign({ variant: "raised", tone: "neutral", columns: ['label'], style: {
86
- boxShadow: 'none',
87
- color: 'var(--ab-cmp-dashboardpanel__fill)',
88
- background: 'var(--ab-color-defaultbackground)',
89
- }, disabled: this.props.disabled, marginRight: 1, items: [
90
- {
91
- label: NEW_OR_EXISTING.existing,
92
- onClick: () => {
93
- this.setState({
94
- newOrExisting: NEW_OR_EXISTING.existing,
95
- });
96
- this.onSelectedValueChange([]);
97
- },
98
- },
99
- {
100
- label: NEW_OR_EXISTING.new,
101
- onClick: () => {
102
- this.setState({
103
- newOrExisting: NEW_OR_EXISTING.new,
104
- });
105
- this.onSelectedValueChange([]);
106
- },
107
- },
108
- ] }, this.props.dropdownButtonProps), this.state.newOrExisting === NEW_OR_EXISTING.existing
109
- ? this.props.existingLabel
110
- : this.props.newLabel)));
111
- }
112
- onSelectedValueChange(selected) {
113
- if (ArrayExtensions.IsEmpty(selected) &&
114
- StringExtensions.IsNullOrEmpty(this.props.selectedColumnValue)) {
115
- return; // must be a nicer way but we want to avoid ridiculous amounts of prop calls
116
- }
117
- if (ArrayExtensions.IsEmpty(selected)) {
118
- this.props.onColumnValueChange('');
119
- }
120
- else {
121
- if (selected[0].customOption) {
122
- this.props.onColumnValueChange(selected[0].DisplayValue);
123
- }
124
- else {
125
- this.props.onColumnValueChange(selected[0].DisplayValue);
126
- }
127
- }
128
37
  }
129
- }
130
- ColumnValueSelector.defaultProps = {
131
- newLabel: 'New value',
132
- existingLabel: 'Existing value',
38
+ return (React.createElement(FieldWrap, { className: props.className, style: Object.assign(Object.assign({}, props.style), { overflow: 'visible', maxWidth: '100%' }) }, isDateType ? (React.createElement(React.Fragment, null,
39
+ valueType === 'new' ? input : permittedValueSelector,
40
+ valueTypeSelector)) : (permittedValueSelector)));
133
41
  };
@@ -0,0 +1,13 @@
1
+ /// <reference types="react" />
2
+ export type ValueType = number | string | Date;
3
+ interface PermittedValuesSelectorProps<Value extends ValueType> {
4
+ columnId: string;
5
+ value: Value;
6
+ onChange: (value: Value) => void;
7
+ allowNewValues?: boolean;
8
+ className?: string;
9
+ disabled?: boolean;
10
+ placeholder?: string;
11
+ }
12
+ export declare const PermittedValuesSelector: <Value extends ValueType>(props: PermittedValuesSelectorProps<Value>) => JSX.Element;
13
+ export {};
@@ -0,0 +1,46 @@
1
+ import * as React from 'react';
2
+ import { Select } from '../../../components/Select';
3
+ import { runIfNotResolvedIn } from '../../../Utilities/runIfNotResolvedIn';
4
+ import { useAdaptable } from '../../AdaptableContext';
5
+ export const PermittedValuesSelector = function (props) {
6
+ const adaptable = useAdaptable();
7
+ const [isLoading, setIsLoading] = React.useState(true);
8
+ const [options, setOptions] = React.useState([]);
9
+ const [filter, setFilter] = React.useState('');
10
+ const columnType = React.useMemo(() => {
11
+ return adaptable.api.columnApi.getColumnDataTypeForColumnId(props.columnId);
12
+ }, []);
13
+ React.useEffect(() => {
14
+ if (!props.columnId) {
15
+ setIsLoading(false);
16
+ return;
17
+ }
18
+ setIsLoading(true);
19
+ (async () => {
20
+ const { values: distinctColumnValues } = await runIfNotResolvedIn(adaptable.api.gridApi.internalApi.getDistinctFilterDisplayValuesForColumn(props.columnId, filter, adaptable.api.optionsApi.getColumnFilterOptions().valuesFilterOptions
21
+ .showDistinctFilteredValuesOnly), () => {
22
+ setIsLoading(true);
23
+ });
24
+ setIsLoading(false);
25
+ setOptions(distinctColumnValues);
26
+ })();
27
+ }, [props.columnId, filter]);
28
+ const isCreatable = props.allowNewValues && ['String', 'Number'].includes(columnType);
29
+ const handleOnChange = (value) => {
30
+ // convert numbers
31
+ if (isCreatable) {
32
+ if (columnType === 'Number') {
33
+ let num = parseFloat(value);
34
+ num = isNaN(num) ? null : num;
35
+ props.onChange(num);
36
+ }
37
+ else {
38
+ props.onChange(value);
39
+ }
40
+ }
41
+ else {
42
+ props.onChange(value);
43
+ }
44
+ };
45
+ return (React.createElement(Select, { className: props.className, disabled: props.disabled, "data-name": "permitted-values-selector", placeholder: props.placeholder || (props.allowNewValues ? 'Select or type new value' : 'Select value'), isCreatable: isCreatable, isClearable: true, options: options, isLoding: isLoading, onInputChange: setFilter, onChange: handleOnChange, value: props.value }));
46
+ };
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
- import { AdaptableStyle } from '../../PredefinedConfig/Common/AdaptableStyle';
3
2
  import { CSSProperties } from 'react';
4
3
  import { AdaptableApi } from '../../Api/AdaptableApi';
4
+ import { AdaptableStyle } from '../../PredefinedConfig/Common/AdaptableStyle';
5
5
  export interface StyleComponentProps extends React.ClassAttributes<StyleComponent> {
6
6
  className?: string;
7
7
  style?: CSSProperties;
@@ -20,10 +20,9 @@ export declare class StyleComponent extends React.Component<StyleComponentProps,
20
20
  constructor(props: StyleComponentProps);
21
21
  static getDerivedStateFromProps(nextProps: StyleComponentProps, prevState: StyleComponentState): {
22
22
  componentStyle: AdaptableStyle;
23
- ShowClassName: boolean;
24
23
  };
25
24
  render(): JSX.Element;
26
- private onShowClassNameChanged;
25
+ onShowClassNameChanged: (checked: boolean) => void;
27
26
  private onStyleClassNameChanged;
28
27
  private onUseBackColorCheckChange;
29
28
  private onUseForeColorCheckChange;
@@ -1,23 +1,37 @@
1
1
  import * as React from 'react';
2
- import { FontWeight, FontStyle, FontSize } from '../../PredefinedConfig/Common/Enums';
3
- import { EnumExtensions } from '../../Utilities/Extensions/EnumExtensions';
4
- import { ColorPicker } from '../../components/ColorPicker';
5
- import { Text, Flex, Box } from 'rebass';
6
- import { StringExtensions } from '../../Utilities/Extensions/StringExtensions';
2
+ import { Box, Flex, Text } from 'rebass';
7
3
  import { CheckBox } from '../../components/CheckBox';
8
- import Panel from '../../components/Panel';
9
- import HelpBlock from '../../components/HelpBlock';
4
+ import { ColorPicker } from '../../components/ColorPicker';
10
5
  import FormLayout, { FormRow } from '../../components/FormLayout';
11
- import DropdownButton from '../../components/DropdownButton';
12
- import ArrayExtensions from '../../Utilities/Extensions/ArrayExtensions';
6
+ import HelpBlock from '../../components/HelpBlock';
7
+ import Panel from '../../components/Panel';
13
8
  import Radio from '../../components/Radio';
9
+ import { Select } from '../../components/Select';
14
10
  import { StylePreview } from '../../components/StylePreview';
15
- import { ToggleGroup } from '../../components/Toggle/ToggleGroup';
16
11
  import { Toggle } from '../../components/Toggle/Toggle';
12
+ import { ToggleGroup } from '../../components/Toggle/ToggleGroup';
13
+ import { FontSize, FontStyle, FontWeight } from '../../PredefinedConfig/Common/Enums';
14
+ import ArrayExtensions from '../../Utilities/Extensions/ArrayExtensions';
15
+ import { EnumExtensions } from '../../Utilities/Extensions/EnumExtensions';
16
+ import { StringExtensions } from '../../Utilities/Extensions/StringExtensions';
17
17
  import AdaptableInput from './AdaptableInput';
18
18
  export class StyleComponent extends React.Component {
19
19
  constructor(props) {
20
20
  super(props);
21
+ this.onShowClassNameChanged = (checked) => {
22
+ this.setState((state) => {
23
+ const newState = Object.assign({}, state);
24
+ delete newState.componentStyle.BackColor;
25
+ delete newState.componentStyle.ForeColor;
26
+ delete newState.componentStyle.BorderColor;
27
+ delete newState.componentStyle.FontSize;
28
+ delete newState.componentStyle.FontStyle;
29
+ delete newState.componentStyle.FontWeight;
30
+ newState.componentStyle.ClassName = '';
31
+ newState.ShowClassName = checked;
32
+ return newState;
33
+ });
34
+ };
21
35
  this.state = {
22
36
  componentStyle: this.props.Style,
23
37
  ShowClassName: StringExtensions.IsNotNullOrEmpty(this.props.Style.ClassName),
@@ -26,7 +40,6 @@ export class StyleComponent extends React.Component {
26
40
  static getDerivedStateFromProps(nextProps, prevState) {
27
41
  return {
28
42
  componentStyle: nextProps.Style,
29
- ShowClassName: StringExtensions.IsNotNullOrEmpty(nextProps.Style.ClassName),
30
43
  };
31
44
  }
32
45
  render() {
@@ -46,22 +59,19 @@ export class StyleComponent extends React.Component {
46
59
  fontSizes.push(...EnumExtensions.getNames(FontSize));
47
60
  return (React.createElement(Cmp, Object.assign({}, cmpProps, { className: "ab-StyleComponent" }),
48
61
  ArrayExtensions.IsNotNullOrEmpty(styleClassNames) && (React.createElement(Flex, { flexDirection: "row", padding: 2 },
49
- React.createElement(Radio, { "data-name": "show-class-name", value: "Predicate", checked: this.state.ShowClassName, onChange: (checked) => this.onShowClassNameChanged(checked) }, "Use Style Class Name"),
62
+ React.createElement(Radio, { "data-name": "show-class-name", value: "classname", checked: this.state.ShowClassName, onChange: () => this.onShowClassNameChanged(true) }, "Use Style Class Name"),
50
63
  ' ',
51
- React.createElement(Radio, { "data-name": "create-style", marginLeft: 3, value: "Expression", checked: !this.state.ShowClassName, onChange: (checked) => this.onShowClassNameChanged(!checked) }, "Create Style"),
64
+ React.createElement(Radio, { "data-name": "create-style", marginLeft: 3, value: "expression", checked: !this.state.ShowClassName, onChange: () => this.onShowClassNameChanged(false) }, "Create Style"),
52
65
  ' ')),
53
66
  this.state.ShowClassName ? (React.createElement("div", null,
54
67
  React.createElement(HelpBlock, { fontSize: 2 }, 'Select a CSS Class Name'),
55
- React.createElement(DropdownButton, { "data-name": "select-class-anme", margin: 3, placeholder: "Select", variant: "outlined", columns: ['label'], tone: "none", disabled: ArrayExtensions.IsNullOrEmpty(styleClassNames), style: {
56
- minWidth: '15rem',
57
- whiteSpace: 'nowrap',
58
- overflow: 'hidden',
59
- textOverflow: 'ellipsis',
60
- }, items: styleClassNames.map((item) => ({
61
- value: item,
62
- label: item,
63
- onClick: () => this.onStyleClassNameChanged(item),
64
- })) }, this.state.componentStyle.ClassName),
68
+ React.createElement(Box, { style: { maxWidth: '15rem' }, m: 3 },
69
+ React.createElement(Select, { options: ArrayExtensions.IsNullOrEmpty(styleClassNames)
70
+ ? []
71
+ : styleClassNames.map((item) => ({
72
+ label: item,
73
+ value: item,
74
+ })), value: this.state.componentStyle.ClassName, onChange: (value) => this.onStyleClassNameChanged(value) })),
65
75
  React.createElement(Text, { color: 'var(--ab-color-warn)', style: { flex: 2 }, margin: 2 }, 'Please ensure that the styles listed are in the current stylesheet'))) : (React.createElement(Flex, { flexDirection: "column" },
66
76
  React.createElement(Flex, { flex: 1 },
67
77
  React.createElement("div", null,
@@ -98,18 +108,16 @@ export class StyleComponent extends React.Component {
98
108
  React.createElement(Toggle, { icon: "strikethrough", pressed: this.state.componentStyle.TextDecoration === 'LineThrough', onPressedChange: (checked) => this.onTextDecorationChange(checked ? 'LineThrough' : 'None') }),
99
109
  React.createElement(Toggle, { icon: "overline", pressed: this.state.componentStyle.TextDecoration === 'Overline', onPressedChange: (checked) => this.onTextDecorationChange(checked ? 'Overline' : 'None') }))),
100
110
  React.createElement(FormRow, { label: "Font Size" }, !this.props.showFontSizeAs || this.props.showFontSizeAs === 'dropdown' ? (React.createElement(Flex, { flexDirection: "row", alignItems: "center" },
101
- React.createElement(DropdownButton, { width: "100px", mr: 1, items: [
111
+ React.createElement(Select, { placeholder: "Default", options: [
102
112
  {
103
- value: '',
104
113
  label: 'Default',
105
- onClick: () => this.onFontSizeChange(''),
114
+ value: '',
106
115
  },
107
116
  ...EnumExtensions.getNames(FontSize).map((enumName) => ({
108
- value: enumName,
109
117
  label: enumName,
110
- onClick: () => this.onFontSizeChange(enumName),
118
+ value: enumName,
111
119
  })),
112
- ], columns: ['label'] }, (_b = (_a = this.state.componentStyle.FontSize) === null || _a === void 0 ? void 0 : _a.toString()) !== null && _b !== void 0 ? _b : 'Default'))) : (React.createElement(Box, null, fontSizes.map((enumName) => {
120
+ ], value: (_b = (_a = this.state.componentStyle.FontSize) === null || _a === void 0 ? void 0 : _a.toString()) !== null && _b !== void 0 ? _b : '', onChange: (value) => this.onFontSizeChange(value) }))) : (React.createElement(Box, null, fontSizes.map((enumName) => {
113
121
  return (React.createElement(Radio, { onClick: () => this.onFontSizeChange(enumName), checked: (enumName == 'Default' && !this.state.componentStyle.FontSize) ||
114
122
  this.state.componentStyle.FontSize === enumName, mr: 3, key: enumName }, enumName));
115
123
  })))),
@@ -127,17 +135,6 @@ export class StyleComponent extends React.Component {
127
135
  React.createElement(HelpBlock, { fontSize: 2, marginTop: 2, marginBottom: 2 }, "Preview"),
128
136
  React.createElement(StylePreview, { styleObject: this.state.componentStyle })))));
129
137
  }
130
- onShowClassNameChanged(checked) {
131
- // clear everything
132
- delete this.state.componentStyle.BackColor;
133
- delete this.state.componentStyle.ForeColor;
134
- delete this.state.componentStyle.BorderColor;
135
- delete this.state.componentStyle.FontSize;
136
- delete this.state.componentStyle.FontStyle;
137
- delete this.state.componentStyle.FontWeight;
138
- this.state.componentStyle.ClassName = '';
139
- this.setState({ ShowClassName: checked });
140
- }
141
138
  onStyleClassNameChanged(value) {
142
139
  this.state.componentStyle.ClassName = value == 'select' ? '' : value;
143
140
  this.props.UpdateStyle(this.state.componentStyle);
@@ -66,14 +66,14 @@ class ToolPanelPopupComponent extends React.Component {
66
66
  }
67
67
  return false;
68
68
  };
69
- return (React.createElement(PopupPanel, { headerText: "ToolPanel", glyphicon: this.props.moduleInfo.Glyph, infoLink: this.props.moduleInfo.HelpPage, infoLinkDisabled: !this.props.api.internalApi.isDocumentationLinksDisplayed() },
69
+ return (React.createElement(PopupPanel, { headerText: "Tool Panel", glyphicon: this.props.moduleInfo.Glyph, infoLink: this.props.moduleInfo.HelpPage, infoLinkDisabled: !this.props.api.internalApi.isDocumentationLinksDisplayed() },
70
70
  React.createElement(Tabs, { "data-name": 'toolPanelPopup-component', className: "ab-ToolPanelPopup", value: this.state.ToolPanelConfigView, style: { height: '100%' }, onValueChange: (value) => this.setState({ ToolPanelConfigView: value }) },
71
71
  React.createElement(Tabs.Tab, { value: ToolPanelConfigView.ToolPanels },
72
72
  React.createElement(Radio, { margin: 0, value: ToolPanelConfigView.ToolPanels, checked: this.state.ToolPanelConfigView == ToolPanelConfigView.ToolPanels, tabIndex: -1 }, "Tool Panels")),
73
73
  React.createElement(Tabs.Tab, { value: ToolPanelConfigView.Buttons },
74
74
  React.createElement(Radio, { margin: 0, value: ToolPanelConfigView.Buttons, checked: this.state.ToolPanelConfigView == ToolPanelConfigView.Buttons, tabIndex: -1 }, "Module Buttons")),
75
75
  React.createElement(Tabs.Content, { value: ToolPanelConfigView.ToolPanels, style: { flex: 1, overflow: 'auto' } },
76
- React.createElement(ModuleValueSelector, { options: availableToolPanels, value: selectedToolPanels, noSelectionLabel: 'No selected Tool Panel', xSelectedLabel: () => `Visible ToolPanels:`, onChange: (selectedValues) => this.onToolPanelToolPanelsChanged(selectedValues), disabled: isToolPanelReadOnly })),
76
+ React.createElement(ModuleValueSelector, { options: availableToolPanels, value: selectedToolPanels, noSelectionLabel: 'No selected Tool Panel', xSelectedLabel: () => `Visible Tool Panels:`, onChange: (selectedValues) => this.onToolPanelToolPanelsChanged(selectedValues), disabled: isToolPanelReadOnly })),
77
77
  React.createElement(Tabs.Content, { value: ToolPanelConfigView.Buttons, style: { flex: 1, overflow: 'auto' } },
78
78
  React.createElement(ModuleValueSelector, { options: allModuleButtons, value: selectedModuleButtons, noSelectionLabel: 'No selected Module Button', xSelectedLabel: () => `Visible Module Buttons:`, isOptionDisabled: isModuleCheckboxDisabled, disabled: isToolPanelReadOnly, onChange: (selectedValues) => this.props.onToolPanelSetModuleButtons(selectedValues) })))));
79
79
  }
@@ -2,7 +2,7 @@
2
2
  import { AdaptableToolPanel } from '../../../PredefinedConfig/Common/Types';
3
3
  import { CustomToolPanel } from '../../../AdaptableOptions/ToolPanelOptions';
4
4
  import { ToolPanelVisibilityMode } from '../../../PredefinedConfig/ToolPanelState';
5
- export declare type ToolPanelWrapperProps = {
5
+ export type ToolPanelWrapperProps = {
6
6
  adaptableToolPanel: AdaptableToolPanel;
7
7
  customToolPanel?: undefined;
8
8
  visibilityMode: ToolPanelVisibilityMode;
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { ReactNode } from 'react';
3
- export declare type ValueSelectorProps<OPTION_TYPE, ID_TYPE extends number | string> = {
3
+ export type ValueSelectorProps<OPTION_TYPE, ID_TYPE extends number | string> = {
4
4
  options: OPTION_TYPE[];
5
5
  value: ID_TYPE[];
6
6
  onChange: (selected: ID_TYPE[], selectedMap: Map<ID_TYPE, OPTION_TYPE>) => void;
@@ -33,7 +33,7 @@ export declare namespace ValueSelector {
33
33
  allowReorder: boolean;
34
34
  };
35
35
  }
36
- declare type ValueOptionsTagsProps<OPTION_TYPE, ID_TYPE extends number | string> = {
36
+ type ValueOptionsTagsProps<OPTION_TYPE, ID_TYPE extends number | string> = {
37
37
  style?: React.CSSProperties;
38
38
  options: OPTION_TYPE[];
39
39
  value: ID_TYPE[];
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { CustomSort } from '../../../PredefinedConfig/CustomSortState';
3
- export declare type CustomSortColumnWizardSectionProps = {
3
+ export type CustomSortColumnWizardSectionProps = {
4
4
  onChange: (data: CustomSort) => void;
5
5
  isNew: boolean;
6
6
  };
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { CustomSort } from '../../../PredefinedConfig/CustomSortState';
3
- export declare type CustomSortValuesWizardSectionProps = {
3
+ export type CustomSortValuesWizardSectionProps = {
4
4
  onChange: (data: CustomSort) => void;
5
5
  };
6
6
  export declare const isValidCustomSortOrder: (data: CustomSort) => true | string;