@adaptabletools/adaptable-cjs 17.0.0-canary.4 → 18.0.0-canary.1

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 (288) hide show
  1. package/base.css +62 -14
  2. package/base.css.map +1 -1
  3. package/index.css +267 -165
  4. package/index.css.map +1 -1
  5. package/package.json +5 -4
  6. package/src/AdaptableInterfaces/IAdaptable.d.ts +3 -0
  7. package/src/AdaptableOptions/AdaptableOptions.d.ts +5 -0
  8. package/src/AdaptableOptions/AlertOptions.d.ts +7 -7
  9. package/src/AdaptableOptions/ColumnFilterOptions.d.ts +9 -9
  10. package/src/AdaptableOptions/CommentsOptions.d.ts +28 -0
  11. package/src/AdaptableOptions/EditOptions.d.ts +6 -6
  12. package/src/AdaptableOptions/GridFilterOptions.d.ts +13 -8
  13. package/src/AdaptableOptions/GroupingOptions.d.ts +9 -9
  14. package/src/AdaptableOptions/InteropioPluginOptions.d.ts +10 -0
  15. package/src/AdaptableOptions/MenuOptions.d.ts +18 -4
  16. package/src/AdaptableOptions/MenuOptions.js +14 -6
  17. package/src/AdaptableOptions/NotesOptions.d.ts +2 -9
  18. package/src/Api/AdaptableApi.d.ts +6 -1
  19. package/src/Api/CommentApi.d.ts +58 -0
  20. package/src/Api/EventApi.d.ts +48 -12
  21. package/src/Api/Events/CalculatedColumnChanged.d.ts +19 -0
  22. package/src/Api/Events/CellSelectionChanged.d.ts +11 -0
  23. package/src/Api/Events/CommentsChangedInfo.d.ts +5 -0
  24. package/src/Api/Events/LiveDataChanged.d.ts +3 -3
  25. package/src/Api/Events/RowSelectionChanged.d.ts +11 -0
  26. package/src/Api/GridApi.d.ts +0 -6
  27. package/src/Api/GridFilterApi.d.ts +2 -2
  28. package/src/Api/Implementation/AdaptableApiImpl.d.ts +6 -6
  29. package/src/Api/Implementation/AdaptableApiImpl.js +2 -0
  30. package/src/Api/Implementation/CommentsApiImpl.d.ts +15 -0
  31. package/src/Api/Implementation/CommentsApiImpl.js +46 -0
  32. package/src/Api/Implementation/ExpressionApiImpl.d.ts +1 -1
  33. package/src/Api/Implementation/ExpressionApiImpl.js +3 -4
  34. package/src/Api/Implementation/GridApiImpl.d.ts +0 -1
  35. package/src/Api/Implementation/GridApiImpl.js +0 -4
  36. package/src/Api/Implementation/GridFilterApiImpl.d.ts +1 -1
  37. package/src/Api/Implementation/GridFilterApiImpl.js +1 -1
  38. package/src/Api/Implementation/NotesApiImpl.d.ts +3 -7
  39. package/src/Api/Implementation/NotesApiImpl.js +1 -15
  40. package/src/Api/Implementation/OptionsApiImpl.d.ts +2 -0
  41. package/src/Api/Implementation/OptionsApiImpl.js +3 -0
  42. package/src/Api/Implementation/PluginsApiImpl.d.ts +2 -6
  43. package/src/Api/Implementation/PluginsApiImpl.js +3 -15
  44. package/src/Api/Implementation/ScheduleApiImpl.d.ts +1 -12
  45. package/src/Api/Implementation/ScheduleApiImpl.js +0 -36
  46. package/src/Api/Implementation/ThemeApiImpl.d.ts +1 -0
  47. package/src/Api/Implementation/ThemeApiImpl.js +3 -0
  48. package/src/Api/Internal/ActionRowInternalApi.js +1 -1
  49. package/src/Api/Internal/AdaptableInternalApi.d.ts +2 -0
  50. package/src/Api/Internal/AdaptableInternalApi.js +3 -0
  51. package/src/Api/Internal/CalculatedColumnInternalApi.d.ts +2 -0
  52. package/src/Api/Internal/CalculatedColumnInternalApi.js +16 -0
  53. package/src/Api/Internal/DashboardInternalApi.d.ts +1 -0
  54. package/src/Api/Internal/DashboardInternalApi.js +5 -0
  55. package/src/Api/Internal/DataImportInternalApi.js +2 -0
  56. package/src/Api/Internal/DataSetInternalApi.js +2 -1
  57. package/src/Api/Internal/GridInternalApi.d.ts +3 -1
  58. package/src/Api/Internal/GridInternalApi.js +32 -9
  59. package/src/Api/Internal/LayoutInternalApi.d.ts +2 -2
  60. package/src/Api/Internal/LayoutInternalApi.js +11 -11
  61. package/src/Api/InteropioPluginApi.d.ts +10 -0
  62. package/src/Api/{NotesAPi.d.ts → NotesApi.d.ts} +19 -21
  63. package/src/Api/OptionsApi.d.ts +5 -0
  64. package/src/Api/PluginsApi.d.ts +3 -13
  65. package/src/Api/ScheduleApi.d.ts +1 -48
  66. package/src/Api/ThemeApi.d.ts +5 -0
  67. package/src/PredefinedConfig/AdaptableState.d.ts +4 -2
  68. package/src/PredefinedConfig/CellAddress.d.ts +13 -0
  69. package/src/PredefinedConfig/CellAddress.js +5 -0
  70. package/src/PredefinedConfig/CommentState.d.ts +48 -0
  71. package/src/PredefinedConfig/CommentState.js +2 -0
  72. package/src/PredefinedConfig/Common/AdaptableIcon.d.ts +1 -1
  73. package/src/PredefinedConfig/Common/AdaptablePredicate.js +2 -1
  74. package/src/PredefinedConfig/Common/Enums.d.ts +0 -1
  75. package/src/PredefinedConfig/Common/Enums.js +0 -1
  76. package/src/PredefinedConfig/Common/Schedule.d.ts +1 -1
  77. package/src/PredefinedConfig/Common/Types.d.ts +5 -5
  78. package/src/PredefinedConfig/Common/Types.js +0 -2
  79. package/src/PredefinedConfig/NotesState.d.ts +0 -13
  80. package/src/PredefinedConfig/PredefinedConfig.d.ts +3 -0
  81. package/src/PredefinedConfig/ScheduleState.d.ts +0 -5
  82. package/src/PredefinedConfig/SystemState.d.ts +5 -6
  83. package/src/PredefinedConfig/ThemeState.d.ts +1 -1
  84. package/src/Redux/ActionsReducers/CommentsRedux.d.ts +79 -0
  85. package/src/Redux/ActionsReducers/CommentsRedux.js +189 -0
  86. package/src/Redux/ActionsReducers/NotesRedux.d.ts +1 -1
  87. package/src/Redux/ActionsReducers/NotesRedux.js +4 -5
  88. package/src/Redux/ActionsReducers/PluginsRedux.d.ts +0 -48
  89. package/src/Redux/ActionsReducers/PluginsRedux.js +1 -49
  90. package/src/Redux/ActionsReducers/PlusMinusRedux.d.ts +16 -0
  91. package/src/Redux/ActionsReducers/PlusMinusRedux.js +47 -1
  92. package/src/Redux/ActionsReducers/ScheduleRedux.d.ts +0 -53
  93. package/src/Redux/ActionsReducers/ScheduleRedux.js +2 -90
  94. package/src/Redux/ActionsReducers/SystemRedux.d.ts +23 -12
  95. package/src/Redux/ActionsReducers/SystemRedux.js +55 -23
  96. package/src/Redux/Store/AdaptableStore.d.ts +2 -2
  97. package/src/Redux/Store/AdaptableStore.js +107 -46
  98. package/src/Strategy/CommentsModule.d.ts +16 -0
  99. package/src/Strategy/CommentsModule.js +82 -0
  100. package/src/Strategy/LayoutModule.d.ts +12 -4
  101. package/src/Strategy/LayoutModule.js +19 -14
  102. package/src/Strategy/NotesModule.d.ts +0 -13
  103. package/src/Strategy/NotesModule.js +9 -88
  104. package/src/Strategy/PlusMinusModule.js +2 -0
  105. package/src/Strategy/ScheduleModule.js +0 -23
  106. package/src/Strategy/Utilities/Export/getExportRowsViewItems.d.ts +2 -1
  107. package/src/Strategy/Utilities/Export/getExportRowsViewItems.js +14 -5
  108. package/src/Strategy/Utilities/getExpressionViewItems.js +8 -2
  109. package/src/Utilities/Constants/ConfigConstants.d.ts +1 -0
  110. package/src/Utilities/Constants/ConfigConstants.js +2 -1
  111. package/src/Utilities/Constants/GeneralConstants.d.ts +1 -0
  112. package/src/Utilities/Constants/GeneralConstants.js +8 -3
  113. package/src/Utilities/Constants/ModuleConstants.d.ts +3 -3
  114. package/src/Utilities/Constants/ModuleConstants.js +4 -4
  115. package/src/Utilities/Defaults/DefaultAdaptableOptions.js +3 -3
  116. package/src/Utilities/Defaults/DefaultSettingsPanel.js +1 -0
  117. package/src/Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions.js +7 -1
  118. package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.js +6 -0
  119. package/src/Utilities/ExpressionFunctions/dateUtils.d.ts +1 -0
  120. package/src/Utilities/ExpressionFunctions/dateUtils.js +18 -1
  121. package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.d.ts +1 -1
  122. package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +12 -12
  123. package/src/Utilities/Extensions/ArrayExtensions.d.ts +2 -0
  124. package/src/Utilities/Extensions/ArrayExtensions.js +8 -1
  125. package/src/Utilities/Helpers/PreviewHelper.js +5 -2
  126. package/src/Utilities/ObjectFactory.d.ts +19 -22
  127. package/src/Utilities/ObjectFactory.js +51 -60
  128. package/src/Utilities/Services/CellPopupService.d.ts +23 -0
  129. package/src/Utilities/Services/CellPopupService.js +138 -0
  130. package/src/Utilities/Services/Interface/IReportService.d.ts +1 -1
  131. package/src/Utilities/Services/Interface/IThemeService.d.ts +8 -0
  132. package/src/Utilities/Services/ModuleService.js +1 -3
  133. package/src/Utilities/Services/ReportService.d.ts +1 -1
  134. package/src/Utilities/Services/ThemeService.d.ts +3 -0
  135. package/src/Utilities/Services/ThemeService.js +33 -1
  136. package/src/Utilities/Services/ValidationService.js +11 -11
  137. package/src/View/AdaptableView.js +3 -3
  138. package/src/View/AdaptableViewFactory.js +4 -2
  139. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ColumnsList.js +2 -2
  140. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/EntitlementsForm.js +1 -1
  141. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/FinanceForm/FinanceForm.js +1 -1
  142. package/src/View/Alert/Wizard/AlertButtonsEditor.js +2 -2
  143. package/src/View/Alert/Wizard/AlertRulesWizardSection.d.ts +1 -1
  144. package/src/View/Alert/Wizard/AlertRulesWizardSection.js +4 -3
  145. package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.js +1 -1
  146. package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.js +1 -1
  147. package/src/View/Charting/useChartingElements.js +8 -3
  148. package/src/View/Comments/CommentsEditor.d.ts +7 -0
  149. package/src/View/Comments/CommentsEditor.js +100 -0
  150. package/src/View/Comments/CommentsPopup.d.ts +2 -0
  151. package/src/View/Comments/CommentsPopup.js +87 -0
  152. package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +2 -1
  153. package/src/View/Components/CellPopup/index.js +1 -1
  154. package/src/View/Components/FilterForm/FilterForm.js +8 -2
  155. package/src/View/Components/FilterForm/ListBoxFilterForm.js +1 -3
  156. package/src/View/Components/FilterForm/QuickFilterForm.js +5 -4
  157. package/src/View/Components/FilterForm/QuickFilterValues.d.ts +2 -2
  158. package/src/View/Components/FilterForm/QuickFilterValues.js +4 -3
  159. package/src/View/Components/Popups/GridCellPopup/GridCellPopup.d.ts +5 -0
  160. package/src/View/Components/Popups/GridCellPopup/GridCellPopup.js +67 -0
  161. package/src/View/Components/Popups/GridCellPopup/index.d.ts +1 -0
  162. package/src/View/Components/Popups/GridCellPopup/index.js +5 -0
  163. package/src/View/Components/Selectors/ColumnSelector.d.ts +1 -0
  164. package/src/View/Components/Selectors/ColumnSelector.js +2 -1
  165. package/src/View/Components/Selectors/PermittedValuesSelector.d.ts +5 -4
  166. package/src/View/Components/Selectors/PermittedValuesSelector.js +25 -3
  167. package/src/View/Components/ToolPanel/ToolPanelWrapper.js +1 -4
  168. package/src/View/Dashboard/ModuleToolbarWrapper.js +1 -1
  169. package/src/View/Dashboard/PinnedDashboard.js +2 -1
  170. package/src/View/DataImport/DataImportWizard/sections/DataPreview.js +2 -2
  171. package/src/View/Export/Wizard/ReportRowsWizardSection.js +3 -1
  172. package/src/View/GridFilter/GridFilterExpressionEditor.js +1 -1
  173. package/src/View/GridFilter/GridFilterPopup.js +10 -8
  174. package/src/View/GridFilter/GridFilterViewPanel.js +51 -14
  175. package/src/View/GridFilter/NamedQuerySelector.js +1 -1
  176. package/src/View/GridFilter/useGridFilterExpressionEditor.d.ts +3 -0
  177. package/src/View/GridFilter/useGridFilterExpressionEditor.js +17 -6
  178. package/src/View/GridFilter/useGridFilterOptionsForExpressionEditor.js +5 -23
  179. package/src/View/GridInfo/GridInfoPopup/GridInfoPopup.js +3 -2
  180. package/src/View/Layout/Wizard/getGridFilterPreview.d.ts +6 -0
  181. package/src/View/Layout/Wizard/getGridFilterPreview.js +16 -0
  182. package/src/View/Layout/Wizard/sections/FilterSection.js +1 -1
  183. package/src/View/Layout/Wizard/sections/GridFilterSection.js +4 -4
  184. package/src/View/NamedQuery/EditCurrentQueryButton.js +1 -1
  185. package/src/View/NamedQuery/Wizard/NamedQueryExpressionWizardSection.js +1 -1
  186. package/src/View/Notes/NoteEditor.d.ts +8 -0
  187. package/src/View/Notes/NoteEditor.js +33 -0
  188. package/src/View/Notes/NotesPopup.d.ts +2 -2
  189. package/src/View/Notes/NotesPopup.js +78 -55
  190. package/src/View/PlusMinus/MovePlusMinus.d.ts +7 -0
  191. package/src/View/PlusMinus/MovePlusMinus.js +27 -0
  192. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsSummary.js +0 -9
  193. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsWizard.js +0 -4
  194. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/isSettingsValid.js +2 -8
  195. package/src/View/Schedule/Wizard/ScheduleWizard.js +0 -8
  196. package/src/View/StyledColumn/Wizard/StyledColumnBadgeSection.js +3 -1
  197. package/src/View/StyledColumn/Wizard/StyledColumnWizard.js +1 -2
  198. package/src/agGrid/Adaptable.d.ts +7 -0
  199. package/src/agGrid/Adaptable.js +49 -35
  200. package/src/agGrid/BadgeRenderer.js +9 -5
  201. package/src/agGrid/agGridHelper.d.ts +2 -1
  202. package/src/agGrid/agGridHelper.js +15 -3
  203. package/src/agGrid/agGridMenuHelper.d.ts +2 -0
  204. package/src/agGrid/agGridMenuHelper.js +73 -25
  205. package/src/components/Datepicker/index.js +4 -4
  206. package/src/components/ExpressionEditor/ExpressionPreview.d.ts +7 -0
  207. package/src/components/ExpressionEditor/ExpressionPreview.js +25 -0
  208. package/src/components/ExpressionEditor/QueryBuilder/QueryBuilder.js +2 -2
  209. package/src/components/ExpressionEditor/QueryBuilder/QueryBuilderInputs.d.ts +6 -0
  210. package/src/components/ExpressionEditor/QueryBuilder/QueryBuilderInputs.js +40 -11
  211. package/src/components/ExpressionEditor/QueryBuilder/QueryPredicateBuilder.js +14 -2
  212. package/src/components/ExpressionEditor/QueryBuilder/booleanExpressions.js +1 -0
  213. package/src/components/ExpressionEditor/QueryBuilder/utils.js +1 -1
  214. package/src/components/ExpressionEditor/index.js +4 -7
  215. package/src/components/InputGroup/InputGroup.d.ts +7 -0
  216. package/src/components/InputGroup/InputGroup.js +12 -0
  217. package/src/components/InputGroup/index.d.ts +1 -0
  218. package/src/components/InputGroup/index.js +4 -0
  219. package/src/components/OverlayTrigger/index.js +7 -2
  220. package/src/components/Select/Select.d.ts +1 -2
  221. package/src/components/Select/Select.js +63 -23
  222. package/src/components/Textarea/index.d.ts +9 -0
  223. package/src/components/Textarea/index.js +50 -2
  224. package/src/components/Toastify/index.d.ts +2 -2
  225. package/src/components/Toastify/index.js +1 -1
  226. package/src/components/icons/comments.d.ts +3 -0
  227. package/src/components/icons/comments.js +7 -0
  228. package/src/components/icons/index.js +3 -1
  229. package/src/env.d.ts +3 -1
  230. package/src/env.js +3 -1
  231. package/src/metamodel/adaptable.metamodel.d.ts +72 -158
  232. package/src/metamodel/adaptable.metamodel.js +138 -260
  233. package/src/parser/src/parser.d.ts +2 -0
  234. package/src/parser/src/parser.js +1880 -705
  235. package/src/parser/src/predicate/mapQlPredicateToExpression.js +5 -2
  236. package/src/parser/src/predicate/types.d.ts +1 -1
  237. package/src/parser/src/types.d.ts +1 -1
  238. package/src/renderReactRoot.js +15 -0
  239. package/src/themes/index.js +4 -0
  240. package/src/types.d.ts +10 -13
  241. package/themes/dark.css +3 -3
  242. package/tsconfig.cjs.tsbuildinfo +1 -1
  243. package/src/AdaptableOptions/FinsemblePluginOptions.d.ts +0 -35
  244. package/src/AdaptableOptions/Glue42PluginOptions.d.ts +0 -25
  245. package/src/AdaptableOptions/Glue42WebPluginOptions.d.ts +0 -10
  246. package/src/Api/Events/SelectionChanged.d.ts +0 -16
  247. package/src/Api/FinsembleApi.d.ts +0 -10
  248. package/src/Api/Glue42Api.d.ts +0 -75
  249. package/src/Api/Glue42WebApi.d.ts +0 -10
  250. package/src/PredefinedConfig/Glue42State.d.ts +0 -46
  251. package/src/View/Notes/NotesListing.d.ts +0 -2
  252. package/src/View/Notes/NotesListing.js +0 -88
  253. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsGlue42.d.ts +0 -9
  254. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsGlue42.js +0 -25
  255. package/src/bundle-dependencies/bundles/react-toastify/components/CloseButton.d.ts +0 -9
  256. package/src/bundle-dependencies/bundles/react-toastify/components/Icons.d.ts +0 -24
  257. package/src/bundle-dependencies/bundles/react-toastify/components/ProgressBar.d.ts +0 -59
  258. package/src/bundle-dependencies/bundles/react-toastify/components/Toast.d.ts +0 -3
  259. package/src/bundle-dependencies/bundles/react-toastify/components/ToastContainer.d.ts +0 -3
  260. package/src/bundle-dependencies/bundles/react-toastify/components/Transitions.d.ts +0 -6
  261. package/src/bundle-dependencies/bundles/react-toastify/components/index.d.ts +0 -6
  262. package/src/bundle-dependencies/bundles/react-toastify/core/eventManager.d.ts +0 -39
  263. package/src/bundle-dependencies/bundles/react-toastify/core/index.d.ts +0 -2
  264. package/src/bundle-dependencies/bundles/react-toastify/core/toast.d.ts +0 -41
  265. package/src/bundle-dependencies/bundles/react-toastify/hooks/index.d.ts +0 -2
  266. package/src/bundle-dependencies/bundles/react-toastify/hooks/useToast.d.ts +0 -10
  267. package/src/bundle-dependencies/bundles/react-toastify/hooks/useToastContainer.d.ts +0 -23
  268. package/src/bundle-dependencies/bundles/react-toastify/index.d.ts +0 -5
  269. package/src/bundle-dependencies/bundles/react-toastify/index.js +0 -1
  270. package/src/bundle-dependencies/bundles/react-toastify/inject-style.d.ts +0 -8
  271. package/src/bundle-dependencies/bundles/react-toastify/types/index.d.ts +0 -269
  272. package/src/bundle-dependencies/bundles/react-toastify/utils/collapseToast.d.ts +0 -5
  273. package/src/bundle-dependencies/bundles/react-toastify/utils/constant.d.ts +0 -23
  274. package/src/bundle-dependencies/bundles/react-toastify/utils/cssTransition.d.ts +0 -43
  275. package/src/bundle-dependencies/bundles/react-toastify/utils/index.d.ts +0 -5
  276. package/src/bundle-dependencies/bundles/react-toastify/utils/mapper.d.ts +0 -2
  277. package/src/bundle-dependencies/bundles/react-toastify/utils/propValidator.d.ts +0 -9
  278. /package/src/AdaptableOptions/{FinsemblePluginOptions.js → CommentsOptions.js} +0 -0
  279. /package/src/AdaptableOptions/{Glue42PluginOptions.js → InteropioPluginOptions.js} +0 -0
  280. /package/src/{AdaptableOptions/Glue42WebPluginOptions.js → Api/CommentApi.js} +0 -0
  281. /package/src/Api/Events/{SelectionChanged.js → CalculatedColumnChanged.js} +0 -0
  282. /package/src/Api/{FinsembleApi.js → Events/CellSelectionChanged.js} +0 -0
  283. /package/src/Api/{Glue42Api.js → Events/CommentsChangedInfo.js} +0 -0
  284. /package/src/Api/{Glue42WebApi.js → Events/RowSelectionChanged.js} +0 -0
  285. /package/src/Api/Internal/{ExpressionnternalApi.d.ts → ExpressionInternalApi.d.ts} +0 -0
  286. /package/src/Api/Internal/{ExpressionnternalApi.js → ExpressionInternalApi.js} +0 -0
  287. /package/src/Api/{NotesAPi.js → InteropioPluginApi.js} +0 -0
  288. /package/src/{PredefinedConfig/Glue42State.js → Api/NotesApi.js} +0 -0
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CombinatorSelector = exports.ExpressionSelector = exports.PrimiteValueInput = exports.PrimitiveColumnSelector = void 0;
3
+ exports.CombinatorSelector = exports.ExpressionSelector = exports.PrimitiveMultiValueInput = exports.PrimiteValueInput = exports.PrimitiveColumnSelector = 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");
@@ -11,6 +11,7 @@ const PermittedValuesSelector_1 = require("../../../View/Components/Selectors/Pe
11
11
  const CheckBox_1 = require("../../CheckBox");
12
12
  const DropdownButton_1 = tslib_1.__importDefault(require("../../DropdownButton"));
13
13
  const icons_1 = require("../../icons");
14
+ const InputGroup_1 = require("../../InputGroup");
14
15
  const Select_1 = require("../../Select");
15
16
  const QueryBuilder_1 = require("./QueryBuilder");
16
17
  const utils_1 = require("./utils");
@@ -85,37 +86,65 @@ const PrimiteValueInput = (props) => {
85
86
  }
86
87
  const options = [
87
88
  {
88
- label: 'Column',
89
+ label: (react_1.default.createElement(rebass_1.Flex, null,
90
+ react_1.default.createElement(icons_1.Icon, { name: "columns" }),
91
+ react_1.default.createElement(rebass_1.Text, { ml: 2 }, "Column"))),
89
92
  icon: 'columns',
90
93
  value: 'column-name',
91
94
  },
92
95
  {
93
- label: 'Value',
96
+ label: (react_1.default.createElement(rebass_1.Flex, null,
97
+ react_1.default.createElement(icons_1.Icon, { name: "edit" }),
98
+ react_1.default.createElement(rebass_1.Text, { ml: 2 }, "Value"))),
94
99
  icon: 'edit',
95
100
  value: 'input-value',
96
101
  },
97
102
  ];
98
103
  const typeOption = options.find((option) => option.value === type);
99
- return (react_1.default.createElement(rebass_1.Flex, { "data-id": "query-input-wrapper", mr: 2 },
100
- react_1.default.createElement(rebass_1.Flex, null,
101
- react_1.default.createElement(Select_1.Select, { rederSingleValue: (value) => {
102
- return (react_1.default.createElement(react_1.default.Fragment, null, typeOption.value === 'column-name' ? react_1.default.createElement(icons_1.Icon, { name: "grid" }) : react_1.default.createElement(icons_1.Icon, { name: "edit" })));
103
- }, variant: "raised", value: typeOption.value, options: options, onChange: (value) => handleTypeChange(value) })),
104
+ return (react_1.default.createElement(InputGroup_1.InputGroup, { Component: rebass_1.Flex, "data-id": "query-input-wrapper", mr: 2 },
105
+ react_1.default.createElement(Select_1.Select, { renderSingleValue: (value) => {
106
+ return (react_1.default.createElement(react_1.default.Fragment, null, typeOption.value === 'column-name' ? react_1.default.createElement(icons_1.Icon, { name: "grid" }) : react_1.default.createElement(icons_1.Icon, { name: "edit" })));
107
+ }, value: typeOption.value, options: options, onChange: (value) => handleTypeChange(value) }),
104
108
  editor));
105
109
  };
106
110
  exports.PrimiteValueInput = PrimiteValueInput;
111
+ const PrimitiveMultiValueInput = (props) => {
112
+ return (react_1.default.createElement(PermittedValuesSelector_1.PermittedValuesSelector, { isMulti: true, allowNewValues: true, value: props.value, columnId: props.lefthandColumnIdParam, onChange: (value) => {
113
+ props.onChange(value);
114
+ } }));
115
+ };
116
+ exports.PrimitiveMultiValueInput = PrimitiveMultiValueInput;
117
+ const SymbolToIcon = (props) => {
118
+ switch (props.symbol) {
119
+ case '=':
120
+ return react_1.default.createElement(icons_1.Icon, { name: "equals" });
121
+ case '!=':
122
+ return react_1.default.createElement(icons_1.Icon, { name: "not-equal" });
123
+ case '>':
124
+ return react_1.default.createElement(icons_1.Icon, { name: "greater-than" });
125
+ case '>=':
126
+ return react_1.default.createElement(icons_1.Icon, { name: "greater-than-or-equal" });
127
+ case '<':
128
+ return react_1.default.createElement(icons_1.Icon, { name: "less-than" });
129
+ case '<=':
130
+ return react_1.default.createElement(icons_1.Icon, { name: "less-than-or-equal" });
131
+ default:
132
+ return react_1.default.createElement(react_1.default.Fragment, null, props.symbol);
133
+ }
134
+ };
107
135
  const ExpressionSelector = (props) => {
108
136
  var _a;
109
137
  const { getExpressions } = (0, QueryBuilder_1.useQueryBuilderContext)();
110
138
  const expressions = props.dataType ? getExpressions(props.dataType) : [];
111
- return (react_1.default.createElement(DropdownButton_1.default, { "data-id": "expression-selector", "data-value": props.value, variant: "raised", columns: ['label'], items: expressions.map((expression) => ({
112
- label: (0, mapQlPredicateToExpression_1.getQlPredicateSymbol)(expression),
139
+ return (react_1.default.createElement(DropdownButton_1.default, { "data-id": "expression-selector", "data-value": props.value, variant: "raised", tone: 'accent', columns: ['label'], items: expressions.map((expression) => ({
140
+ label: react_1.default.createElement(SymbolToIcon, { symbol: (0, mapQlPredicateToExpression_1.getQlPredicateSymbol)(expression) }),
113
141
  onClick: () => {
114
142
  if (expression !== props.value) {
115
143
  props.onExpressionChange(expression);
116
144
  }
117
145
  },
118
- })) }, (_a = (0, mapQlPredicateToExpression_1.getQlPredicateSymbol)(props.value)) !== null && _a !== void 0 ? _a : 'Select Operator'));
146
+ })) },
147
+ react_1.default.createElement(SymbolToIcon, { symbol: (_a = (0, mapQlPredicateToExpression_1.getQlPredicateSymbol)(props.value)) !== null && _a !== void 0 ? _a : 'Select Operator' })));
119
148
  };
120
149
  exports.ExpressionSelector = ExpressionSelector;
121
150
  const CombinatorSelector = (props) => {
@@ -145,12 +145,24 @@ const PrimitiveFunctionEditor = (props) => {
145
145
  }, value: props.predicate.operator })),
146
146
  react_1.default.createElement(rebass_1.Flex, { flex: 1, ml: 2 }, restOfFunctionInputDataTypes.map((type, index) => {
147
147
  var _a;
148
- return (react_1.default.createElement(QueryBuilderInputs_1.PrimiteValueInput, { key: type + index, inputType: type, lefthandColumnIdParam: columnId, value: (_a = restOfArgs[index]) !== null && _a !== void 0 ? _a : null, onChange: (value) => {
148
+ let value = restOfArgs[index];
149
+ const commonProps = {
150
+ key: type + index,
151
+ lefthandColumnIdParam: columnId,
152
+ inputType: type,
153
+ };
154
+ if (type.includes('[]')) {
155
+ return (react_1.default.createElement(QueryBuilderInputs_1.PrimitiveMultiValueInput, Object.assign({}, commonProps, { value: restOfArgs, onChange: (values) => {
156
+ const args = [...props.predicate.args.slice(0, 1), ...values];
157
+ props.onChange(Object.assign(Object.assign({}, props.predicate), { args }));
158
+ } })));
159
+ }
160
+ return (react_1.default.createElement(QueryBuilderInputs_1.PrimiteValueInput, Object.assign({}, commonProps, { value: (_a = restOfArgs[index]) !== null && _a !== void 0 ? _a : null, onChange: (value) => {
149
161
  const args = [...props.predicate.args];
150
162
  // +1 because col is the first argument
151
163
  args[index + 1] = value;
152
164
  props.onChange(Object.assign(Object.assign({}, props.predicate), { args }));
153
- } }));
165
+ } })));
154
166
  }))),
155
167
  react_1.default.createElement(rebass_1.Box, { flex: 1 }),
156
168
  react_1.default.createElement(QueryPredicateButtons, Object.assign({}, props))));
@@ -14,4 +14,5 @@ exports.booleanExpressionsAvailableInQueryBuilder = [
14
14
  'ENDS_WITH',
15
15
  'IS_HOLIDAY',
16
16
  'IS_WORKDAY',
17
+ 'IN',
17
18
  ];
@@ -80,7 +80,7 @@ const getFunctionsForColumnType = (dataType, availableBooleanFunctions) => {
80
80
  const functionDef = booleanExpressionFunctions_1.booleanExpressionFunctions[boolFnName];
81
81
  const inputs = functionDef.inputs;
82
82
  let matchingInputTypes = [];
83
- if (Array.isArray(inputs[0])) {
83
+ if (inputs && Array.isArray(inputs[0])) {
84
84
  matchingInputTypes = inputs.find((input) => input[0] === columnType);
85
85
  }
86
86
  else {
@@ -32,6 +32,7 @@ function ExpressionEditor(props) {
32
32
  const { type, module } = props;
33
33
  const [data, setData] = (0, react_1.useState)(props.initialData);
34
34
  const [showColumnIds, setShowColumnIds] = (0, react_1.useState)(false);
35
+ const [inlineQuery, setInlineQuery] = (0, react_1.useState)(false);
35
36
  const [showNamedQueries, setShowNamedQueries] = (0, react_1.useState)(false);
36
37
  const baseClassName = `ab-ExpressionEditor`;
37
38
  const [selectedFunction, setSelectedFunction] = (0, react_1.useState)(null);
@@ -97,12 +98,8 @@ function ExpressionEditor(props) {
97
98
  setData(updateColValue(data, column, new Date(e.target.value)));
98
99
  }, style: { width: '100%' }, disabled: column.readOnly })) : column.dataType === 'Boolean' ? (React.createElement(CheckBox_1.CheckBox, { "data-name": "column-input", "data-value": column.columnId, checked: getColValue(column), onChange: (checked) => setData(updateColValue(data, column, checked)), disabled: column.readOnly })) : null))))));
99
100
  const namedQueries = (React.createElement(rebass_1.Flex, { flexDirection: "column", alignItems: "start", style: { marginTop: 2 } },
100
- React.createElement(CheckBox_1.CheckBox, { checked: showColumnIds, onChange: (checked) => setShowColumnIds(checked), style: {
101
- float: 'right',
102
- margin: 0,
103
- paddingTop: 'var(--ab-space-1)',
104
- paddingBottom: 'var(--ab-space-1)',
105
- } }, 'Show Column IDs'),
101
+ React.createElement(CheckBox_1.CheckBox, { checked: showColumnIds, onChange: (checked) => setShowColumnIds(checked) }, "Show Column IDs"),
102
+ React.createElement(CheckBox_1.CheckBox, { checked: inlineQuery, onChange: (checked) => setInlineQuery(checked) }, "Inline Query"),
106
103
  props.namedQueries.map((namedQuery) => (React.createElement(rebass_1.Flex, { key: namedQuery.Uuid, flexDirection: "column", alignItems: "start", style: {
107
104
  padding: 3,
108
105
  marginTop: 'var(--ab-space-2)',
@@ -113,7 +110,7 @@ function ExpressionEditor(props) {
113
110
  React.createElement(EditorButton_1.default, { width: "100%", height: "100%", style: {
114
111
  background: 'var(--ab-color-primary)',
115
112
  cursor: 'grab',
116
- }, data: `QUERY("${namedQuery.Name}")`, "data-name": "column", icon: "drag" },
113
+ }, data: inlineQuery ? namedQuery.BooleanExpression : `QUERY("${namedQuery.Name}")`, "data-name": "column", icon: "drag" },
117
114
  React.createElement(rebass_1.Flex, { flexDirection: "column", alignItems: "start" }, namedQuery.Name)),
118
115
  React.createElement(rebass_1.Flex, { alignItems: "start", style: {
119
116
  padding: 5,
@@ -0,0 +1,7 @@
1
+ import * as React from 'react';
2
+ type InputGroupProps<T extends React.ComponentType<any>> = {
3
+ Component?: T;
4
+ children: React.ReactNode;
5
+ } & React.ComponentProps<T>;
6
+ export declare const InputGroup: <T extends React.ComponentType<any>>({ Component, children, ...rest }: InputGroupProps<T>) => JSX.Element;
7
+ export {};
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.InputGroup = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const React = tslib_1.__importStar(require("react"));
6
+ const InputGroup = (_a) => {
7
+ var _b;
8
+ var { Component = 'div', children } = _a, rest = tslib_1.__rest(_a, ["Component", "children"]);
9
+ const Comp = Component;
10
+ return (React.createElement(Comp, Object.assign({}, rest, { className: `ab-cmp-input-group ${(_b = rest.className) !== null && _b !== void 0 ? _b : ''}` }), children));
11
+ };
12
+ exports.InputGroup = InputGroup;
@@ -0,0 +1 @@
1
+ export * from './InputGroup';
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./InputGroup"), exports);
@@ -4,6 +4,7 @@ exports.getConstrainRect = exports.getConstrainElement = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const React = tslib_1.__importStar(require("react"));
6
6
  const react_1 = require("react");
7
+ const debounce_1 = tslib_1.__importDefault(require("lodash/debounce"));
7
8
  const batchUpdate_1 = tslib_1.__importDefault(require("../utils/batchUpdate"));
8
9
  const selectParent_1 = tslib_1.__importDefault(require("../utils/selectParent"));
9
10
  const useProperty_1 = tslib_1.__importDefault(require("../utils/useProperty"));
@@ -72,7 +73,11 @@ const OverlayTrigger = React.forwardRef((props, ref) => {
72
73
  const overlayRef = (0, react_1.useRef)(null);
73
74
  const [visible, doSetVisible] = (0, useProperty_1.default)(props, 'visible', false);
74
75
  const hideTimeoutRef = (0, react_1.useRef)(null);
75
- const setVisible = React.useCallback((visible) => {
76
+ const setVisible = React.useCallback(
77
+ // visible state may quickly change from true -> false -> true
78
+ // when moving the mouse cursor from the trigger to the overlay
79
+ // for this case we debounce the visible change for a very small amount of time
80
+ (0, debounce_1.default)((visible) => {
76
81
  onVisibleChange === null || onVisibleChange === void 0 ? void 0 : onVisibleChange(visible);
77
82
  if (!visible) {
78
83
  hideTimeoutRef.current = setTimeout(() => {
@@ -86,7 +91,7 @@ const OverlayTrigger = React.forwardRef((props, ref) => {
86
91
  hideTimeoutRef.current = null;
87
92
  }
88
93
  doSetVisible(true);
89
- }, []);
94
+ }, 50), []);
90
95
  const prevVisible = (0, usePrevious_1.default)(visible, false);
91
96
  ensurePortalElement();
92
97
  const onShow = React.useCallback((event) => {
@@ -17,14 +17,13 @@ export type SelectProps<SelectValue extends unknown, IsMulti extends boolean = f
17
17
  placeholder?: string;
18
18
  'data-name'?: string;
19
19
  'data-id'?: string;
20
- rederSingleValue?: (option: SelectOption<SelectValue>) => React.ReactNode;
20
+ renderSingleValue?: (option: SelectOption<SelectValue>) => React.ReactNode;
21
21
  className?: string;
22
22
  isLoding?: boolean;
23
23
  onFocus?: () => void;
24
24
  accessLevel?: AccessLevel;
25
25
  style?: React.CSSProperties;
26
26
  onInputChange?: (value: string) => void;
27
- variant?: 'default' | 'raised';
28
27
  size?: 'small' | 'normal';
29
28
  isCreatable?: boolean;
30
29
  };
@@ -6,6 +6,7 @@ const date_fns_1 = require("date-fns");
6
6
  const React = tslib_1.__importStar(require("react"));
7
7
  const react_select_1 = tslib_1.__importStar(require("react-select"));
8
8
  const creatable_1 = tslib_1.__importDefault(require("react-select/creatable"));
9
+ const icons_1 = require("../icons");
9
10
  const commonStyles = ({ isFocused, isDisabled, }) => {
10
11
  return {
11
12
  color: 'var(--ab-cmp-input__color)',
@@ -15,21 +16,40 @@ const commonStyles = ({ isFocused, isDisabled, }) => {
15
16
  };
16
17
  };
17
18
  const Select = function (props) {
18
- var _a, _b, _c, _d, _e;
19
- let selectedOption = (_b = ((_a = props.options) !== null && _a !== void 0 ? _a : []).find((option) => {
19
+ var _a, _b, _c, _d, _e, _f, _g;
20
+ const doesOptionMatchValue = function (option) {
20
21
  if (typeof option.value === 'object' && option.value instanceof Date) {
21
22
  return (0, date_fns_1.isSameDay)(option.value, props.value);
22
23
  }
23
24
  return option.value === props.value;
24
- })) !== null && _b !== void 0 ? _b : null;
25
- if (!selectedOption && props.value !== undefined && props.value !== null) {
26
- selectedOption = {
27
- value: props.value,
28
- label: props.value,
29
- };
25
+ };
26
+ let selectedOption = null;
27
+ if (props.isMulti) {
28
+ selectedOption =
29
+ (_b = ((_a = props.value) !== null && _a !== void 0 ? _a : []).map((value) => {
30
+ var _a;
31
+ // return (props.value as any[]).includes(option.value);
32
+ const option = ((_a = props.options) !== null && _a !== void 0 ? _a : []).find(doesOptionMatchValue);
33
+ if (!option) {
34
+ return {
35
+ value,
36
+ label: value,
37
+ };
38
+ }
39
+ return option;
40
+ })) !== null && _b !== void 0 ? _b : null;
30
41
  }
31
- let disabled = (_c = props.disabled) !== null && _c !== void 0 ? _c : false;
32
- const accessLevel = (_d = props.accessLevel) !== null && _d !== void 0 ? _d : 'Full';
42
+ else {
43
+ selectedOption = (_d = ((_c = props.options) !== null && _c !== void 0 ? _c : []).find(doesOptionMatchValue)) !== null && _d !== void 0 ? _d : null;
44
+ if (!selectedOption && props.value !== undefined && props.value !== null) {
45
+ selectedOption = {
46
+ value: props.value,
47
+ label: props.value,
48
+ };
49
+ }
50
+ }
51
+ let disabled = (_e = props.disabled) !== null && _e !== void 0 ? _e : false;
52
+ const accessLevel = (_f = props.accessLevel) !== null && _f !== void 0 ? _f : 'Full';
33
53
  if (accessLevel === 'Hidden') {
34
54
  return null;
35
55
  }
@@ -52,7 +72,21 @@ const Select = function (props) {
52
72
  };
53
73
  }, []);
54
74
  const SelectComponent = props.isCreatable ? creatable_1.default : react_select_1.default;
55
- return (React.createElement(SelectComponent, { onInputChange: props.onInputChange, onFocus: props.onFocus, isLoading: props.isLoding, options: props.options, className: props.className, isDisabled: disabled, isMulti: props.isMulti, value: selectedOption, menuPosition: (_e = props.menuPosition) !== null && _e !== void 0 ? _e : 'fixed', isClearable: props.isClearable, onChange: (option) => {
75
+ const ClearIndicator = React.useMemo(() => {
76
+ return (clearIndicatorProps) => {
77
+ return (React.createElement(react_select_1.components.ClearIndicator, Object.assign({}, clearIndicatorProps),
78
+ React.createElement(icons_1.Icon, { name: "close" })));
79
+ };
80
+ }, []);
81
+ const DropdownIndicator = React.useMemo(() => {
82
+ return (props) => {
83
+ return (React.createElement(react_select_1.components.DropdownIndicator, Object.assign({}, props),
84
+ React.createElement(icons_1.Icon, { name: "triangle-down", style: { height: 20, width: 20 } })));
85
+ };
86
+ }, []);
87
+ return (React.createElement(SelectComponent, { onInputChange: props.onInputChange, onFocus: props.onFocus, isLoading: props.isLoding, options: props.options, className: props.className, isDisabled: disabled, isMulti: props.isMulti, value: selectedOption, menuPosition: (_g = props.menuPosition) !== null && _g !== void 0 ? _g : 'absolute',
88
+ // This needed so the menu is not clipped by overflow: hidden
89
+ menuPortalTarget: document.body, isClearable: props.isClearable, onChange: (option) => {
56
90
  if (props.isMulti) {
57
91
  props.onChange(option.map((x) => x === null || x === void 0 ? void 0 : x.value));
58
92
  }
@@ -63,10 +97,12 @@ const Select = function (props) {
63
97
  SelectContainer,
64
98
  ValueContainer,
65
99
  SingleValue: (singleValueProps) => {
66
- return (React.createElement(react_select_1.components.SingleValue, Object.assign({}, singleValueProps), props.rederSingleValue
67
- ? props.rederSingleValue(selectedOption)
100
+ return (React.createElement(react_select_1.components.SingleValue, Object.assign({}, singleValueProps), props.renderSingleValue
101
+ ? props.renderSingleValue(selectedOption)
68
102
  : singleValueProps.children));
69
103
  },
104
+ ClearIndicator,
105
+ DropdownIndicator,
70
106
  },
71
107
  /**
72
108
  * Using styles is the preferred way to style react-select.
@@ -85,25 +121,25 @@ const Select = function (props) {
85
121
  },
86
122
  // @ts-ignore
87
123
  menu: (baseStyle, state) => {
88
- return Object.assign(Object.assign(Object.assign({}, baseStyle), { zIndex: 999999, boxShadow: 'var(--ab-cmp-dropdownbutton-list__box-shadow)', minWidth: 160 }), commonStyles(state));
124
+ return Object.assign(Object.assign(Object.assign({}, baseStyle), { zIndex: 999999, boxShadow: 'var(--ab-cmp-select-menu__box-shadow)', minWidth: 160 }), commonStyles(state));
89
125
  },
90
126
  // @ts-ignore
91
127
  option: (baseStyle, state) => {
92
128
  const style = Object.assign(Object.assign(Object.assign({}, baseStyle), commonStyles(state)), { '&:active': {
93
- background: 'var(--ab-cmp-dropdownbutton-list-item-hover__background)',
129
+ background: 'var(--ab-cmp-select-option-active__background)',
94
130
  }, opacity: state.isDisabled ? 0.5 : 1 });
95
131
  if (state.isSelected) {
96
- style.background = 'var(--ab-cmp-dropdownbutton-list-item-active__background)';
97
- style.color = 'var(--ab-cmp-dropdownbutton-list-item-active__color)';
132
+ style.background = 'var(--ab-cmp-select-option-active__background)';
133
+ style.color = 'var(--ab-cmp-select-option-active__color)';
98
134
  }
99
135
  if (state.isFocused) {
100
- style.background = 'var(--ab-cmp-dropdownbutton-list-item-hover__background)';
136
+ style.background = 'var(--ab-cmp-select-option-focused__background)';
101
137
  }
102
138
  return style;
103
139
  },
104
140
  // @ts-ignore
105
141
  input: (baseStyle, state) => {
106
- return Object.assign(Object.assign({}, baseStyle), { padding: props.size === 'small' ? 0 : baseStyle.padding, color: 'var(--ab-cmp-input__color)' });
142
+ return Object.assign(Object.assign({}, baseStyle), { padding: props.size === 'small' ? 0 : baseStyle.padding, color: 'var(--ab-cmp-select__color)' });
107
143
  },
108
144
  valueContainer: (baseStyle) => {
109
145
  return Object.assign(Object.assign({}, baseStyle), { padding: props.size === 'small' ? `0 var(--ab-space-1)` : baseStyle.padding });
@@ -117,10 +153,8 @@ const Select = function (props) {
117
153
  state;
118
154
  return Object.assign(Object.assign(Object.assign({}, baseStyle), commonStyles(state)), {
119
155
  // height: 30,
120
- minHeight: props.size === 'small' ? 0 : 32, boxShadow: state.isFocused ? 'var(--ab-focus__box-shadow)' : 'none', outline: state.isFocused ? 'var(--ab-focus__outline)' : 'none', border: props.variant && props.variant === 'raised'
121
- ? '1px solid transparent'
122
- : 'var(--ab-cmp-input__border)', '&:hover': {
123
- border: 'var(--ab-cmp-input__border)',
156
+ minHeight: props.size === 'small' ? 0 : 32, boxShadow: state.isFocused ? 'var(--ab-cmp-select-focused__box-shadow)' : 'none', outline: state.isFocused ? 'var(--ab-cmp-select-focused__outline)' : 'none', border: 'var(--ab-cmp-select__border)', borderRadius: 'var(--ab-cmp-select__border-radius)', '&:hover': {
157
+ border: 'var(--ab-cmp-select__border)',
124
158
  } });
125
159
  },
126
160
  // @ts-ignore
@@ -131,6 +165,12 @@ const Select = function (props) {
131
165
  clearIndicator: (baseStyle) => {
132
166
  return Object.assign(Object.assign({}, baseStyle), { padding: '2px 3px' });
133
167
  },
168
+ multiValue: (baseStyle) => {
169
+ return Object.assign(Object.assign({}, baseStyle), { color: 'var(--ab-cmp-select__color)', background: 'var(--ab-cmp-select-multi-value__background)', border: 'var(--ab-cmp-select__border)' });
170
+ },
171
+ multiValueLabel: (baseStyle) => {
172
+ return Object.assign(Object.assign({}, baseStyle), { color: 'var(--ab-cmp-select__color)' });
173
+ },
134
174
  } }));
135
175
  };
136
176
  exports.Select = Select;
@@ -2,16 +2,25 @@ import * as React from 'react';
2
2
  import { BoxProps } from 'rebass';
3
3
  import { HTMLProps } from 'react';
4
4
  export declare const baseClassName = "ab-Textarea";
5
+ /**
6
+ * Autoheight strategy:
7
+ * - save initial height
8
+ * - when focused, expand to fit content - max x px
9
+ * - when blurred, shrink to initial height
10
+ * - when typing, expand to fit content - max x px
11
+ */
5
12
  export type TextareaProps = Omit<HTMLProps<HTMLTextAreaElement>, 'ref'> & {
6
13
  placehoder?: string;
7
14
  type?: string;
8
15
  disabled?: boolean;
9
16
  value?: string;
17
+ autoResizeOnFocus?: boolean;
10
18
  } & Omit<BoxProps, 'ref'>;
11
19
  declare const Textarea: React.ForwardRefExoticComponent<Omit<React.HTMLProps<HTMLTextAreaElement>, "ref"> & {
12
20
  placehoder?: string;
13
21
  type?: string;
14
22
  disabled?: boolean;
15
23
  value?: string;
24
+ autoResizeOnFocus?: boolean;
16
25
  } & Omit<BoxProps, "ref"> & React.RefAttributes<HTMLDivElement | HTMLInputElement | HTMLTextAreaElement>>;
17
26
  export default Textarea;
@@ -7,7 +7,9 @@ const rebass_1 = require("rebass");
7
7
  const join_1 = tslib_1.__importDefault(require("../utils/join"));
8
8
  exports.baseClassName = 'ab-Textarea';
9
9
  const Textarea = React.forwardRef((props, ref) => {
10
- let { disabled, className } = props, textareaProps = tslib_1.__rest(props, ["disabled", "className"]);
10
+ const internalRef = React.useRef(null);
11
+ let { disabled, autoResizeOnFocus, className } = props, textareaProps = tslib_1.__rest(props, ["disabled", "autoResizeOnFocus", "className"]);
12
+ const initialHeight = React.useRef(null);
11
13
  let type = 'text';
12
14
  if (textareaProps && textareaProps.type) {
13
15
  type = textareaProps.type;
@@ -15,6 +17,52 @@ const Textarea = React.forwardRef((props, ref) => {
15
17
  if (type === 'string') {
16
18
  type = 'text';
17
19
  }
18
- return (React.createElement(rebass_1.Box, Object.assign({ ref: ref, as: "textarea" }, textareaProps, { type: type, disabled: disabled, className: (0, join_1.default)(className, exports.baseClassName, disabled ? `${exports.baseClassName}--disabled` : '') })));
20
+ const expandToFitContent = () => {
21
+ if (autoResizeOnFocus && initialHeight.current !== null && internalRef.current) {
22
+ internalRef.current.style.height = `0px`; // makes sure it shrinks when needed
23
+ const height = internalRef.current.scrollHeight;
24
+ internalRef.current.style.height = `${height}px`;
25
+ }
26
+ };
27
+ const shrinkToInitialHeight = () => {
28
+ if (autoResizeOnFocus) {
29
+ internalRef.current.style.height = `${initialHeight.current}px`;
30
+ }
31
+ };
32
+ return (React.createElement(rebass_1.Box, Object.assign({}, textareaProps, { onFocus: (e) => {
33
+ var _a;
34
+ expandToFitContent();
35
+ (_a = props.onFocus) === null || _a === void 0 ? void 0 : _a.call(props, e);
36
+ if (internalRef.current && initialHeight.current === null) {
37
+ const height = internalRef.current.getBoundingClientRect().height;
38
+ initialHeight.current = height;
39
+ }
40
+ }, onBlur: (e) => {
41
+ var _a;
42
+ shrinkToInitialHeight();
43
+ (_a = props.onBlur) === null || _a === void 0 ? void 0 : _a.call(props, e);
44
+ }, ref: (elRef) => {
45
+ // SAVE INITIAL HEIGHT
46
+ // if (elRef && initialHeight.current === null) {
47
+ // const height = elRef.getBoundingClientRect().height;
48
+ // initialHeight.current = isNaN(height) ? 'auto' : height;
49
+ // }
50
+ // SAVE REF
51
+ if (internalRef) {
52
+ internalRef.current = elRef;
53
+ }
54
+ // CALL EXTERNAL REF
55
+ if (ref) {
56
+ if (typeof ref === 'function') {
57
+ ref(elRef);
58
+ }
59
+ else {
60
+ ref.current = elRef;
61
+ }
62
+ }
63
+ }, onChange: (e) => {
64
+ expandToFitContent();
65
+ props.onChange && props.onChange(e);
66
+ }, as: "textarea", type: type, disabled: disabled, className: (0, join_1.default)(className, exports.baseClassName, disabled ? `${exports.baseClassName}--disabled` : ''), spellCheck: false })));
19
67
  });
20
68
  exports.default = Textarea;
@@ -1,3 +1,3 @@
1
- export { toast, ToastContainer, Slide, Zoom, Bounce, Flip, } from '../../bundle-dependencies/bundles/react-toastify';
2
- import { ToastOptions } from '../../bundle-dependencies/bundles/react-toastify';
1
+ export { toast, ToastContainer, Slide, Zoom, Bounce, Flip } from 'react-toastify';
2
+ import { ToastOptions } from 'react-toastify';
3
3
  export type { ToastOptions };
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Flip = exports.Bounce = exports.Zoom = exports.Slide = exports.ToastContainer = exports.toast = void 0;
4
- var react_toastify_1 = require("../../bundle-dependencies/bundles/react-toastify");
4
+ var react_toastify_1 = require("react-toastify");
5
5
  Object.defineProperty(exports, "toast", { enumerable: true, get: function () { return react_toastify_1.toast; } });
6
6
  Object.defineProperty(exports, "ToastContainer", { enumerable: true, get: function () { return react_toastify_1.ToastContainer; } });
7
7
  Object.defineProperty(exports, "Slide", { enumerable: true, get: function () { return react_toastify_1.Slide; } });
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ declare const _default: (props: any) => JSX.Element;
3
+ export default _default;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const React = tslib_1.__importStar(require("react"));
5
+ const DefaultIcon_1 = tslib_1.__importDefault(require("./DefaultIcon"));
6
+ exports.default = (props) => (React.createElement(DefaultIcon_1.default, Object.assign({}, props, { viewBox: "0 -960 960 960" }),
7
+ React.createElement("path", { d: "M280-240q-17 0-28.5-11.5T240-280v-80h520v-360h80q17 0 28.5 11.5T880-680v600L720-240H280ZM80-280v-560q0-17 11.5-28.5T120-880h520q17 0 28.5 11.5T680-840v360q0 17-11.5 28.5T640-440H240L80-280Zm520-240v-280H160v280h440Zm-440 0v-280 280Z" })));
@@ -157,6 +157,7 @@ const money_1 = tslib_1.__importDefault(require("./money"));
157
157
  const order_1 = tslib_1.__importDefault(require("./order"));
158
158
  const contact_1 = tslib_1.__importDefault(require("./contact"));
159
159
  const note_1 = tslib_1.__importDefault(require("./note"));
160
+ const comments_1 = tslib_1.__importDefault(require("./comments"));
160
161
  const Icon_1 = require("../Icon");
161
162
  const AdaptableLogger_1 = require("../../agGrid/AdaptableLogger");
162
163
  exports.allIcons = {
@@ -193,7 +194,7 @@ exports.allIcons = {
193
194
  'horizontal-lines': freetext_column_1.default,
194
195
  'percent-tag': percent_bar_1.default,
195
196
  'spark-line': spark_line_1.default,
196
- 'resume': resume_1.default,
197
+ resume: resume_1.default,
197
198
  'pie-chart': pie_chart_1.default,
198
199
  'add-circle': plus_minus_1.default,
199
200
  reminder: reminder_1.default,
@@ -314,6 +315,7 @@ exports.allIcons = {
314
315
  order: order_1.default,
315
316
  contact: contact_1.default,
316
317
  note: note_1.default,
318
+ comments: comments_1.default,
317
319
  };
318
320
  Object.keys(exports.allIcons).forEach((name) => {
319
321
  const ReactCmp = exports.allIcons[name];
package/src/env.d.ts CHANGED
@@ -1,4 +1,6 @@
1
1
  declare const _default: {
2
- [key: string]: string;
2
+ INFINITE_TABLE_LICENSE_KEY: any;
3
+ PUBLISH_TIMESTAMP: any;
4
+ VERSION: any;
3
5
  };
4
6
  export default _default;
package/src/env.js CHANGED
@@ -1,5 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.default = {
4
- 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",
4
+ 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: 1707923772524 || Date.now(),
6
+ VERSION: "18.0.0-canary.1" || '--current-version--',
5
7
  };