@adaptabletools/adaptable 11.2.2 → 11.2.4

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 (98) hide show
  1. package/base.css +24 -1
  2. package/bundle.cjs.js +103 -103
  3. package/index.css +28 -1
  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 +3 -0
  8. package/src/AdaptableOptions/AdaptableOptions.d.ts +7 -0
  9. package/src/AdaptableOptions/FinancePluginOptions.d.ts +33 -3
  10. package/src/AdaptableOptions/FormatColumnOptions.d.ts +9 -0
  11. package/src/AdaptableOptions/FormatColumnOptions.js +2 -0
  12. package/src/AdaptableOptions/LayoutOptions.d.ts +36 -11
  13. package/src/AdaptableOptions/UserInterfaceOptions.d.ts +0 -1
  14. package/src/Api/ColumnApi.d.ts +4 -1
  15. package/src/Api/FinanceApi.d.ts +3 -2
  16. package/src/Api/FormatColumnApi.d.ts +22 -1
  17. package/src/Api/GridApi.d.ts +8 -1
  18. package/src/Api/Implementation/ColumnApiImpl.js +6 -2
  19. package/src/Api/Implementation/FilterApiImpl.js +2 -7
  20. package/src/Api/Implementation/FormatColumnApiImpl.d.ts +5 -0
  21. package/src/Api/Implementation/FormatColumnApiImpl.js +29 -0
  22. package/src/Api/Implementation/FreeTextColumnApiImpl.js +3 -3
  23. package/src/Api/Implementation/GridApiImpl.d.ts +3 -0
  24. package/src/Api/Implementation/GridApiImpl.js +3 -0
  25. package/src/Api/Implementation/InternalApiImpl.d.ts +2 -0
  26. package/src/Api/Implementation/InternalApiImpl.js +49 -28
  27. package/src/Api/Implementation/LayoutApiImpl.d.ts +2 -0
  28. package/src/Api/Implementation/LayoutApiImpl.js +6 -0
  29. package/src/Api/Implementation/SystemStatusApiImpl.js +1 -1
  30. package/src/Api/Implementation/TeamSharingApiImpl.d.ts +2 -1
  31. package/src/Api/Implementation/TeamSharingApiImpl.js +11 -2
  32. package/src/Api/Implementation/ThemeApiImpl.js +1 -1
  33. package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +2 -1
  34. package/src/Api/Implementation/UserInterfaceApiImpl.js +16 -4
  35. package/src/Api/InternalApi.d.ts +2 -0
  36. package/src/Api/LayoutApi.d.ts +6 -1
  37. package/src/Api/TeamSharingApi.d.ts +10 -1
  38. package/src/Api/UserInterfaceApi.d.ts +6 -1
  39. package/src/PredefinedConfig/Common/AdaptableColumn.d.ts +4 -0
  40. package/src/PredefinedConfig/Common/AdaptableFormat.d.ts +8 -3
  41. package/src/PredefinedConfig/Common/AdaptableObject.d.ts +5 -5
  42. package/src/PredefinedConfig/Common/AdaptablePredicate.js +17 -1
  43. package/src/PredefinedConfig/Common/FDC3Context.d.ts +5 -1
  44. package/src/Redux/ActionsReducers/TeamSharingRedux.d.ts +1 -1
  45. package/src/Redux/ActionsReducers/TeamSharingRedux.js +4 -4
  46. package/src/Strategy/DashboardModule.js +3 -0
  47. package/src/Strategy/FilterModule.d.ts +7 -0
  48. package/src/Strategy/FilterModule.js +11 -2
  49. package/src/Strategy/FormatColumnModule.js +1 -1
  50. package/src/Strategy/Interface/IModule.d.ts +5 -0
  51. package/src/Strategy/LayoutModule.js +7 -7
  52. package/src/Strategy/Utilities/getObjectTagsViewItems.js +1 -1
  53. package/src/Utilities/Defaults/DefaultAdaptableOptions.js +4 -1
  54. package/src/Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions.js +4 -3
  55. package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +16 -36
  56. package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.js +2 -4
  57. package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +24 -14
  58. package/src/Utilities/Services/CalculatedColumnExpressionService.js +32 -9
  59. package/src/View/AdaptablePopover/index.d.ts +1 -0
  60. package/src/View/AdaptablePopover/index.js +2 -2
  61. package/src/View/AdaptableView.js +8 -2
  62. package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.js +1 -1
  63. package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +1 -1
  64. package/src/View/Components/AdaptableObjectList/AdaptableObjectCompactList.d.ts +13 -0
  65. package/src/View/Components/AdaptableObjectList/AdaptableObjectCompactList.js +41 -0
  66. package/src/View/Components/EntityRulesEditor/index.js +2 -1
  67. package/src/View/Components/ExpressionWizard.js +2 -1
  68. package/src/View/Components/FilterForm/FilterForm.d.ts +4 -1
  69. package/src/View/Components/FilterForm/ListBoxFilterForm.d.ts +4 -1
  70. package/src/View/Components/FilterForm/ListBoxFilterForm.js +7 -7
  71. package/src/View/Components/FilterForm/QuickFilterForm.js +15 -2
  72. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupModuleView.js +1 -1
  73. package/src/View/Components/Popups/AdaptableToaster.js +1 -0
  74. package/src/View/Components/TagValueSelector/index.js +4 -3
  75. package/src/View/ConditionalStyle/Wizard/ConditionalStyleWizard.js +2 -2
  76. package/src/View/Export/ReportExportDropdown.js +1 -1
  77. package/src/View/Filter/ActiveFiltersPanel.d.ts +1 -13
  78. package/src/View/Filter/ActiveFiltersPanel.js +8 -31
  79. package/src/View/Filter/FilterStatusBarSubPanelPopover.js +1 -10
  80. package/src/View/Filter/FilterViewPanel.js +2 -2
  81. package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.d.ts +3 -2
  82. package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +53 -22
  83. package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +3 -3
  84. package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.d.ts +1 -1
  85. package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.js +1 -1
  86. package/src/View/Layout/Wizard/LayoutEditorWizard.d.ts +1 -1
  87. package/src/View/Schedule/Wizard/ScheduleWizard.js +4 -4
  88. package/src/agGrid/Adaptable.d.ts +3 -0
  89. package/src/agGrid/Adaptable.js +31 -22
  90. package/src/agGrid/agGridHelper.js +1 -0
  91. package/src/components/ExpressionEditor/BaseEditorInput.js +8 -1
  92. package/src/components/ExpressionEditor/index.js +54 -5
  93. package/src/metamodel/adaptable.metamodel.d.ts +49 -20
  94. package/src/metamodel/adaptable.metamodel.js +158 -31
  95. package/src/parser/src/types.d.ts +1 -1
  96. package/src/types.d.ts +5 -5
  97. package/version.d.ts +1 -1
  98. package/version.js +1 -1
@@ -18,10 +18,19 @@ const differenceInMonths_1 = tslib_1.__importDefault(require("date-fns/differenc
18
18
  const differenceInYears_1 = tslib_1.__importDefault(require("date-fns/differenceInYears"));
19
19
  const expressionFunctionUtils_1 = require("./expressionFunctionUtils");
20
20
  const dateUtils_1 = require("./dateUtils");
21
+ const sanitizeArguments = (values, allowNaN) => {
22
+ return values.filter((value) => value != undefined && value != null && value !== '' && (allowNaN || !isNaN(value)));
23
+ };
24
+ const sanitizeNumericResult = (value) => {
25
+ if (isNaN(value)) {
26
+ return '';
27
+ }
28
+ return value;
29
+ };
21
30
  exports.scalarExpressionFunctions = {
22
31
  ADD: {
23
32
  handler(args) {
24
- return args.reduce((a, b) => a + b);
33
+ return sanitizeArguments(args, true).reduce((a, b) => a + b);
25
34
  },
26
35
  isHiddenFromMenu: true,
27
36
  description: 'Returns the sum of 2 numbers',
@@ -30,7 +39,7 @@ exports.scalarExpressionFunctions = {
30
39
  },
31
40
  SUB: {
32
41
  handler(args) {
33
- return args.reduce((a, b) => a - b);
42
+ return sanitizeArguments(args).reduce((a, b) => a - b);
34
43
  },
35
44
  isHiddenFromMenu: true,
36
45
  description: 'Returns the difference of 2 numbers',
@@ -39,7 +48,7 @@ exports.scalarExpressionFunctions = {
39
48
  },
40
49
  MUL: {
41
50
  handler(args) {
42
- return args.reduce((a, b) => a * b);
51
+ return sanitizeNumericResult(args.reduce((a, b) => a * b));
43
52
  },
44
53
  isHiddenFromMenu: true,
45
54
  description: 'Returns the product of 2 numbers',
@@ -48,7 +57,7 @@ exports.scalarExpressionFunctions = {
48
57
  },
49
58
  DIV: {
50
59
  handler(args) {
51
- return args.reduce((a, b) => a / b);
60
+ return sanitizeNumericResult(args.reduce((a, b) => a / b));
52
61
  },
53
62
  isHiddenFromMenu: true,
54
63
  description: 'Returns the division of 2 numbers',
@@ -57,7 +66,7 @@ exports.scalarExpressionFunctions = {
57
66
  },
58
67
  MOD: {
59
68
  handler(args) {
60
- return args[0] % args[1];
69
+ return sanitizeNumericResult(args[0] % args[1]);
61
70
  },
62
71
  isHiddenFromMenu: true,
63
72
  description: 'Returns the modulo of 2 numbers',
@@ -66,7 +75,7 @@ exports.scalarExpressionFunctions = {
66
75
  },
67
76
  POW: {
68
77
  handler(args) {
69
- return Math.pow(args[0], args[1]);
78
+ return sanitizeNumericResult(Math.pow(args[0], args[1]));
70
79
  },
71
80
  isHiddenFromMenu: true,
72
81
  description: 'Returns the pow of 2 numbers',
@@ -101,7 +110,7 @@ exports.scalarExpressionFunctions = {
101
110
  },
102
111
  MIN: {
103
112
  handler(args) {
104
- return Math.min(...args);
113
+ return Math.min(...sanitizeArguments(args));
105
114
  },
106
115
  description: 'Returns the smallest of inputted numbers',
107
116
  signatures: ['MIN(number, number, ...number)'],
@@ -109,7 +118,7 @@ exports.scalarExpressionFunctions = {
109
118
  },
110
119
  MAX: {
111
120
  handler(args) {
112
- return Math.max(...args);
121
+ return Math.max(...sanitizeArguments(args));
113
122
  },
114
123
  description: 'Returns the highest of inputted numbers',
115
124
  signatures: ['MAX(number, number, ...number)'],
@@ -117,9 +126,10 @@ exports.scalarExpressionFunctions = {
117
126
  },
118
127
  AVG: {
119
128
  handler(args) {
120
- if (args.length === 0)
129
+ if (args.length === 0) {
121
130
  return 0;
122
- return args.reduce((a, b) => a + b) / args.length;
131
+ }
132
+ return sanitizeArguments(args).reduce((a, b) => a + b) / args.length;
123
133
  },
124
134
  description: 'Returns the average of inputted numbers',
125
135
  signatures: ['AVG(number, number, ...number)'],
@@ -222,7 +232,7 @@ exports.scalarExpressionFunctions = {
222
232
  handler(args) {
223
233
  const [first, second] = dateUtils_1.normalizeDateParams(args);
224
234
  const result = differenceInDays_1.default(first, second);
225
- return isNaN(result) ? '' : result;
235
+ return sanitizeNumericResult(result);
226
236
  },
227
237
  description: 'Returns the difference in days between 2 dates',
228
238
  signatures: ['DIFF_DAYS(a: date, b: date)'],
@@ -232,7 +242,7 @@ exports.scalarExpressionFunctions = {
232
242
  handler(args) {
233
243
  const [first, second] = dateUtils_1.normalizeDateParams(args);
234
244
  const result = differenceInWeeks_1.default(first, second);
235
- return isNaN(result) ? '' : result;
245
+ return sanitizeNumericResult(result);
236
246
  },
237
247
  description: 'Returns the difference in weeks between 2 dates',
238
248
  signatures: ['DIFF_WEEKS(a: date, b: date)'],
@@ -242,7 +252,7 @@ exports.scalarExpressionFunctions = {
242
252
  handler(args) {
243
253
  const [first, second] = dateUtils_1.normalizeDateParams(args);
244
254
  const result = differenceInMonths_1.default(first, second);
245
- return isNaN(result) ? '' : result;
255
+ return sanitizeNumericResult(result);
246
256
  },
247
257
  description: 'Returns the difference in months between 2 dates',
248
258
  signatures: ['DIFF_MONTHS(a: date, b: date)'],
@@ -252,7 +262,7 @@ exports.scalarExpressionFunctions = {
252
262
  handler(args) {
253
263
  const [first, second] = dateUtils_1.normalizeDateParams(args);
254
264
  const result = differenceInYears_1.default(first, second);
255
- return isNaN(result) ? '' : result;
265
+ return sanitizeNumericResult(result);
256
266
  },
257
267
  description: 'Returns the difference in years between 2 dates',
258
268
  signatures: ['DIFF_YEARS(a: date, b: date)'],
@@ -163,19 +163,39 @@ class AggregatedScalarCalculatedColumn {
163
163
  return this.expressionEvaluation.columnDependencies;
164
164
  }
165
165
  computeAggregatedValue(expressionEvaluation) {
166
- const gridData = this.adaptableApi.gridApi.getGridData();
166
+ var _a;
167
+ const gridRowNodes = this.adaptableApi.gridApi.getAllRowNodes();
168
+ // we iterate over the RowNode list (we need this to handle complex column values (nested values, valueGetters etc)
169
+ // so we will map the fieldNames to RowNode.data
170
+ const mapReducerValueGetter = (fieldName) => {
171
+ return (rowNode) => this.adaptableApi.gridApi.getRawValueFromRowNode(rowNode, fieldName);
172
+ };
173
+ Object.values(expressionEvaluation.aggregationParams.reducers).forEach((aggregationReducer) => {
174
+ aggregationReducer.getter = mapReducerValueGetter(aggregationReducer.field);
175
+ // nullify the getter to force the fallback on the getter fn
176
+ aggregationReducer.field = null;
177
+ });
178
+ const mapGroupByToKey = (fieldName) => {
179
+ return (_unusableProperty, rowNode) => this.adaptableApi.gridApi.getRawValueFromRowNode(rowNode, fieldName);
180
+ };
181
+ (_a = expressionEvaluation.aggregationParams.groupBy) === null || _a === void 0 ? void 0 : _a.forEach((groupByDef) => {
182
+ groupByDef.toKey = mapGroupByToKey(groupByDef.field);
183
+ });
167
184
  if (!expressionEvaluation.cumulateOver) {
168
- return scalarAggregationHelper_1.aggregate(expressionEvaluation.aggregationParams, gridData);
185
+ return scalarAggregationHelper_1.aggregate(expressionEvaluation.aggregationParams, gridRowNodes);
169
186
  }
170
187
  else {
171
188
  // 1. sort grid data by given OVER column
172
189
  const sortByColumn = expressionEvaluation.cumulateOver;
173
- // currently we support only ascending sorting
174
- gridData.sort((first, second) => {
175
- if (first[sortByColumn] < second[sortByColumn]) {
190
+ const getRowNodeValue = (rowNode, columnId) => this.adaptableApi.gridApi.getRawValueFromRowNode(rowNode, columnId);
191
+ // currently, we support only ascending sorting
192
+ gridRowNodes.sort((first, second) => {
193
+ const firstValue = getRowNodeValue(first, sortByColumn);
194
+ const secondValue = getRowNodeValue(second, sortByColumn);
195
+ if (firstValue < secondValue) {
176
196
  return -1;
177
197
  }
178
- if (first[sortByColumn] > second[sortByColumn]) {
198
+ if (firstValue > secondValue) {
179
199
  return 1;
180
200
  }
181
201
  return 0;
@@ -184,11 +204,14 @@ class AggregatedScalarCalculatedColumn {
184
204
  if (!expressionEvaluation.aggregationParams.groupBy) {
185
205
  expressionEvaluation.aggregationParams.groupBy = [];
186
206
  }
187
- const gridPrimaryKey = this.adaptableApi.internalApi.getAdaptableOptions().primaryKey;
207
+ const gridPrimaryKeyColumn = this.adaptableApi.internalApi.getAdaptableOptions().primaryKey;
188
208
  // !! aggregationParams mutated
189
- expressionEvaluation.aggregationParams.groupBy.push({ field: gridPrimaryKey });
209
+ expressionEvaluation.aggregationParams.groupBy.push({
210
+ field: gridPrimaryKeyColumn,
211
+ toKey: mapGroupByToKey(gridPrimaryKeyColumn),
212
+ });
190
213
  // 3. cumulate
191
- return scalarAggregationHelper_1.cumulate(expressionEvaluation.aggregationParams, gridData);
214
+ return scalarAggregationHelper_1.cumulate(expressionEvaluation.aggregationParams, gridRowNodes);
192
215
  }
193
216
  }
194
217
  getAggregationValue(rowNode) {
@@ -12,6 +12,7 @@ export interface AdaptablePopoverProps extends React.ClassAttributes<AdaptablePo
12
12
  useButton?: boolean;
13
13
  tooltipText?: string;
14
14
  popoverMinWidth?: number;
15
+ popupPadding?: number;
15
16
  }
16
17
  export declare class AdaptablePopover extends React.Component<AdaptablePopoverProps, {}> {
17
18
  render(): JSX.Element;
@@ -11,7 +11,7 @@ const OverlayTrigger_1 = tslib_1.__importDefault(require("../../components/Overl
11
11
  const rebass_1 = require("rebass");
12
12
  class AdaptablePopover extends React.Component {
13
13
  render() {
14
- var _a;
14
+ var _a, _b;
15
15
  let messageType = this.props.MessageType != null ? this.props.MessageType : 'Info';
16
16
  const showIcon = (_a = this.props.showIcon) !== null && _a !== void 0 ? _a : true;
17
17
  let useButton = this.props.useButton != null ? this.props.useButton : false;
@@ -27,7 +27,7 @@ class AdaptablePopover extends React.Component {
27
27
  } },
28
28
  title ? (React.createElement(rebass_1.Text, { fontSize: 2, padding: 2 },
29
29
  React.createElement("b", null, title))) : null,
30
- React.createElement(rebass_1.Box, { padding: 2 }, this.props.bodyText.map((textOrHTML, index) => (React.createElement("span", { key: index }, textOrHTML))))));
30
+ React.createElement(rebass_1.Box, { className: "ab-Popover__body", padding: (_b = this.props.popupPadding) !== null && _b !== void 0 ? _b : 2 }, this.props.bodyText.map((textOrHTML, index) => (React.createElement("span", { key: index }, textOrHTML))))));
31
31
  const icon = 'info'; // - think this is wrong - UIHelper.getGlyphByMessageType(messageType);
32
32
  const color = UIHelper_1.UIHelper.getColorByMessageType(messageType);
33
33
  const iconStyle = {
@@ -20,14 +20,20 @@ class AdaptableView extends React.Component {
20
20
  render() {
21
21
  var _a, _b, _c, _d;
22
22
  const watermark = (_d = (_c = (_b = (_a = this.props.AdaptableApi) === null || _a === void 0 ? void 0 : _a.internalApi) === null || _b === void 0 ? void 0 : _b.getSystemState()) === null || _c === void 0 ? void 0 : _c.License) === null || _d === void 0 ? void 0 : _d.watermark;
23
+ const adaptableOptions = this.props.AdaptableApi.internalApi.getAdaptableOptions();
23
24
  return (React.createElement("div", null,
24
25
  this.props.AdaptableApi.internalApi.getModuleService().isModuleAvailable('Dashboard') && (React.createElement(Dashboard_1.Dashboard, { api: this.props.AdaptableApi })),
25
26
  React.createElement(AdaptableLoadingScreen_1.AdaptableLoadingScreen, { onClose: this.props.onCloseLoadingPopup, showLoadingScreen: this.props.PopupState.LoadingPopup.ShowLoadingPopup }),
26
27
  this.props.PopupState.PromptPopup.ShowPromptPopup && (React.createElement(AdaptablePopupPrompt_1.AdaptablePopupPrompt, { message: this.props.PopupState.PromptPopup.Message, header: this.props.PopupState.PromptPopup.Header, onClose: this.props.onClosePromptPopup, onConfirm: this.props.onConfirmPromptPopup, onConfirmActionCreator: this.props.PopupState.PromptPopup.ConfirmActionCreator, defaultValue: this.props.PopupState.PromptPopup.DefaultValue })),
27
28
  React.createElement(AdaptablePopupConfirmation_1.AdaptablePopupConfirmation, { header: this.props.PopupState.ConfirmationPopup.Header, messsage: this.props.PopupState.ConfirmationPopup.Msg, showPopup: this.props.PopupState.ConfirmationPopup.ShowConfirmationPopup, cancelButtonText: this.props.PopupState.ConfirmationPopup.CancelButtonText, confirmButtonText: this.props.PopupState.ConfirmationPopup.ConfirmButtonText, onCancel: this.props.onCancelConfirmationPopup, onConfirm: this.props.onConfirmConfirmationPopup, showInputBox: this.props.PopupState.ConfirmationPopup.ShowInputBox, messageType: this.props.PopupState.ConfirmationPopup.MessageType, api: this.props.AdaptableApi }),
28
29
  Boolean(this.props.PopupState.ScreenPopup.ShowScreenPopup) && (React.createElement(AdaptablePopup_1.AdaptablePopup, { componentName: this.props.PopupState.ScreenPopup.ComponentName, componentModule: this.props.PopupState.ScreenPopup.ComponentModule, onHide: this.props.onCloseScreenPopup, api: this.props.AdaptableApi, onClearParams: () => this.props.onClearPopupParams(), moduleParams: this.props.PopupState.ScreenPopup.Params, moduleProps: this.props.PopupState.ScreenPopup.PopupProps })),
29
- React.createElement(react_toastify_1.ToastContainer, { limit: this.props.AdaptableApi.internalApi.getAdaptableOptions().notificationsOptions
30
- .maxNotifications, closeButton: false, icon: false, theme: "colored" }),
30
+ React.createElement(react_toastify_1.ToastContainer
31
+ // we NEEEEED!!!! this containerId, otherwise, toastify will have memory leaks when the adaptable
32
+ // instance is destroyed and re-created many times
33
+ , {
34
+ // we NEEEEED!!!! this containerId, otherwise, toastify will have memory leaks when the adaptable
35
+ // instance is destroyed and re-created many times
36
+ containerId: adaptableOptions.adaptableId, limit: adaptableOptions.notificationsOptions.maxNotifications, closeButton: false, icon: false, theme: "colored" }),
31
37
  (watermark === null || watermark === void 0 ? void 0 : watermark.show) && React.createElement(License_1.LicenseWatermark, null, watermark === null || watermark === void 0 ? void 0 : watermark.text),
32
38
  React.createElement(WindowPopups_1.WindowPopups, null),
33
39
  React.createElement(FormPopups_1.FormPopups, null),
@@ -70,7 +70,7 @@ exports.CalculatedColumnExpressionWizardSection = (props) => {
70
70
  props.onChange(Object.assign(Object.assign({}, data), { Query: calculatedColumnQuery, CalculatedColumnSettings: Object.assign(Object.assign({}, data.CalculatedColumnSettings), { DataType: dataType, Pivotable,
71
71
  Aggregatable }) }));
72
72
  };
73
- return (React.createElement(Tabs_1.Tabs, { onValueChange: setType, value: selectedTab, p: 2, style: { flex: 1, overflow: 'auto' } },
73
+ return (React.createElement(Tabs_1.Tabs, { onValueChange: setType, value: selectedTab, p: 2, style: { height: '100%', flex: 1, overflow: 'auto' } },
74
74
  React.createElement(QueryTab, { value: "ScalarExpression", type: type, label: "Scalar" }),
75
75
  React.createElement(Tabs_1.Tabs.Content, { value: 'ScalarExpression' },
76
76
  React.createElement(ExpressionEditor_1.ExpressionEditor, { type: 'scalar', module: moduleInfo.ModuleName, style: { paddingLeft: 0 }, value: data.Query.ScalarExpression, onChange: (ScalarExpression) => setCalculatedColumnExpression({ ScalarExpression }), initialData: initialData, columns: api.columnApi.getQueryableColumns(), namedQueries: api.queryApi.getAllNamedQuery(), isFullExpression: true, api: api })),
@@ -34,7 +34,7 @@ exports.isValidCalculatedColumnSettings = (data, api) => {
34
34
  var _a;
35
35
  const columns = api.columnApi.getColumns();
36
36
  if (!data.ColumnId) {
37
- return 'Column id cannot be empty';
37
+ return 'Column Id cannot be empty';
38
38
  }
39
39
  if (!((_a = data.CalculatedColumnSettings) === null || _a === void 0 ? void 0 : _a.DataType)) {
40
40
  return 'No data type specified for column';
@@ -0,0 +1,13 @@
1
+ import * as React from 'react';
2
+ import { IModule } from '../../../Strategy/Interface/IModule';
3
+ import { AdaptableObject } from '../../../types';
4
+ export interface AdaptableObjectCompactListItemProps {
5
+ module: IModule;
6
+ abObject: AdaptableObject;
7
+ }
8
+ export declare const AdaptableObjectCompactListItem: React.FunctionComponent<AdaptableObjectCompactListItemProps>;
9
+ export interface AdaptableObjectCompactListProps {
10
+ abObjects: AdaptableObject[];
11
+ module: IModule;
12
+ }
13
+ export declare const AdaptableObjectCompactList: React.FunctionComponent<AdaptableObjectCompactListProps>;
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AdaptableObjectCompactList = exports.AdaptableObjectCompactListItem = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const React = tslib_1.__importStar(require("react"));
6
+ const react_redux_1 = require("react-redux");
7
+ const rebass_1 = require("rebass");
8
+ const SimpleButton_1 = tslib_1.__importDefault(require("../../../components/SimpleButton"));
9
+ const AdaptableContext_1 = require("../../AdaptableContext");
10
+ const ValueSelector_1 = require("../ValueSelector");
11
+ const baseClassName = 'ab-Adaptable-Object-Compact-List';
12
+ const ICON_SIZE = 20;
13
+ exports.AdaptableObjectCompactListItem = (props) => {
14
+ var _a, _b, _c, _d, _e, _f, _g;
15
+ const dispatch = react_redux_1.useDispatch();
16
+ const adaptable = AdaptableContext_1.useAdaptable();
17
+ const objectView = props.module.toViewCompact(props.abObject);
18
+ const viewOptions = (_b = (_a = props.module) === null || _a === void 0 ? void 0 : _a.getViewProperties) === null || _b === void 0 ? void 0 : _b.call(_a);
19
+ const deleteAction = (_c = viewOptions === null || viewOptions === void 0 ? void 0 : viewOptions.getDeleteAction) === null || _c === void 0 ? void 0 : _c.call(viewOptions, props.abObject);
20
+ const moduleAccessLevel = adaptable.api.internalApi
21
+ .getEntitlementService()
22
+ .getEntitlementAccessLevelForModule(props.module.moduleInfo.ModuleName);
23
+ const handleDelete = React.useCallback(() => {
24
+ dispatch(deleteAction);
25
+ }, []);
26
+ return (React.createElement(rebass_1.Flex, { className: `${baseClassName}__Item`, alignItems: "center" },
27
+ React.createElement(rebass_1.Flex, { className: `${baseClassName}__Item__Name` }, (_d = objectView.item.label) !== null && _d !== void 0 ? _d : objectView.item.name),
28
+ React.createElement(rebass_1.Box, { flex: 1 },
29
+ objectView.item.view &&
30
+ React.createElement(objectView.item.view, {
31
+ data: props.abObject,
32
+ }),
33
+ Boolean(((_e = objectView.item) === null || _e === void 0 ? void 0 : _e.values) && ((_g = (_f = objectView.item) === null || _f === void 0 ? void 0 : _f.values) === null || _g === void 0 ? void 0 : _g.length)) && (React.createElement(rebass_1.Box, { mb: 2, className: `${baseClassName}__Item__Values` },
34
+ React.createElement(ValueSelector_1.ValueOptionsTags, { style: { marginRight: 0 }, readOnly: true, options: objectView.item.values, value: objectView.item.values, allowWrap: true, toIdentifier: (c) => c, toLabel: (c) => React.createElement(React.Fragment, null, c) })))),
35
+ React.createElement(rebass_1.Flex, null, deleteAction && (React.createElement(SimpleButton_1.default, { iconSize: ICON_SIZE, icon: "delete", variant: "text", onClick: handleDelete, accessLevel: moduleAccessLevel })))));
36
+ };
37
+ exports.AdaptableObjectCompactList = (props) => {
38
+ return (React.createElement("div", { className: baseClassName }, props.abObjects.map((abObject) => {
39
+ return React.createElement(exports.AdaptableObjectCompactListItem, { abObject: abObject, module: props.module });
40
+ })));
41
+ };
@@ -13,6 +13,7 @@ const AdaptableInput_1 = tslib_1.__importDefault(require("../AdaptableInput"));
13
13
  const AdaptableContext_1 = require("../../AdaptableContext");
14
14
  const ButtonInfo_1 = require("../Buttons/ButtonInfo");
15
15
  const DocumentationLinkConstants_1 = require("../../../Utilities/Constants/DocumentationLinkConstants");
16
+ const react_1 = require("react");
16
17
  exports.isRuleValid = (abObject, api, context) => {
17
18
  var _a, _b, _c, _d, _e, _f;
18
19
  if (!((_a = abObject === null || abObject === void 0 ? void 0 : abObject.Rule) === null || _a === void 0 ? void 0 : _a.Predicate) && !((_b = abObject === null || abObject === void 0 ? void 0 : abObject.Rule) === null || _b === void 0 ? void 0 : _b.BooleanExpression)) {
@@ -128,7 +129,7 @@ exports.EntityRulesEditor = (props) => {
128
129
  const setAggregationExpression = (expression) => {
129
130
  props.onChange(Object.assign(Object.assign({}, data), { Rule: { AggregatedBooleanExpression: expression } }));
130
131
  };
131
- const initialData = api.internalApi.getQueryPreviewData();
132
+ const initialData = react_1.useMemo(() => api.internalApi.getQueryPreviewData(), []);
132
133
  const showDocumentationLinks = api.internalApi.isDocumentationLinksDisplayed();
133
134
  return (React.createElement(rebass_1.Flex, Object.assign({ flexDirection: "column", padding: 2, pt: 0, pl: 0 }, flexProps, { style: Object.assign({ height: '100%' }, flexProps === null || flexProps === void 0 ? void 0 : flexProps.style) }),
134
135
  children,
@@ -9,6 +9,7 @@ const ExpressionEditor_1 = require("../../components/ExpressionEditor");
9
9
  const Input_1 = tslib_1.__importDefault(require("../../components/Input"));
10
10
  const StringExtensions_1 = require("../../Utilities/Extensions/StringExtensions");
11
11
  const ModuleConstants_1 = require("../../Utilities/Constants/ModuleConstants");
12
+ const react_1 = require("react");
12
13
  class ExpressionWizard extends React.Component {
13
14
  constructor(props) {
14
15
  var _a, _b;
@@ -28,7 +29,7 @@ class ExpressionWizard extends React.Component {
28
29
  };
29
30
  }
30
31
  render() {
31
- const initialData = this.props.api.internalApi.getQueryPreviewData();
32
+ const initialData = react_1.useMemo(() => this.props.api.internalApi.getQueryPreviewData(), []);
32
33
  return (React.createElement(React.Fragment, null,
33
34
  React.createElement(ExpressionEditor_1.ExpressionEditor, { type: 'boolean', module: ModuleConstants_1.QueryModuleId, value: this.state.expression, onChange: this.handleCustomExpressionChange, initialData: initialData, columns: this.props.api.columnApi.getQueryableColumns(), namedQueries: this.props.api.queryApi.getAllNamedQuery(), api: this.props.api }),
34
35
  ' ',
@@ -4,7 +4,10 @@ import { ColumnMenuTab } from '../../../PredefinedConfig/Common/Enums';
4
4
  import { ColumnFilter } from '../../../PredefinedConfig/FilterState';
5
5
  export interface FilterFormState {
6
6
  columnFilters: ColumnFilter[];
7
- distinctColumnValues: any[];
7
+ distinctColumnValues: {
8
+ label: string;
9
+ value: any;
10
+ }[];
8
11
  isDistinctColumnValuesLoading: boolean;
9
12
  showTab: boolean;
10
13
  selectedTab: ColumnMenuTab;
@@ -5,7 +5,10 @@ export interface ListBoxFilterFormProps extends ListGroupProps {
5
5
  currentColumn: AdaptableColumn;
6
6
  columns: AdaptableColumn[];
7
7
  useAgGridStyle?: boolean;
8
- columnDistinctValues: any[];
8
+ columnDistinctValues: {
9
+ label: string;
10
+ value: any;
11
+ }[];
9
12
  uiSelectedColumnValues: Array<string>;
10
13
  onColumnValueSelectedChange: (SelectedValues: Array<any>) => void;
11
14
  dataType: 'String' | 'Number' | 'NumberArray' | 'Boolean' | 'Date' | 'Object' | 'Unknown';
@@ -40,9 +40,9 @@ exports.ListBoxFilterForm = (props) => {
40
40
  setUiSelectedColumnValues([...UiSelectedColumnValues, item]);
41
41
  }
42
42
  };
43
- const columnValuesItemsElements = props.columnDistinctValues.map((x, y) => {
44
- const isActive = UiSelectedColumnValues.indexOf(x) >= 0;
45
- const columnValue = x;
43
+ const columnValuesItemsElements = props.columnDistinctValues.map((distinctValue, index) => {
44
+ const isActive = UiSelectedColumnValues.indexOf(distinctValue.value) >= 0;
45
+ const columnValue = distinctValue.value;
46
46
  if (StringExtensions_1.StringExtensions.IsNullOrEmpty(columnValue)) {
47
47
  return null;
48
48
  }
@@ -53,13 +53,13 @@ exports.ListBoxFilterForm = (props) => {
53
53
  }
54
54
  if (props.useAgGridStyle) {
55
55
  return renderItemForAgGridStyle({
56
- key: 'columnValue' + y,
57
- children: columnValue,
56
+ key: 'columnValue' + index,
57
+ children: distinctValue.label,
58
58
  checked: isActive,
59
- onChange: () => onClickItemColumnValue(x),
59
+ onChange: () => onClickItemColumnValue(distinctValue.value),
60
60
  });
61
61
  }
62
- return (React.createElement(ListGroupItem_1.default, { noZebra: props.useAgGridStyle, key: 'columnValue' + y, onClick: () => onClickItemColumnValue(x), active: isActive, value: columnValue }, columnValue));
62
+ return (React.createElement(ListGroupItem_1.default, { noZebra: props.useAgGridStyle, key: 'columnValue' + index, onClick: () => onClickItemColumnValue(distinctValue.value), active: isActive, value: columnValue }, distinctValue.label));
63
63
  });
64
64
  const textClear = (React.createElement(AdaptableFormControlTextClear_1.AdaptableFormControlTextClear, { autoFocus: true, type: "text", placeholder: "Search Column Values", value: FilterValue, style: {
65
65
  paddingTop: 'var(--ab-space-1)',
@@ -19,6 +19,7 @@ const CheckBox_1 = require("../../../components/CheckBox");
19
19
  const isEqual_1 = tslib_1.__importDefault(require("lodash/isEqual"));
20
20
  const runIfNotResolvedIn_1 = require("../../../Utilities/runIfNotResolvedIn");
21
21
  const getDefaultColumnFilterPredicate_1 = require("./getDefaultColumnFilterPredicate");
22
+ const date_fns_1 = require("date-fns");
22
23
  class QuickFilterFormComponent extends React.Component {
23
24
  constructor(props) {
24
25
  super(props);
@@ -214,6 +215,19 @@ class QuickFilterFormComponent extends React.Component {
214
215
  if (this.props.quickFilterValuesTrigger === 'click') {
215
216
  showEvent = 'click';
216
217
  }
218
+ let selectedValues = filter.Predicate.PredicateId === 'Values' ? 'Select Values' : 'Exclude Values';
219
+ if (filter.Predicate.Inputs.length) {
220
+ selectedValues = filter.Predicate.Inputs.map((input) => {
221
+ var _a, _b;
222
+ const label = (_b = (_a = this.state.distinctColumnValues) === null || _a === void 0 ? void 0 : _a.find((distinctValue) => {
223
+ if (input instanceof Date) {
224
+ return date_fns_1.isSameDay(input, distinctValue.value);
225
+ }
226
+ return distinctValue.value === input;
227
+ })) === null || _b === void 0 ? void 0 : _b.label;
228
+ return label !== null && label !== void 0 ? label : input;
229
+ }).join(', ');
230
+ }
217
231
  return (React.createElement(OverlayTrigger_1.default, { alignHorizontal: "left", showEvent: showEvent,
218
232
  // cannot hide on blur, because the form input receives the input when this is opened
219
233
  hideEvent: "mouseleave", hideDelay: 300, ref: (api) => {
@@ -248,8 +262,7 @@ class QuickFilterFormComponent extends React.Component {
248
262
  borderRadius: 0,
249
263
  borderLeftWidth: 0,
250
264
  borderColor: 'var(--ab-color-primarydark)',
251
- }, disabled: ArrayExtensions_1.default.IsNullOrEmptyOrContainsSingleEmptyValue(this.state.distinctColumnValues) }, filter.Predicate.Inputs.join(', ') ||
252
- (filter.Predicate.PredicateId === 'Values' ? 'Select Values' : 'Exclude Values'))));
265
+ }, disabled: ArrayExtensions_1.default.IsNullOrEmptyOrContainsSingleEmptyValue(this.state.distinctColumnValues) }, selectedValues)));
253
266
  }
254
267
  onColumnValuesChange(columnValues) {
255
268
  var _a;
@@ -105,7 +105,7 @@ exports.AdaptablePopupModuleView = (props) => {
105
105
  "s not available in current Layout")));
106
106
  };
107
107
  return (React.createElement(PopupPanel_1.PopupPanel, { glyphicon: moduleInfo.Glyph, infoLink: moduleInfo.HelpPage, headerText: moduleInfo.FriendlyName, button: newButton, infoLinkDisabled: !props.api.internalApi.isDocumentationLinksDisplayed() },
108
- !!(items === null || items === void 0 ? void 0 : items.length) && toggleButtonShowLayoutAssociatedObjects(),
108
+ toggleButtonShowLayoutAssociatedObjects(),
109
109
  (items === null || items === void 0 ? void 0 : items.length) ? (React.createElement(AdaptableObjectList_1.AdaptableObjectList, { module: props.module, items: items })) : (React.createElement(EmptyContent_1.default, null, emptyContent !== null && emptyContent !== void 0 ? emptyContent : `Click 'New' to create a new ${moduleInfo.FriendlyName}`)),
110
110
  isWizardOpen && EditWizard && (React.createElement(EditWizard, { abObjectType: abObjectType, moduleInfo: moduleInfo, data: null, popupParams: props.popupParams, configEntities: null, onCloseWizard: handleWizardClose, onFinishWizard: handleWizardClose }))));
111
111
  };
@@ -11,6 +11,7 @@ exports.showToast = (props) => {
11
11
  // leak where the api is still kept around in memory by the toaster
12
12
  let api = props.api;
13
13
  const off = api.eventApi.on('AdaptableDestroy', () => {
14
+ react_toastify_1.toast.dismiss(); // remove all toasts
14
15
  api = null;
15
16
  });
16
17
  const toastProps = ObjectFactory_1.default.CreateToastOptions(props.api.internalApi.getAdaptableOptions().notificationsOptions, {
@@ -12,11 +12,12 @@ exports.TagValueSelector = (props) => {
12
12
  return (_a = api.internalApi.getAvailableTags()) !== null && _a !== void 0 ? _a : [];
13
13
  };
14
14
  const { availableTags = getDefaultTags(), selectedTags = [], onChange, singleSelect } = props;
15
- return (React.createElement(ValueSelector_1.ValueSelector, { options: availableTags, value: selectedTags.map((tag) => tag.value), singleSelect: singleSelect, allowReorder: false, onChange: (selectedTagsIds, selectedTagsMap) => {
15
+ return (React.createElement(ValueSelector_1.ValueSelector, { options: availableTags, value: selectedTags.map((tag) => api.internalApi.getLabelForTag(tag)), singleSelect: singleSelect, allowReorder: false, onChange: (selectedTagsIds, selectedTagsMap) => {
16
16
  onChange(selectedTagsIds.map((id) => selectedTagsMap.get(id)));
17
- }, selectionBoxPosition: 'top', toIdentifier: (tag) => tag.value, toLabel: (tag) => tag.label, noSelectionLabel: singleSelect ? 'Select a tag' : 'You have not selected any tags.', xSelectedLabel: singleSelect ? () => 'Selected tag:' : () => 'Selected tags:' }));
17
+ }, selectionBoxPosition: 'top', toIdentifier: (tag) => api.internalApi.getLabelForTag(tag), toLabel: (tag) => api.internalApi.getLabelForTag(tag), noSelectionLabel: singleSelect ? 'Select a tag' : 'You have not selected any tags.', xSelectedLabel: singleSelect ? () => 'Selected tag:' : () => 'Selected tags:' }));
18
18
  };
19
19
  exports.TagValueOptionsTags = (props) => {
20
20
  const { tags = [] } = props;
21
- return (React.createElement(ValueSelector_1.ValueOptionsTags, { options: tags, value: tags.map((tag) => tag.value), toIdentifier: (tag) => tag.value, toLabel: (tag) => tag.label, allowWrap: true, readOnly: true }));
21
+ const { api } = AdaptableContext_1.useAdaptable();
22
+ return (React.createElement(ValueSelector_1.ValueOptionsTags, { options: tags, value: tags.map((tag) => api.internalApi.getValueForTag(tag)), toIdentifier: (tag) => api.internalApi.getValueForTag(tag), toLabel: (tag) => api.internalApi.getLabelForTag(tag), allowWrap: true, readOnly: true }));
22
23
  };
@@ -20,8 +20,8 @@ const ConditionalStyleRedux = tslib_1.__importStar(require("../../../Redux/Actio
20
20
  const ConditionalStyleSettingsWizardSettings_1 = require("./ConditionalStyleSettingsWizardSettings");
21
21
  const ObjectTagsWizardSection_1 = require("../../Wizard/ObjectTagsWizardSection");
22
22
  exports.ConditionalStyleWizard = (props) => {
23
- var _a;
24
- const data = (_a = props.data) !== null && _a !== void 0 ? _a : props.popupParams.value;
23
+ var _a, _b;
24
+ const data = (_a = props.data) !== null && _a !== void 0 ? _a : (_b = props.popupParams) === null || _b === void 0 ? void 0 : _b.value;
25
25
  const [conditionalStyle, setConditionalStyle] = react_1.useState(() => {
26
26
  var _a, _b, _c;
27
27
  const DEFAULT_RULE = {
@@ -32,6 +32,6 @@ exports.ReportExportDropdown = (props) => {
32
32
  if ((report === null || report === void 0 ? void 0 : report.Name) === GeneralConstants_1.VISUAL_DATA_REPORT) {
33
33
  destinationItems.forEach((item) => (item.disabled = item.label === Enums_1.ExportDestination.Excel ? false : true));
34
34
  }
35
- return (React.createElement(DropdownButton_1.default, { tooltip: "Export Report", variant: "text", items: destinationItems },
35
+ return (React.createElement(DropdownButton_1.default, { columns: ['label'], tooltip: "Export Report", variant: "text", items: destinationItems },
36
36
  React.createElement(icons_1.Icon, { name: "export" })));
37
37
  };
@@ -1,14 +1,2 @@
1
1
  import * as React from 'react';
2
- import { AdaptableApi } from '../../Api/AdaptableApi';
3
- import { ColumnFilter } from '../../PredefinedConfig/FilterState';
4
- import { AccessLevel } from '../../PredefinedConfig/Common/Entitlement';
5
- export interface ActiveFiltersPanelProps extends React.ClassAttributes<ActiveFiltersPanel> {
6
- columnFilters: ColumnFilter[];
7
- api: AdaptableApi;
8
- accessLevel: AccessLevel;
9
- onClear: (columnFilter: ColumnFilter) => void;
10
- }
11
- export declare class ActiveFiltersPanel extends React.Component<ActiveFiltersPanelProps, {}> {
12
- render(): any;
13
- private createRow;
14
- }
2
+ export declare const ActiveFiltersPanel: React.FunctionComponent;
@@ -3,35 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ActiveFiltersPanel = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const React = tslib_1.__importStar(require("react"));
6
- const ButtonClear_1 = require("../Components/Buttons/ButtonClear");
7
- const Helper_1 = require("../../Utilities/Helpers/Helper");
8
- const AdaptableObjectRow_1 = require("../Components/AdaptableObjectRow");
9
- const PanelWithRow_1 = require("../Components/Panels/PanelWithRow");
10
- const rebass_1 = require("rebass");
11
- const stopPropagation = (e) => {
12
- e.stopPropagation();
6
+ const AdaptableContext_1 = require("../AdaptableContext");
7
+ const ModuleConstants = tslib_1.__importStar(require("../../Utilities/Constants/ModuleConstants"));
8
+ const AdaptableObjectCompactList_1 = require("../Components/AdaptableObjectList/AdaptableObjectCompactList");
9
+ exports.ActiveFiltersPanel = () => {
10
+ const adaptable = AdaptableContext_1.useAdaptable();
11
+ const filterModule = adaptable.ModuleService.getModuleById(ModuleConstants.FilterModuleId);
12
+ const columnFilters = adaptable.api.filterApi.getAllColumnFilter();
13
+ return React.createElement(AdaptableObjectCompactList_1.AdaptableObjectCompactList, { abObjects: columnFilters, module: filterModule });
13
14
  };
14
- class ActiveFiltersPanel extends React.Component {
15
- render() {
16
- let colItems = [
17
- { Content: 'Column Filter', Size: 9 },
18
- { Content: '', Size: 3 },
19
- ];
20
- let rowElements = [];
21
- this.props.columnFilters.forEach((columnFilter) => {
22
- rowElements.push(this.createRow(colItems, columnFilter));
23
- });
24
- return (React.createElement("div", null,
25
- React.createElement(PanelWithRow_1.PanelWithRow, { colItems: colItems }),
26
- React.createElement("div", null, rowElements)));
27
- }
28
- createRow(colItems, columnFilter) {
29
- let rowColItems = Helper_1.Helper.cloneObject(colItems);
30
- rowColItems[0].Content = this.props.api.filterApi.columnFilterToString(columnFilter);
31
- rowColItems[1].Content = (React.createElement(rebass_1.Flex, { justifyContent: "center", margin: 0, padding: 0, onClick: stopPropagation },
32
- React.createElement(ButtonClear_1.ButtonClear, { onClick: () => this.props.onClear(columnFilter), tooltip: "Clear Filter", disabled: columnFilter == null, accessLevel: this.props.accessLevel })));
33
- let rowElement = React.createElement(AdaptableObjectRow_1.AdaptableObjectRow, { key: columnFilter.ColumnId, colItems: rowColItems });
34
- return rowElement;
35
- }
36
- }
37
- exports.ActiveFiltersPanel = ActiveFiltersPanel;
@@ -3,16 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.FilterStatusBarSubPanelPopover = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const React = tslib_1.__importStar(require("react"));
6
- const react_redux_1 = require("react-redux");
7
- const ModuleConstants = tslib_1.__importStar(require("../../Utilities/Constants/ModuleConstants"));
8
- const AdaptableContext_1 = require("../AdaptableContext");
9
6
  const ActiveFiltersPanel_1 = require("./ActiveFiltersPanel");
10
7
  exports.FilterStatusBarSubPanelPopover = () => {
11
- const adaptable = AdaptableContext_1.useAdaptable();
12
- const columnFilters = react_redux_1.useSelector((state) => state.Filter.ColumnFilters);
13
- const accessLevel = adaptable.api.internalApi
14
- .getEntitlementService()
15
- .getEntitlementAccessLevelForModule(ModuleConstants.FilterModuleId);
16
- const handleClear = React.useCallback((columnFilter) => adaptable.api.filterApi.clearColumnFilterByColumn(columnFilter.ColumnId), []);
17
- return (React.createElement(ActiveFiltersPanel_1.ActiveFiltersPanel, { columnFilters: columnFilters, api: adaptable.api, accessLevel: accessLevel, onClear: handleClear }));
8
+ return React.createElement(ActiveFiltersPanel_1.ActiveFiltersPanel, null);
18
9
  };
@@ -16,11 +16,11 @@ class FilterViewPanelComponent extends React.Component {
16
16
  super(props);
17
17
  }
18
18
  render() {
19
- const activeFiltersPanel = (React.createElement(ActiveFiltersPanel_1.ActiveFiltersPanel, { columnFilters: this.props.ColumnFilters, api: this.props.api, accessLevel: this.props.accessLevel, onClear: (columnFilter) => this.onClearColumnFilter(columnFilter) }));
19
+ const activeFiltersPanel = React.createElement(ActiveFiltersPanel_1.ActiveFiltersPanel, null);
20
20
  const elementType = this.props.viewType === 'Toolbar' ? 'DashboardToolbar' : 'ToolPanel';
21
21
  return (React.createElement(rebass_1.Flex, { flexDirection: "row", className: `ab-${elementType}__Filter__wrap`, flexWrap: this.props.viewType === 'ToolPanel' ? 'wrap' : 'nowrap' },
22
22
  React.createElement(rebass_1.Flex, null, ArrayExtensions_1.ArrayExtensions.IsNotNullOrEmpty(this.props.ColumnFilters) && (React.createElement(React.Fragment, null,
23
- React.createElement(AdaptablePopover_1.AdaptablePopover, { className: `ab-${elementType}__Filter__info`, headerText: "", bodyText: [activeFiltersPanel],
23
+ React.createElement(AdaptablePopover_1.AdaptablePopover, { popupPadding: 0, className: `ab-${elementType}__Filter__info`, headerText: "", bodyText: [activeFiltersPanel],
24
24
  // tooltipText={'Show Filter Details'}
25
25
  useButton: true, showEvent: 'focus', hideEvent: "blur", popoverMinWidth: 400 }),
26
26
  React.createElement(ButtonClear_1.ButtonClear, { marginLeft: 1, marginBottom: 0, marginRight: 1, className: `ab-${elementType}__Filter__clear`, onClick: () => this.onClearFilters(), tooltip: "Clear Filters", disabled: this.props.ColumnFilters.length == 0, showText: this.props.viewType === 'ToolPanel' }, this.props.viewType === 'ToolPanel' && 'Clear')))),