@adaptabletools/adaptable 11.3.0 → 12.0.0-canary.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (229) hide show
  1. package/base.css +22 -4
  2. package/bundle.cjs.js +108 -108
  3. package/index.css +26 -4
  4. package/package.json +1 -1
  5. package/publishTimestamp.d.ts +1 -1
  6. package/publishTimestamp.js +1 -1
  7. package/src/AdaptableInterfaces/IAdaptable.d.ts +4 -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 +2 -2
  19. package/src/AdaptableOptions/EntitlementOptions.d.ts +7 -1
  20. package/src/AdaptableOptions/ExportOptions.d.ts +5 -1
  21. package/src/AdaptableOptions/FilterOptions.d.ts +6 -1
  22. package/src/AdaptableOptions/GeneralOptions.d.ts +22 -23
  23. package/src/AdaptableOptions/{MasterDetailAgGridPluginOptions.d.ts → MasterDetailPluginOptions.d.ts} +2 -4
  24. package/src/{Api/DataSourceApi.js → AdaptableOptions/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 +75 -62
  28. package/src/Api/AdaptableApi.d.ts +6 -3
  29. package/src/Api/ColumnApi.d.ts +2 -2
  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/{PredefinedConfig/DataSourceState.js → Api/DataSetApi.js} +0 -0
  35. package/src/Api/EventApi.d.ts +15 -1
  36. package/src/Api/Events/DataSetChanged.d.ts +5 -0
  37. package/src/{PredefinedConfig/FilterState.js → Api/Events/DataSetChanged.js} +0 -0
  38. package/src/Api/Events/SearchChanged.d.ts +3 -4
  39. package/src/Api/FilterApi.d.ts +1 -77
  40. package/src/Api/GridApi.d.ts +1 -1
  41. package/src/Api/Implementation/AdaptableApiImpl.d.ts +2 -2
  42. package/src/Api/Implementation/AdaptableApiImpl.js +3 -3
  43. package/src/Api/Implementation/AlertApiImpl.js +5 -1
  44. package/src/Api/Implementation/ApiBase.d.ts +3 -0
  45. package/src/Api/Implementation/ApiBase.js +6 -0
  46. package/src/Api/Implementation/ColumnApiImpl.d.ts +2 -2
  47. package/src/Api/Implementation/ColumnApiImpl.js +2 -2
  48. package/src/Api/Implementation/ConditionalStyleApiImpl.d.ts +2 -0
  49. package/src/Api/Implementation/ConditionalStyleApiImpl.js +8 -0
  50. package/src/Api/Implementation/ConfigApiImpl.d.ts +0 -4
  51. package/src/Api/Implementation/ConfigApiImpl.js +2 -24
  52. package/src/Api/Implementation/DashboardApiImpl.d.ts +3 -6
  53. package/src/Api/Implementation/DashboardApiImpl.js +5 -29
  54. package/src/Api/Implementation/DataSetApiImpl.d.ts +12 -0
  55. package/src/Api/Implementation/DataSetApiImpl.js +42 -0
  56. package/src/Api/Implementation/EventApiImpl.js +1 -0
  57. package/src/Api/Implementation/FilterApiImpl.d.ts +1 -16
  58. package/src/Api/Implementation/FilterApiImpl.js +5 -159
  59. package/src/Api/Implementation/FormatColumnApiImpl.js +1 -1
  60. package/src/Api/Implementation/GridApiImpl.d.ts +1 -1
  61. package/src/Api/Implementation/GridApiImpl.js +1 -1
  62. package/src/Api/Implementation/InternalApiImpl.d.ts +3 -2
  63. package/src/Api/Implementation/InternalApiImpl.js +14 -3
  64. package/src/Api/Implementation/LayoutApiImpl.d.ts +18 -1
  65. package/src/Api/Implementation/LayoutApiImpl.js +172 -0
  66. package/src/Api/Implementation/PredicateApiImpl.js +1 -1
  67. package/src/Api/Implementation/SmartEditApiImpl.d.ts +3 -1
  68. package/src/Api/Implementation/SmartEditApiImpl.js +6 -0
  69. package/src/Api/Implementation/TeamSharingApiImpl.d.ts +5 -3
  70. package/src/Api/Implementation/TeamSharingApiImpl.js +28 -10
  71. package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +1 -1
  72. package/src/Api/Implementation/UserInterfaceApiImpl.js +4 -4
  73. package/src/Api/InternalApi.d.ts +3 -2
  74. package/src/Api/LayoutApi.d.ts +88 -1
  75. package/src/Api/SmartEditApi.d.ts +8 -2
  76. package/src/Api/TeamSharingApi.d.ts +18 -5
  77. package/src/Api/UserInterfaceApi.d.ts +4 -4
  78. package/src/PredefinedConfig/AdaptableState.d.ts +0 -4
  79. package/src/PredefinedConfig/Common/AdaptableButton.d.ts +3 -3
  80. package/src/PredefinedConfig/Common/AdaptableColumn.d.ts +5 -1
  81. package/src/PredefinedConfig/Common/AdaptablePredicate.js +18 -1
  82. package/src/PredefinedConfig/{FilterState.d.ts → Common/ColumnFilter.d.ts} +2 -33
  83. package/src/PredefinedConfig/Common/ColumnFilter.js +2 -0
  84. package/src/PredefinedConfig/Common/Enums.d.ts +2 -2
  85. package/src/PredefinedConfig/Common/Enums.js +1 -1
  86. package/src/PredefinedConfig/Common/Types.d.ts +6 -5
  87. package/src/PredefinedConfig/Common/Types.js +2 -3
  88. package/src/PredefinedConfig/LayoutState.d.ts +5 -0
  89. package/src/PredefinedConfig/PredefinedConfig.d.ts +0 -10
  90. package/src/PredefinedConfig/StatusBarState.d.ts +1 -2
  91. package/src/PredefinedConfig/SystemState.d.ts +3 -0
  92. package/src/Redux/ActionsReducers/LayoutRedux.d.ts +47 -0
  93. package/src/Redux/ActionsReducers/LayoutRedux.js +135 -1
  94. package/src/Redux/ActionsReducers/SystemRedux.d.ts +22 -0
  95. package/src/Redux/ActionsReducers/SystemRedux.js +39 -1
  96. package/src/Redux/Store/AdaptableStore.js +37 -39
  97. package/src/Strategy/AlertModule.d.ts +11 -0
  98. package/src/Strategy/AlertModule.js +14 -0
  99. package/src/Strategy/CellSummaryModule.d.ts +3 -0
  100. package/src/Strategy/CellSummaryModule.js +28 -14
  101. package/src/Strategy/DataSetModule.d.ts +25 -0
  102. package/src/Strategy/DataSetModule.js +65 -0
  103. package/src/Strategy/ExportModule.js +6 -1
  104. package/src/Strategy/FilterModule.d.ts +7 -11
  105. package/src/Strategy/FilterModule.js +24 -15
  106. package/src/Strategy/FlashingCellModule.d.ts +1 -1
  107. package/src/Strategy/FlashingCellModule.js +2 -2
  108. package/src/Strategy/Interface/IModule.d.ts +3 -1
  109. package/src/Strategy/LayoutModule.js +24 -2
  110. package/src/Strategy/SmartEditModule.js +1 -1
  111. package/src/Strategy/StatusBarModule.js +1 -3
  112. package/src/Strategy/TeamSharingModule.js +1 -1
  113. package/src/Strategy/ToolPanelModule.js +1 -4
  114. package/src/Utilities/Constants/GeneralConstants.d.ts +6 -2
  115. package/src/Utilities/Constants/GeneralConstants.js +6 -2
  116. package/src/Utilities/Constants/ModuleConstants.d.ts +1 -1
  117. package/src/Utilities/Constants/ModuleConstants.js +2 -2
  118. package/src/Utilities/Defaults/DefaultAdaptableOptions.js +15 -15
  119. package/src/Utilities/Defaults/DefaultSettingsPanel.js +1 -1
  120. package/src/Utilities/Helpers/AdaptableHelper.js +3 -1
  121. package/src/Utilities/ObjectFactory.d.ts +3 -6
  122. package/src/Utilities/ObjectFactory.js +3 -7
  123. package/src/Utilities/Services/EntitlementService.js +7 -1
  124. package/src/Utilities/Services/ModuleService.js +1 -1
  125. package/src/Utilities/Services/ReportService.js +2 -3
  126. package/src/Utilities/Services/TeamSharingService.js +4 -4
  127. package/src/View/AdaptablePopover/index.d.ts +1 -0
  128. package/src/View/AdaptablePopover/index.js +5 -6
  129. package/src/View/AdaptableView.js +1 -1
  130. package/src/View/AdaptableViewFactory.js +2 -2
  131. package/src/View/Alert/ActiveAlertsPanel.d.ts +2 -0
  132. package/src/View/Alert/ActiveAlertsPanel.js +15 -0
  133. package/src/View/Alert/AlertStatusSubPanel.js +3 -8
  134. package/src/View/Alert/AlertViewPanel.js +2 -2
  135. package/src/View/Alert/Wizard/AlertDisplayWizardSection.js +1 -1
  136. package/src/View/BulkUpdate/BulkUpdateViewPanel.js +1 -1
  137. package/src/View/CellSummary/CellSummaryDetails.js +2 -2
  138. package/src/View/CellSummary/CellSummaryPopover.d.ts +2 -4
  139. package/src/View/CellSummary/CellSummaryPopover.js +3 -6
  140. package/src/View/CellSummary/CellSummaryPopup.js +8 -0
  141. package/src/View/CellSummary/CellSummaryStatusBarSubPanelPopover.js +1 -1
  142. package/src/View/CellSummary/CellSummaryStatusPanel.js +2 -2
  143. package/src/View/CellSummary/CellSummaryViewPanel.js +1 -1
  144. package/src/View/Components/AdaptableObjectList/AdaptableObjectCompactList.js +18 -8
  145. package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +1 -2
  146. package/src/View/Components/ExternalRenderer.d.ts +3 -6
  147. package/src/View/Components/ExternalRenderer.js +5 -5
  148. package/src/View/Components/FilterForm/FilterForm.d.ts +1 -1
  149. package/src/View/Components/FilterForm/FilterForm.js +9 -7
  150. package/src/View/Components/FilterForm/QuickFilterForm.d.ts +1 -1
  151. package/src/View/Components/FilterForm/QuickFilterForm.js +6 -5
  152. package/src/View/Components/FilterForm/getDefaultColumnFilterPredicate.d.ts +1 -1
  153. package/src/View/Components/Popups/AdaptablePopupAlert.d.ts +0 -2
  154. package/src/View/Components/Popups/AdaptablePopupAlert.js +13 -11
  155. package/src/View/Components/Popups/AdaptableToaster.js +29 -9
  156. package/src/View/Components/ToolPanel/AdaptableToolPanel.js +3 -2
  157. package/src/View/Components/ToolPanel/CustomToolPanelContent.js +11 -9
  158. package/src/View/Dashboard/CustomDashboardButton.d.ts +11 -0
  159. package/src/View/Dashboard/CustomDashboardButton.js +47 -0
  160. package/src/View/Dashboard/CustomToolbarWrapper.d.ts +1 -0
  161. package/src/View/Dashboard/CustomToolbarWrapper.js +30 -11
  162. package/src/View/Dashboard/Dashboard.d.ts +1 -0
  163. package/src/View/Dashboard/Dashboard.js +8 -34
  164. package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +19 -36
  165. package/src/View/DataChangeHistory/buildActionColumnButton.d.ts +3 -0
  166. package/src/View/DataChangeHistory/buildActionColumnButton.js +70 -0
  167. package/src/View/DataSet/DataSetSelector.d.ts +7 -0
  168. package/src/View/DataSet/DataSetSelector.js +18 -0
  169. package/src/View/DataSet/DataSetStatusPanelPopover.d.ts +2 -0
  170. package/src/View/DataSet/DataSetStatusPanelPopover.js +19 -0
  171. package/src/View/DataSet/DataSetViewPanel.d.ts +19 -0
  172. package/src/View/DataSet/DataSetViewPanel.js +58 -0
  173. package/src/View/Filter/ActiveFiltersPanel.js +1 -1
  174. package/src/View/Filter/FilterSummary.d.ts +5 -5
  175. package/src/View/Filter/FilterSummary.js +6 -5
  176. package/src/View/Filter/FilterViewPanel.d.ts +4 -4
  177. package/src/View/Filter/FilterViewPanel.js +11 -14
  178. package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +1 -1
  179. package/src/View/GridInfo/GridInfoPopup.js +1 -1
  180. package/src/View/Layout/LayoutStatusBarSubPanelPopover.js +6 -24
  181. package/src/View/Layout/Wizard/LayoutEditor/index.js +1 -1
  182. package/src/View/Layout/Wizard/LayoutEditorWizard.d.ts +1 -0
  183. package/src/View/SmartEdit/SmartEditPopup.js +2 -2
  184. package/src/View/SmartEdit/SmartEditViewPanel.js +2 -2
  185. package/src/View/SpecialColumnSettingsWizardStep.js +1 -1
  186. package/src/View/StatusBar/AdaptableStatusBar.js +1 -1
  187. package/src/View/StatusBar/StatusBarPanel.d.ts +1 -0
  188. package/src/View/StatusBar/StatusBarPanel.js +5 -4
  189. package/src/View/Theme/ThemeStatusPanelPopover.js +5 -25
  190. package/src/View/UIHelper.d.ts +4 -4
  191. package/src/View/UIHelper.js +4 -4
  192. package/src/agGrid/ActionColumnRenderer.js +3 -2
  193. package/src/agGrid/Adaptable.d.ts +4 -2
  194. package/src/agGrid/Adaptable.js +79 -52
  195. package/src/agGrid/FilterWrapper.js +1 -1
  196. package/src/agGrid/agGridHelper.d.ts +6 -6
  197. package/src/agGrid/agGridHelper.js +34 -56
  198. package/src/agGrid/agGridMenuHelper.js +4 -1
  199. package/src/components/AdaptableFormComponent/AdaptableFormComponent.js +3 -2
  200. package/src/components/Dashboard/DashboardToolbar.js +2 -2
  201. package/src/components/SelectList.d.ts +10 -0
  202. package/src/components/SelectList.js +9 -0
  203. package/src/components/icons/{data-source.d.ts → data-set.d.ts} +0 -0
  204. package/src/components/icons/{data-source.js → data-set.js} +0 -0
  205. package/src/components/icons/index.js +2 -2
  206. package/src/metamodel/adaptable.metamodel.d.ts +162 -77
  207. package/src/metamodel/adaptable.metamodel.js +422 -375
  208. package/src/types.d.ts +15 -12
  209. package/version.d.ts +1 -1
  210. package/version.js +1 -1
  211. package/src/AdaptableOptions/FormatColumnOptions.d.ts +0 -10
  212. package/src/Api/DataSourceApi.d.ts +0 -58
  213. package/src/Api/Implementation/DataSourceApiImpl.d.ts +0 -15
  214. package/src/Api/Implementation/DataSourceApiImpl.js +0 -51
  215. package/src/PredefinedConfig/DataSourceState.d.ts +0 -34
  216. package/src/Redux/ActionsReducers/DataSourceRedux.d.ts +0 -42
  217. package/src/Redux/ActionsReducers/DataSourceRedux.js +0 -76
  218. package/src/Redux/ActionsReducers/FilterRedux.d.ts +0 -70
  219. package/src/Redux/ActionsReducers/FilterRedux.js +0 -126
  220. package/src/Strategy/DataSourceModule.d.ts +0 -20
  221. package/src/Strategy/DataSourceModule.js +0 -56
  222. package/src/View/DataSource/DataSourceViewPanel.d.ts +0 -19
  223. package/src/View/DataSource/DataSourceViewPanel.js +0 -69
  224. package/src/View/DataSource/Wizard/DataSourceSettingsSummary.d.ts +0 -2
  225. package/src/View/DataSource/Wizard/DataSourceSettingsSummary.js +0 -17
  226. package/src/View/DataSource/Wizard/DataSourceSettingsWizard.d.ts +0 -8
  227. package/src/View/DataSource/Wizard/DataSourceSettingsWizard.js +0 -42
  228. package/src/View/DataSource/Wizard/DataSourceWizard.d.ts +0 -8
  229. package/src/View/DataSource/Wizard/DataSourceWizard.js +0 -53
@@ -3,7 +3,8 @@ import { LayoutApi } from '../LayoutApi';
3
3
  import { LayoutState, Layout } from '../../PredefinedConfig/LayoutState';
4
4
  import { AdaptableColumn } from '../../PredefinedConfig/Common/AdaptableColumn';
5
5
  import { ColumnSort } from '../../PredefinedConfig/Common/ColumnSort';
6
- import { LayoutAssociatedObject } from '../../types';
6
+ import { ColumnFilter, LayoutAssociatedObject } from '../../types';
7
+ import { RowNode } from '@ag-grid-community/all-modules';
7
8
  export declare class LayoutApiImpl extends ApiBase implements LayoutApi {
8
9
  getLayoutState(): LayoutState;
9
10
  shouldAutoSaveLayout: (layout?: Layout) => boolean;
@@ -42,4 +43,20 @@ export declare class LayoutApiImpl extends ApiBase implements LayoutApi {
42
43
  isCurrentLayoutDefault(): boolean;
43
44
  areExpandedRowGroupsSavedInLayouts(): boolean;
44
45
  isObjectAvailableInCurrentLayout(adaptableObject: LayoutAssociatedObject): boolean;
46
+ getAllColumnFilter(): ColumnFilter[];
47
+ getColumnFilterById(id: ColumnFilter['Uuid']): ColumnFilter;
48
+ setColumnFilter(columnFilters: ColumnFilter[]): ColumnFilter[] | null;
49
+ clearColumnFilter(columnFilter: ColumnFilter): void;
50
+ clearColumnFilterByColumns(columns: string[]): void;
51
+ clearColumnFilterByColumn(column: string): void;
52
+ clearAllColumnFilter(): void;
53
+ clearAndSetColumnFilter(columnFilters: ColumnFilter[]): void;
54
+ getAllColumnFilterForColumn(column: string): ColumnFilter[];
55
+ createColumnFilterForCell(columnId: string, primarykeyValues: any[]): ColumnFilter | null;
56
+ columnFilterToString(columnFilter: ColumnFilter): string;
57
+ columnFiltersToString(columnFilters: ColumnFilter[]): string;
58
+ evaluateColumnFilter(columnFilter: ColumnFilter, node: RowNode): boolean;
59
+ removeColumnFromCurrentLayout(columnId: string): void;
60
+ removeColumnFromAllLayouts(columnId: string): void;
61
+ removeColumnFromLayout(columnId: string, layoutName: string): void;
45
62
  }
@@ -321,5 +321,177 @@ 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
+ getAllColumnFilter() {
325
+ var _a;
326
+ const currentLayout = this.getCurrentLayout();
327
+ return (_a = currentLayout.ColumnFilters) !== null && _a !== void 0 ? _a : [];
328
+ }
329
+ getColumnFilterById(id) {
330
+ var _a;
331
+ return (_a = this.getAllColumnFilter()) === null || _a === void 0 ? void 0 : _a.find((columnFilter) => columnFilter.Uuid === id);
332
+ }
333
+ setColumnFilter(columnFilters) {
334
+ columnFilters.forEach((columnFilter) => {
335
+ if (!columnFilter.Predicate) {
336
+ LoggingHelper_1.LogAdaptableWarning('Column Filter has no Predicate', columnFilter);
337
+ }
338
+ else {
339
+ const isValidPredicate = this.adaptable.api.predicateApi.isValidPredicate(columnFilter.Predicate);
340
+ if (!isValidPredicate) {
341
+ LoggingHelper_1.LogAdaptableWarning('Column Filter Predicate is not valid', columnFilter);
342
+ }
343
+ else {
344
+ this.addUidToAdaptableObject(columnFilter);
345
+ if (this.getAllColumnFilter().find((cf) => cf.ColumnId == columnFilter.ColumnId)) {
346
+ this.dispatchAction(LayoutRedux.LayoutColumnFilterSet(columnFilter));
347
+ }
348
+ else {
349
+ this.dispatchAction(LayoutRedux.LayoutColumnFilterAdd(columnFilter));
350
+ }
351
+ }
352
+ return columnFilters === null || columnFilters === void 0 ? void 0 : columnFilters.map((columnFilter) => this.getColumnFilterById(columnFilter.Uuid));
353
+ }
354
+ });
355
+ return null;
356
+ }
357
+ clearColumnFilter(columnFilter) {
358
+ this.dispatchAction(LayoutRedux.LayoutColumnFilterClear(columnFilter));
359
+ }
360
+ clearColumnFilterByColumns(columns) {
361
+ columns.forEach((c) => {
362
+ this.clearColumnFilterByColumn(c);
363
+ });
364
+ }
365
+ clearColumnFilterByColumn(column) {
366
+ let columnFiltersForColumn = this.getAllColumnFilterForColumn(column);
367
+ if (columnFiltersForColumn) {
368
+ columnFiltersForColumn.forEach((cf) => {
369
+ this.dispatchAction(LayoutRedux.LayoutColumnFilterClear(cf));
370
+ });
371
+ this.adaptable.clearColumnFiltering([column]);
372
+ }
373
+ }
374
+ clearAllColumnFilter() {
375
+ this.dispatchAction(LayoutRedux.LayoutColumnFilterClearAll());
376
+ this.adaptable.clearGridFiltering();
377
+ }
378
+ clearAndSetColumnFilter(columnFilters) {
379
+ this.clearAllColumnFilter();
380
+ columnFilters.forEach((columnFilter) => {
381
+ if (this.getAllColumnFilter().find((cf) => cf.ColumnId == columnFilter.ColumnId)) {
382
+ this.dispatchAction(LayoutRedux.LayoutColumnFilterSet(columnFilter));
383
+ }
384
+ else {
385
+ this.dispatchAction(LayoutRedux.LayoutColumnFilterAdd(columnFilter));
386
+ }
387
+ });
388
+ }
389
+ getAllColumnFilterForColumn(column) {
390
+ let columnFilters = this.getAllColumnFilter();
391
+ if (columnFilters) {
392
+ return columnFilters.filter((cf) => cf.ColumnId == column);
393
+ }
394
+ else {
395
+ return [];
396
+ }
397
+ }
398
+ createColumnFilterForCell(columnId, primarykeyValues) {
399
+ let cellValues = [];
400
+ let predicateId;
401
+ if (primarykeyValues.length == 1) {
402
+ const normalisedValue = this.adaptable.api.gridApi.getCellNormalisedValue(primarykeyValues[0], columnId);
403
+ if (normalisedValue) {
404
+ cellValues.push(normalisedValue);
405
+ const dataType = this.adaptable.api.columnApi.getColumnDataTypeFromColumnId(columnId);
406
+ if (dataType) {
407
+ if (dataType == 'Number') {
408
+ predicateId = 'Equals';
409
+ }
410
+ else if (dataType == 'Date') {
411
+ predicateId = 'On';
412
+ }
413
+ else if (dataType == 'String') {
414
+ predicateId = 'Is';
415
+ }
416
+ else {
417
+ predicateId = 'Equals';
418
+ }
419
+ }
420
+ }
421
+ }
422
+ else {
423
+ primarykeyValues.forEach((pk) => {
424
+ const displayValue = this.adaptable.api.gridApi.getCellDisplayValue(pk, columnId);
425
+ if (displayValue && !cellValues.includes(displayValue)) {
426
+ cellValues.push(displayValue);
427
+ }
428
+ });
429
+ predicateId = 'Values';
430
+ }
431
+ const filter = {
432
+ ColumnId: columnId,
433
+ Predicate: {
434
+ PredicateId: predicateId,
435
+ Inputs: [...new Set(cellValues)],
436
+ },
437
+ };
438
+ const [savedFilter] = this.setColumnFilter([filter]) || [null];
439
+ return savedFilter;
440
+ }
441
+ columnFilterToString(columnFilter) {
442
+ const friendlyName = this.adaptable.api.columnApi.getFriendlyNameFromColumnId(columnFilter.ColumnId);
443
+ return ('[' +
444
+ friendlyName +
445
+ '] ' +
446
+ this.adaptable.api.predicateApi.predicateToString(columnFilter.Predicate));
447
+ }
448
+ columnFiltersToString(columnFilters) {
449
+ return columnFilters.map((cf) => this.columnFilterToString(cf)).join(', ');
450
+ }
451
+ evaluateColumnFilter(columnFilter, node) {
452
+ var _a;
453
+ if (!columnFilter.Predicate) {
454
+ return true;
455
+ }
456
+ if ((_a = columnFilter.Predicate.Inputs) === null || _a === void 0 ? void 0 : _a.some((input) => StringExtensions_1.default.IsNullOrEmpty(input))) {
457
+ return true;
458
+ }
459
+ const column = this.adaptable.api.columnApi.getColumnFromId(columnFilter.ColumnId);
460
+ if (!column) {
461
+ return true;
462
+ }
463
+ const gridCell = this.adaptable.api.gridApi.getGridCellFromRowNode(node, columnFilter.ColumnId);
464
+ if (!gridCell) {
465
+ return true;
466
+ }
467
+ let value = gridCell.normalisedValue;
468
+ return this.adaptable.api.predicateApi.handlePredicate(columnFilter.Predicate, {
469
+ value: value,
470
+ oldValue: null,
471
+ displayValue: gridCell.displayValue,
472
+ node,
473
+ column,
474
+ }, true);
475
+ }
476
+ removeColumnFromCurrentLayout(columnId) {
477
+ this.removeColumnFromLayout(columnId, this.getCurrentLayoutName());
478
+ }
479
+ removeColumnFromAllLayouts(columnId) {
480
+ this.getAllLayout().forEach((layout) => {
481
+ this.removeColumnFromLayout(columnId, layout.Name);
482
+ });
483
+ }
484
+ removeColumnFromLayout(columnId, layoutName) {
485
+ const column = this.getAdaptableApi().columnApi.getColumnFromId(columnId);
486
+ if (column) {
487
+ const layout = this.getLayoutByName(layoutName);
488
+ if (layout) {
489
+ if (layout.Columns.includes(columnId)) {
490
+ this.dispatchAction(LayoutRedux.LayouRemoveColumn(layoutName, columnId));
491
+ this.getAdaptableApi().columnApi.hideColumn(columnId);
492
+ }
493
+ }
494
+ }
495
+ }
324
496
  }
325
497
  exports.LayoutApiImpl = LayoutApiImpl;
@@ -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));
@@ -1,13 +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
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;
12
13
  getSmartEditCustomOperations(): SmartEditCustomOperation[] | undefined;
14
+ setCustomSmartEditOperation(customOperationName: string): void;
13
15
  }
@@ -28,5 +28,11 @@ class SmartEditApiImpl extends ApiBase_1.ApiBase {
28
28
  getSmartEditCustomOperations() {
29
29
  return this.getEditOptions().smartEditCustomOperations;
30
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
+ }
31
37
  }
32
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
  }
@@ -8,20 +8,31 @@ const TeamSharingRedux_1 = require("../../Redux/ActionsReducers/TeamSharingRedux
8
8
  const TeamSharingRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/TeamSharingRedux"));
9
9
  const LoggingHelper_1 = require("../../Utilities/Helpers/LoggingHelper");
10
10
  class TeamSharingApiImpl extends ApiBase_1.ApiBase {
11
- getTeamSharingState() {
12
- return this.getAdaptableState().TeamSharing;
11
+ async getSharedEntities() {
12
+ if (!this.isTeamSharingActivated()) {
13
+ LoggingHelper_1.ConsoleLogWarning('Team Sharing is not Activated so Entities cannot be loaded');
14
+ return [];
15
+ }
16
+ return this.adaptable.adaptableOptions.teamSharingOptions.getSharedEntities(this.adaptable.adaptableOptions.adaptableId);
13
17
  }
14
- getSharedEntities() {
15
- return this.getAdaptableState().TeamSharing.SharedEntities;
18
+ async setSharedEntities(sharedEntities) {
19
+ if (!this.isTeamSharingActivated()) {
20
+ LoggingHelper_1.ConsoleLogWarning('Team Sharing is not Activated so Entities cannot be shared');
21
+ return false;
22
+ }
23
+ await this.adaptable.adaptableOptions.teamSharingOptions.setSharedEntities(this.adaptable.adaptableOptions.adaptableId, sharedEntities);
24
+ return true;
16
25
  }
17
- isTeamSharingActivated() {
26
+ isTeamSharingAvailable() {
27
+ var _a, _b, _c;
18
28
  return (!this.getAdaptableApi()
19
29
  .internalApi.getEntitlementService()
20
- .isModuleHiddenEntitlement(ModuleConstants.TeamSharingModuleId) &&
21
- this.adaptable.adaptableOptions.teamSharingOptions &&
22
- this.adaptable.adaptableOptions.teamSharingOptions.enableTeamSharing &&
23
- !!this.adaptable.adaptableOptions.teamSharingOptions.getSharedEntities &&
24
- !!this.adaptable.adaptableOptions.teamSharingOptions.setSharedEntities);
30
+ .isModuleHiddenEntitlement(ModuleConstants.TeamSharingModuleId) && ((_a = this.adaptable.adaptableOptions.teamSharingOptions) === null || _a === void 0 ? void 0 : _a.enableTeamSharing) &&
31
+ !!((_b = this.adaptable.adaptableOptions.teamSharingOptions) === null || _b === void 0 ? void 0 : _b.getSharedEntities) &&
32
+ !!((_c = this.adaptable.adaptableOptions.teamSharingOptions) === null || _c === void 0 ? void 0 : _c.setSharedEntities));
33
+ }
34
+ isTeamSharingActivated() {
35
+ return this.isTeamSharingAvailable();
25
36
  }
26
37
  hasTeamSharingFullRights() {
27
38
  return this.adaptable.api.internalApi
@@ -50,5 +61,12 @@ class TeamSharingApiImpl extends ApiBase_1.ApiBase {
50
61
  }
51
62
  this.dispatchAction(TeamSharingRedux.TeamSharingShare(entity, module, sharedEntityConfig));
52
63
  }
64
+ unshareEntity(entityId) {
65
+ if (!this.isTeamSharingActivated()) {
66
+ LoggingHelper_1.ConsoleLogWarning('Team Sharing is not Activated so Entities cannot be unshared');
67
+ return;
68
+ }
69
+ this.dispatchAction(TeamSharingRedux.TeamSharingRemoveItem(entityId));
70
+ }
53
71
  }
54
72
  exports.TeamSharingApiImpl = TeamSharingApiImpl;
@@ -24,6 +24,6 @@ export declare class UserInterfaceApiImpl extends ApiBase implements UserInterfa
24
24
  addContextMenuItem(userMenuItem: UserMenuItem<ContextMenuContext>): void;
25
25
  getEditableCellStyle(): AdaptableStyle | undefined;
26
26
  getReadOnlyCellStyle(): AdaptableStyle | undefined;
27
- getAllActionColumn(): ActionColumn[];
28
27
  getAdaptableObjectTags(): AdaptableObjectTag[] | undefined;
28
+ getAllActionColumn(): ActionColumn[];
29
29
  }
@@ -150,10 +150,6 @@ class UserInterfaceApiImpl extends ApiBase_1.ApiBase {
150
150
  getReadOnlyCellStyle() {
151
151
  return this.getUserInterfaceOptions().readOnlyCellStyle;
152
152
  }
153
- getAllActionColumn() {
154
- var _a;
155
- return (_a = this.getUserInterfaceOptions().actionColumns) !== null && _a !== void 0 ? _a : [];
156
- }
157
153
  getAdaptableObjectTags() {
158
154
  const objectTags = this.getUserInterfaceOptions().objectTags;
159
155
  if (objectTags != null && typeof objectTags === 'function') {
@@ -166,5 +162,9 @@ class UserInterfaceApiImpl extends ApiBase_1.ApiBase {
166
162
  }
167
163
  }
168
164
  }
165
+ getAllActionColumn() {
166
+ var _a, _b;
167
+ return (_b = (_a = this.getUserInterfaceOptions().actionOptions) === null || _a === void 0 ? void 0 : _a.actionColumns) !== null && _b !== void 0 ? _b : [];
168
+ }
169
169
  }
170
170
  exports.UserInterfaceApiImpl = UserInterfaceApiImpl;
@@ -17,7 +17,7 @@ import { AdaptableOptions } from '../AdaptableOptions/AdaptableOptions';
17
17
  import { Layout } from '../PredefinedConfig/LayoutState';
18
18
  import { AdaptableAlert, AdaptableCellChangedAlert, AdaptableRowChangedAlert } from '../PredefinedConfig/Common/AdaptableAlert';
19
19
  import { IDataService } from '../Utilities/Services/Interface/IDataService';
20
- import { AdaptableMessageType, AlertDefinition, BaseContext, CellDataChangedInfo, EditLookUpPermittedValues, LayoutAssociatedObject, SystemStatusMessageInfo } from '../types';
20
+ import { AdaptableIcon, AdaptableMessageType, AlertDefinition, BaseContext, CellDataChangedInfo, EditLookUpPermittedValues, LayoutAssociatedObject, SharedEntity, SystemStatusMessageInfo } from '../types';
21
21
  import { IEntitlementService } from '../Utilities/Services/Interface/IEntitlementService';
22
22
  import { AdaptableFlashingCell } from '../PredefinedConfig/Common/AdaptableFlashingCell';
23
23
  import { IQueryLanguageService } from '../Utilities/Services/Interface/IQueryLanguageService';
@@ -117,9 +117,10 @@ export interface InternalApi {
117
117
  getLabelForButton(button: AdaptableButton<BaseContext>, context: BaseContext): string | undefined;
118
118
  getTooltipForButton(button: AdaptableButton<BaseContext>, context: BaseContext): string | undefined;
119
119
  getStyleForButton(button: AdaptableButton<BaseContext>, context: BaseContext): ButtonStyle | undefined;
120
+ getIconForButton(button: AdaptableButton<BaseContext>, context: BaseContext): AdaptableIcon | undefined;
120
121
  dispatchReduxAction(action: Action): void;
121
122
  waitForTeamSharingImportEnd(): Promise<boolean>;
122
- getUserDefinedHeaderName(columnId: string): string;
123
+ getLocalTeamSharingEntities(): SharedEntity[];
123
124
  createFrameworkComponent(containerDomNode: HTMLElement, frameworkComponent: AdaptableFrameworkComponent, componentType: 'toolPanel' | 'toolbar' | string): void;
124
125
  destroyFrameworkComponent(containerDomNode: HTMLElement, frameworkComponent: AdaptableFrameworkComponent, componentType: 'toolPanel' | 'toolbar' | string): void;
125
126
  initializeDataChangeHistory(): void;
@@ -1,4 +1,5 @@
1
- import { AdaptableColumn, ColumnSort, LayoutAssociatedObject } from '../../types';
1
+ import { RowNode } from '@ag-grid-community/all-modules';
2
+ import { AdaptableColumn, ColumnFilter, ColumnSort, LayoutAssociatedObject } from '../../types';
2
3
  import { LayoutState, Layout } from '../PredefinedConfig/LayoutState';
3
4
  /**
4
5
  * Provides run-time access to the Layout Module and associated state
@@ -187,4 +188,90 @@ export interface LayoutApi {
187
188
  * @param adaptableObject object to check
188
189
  */
189
190
  isObjectAvailableInCurrentLayout(adaptableObject: LayoutAssociatedObject): boolean;
191
+ /**
192
+ * Retrieves all the Column Filters in the Column Filter State (of Predefined Config)
193
+ * @returns column filters
194
+ */
195
+ getAllColumnFilter(): ColumnFilter[];
196
+ /**
197
+ * Retrieves ColumnFilter by Id
198
+ * @param id column filter id
199
+ * @returns column filter
200
+ */
201
+ getColumnFilterById(id: ColumnFilter['Uuid']): ColumnFilter;
202
+ /**
203
+ * Sets Column Filters - will replace filters for existing column and leave other column filters in place
204
+ * @param columnFilters Column Filters to set
205
+ * @returns column filters
206
+ */
207
+ setColumnFilter(columnFilters: ColumnFilter[]): ColumnFilter[] | null;
208
+ /**
209
+ * Clears given Column Filter
210
+ * @param columnFilter Column Filter to clear
211
+ */
212
+ clearColumnFilter(columnFilter: ColumnFilter): void;
213
+ /**
214
+ * Clears Column Filter for given Column
215
+ * @param columnId Column for which Column Filter should be cleared
216
+ */
217
+ clearColumnFilterByColumn(columnId: string): void;
218
+ /**
219
+ * Clears Column Filters for given set of Columns
220
+ * @param columns Columns for which Column Filte should be cleared
221
+ */
222
+ clearColumnFilterByColumns(columns: string[]): void;
223
+ /**
224
+ * Clears all Column Filters in State
225
+ */
226
+ clearAllColumnFilter(): void;
227
+ /**
228
+ * Clears existing Column Filters and then sets the new ones
229
+ * @param columnFilters Column Filters to set
230
+ */
231
+ clearAndSetColumnFilter(columnFilters: ColumnFilter[]): void;
232
+ /**
233
+ * Retrieves all Column Filters for given Column
234
+ * @param columnId column to retrieve Column Filters for
235
+ * @returns column filters
236
+ */
237
+ getAllColumnFilterForColumn(columnId: string): ColumnFilter[];
238
+ /**
239
+ * Creates new Column Filter on given Column using Primary Key values
240
+ * @param columnId ColumnId to use
241
+ * @param primarykeyValues Primary Key Values to use
242
+ * @returns column filter
243
+ */
244
+ createColumnFilterForCell(columnId: string, primarykeyValues: any[]): ColumnFilter | null;
245
+ /**
246
+ * Retrieves description of given Column Filter
247
+ * @param columnFilter Column Filter to use
248
+ */
249
+ columnFilterToString(columnFilter: ColumnFilter): string;
250
+ /**
251
+ * Retrieves descriptions of given Column Filters
252
+ * @param columnFilters Column Filters to use
253
+ */
254
+ columnFiltersToString(columnFilters: ColumnFilter[]): string;
255
+ /**
256
+ * Calls AdapTableQL to evaluate Filter for given Row
257
+ * @param columnFilter Column Filter to use
258
+ * @param node Row Node to evaluate
259
+ */
260
+ evaluateColumnFilter(columnFilter: ColumnFilter, node: RowNode): boolean;
261
+ /**
262
+ * Removes a Column from the Current Layout
263
+ * @param columnId Column to remove
264
+ */
265
+ removeColumnFromCurrentLayout(columnId: string): void;
266
+ /**
267
+ * Removes a Column from all Layouts
268
+ * @param columnId Column to remove
269
+ */
270
+ removeColumnFromAllLayouts(columnId: string): void;
271
+ /**
272
+ * Removes a Column from a given Layout
273
+ * @param columnId Column to remove
274
+ * @param layoutName layout from which to remove Column
275
+ */
276
+ removeColumnFromLayout(columnId: string, layoutName: string): void;
190
277
  }
@@ -1,4 +1,5 @@
1
1
  import { SmartEditOperation } from '../AdaptableOptions/EditOptions';
2
+ import { MathOperation } from '../PredefinedConfig/Common/Enums';
2
3
  import { GridCell } from '../PredefinedConfig/Selection/GridCell';
3
4
  import { SmartEditCustomOperation } from '../types';
4
5
  /**
@@ -6,10 +7,15 @@ import { SmartEditCustomOperation } from '../types';
6
7
  **/
7
8
  export interface SmartEditApi {
8
9
  /**
9
- * Sets Smart Edit operation: ('Add','Subtract','Multiply','Divide'
10
+ * Sets (shipped) Smart Edit Operation: 'Add','Subtract','Multiply','Divide'
10
11
  * @param operation operation to run
11
12
  */
12
- setSmartEditOperation(operation: SmartEditOperation): void;
13
+ setSmartEditOperation(operation: MathOperation): void;
14
+ /**
15
+ * Sets current Smart Edit Operation to a Custom Operation
16
+ * @param customOperationName name of Custom Smart Edit Operation
17
+ */
18
+ setCustomSmartEditOperation(customOperationName: string): void;
13
19
  /**
14
20
  * Gets current Smart Edit Operation
15
21
  */
@@ -1,22 +1,30 @@
1
1
  import { AdaptableObject } from '../PredefinedConfig/Common/AdaptableObject';
2
2
  import { SharedEntity } from '../PredefinedConfig/TeamSharingState';
3
- import { AdaptableModule, SharedEntityConfig, TeamSharingState } from '../types';
3
+ import { AdaptableModule, SharedEntityConfig } from '../types';
4
4
  /**
5
5
  * Provides run-time access to Team Sharing Module and associated state
6
6
  */
7
7
  export interface TeamSharingApi {
8
8
  /**
9
- * Retrieves Team Sharing section of State
9
+ * Retrieves all shared entities which are currently shared. It is an asynchronous operation as it leverages the `TeamSharingOptions.getSharedEntities(...)` method.
10
10
  */
11
- getTeamSharingState(): TeamSharingState;
11
+ getSharedEntities(): Promise<SharedEntity[]>;
12
12
  /**
13
- * Retrieves all Shared Entities in Team Sharing State
13
+ * Sets the shared entities which are currently shared. It is an asynchronous operation as it leverages the `TeamSharingOptions.setSharedEntities(...)` method.
14
+ * @param sharedEntities the shared entities
15
+ * @return either TRUE if the shared entities were successfully set or FALSE if the shared entities were not set
14
16
  */
15
- getSharedEntities(): SharedEntity[];
17
+ setSharedEntities(sharedEntities: SharedEntity[]): Promise<boolean>;
16
18
  /**
17
19
  * Whether Team Sharing is Activated
20
+ *
21
+ * @deprecated use `Adaptable.isTeamSharingAvailable()` instead
18
22
  */
19
23
  isTeamSharingActivated(): boolean;
24
+ /**
25
+ * Whether Team Sharing is Available to use
26
+ */
27
+ isTeamSharingAvailable(): boolean;
20
28
  /**
21
29
  * Whether current user has full Team Sharing rights (for creating & updating shared items)
22
30
  */
@@ -41,4 +49,9 @@ export interface TeamSharingApi {
41
49
  * @param sharedEntityConfig Config info about the Sharing Actions
42
50
  */
43
51
  shareEntity(entity: AdaptableObject, module: AdaptableModule, sharedEntityConfig: SharedEntityConfig): void;
52
+ /**
53
+ * Removes an Adaptable Object from the Team Share.
54
+ * @param entityId the ID of the AdaptableObject to be removed from Team Share
55
+ */
56
+ unshareEntity(entityId: string): void;
44
57
  }
@@ -70,12 +70,12 @@ export interface UserInterfaceApi {
70
70
  * Returns Style set for ReadOnly cells
71
71
  */
72
72
  getReadOnlyCellStyle(): AdaptableStyle | undefined;
73
- /**
74
- * Retrieves any Action Columns (provided in User Interface Options)
75
- */
76
- getAllActionColumn(): ActionColumn[];
77
73
  /**
78
74
  * Retrieves any Object Tags (provided in User Interface Options)
79
75
  */
80
76
  getAdaptableObjectTags(): AdaptableObjectTag[] | undefined;
77
+ /**
78
+ * Retrieves any Action Columns (provided in User Interface Options)
79
+ */
80
+ getAllActionColumn(): ActionColumn[];
81
81
  }
@@ -6,7 +6,6 @@ import { CalculatedColumnState } from './CalculatedColumnState';
6
6
  import { ConditionalStyleState } from './ConditionalStyleState';
7
7
  import { CustomSortState } from './CustomSortState';
8
8
  import { DashboardState } from './DashboardState';
9
- import { DataSourceState } from './DataSourceState';
10
9
  import { ExportState } from './ExportState';
11
10
  import { FormatColumnState } from './FormatColumnState';
12
11
  import { FreeTextColumnState } from './FreeTextColumnState';
@@ -18,7 +17,6 @@ import { ShortcutState } from './ShortcutState';
18
17
  import { TeamSharingState } from './TeamSharingState';
19
18
  import { ThemeState } from './ThemeState';
20
19
  import { ConfigState } from './ConfigState';
21
- import { FilterState } from './FilterState';
22
20
  import { ApplicationState } from './ApplicationState';
23
21
  import { ToolPanelState } from './ToolPanelState';
24
22
  import { QueryState } from './QueryState';
@@ -41,9 +39,7 @@ export interface AdaptablePersistentState {
41
39
  ConditionalStyle: ConditionalStyleState;
42
40
  CustomSort: CustomSortState;
43
41
  Dashboard: DashboardState;
44
- DataSource: DataSourceState;
45
42
  Export: ExportState;
46
- Filter: FilterState;
47
43
  FormatColumn: FormatColumnState;
48
44
  FreeTextColumn: FreeTextColumnState;
49
45
  Layout: LayoutState;
@@ -11,13 +11,13 @@ export interface AdaptableButton<CONTEXT_TYPE extends BaseContext> extends Adapt
11
11
  */
12
12
  label?: string | ((button: AdaptableButton<CONTEXT_TYPE>, context: CONTEXT_TYPE) => string);
13
13
  /**
14
- * Style for Button - can be object or function thats provides a `Style` object
14
+ * Style for Button - can be object or function that provides a `ButtonStyle` object
15
15
  */
16
16
  buttonStyle?: ButtonStyle | ((button: AdaptableButton<CONTEXT_TYPE>, context: CONTEXT_TYPE) => ButtonStyle);
17
17
  /**
18
- * Icon to display, requires string for URL, other props are optional
18
+ * Icon for Button - can be object or function that provides a `AdaptableIcon` object
19
19
  */
20
- icon?: AdaptableIcon;
20
+ icon?: AdaptableIcon | ((button: AdaptableButton<CONTEXT_TYPE>, context: CONTEXT_TYPE) => AdaptableIcon);
21
21
  /**
22
22
  * Tooltip for Button - can be string or function that provides string
23
23
  */
@@ -1,4 +1,8 @@
1
1
  import { AdaptableObject } from './AdaptableObject';
2
+ /**
3
+ * The type of the column data
4
+ */
5
+ export declare type AdaptableColumnDataType = 'String' | 'Number' | 'Boolean' | 'Date' | 'Object' | 'Unknown';
2
6
  /**
3
7
  * Base class for Adaptable Column containing most important properties
4
8
  */
@@ -14,7 +18,7 @@ export interface AdaptableColumnBase extends AdaptableObject {
14
18
  /**
15
19
  * DataType of the column
16
20
  */
17
- dataType: 'String' | 'Number' | 'NumberArray' | 'Boolean' | 'Date' | 'Object' | 'Unknown';
21
+ dataType: AdaptableColumnDataType;
18
22
  }
19
23
  export declare const isValidOrderForColumnGroups: ({ oldColumns, newColumns, }: {
20
24
  oldColumns: AdaptableColumn[];
@@ -53,7 +53,24 @@ exports.SystemPredicateDefs = [
53
53
  icon: { text: '!IN' },
54
54
  columnScope: { DataTypes: ['String', 'Number', 'Date'] },
55
55
  moduleScope: ['filter'],
56
- handler: ({ displayValue, inputs }) => inputs.length === 0 || !inputs.includes(displayValue),
56
+ handler: ({ inputs, column, value }) => {
57
+ // basically negation of IN
58
+ if (inputs.length === 0) {
59
+ return true;
60
+ }
61
+ if (column.dataType === 'Date') {
62
+ return inputs.some((input) => {
63
+ return !isSameDay_1.default(input, value);
64
+ });
65
+ }
66
+ if (column.dataType === 'Number') {
67
+ return !inputs.includes(value);
68
+ }
69
+ if (column.dataType === 'String') {
70
+ return !inputs.includes(value);
71
+ }
72
+ return true;
73
+ },
57
74
  toString: ({ inputs }) => `Exclude (${inputs.join(', ')})`,
58
75
  },
59
76
  {