@adaptabletools/adaptable 13.0.0-canary.2 → 13.0.0-canary.21

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 (289) hide show
  1. package/agGrid.d.ts +23 -1
  2. package/agGrid.js +23 -1
  3. package/base.css +1232 -733
  4. package/base.css.map +1 -0
  5. package/bundle.cjs.js +237 -220
  6. package/index.css +1250 -734
  7. package/index.css.map +1 -0
  8. package/package.json +5 -5
  9. package/publishTimestamp.d.ts +1 -1
  10. package/publishTimestamp.js +1 -1
  11. package/src/AdaptableInterfaces/IAdaptable.d.ts +7 -3
  12. package/src/AdaptableOptions/AdaptableOptions.d.ts +0 -2
  13. package/src/AdaptableOptions/AdaptableQLOptions.d.ts +136 -27
  14. package/src/AdaptableOptions/ExportOptions.d.ts +2 -2
  15. package/src/AdaptableOptions/FinsemblePluginOptions.d.ts +32 -0
  16. package/src/{Api/ConditionalStyleApi.js → AdaptableOptions/FinsemblePluginOptions.js} +0 -0
  17. package/src/AdaptableOptions/LayoutOptions.d.ts +2 -1
  18. package/src/AdaptableOptions/UserInterfaceOptions.d.ts +2 -2
  19. package/src/Api/AdaptableApi.d.ts +2 -5
  20. package/src/Api/ColumnApi.d.ts +8 -2
  21. package/src/Api/ConfigApi.d.ts +0 -6
  22. package/src/Api/ExportApi.d.ts +6 -6
  23. package/src/Api/FinsembleApi.d.ts +10 -0
  24. package/src/{Strategy/Interface/IConditionalStyleModule.js → Api/FinsembleApi.js} +0 -0
  25. package/src/Api/FormatColumnApi.d.ts +76 -59
  26. package/src/Api/Implementation/AdaptableApiImpl.d.ts +2 -2
  27. package/src/Api/Implementation/AdaptableApiImpl.js +2 -3
  28. package/src/Api/Implementation/ColumnApiImpl.d.ts +2 -1
  29. package/src/Api/Implementation/ColumnApiImpl.js +18 -14
  30. package/src/Api/Implementation/ConfigApiImpl.d.ts +0 -2
  31. package/src/Api/Implementation/ConfigApiImpl.js +0 -11
  32. package/src/Api/Implementation/ExportApiImpl.d.ts +4 -4
  33. package/src/Api/Implementation/ExportApiImpl.js +14 -14
  34. package/src/Api/Implementation/FlashingCellApiImpl.js +4 -1
  35. package/src/Api/Implementation/FormatColumnApiImpl.d.ts +36 -17
  36. package/src/Api/Implementation/FormatColumnApiImpl.js +101 -185
  37. package/src/Api/Implementation/InternalApiImpl.d.ts +1 -0
  38. package/src/Api/Implementation/InternalApiImpl.js +5 -0
  39. package/src/Api/Implementation/PluginsApiImpl.d.ts +2 -0
  40. package/src/Api/Implementation/PluginsApiImpl.js +6 -0
  41. package/src/Api/Implementation/QueryLanguageApiImpl.d.ts +2 -3
  42. package/src/Api/Implementation/QueryLanguageApiImpl.js +9 -18
  43. package/src/Api/Implementation/ScopeApiImpl.d.ts +1 -1
  44. package/src/Api/Implementation/StyledColumnApiImpl.d.ts +25 -0
  45. package/src/Api/Implementation/StyledColumnApiImpl.js +193 -0
  46. package/src/Api/Implementation/SystemStatusApiImpl.js +1 -2
  47. package/src/Api/Implementation/ToolPanelApiImpl.d.ts +3 -1
  48. package/src/Api/Implementation/ToolPanelApiImpl.js +8 -0
  49. package/src/Api/InternalApi.d.ts +1 -0
  50. package/src/Api/PluginsApi.d.ts +5 -0
  51. package/src/Api/QueryLanguageApi.d.ts +3 -7
  52. package/src/Api/ScopeApi.d.ts +1 -1
  53. package/src/Api/StyledColumnApi.d.ts +106 -0
  54. package/src/Api/StyledColumnApi.js +2 -0
  55. package/src/Api/ToolPanelApi.d.ts +10 -1
  56. package/src/PredefinedConfig/AdaptableState.d.ts +2 -0
  57. package/src/PredefinedConfig/Common/AdaptableIcon.d.ts +1 -1
  58. package/src/PredefinedConfig/Common/AdaptablePredicate.d.ts +1 -1
  59. package/src/PredefinedConfig/Common/AdaptablePredicate.js +37 -37
  60. package/src/PredefinedConfig/Common/Types.d.ts +3 -3
  61. package/src/PredefinedConfig/Common/Types.js +1 -0
  62. package/src/PredefinedConfig/ConditionalStyleState.d.ts +10 -19
  63. package/src/PredefinedConfig/FormatColumnState.d.ts +21 -92
  64. package/src/PredefinedConfig/PredefinedConfig.d.ts +6 -0
  65. package/src/PredefinedConfig/StyledColumnState.d.ts +119 -0
  66. package/src/PredefinedConfig/StyledColumnState.js +2 -0
  67. package/src/Redux/ActionsReducers/FormatColumnRedux.d.ts +14 -0
  68. package/src/Redux/ActionsReducers/FormatColumnRedux.js +43 -1
  69. package/src/Redux/ActionsReducers/PluginsRedux.d.ts +4 -4
  70. package/src/Redux/ActionsReducers/PluginsRedux.js +5 -5
  71. package/src/Redux/ActionsReducers/StyledColumnRedux.d.ts +49 -0
  72. package/src/Redux/ActionsReducers/StyledColumnRedux.js +92 -0
  73. package/src/Redux/DeadRedux.d.ts +6 -0
  74. package/src/Redux/DeadRedux.js +19 -1
  75. package/src/Redux/Store/AdaptableStore.js +11 -8
  76. package/src/Strategy/ConditionalStyleModule.d.ts +2 -25
  77. package/src/Strategy/ConditionalStyleModule.js +0 -213
  78. package/src/Strategy/DataChangeHistoryModule.d.ts +1 -0
  79. package/src/Strategy/DataChangeHistoryModule.js +12 -0
  80. package/src/Strategy/FormatColumnModule.d.ts +3 -10
  81. package/src/Strategy/FormatColumnModule.js +42 -183
  82. package/src/Strategy/Interface/IModule.d.ts +1 -0
  83. package/src/Strategy/LayoutModule.js +0 -4
  84. package/src/Strategy/StyledColumnModule.d.ts +24 -0
  85. package/src/Strategy/StyledColumnModule.js +165 -0
  86. package/src/Strategy/Utilities/FormatColumn/getFormatColumnSettingsViewItems.d.ts +1 -1
  87. package/src/Strategy/Utilities/FormatColumn/getFormatColumnSettingsViewItems.js +3 -4
  88. package/src/Strategy/Utilities/FormatColumn/getFormatColumnStyleViewItems.js +1 -16
  89. package/src/Strategy/Utilities/getScopeViewItems.js +1 -1
  90. package/src/Utilities/Constants/ModuleConstants.d.ts +3 -0
  91. package/src/Utilities/Constants/ModuleConstants.js +4 -1
  92. package/src/Utilities/Defaults/DefaultAdaptableOptions.js +6 -12
  93. package/src/Utilities/Defaults/DefaultSettingsPanel.js +1 -1
  94. package/src/Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions.d.ts +3 -2
  95. package/src/Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions.js +3 -1
  96. package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.d.ts +1 -0
  97. package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +3 -1
  98. package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.d.ts +1 -0
  99. package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.js +3 -1
  100. package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.d.ts +2 -4
  101. package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +3 -1
  102. package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.d.ts +1 -0
  103. package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +3 -1
  104. package/src/Utilities/Extensions/TypeExtensions.d.ts +1 -0
  105. package/src/Utilities/Extensions/TypeExtensions.js +5 -0
  106. package/src/Utilities/ObjectFactory.d.ts +5 -2
  107. package/src/Utilities/ObjectFactory.js +14 -7
  108. package/src/Utilities/Services/Interface/IQueryLanguageService.d.ts +14 -4
  109. package/src/Utilities/Services/{LicenseService.d.ts → LicenseService/index.d.ts} +3 -3
  110. package/src/Utilities/Services/LicenseService/index.js +1 -0
  111. package/src/Utilities/Services/LicenseService/shouldLogThankYouMessage.d.ts +1 -0
  112. package/src/Utilities/Services/LicenseService/shouldLogThankYouMessage.js +15 -0
  113. package/src/Utilities/Services/ModuleService.js +2 -2
  114. package/src/Utilities/Services/QueryLanguageService.d.ts +3 -3
  115. package/src/Utilities/Services/QueryLanguageService.js +89 -40
  116. package/src/Utilities/Services/ReportService.js +6 -6
  117. package/src/Utilities/license/LicenseDetails.d.ts +1 -1
  118. package/src/Utilities/license/decode.d.ts +1 -0
  119. package/src/Utilities/license/decode.js +1 -1
  120. package/src/View/AdaptablePopover/index.js +1 -1
  121. package/src/View/Alert/Wizard/AlertBehaviourWizardSection.js +11 -12
  122. package/src/View/Alert/Wizard/AlertDisplayWizardSection.js +6 -5
  123. package/src/View/Alert/Wizard/BaseAlertRulesWizardSection.js +3 -3
  124. package/src/View/Alert/Wizard/BaseAlertScopeWizardSection.js +3 -3
  125. package/src/View/Alert/Wizard/isValidAlertRules.js +1 -1
  126. package/src/View/BulkUpdate/BulkUpdatePopup.js +1 -1
  127. package/src/View/CalculatedColumn/CalculatedColumnSummary.d.ts +1 -1
  128. package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +1 -1
  129. package/src/View/Components/AdaptableObjectRow/index.js +1 -6
  130. package/src/View/Components/Buttons/ButtonInfo.d.ts +1 -3
  131. package/src/View/Components/Buttons/ButtonInfo.js +3 -5
  132. package/src/View/Components/EntityRulesEditor/index.d.ts +2 -1
  133. package/src/View/Components/EntityRulesEditor/index.js +36 -35
  134. package/src/View/Components/FilterForm/FilterForm.js +11 -16
  135. package/src/View/Components/FilterForm/ListBoxFilterForm.js +2 -1
  136. package/src/View/Components/FilterForm/QuickFilterForm.js +7 -13
  137. package/src/View/Components/NewScopeComponent.js +3 -3
  138. package/src/View/Components/Panels/PanelWithButton.js +1 -5
  139. package/src/View/Components/Panels/PanelWithImage.js +1 -5
  140. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopup.js +2 -2
  141. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupDialog.d.ts +1 -0
  142. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupDialog.js +3 -16
  143. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupModuleView.js +1 -0
  144. package/src/View/Components/Popups/AdaptablePopup/PopupPanel.js +1 -1
  145. package/src/View/Components/Popups/AdaptablePopupTeamSharing.js +5 -5
  146. package/src/View/Components/RangesComponent.d.ts +8 -1
  147. package/src/View/Components/RangesComponent.js +60 -24
  148. package/src/View/Components/ScopeComponent.js +6 -6
  149. package/src/View/Components/Selectors/ColumnSelector.d.ts +1 -0
  150. package/src/View/Components/Selectors/ColumnSelector.js +2 -1
  151. package/src/View/Components/Selectors/ColumnValueSelector.js +2 -2
  152. package/src/View/Components/StyleComponent.js +14 -19
  153. package/src/View/Components/ToolPanel/AdaptableToolPanel.d.ts +3 -9
  154. package/src/View/Components/ToolPanel/AdaptableToolPanel.js +25 -10
  155. package/src/View/Components/ToolPanel/CustomToolPanelContent.js +1 -1
  156. package/src/View/Components/ToolPanel/ToolPanelPopup.d.ts +1 -1
  157. package/src/View/DataSet/DataSetSelector.js +1 -1
  158. package/src/View/DataSet/DataSetViewPanel.d.ts +1 -1
  159. package/src/View/Export/ExportViewPanel.d.ts +1 -1
  160. package/src/View/Export/ExportViewPanel.js +4 -4
  161. package/src/View/Export/ReportExportDropdown.js +1 -1
  162. package/src/View/Export/Wizard/ReportNameWizardSection.js +10 -11
  163. package/src/View/Filter/FilterSummary.d.ts +1 -1
  164. package/src/View/Filter/FilterViewPanel.d.ts +1 -1
  165. package/src/View/FlashingCell/FlashingCellStyle.js +3 -3
  166. package/src/View/FlashingCell/Wizard/FlashingCellRulesWizardSection.js +3 -3
  167. package/src/View/FlashingCell/Wizard/FlashingCellSettingsWizardSection.js +6 -6
  168. package/src/View/FlashingCell/Wizard/FlashingCellWizard.js +4 -4
  169. package/src/View/FormatColumn/FormatColumnSummary.js +1 -1
  170. package/src/View/FormatColumn/MoveFormatColumn.d.ts +7 -0
  171. package/src/View/FormatColumn/MoveFormatColumn.js +27 -0
  172. package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +28 -28
  173. package/src/View/FormatColumn/Wizard/FormatColumnRuleWizardSection.d.ts +8 -0
  174. package/src/View/FormatColumn/Wizard/FormatColumnRuleWizardSection.js +28 -0
  175. package/src/View/FormatColumn/Wizard/FormatColumnScopeWizardSection.js +21 -3
  176. package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.js +2 -28
  177. package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.d.ts +3 -3
  178. package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.js +6 -300
  179. package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +15 -9
  180. package/src/View/FormatColumn/Wizard/constants.d.ts +1 -0
  181. package/src/View/FormatColumn/Wizard/constants.js +4 -0
  182. package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.js +7 -7
  183. package/src/View/GridInfo/ColumnInfoComponent.js +0 -7
  184. package/src/View/Layout/LayoutRadioSelector.js +1 -1
  185. package/src/View/Layout/LayoutViewPanel.d.ts +1 -1
  186. package/src/View/Layout/Wizard/Components/ColumnLabels.js +1 -1
  187. package/src/View/Layout/Wizard/sections/AggregationsSection.js +1 -1
  188. package/src/View/Layout/Wizard/sections/ColumnsSection.js +7 -6
  189. package/src/View/Layout/Wizard/sections/SettingsSection.js +2 -2
  190. package/src/View/PlusMinus/Wizard/PlusMinusRuleWizardSection.js +1 -1
  191. package/src/View/PlusMinus/Wizard/PlusMinusSettingsWizardSection.js +3 -3
  192. package/src/View/Query/QueryViewPanel.d.ts +1 -1
  193. package/src/View/Query/Wizard/NamedQuerySettingsWizardSection.js +1 -1
  194. package/src/View/QuickSearch/QuickSearchPopup.js +2 -2
  195. package/src/View/QuickSearch/QuickSearchViewPanel.d.ts +1 -1
  196. package/src/View/Schedule/Wizard/ScheduleScheduleWizard.js +5 -5
  197. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsGlue42.js +1 -1
  198. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsIPushPull.js +5 -5
  199. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsOpenFin.js +1 -1
  200. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReminder.js +5 -5
  201. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReport.js +2 -2
  202. package/src/View/Shortcut/Wizard/ShortcutSettingsWizard.js +3 -3
  203. package/src/View/SmartEdit/SmartEditPopup.js +3 -3
  204. package/src/View/SpecialColumnSettingsWizardStep.js +10 -10
  205. package/src/View/StateManagement/StateManagementPopup.js +4 -4
  206. package/src/View/StyledColumn/Wizard/StyledColumnWizard.d.ts +7 -0
  207. package/src/View/StyledColumn/Wizard/StyledColumnWizard.js +77 -0
  208. package/src/View/StyledColumn/Wizard/StyledColumnWizardColumnSection.d.ts +9 -0
  209. package/src/View/StyledColumn/Wizard/StyledColumnWizardColumnSection.js +65 -0
  210. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection.d.ts +9 -0
  211. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection.js +234 -0
  212. package/src/View/StyledColumn/Wizard/StyledColumnWizardTypeSection.d.ts +7 -0
  213. package/src/View/StyledColumn/Wizard/StyledColumnWizardTypeSection.js +59 -0
  214. package/src/View/SystemStatus/SystemStatusEntityRow.js +4 -6
  215. package/src/View/SystemStatus/SystemStatusViewPanel.d.ts +1 -1
  216. package/src/View/TeamSharing/SharedEntityObjectView.js +1 -1
  217. package/src/View/TeamSharing/TeamSharingApplyButton.js +1 -1
  218. package/src/View/Theme/ThemePopup.js +1 -1
  219. package/src/View/Wizard/OnePageAdaptableWizard.d.ts +1 -1
  220. package/src/View/Wizard/OnePageAdaptableWizard.js +1 -2
  221. package/src/agGrid/ActionColumnRenderer.d.ts +3 -0
  222. package/src/agGrid/ActionColumnRenderer.js +96 -64
  223. package/src/agGrid/Adaptable.d.ts +13 -9
  224. package/src/agGrid/Adaptable.js +207 -221
  225. package/src/agGrid/CheckboxRenderer.js +1 -1
  226. package/src/agGrid/FilterWrapper.js +60 -16
  227. package/src/agGrid/FloatingFilterWrapper.d.ts +2 -2
  228. package/src/agGrid/FloatingFilterWrapper.js +71 -32
  229. package/src/agGrid/PercentBarRenderer.d.ts +6 -2
  230. package/src/agGrid/PercentBarRenderer.js +19 -17
  231. package/src/agGrid/agGridHelper.d.ts +6 -2
  232. package/src/agGrid/agGridHelper.js +17 -17
  233. package/src/agGrid/createAgStatusPanelComponent.d.ts +1 -1
  234. package/src/agGrid/createAgStatusPanelComponent.js +17 -0
  235. package/src/agGrid/editors/AdaptableDateEditor/index.d.ts +5 -1
  236. package/src/agGrid/editors/AdaptableDateEditor/index.js +87 -20
  237. package/src/agGrid/editors/AdaptableNumberEditor/InternalAdaptableNumberEditor.js +1 -1
  238. package/src/agGrid/editors/AdaptableNumberEditor/index.d.ts +3 -3
  239. package/src/agGrid/editors/AdaptableNumberEditor/index.js +81 -30
  240. package/src/agGrid/weightedAverage.js +19 -11
  241. package/src/components/CheckBox/index.js +7 -2
  242. package/src/components/Datepicker/index.d.ts +1 -1
  243. package/src/components/ExpressionEditor/BaseEditorInput.d.ts +1 -1
  244. package/src/components/ExpressionEditor/BaseEditorInput.js +13 -32
  245. package/src/components/ExpressionEditor/EditorInput.js +1 -1
  246. package/src/components/ExpressionEditor/EditorInputWithWhereClause.js +1 -1
  247. package/src/components/ExpressionEditor/index.js +9 -17
  248. package/src/components/FormLayout/index.js +1 -1
  249. package/src/components/StylePreview.js +2 -1
  250. package/src/components/icons/brush.d.ts +3 -0
  251. package/src/components/icons/brush.js +7 -0
  252. package/src/components/icons/index.js +2 -0
  253. package/src/metamodel/adaptable.metamodel.d.ts +213 -121
  254. package/src/metamodel/adaptable.metamodel.js +1 -1
  255. package/src/parser/src/types.d.ts +6 -3
  256. package/src/renderReactRoot.d.ts +2 -0
  257. package/src/renderReactRoot.js +11 -9
  258. package/src/types.d.ts +8 -6
  259. package/themes/dark.css +8 -4
  260. package/themes/dark.css.map +1 -0
  261. package/themes/light.css +4 -1
  262. package/themes/light.css.map +1 -0
  263. package/version.d.ts +1 -1
  264. package/version.js +1 -1
  265. package/src/AdaptableComponents.d.ts +0 -1
  266. package/src/AdaptableComponents.js +0 -5
  267. package/src/Api/ConditionalStyleApi.d.ts +0 -108
  268. package/src/Api/Implementation/ConditionalStyleApiImpl.d.ts +0 -29
  269. package/src/Api/Implementation/ConditionalStyleApiImpl.js +0 -98
  270. package/src/Redux/ActionsReducers/ConditionalStyleRedux.d.ts +0 -49
  271. package/src/Redux/ActionsReducers/ConditionalStyleRedux.js +0 -95
  272. package/src/Strategy/Interface/IConditionalStyleModule.d.ts +0 -6
  273. package/src/Strategy/Utilities/getStyleViewItems.d.ts +0 -2
  274. package/src/Strategy/Utilities/getStyleViewItems.js +0 -16
  275. package/src/Utilities/Services/LicenseService.js +0 -1
  276. package/src/View/ConditionalStyle/ConditionalStyleSummary.d.ts +0 -25
  277. package/src/View/ConditionalStyle/ConditionalStyleSummary.js +0 -108
  278. package/src/View/ConditionalStyle/Wizard/ConditionalStyleRuleWizardSection.d.ts +0 -9
  279. package/src/View/ConditionalStyle/Wizard/ConditionalStyleRuleWizardSection.js +0 -42
  280. package/src/View/ConditionalStyle/Wizard/ConditionalStyleScopeWizardSection.d.ts +0 -8
  281. package/src/View/ConditionalStyle/Wizard/ConditionalStyleScopeWizardSection.js +0 -43
  282. package/src/View/ConditionalStyle/Wizard/ConditionalStyleSettingsWizardSettings.d.ts +0 -8
  283. package/src/View/ConditionalStyle/Wizard/ConditionalStyleSettingsWizardSettings.js +0 -29
  284. package/src/View/ConditionalStyle/Wizard/ConditionalStyleStyleWizardSection.d.ts +0 -8
  285. package/src/View/ConditionalStyle/Wizard/ConditionalStyleStyleWizardSection.js +0 -23
  286. package/src/View/ConditionalStyle/Wizard/ConditionalStyleWizard.d.ts +0 -6
  287. package/src/View/ConditionalStyle/Wizard/ConditionalStyleWizard.js +0 -114
  288. package/src/View/ConditionalStyle/Wizard/DEFAULT_PREDICATE_ID_FOR_CONDITIONAL_STYLE.d.ts +0 -1
  289. package/src/View/ConditionalStyle/Wizard/DEFAULT_PREDICATE_ID_FOR_CONDITIONAL_STYLE.js +0 -4
@@ -1,13 +1,88 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AdaptableDateEditor = void 0;
3
+ exports.AdaptableDateEditor = exports.ReactAdaptableDateEditor = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const React = tslib_1.__importStar(require("react"));
6
- const react_dom_1 = require("react-dom");
7
6
  const renderWithAdaptableContext_1 = require("../../../View/renderWithAdaptableContext");
8
7
  const InternalAdaptableDateEditor_1 = require("./InternalAdaptableDateEditor");
9
8
  const core_1 = require("@ag-grid-community/core");
10
9
  const FormatHelper_1 = require("../../../Utilities/Helpers/FormatHelper");
10
+ const react_1 = require("react");
11
+ function shouldClearExistingValue(params) {
12
+ return params.eventKey === core_1.KeyCode.BACKSPACE || params.eventKey === core_1.KeyCode.DELETE;
13
+ }
14
+ function getStartValue(params) {
15
+ return shouldClearExistingValue(params) ? '' : params.value;
16
+ }
17
+ const style = {
18
+ position: 'absolute',
19
+ top: '0px',
20
+ left: '0px',
21
+ right: '0px',
22
+ bottom: '0px',
23
+ };
24
+ const defaultDateValueParser = ({ newValue, oldValue, defaultParser }) => {
25
+ if ((typeof oldValue === 'string' || oldValue == null) && defaultParser) {
26
+ return defaultParser(newValue);
27
+ }
28
+ return newValue;
29
+ };
30
+ exports.ReactAdaptableDateEditor = (0, react_1.forwardRef)((props, ref) => {
31
+ var _a;
32
+ const [initialValue] = (0, react_1.useState)(() => getStartValue(props));
33
+ const valueRef = (0, react_1.useRef)(initialValue);
34
+ const colValueParser = props.column.getColDef().valueParser;
35
+ const valueParser = typeof colValueParser === 'function' ? colValueParser : defaultDateValueParser;
36
+ const adaptable = props.api.__adaptable;
37
+ const editorRef = (0, react_1.useRef)(null);
38
+ (0, react_1.useImperativeHandle)(ref, () => {
39
+ return {
40
+ focusIn() {
41
+ var _a;
42
+ (_a = editorRef.current) === null || _a === void 0 ? void 0 : _a.focus();
43
+ },
44
+ // the final value to send to the grid, on completion of editing
45
+ getValue() {
46
+ return valueRef.current;
47
+ },
48
+ };
49
+ });
50
+ const editorElement = (React.createElement(InternalAdaptableDateEditor_1.InternalAdaptableDateEditor, { defaultValue: initialValue, dateFormat: adaptable.adaptableOptions.userInterfaceOptions.dateInputOptions.dateFormat, onValueChange: (value) => {
51
+ const invalid = isNaN(+value);
52
+ if (valueParser) {
53
+ const params = Object.assign(Object.assign({}, props), { oldValue: props.value, newValue: value, defaultParser: (value) => {
54
+ var _a, _b;
55
+ const Pattern = (_b = (_a = adaptable.adaptableOptions.userInterfaceOptions) === null || _a === void 0 ? void 0 : _a.dateInputOptions) === null || _b === void 0 ? void 0 : _b.dateFormat;
56
+ if (!Pattern) {
57
+ return value;
58
+ }
59
+ return (0, FormatHelper_1.DateFormatter)(value, {
60
+ Pattern,
61
+ });
62
+ } });
63
+ valueRef.current = valueParser(params);
64
+ }
65
+ else {
66
+ valueRef.current = invalid ? null : value;
67
+ }
68
+ if (!invalid) {
69
+ requestAnimationFrame(() => {
70
+ props.stopEditing();
71
+ });
72
+ }
73
+ }, showClearButton: (_a = props.showClearButton) !== null && _a !== void 0 ? _a : true, onStopEdit: (keyboardEventKey) => {
74
+ if (keyboardEventKey === 'Escape') {
75
+ props.api.stopEditing(true);
76
+ }
77
+ else {
78
+ props.stopEditing();
79
+ }
80
+ }, ref: (editor) => {
81
+ editorRef.current = editor;
82
+ editor === null || editor === void 0 ? void 0 : editor.focus();
83
+ } }));
84
+ return React.createElement("div", { style: style }, (0, renderWithAdaptableContext_1.renderWithAdaptableContext)(editorElement, adaptable));
85
+ });
11
86
  /**
12
87
  * Used by default for all `abColDefDate` columns.
13
88
  *
@@ -33,26 +108,20 @@ const FormatHelper_1 = require("../../../Utilities/Helpers/FormatHelper");
33
108
  */
34
109
  class AdaptableDateEditor {
35
110
  constructor() {
36
- this.valueParser = ({ newValue, oldValue, defaultParser }) => {
37
- if ((typeof oldValue === 'string' || oldValue == null) && defaultParser) {
38
- return defaultParser(newValue);
39
- }
40
- return newValue;
41
- };
111
+ this.valueParser = defaultDateValueParser;
42
112
  }
43
113
  init(params) {
44
- this.value = this.shouldClearExistingValue(params) ? '' : params.value;
114
+ this.value = getStartValue(params);
45
115
  const { valueParser } = params.column.getColDef();
46
116
  this.params = params;
47
117
  if (typeof valueParser === 'function') {
48
118
  this.valueParser = valueParser;
49
119
  }
50
120
  this.el = document.createElement('div');
51
- this.el.style.position = 'absolute';
52
- this.el.style.top = '0px';
53
- this.el.style.left = '0px';
54
- this.el.style.right = '0px';
55
- this.el.style.bottom = '0px';
121
+ Object.keys(style).forEach((key) => {
122
+ //@ts-ignore
123
+ this.el.style[key] = style[key];
124
+ });
56
125
  }
57
126
  /* Component Editor Lifecycle methods */
58
127
  // gets called once when grid ready to insert the element
@@ -76,7 +145,7 @@ class AdaptableDateEditor {
76
145
  afterGuiAttached() {
77
146
  var _a;
78
147
  const adaptable = this.getAdaptableInstance(this.params);
79
- const defaultValue = this.shouldClearExistingValue(this.params) ? '' : this.params.value;
148
+ const defaultValue = shouldClearExistingValue(this.params) ? '' : this.params.value;
80
149
  const editorElement = (React.createElement(InternalAdaptableDateEditor_1.InternalAdaptableDateEditor, { defaultValue: defaultValue, dateFormat: adaptable.adaptableOptions.userInterfaceOptions.dateInputOptions.dateFormat, onValueChange: (value) => {
81
150
  const invalid = isNaN(+value);
82
151
  if (this.valueParser) {
@@ -111,13 +180,11 @@ class AdaptableDateEditor {
111
180
  this.editor = editor;
112
181
  editor === null || editor === void 0 ? void 0 : editor.focus();
113
182
  } }));
114
- (0, react_dom_1.render)((0, renderWithAdaptableContext_1.renderWithAdaptableContext)(editorElement, adaptable), this.el);
183
+ this.unmountReactRoot = adaptable.renderReactRoot((0, renderWithAdaptableContext_1.renderWithAdaptableContext)(editorElement, adaptable), this.el);
115
184
  }
116
185
  destroy() {
117
- (0, react_dom_1.unmountComponentAtNode)(this.el);
118
- }
119
- shouldClearExistingValue(params) {
120
- return params.eventKey === core_1.KeyCode.BACKSPACE || params.eventKey === core_1.KeyCode.DELETE;
186
+ var _a;
187
+ (_a = this.unmountReactRoot) === null || _a === void 0 ? void 0 : _a.call(this);
121
188
  }
122
189
  }
123
190
  exports.AdaptableDateEditor = AdaptableDateEditor;
@@ -22,7 +22,7 @@ const inputStyle = {
22
22
  width: '100%',
23
23
  border: 'none',
24
24
  };
25
- exports.InternalAdaptableNumberEditor = React.forwardRef((props, ref) => {
25
+ exports.InternalAdaptableNumberEditor = React.forwardRef(function InternalAdaptableNumberEditorFn(props, ref) {
26
26
  var _a;
27
27
  const inputRef = React.useRef(null);
28
28
  const focus = () => {
@@ -1,3 +1,4 @@
1
+ import * as React from 'react';
1
2
  import { ICellEditorComp, ICellEditorParams } from '@ag-grid-community/core';
2
3
  /**
3
4
  * Adaptable number editor parameters extending the AG Grid {@link ICellEditorParams}.
@@ -14,6 +15,7 @@ interface AdaptableNumberCellEditorParams extends ICellEditorParams {
14
15
  */
15
16
  emptyValue: string;
16
17
  }
18
+ export declare const ReactAdaptableNumberEditor: React.ForwardRefExoticComponent<AdaptableNumberCellEditorParams & React.RefAttributes<unknown>>;
17
19
  /**
18
20
  * Used by default for all `abColDefNumber` columns.
19
21
  *
@@ -42,6 +44,7 @@ export declare class AdaptableNumberEditor implements ICellEditorComp {
42
44
  private params;
43
45
  private editor;
44
46
  private valueParser;
47
+ private unmountReactRoot?;
45
48
  init(params: AdaptableNumberCellEditorParams): void;
46
49
  getGui(): HTMLDivElement;
47
50
  getValue(): any;
@@ -50,8 +53,5 @@ export declare class AdaptableNumberEditor implements ICellEditorComp {
50
53
  afterGuiAttached(): void;
51
54
  destroy(): void;
52
55
  private onValueChange;
53
- private getStartValue;
54
- private shouldClearExistingValue;
55
- private isValidChar;
56
56
  }
57
57
  export {};
@@ -1,12 +1,82 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AdaptableNumberEditor = void 0;
3
+ exports.AdaptableNumberEditor = exports.ReactAdaptableNumberEditor = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const React = tslib_1.__importStar(require("react"));
6
- const react_dom_1 = require("react-dom");
7
6
  const renderWithAdaptableContext_1 = require("../../../View/renderWithAdaptableContext");
8
7
  const InternalAdaptableNumberEditor_1 = require("./InternalAdaptableNumberEditor");
9
8
  const core_1 = require("@ag-grid-community/core");
9
+ const react_1 = require("react");
10
+ function shouldClearExistingValue(params) {
11
+ return params.eventKey === core_1.KeyCode.BACKSPACE || params.eventKey === core_1.KeyCode.DELETE;
12
+ }
13
+ function isValidChar(char) {
14
+ // allow only digits
15
+ return ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'].includes(char);
16
+ // we do NOT allow key shortcuts for starting non-digits (minus sign, decimal separators) as the input[number] handling is very buggy and we would open a can of worms
17
+ }
18
+ function getStartValue(params) {
19
+ if (shouldClearExistingValue(params)) {
20
+ return '';
21
+ }
22
+ if (params.charPress && isValidChar(params.charPress)) {
23
+ return params.charPress;
24
+ }
25
+ return params.value;
26
+ }
27
+ const defaultValueParser = ({ newValue, oldValue: _ }) => {
28
+ return newValue;
29
+ };
30
+ const style = {
31
+ position: 'absolute',
32
+ top: '0px',
33
+ left: '0px',
34
+ right: '0px',
35
+ bottom: '0px',
36
+ };
37
+ exports.ReactAdaptableNumberEditor = (0, react_1.forwardRef)((props, ref) => {
38
+ var _a, _b;
39
+ const [initialValue] = (0, react_1.useState)(() => getStartValue(props));
40
+ const valueRef = (0, react_1.useRef)(initialValue);
41
+ const columnId = props.column.getColId();
42
+ const adaptable = props.api.__adaptable;
43
+ const colValueParser = props.column.getColDef().valueParser;
44
+ const valueParser = typeof colValueParser === 'function' ? colValueParser : defaultValueParser;
45
+ function onValueChange(value) {
46
+ value = valueParser
47
+ ? valueParser(Object.assign(Object.assign({}, props), { oldValue: props.value, newValue: value }))
48
+ : value;
49
+ valueRef.current = value;
50
+ }
51
+ const editorRef = (0, react_1.useRef)(null);
52
+ (0, react_1.useImperativeHandle)(ref, () => {
53
+ return {
54
+ focusIn() {
55
+ var _a;
56
+ (_a = editorRef.current) === null || _a === void 0 ? void 0 : _a.focus();
57
+ },
58
+ // the final value to send to the grid, on completion of editing
59
+ getValue() {
60
+ return valueRef.current;
61
+ },
62
+ };
63
+ });
64
+ const editorElement = (React.createElement(InternalAdaptableNumberEditor_1.InternalAdaptableNumberEditor, { defaultValue: initialValue, showClearButton: (_a = props.showClearButton) !== null && _a !== void 0 ? _a : true, emptyValue: (_b = props.emptyValue) !== null && _b !== void 0 ? _b : '', onValueChange: onValueChange, ref: (editor) => {
65
+ editorRef.current = editor;
66
+ editor === null || editor === void 0 ? void 0 : editor.focus();
67
+ } }));
68
+ function onKeyDown(keyDownEvent) {
69
+ adaptable._emit('CellEditorKeyDown', {
70
+ keyDownEvent,
71
+ cellValue: valueRef.current,
72
+ columnId,
73
+ updateValueCallback: (updatedValue) => {
74
+ editorRef.current.setValue(updatedValue);
75
+ },
76
+ });
77
+ }
78
+ return (React.createElement("div", { style: style, onKeyDown: onKeyDown }, (0, renderWithAdaptableContext_1.renderWithAdaptableContext)(editorElement, adaptable)));
79
+ });
10
80
  /**
11
81
  * Used by default for all `abColDefNumber` columns.
12
82
  *
@@ -30,9 +100,7 @@ const core_1 = require("@ag-grid-community/core");
30
100
  */
31
101
  class AdaptableNumberEditor {
32
102
  constructor() {
33
- this.valueParser = ({ newValue, oldValue: _ }) => {
34
- return newValue;
35
- };
103
+ this.valueParser = defaultValueParser;
36
104
  this.onValueChange = (value) => {
37
105
  this.value = this.valueParser
38
106
  ? this.valueParser(Object.assign(Object.assign({}, this.params), { oldValue: this.params.value, newValue: value }))
@@ -40,7 +108,7 @@ class AdaptableNumberEditor {
40
108
  };
41
109
  }
42
110
  init(params) {
43
- this.value = this.getStartValue(params);
111
+ this.value = getStartValue(params);
44
112
  this.params = params;
45
113
  this.columnId = params.column.getColId();
46
114
  const { valueParser } = params.column.getColDef();
@@ -48,11 +116,10 @@ class AdaptableNumberEditor {
48
116
  this.valueParser = valueParser;
49
117
  }
50
118
  this.el = document.createElement('div');
51
- this.el.style.position = 'absolute';
52
- this.el.style.top = '0px';
53
- this.el.style.left = '0px';
54
- this.el.style.right = '0px';
55
- this.el.style.bottom = '0px';
119
+ Object.keys(style).forEach((key) => {
120
+ //@ts-ignore
121
+ this.el.style[key] = style[key];
122
+ });
56
123
  }
57
124
  /* Component Editor Lifecycle methods */
58
125
  // gets called once when grid ready to insert the element
@@ -77,7 +144,7 @@ class AdaptableNumberEditor {
77
144
  this.editor = editor;
78
145
  editor === null || editor === void 0 ? void 0 : editor.focus();
79
146
  } }));
80
- (0, react_dom_1.render)((0, renderWithAdaptableContext_1.renderWithAdaptableContext)(editorElement, adaptable), this.el);
147
+ this.unmountReactRoot = adaptable.renderReactRoot((0, renderWithAdaptableContext_1.renderWithAdaptableContext)(editorElement, adaptable), this.el);
81
148
  this.getGui().addEventListener('keydown', (keyDownEvent) => {
82
149
  adaptable._emit('CellEditorKeyDown', {
83
150
  keyDownEvent,
@@ -90,24 +157,8 @@ class AdaptableNumberEditor {
90
157
  });
91
158
  }
92
159
  destroy() {
93
- (0, react_dom_1.unmountComponentAtNode)(this.el);
94
- }
95
- getStartValue(params) {
96
- if (this.shouldClearExistingValue(params)) {
97
- return '';
98
- }
99
- if (params.charPress && this.isValidChar(params.charPress)) {
100
- return params.charPress;
101
- }
102
- return params.value;
103
- }
104
- shouldClearExistingValue(params) {
105
- return params.eventKey === core_1.KeyCode.BACKSPACE || params.eventKey === core_1.KeyCode.DELETE;
106
- }
107
- isValidChar(char) {
108
- // allow only digits
109
- return ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'].includes(char);
110
- // we do NOT allow key shortcuts for starting non-digits (minus sign, decimal separators) as the input[number] handling is very buggy and we would open a can of worms
160
+ var _a;
161
+ (_a = this.unmountReactRoot) === null || _a === void 0 ? void 0 : _a.call(this);
111
162
  }
112
163
  }
113
164
  exports.AdaptableNumberEditor = AdaptableNumberEditor;
@@ -79,22 +79,30 @@ const cellSummaryWeightedAverage = ({ numericColumns, selectedCellInfo, adaptabl
79
79
  sumPrimaryValues += weightedGridCell.rawValue * gridCell.normalisedValue;
80
80
  }
81
81
  });
82
- if (isValid) {
83
- const formatColumn = adaptableApi.formatColumnApi.getFormatColumnForColumnId(columnId);
84
- if (formatColumn && formatColumn.DisplayFormat) {
85
- const options = formatColumn.DisplayFormat
86
- .Options;
87
- if (options) {
88
- return FormatHelper_1.default.NumberFormatter(sumPrimaryValues / sumWeightedValue, options);
89
- }
82
+ if (!isValid) {
83
+ return '';
84
+ }
85
+ const abColumn = adaptableApi.columnApi.getColumnFromId(columnId);
86
+ if (!abColumn) {
87
+ return '';
88
+ }
89
+ const activeFormatColumnsWithDisplayFormat = adaptableApi.formatColumnApi.getFormatColumnsWithDisplayFormatForColumn(abColumn);
90
+ if (activeFormatColumnsWithDisplayFormat.length === 1 &&
91
+ activeFormatColumnsWithDisplayFormat[0].DisplayFormat.Formatter === 'NumberFormatter') {
92
+ // there only one FormatColumn on this column, so we will use it to format the aggregated value
93
+ const [singleActiveFormatColumnsWithDisplayFormat] = activeFormatColumnsWithDisplayFormat;
94
+ const options = singleActiveFormatColumnsWithDisplayFormat
95
+ .DisplayFormat.Options;
96
+ if (options) {
97
+ return FormatHelper_1.default.NumberFormatter(sumPrimaryValues / sumWeightedValue, options);
90
98
  }
99
+ }
100
+ else {
101
+ // there are multiple (possibly conflicting) FormatColumns for this column, we cannot know which to use
91
102
  return FormatHelper_1.default.NumberFormatter(sumPrimaryValues / sumWeightedValue, {
92
103
  FractionDigits: 2,
93
104
  });
94
105
  }
95
- else {
96
- return '';
97
- }
98
106
  }
99
107
  };
100
108
  exports.cellSummaryWeightedAverage = cellSummaryWeightedAverage;
@@ -31,7 +31,12 @@ const CheckBox = (_a) => {
31
31
  ? 'unchecked'
32
32
  : 'indeterminate';
33
33
  const gap = React.createElement("div", { style: { marginLeft: gapDistance, display: 'inline-block' } });
34
- children = children ? React.createElement("div", { style: { display: 'inline-block' } }, children) : null;
34
+ children = children ? (React.createElement("div", { style: {
35
+ display: 'inline-block',
36
+ whiteSpace: 'nowrap',
37
+ overflow: 'hidden',
38
+ textOverflow: 'ellipsis',
39
+ } }, children)) : null;
35
40
  const before = childrenPosition === 'start' ? children : null;
36
41
  const beforeGap = childrenPosition === 'start' && children ? gap : null;
37
42
  const after = childrenPosition === 'end' ? children : null;
@@ -46,7 +51,7 @@ const CheckBox = (_a) => {
46
51
  opacity: 0,
47
52
  cursor: 'pointer',
48
53
  }, onChange: onInputChange }));
49
- return (React.createElement(rebass_1.Box, Object.assign({ my: 2 }, props, { className: (0, join_1.default)('ab-CheckBox', `ab-CheckBox--${type}`, `ab-CheckBox--variant-${variant}`, disabled ? 'ab-CheckBox--disabled' : '', readOnly ? 'ab-CheckBox--readonly' : '', props.className), style: Object.assign({ display: 'inline-flex', flexFlow: 'row', alignItems: 'center', cursor: 'pointer', position: 'relative' }, props.style), as: as }),
54
+ return (React.createElement(rebass_1.Box, Object.assign({ my: 2 }, props, { className: (0, join_1.default)('ab-CheckBox', `ab-CheckBox--${type}`, `ab-CheckBox--variant-${variant}`, disabled ? 'ab-CheckBox--disabled' : '', readOnly ? 'ab-CheckBox--readonly' : '', props.className), style: props.style, as: as }),
50
55
  before,
51
56
  beforeGap,
52
57
  input,
@@ -15,4 +15,4 @@ export declare type DatepickerProps = Omit<BoxProps, 'value' | 'onChange' | 'def
15
15
  showWeekNumber?: boolean;
16
16
  showOutsideDays?: boolean;
17
17
  };
18
- export declare const Datepicker: React.ForwardRefExoticComponent<Pick<DatepickerProps, "max" | "required" | "type" | "data" | "default" | "high" | "low" | "key" | "id" | "media" | "height" | "width" | "start" | "open" | "name" | "alignContent" | "alignItems" | "alignSelf" | "backgroundColor" | "color" | "content" | "display" | "flex" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "justifyContent" | "justifyItems" | "justifySelf" | "letterSpacing" | "lineHeight" | "margin" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "opacity" | "order" | "overflow" | "overflowX" | "overflowY" | "padding" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "textAlign" | "translate" | "verticalAlign" | "value" | "hidden" | "cite" | "dir" | "form" | "label" | "p" | "slot" | "span" | "style" | "summary" | "title" | "pattern" | "acceptCharset" | "action" | "method" | "noValidate" | "target" | "accessKey" | "draggable" | "lang" | "className" | "prefix" | "children" | "contentEditable" | "inputMode" | "nonce" | "tabIndex" | "async" | "disabled" | "multiple" | "size" | "manifest" | "m" | "wrap" | "accept" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | "autoComplete" | "autoFocus" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "crossOrigin" | "dateTime" | "defer" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "list" | "loop" | "marginHeight" | "marginWidth" | "maxLength" | "mediaGroup" | "min" | "minLength" | "muted" | "optimum" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "contextMenu" | "placeholder" | "spellCheck" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "sizes" | "src" | "srcDoc" | "srcLang" | "srcSet" | "step" | "useMap" | "wmode" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "bg" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "css" | "variant" | "tx" | "sx" | "showClearButton" | "onHide" | "showOutsideDays" | "showWeekNumber" | "datepickerButtons" | "dateProps"> & React.RefAttributes<HTMLInputElement>>;
18
+ export declare const Datepicker: React.ForwardRefExoticComponent<Pick<DatepickerProps, "max" | "required" | "type" | "data" | "default" | "high" | "low" | "key" | "id" | "media" | "height" | "width" | "start" | "open" | "name" | "alignContent" | "alignItems" | "alignSelf" | "backgroundColor" | "color" | "content" | "display" | "flex" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "justifyContent" | "justifyItems" | "justifySelf" | "letterSpacing" | "lineHeight" | "margin" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "opacity" | "order" | "overflow" | "overflowX" | "overflowY" | "padding" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "textAlign" | "translate" | "verticalAlign" | "value" | "hidden" | "cite" | "dir" | "form" | "label" | "p" | "slot" | "span" | "style" | "summary" | "title" | "pattern" | "acceptCharset" | "action" | "method" | "noValidate" | "target" | "accessKey" | "draggable" | "lang" | "className" | "prefix" | "children" | "contentEditable" | "inputMode" | "nonce" | "tabIndex" | "async" | "disabled" | "multiple" | "size" | "manifest" | "m" | "wrap" | "accept" | "allowFullScreen" | "allowTransparency" | "alt" | "as" | "autoComplete" | "autoFocus" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "crossOrigin" | "dateTime" | "defer" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "list" | "loop" | "marginHeight" | "marginWidth" | "maxLength" | "mediaGroup" | "min" | "minLength" | "muted" | "optimum" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "contextMenu" | "placeholder" | "spellCheck" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "playsInline" | "poster" | "preload" | "readOnly" | "rel" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "sizes" | "src" | "srcDoc" | "srcLang" | "srcSet" | "step" | "useMap" | "wmode" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "bg" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "css" | "variant" | "tx" | "sx" | "showOutsideDays" | "showWeekNumber" | "onHide" | "showClearButton" | "datepickerButtons" | "dateProps"> & React.RefAttributes<HTMLInputElement>>;
@@ -7,7 +7,7 @@ interface BaseEditorInputProps {
7
7
  onChange: (value: string) => void;
8
8
  disabled?: boolean;
9
9
  onSelectedFunctionChange: (expressionFunction: ExpressionFunction | null) => void;
10
- expressionFunctions: ExpressionFunctionMap;
10
+ expressionFunctions: ExpressionFunctionMap<string>;
11
11
  editorButtons: OperatorEditorButton[];
12
12
  testData: any;
13
13
  placeholder?: string;
@@ -19,6 +19,7 @@ const DocumentationLinkConstants_1 = require("../../Utilities/Constants/Document
19
19
  const LoggingHelper_1 = require("../../Utilities/Helpers/LoggingHelper");
20
20
  const icons_1 = require("../icons");
21
21
  const AdaptableContext_1 = require("../../View/AdaptableContext");
22
+ const join_1 = tslib_1.__importDefault(require("../utils/join"));
22
23
  const VarEditorButton = () => {
23
24
  var _a, _b;
24
25
  const adaptable = (0, AdaptableContext_1.useAdaptable)();
@@ -39,6 +40,7 @@ function BaseEditorInput(props) {
39
40
  let evaluationError;
40
41
  let expressionError;
41
42
  let selectedFunctionName;
43
+ const baseClassName = 'ab-ExpressionEditorInput';
42
44
  const buildParserExceptionMessage = (e) => {
43
45
  const parserExceptionSummary = 'Invalid expression is not parsable';
44
46
  if (!e.message) {
@@ -101,55 +103,34 @@ function BaseEditorInput(props) {
101
103
  props.onSelectedFunctionChange(selectedFunctionName ? expressionFunctions[selectedFunctionName] : null);
102
104
  }
103
105
  }, [selectedFunctionName]);
104
- const functionsDropdown = (React.createElement(OverlayTrigger_1.default, { render: () => (React.createElement(rebass_1.Flex, { "data-name": "expression-dropdown-list", flexDirection: "column", p: 2, style: {
105
- fontSize: 'var(--ab-font-size-2)',
106
- border: '1px solid var(--ab-color-primarydark)',
107
- borderRadius: 'var(--ab__border-radius)',
108
- background: 'var(--ab-color-primarylight)',
109
- zIndex: 1000,
110
- maxHeight: 300,
111
- overflow: 'auto',
112
- } }, Object.keys(expressionFunctions)
106
+ const functionsDropdown = (React.createElement(OverlayTrigger_1.default, { render: () => (React.createElement(rebass_1.Flex, { className: `${baseClassName}__dropdown-functions-list`, "data-name": "expression-dropdown-fuctions-list", flexDirection: "column", p: 2 }, Object.keys(expressionFunctions)
113
107
  .filter((functionName) => !expressionFunctions[functionName].isHiddenFromMenu)
114
108
  .map((functionName) => functionName === 'VAR' ? (React.createElement(VarEditorButton, { key: functionName })) : (React.createElement(EditorButton_1.default, { data: `${functionName}()`, key: functionName, mr: 1 }, functionName))))), showEvent: "focus", hideEvent: "blur" },
115
109
  React.createElement(SimpleButton_1.default, { "data-name": "expression-dropdown", icon: "arrow-down", iconPosition: 'end', mr: 1 },
116
- React.createElement(rebass_1.Flex, { marginRight: 1, style: { fontSize: 'var(--ab-font-size-2)' } },
117
- React.createElement(icons_1.Icon, { name: 'equation', style: { marginTop: 0 } })))));
110
+ React.createElement(rebass_1.Flex, { marginRight: 1, fontSize: 2 },
111
+ React.createElement(icons_1.Icon, { name: "equation" })))));
118
112
  const operatorButtons = props.editorButtons
119
113
  .filter((editorButtonDef) => !!expressionFunctions[editorButtonDef.functionName])
120
114
  .map((editorButtonDef) => (React.createElement(EditorButton_1.default, { key: `${editorButtonDef.functionName}-operator`, data: editorButtonDef.data, icon: editorButtonDef.icon }, !editorButtonDef.icon && (editorButtonDef.text || editorButtonDef.functionName))));
121
115
  const showDocumentationLink = props.api.internalApi.isDocumentationLinksDisplayed();
122
116
  return (React.createElement(React.Fragment, null,
123
- React.createElement(rebass_1.Flex, { "data-name": "expression-toolbar", py: 2, mb: 2, flexWrap: "wrap", style: {
124
- background: 'var(--ab-color-primarylight)',
125
- borderRadius: 'var(--ab__border-radius)',
126
- '--ab-overlay-horizontal-align': 'left',
127
- width: '100%',
128
- marginTop: 5,
129
- } },
117
+ React.createElement(rebass_1.Flex, { className: baseClassName, "data-name": "expression-toolbar", py: 2, mb: 2, mt: 2, flexWrap: "wrap" },
130
118
  React.createElement(rebass_1.Flex, { style: { flex: 1, marginLeft: 5 }, flexWrap: "wrap" },
131
119
  functionsDropdown,
132
120
  operatorButtons),
133
121
  showDocumentationLink && (React.createElement(rebass_1.Flex, { alignItems: "flex-start" },
134
- React.createElement(ButtonInfo_1.ButtonInfo, { style: {
135
- color: 'var(--ab-color-text-on-add)',
136
- fill: 'var(--ab-color-text-on-add)',
137
- background: 'var(--ab-color-action-add)',
138
- marginRight: 5,
139
- }, tooltip: 'Learn how to use the Expression Editor', onClick: () => window.open(DocumentationLinkConstants_1.ExpressionEditorDocsLink, '_blank') })))),
140
- React.createElement(Textarea_1.default, { "data-name": `expression-input-${type}`, ref: textAreaRefCallback, value: props.value || '', placeholder: props.placeholder || 'Create Query', disabled: props.disabled || false, className: "ab-ExpressionEditor__textarea", autoFocus: true, spellCheck: "false", onChange: (event) => {
122
+ React.createElement(ButtonInfo_1.ButtonInfo, { mr: 2, tooltip: 'Learn how to use the Expression Editor', onClick: () => window.open(DocumentationLinkConstants_1.ExpressionEditorDocsLink, '_blank') })))),
123
+ React.createElement(Textarea_1.default, { "data-name": `expression-input-${type}`, ref: textAreaRefCallback, value: props.value || '', placeholder: props.placeholder || 'Create Query', disabled: props.disabled || false, className: (0, join_1.default)('ab-ExpressionEditor__textarea', // left for backwards compatibility
124
+ `${baseClassName}__textarea`), autoFocus: true, spellCheck: "false", onChange: (event) => {
141
125
  props.onChange(event.target.value);
142
- }, style: Object.assign({ width: '100%', minHeight: 100, fontFamily: 'monospace', resize: 'vertical', fontSize: '1rem', padding: 'var(--ab-space-2)' }, style) }),
143
- props.isFullExpression !== true && (React.createElement(HelpBlock_1.default, { mt: 2, mb: 2, p: 2, style: { fontSize: 'var(--ab-font-size-3)' } },
126
+ }, style: style }),
127
+ props.isFullExpression !== true && (React.createElement(HelpBlock_1.default, { mt: 2, mb: 2, p: 2, fontSize: 3 },
144
128
  "This Query must resolve to a ",
145
129
  React.createElement("b", null, "boolean "),
146
130
  "(i.e. true / false) value")),
147
- expressionError && (React.createElement(ErrorBox_1.default, { style: { whiteSpace: 'pre-wrap' }, mt: 2 }, expressionError)),
131
+ expressionError && (React.createElement(ErrorBox_1.default, { width: "100%", style: { whiteSpace: 'pre-wrap' }, mt: 2 }, expressionError)),
148
132
  evaluationError && (React.createElement(ErrorBox_1.default, { style: { whiteSpace: 'pre-wrap' }, mt: 2 }, `${evaluationError.expressionFnName} ${evaluationError.message}`)),
149
- !props.hideResultPreview && result !== undefined && (React.createElement(rebass_1.Box, { "data-name": "expression-editor-feedback", mt: 2, p: 2, style: {
150
- background: 'var(--ab-color-primarylight)',
151
- borderRadius: 'var(--ab__border-radius)',
152
- } },
133
+ !props.hideResultPreview && result !== undefined && (React.createElement(rebass_1.Box, { className: `${baseClassName}__editor-feedback`, "data-name": "expression-editor-feedback", mt: 2, p: 2 },
153
134
  React.createElement("pre", { style: { whiteSpace: 'pre-wrap', margin: 0 } },
154
135
  "Result (using Test Data): ",
155
136
  React.createElement("b", null, JSON.stringify(result)))))));
@@ -13,7 +13,7 @@ const editorButtonsCumulativeAggregatedScalar_1 = require("./editorButtonsCumula
13
13
  function EditorInput(props) {
14
14
  const moduleExpressionFunctions = props.api.internalApi
15
15
  .getQueryLanguageService()
16
- .getModuleExpressionFunctions(props.module);
16
+ .getModuleExpressionFunctionsMap(props.module);
17
17
  const getFilteredAggregatedExpressionFunctions = (availableAggregatedExpressionFunctions, type) => {
18
18
  const sourceExpressionFunctions = type === 'aggregatedScalar'
19
19
  ? aggregatedScalarExpressionFunctions_1.aggregatedExpressionFunctions
@@ -15,7 +15,7 @@ const editorButtonsAggregatedBoolean_1 = require("./editorButtonsAggregatedBoole
15
15
  function EditorInputWithWhereClause(props) {
16
16
  const moduleExpressionFunctions = props.api.internalApi
17
17
  .getQueryLanguageService()
18
- .getModuleExpressionFunctions(props.module);
18
+ .getModuleExpressionFunctionsMap(props.module);
19
19
  const reactiveExpressionFns = props.type === 'observable'
20
20
  ? moduleExpressionFunctions.observableFunctions
21
21
  : moduleExpressionFunctions.aggregatedBooleanFunctions;