@adaptabletools/adaptable 11.2.4 → 12.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 (278) hide show
  1. package/base.css +568 -273
  2. package/bundle.cjs.js +120 -120
  3. package/index.css +642 -270
  4. package/package.json +2 -2
  5. package/publishTimestamp.d.ts +1 -1
  6. package/publishTimestamp.js +1 -1
  7. package/src/AdaptableInterfaces/IAdaptable.d.ts +6 -1
  8. package/src/AdaptableOptions/ActionOptions.d.ts +1 -0
  9. package/src/AdaptableOptions/{FormatColumnOptions.js → ActionOptions.js} +0 -0
  10. package/src/AdaptableOptions/AdaptableFrameworkComponent.d.ts +5 -0
  11. package/src/AdaptableOptions/AdaptableOptions.d.ts +3 -10
  12. package/src/AdaptableOptions/AdaptableQLOptions.d.ts +5 -0
  13. package/src/AdaptableOptions/AlertOptions.d.ts +14 -1
  14. package/src/AdaptableOptions/ColumnOptions.d.ts +49 -0
  15. package/src/AdaptableOptions/{MasterDetailAgGridPluginOptions.js → ColumnOptions.js} +0 -0
  16. package/src/AdaptableOptions/DashboardOptions.d.ts +2 -7
  17. package/src/AdaptableOptions/DataChangeHistoryOptions.d.ts +19 -0
  18. package/src/AdaptableOptions/EditOptions.d.ts +91 -4
  19. package/src/AdaptableOptions/EntitlementOptions.d.ts +7 -1
  20. package/src/AdaptableOptions/ExportOptions.d.ts +9 -8
  21. package/src/AdaptableOptions/FilterOptions.d.ts +6 -1
  22. package/src/AdaptableOptions/GeneralOptions.d.ts +25 -23
  23. package/src/AdaptableOptions/{MasterDetailAgGridPluginOptions.d.ts → MasterDetailPluginOptions.d.ts} +2 -4
  24. package/src/AdaptableOptions/{SmartEdit.js → MasterDetailPluginOptions.js} +0 -0
  25. package/src/AdaptableOptions/SettingsPanelOptions.d.ts +3 -6
  26. package/src/AdaptableOptions/ToolPanelOptions.d.ts +2 -49
  27. package/src/AdaptableOptions/UserInterfaceOptions.d.ts +95 -50
  28. package/src/Api/AdaptableApi.d.ts +6 -3
  29. package/src/Api/ColumnApi.d.ts +9 -4
  30. package/src/Api/ConditionalStyleApi.d.ts +10 -0
  31. package/src/Api/ConfigApi.d.ts +0 -12
  32. package/src/Api/DashboardApi.d.ts +6 -19
  33. package/src/Api/DataSetApi.d.ts +40 -0
  34. package/src/Api/{DataSourceApi.js → DataSetApi.js} +0 -0
  35. package/src/Api/EventApi.d.ts +29 -1
  36. package/src/Api/Events/DataSetChanged.d.ts +5 -0
  37. package/src/{PredefinedConfig/DataSourceState.js → Api/Events/DataSetChanged.js} +0 -0
  38. package/src/Api/Events/RowFormSubmitted.d.ts +19 -0
  39. package/src/{PredefinedConfig/FilterState.js → Api/Events/RowFormSubmitted.js} +0 -0
  40. package/src/Api/Events/SearchChanged.d.ts +4 -5
  41. package/src/Api/ExportApi.d.ts +2 -2
  42. package/src/Api/FilterApi.d.ts +28 -36
  43. package/src/Api/FormatColumnApi.d.ts +6 -0
  44. package/src/Api/GridApi.d.ts +15 -1
  45. package/src/Api/Implementation/AdaptableApiImpl.d.ts +2 -2
  46. package/src/Api/Implementation/AdaptableApiImpl.js +3 -3
  47. package/src/Api/Implementation/AlertApiImpl.js +5 -1
  48. package/src/Api/Implementation/ApiBase.d.ts +3 -0
  49. package/src/Api/Implementation/ApiBase.js +6 -0
  50. package/src/Api/Implementation/ColumnApiImpl.d.ts +4 -4
  51. package/src/Api/Implementation/ColumnApiImpl.js +17 -16
  52. package/src/Api/Implementation/ConditionalStyleApiImpl.d.ts +2 -0
  53. package/src/Api/Implementation/ConditionalStyleApiImpl.js +8 -0
  54. package/src/Api/Implementation/ConfigApiImpl.d.ts +0 -4
  55. package/src/Api/Implementation/ConfigApiImpl.js +2 -24
  56. package/src/Api/Implementation/DashboardApiImpl.d.ts +3 -6
  57. package/src/Api/Implementation/DashboardApiImpl.js +5 -29
  58. package/src/Api/Implementation/DataSetApiImpl.d.ts +12 -0
  59. package/src/Api/Implementation/DataSetApiImpl.js +42 -0
  60. package/src/Api/Implementation/EventApiImpl.js +1 -0
  61. package/src/Api/Implementation/ExportApiImpl.d.ts +2 -2
  62. package/src/Api/Implementation/FilterApiImpl.d.ts +11 -11
  63. package/src/Api/Implementation/FilterApiImpl.js +59 -72
  64. package/src/Api/Implementation/FormatColumnApiImpl.d.ts +1 -0
  65. package/src/Api/Implementation/FormatColumnApiImpl.js +7 -2
  66. package/src/Api/Implementation/GridApiImpl.d.ts +4 -1
  67. package/src/Api/Implementation/GridApiImpl.js +45 -1
  68. package/src/Api/Implementation/InternalApiImpl.d.ts +7 -2
  69. package/src/Api/Implementation/InternalApiImpl.js +51 -10
  70. package/src/Api/Implementation/LayoutApiImpl.d.ts +3 -0
  71. package/src/Api/Implementation/LayoutApiImpl.js +20 -0
  72. package/src/Api/Implementation/PredicateApiImpl.d.ts +2 -0
  73. package/src/Api/Implementation/PredicateApiImpl.js +19 -1
  74. package/src/Api/Implementation/SmartEditApiImpl.d.ts +5 -2
  75. package/src/Api/Implementation/SmartEditApiImpl.js +9 -0
  76. package/src/Api/Implementation/TeamSharingApiImpl.d.ts +5 -3
  77. package/src/Api/Implementation/TeamSharingApiImpl.js +28 -10
  78. package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +1 -1
  79. package/src/Api/Implementation/UserInterfaceApiImpl.js +7 -25
  80. package/src/Api/InternalApi.d.ts +6 -2
  81. package/src/Api/LayoutApi.d.ts +16 -0
  82. package/src/Api/PredicateApi.d.ts +7 -0
  83. package/src/Api/SmartEditApi.d.ts +14 -3
  84. package/src/Api/TeamSharingApi.d.ts +18 -5
  85. package/src/Api/UserInterfaceApi.d.ts +4 -4
  86. package/src/PredefinedConfig/AdaptableState.d.ts +0 -4
  87. package/src/PredefinedConfig/CalculatedColumnState.d.ts +5 -0
  88. package/src/PredefinedConfig/Common/AdaptableButton.d.ts +3 -3
  89. package/src/PredefinedConfig/Common/AdaptableColumn.d.ts +5 -1
  90. package/src/PredefinedConfig/Common/AdaptableForm.d.ts +3 -2
  91. package/src/PredefinedConfig/Common/AdaptableFormat.d.ts +1 -3
  92. package/src/PredefinedConfig/Common/AdaptableObject.d.ts +2 -11
  93. package/src/PredefinedConfig/Common/AdaptablePredicate.js +18 -1
  94. package/src/PredefinedConfig/Common/BaseContext.d.ts +1 -1
  95. package/src/PredefinedConfig/{FilterState.d.ts → Common/ColumnFilter.d.ts} +2 -33
  96. package/src/PredefinedConfig/Common/ColumnFilter.js +2 -0
  97. package/src/PredefinedConfig/Common/Enums.d.ts +2 -2
  98. package/src/PredefinedConfig/Common/Enums.js +1 -1
  99. package/src/PredefinedConfig/Common/FormContext.d.ts +8 -0
  100. package/src/PredefinedConfig/Common/FormContext.js +2 -0
  101. package/src/PredefinedConfig/Common/Types.d.ts +6 -5
  102. package/src/PredefinedConfig/Common/Types.js +2 -3
  103. package/src/PredefinedConfig/LayoutState.d.ts +5 -0
  104. package/src/PredefinedConfig/PredefinedConfig.d.ts +0 -10
  105. package/src/PredefinedConfig/StatusBarState.d.ts +1 -2
  106. package/src/PredefinedConfig/SystemState.d.ts +4 -2
  107. package/src/Redux/ActionsReducers/LayoutRedux.d.ts +47 -0
  108. package/src/Redux/ActionsReducers/LayoutRedux.js +134 -1
  109. package/src/Redux/ActionsReducers/PopupRedux.d.ts +3 -2
  110. package/src/Redux/ActionsReducers/SystemRedux.d.ts +23 -1
  111. package/src/Redux/ActionsReducers/SystemRedux.js +39 -1
  112. package/src/Redux/Store/AdaptableStore.js +37 -39
  113. package/src/Strategy/AdaptableModuleBase.js +1 -2
  114. package/src/Strategy/AlertModule.d.ts +11 -0
  115. package/src/Strategy/AlertModule.js +14 -0
  116. package/src/Strategy/BulkUpdateModule.js +3 -4
  117. package/src/Strategy/CellSummaryModule.d.ts +3 -0
  118. package/src/Strategy/CellSummaryModule.js +29 -16
  119. package/src/Strategy/DataSetModule.d.ts +25 -0
  120. package/src/Strategy/DataSetModule.js +65 -0
  121. package/src/Strategy/ExportModule.js +6 -1
  122. package/src/Strategy/FilterModule.d.ts +7 -11
  123. package/src/Strategy/FilterModule.js +26 -20
  124. package/src/Strategy/FlashingCellModule.d.ts +1 -1
  125. package/src/Strategy/FlashingCellModule.js +2 -2
  126. package/src/Strategy/Interface/IModule.d.ts +3 -1
  127. package/src/Strategy/LayoutModule.js +25 -2
  128. package/src/Strategy/PlusMinusModule.js +1 -4
  129. package/src/Strategy/SmartEditModule.d.ts +1 -1
  130. package/src/Strategy/SmartEditModule.js +7 -8
  131. package/src/Strategy/StatusBarModule.js +1 -3
  132. package/src/Strategy/TeamSharingModule.js +1 -1
  133. package/src/Strategy/ToolPanelModule.js +1 -4
  134. package/src/Utilities/Constants/GeneralConstants.d.ts +8 -2
  135. package/src/Utilities/Constants/GeneralConstants.js +8 -2
  136. package/src/Utilities/Constants/ModuleConstants.d.ts +1 -1
  137. package/src/Utilities/Constants/ModuleConstants.js +2 -2
  138. package/src/Utilities/Defaults/DefaultAdaptableOptions.js +24 -13
  139. package/src/Utilities/Defaults/DefaultSettingsPanel.js +1 -1
  140. package/src/Utilities/Helpers/AdaptableHelper.js +4 -1
  141. package/src/Utilities/ObjectFactory.d.ts +3 -6
  142. package/src/Utilities/ObjectFactory.js +3 -7
  143. package/src/Utilities/Services/CalculatedColumnExpressionService.js +6 -7
  144. package/src/Utilities/Services/EntitlementService.js +7 -1
  145. package/src/Utilities/Services/Interface/IRowEditService.d.ts +8 -0
  146. package/src/Utilities/Services/Interface/IRowEditService.js +2 -0
  147. package/src/Utilities/Services/ModuleService.js +1 -1
  148. package/src/Utilities/Services/ReportService.js +2 -3
  149. package/src/Utilities/Services/RowEditService.d.ts +26 -0
  150. package/src/Utilities/Services/RowEditService.js +197 -0
  151. package/src/Utilities/Services/TeamSharingService.js +4 -4
  152. package/src/View/AdaptablePopover/index.d.ts +1 -0
  153. package/src/View/AdaptablePopover/index.js +5 -6
  154. package/src/View/AdaptableView.js +1 -1
  155. package/src/View/AdaptableViewFactory.js +2 -2
  156. package/src/View/Alert/ActiveAlertsPanel.d.ts +2 -0
  157. package/src/View/Alert/ActiveAlertsPanel.js +15 -0
  158. package/src/View/Alert/AlertStatusSubPanel.js +3 -8
  159. package/src/View/Alert/AlertViewPanel.js +2 -2
  160. package/src/View/Alert/Wizard/AlertDisplayWizardSection.js +1 -1
  161. package/src/View/BulkUpdate/BulkUpdatePopup.js +2 -3
  162. package/src/View/BulkUpdate/BulkUpdateViewPanel.js +1 -1
  163. package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.js +2 -3
  164. package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +13 -7
  165. package/src/View/CellSummary/CellSummaryDetails.js +4 -4
  166. package/src/View/CellSummary/CellSummaryPopover.d.ts +2 -4
  167. package/src/View/CellSummary/CellSummaryPopover.js +3 -6
  168. package/src/View/CellSummary/CellSummaryPopup.js +8 -0
  169. package/src/View/CellSummary/CellSummaryStatusBarSubPanelPopover.js +1 -1
  170. package/src/View/CellSummary/CellSummaryStatusPanel.js +2 -2
  171. package/src/View/CellSummary/CellSummaryViewPanel.js +1 -1
  172. package/src/View/Components/AdaptableObjectList/AdaptableObjectCompactList.js +18 -8
  173. package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +1 -2
  174. package/src/View/Components/ExternalRenderer.d.ts +3 -6
  175. package/src/View/Components/ExternalRenderer.js +5 -5
  176. package/src/View/Components/FilterForm/FilterForm.d.ts +1 -1
  177. package/src/View/Components/FilterForm/FilterForm.js +10 -8
  178. package/src/View/Components/FilterForm/QuickFilterForm.d.ts +1 -1
  179. package/src/View/Components/FilterForm/QuickFilterForm.js +5 -4
  180. package/src/View/Components/FilterForm/getDefaultColumnFilterPredicate.d.ts +1 -1
  181. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupDialog.js +2 -0
  182. package/src/View/Components/Popups/AdaptablePopupAlert.d.ts +0 -2
  183. package/src/View/Components/Popups/AdaptablePopupAlert.js +13 -11
  184. package/src/View/Components/Popups/AdaptableToaster.js +29 -9
  185. package/src/View/Components/Popups/FormPopups/FormPopups.js +2 -2
  186. package/src/View/Components/PreviewResultsPanel.js +3 -3
  187. package/src/View/Components/ToolPanel/AdaptableToolPanel.js +3 -2
  188. package/src/View/Components/ToolPanel/CustomToolPanelContent.js +11 -9
  189. package/src/View/Components/WizardSummaryPage.js +2 -2
  190. package/src/View/Dashboard/CustomDashboardButton.d.ts +11 -0
  191. package/src/View/Dashboard/CustomDashboardButton.js +47 -0
  192. package/src/View/Dashboard/CustomToolbarWrapper.d.ts +1 -0
  193. package/src/View/Dashboard/CustomToolbarWrapper.js +30 -11
  194. package/src/View/Dashboard/Dashboard.d.ts +1 -0
  195. package/src/View/Dashboard/Dashboard.js +8 -34
  196. package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +19 -36
  197. package/src/View/DataChangeHistory/buildActionColumnButton.d.ts +3 -0
  198. package/src/View/DataChangeHistory/buildActionColumnButton.js +70 -0
  199. package/src/View/DataSet/DataSetSelector.d.ts +7 -0
  200. package/src/View/DataSet/DataSetSelector.js +18 -0
  201. package/src/View/DataSet/DataSetStatusPanelPopover.d.ts +2 -0
  202. package/src/View/DataSet/DataSetStatusPanelPopover.js +19 -0
  203. package/src/View/DataSet/DataSetViewPanel.d.ts +19 -0
  204. package/src/View/DataSet/DataSetViewPanel.js +58 -0
  205. package/src/View/Filter/ActiveFiltersPanel.js +1 -1
  206. package/src/View/Filter/FilterSummary.d.ts +5 -5
  207. package/src/View/Filter/FilterSummary.js +5 -4
  208. package/src/View/Filter/FilterViewPanel.d.ts +4 -4
  209. package/src/View/Filter/FilterViewPanel.js +10 -13
  210. package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +5 -7
  211. package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.js +4 -5
  212. package/src/View/GridInfo/ColumnInfoComponent.js +1 -1
  213. package/src/View/GridInfo/GridInfoPopup.js +1 -1
  214. package/src/View/Layout/LayoutStatusBarSubPanelPopover.js +6 -24
  215. package/src/View/Layout/Wizard/LayoutEditor/index.js +1 -1
  216. package/src/View/Layout/Wizard/LayoutEditorWizard.d.ts +2 -1
  217. package/src/View/SmartEdit/SmartEditPopup.d.ts +1 -1
  218. package/src/View/SmartEdit/SmartEditPopup.js +3 -4
  219. package/src/View/SmartEdit/SmartEditViewPanel.d.ts +1 -1
  220. package/src/View/SmartEdit/SmartEditViewPanel.js +3 -4
  221. package/src/View/SpecialColumnSettingsWizardStep.js +1 -1
  222. package/src/View/StatusBar/AdaptableStatusBar.js +1 -1
  223. package/src/View/StatusBar/StatusBarPanel.d.ts +1 -0
  224. package/src/View/StatusBar/StatusBarPanel.js +5 -4
  225. package/src/View/Theme/ThemeStatusPanelPopover.js +5 -25
  226. package/src/View/UIHelper.d.ts +4 -4
  227. package/src/View/UIHelper.js +10 -10
  228. package/src/agGrid/ActionColumnRenderer.d.ts +6 -1
  229. package/src/agGrid/ActionColumnRenderer.js +9 -6
  230. package/src/agGrid/Adaptable.d.ts +7 -2
  231. package/src/agGrid/Adaptable.js +213 -69
  232. package/src/agGrid/FilterWrapper.js +1 -1
  233. package/src/agGrid/agGridHelper.d.ts +7 -8
  234. package/src/agGrid/agGridHelper.js +68 -86
  235. package/src/agGrid/agGridMenuHelper.js +4 -1
  236. package/src/agGrid/rowEditIcons.d.ts +5 -0
  237. package/src/agGrid/rowEditIcons.js +10 -0
  238. package/src/components/AdaptableFormComponent/AdaptableFormComponent.js +9 -18
  239. package/src/components/Dashboard/DashboardToolbar.js +2 -2
  240. package/src/components/Datepicker/index.js +19 -18
  241. package/src/components/InfiniteTable/index.js +1 -0
  242. package/src/components/List/GridList/index.js +1 -1
  243. package/src/components/SelectList.d.ts +10 -0
  244. package/src/components/SelectList.js +9 -0
  245. package/src/components/WindowModal/WindowModal.d.ts +2 -0
  246. package/src/components/WindowModal/WindowModal.js +1 -1
  247. package/src/components/icons/{data-source.d.ts → add-row.d.ts} +0 -0
  248. package/src/components/icons/add-row.js +7 -0
  249. package/src/components/icons/data-set.d.ts +3 -0
  250. package/src/components/icons/{data-source.js → data-set.js} +0 -0
  251. package/src/components/icons/index.js +4 -2
  252. package/src/metamodel/adaptable.metamodel.d.ts +226 -69
  253. package/src/metamodel/adaptable.metamodel.js +532 -311
  254. package/src/types.d.ts +18 -13
  255. package/version.d.ts +1 -1
  256. package/version.js +1 -1
  257. package/src/AdaptableOptions/FormatColumnOptions.d.ts +0 -9
  258. package/src/AdaptableOptions/SmartEdit.d.ts +0 -34
  259. package/src/Api/DataSourceApi.d.ts +0 -58
  260. package/src/Api/Implementation/DataSourceApiImpl.d.ts +0 -15
  261. package/src/Api/Implementation/DataSourceApiImpl.js +0 -51
  262. package/src/PredefinedConfig/DataSourceState.d.ts +0 -34
  263. package/src/Redux/ActionsReducers/DataSourceRedux.d.ts +0 -42
  264. package/src/Redux/ActionsReducers/DataSourceRedux.js +0 -76
  265. package/src/Redux/ActionsReducers/FilterRedux.d.ts +0 -70
  266. package/src/Redux/ActionsReducers/FilterRedux.js +0 -126
  267. package/src/Strategy/DataSourceModule.d.ts +0 -20
  268. package/src/Strategy/DataSourceModule.js +0 -56
  269. package/src/View/Components/Forms/AdaptableForm.d.ts +0 -6
  270. package/src/View/Components/Forms/AdaptableForm.js +0 -21
  271. package/src/View/DataSource/DataSourceViewPanel.d.ts +0 -19
  272. package/src/View/DataSource/DataSourceViewPanel.js +0 -69
  273. package/src/View/DataSource/Wizard/DataSourceSettingsSummary.d.ts +0 -2
  274. package/src/View/DataSource/Wizard/DataSourceSettingsSummary.js +0 -17
  275. package/src/View/DataSource/Wizard/DataSourceSettingsWizard.d.ts +0 -8
  276. package/src/View/DataSource/Wizard/DataSourceSettingsWizard.js +0 -42
  277. package/src/View/DataSource/Wizard/DataSourceWizard.d.ts +0 -8
  278. package/src/View/DataSource/Wizard/DataSourceWizard.js +0 -53
@@ -2,14 +2,12 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.FilterApiImpl = void 0;
4
4
  const tslib_1 = require("tslib");
5
- const FilterRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/FilterRedux"));
5
+ const SystemRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/SystemRedux"));
6
+ const LayoutRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/LayoutRedux"));
6
7
  const ApiBase_1 = require("./ApiBase");
7
8
  const StringExtensions_1 = tslib_1.__importDefault(require("../../Utilities/Extensions/StringExtensions"));
8
9
  const LoggingHelper_1 = require("../../Utilities/Helpers/LoggingHelper");
9
10
  class FilterApiImpl extends ApiBase_1.ApiBase {
10
- getFilterState() {
11
- return this.getAdaptableState().Filter;
12
- }
13
11
  getAllSystemFilterIds() {
14
12
  return this.getFilterOptions().systemFilters;
15
13
  }
@@ -30,12 +28,23 @@ class FilterApiImpl extends ApiBase_1.ApiBase {
30
28
  ...this.adaptable.api.predicateApi.getCustomPredicateDefs(),
31
29
  ].filter((predicateDef) => predicateDef.moduleScope.includes('filter'));
32
30
  }
33
- getAllColumnFilter() {
34
- return this.getFilterState().ColumnFilters;
31
+ showQuickFilterBar() {
32
+ this.dispatchAction(SystemRedux.SystemQuickFilterBarShow());
35
33
  }
36
- getColumnFilterById(id) {
34
+ hideQuickFilterBar() {
35
+ this.dispatchAction(SystemRedux.SystemQuickFilterBarHide());
36
+ }
37
+ isQuickFilterAvailable() {
38
+ return this.adaptable.isQuickFilterAvailable();
39
+ }
40
+ isQuickFilterVisible() {
41
+ return (this.isQuickFilterAvailable() &&
42
+ this.adaptable.api.internalApi.getSystemState().IsQuickFilterVisible);
43
+ }
44
+ getColumnFilters() {
37
45
  var _a;
38
- return (_a = this.getAllColumnFilter()) === null || _a === void 0 ? void 0 : _a.find((columnFilter) => columnFilter.Uuid === id);
46
+ const currentLayout = this.adaptable.api.layoutApi.getCurrentLayout();
47
+ return (_a = currentLayout.ColumnFilters) !== null && _a !== void 0 ? _a : [];
39
48
  }
40
49
  setColumnFilter(columnFilters) {
41
50
  columnFilters.forEach((columnFilter) => {
@@ -49,11 +58,11 @@ class FilterApiImpl extends ApiBase_1.ApiBase {
49
58
  }
50
59
  else {
51
60
  this.addUidToAdaptableObject(columnFilter);
52
- if (this.getAllColumnFilter().find((cf) => cf.ColumnId == columnFilter.ColumnId)) {
53
- this.dispatchAction(FilterRedux.ColumnFilterSet(columnFilter));
61
+ if (this.getColumnFilters().find((cf) => cf.ColumnId == columnFilter.ColumnId)) {
62
+ this.dispatchAction(LayoutRedux.LayoutColumnFilterSet(columnFilter));
54
63
  }
55
64
  else {
56
- this.dispatchAction(FilterRedux.ColumnFilterAdd(columnFilter));
65
+ this.dispatchAction(LayoutRedux.LayoutColumnFilterAdd(columnFilter));
57
66
  }
58
67
  }
59
68
  return columnFilters === null || columnFilters === void 0 ? void 0 : columnFilters.map((columnFilter) => this.getColumnFilterById(columnFilter.Uuid));
@@ -61,19 +70,8 @@ class FilterApiImpl extends ApiBase_1.ApiBase {
61
70
  });
62
71
  return null;
63
72
  }
64
- clearAndSetColumnFilter(columnFilters) {
65
- this.clearAllColumnFilter();
66
- columnFilters.forEach((columnFilter) => {
67
- if (this.getAllColumnFilter().find((cf) => cf.ColumnId == columnFilter.ColumnId)) {
68
- this.dispatchAction(FilterRedux.ColumnFilterSet(columnFilter));
69
- }
70
- else {
71
- this.dispatchAction(FilterRedux.ColumnFilterAdd(columnFilter));
72
- }
73
- });
74
- }
75
73
  clearColumnFilter(columnFilter) {
76
- this.dispatchAction(FilterRedux.ColumnFilterClear(columnFilter));
74
+ this.dispatchAction(LayoutRedux.LayoutColumnFilterClear(columnFilter));
77
75
  }
78
76
  clearColumnFilterByColumns(columns) {
79
77
  columns.forEach((c) => {
@@ -84,17 +82,28 @@ class FilterApiImpl extends ApiBase_1.ApiBase {
84
82
  let columnFiltersForColumn = this.getAllColumnFilterForColumn(column);
85
83
  if (columnFiltersForColumn) {
86
84
  columnFiltersForColumn.forEach((cf) => {
87
- this.dispatchAction(FilterRedux.ColumnFilterClear(cf));
85
+ this.dispatchAction(LayoutRedux.LayoutColumnFilterClear(cf));
88
86
  });
89
87
  this.adaptable.clearColumnFiltering([column]);
90
88
  }
91
89
  }
92
- clearAllColumnFilter() {
93
- this.dispatchAction(FilterRedux.ColumnFilterClearAll());
90
+ clearColumnFilters() {
91
+ this.dispatchAction(LayoutRedux.LayoutColumnFilterClearAll());
94
92
  this.adaptable.clearGridFiltering();
95
93
  }
94
+ clearAndSetColumnFilter(columnFilters) {
95
+ this.clearColumnFilters();
96
+ columnFilters.forEach((columnFilter) => {
97
+ if (this.getColumnFilters().find((cf) => cf.ColumnId == columnFilter.ColumnId)) {
98
+ this.dispatchAction(LayoutRedux.LayoutColumnFilterSet(columnFilter));
99
+ }
100
+ else {
101
+ this.dispatchAction(LayoutRedux.LayoutColumnFilterAdd(columnFilter));
102
+ }
103
+ });
104
+ }
96
105
  getAllColumnFilterForColumn(column) {
97
- let columnFilters = this.getAllColumnFilter();
106
+ let columnFilters = this.getColumnFilters();
98
107
  if (columnFilters) {
99
108
  return columnFilters.filter((cf) => cf.ColumnId == column);
100
109
  }
@@ -102,44 +111,30 @@ class FilterApiImpl extends ApiBase_1.ApiBase {
102
111
  return [];
103
112
  }
104
113
  }
105
- createColumnFilterForCell(columnId, primarykeyValues) {
106
- let cellValues = [];
107
- let predicateId;
108
- if (primarykeyValues.length == 1) {
109
- const normalisedValue = this.adaptable.api.gridApi.getCellNormalisedValue(primarykeyValues[0], columnId);
110
- if (normalisedValue) {
111
- cellValues.push(normalisedValue);
112
- const dataType = this.adaptable.api.columnApi.getColumnDataTypeFromColumnId(columnId);
113
- if (dataType) {
114
- if (dataType == 'Number') {
115
- predicateId = 'Equals';
116
- }
117
- else if (dataType == 'Date') {
118
- predicateId = 'On';
119
- }
120
- else if (dataType == 'String') {
121
- predicateId = 'Is';
122
- }
123
- else {
124
- predicateId = 'Equals';
125
- }
126
- }
127
- }
114
+ createValuesColumnFilterForCells(gridCells) {
115
+ if (!gridCells) {
116
+ return null;
128
117
  }
129
- else {
130
- primarykeyValues.forEach((pk) => {
131
- const displayValue = this.adaptable.api.gridApi.getCellDisplayValue(pk, columnId);
132
- if (displayValue && !cellValues.includes(displayValue)) {
133
- cellValues.push(displayValue);
134
- }
135
- });
136
- predicateId = 'Values';
118
+ const filter = {
119
+ ColumnId: gridCells[0].column.columnId,
120
+ Predicate: {
121
+ PredicateId: 'Values',
122
+ Inputs: [...new Set(gridCells.map((gc) => gc.displayValue))],
123
+ },
124
+ };
125
+ const [savedFilter] = this.setColumnFilter([filter]) || [null];
126
+ return savedFilter;
127
+ }
128
+ createEqualityColumnFilterForCell(gridCell) {
129
+ if (!gridCell) {
130
+ return null;
137
131
  }
132
+ const column = gridCell.column;
138
133
  const filter = {
139
- ColumnId: columnId,
134
+ ColumnId: column.columnId,
140
135
  Predicate: {
141
- PredicateId: predicateId,
142
- Inputs: [...new Set(cellValues)],
136
+ PredicateId: this.adaptable.api.predicateApi.getEqualityPredicateForDataType(column.dataType),
137
+ Inputs: [...new Set([gridCell.rawValue])],
143
138
  },
144
139
  };
145
140
  const [savedFilter] = this.setColumnFilter([filter]) || [null];
@@ -180,17 +175,9 @@ class FilterApiImpl extends ApiBase_1.ApiBase {
180
175
  column,
181
176
  }, true);
182
177
  }
183
- showQuickFilterBar() {
184
- this.dispatchAction(FilterRedux.QuickFilterBarShow());
185
- }
186
- hideQuickFilterBar() {
187
- this.dispatchAction(FilterRedux.QuickFilterBarHide());
188
- }
189
- isQuickFilterAvailable() {
190
- return this.adaptable.isQuickFilterAvailable();
191
- }
192
- isQuickFilterVisible() {
193
- return this.isQuickFilterAvailable() && this.getFilterState().IsQuickFilterVisible;
178
+ getColumnFilterById(id) {
179
+ var _a;
180
+ return (_a = this.getColumnFilters()) === null || _a === void 0 ? void 0 : _a.find((columnFilter) => columnFilter.Uuid === id);
194
181
  }
195
182
  }
196
183
  exports.FilterApiImpl = FilterApiImpl;
@@ -28,6 +28,7 @@ export declare class FormatColumnApiImpl extends ApiBase implements FormatColumn
28
28
  suspendFormatColumn(formatColumn: FormatColumn): FormatColumn;
29
29
  unSuspendFormatColumn(formatColumn: FormatColumn): FormatColumn;
30
30
  applyFormatColumnDisplayFormats(): void;
31
+ getActiveFormatColumnForColumn(column: AdaptableColumn): FormatColumn | undefined;
31
32
  getFormatColumnForColumn(column: AdaptableColumn): FormatColumn | undefined;
32
33
  getFormatColumnForColumnId(columnId: string): FormatColumn | undefined;
33
34
  getFormatColumnWithStyleForColumn(column: AdaptableColumn): FormatColumn | undefined;
@@ -106,6 +106,10 @@ class FormatColumnApiImpl extends ApiBase_1.ApiBase {
106
106
  applyFormatColumnDisplayFormats() {
107
107
  throw 'This API method is deprecated - it is not needed anymore.';
108
108
  }
109
+ getActiveFormatColumnForColumn(column) {
110
+ const formatColumns = this.getAllActiveFormatColumn();
111
+ return this.getAppropriateFormatColumn(formatColumns, column);
112
+ }
109
113
  getFormatColumnForColumn(column) {
110
114
  const formatColumns = this.getAllFormatColumn();
111
115
  return this.getAppropriateFormatColumn(formatColumns, column);
@@ -277,8 +281,9 @@ class FormatColumnApiImpl extends ApiBase_1.ApiBase {
277
281
  return value;
278
282
  }
279
283
  const adaptableOptions = this.adaptable.adaptableOptions;
280
- const customFormattersFromOptions = (_b = adaptableOptions === null || adaptableOptions === void 0 ? void 0 : adaptableOptions.formatColumnOptions) === null || _b === void 0 ? void 0 : _b.customDisplayFormatters;
281
- const customFormatters = columnCustomFormatters.map((customFormatter) => customFormattersFromOptions === null || customFormattersFromOptions === void 0 ? void 0 : customFormattersFromOptions.find((customFormatterOption) => customFormatterOption.id === customFormatter.Id));
284
+ const customFormattersFromOptions = (_b = adaptableOptions === null || adaptableOptions === void 0 ? void 0 : adaptableOptions.userInterfaceOptions) === null || _b === void 0 ? void 0 : _b.customDisplayFormatters;
285
+ // formatters are applied in the order they are defined in the options
286
+ const customFormatters = customFormattersFromOptions.filter((customFormatterOption) => columnCustomFormatters.includes(customFormatterOption.id));
282
287
  return customFormatters.reduce((acc, formatter) => {
283
288
  if (formatter && formatter.handler) {
284
289
  return formatter.handler(acc);
@@ -84,7 +84,7 @@ export declare class GridApiImpl extends ApiBase implements GridApi {
84
84
  isGroupRowNode(rowNode: RowNode): boolean;
85
85
  isQuickFilterAvailable(): boolean;
86
86
  redrawGrid(): void;
87
- fireSearchChangedEvent(searchChangedTrigger: 'DataSource' | 'CurrentQuery' | 'Filter' | 'DataChange' | 'Sort'): void;
87
+ fireSearchChangedEvent(searchChangedTrigger: 'CurrentQuery' | 'Filter' | 'DataChange' | 'Sort'): void;
88
88
  fireCellChangedEvent(cellDataChangedInfo: CellDataChangedInfo): void;
89
89
  fireGridDataChangedEvent(dataRows: any[], rowNodes: RowNode[], rowTrigger: 'Add' | 'Edit' | 'Delete'): void;
90
90
  jumpToRow(primaryKeyValue: any): void;
@@ -103,6 +103,9 @@ export declare class GridApiImpl extends ApiBase implements GridApi {
103
103
  refreshRowNode(rowNode: RowNode): void;
104
104
  refreshRowNodes(rowNodes: RowNode[]): void;
105
105
  areCellsEditable(gridCells: GridCell[]): boolean;
106
+ openEditRowForm(primaryKey: any): void;
107
+ openCreateRowForm(duplicatedRowNodePrimaryKey?: any): void;
108
+ openCloneRowForm(clonedRowNodePrimaryKey?: any): void;
106
109
  getRowCount(): number;
107
110
  getVisibleRowCount(): number;
108
111
  getRowsInViewport(): RowNode[];
@@ -7,6 +7,7 @@ const GridRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/Grid
7
7
  const SystemRedux_1 = require("../../Redux/ActionsReducers/SystemRedux");
8
8
  const ModuleConstants = tslib_1.__importStar(require("../../Utilities/Constants/ModuleConstants"));
9
9
  const LoggingHelper_1 = require("../../Utilities/Helpers/LoggingHelper");
10
+ const PopupRedux_1 = require("../../Redux/ActionsReducers/PopupRedux");
10
11
  class GridApiImpl extends ApiBase_1.ApiBase {
11
12
  getGridState() {
12
13
  return this.getAdaptableState().Grid;
@@ -89,7 +90,7 @@ class GridApiImpl extends ApiBase_1.ApiBase {
89
90
  }
90
91
  clearGridFiltering() {
91
92
  // slightly round the houses but we have to call FilterAPI as it does it properly
92
- this.adaptable.api.filterApi.clearAllColumnFilter();
93
+ this.adaptable.api.filterApi.clearColumnFilters();
93
94
  }
94
95
  getAgGridInstance() {
95
96
  return this.adaptable.adaptableOptions.gridOptions;
@@ -372,6 +373,49 @@ class GridApiImpl extends ApiBase_1.ApiBase {
372
373
  }
373
374
  return true;
374
375
  }
376
+ openEditRowForm(primaryKey) {
377
+ const rowNode = this.adaptable.api.gridApi.getRowNodeForPrimaryKey(primaryKey);
378
+ if (!rowNode) {
379
+ LoggingHelper_1.LogAdaptableWarning(`Can NOT edit row: rowNode not found for primaryKey ${primaryKey}`);
380
+ }
381
+ const editForm = this.adaptable.api.internalApi
382
+ .getRowEditService()
383
+ .buildRowEditForm(rowNode);
384
+ this.dispatchAction(PopupRedux_1.PopupShowForm({
385
+ Id: 'edit_row_form',
386
+ Form: editForm,
387
+ // formProps are added to the formContext
388
+ FormProps: {
389
+ rowNode,
390
+ },
391
+ }));
392
+ }
393
+ openCreateRowForm(duplicatedRowNodePrimaryKey) {
394
+ const createForm = this.adaptable.api.internalApi
395
+ .getRowEditService()
396
+ .buildRowCreateForm();
397
+ this.dispatchAction(PopupRedux_1.PopupShowForm({
398
+ Id: 'create_row_form',
399
+ Form: createForm,
400
+ }));
401
+ }
402
+ openCloneRowForm(clonedRowNodePrimaryKey) {
403
+ const rowNode = this.adaptable.api.gridApi.getRowNodeForPrimaryKey(clonedRowNodePrimaryKey);
404
+ if (!rowNode) {
405
+ LoggingHelper_1.LogAdaptableWarning(`Can NOT clone row: rowNode not found for primaryKey ${clonedRowNodePrimaryKey}`);
406
+ }
407
+ const createForm = this.adaptable.api.internalApi
408
+ .getRowEditService()
409
+ .buildRowCreateForm(rowNode);
410
+ this.dispatchAction(PopupRedux_1.PopupShowForm({
411
+ Id: 'create_row_form',
412
+ Form: createForm,
413
+ // formProps are added to the formContext
414
+ FormProps: {
415
+ clonedRowNode: rowNode,
416
+ },
417
+ }));
418
+ }
375
419
  getRowCount() {
376
420
  return this.adaptable.getRowCount();
377
421
  }
@@ -11,7 +11,7 @@ import { SelectedRowInfo } from '../../PredefinedConfig/Selection/SelectedRowInf
11
11
  import { AdaptableModule, AdaptableQLModule } from '../../PredefinedConfig/Common/Types';
12
12
  import { GridCell } from '../../PredefinedConfig/Selection/GridCell';
13
13
  import { CellDataChangedInfo } from '../../PredefinedConfig/Common/CellDataChangedInfo';
14
- import { AdaptableCellChangedAlert, AdaptableOptions, AdaptableRowChangedAlert, AdaptableState, AlertButtonContext, BaseContext, Layout, LayoutAssociatedObject, SystemStatusMessageInfo } from '../../types';
14
+ import { AdaptableCellChangedAlert, AdaptableOptions, AdaptableRowChangedAlert, AdaptableState, AlertButtonContext, BaseContext, Layout, LayoutAssociatedObject, SystemStatusMessageInfo, SharedEntity, AdaptableIcon } from '../../types';
15
15
  import { IValidationService } from '../../Utilities/Services/Interface/IValidationService';
16
16
  import { IModuleService } from '../../Utilities/Services/Interface/IModuleService';
17
17
  import { IReportService } from '../../Utilities/Services/Interface/IReportService';
@@ -35,6 +35,8 @@ import { AdaptableFrameworkComponent } from '../../AdaptableOptions/AdaptableFra
35
35
  import { IMetamodelService } from '../../Utilities/Services/Interface/IMetamodelService';
36
36
  import { IModuleCollection } from '../../Strategy/Interface/IModule';
37
37
  import { AdaptableObjectTag } from '../../PredefinedConfig/Common/AdaptableObject';
38
+ import { EditLookUpPermittedValues } from '../../../types';
39
+ import { IRowEditService } from '../../Utilities/Services/Interface/IRowEditService';
38
40
  export declare class InternalApiImpl extends ApiBase implements InternalApi {
39
41
  getSystemState(): SystemState;
40
42
  getAdaptableFormFromAlertForm(alertForm: string | AlertButtonForm, context: any, defaultMessageType?: AdaptableMessageType): (Omit<AdaptableForm<AlertButtonContext>, 'buttons'> & {
@@ -97,6 +99,7 @@ export declare class InternalApiImpl extends ApiBase implements InternalApi {
97
99
  getAlertService(): IAlertService;
98
100
  getTeamSharingService(): ITeamSharingService;
99
101
  getMetamodelService(): IMetamodelService;
102
+ getRowEditService(): IRowEditService;
100
103
  getModules(): IModuleCollection;
101
104
  getModuleFriendlyName(adaptableModule: AdaptableModule): string;
102
105
  runModuleInAdaptableQL(adaptableQLModule: AdaptableQLModule): boolean;
@@ -111,10 +114,11 @@ export declare class InternalApiImpl extends ApiBase implements InternalApi {
111
114
  getLabelForButton(button: AdaptableButton<BaseContext>, context: BaseContext): string | undefined;
112
115
  getTooltipForButton(button: AdaptableButton<BaseContext>, context: BaseContext): string | undefined;
113
116
  getStyleForButton(button: AdaptableButton<BaseContext>, context: BaseContext): ButtonStyle | undefined;
117
+ getIconForButton(button: AdaptableButton<BaseContext>, context: BaseContext): AdaptableIcon | undefined;
114
118
  isDocumentationLinksDisplayed(): boolean;
115
119
  getQueryPreviewData(): any;
120
+ getLocalTeamSharingEntities(): SharedEntity[];
116
121
  waitForTeamSharingImportEnd(): Promise<boolean>;
117
- getUserDefinedHeaderName(columnId: string): string;
118
122
  createFrameworkComponent(containerDomNode: HTMLElement, frameworkComponent: AdaptableFrameworkComponent, componentType: 'toolPanel' | 'toolbar'): void;
119
123
  destroyFrameworkComponent(containerDomNode: HTMLElement, frameworkComponent: AdaptableFrameworkComponent, componentType: 'toolPanel' | 'toolbar'): void;
120
124
  initializeDataChangeHistory(): void;
@@ -133,4 +137,5 @@ export declare class InternalApiImpl extends ApiBase implements InternalApi {
133
137
  showSettingsPanel(module: AdaptableModule, moduleParams?: ModuleParams): void;
134
138
  getLabelForTag(adaptableObjectTag: AdaptableObjectTag): string;
135
139
  getValueForTag(adaptableObjectTag: AdaptableObjectTag): string | number;
140
+ getEditLookUpValuesForColumn(editLookUpItem: EditLookUpPermittedValues, column: AdaptableColumn, gridCell?: GridCell): any[] | undefined;
136
141
  }
@@ -288,6 +288,9 @@ class InternalApiImpl extends ApiBase_1.ApiBase {
288
288
  getMetamodelService() {
289
289
  return this.adaptable.MetamodelService;
290
290
  }
291
+ getRowEditService() {
292
+ return this.adaptable.RowEditService;
293
+ }
291
294
  getModules() {
292
295
  return this.adaptable.adaptableModules;
293
296
  }
@@ -357,6 +360,17 @@ class InternalApiImpl extends ApiBase_1.ApiBase {
357
360
  return button.buttonStyle;
358
361
  }
359
362
  }
363
+ getIconForButton(button, context) {
364
+ if (!button.icon) {
365
+ return;
366
+ }
367
+ if (button.icon != null && typeof button.icon === 'function') {
368
+ return button.icon(button, context);
369
+ }
370
+ else {
371
+ return button.icon;
372
+ }
373
+ }
360
374
  isDocumentationLinksDisplayed() {
361
375
  return this.adaptable.adaptableOptions.userInterfaceOptions.showDocumentationLinks;
362
376
  }
@@ -377,6 +391,9 @@ class InternalApiImpl extends ApiBase_1.ApiBase {
377
391
  });
378
392
  return firstRowData;
379
393
  }
394
+ getLocalTeamSharingEntities() {
395
+ return this.getAdaptableState().TeamSharing.SharedEntities;
396
+ }
380
397
  waitForTeamSharingImportEnd() {
381
398
  // we have no deterministic means to ensure the teamsharing import is finished (because the import actions are opaque and may have side-effects)
382
399
  // therefore we will listen for state changes and
@@ -403,9 +420,6 @@ class InternalApiImpl extends ApiBase_1.ApiBase {
403
420
  });
404
421
  });
405
422
  }
406
- getUserDefinedHeaderName(columnId) {
407
- return this.adaptable.getUserDefinedHeaderName(columnId);
408
- }
409
423
  createFrameworkComponent(containerDomNode, frameworkComponent, componentType) {
410
424
  const createComponentFn = () =>
411
425
  // delegate the logic to framework wrapper
@@ -519,10 +533,11 @@ class InternalApiImpl extends ApiBase_1.ApiBase {
519
533
  }
520
534
  if (typeof this.adaptable.adaptableOptions.userInterfaceOptions.objectTags === 'function') {
521
535
  // sanitize the provided tags, just to be sure that the user does NOT break the UI
522
- return (this.adaptable.adaptableOptions.userInterfaceOptions
523
- .objectTags(this.adaptable.api)
524
- // jw - not sure how to check here only for when its a object and then do check
525
- .filter((tag) => typeof tag == 'string' ? tag : tag.value != undefined && (tag === null || tag === void 0 ? void 0 : tag.label) != undefined));
536
+ return this.adaptable.adaptableOptions.userInterfaceOptions
537
+ .objectTags({
538
+ adaptableApi: this.adaptable.api,
539
+ })
540
+ .filter((tag) => typeof tag === 'string');
526
541
  }
527
542
  }
528
543
  getLayoutTags() {
@@ -545,7 +560,7 @@ class InternalApiImpl extends ApiBase_1.ApiBase {
545
560
  };
546
561
  const customGeneratedTags = this.adaptable.adaptableOptions.layoutOptions.layoutTagOptions.autoGenerateTagsForLayouts(autoGenerateTagsForLayoutsContext);
547
562
  // sanitize the provided tags, just to be sure that the user does NOT break the UI
548
- return customGeneratedTags.filter((tag) => typeof tag == 'string' ? tag : tag.value != undefined && (tag === null || tag === void 0 ? void 0 : tag.label) != undefined);
563
+ return customGeneratedTags.filter((tag) => typeof tag === 'string');
549
564
  }
550
565
  }
551
566
  // General way to get to store from inside Adaptable...
@@ -557,10 +572,36 @@ class InternalApiImpl extends ApiBase_1.ApiBase {
557
572
  this.showModulePopup(module, moduleParams);
558
573
  }
559
574
  getLabelForTag(adaptableObjectTag) {
560
- return typeof adaptableObjectTag == 'string' ? adaptableObjectTag : adaptableObjectTag.label;
575
+ // not very interesting right now, but useful later when tag is not only a plain string
576
+ return adaptableObjectTag;
561
577
  }
562
578
  getValueForTag(adaptableObjectTag) {
563
- return typeof adaptableObjectTag == 'string' ? adaptableObjectTag : adaptableObjectTag.value;
579
+ // not very interesting right now, but useful later when tag is not only a plain string
580
+ return adaptableObjectTag;
581
+ }
582
+ getEditLookUpValuesForColumn(editLookUpItem, column, gridCell) {
583
+ if (!editLookUpItem || !column) {
584
+ return undefined;
585
+ }
586
+ let editLookUpValues = editLookUpItem.values;
587
+ // first do the function then get hardcoded items
588
+ if (editLookUpValues != null && typeof editLookUpValues === 'function') {
589
+ const editLookUpContext = {
590
+ adaptableApi: this.adaptable.api,
591
+ column: column,
592
+ gridCell,
593
+ };
594
+ return editLookUpValues(editLookUpContext);
595
+ }
596
+ else {
597
+ let arr = editLookUpValues;
598
+ if (arr && ArrayExtensions_1.default.IsNotNullOrEmpty(arr)) {
599
+ return arr;
600
+ }
601
+ }
602
+ // if no hard-coded values or function provided then just get the distinct values for the column
603
+ // this will use the columnApi method that first looks for permitted values and then distinct values
604
+ return this.adaptable.api.columnApi.getDistinctDisplayValuesForColumn(column.columnId);
564
605
  }
565
606
  }
566
607
  exports.InternalApiImpl = InternalApiImpl;
@@ -42,4 +42,7 @@ export declare class LayoutApiImpl extends ApiBase implements LayoutApi {
42
42
  isCurrentLayoutDefault(): boolean;
43
43
  areExpandedRowGroupsSavedInLayouts(): boolean;
44
44
  isObjectAvailableInCurrentLayout(adaptableObject: LayoutAssociatedObject): boolean;
45
+ removeColumnFromCurrentLayout(columnId: string): void;
46
+ removeColumnFromAllLayouts(columnId: string): void;
47
+ removeColumnFromLayout(columnId: string, layoutName: string): void;
45
48
  }
@@ -321,5 +321,25 @@ class LayoutApiImpl extends ApiBase_1.ApiBase {
321
321
  ? true
322
322
  : (_a = adaptableObject.Tags) === null || _a === void 0 ? void 0 : _a.map((tag) => tag).includes(this.getCurrentLayoutName());
323
323
  }
324
+ removeColumnFromCurrentLayout(columnId) {
325
+ this.removeColumnFromLayout(columnId, this.getCurrentLayoutName());
326
+ }
327
+ removeColumnFromAllLayouts(columnId) {
328
+ this.getAllLayout().forEach((layout) => {
329
+ this.removeColumnFromLayout(columnId, layout.Name);
330
+ });
331
+ }
332
+ removeColumnFromLayout(columnId, layoutName) {
333
+ const column = this.getAdaptableApi().columnApi.getColumnFromId(columnId);
334
+ if (column) {
335
+ const layout = this.getLayoutByName(layoutName);
336
+ if (layout) {
337
+ if (layout.Columns.includes(columnId)) {
338
+ this.dispatchAction(LayoutRedux.LayouRemoveColumn(layoutName, columnId));
339
+ this.getAdaptableApi().columnApi.hideColumn(columnId);
340
+ }
341
+ }
342
+ }
343
+ }
324
344
  }
325
345
  exports.LayoutApiImpl = LayoutApiImpl;
@@ -1,6 +1,7 @@
1
1
  import { ApiBase } from './ApiBase';
2
2
  import { PredicateApi } from '../PredicateApi';
3
3
  import { AdaptablePredicateDef, AdaptablePredicate, PredicateDefHandlerParams, ModuleScope } from '../../PredefinedConfig/Common/AdaptablePredicate';
4
+ import { AdaptableColumnDataType, SystemFilterPredicateId } from '../../types';
4
5
  export declare class PredicateApiImpl extends ApiBase implements PredicateApi {
5
6
  getPredicateDefs(): AdaptablePredicateDef[];
6
7
  getSystemPredicateDefs(): AdaptablePredicateDef[];
@@ -12,4 +13,5 @@ export declare class PredicateApiImpl extends ApiBase implements PredicateApi {
12
13
  predicateToString(predicate: AdaptablePredicate): string | undefined;
13
14
  isValidPredicate(predicate: AdaptablePredicate | undefined): boolean;
14
15
  handlePredicate(predicate: AdaptablePredicate | undefined, params: Omit<PredicateDefHandlerParams, 'api' | 'inputs'>, defaultReturn: boolean): boolean;
16
+ getEqualityPredicateForDataType(dataType: AdaptableColumnDataType): SystemFilterPredicateId;
15
17
  }
@@ -15,7 +15,7 @@ class PredicateApiImpl extends ApiBase_1.ApiBase {
15
15
  return AdaptablePredicate_1.SystemPredicateDefs;
16
16
  }
17
17
  getCustomPredicateDefs() {
18
- return this.adaptable.adaptableOptions.customPredicateDefs;
18
+ return this.getAdaptableQLOptions().customPredicateDefs;
19
19
  }
20
20
  getPredicateDefsByModuleScope(moduleScope) {
21
21
  return this.getPredicateDefs().filter((p) => p.moduleScope.includes(moduleScope));
@@ -78,5 +78,23 @@ class PredicateApiImpl extends ApiBase_1.ApiBase {
78
78
  return false;
79
79
  }
80
80
  }
81
+ getEqualityPredicateForDataType(dataType) {
82
+ let predicateId;
83
+ switch (dataType) {
84
+ case 'Number':
85
+ predicateId = 'Equals';
86
+ break;
87
+ case 'Date':
88
+ predicateId = 'On';
89
+ break;
90
+ case 'String':
91
+ predicateId = 'Is';
92
+ break;
93
+ default:
94
+ predicateId = 'Equals';
95
+ break;
96
+ }
97
+ return predicateId;
98
+ }
81
99
  }
82
100
  exports.PredicateApiImpl = PredicateApiImpl;
@@ -1,12 +1,15 @@
1
1
  import { ApiBase } from './ApiBase';
2
+ import { MathOperation } from '../../PredefinedConfig/Common/Enums';
2
3
  import { SmartEditApi } from '../SmartEditApi';
3
4
  import { GridCell } from '../../PredefinedConfig/Selection/GridCell';
4
- import { SmartEditOperation } from '../../AdaptableOptions/SmartEdit';
5
+ import { SmartEditCustomOperation, SmartEditOperation } from '../../AdaptableOptions/EditOptions';
5
6
  export declare class SmartEditApiImpl extends ApiBase implements SmartEditApi {
6
- setSmartEditOperation(mathOperation: SmartEditOperation): void;
7
+ setSmartEditOperation(mathOperation: MathOperation): void;
7
8
  getSmartEditOperation(): SmartEditOperation;
8
9
  setSmartEditValue(smartEditValue: number): void;
9
10
  getSmartEditValue(): number;
10
11
  showSmartEditPopup(): void;
11
12
  applySmartEdit(gridCells: GridCell[]): void;
13
+ getSmartEditCustomOperations(): SmartEditCustomOperation[] | undefined;
14
+ setCustomSmartEditOperation(customOperationName: string): void;
12
15
  }
@@ -25,5 +25,14 @@ class SmartEditApiImpl extends ApiBase_1.ApiBase {
25
25
  applySmartEdit(gridCells) {
26
26
  this.dispatchAction(SmartEditRedux.SmartEditApply(gridCells));
27
27
  }
28
+ getSmartEditCustomOperations() {
29
+ return this.getEditOptions().smartEditCustomOperations;
30
+ }
31
+ setCustomSmartEditOperation(customOperationName) {
32
+ const customOperation = this.getSmartEditCustomOperations().find((so) => so.name == customOperationName);
33
+ if (customOperation) {
34
+ this.dispatchAction(SystemRedux.SmartEditChangeOperation(customOperation));
35
+ }
36
+ }
28
37
  }
29
38
  exports.SmartEditApiImpl = SmartEditApiImpl;
@@ -1,13 +1,15 @@
1
1
  import { ApiBase } from './ApiBase';
2
2
  import { TeamSharingApi } from '../TeamSharingApi';
3
- import { TeamSharingState, SharedEntity, AdaptableModule, AdaptableObject, SharedEntityConfig } from '../../types';
3
+ import { SharedEntity, AdaptableModule, AdaptableObject, SharedEntityConfig } from '../../types';
4
4
  export declare class TeamSharingApiImpl extends ApiBase implements TeamSharingApi {
5
- getTeamSharingState(): TeamSharingState;
6
- getSharedEntities(): SharedEntity[];
5
+ getSharedEntities(): Promise<SharedEntity[]>;
6
+ setSharedEntities(sharedEntities: SharedEntity[]): Promise<boolean>;
7
+ isTeamSharingAvailable(): boolean;
7
8
  isTeamSharingActivated(): boolean;
8
9
  hasTeamSharingFullRights(): boolean;
9
10
  checkForUpdates(): void;
10
11
  showTeamSharingPopup(): void;
11
12
  fireTeamSharingEntityChangedEvent(sharedEntity: SharedEntity): void;
12
13
  shareEntity(entity: AdaptableObject, module: AdaptableModule, sharedEntityConfig: SharedEntityConfig): void;
14
+ unshareEntity(entityId: string): void;
13
15
  }