@adaptabletools/adaptable 10.0.2 → 10.0.4-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 (306) hide show
  1. package/LICENSE.md +1 -1
  2. package/README.md +1 -1
  3. package/base.css +84 -32
  4. package/bundle.cjs.js +350 -0
  5. package/index.css +100 -34
  6. package/package.json +1 -5
  7. package/publishTimestamp.d.ts +1 -1
  8. package/publishTimestamp.js +1 -1
  9. package/src/AdaptableInterfaces/AdaptableNoCodeWizard.d.ts +1 -1
  10. package/src/AdaptableInterfaces/IAdaptable.d.ts +24 -12
  11. package/src/AdaptableOptions/AdaptableOptions.d.ts +3 -3
  12. package/src/AdaptableOptions/ContainerOptions.d.ts +4 -5
  13. package/src/AdaptableOptions/DataChangeHistoryOptions.d.ts +1 -1
  14. package/src/AdaptableOptions/DateInputOptions.d.ts +5 -1
  15. package/src/AdaptableOptions/EditOptions.d.ts +2 -3
  16. package/src/AdaptableOptions/FilterOptions.d.ts +22 -15
  17. package/src/AdaptableOptions/GeneralOptions.d.ts +3 -2
  18. package/src/AdaptableOptions/LayoutOptions.d.ts +1 -1
  19. package/src/AdaptableOptions/MenuOptions.d.ts +11 -11
  20. package/src/AdaptableOptions/NotificationsOptions.d.ts +11 -1
  21. package/src/AdaptableOptions/ToolPanelOptions.d.ts +2 -2
  22. package/src/AdaptableOptions/UserInterfaceOptions.d.ts +108 -6
  23. package/src/Api/AdaptableApi.d.ts +12 -12
  24. package/src/Api/AlertApi.d.ts +1 -1
  25. package/src/Api/CalculatedColumnApi.d.ts +15 -0
  26. package/src/Api/ColumnApi.d.ts +49 -5
  27. package/src/Api/ConfigApi.d.ts +8 -0
  28. package/src/Api/EventApi.d.ts +1 -1
  29. package/src/Api/Events/AdaptableReady.d.ts +5 -8
  30. package/src/Api/Events/AdaptableStateChanged.d.ts +2 -1
  31. package/src/Api/Events/AlertFired.d.ts +2 -1
  32. package/src/Api/Events/BaseEventInfo.d.ts +10 -0
  33. package/src/{Utilities/Interface/ProgressIndicator.js → Api/Events/BaseEventInfo.js} +0 -0
  34. package/src/Api/Events/CellChanged.d.ts +2 -1
  35. package/src/Api/Events/ChexboxColumnClicked.d.ts +2 -1
  36. package/src/Api/Events/CustomToolbarConfigured.d.ts +2 -1
  37. package/src/Api/Events/DashboardChanged.d.ts +2 -1
  38. package/src/Api/Events/FlashingAlertFired.d.ts +2 -1
  39. package/src/Api/Events/GridDataChanged.d.ts +2 -1
  40. package/src/Api/Events/LayoutChanged.d.ts +2 -1
  41. package/src/Api/Events/LiveDataChanged.d.ts +2 -1
  42. package/src/Api/Events/SearchChanged.d.ts +2 -1
  43. package/src/Api/Events/SelectionChanged.d.ts +2 -1
  44. package/src/Api/Events/SystemStatusMessageDisplayed.d.ts +2 -1
  45. package/src/Api/Events/TeamSharingEntityChanged.d.ts +2 -1
  46. package/src/Api/Events/ThemeChanged.d.ts +2 -1
  47. package/src/Api/GridApi.d.ts +44 -18
  48. package/src/Api/Implementation/AlertApiImpl.d.ts +1 -1
  49. package/src/Api/Implementation/AlertApiImpl.js +22 -15
  50. package/src/Api/Implementation/CalculatedColumnApiImpl.d.ts +3 -0
  51. package/src/Api/Implementation/CalculatedColumnApiImpl.js +23 -0
  52. package/src/Api/Implementation/ColumnApiImpl.d.ts +12 -3
  53. package/src/Api/Implementation/ColumnApiImpl.js +79 -44
  54. package/src/Api/Implementation/ConfigApiImpl.d.ts +1 -1
  55. package/src/Api/Implementation/ConfigApiImpl.js +28 -41
  56. package/src/Api/Implementation/DashboardApiImpl.js +2 -1
  57. package/src/Api/Implementation/ExportApiImpl.js +4 -4
  58. package/src/Api/Implementation/FormatColumnApiImpl.js +2 -1
  59. package/src/Api/Implementation/FreeTextColumnApiImpl.js +9 -3
  60. package/src/Api/Implementation/GridApiImpl.d.ts +11 -2
  61. package/src/Api/Implementation/GridApiImpl.js +30 -13
  62. package/src/Api/Implementation/InternalApiImpl.d.ts +4 -2
  63. package/src/Api/Implementation/InternalApiImpl.js +21 -5
  64. package/src/Api/Implementation/LayoutApiImpl.d.ts +2 -0
  65. package/src/Api/Implementation/LayoutApiImpl.js +19 -3
  66. package/src/Api/Implementation/PluginsApiImpl.d.ts +2 -2
  67. package/src/Api/Implementation/PluginsApiImpl.js +1 -1
  68. package/src/Api/Implementation/ScheduleApiImpl.js +6 -6
  69. package/src/Api/Implementation/ScopeApiImpl.js +11 -11
  70. package/src/Api/Implementation/SystemStatusApiImpl.js +1 -0
  71. package/src/Api/Implementation/TeamSharingApiImpl.js +1 -0
  72. package/src/Api/Implementation/ThemeApiImpl.js +1 -0
  73. package/src/Api/Implementation/ToolPanelApiImpl.js +1 -1
  74. package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +15 -11
  75. package/src/Api/Implementation/UserInterfaceApiImpl.js +73 -91
  76. package/src/Api/InternalApi.d.ts +4 -2
  77. package/src/Api/LayoutApi.d.ts +7 -0
  78. package/src/Api/PluginsApi.d.ts +1 -7
  79. package/src/Api/TeamSharingApi.d.ts +1 -1
  80. package/src/Api/ThemeApi.d.ts +2 -2
  81. package/src/Api/UserInterfaceApi.d.ts +19 -9
  82. package/src/PredefinedConfig/AdaptableState.d.ts +2 -10
  83. package/src/PredefinedConfig/AlertState.d.ts +5 -1
  84. package/src/PredefinedConfig/ApplicationState.d.ts +1 -1
  85. package/src/PredefinedConfig/CalculatedColumnState.d.ts +5 -38
  86. package/src/PredefinedConfig/Common/AdaptableButton.d.ts +1 -1
  87. package/src/PredefinedConfig/Common/AdaptableColumn.d.ts +36 -36
  88. package/src/PredefinedConfig/Common/AdaptableColumn.js +5 -5
  89. package/src/PredefinedConfig/Common/AdaptablePredicate.d.ts +4 -4
  90. package/src/PredefinedConfig/Common/AdaptablePredicate.js +19 -18
  91. package/src/PredefinedConfig/Common/AdaptableStyle.d.ts +7 -7
  92. package/src/PredefinedConfig/Common/DataChangedInfo.d.ts +4 -3
  93. package/src/PredefinedConfig/Common/DataUpdateConfig.d.ts +5 -1
  94. package/src/PredefinedConfig/Common/Menu.d.ts +40 -17
  95. package/src/PredefinedConfig/Common/SpecialColumnSettings.d.ts +49 -0
  96. package/src/PredefinedConfig/Common/SpecialColumnSettings.js +2 -0
  97. package/src/PredefinedConfig/Common/Types.d.ts +5 -5
  98. package/src/PredefinedConfig/Common/Types.js +9 -7
  99. package/src/PredefinedConfig/ConditionalStyleState.d.ts +1 -1
  100. package/src/PredefinedConfig/CustomSortState.d.ts +1 -1
  101. package/src/PredefinedConfig/DataSourceState.d.ts +1 -1
  102. package/src/PredefinedConfig/ExportState.d.ts +3 -3
  103. package/src/PredefinedConfig/FilterState.d.ts +3 -3
  104. package/src/PredefinedConfig/FormatColumnState.d.ts +1 -1
  105. package/src/PredefinedConfig/FreeTextColumnState.d.ts +11 -1
  106. package/src/PredefinedConfig/LayoutState.d.ts +1 -1
  107. package/src/PredefinedConfig/PredefinedConfig.d.ts +0 -40
  108. package/src/PredefinedConfig/QuickSearchState.d.ts +3 -3
  109. package/src/PredefinedConfig/ScheduleState.d.ts +1 -1
  110. package/src/PredefinedConfig/Selection/GridCell.d.ts +2 -1
  111. package/src/PredefinedConfig/Selection/GridRow.d.ts +12 -4
  112. package/src/PredefinedConfig/SystemState.d.ts +4 -1
  113. package/src/PredefinedConfig/ThemeState.d.ts +5 -1
  114. package/src/Redux/ActionsReducers/DashboardRedux.js +2 -1
  115. package/src/Redux/ActionsReducers/GridRedux.d.ts +3 -2
  116. package/src/Redux/ActionsReducers/GridRedux.js +2 -2
  117. package/src/Redux/ActionsReducers/LayoutRedux.d.ts +12 -2
  118. package/src/Redux/ActionsReducers/LayoutRedux.js +24 -1
  119. package/src/Redux/ActionsReducers/SystemRedux.js +1 -1
  120. package/src/Redux/DeadRedux.d.ts +4 -8
  121. package/src/Redux/Store/AdaptableReduxLocalStorageEngine.js +6 -1
  122. package/src/Redux/Store/AdaptableStore.d.ts +3 -3
  123. package/src/Redux/Store/AdaptableStore.js +25 -16
  124. package/src/Strategy/AdaptableModuleBase.d.ts +2 -2
  125. package/src/Strategy/AdaptableModuleBase.js +8 -8
  126. package/src/Strategy/AlertModule.d.ts +2 -2
  127. package/src/Strategy/AlertModule.js +13 -105
  128. package/src/Strategy/BulkUpdateModule.d.ts +2 -2
  129. package/src/Strategy/BulkUpdateModule.js +7 -7
  130. package/src/Strategy/CalculatedColumnModule.js +1 -1
  131. package/src/Strategy/CellSummaryModule.d.ts +2 -2
  132. package/src/Strategy/CellSummaryModule.js +3 -3
  133. package/src/Strategy/ConditionalStyleModule.js +3 -3
  134. package/src/Strategy/CustomSortModule.js +2 -2
  135. package/src/Strategy/DashboardModule.d.ts +2 -2
  136. package/src/Strategy/DataChangeHistoryModule.js +2 -2
  137. package/src/Strategy/ExportModule.d.ts +2 -4
  138. package/src/Strategy/ExportModule.js +59 -62
  139. package/src/Strategy/FilterModule.d.ts +2 -2
  140. package/src/Strategy/FilterModule.js +4 -4
  141. package/src/Strategy/FormatColumnModule.js +6 -6
  142. package/src/Strategy/FreeTextColumnModule.js +1 -1
  143. package/src/Strategy/GridInfoModule.d.ts +2 -2
  144. package/src/Strategy/Interface/IModule.d.ts +2 -2
  145. package/src/Strategy/LayoutModule.d.ts +2 -2
  146. package/src/Strategy/LayoutModule.js +22 -9
  147. package/src/Strategy/PlusMinusModule.js +8 -9
  148. package/src/Strategy/SmartEditModule.d.ts +2 -2
  149. package/src/Strategy/SmartEditModule.js +8 -9
  150. package/src/Strategy/SystemStatusModule.d.ts +2 -2
  151. package/src/Utilities/Constants/GeneralConstants.d.ts +1 -0
  152. package/src/Utilities/Constants/GeneralConstants.js +2 -1
  153. package/src/Utilities/Constants/ModuleConstants.d.ts +6 -6
  154. package/src/Utilities/Constants/ModuleConstants.js +7 -7
  155. package/src/Utilities/Defaults/DefaultAdaptableOptions.js +9 -7
  156. package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.js +1 -1
  157. package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.js +2 -2
  158. package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +3 -2
  159. package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +1 -1
  160. package/src/Utilities/Helpers/DateHelper.d.ts +2 -2
  161. package/src/Utilities/Helpers/DateHelper.js +30 -20
  162. package/src/Utilities/Helpers/PreviewHelper.js +2 -2
  163. package/src/Utilities/Interface/Preview.d.ts +2 -1
  164. package/src/Utilities/ObjectFactory.d.ts +1 -1
  165. package/src/Utilities/ObjectFactory.js +14 -2
  166. package/src/Utilities/Services/DataService.js +5 -5
  167. package/src/Utilities/Services/LicenseService.js +16 -2
  168. package/src/Utilities/Services/ReportService.js +13 -12
  169. package/src/Utilities/Services/ValidationService.js +4 -5
  170. package/src/Utilities/runIfNotResolvedIn.d.ts +8 -0
  171. package/src/Utilities/runIfNotResolvedIn.js +23 -0
  172. package/src/View/AdaptableView.js +1 -1
  173. package/src/View/AdaptableViewFactory.d.ts +2 -1
  174. package/src/View/AdaptableViewFactory.js +2 -0
  175. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationForm.js +7 -7
  176. package/src/View/Alert/AlertPopup.js +1 -1
  177. package/src/View/Alert/Wizard/AlertDisplayWizardSection.js +19 -5
  178. package/src/View/Alert/Wizard/BaseAlertScopeWizardSection.js +1 -1
  179. package/src/View/BulkUpdate/BulkUpdatePopup.d.ts +2 -0
  180. package/src/View/BulkUpdate/BulkUpdatePopup.js +6 -4
  181. package/src/View/BulkUpdate/BulkUpdateViewPanel.d.ts +2 -0
  182. package/src/View/BulkUpdate/BulkUpdateViewPanel.js +3 -1
  183. package/src/View/CalculatedColumn/CalculatedColumnPopup.js +1 -1
  184. package/src/View/CalculatedColumn/CalculatedColumnSummary.js +1 -1
  185. package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +1 -1
  186. package/src/View/CellSummary/CellSummaryViewPanel.js +2 -2
  187. package/src/View/Components/ColumnSelector/index.js +2 -2
  188. package/src/View/Components/FilterForm/FilterForm.d.ts +3 -51
  189. package/src/View/Components/FilterForm/FilterForm.js +57 -38
  190. package/src/View/Components/FilterForm/ListBoxFilterForm.d.ts +4 -1
  191. package/src/View/Components/FilterForm/ListBoxFilterForm.js +18 -9
  192. package/src/View/Components/FilterForm/QuickFilterForm.d.ts +3 -43
  193. package/src/View/Components/FilterForm/QuickFilterForm.js +74 -35
  194. package/src/View/Components/FilterForm/getDefaultColumnFilterPredicate.d.ts +3 -0
  195. package/src/View/Components/FilterForm/getDefaultColumnFilterPredicate.js +8 -0
  196. package/src/View/Components/NewScopeComponent.js +1 -1
  197. package/src/View/Components/Panels/FilterFormPanel.d.ts +1 -1
  198. package/src/View/Components/Panels/PanelWithImage.d.ts +423 -1
  199. package/src/View/Components/Popups/AdaptablePopup.d.ts +1 -1
  200. package/src/View/Components/Popups/AdaptablePopupAlert.js +23 -10
  201. package/src/View/Components/PreviewResultsPanel.js +1 -1
  202. package/src/View/Components/RangesComponent.js +2 -2
  203. package/src/View/Components/Selectors/ColumnSelector.js +5 -5
  204. package/src/View/Components/Selectors/ColumnValueSelector.d.ts +10 -2
  205. package/src/View/Components/Selectors/ColumnValueSelector.js +47 -15
  206. package/src/View/Components/ToolPanel/AdaptableToolPanel.js +10 -11
  207. package/src/View/Components/ToolPanel/CustomToolPanelContent.js +1 -1
  208. package/src/View/Components/ToolPanel/ToolPanelPopup.js +2 -3
  209. package/src/View/ConditionalStyle/ConditionalStylePopup.js +1 -1
  210. package/src/View/ConditionalStyle/ConditionalStyleSummary.js +1 -1
  211. package/src/View/CustomSort/CustomSortEntityRow.d.ts +3 -1
  212. package/src/View/CustomSort/CustomSortEntityRow.js +3 -3
  213. package/src/View/CustomSort/CustomSortPopup.js +2 -2
  214. package/src/View/CustomSort/CustomSortSummary.js +3 -3
  215. package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.js +4 -4
  216. package/src/View/CustomSort/Wizard/CustomSortValuesWizardSection.js +24 -6
  217. package/src/View/Dashboard/CustomToolbarWrapper.js +2 -1
  218. package/src/View/Dashboard/Dashboard.js +2 -3
  219. package/src/View/DataChangeHistory/DataChangeHistoryGrid.d.ts +1 -1
  220. package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +11 -10
  221. package/src/View/DataChangeHistory/DataChangeHistoryPopup.js +6 -6
  222. package/src/View/Export/ExportCustomDestinationDialog.js +1 -1
  223. package/src/View/Export/ExportViewPanel.js +6 -6
  224. package/src/View/Filter/FilterSummary.js +2 -2
  225. package/src/View/FormatColumn/FormatColumnPopup.js +1 -1
  226. package/src/View/FormatColumn/FormatColumnSummary.js +1 -1
  227. package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +1 -1
  228. package/src/View/FreeTextColumn/FreeTextColumnPopup.js +4 -2
  229. package/src/View/FreeTextColumn/FreeTextColumnSummary.js +5 -3
  230. package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.js +1 -1
  231. package/src/View/GridInfo/ColumnInfoComponent.js +16 -16
  232. package/src/View/GridInfo/GridInfoPopup.js +4 -1
  233. package/src/View/GridInfo/GridOptionsComponent.js +1 -1
  234. package/src/View/Layout/LayoutViewPanel.js +2 -2
  235. package/src/View/Layout/Wizard/LayoutEditor/ColumnList.js +6 -6
  236. package/src/View/Layout/Wizard/LayoutEditor/ColumnSortList.js +1 -1
  237. package/src/View/Layout/Wizard/LayoutEditor/PivotList.js +1 -1
  238. package/src/View/Layout/Wizard/LayoutEditor/RowGroupsList.js +1 -1
  239. package/src/View/Layout/Wizard/LayoutEditor/getItemStyle.js +2 -2
  240. package/src/View/Layout/Wizard/LayoutEditor/index.js +41 -41
  241. package/src/View/PlusMinus/PlusMinusPopup.js +1 -1
  242. package/src/View/PlusMinus/PlusMinusSummary.js +1 -1
  243. package/src/View/Query/QueryViewPanel.js +3 -3
  244. package/src/View/QuickSearch/useQuickSearchDebounced.js +2 -3
  245. package/src/View/Schedule/SchedulePopup.js +3 -3
  246. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsWizard.js +1 -1
  247. package/src/View/SmartEdit/SmartEditPopup.js +1 -1
  248. package/src/View/StateManagement/StateManagementPopup.d.ts +2 -12
  249. package/src/View/StateManagement/StateManagementPopup.js +21 -114
  250. package/src/View/StateManagement/StateManagementViewPanel.d.ts +5 -0
  251. package/src/View/StateManagement/StateManagementViewPanel.js +22 -0
  252. package/src/View/StateManagement/components/ClearButton.d.ts +6 -0
  253. package/src/View/StateManagement/components/ClearButton.js +9 -0
  254. package/src/View/StateManagement/components/ExportDropdown.d.ts +8 -0
  255. package/src/View/StateManagement/components/ExportDropdown.js +43 -0
  256. package/src/View/StateManagement/components/LoadButton.d.ts +7 -0
  257. package/src/View/StateManagement/components/LoadButton.js +38 -0
  258. package/src/View/StateManagement/handleExportState.d.ts +1 -0
  259. package/src/View/StateManagement/handleExportState.js +22 -0
  260. package/src/View/Theme/ThemeViewPanel.js +1 -1
  261. package/src/View/UIHelper.d.ts +2 -0
  262. package/src/View/UIHelper.js +10 -1
  263. package/src/agGrid/ActionColumnRenderer.d.ts +2 -1
  264. package/src/agGrid/ActionColumnRenderer.js +21 -4
  265. package/src/agGrid/Adaptable.d.ts +28 -11
  266. package/src/agGrid/Adaptable.js +326 -168
  267. package/src/agGrid/agGridHelper.d.ts +4 -4
  268. package/src/agGrid/agGridHelper.js +46 -46
  269. package/src/agGrid/agGridMenuHelper.d.ts +15 -13
  270. package/src/agGrid/agGridMenuHelper.js +55 -47
  271. package/src/agGrid/editors/AdaptableDateEditor/InternalAdaptableDateEditor.d.ts +1 -1
  272. package/src/agGrid/editors/AdaptableDateEditor/InternalAdaptableDateEditor.js +11 -6
  273. package/src/agGrid/editors/AdaptableDateEditor/index.d.ts +3 -2
  274. package/src/agGrid/editors/AdaptableDateEditor/index.js +16 -6
  275. package/src/agGrid/editors/AdaptableNumberEditor/index.d.ts +1 -0
  276. package/src/agGrid/editors/AdaptableNumberEditor/index.js +7 -2
  277. package/src/components/AdaptableFormComponent/AdaptableFormComponent.js +3 -3
  278. package/src/components/Dashboard/Dashboard.js +1 -1
  279. package/src/components/Datepicker/DatepickerContext.d.ts +2 -2
  280. package/src/components/Datepicker/index.js +9 -5
  281. package/src/components/DropdownButton/index.js +1 -1
  282. package/src/components/ExpressionEditor/index.js +7 -7
  283. package/src/components/Loader/Loader.d.ts +7 -0
  284. package/src/components/Loader/Loader.js +13 -0
  285. package/src/components/Loader/index.d.ts +2 -0
  286. package/src/components/Loader/index.js +7 -0
  287. package/src/components/Modal/index.d.ts +1 -1
  288. package/src/components/OverlayTrigger/index.js +3 -3
  289. package/src/components/OverlayTrigger/useAgGridClassName.d.ts +2 -0
  290. package/src/components/OverlayTrigger/{useVendorClassName.js → useAgGridClassName.js} +3 -3
  291. package/src/components/ProgressIndicator/ProgressIndicator.d.ts +2 -0
  292. package/src/components/ProgressIndicator/ProgressIndicator.js +54 -0
  293. package/src/components/icons/index.js +2 -0
  294. package/src/components/icons/upload.d.ts +3 -0
  295. package/src/components/icons/upload.js +8 -0
  296. package/src/metamodel/adaptable.metamodel.d.ts +176 -52
  297. package/src/metamodel/adaptable.metamodel.js +659 -366
  298. package/src/types.d.ts +5 -4
  299. package/version.d.ts +1 -1
  300. package/version.js +1 -1
  301. package/src/PredefinedConfig/DeprecatedState.d.ts +0 -82
  302. package/src/PredefinedConfig/DeprecatedState.js +0 -5
  303. package/src/Utilities/Interface/ProgressIndicator.d.ts +0 -4
  304. package/src/View/Export/ProgressIndicator.d.ts +0 -6
  305. package/src/View/Export/ProgressIndicator.js +0 -25
  306. package/src/components/OverlayTrigger/useVendorClassName.d.ts +0 -2
@@ -1,50 +1,10 @@
1
- import * as React from 'react';
2
- import * as FilterRedux from '../../../Redux/ActionsReducers/FilterRedux';
1
+ /// <reference types="react" />
3
2
  import { ColumnFilterContext } from '../../../Utilities/Interface/ColumnFilterContext';
4
- import { ModuleViewPopupProps } from '../SharedProps/ModuleViewPopupProps';
5
- import { AdaptableColumn } from '../../../PredefinedConfig/Common/AdaptableColumn';
6
- import { AdaptableApi } from '../../../Api/AdaptableApi';
7
3
  import { ColumnFilter } from '../../../PredefinedConfig/FilterState';
8
- import { AdaptablePredicateDef } from '../../../PredefinedConfig/Common/AdaptablePredicate';
9
- import { FilterOptions } from '../../../AdaptableOptions/FilterOptions';
10
- interface QuickFilterFormProps extends ModuleViewPopupProps<QuickFilterFormComponent> {
11
- api: AdaptableApi;
12
- currentColumn: AdaptableColumn;
13
- columnFilters: ColumnFilter[];
14
- quickFilterTrigger?: FilterOptions['quickFilterTrigger'];
15
- onAddColumnFilter: (columnFilter: ColumnFilter) => FilterRedux.ColumnFilterAddAction;
16
- onEditColumnFilter: (columnFilter: ColumnFilter) => FilterRedux.ColumnFilterEditAction;
17
- }
18
4
  export interface QuickFilterFormState {
19
5
  filter: ColumnFilter;
20
6
  distinctColumnValues: any[];
7
+ isDistinctColumnValuesLoading: boolean;
8
+ suppressClientSideFilter: boolean;
21
9
  }
22
- declare class QuickFilterFormComponent extends React.Component<QuickFilterFormProps, QuickFilterFormState> {
23
- private valuesDropdown?;
24
- constructor(props: QuickFilterFormProps);
25
- getDistinctValues: (props?: Readonly<QuickFilterFormProps> & Readonly<{
26
- children?: React.ReactNode;
27
- }>) => any[];
28
- updateDistinctValues(props?: Readonly<QuickFilterFormProps> & Readonly<{
29
- children?: React.ReactNode;
30
- }>): void;
31
- UNSAFE_componentWillReceiveProps(nextProps: QuickFilterFormProps): void;
32
- getFilterFromProps(props: QuickFilterFormProps): ColumnFilter;
33
- render(): any;
34
- renderLabel(filter: ColumnFilter, activePredicateDef: AdaptablePredicateDef): JSX.Element;
35
- renderPredicateIcon(predicateDef: AdaptablePredicateDef): JSX.Element;
36
- renderPredicateInput(predicateDef: AdaptablePredicateDef, filter: ColumnFilter): JSX.Element | JSX.Element[];
37
- renderNoValuesDropdown(filter: ColumnFilter): JSX.Element;
38
- renderValuesDropdown(filter: ColumnFilter): JSX.Element;
39
- onColumnValuesChange(columnValues: any[]): void;
40
- selectColumnPredicate(predicateId: string): void;
41
- debouncedAddFilter: import("lodash").DebouncedFunc<() => FilterRedux.ColumnFilterAddAction>;
42
- debouncedEditFilter: import("lodash").DebouncedFunc<() => FilterRedux.ColumnFilterEditAction>;
43
- private updateFilter;
44
- changeColumnPredicateInput(value: string, index: number): void;
45
- getPredicateIdForShortcutValue(value: string): string;
46
- clearFilter(): void;
47
- }
48
- export declare const QuickFilterForm: import("react-redux").ConnectedComponent<typeof QuickFilterFormComponent, any>;
49
10
  export declare const QuickFilterFormReact: (FilterContext: ColumnFilterContext) => JSX.Element;
50
- export {};
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.QuickFilterFormReact = exports.QuickFilterForm = void 0;
3
+ exports.QuickFilterFormReact = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const React = tslib_1.__importStar(require("react"));
6
6
  const debounce_1 = tslib_1.__importDefault(require("lodash-es/debounce"));
@@ -16,60 +16,87 @@ const ArrayExtensions_1 = tslib_1.__importDefault(require("../../../Utilities/Ex
16
16
  const AdaptableInput_1 = tslib_1.__importDefault(require("../AdaptableInput"));
17
17
  const renderWithAdaptableContext_1 = require("../../renderWithAdaptableContext");
18
18
  const CheckBox_1 = require("../../../components/CheckBox");
19
+ const isEqual_1 = tslib_1.__importDefault(require("lodash-es/isEqual"));
20
+ const runIfNotResolvedIn_1 = require("../../../Utilities/runIfNotResolvedIn");
21
+ const getDefaultColumnFilterPredicate_1 = require("./getDefaultColumnFilterPredicate");
19
22
  class QuickFilterFormComponent extends React.Component {
20
23
  constructor(props) {
21
24
  super(props);
22
- this.getDistinctValues = (props = this.props) => {
23
- return props.api.columnApi.getDistinctDisplayValuesForColumn(props.currentColumn.ColumnId);
25
+ this._isMounted = false;
26
+ this.handleFilterChange = (filter) => {
27
+ if (this.state.suppressClientSideFilter) {
28
+ this.loadPermittedValues(filter);
29
+ }
30
+ };
31
+ this.loadPermittedValues = async (filter = '') => {
32
+ const { values, suppressClientSideFilter } = await runIfNotResolvedIn_1.runIfNotResolvedIn(this.props.api.columnApi.getDistinctFilterDisplayValuesForColumn(this.props.currentColumn.columnId, filter), () => this._isMounted && this.setState({ isDistinctColumnValuesLoading: true }));
33
+ if (!this._isMounted) {
34
+ return;
35
+ }
36
+ this.setState({
37
+ distinctColumnValues: values,
38
+ suppressClientSideFilter,
39
+ isDistinctColumnValuesLoading: false,
40
+ });
24
41
  };
25
42
  this.debouncedAddFilter = debounce_1.default(() => this.props.onAddColumnFilter(this.state.filter), 250);
26
43
  this.debouncedEditFilter = debounce_1.default(() => this.props.onEditColumnFilter(this.state.filter), 250);
27
- const filter = this.getFilterFromProps(props);
28
- const distinctColumnValues = filter.Predicate.PredicateId === 'Values' ? this.getDistinctValues() : [];
44
+ const filter = this.getFilterFromProps();
45
+ this._isMounted = true;
29
46
  this.state = {
30
47
  filter,
31
- distinctColumnValues,
48
+ suppressClientSideFilter: false,
49
+ isDistinctColumnValuesLoading: false,
50
+ distinctColumnValues: [],
32
51
  };
33
52
  }
34
- updateDistinctValues(props = this.props) {
35
- this.setState({ distinctColumnValues: this.getDistinctValues(props) });
53
+ componentDidMount() {
54
+ var _a, _b;
55
+ if (((_b = (_a = this.state) === null || _a === void 0 ? void 0 : _a.filter) === null || _b === void 0 ? void 0 : _b.Predicate.PredicateId) === 'Values') {
56
+ this.loadPermittedValues();
57
+ }
58
+ }
59
+ componentWillUnmount() {
60
+ this._isMounted = false;
36
61
  }
37
62
  UNSAFE_componentWillReceiveProps(nextProps) {
38
63
  const filter = this.getFilterFromProps(nextProps);
39
- this.setState({
40
- filter,
41
- });
64
+ if (isEqual_1.default(filter, this.state.filter)) {
65
+ return;
66
+ }
67
+ this.setState({ filter });
42
68
  if ((filter === null || filter === void 0 ? void 0 : filter.Predicate) && filter.Predicate.PredicateId === 'Values') {
43
- this.updateDistinctValues(nextProps);
69
+ this.setState({ isDistinctColumnValuesLoading: true });
70
+ this.loadPermittedValues();
44
71
  }
45
72
  }
46
- getFilterFromProps(props) {
47
- const filter = props.columnFilters.find((cf) => cf.ColumnId == props.currentColumn.ColumnId);
73
+ getFilterFromProps(props = this.props) {
74
+ const filter = props.columnFilters.find((cf) => cf.ColumnId == props.currentColumn.columnId);
48
75
  const filterOptions = props.api.internalApi.getAdaptableOptions().filterOptions;
49
76
  if (filter) {
50
77
  return filter;
51
78
  }
52
- if (!filter && props.currentColumn.DataType === 'Number') {
53
- return ObjectFactory_1.ObjectFactory.CreateColumnFilter(this.props.currentColumn.ColumnId, filterOptions.defaultNumericColumnFilter, ['']);
79
+ if (!filter && props.currentColumn.dataType === 'Number') {
80
+ return ObjectFactory_1.ObjectFactory.CreateColumnFilter(props.currentColumn.columnId, getDefaultColumnFilterPredicate_1.getDefaultColumnFilterPredicate(props.currentColumn, filterOptions.defaultNumericColumnFilter), ['']);
54
81
  }
55
- if (!filter && props.currentColumn.DataType === 'String') {
56
- return ObjectFactory_1.ObjectFactory.CreateColumnFilter(this.props.currentColumn.ColumnId, filterOptions.defaultStringColumnFilter, ['']);
82
+ if (!filter && props.currentColumn.dataType === 'String') {
83
+ return ObjectFactory_1.ObjectFactory.CreateColumnFilter(props.currentColumn.columnId, getDefaultColumnFilterPredicate_1.getDefaultColumnFilterPredicate(props.currentColumn, filterOptions.defaultStringColumnFilter), ['']);
57
84
  }
58
- if (!filter && props.currentColumn.DataType === 'Date') {
59
- return ObjectFactory_1.ObjectFactory.CreateColumnFilter(this.props.currentColumn.ColumnId, filterOptions.defaultDateColumnFilter, ['']);
85
+ if (!filter && props.currentColumn.dataType === 'Date') {
86
+ return ObjectFactory_1.ObjectFactory.CreateColumnFilter(props.currentColumn.columnId, getDefaultColumnFilterPredicate_1.getDefaultColumnFilterPredicate(props.currentColumn, filterOptions.defaultDateColumnFilter), ['']);
60
87
  }
61
- if (!filter && props.currentColumn.DataType === 'Boolean') {
62
- return ObjectFactory_1.ObjectFactory.CreateColumnFilter(this.props.currentColumn.ColumnId, 'BooleanToggle', [
88
+ if (!filter && props.currentColumn.dataType === 'Boolean') {
89
+ return ObjectFactory_1.ObjectFactory.CreateColumnFilter(this.props.currentColumn.columnId, 'BooleanToggle', [
63
90
  'all',
64
91
  ]);
65
92
  }
66
- return ObjectFactory_1.ObjectFactory.CreateColumnFilter(this.props.currentColumn.ColumnId, null, null);
93
+ return ObjectFactory_1.ObjectFactory.CreateColumnFilter(this.props.currentColumn.columnId, null, null);
67
94
  }
68
95
  render() {
69
96
  const { filter } = this.state;
70
97
  const predicateDefs = this.props.api.filterApi.getFilterPredicateDefsForColumn(this.props.currentColumn);
71
98
  const activePredicateDef = this.props.api.predicateApi.getPredicateDefById(filter === null || filter === void 0 ? void 0 : filter.Predicate.PredicateId);
72
- if (!this.props.currentColumn || !this.props.currentColumn.Filterable) {
99
+ if (!this.props.currentColumn || !this.props.currentColumn.filterable) {
73
100
  return null;
74
101
  }
75
102
  let showEvent = 'mouseenter';
@@ -79,14 +106,12 @@ class QuickFilterFormComponent extends React.Component {
79
106
  hideEvent = 'blur';
80
107
  }
81
108
  let showQuickFilterDropdown = true;
82
- let hideQuickFilterDropdownFunction = this.props.api.internalApi.getAdaptableOptions()
83
- .filterOptions.hideQuickFilterDropdown;
109
+ let hideQuickFilterDropdownFunction = this.props.api.internalApi.getAdaptableOptions().filterOptions.hideQuickFilterDropdown;
84
110
  if (hideQuickFilterDropdownFunction) {
85
111
  showQuickFilterDropdown = !hideQuickFilterDropdownFunction(this.props.currentColumn);
86
112
  }
87
113
  let showQuickFilterInput = true;
88
- let hideQuickFilterInputFunction = this.props.api.internalApi.getAdaptableOptions()
89
- .filterOptions.hideQuickFilterInput;
114
+ let hideQuickFilterInputFunction = this.props.api.internalApi.getAdaptableOptions().filterOptions.hideQuickFilterInput;
90
115
  if (hideQuickFilterInputFunction) {
91
116
  showQuickFilterInput = !hideQuickFilterInputFunction(this.props.currentColumn);
92
117
  }
@@ -179,11 +204,25 @@ class QuickFilterFormComponent extends React.Component {
179
204
  } }, 'No Column Values'));
180
205
  }
181
206
  renderValuesDropdown(filter) {
182
- return (React.createElement(OverlayTrigger_1.default, { alignHorizontal: "left", showEvent: "mouseenter", hideEvent: "mouseleave", hideDelay: 300, ref: (api) => {
207
+ let showEvent = 'mouseenter';
208
+ if (this.props.quickFilterValuesTrigger === 'click') {
209
+ showEvent = 'click';
210
+ }
211
+ return (React.createElement(OverlayTrigger_1.default, { alignHorizontal: "left", showEvent: showEvent,
212
+ // cannot hide on blur, because the form input receives the input when this is opened
213
+ hideEvent: "mouseleave", hideDelay: 300, ref: (api) => {
183
214
  this.valuesDropdown = api;
184
215
  }, render: () => {
185
216
  var _a;
186
- return (React.createElement(rebass_1.Flex, { "data-name": "quick-filter-form", flexDirection: "column", style: {
217
+ return (React.createElement(rebass_1.Flex, { onMouseEnter: () => {
218
+ var _a;
219
+ if (showEvent === 'click') {
220
+ // For showEvent=mouseneter this is not needed.
221
+ // When mouseenter is triggered on the overlay, onShowFn is called, the overlay is no longer hidden.
222
+ // But in this case because the trigger is click, another show is not triggered.
223
+ (_a = this.valuesDropdown) === null || _a === void 0 ? void 0 : _a.show();
224
+ }
225
+ }, "data-name": "quick-filter-form", flexDirection: "column", style: {
187
226
  fontSize: 'var(--ab-font-size-2)',
188
227
  border: '1px solid var(--ab-color-primarydark)',
189
228
  background: 'var(--ab-color-defaultbackground)',
@@ -193,7 +232,7 @@ class QuickFilterFormComponent extends React.Component {
193
232
  React.createElement(SimpleButton_1.default, { onClick: () => this.clearFilter() }, "Clear Filter"),
194
233
  ((_a = this.props.api.internalApi.getAdaptableOptions().filterOptions) === null || _a === void 0 ? void 0 : _a.autoApplyFilter) ==
195
234
  false && (React.createElement(SimpleButton_1.default, { ml: 2, onClick: () => this.updateFilter(this.state.filter) }, "Apply Filter"))),
196
- React.createElement(ListBoxFilterForm_1.ListBoxFilterForm, { currentColumn: this.props.currentColumn, columns: [], columnDistinctValues: this.state.distinctColumnValues, dataType: this.props.currentColumn.DataType, uiSelectedColumnValues: this.state.filter.Predicate.Inputs, useVendorStyle: true, onColumnValueSelectedChange: (list) => this.onColumnValuesChange(list) })));
235
+ React.createElement(ListBoxFilterForm_1.ListBoxFilterForm, { suppressClientSideFilter: this.state.suppressClientSideFilter, isLoading: this.state.isDistinctColumnValuesLoading, onFilterChange: this.handleFilterChange, currentColumn: this.props.currentColumn, columns: [], columnDistinctValues: this.state.distinctColumnValues, dataType: this.props.currentColumn.dataType, uiSelectedColumnValues: this.state.filter.Predicate.Inputs, useAgGridStyle: true, onColumnValueSelectedChange: (list) => this.onColumnValuesChange(list) })));
197
236
  } },
198
237
  React.createElement(SimpleButton_1.default, { style: {
199
238
  flex: 1,
@@ -226,7 +265,7 @@ class QuickFilterFormComponent extends React.Component {
226
265
  };
227
266
  this.updateFilter(filter);
228
267
  if (predicateId === 'Values') {
229
- this.updateDistinctValues();
268
+ this.loadPermittedValues();
230
269
  requestAnimationFrame(() => {
231
270
  if (this.valuesDropdown) {
232
271
  this.valuesDropdown.show();
@@ -276,8 +315,8 @@ function mapDispatchToProps(dispatch) {
276
315
  onEditColumnFilter: (columnFilter) => dispatch(FilterRedux.ColumnFilterEdit(columnFilter)),
277
316
  };
278
317
  }
279
- exports.QuickFilterForm = react_redux_1.connect(mapStateToProps, mapDispatchToProps)(QuickFilterFormComponent);
318
+ const QuickFilterForm = react_redux_1.connect(mapStateToProps, mapDispatchToProps)(QuickFilterFormComponent);
280
319
  exports.QuickFilterFormReact = (FilterContext) => {
281
- var _a;
282
- return renderWithAdaptableContext_1.renderWithAdaptableContext(React.createElement(exports.QuickFilterForm, { api: FilterContext.Adaptable.api, quickFilterTrigger: (_a = FilterContext.Adaptable.adaptableOptions.filterOptions) === null || _a === void 0 ? void 0 : _a.quickFilterTrigger, currentColumn: FilterContext.Column, teamSharingActivated: false, embedColumnMenu: FilterContext.Adaptable.embedColumnMenu }), FilterContext.Adaptable);
320
+ var _a, _b;
321
+ return renderWithAdaptableContext_1.renderWithAdaptableContext(React.createElement(QuickFilterForm, { api: FilterContext.Adaptable.api, quickFilterTrigger: (_a = FilterContext.Adaptable.adaptableOptions.filterOptions) === null || _a === void 0 ? void 0 : _a.quickFilterTrigger, quickFilterValuesTrigger: (_b = FilterContext.Adaptable.adaptableOptions.filterOptions) === null || _b === void 0 ? void 0 : _b.quickFilterValuesTrigger, currentColumn: FilterContext.Column, teamSharingActivated: false, embedColumnMenu: FilterContext.Adaptable.embedColumnMenu }), FilterContext.Adaptable);
283
322
  };
@@ -0,0 +1,3 @@
1
+ import { AdaptableColumn } from '../../../PredefinedConfig/Common/AdaptableColumn';
2
+ import { SystemFilterPredicateId } from '../../../PredefinedConfig/FilterState';
3
+ export declare const getDefaultColumnFilterPredicate: (column: AdaptableColumn, defaultColumnFilter: "After" | "Before" | "Blanks" | "NonBlanks" | "Equals" | "NotEquals" | "GreaterThan" | "LessThan" | "Positive" | "Negative" | "Zero" | "Between" | "NotBetween" | "Is" | "IsNot" | "Contains" | "NotContains" | "StartsWith" | "EndsWith" | "Regex" | "Today" | "Yesterday" | "Tomorrow" | "ThisWeek" | "ThisMonth" | "ThisQuarter" | "ThisYear" | "InPast" | "InFuture" | "On" | "NotOn" | "NextWorkDay" | "LastWorkDay" | "True" | "False" | "Values" | "InRange" | "BooleanToggle" | ((column: AdaptableColumn) => SystemFilterPredicateId)) => SystemFilterPredicateId;
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getDefaultColumnFilterPredicate = void 0;
4
+ exports.getDefaultColumnFilterPredicate = (column, defaultColumnFilter) => {
5
+ return typeof defaultColumnFilter === 'function'
6
+ ? defaultColumnFilter(column)
7
+ : defaultColumnFilter;
8
+ };
@@ -54,7 +54,7 @@ exports.renderScopeSummary = (scope, labels) => {
54
54
  React.createElement(OnePageAdaptableWizard_1.SummaryText, { mb: 0 }, scopeApi.scopeIsAll(scope) ? labels.scopeWholeRow : null)),
55
55
  React.createElement(rebass_1.Box, { style: { overflow: 'hidden' } }, 'ColumnIds' in scope ? (React.createElement(React.Fragment, null,
56
56
  React.createElement(OnePageAdaptableWizard_1.SummaryText, { mb: columnsInScope.length ? 2 : 0 }, labels.scopeColumns),
57
- columnsInScope.length ? (React.createElement(ValueSelector_1.ValueOptionsTags, { options: columnsInScope, value: columnsInScope.map((c) => c.ColumnId), toLabel: (c) => c.FriendlyName, allowWrap: true, readOnly: true, renderLabel: (c) => React.createElement(OnePageAdaptableWizard_1.SummaryText, { mb: 0 }, c), toIdentifier: (c) => c.ColumnId })) : null)) : null),
57
+ columnsInScope.length ? (React.createElement(ValueSelector_1.ValueOptionsTags, { options: columnsInScope, value: columnsInScope.map((c) => c.columnId), toLabel: (c) => c.friendlyName, allowWrap: true, readOnly: true, renderLabel: (c) => React.createElement(OnePageAdaptableWizard_1.SummaryText, { mb: 0 }, c), toIdentifier: (c) => c.columnId })) : null)) : null),
58
58
  React.createElement(rebass_1.Box, null, 'DataTypes' in scope ? (React.createElement(React.Fragment, null,
59
59
  React.createElement(rebass_1.Text, { fontSize: 2, mb: 2 }, labels.scopeDataTypes),
60
60
  React.createElement(ValueSelector_1.ValueOptionsTags, { readOnly: true, options: scope.DataTypes, value: scope.DataTypes, toLabel: (c) => c, allowWrap: true, renderLabel: (c) => React.createElement(rebass_1.Text, { fontSize: 2 }, `DataType: ${c}`), toIdentifier: (c) => c }))) : null)));
@@ -10,7 +10,7 @@ export interface FilterFormPanelProps extends PanelProps {
10
10
  onFilterApplied: () => void;
11
11
  IsAlwaysFilter: boolean;
12
12
  showCloseButton: boolean;
13
- useVendorStyle: boolean;
13
+ useAgGridStyle: boolean;
14
14
  applyFilterButtonDisabled: boolean;
15
15
  autoApplyFilter: boolean;
16
16
  }