@adaptabletools/adaptable-cjs 20.3.0-canary.2 → 21.0.0-canary.0

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 (427) hide show
  1. package/agGrid.d.ts +2 -1
  2. package/agGrid.js +3 -1
  3. package/base.css +36 -15
  4. package/base.css.map +1 -1
  5. package/icons/add-circle.svg +1 -0
  6. package/icons/add.svg +1 -0
  7. package/icons/alert.svg +1 -0
  8. package/icons/align-center.svg +1 -0
  9. package/icons/align-justify.svg +1 -0
  10. package/icons/align-left.svg +1 -0
  11. package/icons/align-right.svg +1 -0
  12. package/icons/arrow-down-long.svg +1 -0
  13. package/icons/arrow-down.svg +1 -0
  14. package/icons/arrow-expand.svg +1 -0
  15. package/icons/arrow-left.svg +1 -0
  16. package/icons/arrow-right.svg +1 -0
  17. package/icons/arrow-up-long.svg +1 -0
  18. package/icons/arrow-up.svg +1 -0
  19. package/icons/assignment.svg +1 -0
  20. package/icons/badge.svg +1 -0
  21. package/icons/bold.svg +1 -0
  22. package/icons/boolean-list.svg +1 -0
  23. package/icons/brain.svg +1 -0
  24. package/icons/broadcast.svg +1 -0
  25. package/icons/brush.svg +1 -0
  26. package/icons/building.svg +1 -0
  27. package/icons/calculated-column.svg +1 -0
  28. package/icons/calendar.svg +1 -0
  29. package/icons/call.svg +1 -0
  30. package/icons/case-lower.svg +1 -0
  31. package/icons/case-sentence.svg +1 -0
  32. package/icons/case-upper.svg +1 -0
  33. package/icons/cells.svg +1 -0
  34. package/icons/chart.svg +1 -0
  35. package/icons/chat.svg +1 -0
  36. package/icons/check-circle.svg +1 -0
  37. package/icons/check.svg +1 -0
  38. package/icons/checked.svg +1 -0
  39. package/icons/clipboard.svg +1 -0
  40. package/icons/clone.svg +1 -0
  41. package/icons/close.svg +1 -0
  42. package/icons/cloud-upload.svg +1 -0
  43. package/icons/collapse-all.svg +1 -0
  44. package/icons/collapse.svg +1 -0
  45. package/icons/color-palette.svg +1 -0
  46. package/icons/column-add.svg +1 -0
  47. package/icons/column-outline.svg +1 -0
  48. package/icons/columns.svg +1 -0
  49. package/icons/comment.svg +1 -0
  50. package/icons/comments.svg +1 -0
  51. package/icons/contact.svg +1 -0
  52. package/icons/contains.svg +1 -0
  53. package/icons/copy.svg +1 -0
  54. package/icons/csv.svg +1 -0
  55. package/icons/dashboard.svg +1 -0
  56. package/icons/data-set.svg +1 -0
  57. package/icons/date-range.svg +1 -0
  58. package/icons/delete.svg +1 -0
  59. package/icons/division.svg +1 -0
  60. package/icons/dock.svg +1 -0
  61. package/icons/dollar.svg +1 -0
  62. package/icons/download.svg +1 -0
  63. package/icons/downloaded.svg +1 -0
  64. package/icons/drag.svg +1 -0
  65. package/icons/edit-table.svg +1 -0
  66. package/icons/edit.svg +1 -0
  67. package/icons/ends-with.svg +1 -0
  68. package/icons/equals.svg +1 -0
  69. package/icons/equation.svg +1 -0
  70. package/icons/error.svg +1 -0
  71. package/icons/excel.svg +1 -0
  72. package/icons/expand-all.svg +1 -0
  73. package/icons/expand.svg +1 -0
  74. package/icons/exponent.svg +1 -0
  75. package/icons/export-data.svg +1 -0
  76. package/icons/export.svg +1 -0
  77. package/icons/fast-backward.svg +1 -0
  78. package/icons/fast-forward.svg +1 -0
  79. package/icons/fdc3.svg +1 -0
  80. package/icons/filled-circle.svg +1 -0
  81. package/icons/filter-list.svg +1 -0
  82. package/icons/filter-off.svg +1 -0
  83. package/icons/filter.svg +1 -0
  84. package/icons/flag.svg +1 -0
  85. package/icons/folder-open.svg +1 -0
  86. package/icons/folder-shared.svg +1 -0
  87. package/icons/folder.svg +1 -0
  88. package/icons/function.svg +1 -0
  89. package/icons/gradient.svg +1 -0
  90. package/icons/greater-than-or-equal.svg +1 -0
  91. package/icons/greater-than.svg +1 -0
  92. package/icons/grid-filter.svg +1 -0
  93. package/icons/grid-info.svg +1 -0
  94. package/icons/grid.svg +1 -0
  95. package/icons/history.svg +1 -0
  96. package/icons/home.svg +1 -0
  97. package/icons/horizontal-lines.svg +1 -0
  98. package/icons/import-export.svg +1 -0
  99. package/icons/import.svg +1 -0
  100. package/icons/info.svg +1 -0
  101. package/icons/interactions.svg +1 -0
  102. package/icons/italic.svg +1 -0
  103. package/icons/json.svg +1 -0
  104. package/icons/laptop.svg +1 -0
  105. package/icons/less-than-or-equal.svg +1 -0
  106. package/icons/less-than.svg +1 -0
  107. package/icons/lightning.svg +1 -0
  108. package/icons/link.svg +1 -0
  109. package/icons/list.svg +1 -0
  110. package/icons/logout.svg +1 -0
  111. package/icons/mail.svg +1 -0
  112. package/icons/menu.svg +1 -0
  113. package/icons/minus.svg +1 -0
  114. package/icons/money.svg +1 -0
  115. package/icons/multiplication.svg +1 -0
  116. package/icons/newpage.svg +1 -0
  117. package/icons/news.svg +1 -0
  118. package/icons/not-contains.svg +1 -0
  119. package/icons/not-equal.svg +1 -0
  120. package/icons/note.svg +1 -0
  121. package/icons/open-in-new.svg +1 -0
  122. package/icons/order.svg +1 -0
  123. package/icons/organisation.svg +1 -0
  124. package/icons/overline.svg +1 -0
  125. package/icons/paperclip.svg +1 -0
  126. package/icons/pause.svg +1 -0
  127. package/icons/percent-tag.svg +1 -0
  128. package/icons/percent.svg +1 -0
  129. package/icons/person.svg +1 -0
  130. package/icons/pie-chart.svg +1 -0
  131. package/icons/play.svg +1 -0
  132. package/icons/plus.svg +1 -0
  133. package/icons/quote.svg +1 -0
  134. package/icons/refresh.svg +1 -0
  135. package/icons/regex.svg +1 -0
  136. package/icons/reminder.svg +1 -0
  137. package/icons/resume.svg +1 -0
  138. package/icons/rows.svg +1 -0
  139. package/icons/save.svg +1 -0
  140. package/icons/schedule.svg +1 -0
  141. package/icons/science.svg +1 -0
  142. package/icons/search-table.svg +1 -0
  143. package/icons/search.svg +1 -0
  144. package/icons/select-all.svg +1 -0
  145. package/icons/select-fwd.svg +1 -0
  146. package/icons/select-off.svg +1 -0
  147. package/icons/settings.svg +1 -0
  148. package/icons/sort-asc.svg +1 -0
  149. package/icons/sort-desc.svg +1 -0
  150. package/icons/spanner.svg +1 -0
  151. package/icons/spark-line.svg +1 -0
  152. package/icons/starts-with.svg +1 -0
  153. package/icons/statusbar.svg +1 -0
  154. package/icons/stop.svg +1 -0
  155. package/icons/strikethrough.svg +1 -0
  156. package/icons/styled-grid.svg +1 -0
  157. package/icons/sync.svg +1 -0
  158. package/icons/tab-unselected.svg +1 -0
  159. package/icons/target.svg +1 -0
  160. package/icons/theme.svg +1 -0
  161. package/icons/traffic-lights.svg +1 -0
  162. package/icons/triangle-down.svg +1 -0
  163. package/icons/triangle-up.svg +1 -0
  164. package/icons/unchecked.svg +1 -0
  165. package/icons/underline.svg +1 -0
  166. package/icons/undo.svg +1 -0
  167. package/icons/unfilled-circle.svg +1 -0
  168. package/icons/upload.svg +1 -0
  169. package/icons/visibility-off-bold.svg +1 -0
  170. package/icons/visibility-off.svg +1 -0
  171. package/icons/visibility-on-bold.svg +1 -0
  172. package/icons/visibility-on.svg +1 -0
  173. package/icons/warning.svg +1 -0
  174. package/index.css +32 -15
  175. package/index.css.map +1 -1
  176. package/package.json +2 -2
  177. package/src/AdaptableInterfaces/IAdaptable.d.ts +10 -5
  178. package/src/AdaptableOptions/ColumnOptions.d.ts +71 -187
  179. package/src/AdaptableOptions/DefaultAdaptableOptions.js +3 -2
  180. package/src/AdaptableOptions/EditOptions.d.ts +4 -7
  181. package/src/AdaptableOptions/FilterOptions.d.ts +50 -15
  182. package/src/AdaptableOptions/LayoutOptions.d.ts +8 -21
  183. package/src/AdaptableOptions/PredicateOptions.d.ts +1 -1
  184. package/src/AdaptableOptions/UserInterfaceOptions.d.ts +1 -1
  185. package/src/AdaptableState/Common/AdaptableColumn.d.ts +7 -0
  186. package/src/AdaptableState/Common/AdaptablePredicate.js +2 -2
  187. package/src/AdaptableState/Common/CustomWindowConfig.d.ts +11 -11
  188. package/src/AdaptableState/Common/ExtendedLayout.d.ts +50 -0
  189. package/src/AdaptableState/Common/ProgressIndicatorConfig.d.ts +1 -4
  190. package/src/AdaptableState/Common/RowScope.d.ts +1 -1
  191. package/src/AdaptableState/FormatColumnState.d.ts +16 -9
  192. package/src/AdaptableState/InternalState.d.ts +1 -1
  193. package/src/AdaptableState/LayoutState.d.ts +26 -6
  194. package/src/AdaptableState/Selection/GridCell.d.ts +32 -0
  195. package/src/AdaptableState/StyledColumnState.d.ts +2 -2
  196. package/src/Api/AlertApi.d.ts +5 -11
  197. package/src/Api/ColumnApi.d.ts +17 -1
  198. package/src/Api/ColumnFilterApi.d.ts +32 -2
  199. package/src/Api/CustomSortApi.d.ts +5 -10
  200. package/src/Api/FlashingCellApi.d.ts +10 -6
  201. package/src/Api/FormatColumnApi.d.ts +8 -18
  202. package/src/Api/Implementation/AlertApiImpl.d.ts +6 -9
  203. package/src/Api/Implementation/AlertApiImpl.js +7 -6
  204. package/src/Api/Implementation/ApiBase.d.ts +2 -12
  205. package/src/Api/Implementation/ApiBase.js +5 -5
  206. package/src/Api/Implementation/ColumnApiImpl.d.ts +5 -2
  207. package/src/Api/Implementation/ColumnApiImpl.js +59 -23
  208. package/src/Api/Implementation/ColumnFilterApiImpl.d.ts +7 -1
  209. package/src/Api/Implementation/ColumnFilterApiImpl.js +76 -3
  210. package/src/Api/Implementation/ColumnScopeApiImpl.js +10 -2
  211. package/src/Api/Implementation/CustomSortApiImpl.d.ts +5 -10
  212. package/src/Api/Implementation/CustomSortApiImpl.js +6 -4
  213. package/src/Api/Implementation/FlashingCellApiImpl.d.ts +7 -6
  214. package/src/Api/Implementation/FlashingCellApiImpl.js +11 -8
  215. package/src/Api/Implementation/FormatColumnApiImpl.d.ts +8 -18
  216. package/src/Api/Implementation/FormatColumnApiImpl.js +10 -9
  217. package/src/Api/Implementation/LayoutApiImpl.d.ts +3 -2
  218. package/src/Api/Implementation/LayoutApiImpl.js +101 -7
  219. package/src/Api/Implementation/LayoutHelpers.d.ts +1 -0
  220. package/src/Api/Implementation/LayoutHelpers.js +25 -5
  221. package/src/Api/Implementation/PlusMinusApiImpl.d.ts +7 -5
  222. package/src/Api/Implementation/PlusMinusApiImpl.js +10 -7
  223. package/src/Api/Implementation/ScheduleApiImpl.d.ts +9 -16
  224. package/src/Api/Implementation/ScheduleApiImpl.js +15 -17
  225. package/src/Api/Implementation/ShortcutApiImpl.d.ts +5 -6
  226. package/src/Api/Implementation/ShortcutApiImpl.js +7 -8
  227. package/src/Api/Implementation/StyledColumnApiImpl.d.ts +7 -8
  228. package/src/Api/Implementation/StyledColumnApiImpl.js +12 -9
  229. package/src/Api/Implementation/TeamSharingApiImpl.js +1 -4
  230. package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +2 -1
  231. package/src/Api/Implementation/UserInterfaceApiImpl.js +10 -9
  232. package/src/Api/Internal/AdaptableInternalApi.d.ts +2 -0
  233. package/src/Api/Internal/AdaptableInternalApi.js +3 -0
  234. package/src/Api/Internal/AlertInternalApi.d.ts +6 -6
  235. package/src/Api/Internal/AlertInternalApi.js +10 -10
  236. package/src/Api/Internal/ColumnFilterInternalApi.d.ts +13 -0
  237. package/src/Api/Internal/ColumnFilterInternalApi.js +93 -1
  238. package/src/Api/Internal/ColumnInternalApi.d.ts +2 -1
  239. package/src/Api/Internal/ColumnInternalApi.js +6 -2
  240. package/src/Api/Internal/DashboardInternalApi.js +1 -1
  241. package/src/Api/Internal/EntitlementInternalApi.d.ts +1 -0
  242. package/src/Api/Internal/EntitlementInternalApi.js +8 -0
  243. package/src/Api/Internal/ExportInternalApi.js +1 -1
  244. package/src/Api/Internal/FlashingCellInternalApi.js +1 -1
  245. package/src/Api/Internal/FormatColumnInternalApi.d.ts +12 -13
  246. package/src/Api/Internal/FormatColumnInternalApi.js +45 -16
  247. package/src/Api/Internal/GridInternalApi.d.ts +7 -10
  248. package/src/Api/Internal/GridInternalApi.js +76 -27
  249. package/src/Api/Internal/LayoutInternalApi.d.ts +5 -5
  250. package/src/Api/Internal/LayoutInternalApi.js +42 -5
  251. package/src/Api/Internal/PredicateInternalApi.d.ts +2 -6
  252. package/src/Api/Internal/PredicateInternalApi.js +4 -6
  253. package/src/Api/Internal/UserInterfaceInternalApi.d.ts +1 -0
  254. package/src/Api/Internal/UserInterfaceInternalApi.js +10 -3
  255. package/src/Api/LayoutApi.d.ts +7 -2
  256. package/src/Api/PlusMinusApi.d.ts +11 -7
  257. package/src/Api/ScheduleApi.d.ts +9 -16
  258. package/src/Api/ShortcutApi.d.ts +5 -6
  259. package/src/Api/StyledColumnApi.d.ts +10 -7
  260. package/src/Api/UserInterfaceApi.d.ts +5 -6
  261. package/src/Redux/ActionsReducers/InternalRedux.d.ts +4 -4
  262. package/src/Redux/ActionsReducers/InternalRedux.js +10 -10
  263. package/src/Redux/ActionsReducers/StyledColumnRedux.d.ts +7 -0
  264. package/src/Redux/ActionsReducers/StyledColumnRedux.js +15 -1
  265. package/src/Redux/Store/AdaptableStore.js +10 -10
  266. package/src/Strategy/AdaptableModuleBase.d.ts +14 -4
  267. package/src/Strategy/AdaptableModuleBase.js +46 -9
  268. package/src/Strategy/AlertModule.d.ts +3 -4
  269. package/src/Strategy/AlertModule.js +7 -4
  270. package/src/Strategy/CalculatedColumnModule.js +2 -2
  271. package/src/Strategy/CellSummaryModule.js +2 -2
  272. package/src/Strategy/ChartingModule.d.ts +3 -1
  273. package/src/Strategy/ChartingModule.js +9 -3
  274. package/src/Strategy/ColumnFilterModule.d.ts +1 -1
  275. package/src/Strategy/ColumnFilterModule.js +31 -15
  276. package/src/Strategy/ColumnInfoModule.js +2 -2
  277. package/src/Strategy/CommentModule.d.ts +1 -1
  278. package/src/Strategy/CommentModule.js +3 -3
  279. package/src/Strategy/CustomSortModule.d.ts +3 -4
  280. package/src/Strategy/CustomSortModule.js +2 -2
  281. package/src/Strategy/DashboardModule.js +1 -1
  282. package/src/Strategy/DataChangeHistoryModule.d.ts +2 -1
  283. package/src/Strategy/DataChangeHistoryModule.js +3 -10
  284. package/src/Strategy/DataImportModule.js +3 -3
  285. package/src/Strategy/ExportModule.js +1 -1
  286. package/src/Strategy/Fdc3Module.js +1 -1
  287. package/src/Strategy/FlashingCellModule.d.ts +3 -5
  288. package/src/Strategy/FlashingCellModule.js +3 -3
  289. package/src/Strategy/FormatColumnModule.d.ts +3 -4
  290. package/src/Strategy/FormatColumnModule.js +4 -2
  291. package/src/Strategy/FreeTextColumnModule.d.ts +1 -1
  292. package/src/Strategy/FreeTextColumnModule.js +2 -2
  293. package/src/Strategy/GridInfoModule.js +2 -2
  294. package/src/Strategy/Interface/IModule.d.ts +7 -3
  295. package/src/Strategy/LayoutModule.js +11 -11
  296. package/src/Strategy/NoteModule.d.ts +1 -1
  297. package/src/Strategy/NoteModule.js +3 -3
  298. package/src/Strategy/PlusMinusModule.d.ts +3 -4
  299. package/src/Strategy/PlusMinusModule.js +2 -2
  300. package/src/Strategy/QuickSearchModule.d.ts +2 -0
  301. package/src/Strategy/QuickSearchModule.js +9 -0
  302. package/src/Strategy/ScheduleModule.d.ts +3 -4
  303. package/src/Strategy/ScheduleModule.js +2 -2
  304. package/src/Strategy/SettingsPanelModule.js +1 -1
  305. package/src/Strategy/ShortcutModule.d.ts +3 -4
  306. package/src/Strategy/ShortcutModule.js +2 -2
  307. package/src/Strategy/StatusBarModule.d.ts +3 -2
  308. package/src/Strategy/StatusBarModule.js +6 -3
  309. package/src/Strategy/StyledColumnModule.d.ts +3 -4
  310. package/src/Strategy/StyledColumnModule.js +2 -2
  311. package/src/Strategy/SystemStatusModule.js +2 -2
  312. package/src/Strategy/TeamSharingModule.d.ts +1 -1
  313. package/src/Strategy/TeamSharingModule.js +5 -2
  314. package/src/Strategy/ToolPanelModule.d.ts +1 -1
  315. package/src/Strategy/ToolPanelModule.js +1 -4
  316. package/src/Strategy/Utilities/FormatColumn/getFormatColumnSettingsTargetItems.d.ts +5 -0
  317. package/src/Strategy/Utilities/FormatColumn/getFormatColumnSettingsTargetItems.js +16 -0
  318. package/src/Strategy/Utilities/Layout/getLayoutFilterViewItems.js +1 -1
  319. package/src/Utilities/Constants/DocumentationLinkConstants.d.ts +1 -0
  320. package/src/Utilities/Constants/DocumentationLinkConstants.js +2 -1
  321. package/src/Utilities/Extensions/ArrayExtensions.d.ts +15 -2
  322. package/src/Utilities/Extensions/ArrayExtensions.js +68 -15
  323. package/src/Utilities/ObjectFactory.js +3 -2
  324. package/src/Utilities/Services/AnnotationsService.js +1 -1
  325. package/src/Utilities/Services/Interface/IModuleService.d.ts +2 -1
  326. package/src/Utilities/Services/ModuleService.d.ts +3 -3
  327. package/src/Utilities/Services/ModuleService.js +18 -6
  328. package/src/Utilities/getScopeViewItems.js +6 -2
  329. package/src/View/AdaptableView.js +3 -1
  330. package/src/View/ColumnInfo/ColumnInfo.js +9 -3
  331. package/src/View/Components/AdaptableIconSelector/index.js +2 -3
  332. package/src/View/Components/ColumnFilter/AdaptableColumnFilter.d.ts +0 -1
  333. package/src/View/Components/ColumnFilter/AdaptableColumnFilter.js +2 -3
  334. package/src/View/Components/ColumnFilter/AdaptableFloatingFilter.d.ts +0 -2
  335. package/src/View/Components/ColumnFilter/AdaptableFloatingFilter.js +4 -7
  336. package/src/View/Components/ColumnFilter/ColumnFilter.js +11 -4
  337. package/src/View/Components/ColumnFilter/ColumnFilterWindow.js +1 -1
  338. package/src/View/Components/ColumnFilter/FloatingFilter.js +1 -2
  339. package/src/View/Components/ColumnFilter/LayoutColumnFilter.js +1 -1
  340. package/src/View/Components/ColumnFilter/components/ColumnFilterInput.js +2 -2
  341. package/src/View/Components/ColumnFilter/components/FloatingFilterValues.js +2 -2
  342. package/src/View/Components/ColumnFilter/useAdaptableFilterWrapper.d.ts +1 -1
  343. package/src/View/Components/ColumnFilter/useAdaptableFilterWrapper.js +2 -2
  344. package/src/View/Components/ColumnFilter/utils.d.ts +2 -2
  345. package/src/View/Components/ColumnFilter/utils.js +6 -1
  346. package/src/View/Components/EntityRulesEditor/index.js +1 -2
  347. package/src/View/Components/FilterForm/ListBoxFilterForm.js +1 -1
  348. package/src/View/Components/NewScopeComponent.js +5 -1
  349. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupModuleView.js +5 -5
  350. package/src/View/Components/PredicateEditor/PredicateEditor.js +1 -2
  351. package/src/View/Components/Selectors/BulkUpdateValueSelector.js +1 -1
  352. package/src/View/Components/Selectors/ColumnSelector.js +1 -1
  353. package/src/View/Components/Selectors/FieldSelector.js +1 -1
  354. package/src/View/Components/Selectors/PermittedValuesSelector.d.ts +1 -0
  355. package/src/View/Components/Selectors/PermittedValuesSelector.js +2 -2
  356. package/src/View/Dashboard/Dashboard.js +2 -2
  357. package/src/View/Dashboard/DashboardPopup.js +3 -1
  358. package/src/View/Dashboard/PinnedDashboard.js +1 -1
  359. package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +9 -21
  360. package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +59 -22
  361. package/src/View/FormatColumn/Wizard/FormatColumnRuleWizardSection.js +4 -0
  362. package/src/View/FormatColumn/Wizard/FormatColumnScopeWizardSection.js +0 -39
  363. package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.js +13 -12
  364. package/src/View/FormatColumn/Wizard/FormatColumnTargetWizardSection.d.ts +8 -0
  365. package/src/View/FormatColumn/Wizard/FormatColumnTargetWizardSection.js +37 -0
  366. package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +18 -4
  367. package/src/View/GridInfo/GridInfoPopup/AdaptableObjectsSummary.js +1 -1
  368. package/src/View/GridInfo/GridInfoPopup/GridInfoPopup.js +2 -2
  369. package/src/View/Layout/TransposedPopup.js +2 -2
  370. package/src/View/Layout/Wizard/sections/ColumnsSection.js +64 -9
  371. package/src/View/Layout/Wizard/sections/PivotAggregationsSection.js +5 -5
  372. package/src/View/StatusBar/AdaptableStatusBar.js +1 -4
  373. package/src/View/StatusBar/StatusBarPopup.js +1 -1
  374. package/src/View/Theme/ThemeSelector.js +1 -1
  375. package/src/agGrid/AdaptableAgGrid.d.ts +11 -7
  376. package/src/agGrid/AdaptableAgGrid.js +256 -218
  377. package/src/agGrid/AdaptableFilterHandler.d.ts +18 -0
  378. package/src/agGrid/AdaptableFilterHandler.js +65 -0
  379. package/src/agGrid/AgGridAdapter.d.ts +3 -7
  380. package/src/agGrid/AgGridAdapter.js +13 -46
  381. package/src/agGrid/AgGridColumnAdapter.d.ts +3 -3
  382. package/src/agGrid/AgGridColumnAdapter.js +86 -40
  383. package/src/agGrid/AgGridExportAdapter.js +1 -1
  384. package/src/agGrid/AgGridFilterAdapter.d.ts +2 -0
  385. package/src/agGrid/AgGridFilterAdapter.js +53 -0
  386. package/src/agGrid/AgGridFloatingFilterAdapter.d.ts +2 -0
  387. package/src/agGrid/{FloatingFilterWrapper.js → AgGridFloatingFilterAdapter.js} +26 -37
  388. package/src/agGrid/AgGridModulesAdapter.d.ts +15 -0
  389. package/src/agGrid/AgGridModulesAdapter.js +70 -0
  390. package/src/agGrid/editors/AdaptableNumberEditor/InternalAdaptableNumberEditor.js +1 -1
  391. package/src/agGrid/editors/AdaptablePercentageEditor/InternalAdaptablePercentageEditor.js +1 -1
  392. package/src/components/Dialog/index.js +1 -1
  393. package/src/components/Dropdown/Arrows.js +2 -2
  394. package/src/components/ExpressionEditor/QueryBuilder/QueryBuilderInputs.d.ts +1 -1
  395. package/src/components/ExpressionEditor/QueryBuilder/QueryBuilderInputs.js +4 -4
  396. package/src/components/ExpressionEditor/QueryBuilder/QueryPredicateBuilder.js +1 -1
  397. package/src/components/FileDroppable/index.js +1 -1
  398. package/src/components/IconSelector/IconSelector.d.ts +2 -2
  399. package/src/components/OverlayTrigger/index.js +1 -1
  400. package/src/components/Select/Select.d.ts +1 -1
  401. package/src/components/Select/Select.js +114 -22
  402. package/src/components/icons/DefaultIcon.d.ts +0 -1
  403. package/src/components/icons/DefaultIcon.js +0 -8
  404. package/src/env.js +2 -2
  405. package/src/layout-manager/src/LayoutManagerModel.d.ts +6 -10
  406. package/src/layout-manager/src/index.d.ts +11 -3
  407. package/src/layout-manager/src/index.js +302 -87
  408. package/src/layout-manager/src/normalizeLayoutModel.js +7 -4
  409. package/src/layout-manager/src/simplifyLayoutModel.js +4 -4
  410. package/src/metamodel/adaptable.metamodel.d.ts +172 -20
  411. package/src/metamodel/adaptable.metamodel.js +1 -1
  412. package/src/migration/AdaptableUpgradeHelper.js +2 -0
  413. package/src/migration/VersionUpgrade17.js +1 -1
  414. package/src/migration/VersionUpgrade20.js +1 -0
  415. package/src/migration/VersionUpgrade21.d.ts +6 -0
  416. package/src/migration/VersionUpgrade21.js +28 -0
  417. package/src/types.d.ts +8 -9
  418. package/tsconfig.cjs.tsbuildinfo +1 -1
  419. package/src/AdaptableState/Common/ExtendedLayoutInfo.d.ts +0 -27
  420. package/src/agGrid/FilterWrapper.d.ts +0 -2
  421. package/src/agGrid/FilterWrapper.js +0 -136
  422. package/src/agGrid/FloatingFilterWrapper.d.ts +0 -2
  423. package/src/agGrid/agGridModules.d.ts +0 -3
  424. package/src/agGrid/agGridModules.js +0 -18
  425. package/src/agGrid/getAgGridFilterNotifyModelFn.d.ts +0 -2
  426. package/src/agGrid/getAgGridFilterNotifyModelFn.js +0 -21
  427. /package/src/AdaptableState/Common/{ExtendedLayoutInfo.js → ExtendedLayout.js} +0 -0
@@ -1,12 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FloatingFilterWrapperFactory = void 0;
3
+ exports.AgGridFloatingFilterAdapterFactory = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const React = tslib_1.__importStar(require("react"));
6
- const react_1 = require("react");
7
6
  const renderWithAdaptableContext_1 = require("../View/renderWithAdaptableContext");
8
7
  const AdaptableFloatingFilter_1 = require("../View/Components/ColumnFilter/AdaptableFloatingFilter");
9
- const getAgGridFilterNotifyModelFn_1 = require("./getAgGridFilterNotifyModelFn");
10
8
  const filterContainerStyle = {
11
9
  overflow: 'hidden',
12
10
  minWidth: '0',
@@ -16,7 +14,7 @@ const filterContainerStyle = {
16
14
  position: 'relative',
17
15
  flex: '1 1 auto',
18
16
  };
19
- const FloatingFilterWrapperFactory = (adaptable) => {
17
+ const AgGridFloatingFilterAdapterFactory = (adaptable) => {
20
18
  const adaptableApi = adaptable.api;
21
19
  function getContainerId(colId) {
22
20
  return `floatingFilter_${colId}_${adaptable.adaptableOptions.adaptableId}`;
@@ -30,9 +28,6 @@ const FloatingFilterWrapperFactory = (adaptable) => {
30
28
  };
31
29
  return columnFilterProps;
32
30
  }
33
- function getNotifyModel(colId, onModelChange) {
34
- return (0, getAgGridFilterNotifyModelFn_1.getAgGridFilterNotifyModelFn)(adaptableApi, colId, onModelChange);
35
- }
36
31
  function findParentWithClass(element, className, stopClasses, applyToAll) {
37
32
  let current = element.parentElement;
38
33
  while (current) {
@@ -86,57 +81,51 @@ const FloatingFilterWrapperFactory = (adaptable) => {
86
81
  }
87
82
  };
88
83
  }
89
- if (adaptable.variant === 'react') {
90
- return (0, react_1.forwardRef)(function ReactFloatingFilterWrapper(props, ref) {
91
- const colId = props.column.getId();
92
- const { onModelChange } = props;
93
- const column = adaptableApi.columnApi.getColumnWithColumnId(colId);
94
- (0, react_1.useImperativeHandle)(ref, () => {
95
- return {
96
- onParentModelChanged() { },
97
- };
98
- });
99
- const notifyModel = getNotifyModel(colId, onModelChange);
100
- if (!column) {
101
- return null;
102
- }
103
- return (0, renderWithAdaptableContext_1.renderWithAdaptableContext)(React.createElement("div", { ref: patchParentElement, id: getContainerId(colId), style: filterContainerStyle },
104
- React.createElement(AdaptableFloatingFilter_1.AdaptableFloatingFilter, { ...getFilterProps(colId), onChange: notifyModel, onClear: notifyModel })), adaptable);
105
- });
106
- }
107
- return class FloatingFilterWrapper {
108
- onParentModelChanged(parentModel, filterChangedEvent) {
109
- // todo?
110
- }
111
- afterGuiAttached() {
112
- patchParentElement(this.filterContainer);
113
- }
84
+ return class AgGridFloatingFilterAdapter {
114
85
  init(params) {
115
86
  const colId = params.column.getColId();
87
+ this.colId = colId;
116
88
  this.filterContainer = document.createElement('div');
117
89
  this.filterContainer.id = getContainerId(colId);
118
90
  Object.keys(filterContainerStyle).forEach((key) => {
119
91
  //@ts-ignore
120
92
  this.filterContainer.style[key] = filterContainerStyle[key];
121
93
  });
122
- const notifyModel = getNotifyModel(colId, params.filterParams.filterChangedCallback);
123
94
  const column = adaptableApi.columnApi.getColumnWithColumnId(colId);
124
95
  if (column) {
125
96
  const filterProps = getFilterProps(colId);
126
97
  this.unmountReactRoot = adaptable.renderReactRoot((0, renderWithAdaptableContext_1.renderWithAdaptableContext)(React.createElement(AdaptableFloatingFilter_1.AdaptableFloatingFilter, {
127
98
  ...filterProps,
128
- onChange: notifyModel,
129
- onClear: notifyModel,
130
99
  }), adaptable), this.filterContainer);
131
100
  }
132
101
  }
102
+ onParentModelChanged(parentModel, filterChangedEvent) {
103
+ // AFL: this should NOT be required, but AG Grid calls this method
104
+ // most likely is a bug and will be removed in future versions
105
+ }
106
+ afterGuiAttached() {
107
+ patchParentElement(this.filterContainer);
108
+ }
133
109
  getGui() {
134
110
  return this.filterContainer;
135
111
  }
112
+ refresh(params) {
113
+ // always reuse the current instance
114
+ // the filte ris refreshed in the underlying React component
115
+ return true;
116
+ }
136
117
  destroy() {
137
- this.unmountReactRoot?.();
118
+ // Use setTimeout to defer unmounting to next event loop tick
119
+ // This ensures we're not unmounting during React's rendering phase
120
+ if (this.unmountReactRoot) {
121
+ const unmount = this.unmountReactRoot;
122
+ setTimeout(() => {
123
+ unmount();
124
+ }, 0);
125
+ this.unmountReactRoot = undefined;
126
+ }
138
127
  this.filterContainer = null;
139
128
  }
140
129
  };
141
130
  };
142
- exports.FloatingFilterWrapperFactory = FloatingFilterWrapperFactory;
131
+ exports.AgGridFloatingFilterAdapterFactory = AgGridFloatingFilterAdapterFactory;
@@ -0,0 +1,15 @@
1
+ import { AdaptableAgGrid } from './AdaptableAgGrid';
2
+ import { Module, AgModuleName } from 'ag-grid-enterprise';
3
+ export declare const AG_GRID_VERSION: string;
4
+ export declare class AgGridModulesAdapter {
5
+ private adaptableInstance;
6
+ private allAgGridModules;
7
+ constructor(adaptableInstance: AdaptableAgGrid);
8
+ destroy(): void;
9
+ private get agGridApi();
10
+ isAgGridModuleRegistered(moduleName: AgModuleName): boolean;
11
+ getAgGridRegisteredModules(): Module[];
12
+ getAgGridRegisteredModuleNames(): AgModuleName[];
13
+ getMandatoryAgGridModuleNames(): AgModuleName[];
14
+ private extractAgGridModuleNames;
15
+ }
@@ -0,0 +1,70 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AgGridModulesAdapter = exports.AG_GRID_VERSION = void 0;
4
+ const ag_grid_enterprise_1 = require("ag-grid-enterprise");
5
+ exports.AG_GRID_VERSION = ag_grid_enterprise_1.AllEnterpriseModule.version;
6
+ class AgGridModulesAdapter {
7
+ constructor(adaptableInstance) {
8
+ this.adaptableInstance = adaptableInstance;
9
+ this.allAgGridModules = new Set();
10
+ this.allAgGridModules = this.extractAgGridModuleNames(ag_grid_enterprise_1.AllEnterpriseModule);
11
+ }
12
+ destroy() {
13
+ this.adaptableInstance = null;
14
+ this.allAgGridModules.clear();
15
+ this.allAgGridModules = null;
16
+ }
17
+ get agGridApi() {
18
+ return this.adaptableInstance.agGridAdapter.getAgGridApi();
19
+ }
20
+ isAgGridModuleRegistered(moduleName) {
21
+ return this.agGridApi.isModuleRegistered(moduleName);
22
+ }
23
+ getAgGridRegisteredModules() {
24
+ const registeredModules = [];
25
+ this.allAgGridModules.forEach((module) => {
26
+ const agModuleName = `${module.moduleName}Module`;
27
+ if (this.isAgGridModuleRegistered(agModuleName)) {
28
+ registeredModules.push(module);
29
+ }
30
+ });
31
+ return registeredModules;
32
+ }
33
+ getAgGridRegisteredModuleNames() {
34
+ return this.getAgGridRegisteredModules().map((module) => {
35
+ const agModuleName = `${module.moduleName}Module`;
36
+ return agModuleName;
37
+ });
38
+ }
39
+ getMandatoryAgGridModuleNames() {
40
+ const mandatoryModules = [];
41
+ const rowModelType = this.agGridApi.getGridOption('rowModelType');
42
+ switch (rowModelType) {
43
+ case 'serverSide':
44
+ mandatoryModules.push('ServerSideRowModelModule');
45
+ mandatoryModules.push('ServerSideRowModelApiModule');
46
+ break;
47
+ case 'infinite':
48
+ mandatoryModules.push('InfiniteRowModelModule');
49
+ break;
50
+ default:
51
+ mandatoryModules.push('ClientSideRowModelModule');
52
+ mandatoryModules.push('ClientSideRowModelApiModule');
53
+ }
54
+ mandatoryModules.push('CellApiModule', 'CellStyleModule', 'ColumnApiModule', 'ColumnMenuModule', 'ContextMenuModule', 'CustomFilterModule', 'EventApiModule', 'ExternalFilterModule', 'GridStateModule', 'GroupFilterModule', 'RenderApiModule', 'RowApiModule', 'RowGroupingModule', 'RowStyleModule', 'ScrollApiModule');
55
+ return mandatoryModules;
56
+ }
57
+ extractAgGridModuleNames(module, collectedModules = new Set()) {
58
+ if (!module || !module.moduleName) {
59
+ return collectedModules;
60
+ }
61
+ collectedModules.add(module);
62
+ if (module.dependsOn) {
63
+ module.dependsOn.forEach((dep) => {
64
+ this.extractAgGridModuleNames(dep, collectedModules);
65
+ });
66
+ }
67
+ return collectedModules;
68
+ }
69
+ }
70
+ exports.AgGridModulesAdapter = AgGridModulesAdapter;
@@ -85,5 +85,5 @@ exports.InternalAdaptableNumberEditor = React.forwardRef(function InternalAdapta
85
85
  focus();
86
86
  }
87
87
  } },
88
- React.createElement(icons_1.Icon, { size: 18, name: "close", tabIndex: 0 }))) : null));
88
+ React.createElement(icons_1.Icon, { size: 15, name: "close", tabIndex: 0 }))) : null));
89
89
  });
@@ -78,7 +78,7 @@ exports.InternalAdaptablePercentageEditor = React.forwardRef(function InternalAd
78
78
  focus();
79
79
  }
80
80
  } },
81
- React.createElement(icons_1.Icon, { size: 18, name: "close", tabIndex: 0 }))) : null,
81
+ React.createElement(icons_1.Icon, { size: 15, name: "close", tabIndex: 0 }))) : null,
82
82
  React.createElement("div", { style: {
83
83
  position: 'absolute',
84
84
  right: showClear ? 20 : 0,
@@ -99,7 +99,7 @@ exports.Dialog = React.forwardRef((props, dialogRef) => {
99
99
  return null;
100
100
  }
101
101
  const closeButton = showCloseButton ? (React.createElement(rebass_1.Box, { padding: 1, title: "Close dialog", onClick: () => setIsOpen(false), className: `${baseClassName}__close-button` },
102
- React.createElement(icons_1.Icon, { size: 24, name: "close" }))) : null;
102
+ React.createElement(icons_1.Icon, { size: 20, name: "close" }))) : null;
103
103
  const setPreventDismissFlag = (e) => {
104
104
  if (dismissOnClickOutside) {
105
105
  e.nativeEvent.preventDialogDismiss = true;
@@ -15,7 +15,7 @@ const Arrows = () => {
15
15
  transform: 'translate3d(0px, -50%, 0px)',
16
16
  cursor: 'pointer',
17
17
  } },
18
- React.createElement(icons_1.Icon, { name: "triangle-up", size: 24, style: { position: 'relative', top: 7 } }),
19
- React.createElement(icons_1.Icon, { name: "triangle-down", size: 24, style: { position: 'relative', top: -7 } })));
18
+ React.createElement(icons_1.Icon, { name: "triangle-up", size: 20, style: { position: 'relative', top: 7 } }),
19
+ React.createElement(icons_1.Icon, { name: "triangle-down", size: 20, style: { position: 'relative', top: -7 } })));
20
20
  };
21
21
  exports.default = Arrows;
@@ -8,7 +8,7 @@ export declare const PrimitiveColumnOrFieldSelector: (props: {
8
8
  onChange: (colId: string) => void;
9
9
  hideFields?: boolean;
10
10
  }) => React.JSX.Element;
11
- export declare const PrimiteValueInput: (props: {
11
+ export declare const PrimitiveValueInput: (props: {
12
12
  inputType: ExpressionFunctionInputType;
13
13
  value: any;
14
14
  onChange(value: any): void;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CombinatorSelector = exports.ExpressionSelector = exports.PrimitiveMultiValueInput = exports.PrimiteValueInput = exports.PrimitiveColumnOrFieldSelector = void 0;
3
+ exports.CombinatorSelector = exports.ExpressionSelector = exports.PrimitiveMultiValueInput = exports.PrimitiveValueInput = exports.PrimitiveColumnOrFieldSelector = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const react_1 = tslib_1.__importDefault(require("react"));
6
6
  const rebass_1 = require("rebass");
@@ -68,7 +68,7 @@ const PrimitiveColumnOrFieldSelector = (props) => {
68
68
  input));
69
69
  };
70
70
  exports.PrimitiveColumnOrFieldSelector = PrimitiveColumnOrFieldSelector;
71
- const PrimiteValueInput = (props) => {
71
+ const PrimitiveValueInput = (props) => {
72
72
  const adaptable = (0, AdaptableContext_1.useAdaptable)();
73
73
  const hasFields = react_1.default.useMemo(() => {
74
74
  return adaptable.api.expressionApi.internalApi.getAvailableFields()?.length > 0;
@@ -135,7 +135,7 @@ const PrimiteValueInput = (props) => {
135
135
  } }));
136
136
  }
137
137
  else if (!['date', 'boolean'].includes(props.inputType)) {
138
- editor = (react_1.default.createElement(PermittedValuesSelector_1.PermittedValuesSelector, { allowNewValues: true, value: props.value, columnId: (0, utils_1.mapColumnExpressionToColumnId)(props.lefthandColumnIdParam), onChange: (value) => {
138
+ editor = (react_1.default.createElement(PermittedValuesSelector_1.PermittedValuesSelector, { allowNewValues: true, searchable: 'inline', value: props.value, columnId: (0, utils_1.mapColumnExpressionToColumnId)(props.lefthandColumnIdParam), onChange: (value) => {
139
139
  props.onChange(value);
140
140
  } }));
141
141
  }
@@ -174,7 +174,7 @@ const PrimiteValueInput = (props) => {
174
174
  }, value: typeOption.value, options: options, onChange: (value) => handleTypeChange(value) }),
175
175
  editor));
176
176
  };
177
- exports.PrimiteValueInput = PrimiteValueInput;
177
+ exports.PrimitiveValueInput = PrimitiveValueInput;
178
178
  const PrimitiveMultiValueInput = (props) => {
179
179
  return (react_1.default.createElement(PermittedValuesSelector_1.PermittedValuesSelector, { isMulti: true, allowNewValues: true, value: props.value, columnId: (0, utils_1.mapColumnExpressionToColumnId)(props.lefthandColumnIdParam), onChange: (value) => {
180
180
  props.onChange(value);
@@ -189,7 +189,7 @@ const PrimitiveFunctionEditor = (props) => {
189
189
  });
190
190
  } }));
191
191
  }
192
- return (react_1.default.createElement(QueryBuilderInputs_1.PrimiteValueInput, { ...commonProps, key: key, value: restOfArgs[index] ?? null, onChange: (value) => {
192
+ return (react_1.default.createElement(QueryBuilderInputs_1.PrimitiveValueInput, { ...commonProps, key: key, value: restOfArgs[index] ?? null, onChange: (value) => {
193
193
  const args = [...props.predicate.args];
194
194
  // +1 because col is the first argument
195
195
  args[index + 1] = value;
@@ -40,7 +40,7 @@ const readJSONFile = async (file, toJSON) => {
40
40
  };
41
41
  exports.readJSONFile = readJSONFile;
42
42
  const FileDroppable = (props = {}) => {
43
- const { onDropSuccess, message, fileAccept = '.json', helpText = 'AdapTable No Code Version', defaultText = 'Click here to select a JSON file to load or drag it here', dragOverText = 'Drop file here to start Adaptable Wizard', icon = React.createElement(icons_1.Icon, { name: "paperclip", size: 48 }), value, ...domProps } = props;
43
+ const { onDropSuccess, message, fileAccept = '.json', helpText = 'AdapTable No Code Version', defaultText = 'Click here to select a JSON file to load or drag it here', dragOverText = 'Drop file here to start Adaptable Wizard', icon = React.createElement(icons_1.Icon, { name: "paperclip", size: 40 }), value, ...domProps } = props;
44
44
  const [state, dispatch] = (0, react_1.useReducer)(reducer_1.default, initialState);
45
45
  const onDragEnter = (e) => {
46
46
  dispatch({
@@ -1,7 +1,7 @@
1
1
  import { FunctionComponent } from 'react';
2
- import { UserInterfaceOptions } from '../../types';
2
+ import { CustomIcon } from '../../types';
3
3
  export interface IconSelectorProps {
4
- customIcons?: UserInterfaceOptions['customIcons'];
4
+ customIcons?: CustomIcon[];
5
5
  value?: string;
6
6
  onChange: (iconName: string) => void;
7
7
  clearable?: boolean;
@@ -46,7 +46,7 @@ const ensurePortalElement = () => {
46
46
  }
47
47
  portalElement = document.createElement('div');
48
48
  portalElement.style.position = 'absolute';
49
- portalElement.style.zIndex = '999999';
49
+ portalElement.style.zIndex = '9999999';
50
50
  portalElement.style.top = '0px';
51
51
  portalElement.style.left = '0px';
52
52
  document.body.appendChild(portalElement);
@@ -13,7 +13,7 @@ export type SelectProps<SelectValue extends unknown, IsMulti extends boolean = f
13
13
  menuPlacement?: 'auto' | 'bottom' | 'top';
14
14
  menuStyle?: React.CSSProperties;
15
15
  menuMinWidth?: string | number;
16
- searchable?: boolean;
16
+ searchable?: false | 'inline' | 'menulist';
17
17
  resizable?: boolean;
18
18
  isClearable?: boolean;
19
19
  closeMenuOnSelect?: boolean;
@@ -12,6 +12,7 @@ const infinite_react_1 = require("@infinite-table/infinite-react");
12
12
  const react_1 = require("react");
13
13
  const join_1 = tslib_1.__importDefault(require("../utils/join"));
14
14
  const re_resizable_1 = require("re-resizable");
15
+ const Tooltip_1 = tslib_1.__importDefault(require("../Tooltip"));
15
16
  const resizableDirections = {
16
17
  right: true,
17
18
  bottom: true,
@@ -32,6 +33,15 @@ const INFINITE_DOM_PROPS = {
32
33
  width: '100%',
33
34
  },
34
35
  };
36
+ const infiniteContentValueClassName = 'InfiniteCell_content_value';
37
+ const renderValue = ({ renderBag, data, value }) => {
38
+ if (data.tooltip) {
39
+ const tooltipNode = typeof data.tooltip === 'string' ? data.tooltip : value;
40
+ return (React.createElement(Tooltip_1.default, { label: tooltipNode },
41
+ React.createElement("div", { className: infiniteContentValueClassName }, renderBag.value)));
42
+ }
43
+ return React.createElement("div", { className: infiniteContentValueClassName }, renderBag.value);
44
+ };
35
45
  const INFINITE_COLUMNS_WITH_CHECKBOX = {
36
46
  label: {
37
47
  field: 'label',
@@ -48,9 +58,7 @@ const INFINITE_COLUMNS_WITH_CHECKBOX = {
48
58
  },
49
59
  renderHeaderSelectionCheckBox: true,
50
60
  className: 'ab-Select-CheckboxColumn',
51
- renderValue: ({ renderBag }) => {
52
- return React.createElement("div", { className: "InfiniteCell_content_value" }, renderBag.value);
53
- },
61
+ renderValue,
54
62
  renderHeader: (headerParams) => {
55
63
  return (React.createElement(React.Fragment, null,
56
64
  headerParams.renderBag.selectionCheckBox,
@@ -63,6 +71,7 @@ const INFINITE_COLUMNS_WITH_RADIO = {
63
71
  label: {
64
72
  field: 'label',
65
73
  defaultFlex: 1,
74
+ renderValue,
66
75
  },
67
76
  };
68
77
  const isRowDisabled = ({ data, }) => {
@@ -95,6 +104,19 @@ const doesOptionMatchValue = function (value) {
95
104
  };
96
105
  const Select = function (props) {
97
106
  let maxLabelLength = 0;
107
+ const searchableInMenulist = props.searchable === 'menulist';
108
+ const searchableInline = props.searchable === 'inline';
109
+ // relevant for menulist search only
110
+ const menulistInputRef = React.useRef(null);
111
+ const [isSelectMenuOpen, setIsSelectMenuOpen] = (0, react_1.useState)(false);
112
+ const openSelectMenu = () => {
113
+ setIsSelectMenuOpen(true);
114
+ // it's a react-select bug, onMenuOpen is not called with controlled menuIsOpen
115
+ props.onMenuOpen?.();
116
+ };
117
+ const closeSelectMenu = () => {
118
+ setIsSelectMenuOpen(false);
119
+ };
98
120
  const ref = React.useRef(null);
99
121
  const valueToOptionMap = new Map((props.options || []).map((opt) => {
100
122
  let label = opt.label;
@@ -157,12 +179,23 @@ const Select = function (props) {
157
179
  * If on each render a new reference is passed, the menu will not open using the keyboard.
158
180
  */
159
181
  const SelectContainer = React.useMemo(() => {
160
- return (inputProps) => {
161
- return (React.createElement(react_select_1.components.SelectContainer, { ...inputProps, innerProps: {
182
+ return (selectContainerProps) => {
183
+ return (React.createElement(react_select_1.components.SelectContainer, { ...selectContainerProps, innerProps: {
162
184
  // @ts-ignore
163
185
  'data-name': props['data-name'],
164
186
  'data-id': props['data-id'],
165
- ...inputProps.innerProps,
187
+ 'data-test': props.searchable || false,
188
+ ...selectContainerProps.innerProps,
189
+ onMouseDown: (e) => {
190
+ if (!searchableInMenulist) {
191
+ return;
192
+ }
193
+ if (!isSelectMenuOpen) {
194
+ openSelectMenu();
195
+ e.stopPropagation();
196
+ e.preventDefault();
197
+ }
198
+ },
166
199
  } }));
167
200
  };
168
201
  }, []);
@@ -197,10 +230,10 @@ const Select = function (props) {
197
230
  }, [renderMultipleValues, props.placeholder]);
198
231
  const sizeRef = React.useRef({ ...defaultResizableSize });
199
232
  const MenuComponent = React.useMemo(() => {
200
- return (inputProps) => {
201
- const { isLoading } = inputProps;
233
+ return (menuProps) => {
234
+ const { isLoading } = menuProps;
202
235
  const theChildren = (React.createElement(React.Fragment, null,
203
- inputProps.children,
236
+ menuProps.children,
204
237
  React.createElement("div", { style: {
205
238
  display: isLoading ? 'block' : 'none',
206
239
  position: 'absolute',
@@ -216,9 +249,37 @@ const Select = function (props) {
216
249
  sizeRef.current = newSize;
217
250
  }, []);
218
251
  return (React.createElement(React.Fragment, null,
219
- React.createElement(react_select_1.components.Menu, { ...inputProps, innerProps: {
252
+ React.createElement(react_select_1.components.Menu, { ...menuProps, innerProps: {
253
+ // @ts-ignore
220
254
  'data-name': 'menu-container',
221
- ...inputProps.innerProps,
255
+ ...menuProps.innerProps,
256
+ onBlur: (e) => {
257
+ if (!searchableInMenulist) {
258
+ return;
259
+ }
260
+ const { relatedTarget } = e;
261
+ const menuDOMNode = menuProps.innerRef && 'current' in menuProps.innerRef
262
+ ? menuProps.innerRef.current
263
+ : null;
264
+ if ((menuDOMNode && relatedTarget == menuDOMNode) ||
265
+ menuDOMNode?.contains(relatedTarget)) {
266
+ // ignore the event if the focus is still inside the menu
267
+ return;
268
+ }
269
+ setTimeout(() => {
270
+ // wee need to wait for the single value selectio to complete before closing
271
+ closeSelectMenu();
272
+ }, 100);
273
+ },
274
+ onMouseDownCapture: (event) => {
275
+ if (!searchableInMenulist) {
276
+ return;
277
+ }
278
+ if (props.isMulti) {
279
+ // to avoid the menu closing when clicking inside it
280
+ event.stopPropagation();
281
+ }
282
+ },
222
283
  } }, resizable ? (React.createElement(re_resizable_1.Resizable, { enable: resizableDirections, minWidth: '100%', maxHeight: '60vh', maxWidth: '60vw', defaultSize: sizeRef.current, onResizeStop: onResizeStop }, theChildren)) : (theChildren))));
223
284
  };
224
285
  }, [resizable]);
@@ -233,6 +294,12 @@ const Select = function (props) {
233
294
  return (props) => {
234
295
  const { setValue, getValue, focusedOption, options, selectProps } = props;
235
296
  const { filterOption, inputValue, options: selectOptions, isLoading } = selectProps;
297
+ // Focus the input when MenuList mounts
298
+ React.useEffect(() => {
299
+ if (menulistInputRef.current) {
300
+ menulistInputRef.current.focus();
301
+ }
302
+ }, []);
236
303
  const filterFunction = React.useCallback(({ data }) => filterOption({ data, label: `${data.label}`, value: data.value }, inputValue), [filterOption, inputValue]);
237
304
  const hasFilter = inputValue !== '';
238
305
  const filteredOptionsValues = new Set();
@@ -356,11 +423,13 @@ const Select = function (props) {
356
423
  const pk = dataSourceApi.getPrimaryKeyByIndex(rowIndex);
357
424
  api.rowSelectionApi.toggleRowSelection(pk);
358
425
  }
359
- // see #ensure-select-closes-after-clicking-outside
360
- requestAnimationFrame(() => {
361
- ref.current?.focus();
362
- });
426
+ if (searchableInMenulist) {
427
+ requestAnimationFrame(() => {
428
+ menulistInputRef.current?.focus();
429
+ });
430
+ }
363
431
  }, []);
432
+ const prevInputValueRef = React.useRef('');
364
433
  return (React.createElement(infinite_react_1.DataSource, {
365
434
  // @ts-ignore
366
435
  // data={props.options}
@@ -368,12 +437,33 @@ const Select = function (props) {
368
437
  data: filteredOptions, primaryKey: "value", selectionMode: isMulti ? 'multi-row' : 'single-row',
369
438
  // @ts-ignore
370
439
  onRowSelectionChange: isLoading ? null : isMulti ? onRowSelectionChange : onSingleRowSelectionChange, rowSelection: rowSelection, isRowDisabled: isRowDisabled },
440
+ searchableInMenulist && (React.createElement(rebass_1.Flex, { p: 1 },
441
+ React.createElement("input", { ref: menulistInputRef, "data-name": "menulist-search-input", style: {
442
+ width: '100%',
443
+ }, className: 'ab-Select-MenulistSearch ab-Input ab-Input--type-text', autoCorrect: "off", autoComplete: "off", spellCheck: "false", type: "text", value: inputValue, onChange: (e) => {
444
+ const currentValue = e.currentTarget.value;
445
+ onInputChange(currentValue, {
446
+ action: 'input-change',
447
+ prevInputValue: prevInputValueRef.current,
448
+ });
449
+ prevInputValueRef.current = currentValue;
450
+ }, onMouseDown: (e) => {
451
+ e.stopPropagation();
452
+ const inputElement = e.target;
453
+ inputElement?.focus?.();
454
+ }, onTouchEnd: (e) => {
455
+ e.stopPropagation();
456
+ const inputElement = e.target;
457
+ inputElement?.focus?.();
458
+ }, placeholder: "Search..." }))),
371
459
  React.createElement(infinite_react_1.InfiniteTable, { header: isMulti && showHeaderSelectionCheckbox ? true : false, rowClassName: rowClassName, showZebraRows: false, rowHeight: '--ab-grid-row-height', onCellClick: isLoading ? null : onCellClick, keyboardNavigation: isLoading ? false : 'row', activeRowIndex: focusedOptionIndex, keyboardSelection: true, columns: isMulti ? INFINITE_COLUMNS_WITH_CHECKBOX : INFINITE_COLUMNS_WITH_RADIO, domProps: INFINITE_DOM_PROPS })));
372
460
  };
373
461
  }, [isMulti, showHeaderSelectionCheckbox]);
374
462
  const DropdownIndicator = React.useMemo(() => {
375
- return (props) => {
376
- return (React.createElement(react_select_1.components.DropdownIndicator, { ...props },
463
+ return (dropdownIndicatorProps) => {
464
+ return (React.createElement(react_select_1.components.DropdownIndicator, { ...dropdownIndicatorProps, innerProps: {
465
+ ...dropdownIndicatorProps.innerProps,
466
+ } },
377
467
  React.createElement(icons_1.Icon, { name: "triangle-down", style: { height: 20, width: 20 } })));
378
468
  };
379
469
  }, []);
@@ -395,20 +485,22 @@ const Select = function (props) {
395
485
  setInputValue(value);
396
486
  props.onInputChange?.(value);
397
487
  }, [props.onInputChange, isMulti]);
398
- return (React.createElement(SelectComponent, { ref: ref, "aria-label": props['aria-label'], onKeyDown: props.onKeyDown, inputValue: inputValue, onInputChange: onInputChange, onFocus: onFocus, onBlur: onBlur, onMenuOpen: props.onMenuOpen, isLoading: props.isLoading, options: props.options, className: (0, join_1.default)(props.className, 'ab-Select'), isDisabled: disabled, menuPlacement: props.menuPlacement ?? 'auto', isSearchable: props.searchable, hideSelectedOptions: false, isMulti: isMulti, value: selectedOption, blurInputOnSelect: false, menuPosition: props.menuPosition ?? 'absolute',
488
+ return (React.createElement(SelectComponent, { ref: ref, openMenuOnClick: searchableInMenulist ? false : undefined, openMenuOnFocus: searchableInMenulist ? false : undefined, menuIsOpen: searchableInMenulist ? isSelectMenuOpen : undefined, isSearchable: searchableInline, "aria-label": props['aria-label'], onKeyDown: props.onKeyDown, inputValue: inputValue, onInputChange: onInputChange, onFocus: onFocus, onBlur: onBlur, onMenuOpen: props.onMenuOpen, isLoading: props.isLoading, options: props.options, className: (0, join_1.default)(props.className, 'ab-Select'), isDisabled: disabled, menuPlacement: props.menuPlacement ?? 'auto', hideSelectedOptions: false, isMulti: isMulti, value: selectedOption, blurInputOnSelect: false, menuPosition: props.menuPosition ?? 'absolute',
399
489
  // This needed so the menu is not clipped by overflow: hidden
400
490
  menuPortalTarget: props.menuPortalTarget === undefined ? document.body : null, isClearable: props.isClearable, closeMenuOnSelect: props.closeMenuOnSelect, onChange: (option) => {
401
491
  if (isMulti) {
402
492
  const value = option.map((x) => x?.value);
403
493
  props.onChange(value);
404
- // ensure element keeps focus
405
- requestAnimationFrame(() => {
406
- ref.current?.focus();
407
- });
408
494
  }
409
495
  else {
410
496
  props.onChange(option?.value);
411
497
  }
498
+ if (searchableInMenulist) {
499
+ // ensure element keeps focus
500
+ requestAnimationFrame(() => {
501
+ menulistInputRef.current?.focus();
502
+ });
503
+ }
412
504
  }, placeholder: props.placeholder, createOptionPosition: 'first',
413
505
  // formatCreateLabel={(inputValue) => inputValue} // can we make this auto??
414
506
  // we use this: https://react-select.com/creatable
@@ -8,6 +8,5 @@ export type IconProps = {
8
8
  style?: React.CSSProperties;
9
9
  color?: string;
10
10
  };
11
- export declare const getSize: (size: number) => number;
12
11
  declare const _default: ({ children, size, name, tabIndex, color, ...props }: IconProps) => React.JSX.Element;
13
12
  export default _default;
@@ -1,17 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getSize = void 0;
4
3
  const tslib_1 = require("tslib");
5
4
  const React = tslib_1.__importStar(require("react"));
6
5
  const join_1 = tslib_1.__importDefault(require("../utils/join"));
7
- const HUNDRED_PERCENT_SIZE = 24;
8
6
  const DEFAULT_SIZE = 20;
9
- const getSize = (size) => Math.round(size * (DEFAULT_SIZE / HUNDRED_PERCENT_SIZE));
10
- exports.getSize = getSize;
11
7
  exports.default = ({ children, size = DEFAULT_SIZE, name, tabIndex, color, ...props }) => {
12
- size =
13
- typeof size === 'number' || parseInt(size) == size
14
- ? (0, exports.getSize)(size)
15
- : size;
16
8
  return (React.createElement("svg", { width: size, height: size, viewBox: "0 0 24 24", tabIndex: tabIndex, "data-id": name, "data-name": "AdaptableIcon", ...props, className: (0, join_1.default)(props.className, `ab-Icon ab-Icon--${name}`), style: { verticalAlign: 'middle', fill: color ?? 'currentColor', ...props.style } }, children));
17
9
  };
package/src/env.js CHANGED
@@ -2,6 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.default = {
4
4
  NEXT_PUBLIC_INFINITE_TABLE_LICENSE_KEY: "StartDate=2021-06-29|EndDate=2030-01-01|Owner=Adaptable|Type=distribution|TS=1624971462479|C=137829811,1004007071,2756196225,1839832928,3994409405,636616862" || '',
5
- PUBLISH_TIMESTAMP: 1752841771489 || Date.now(),
6
- VERSION: "20.3.0-canary.2" || '--current-version--',
5
+ PUBLISH_TIMESTAMP: 1756391432518 || Date.now(),
6
+ VERSION: "21.0.0-canary.0" || '--current-version--',
7
7
  };