@adaptabletools/adaptable-cjs 20.1.2 → 20.1.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 (62) hide show
  1. package/base.css +1 -0
  2. package/base.css.map +1 -1
  3. package/index.css +1 -0
  4. package/index.css.map +1 -1
  5. package/package.json +1 -1
  6. package/src/AdaptableState/Common/{AdaptableSearchState.d.ts → AdaptableFilterState.d.ts} +7 -7
  7. package/src/AdaptableState/Common/AdaptableSortState.d.ts +1 -1
  8. package/src/Api/Implementation/StateApiImpl.d.ts +2 -2
  9. package/src/Api/Implementation/StateApiImpl.js +5 -5
  10. package/src/Api/Internal/EventInternalApi.js +1 -1
  11. package/src/Api/Internal/ExportInternalApi.js +1 -1
  12. package/src/Api/StateApi.d.ts +3 -3
  13. package/src/Redux/Store/AdaptableStore.js +7 -6
  14. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ColumnsList.js +1 -1
  15. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/EntitlementsForm.js +1 -1
  16. package/src/View/CellSummary/CellSummaryDetails.js +1 -1
  17. package/src/View/CellSummary/CellSummaryViewPanel.js +2 -2
  18. package/src/View/ColumnInfo/ColumnInfo.js +1 -1
  19. package/src/View/Comments/CommentsPopup.js +1 -1
  20. package/src/View/Components/ColumnFilter/components/FloatingFilterValues.js +7 -1
  21. package/src/View/Components/Forms/AdaptableFormControlTextClear.js +1 -1
  22. package/src/View/Components/PreviewResultsPanel.js +1 -1
  23. package/src/View/Components/Selectors/BulkUpdateValueSelector.js +2 -2
  24. package/src/View/Components/Selectors/PermittedValuesSelector.js +1 -1
  25. package/src/View/Components/WizardSummaryPage.js +1 -1
  26. package/src/View/Dashboard/CustomDashboardButton.js +1 -1
  27. package/src/View/Dashboard/Dashboard.js +2 -2
  28. package/src/View/Dashboard/DashboardToolbarFactory.js +1 -1
  29. package/src/View/DataChangeHistory/DataChangeHistoryViewPanel.js +8 -9
  30. package/src/View/DataImport/DataImportWizard/sections/ColumnsSection.js +1 -1
  31. package/src/View/DataImport/DataImportWizard/sections/DataPreview.js +1 -1
  32. package/src/View/DataSet/DataSetViewPanel.js +1 -1
  33. package/src/View/Export/ReportFormatSelector.js +1 -1
  34. package/src/View/Export/ReportNameSelector.js +1 -1
  35. package/src/View/Filter/FilterViewPanel.js +2 -2
  36. package/src/View/GridFilter/GridFilterViewPanel.js +1 -1
  37. package/src/View/Layout/LayoutViewPanel.js +1 -1
  38. package/src/View/Layout/PivotDetailsPopoup.js +1 -1
  39. package/src/View/Layout/Wizard/sections/ColumnsSection.js +1 -1
  40. package/src/View/Note/NotePopup.js +1 -1
  41. package/src/View/SmartEdit/SmartEditViewPanel.js +1 -1
  42. package/src/View/StateManagement/components/LoadButton.js +1 -1
  43. package/src/View/Theme/ThemeSelector.js +1 -1
  44. package/src/agGrid/AdaptableAgGrid.d.ts +10 -0
  45. package/src/agGrid/AdaptableAgGrid.js +66 -28
  46. package/src/agGrid/AgGridExportAdapter.js +1 -1
  47. package/src/components/Dashboard/DashboardToolbar.js +2 -2
  48. package/src/components/Datepicker/index.js +49 -4
  49. package/src/components/Icon/index.js +1 -1
  50. package/src/components/InfiniteTable/index.d.ts +2 -2
  51. package/src/components/InfiniteTable/index.js +3 -3
  52. package/src/components/List/GridList/index.js +1 -1
  53. package/src/components/Select/Select.d.ts +2 -0
  54. package/src/components/Select/Select.js +1 -1
  55. package/src/components/SimpleButton/index.js +5 -1
  56. package/src/env.js +2 -2
  57. package/src/layout-manager/src/index.js +32 -3
  58. package/src/metamodel/adaptable.metamodel.d.ts +10 -10
  59. package/src/metamodel/adaptable.metamodel.js +1 -1
  60. package/src/types.d.ts +1 -1
  61. package/tsconfig.cjs.tsbuildinfo +1 -1
  62. /package/src/AdaptableState/Common/{AdaptableSearchState.js → AdaptableFilterState.js} +0 -0
@@ -101,6 +101,6 @@ const PermittedValuesSelector = function (props) {
101
101
  reload();
102
102
  }
103
103
  };
104
- return (React.createElement(Select_1.Select, { menuPortalTarget: props.menuPortalTarget, size: props.size, isMulti: props.isMulti, className: props.className, disabled: props.disabled, closeMenuOnSelect: !props.isMulti, "data-name": "permitted-values-selector", placeholder: props.placeholder || (props.allowNewValues ? 'Select or type new value' : 'Select value'), isCreatable: isCreatable, isClearable: true, onMenuOpen: reload, options: options, isLoading: isLoading, onInputChange: onInputChange, onChange: handleOnChange, onFocus: props.onFocus, onBlur: props.onBlur, value: props.value }));
104
+ return (React.createElement(Select_1.Select, { "aria-label": "Permitted Values Selector", menuPortalTarget: props.menuPortalTarget, size: props.size, isMulti: props.isMulti, className: props.className, disabled: props.disabled, closeMenuOnSelect: !props.isMulti, "data-name": "permitted-values-selector", placeholder: props.placeholder || (props.allowNewValues ? 'Select or type new value' : 'Select value'), isCreatable: isCreatable, isClearable: true, onMenuOpen: reload, options: options, isLoading: isLoading, onInputChange: onInputChange, onChange: handleOnChange, onFocus: props.onFocus, onBlur: props.onBlur, value: props.value }));
105
105
  };
106
106
  exports.PermittedValuesSelector = PermittedValuesSelector;
@@ -19,6 +19,6 @@ const tableDOMProps = {
19
19
  const WizardSummaryPage = (props) => {
20
20
  return (React.createElement(WizardPanel_1.default, { bodyProps: { padding: 0 }, className: "ab-WizardSummary", "data-name": 'wizard-summary' },
21
21
  React.createElement(InfiniteTable_1.DataSource, { data: props.KeyValuePairs, primaryKey: "Key" },
22
- React.createElement(InfiniteTable_1.InfiniteTable, { showZebraRows: true, domProps: tableDOMProps, columns: columnsMap }))));
22
+ React.createElement(InfiniteTable_1.InfiniteTableGrid, { showZebraRows: true, domProps: tableDOMProps, columns: columnsMap }))));
23
23
  };
24
24
  exports.WizardSummaryPage = WizardSummaryPage;
@@ -23,7 +23,7 @@ const CustomDashboardButton = (props) => {
23
23
  return null;
24
24
  }
25
25
  const disabled = button.disabled && button.disabled(button, dashboardContext);
26
- return (React.createElement(SimpleButton_1.default, { key: buttonLabel, variant: buttonStyle && buttonStyle.variant ? buttonStyle.variant : 'text', tone: buttonStyle && buttonStyle.tone ? buttonStyle.tone : 'none', className: `ab-DashboardToolbar__Home__${(0, kebabCase_1.default)(buttonLabel)} ${buttonStyle?.className || ''}`, tooltip: buttonTooltip, icon: buttonIcon, disabled: disabled || props.accessLevel == 'ReadOnly', onClick: () => {
26
+ return (React.createElement(SimpleButton_1.default, { key: buttonLabel, "aria-label": buttonLabel, variant: buttonStyle && buttonStyle.variant ? buttonStyle.variant : 'text', tone: buttonStyle && buttonStyle.tone ? buttonStyle.tone : 'none', className: `ab-DashboardToolbar__Home__${(0, kebabCase_1.default)(buttonLabel)} ${buttonStyle?.className || ''}`, tooltip: buttonTooltip, icon: buttonIcon, disabled: disabled || props.accessLevel == 'ReadOnly', onClick: () => {
27
27
  button.onClick?.(button, dashboardContext);
28
28
  setTimeout(() => {
29
29
  // mutate state to force a re-rendering
@@ -69,7 +69,7 @@ const DashboardComponent = (props) => {
69
69
  shortcuts = shortcutsArray.map((x, index) => {
70
70
  let menuItem = props.InternalState.Dashboard.DashboardModuleButtons.find((y) => y.isVisible && y.category == x);
71
71
  if (menuItem) {
72
- return (React.createElement(AdaptableButton_1.AdaptableButtonComponent, { "data-name": `dashboard-module-button-${menuItem.category ?? 'custom-' + index}`, key: menuItem.label, variant: menuItem.category === 'SystemStatus' ? 'outlined' : 'text', tone: menuItem.category === 'SystemStatus' ? 'neutral' : 'none', className: `ab-DashboardToolbar__Home__${(0, kebabCase_1.default)(menuItem.label)}`, icon: menuItem.icon, tooltip: menuItem.label, disabled: props.accessLevel == 'ReadOnly', onClick: () => props.dispatch(menuItem.reduxAction), accessLevel: 'Full', style: menuItem.category === 'SystemStatus'
72
+ return (React.createElement(AdaptableButton_1.AdaptableButtonComponent, { "data-name": `dashboard-module-button-${menuItem.category ?? 'custom-' + index}`, "aria-label": menuItem.label, key: menuItem.label, variant: menuItem.category === 'SystemStatus' ? 'outlined' : 'text', tone: menuItem.category === 'SystemStatus' ? 'neutral' : 'none', className: `ab-DashboardToolbar__Home__${(0, kebabCase_1.default)(menuItem.label)}`, icon: menuItem.icon, tooltip: menuItem.label, disabled: props.accessLevel == 'ReadOnly', onClick: () => props.dispatch(menuItem.reduxAction), accessLevel: 'Full', style: menuItem.category === 'SystemStatus'
73
73
  ? {
74
74
  ...UIHelper_1.default.getStyleForMessageType(props.api.systemStatusApi.getCurrentSystemStatusMessageInfo()?.statusType ??
75
75
  'Success'),
@@ -93,7 +93,7 @@ const DashboardComponent = (props) => {
93
93
  };
94
94
  const renderQuickSearch = () => {
95
95
  return (React.createElement(rebass_1.Box, { ml: 2 },
96
- React.createElement(AdaptableFormControlTextClear_1.AdaptableFormControlTextClear, { type: "text", placeholder: props.api.optionsApi.getQuickSearchOptions().quickSearchPlaceholder, className: "ab-DashboardToolbar__QuickSearch__text", value: searchText, OnTextChange: search, style: { width: 'auto' }, inputStyle: { width: '7rem' } })));
96
+ React.createElement(AdaptableFormControlTextClear_1.AdaptableFormControlTextClear, { type: "text", "aria-label": 'Quick Search', placeholder: props.api.optionsApi.getQuickSearchOptions().quickSearchPlaceholder, className: "ab-DashboardToolbar__QuickSearch__text", value: searchText, OnTextChange: search, style: { width: 'auto' }, inputStyle: { width: '7rem' } })));
97
97
  };
98
98
  let instanceName = props.api.internalApi.getToolbarTitle();
99
99
  let dashboardOptions = props.api.optionsApi.getDashboardOptions();
@@ -16,7 +16,7 @@ const SystemDashboardToolbarFactory = (props) => {
16
16
  const accessLevel = adaptable.api.entitlementApi.getEntitlementAccessLevelForModule(props.toolbarName);
17
17
  const moduleToolbarView = AdaptableViewFactory_1.AdaptableViewPanelFactory.get(props.toolbarName);
18
18
  if (!moduleToolbarView) {
19
- return React.createElement(React.Fragment, null, "adasdasdas");
19
+ return React.createElement(React.Fragment, null);
20
20
  }
21
21
  const moduleToolbarElement = React.createElement(moduleToolbarView, {
22
22
  viewType: 'Toolbar',
@@ -24,21 +24,20 @@ const DataChangeHistoryViewPanelControl = (props) => {
24
24
  const handleOpenPopup = React.useCallback(() => {
25
25
  adaptable.api.settingsPanelApi.openSettingsPanel('DataChangeHistory');
26
26
  }, []);
27
- const { changeHistoryMode, activationTime, suspensionTime } = (0, react_redux_1.useSelector)((state) => ({
28
- changeHistoryMode: state.Internal.DataChangeHistory.currentMode,
29
- activationTime: state.Internal.DataChangeHistory.enableTime,
30
- suspensionTime: state.Internal.DataChangeHistory.suspendTime,
31
- }));
27
+ const dataChangeHistoryState = (0, react_redux_1.useSelector)((state) => state.Internal.DataChangeHistory);
28
+ const changeHistoryMode = dataChangeHistoryState.currentMode;
29
+ const activationTime = dataChangeHistoryState.enableTime;
30
+ const suspensionTime = dataChangeHistoryState.suspendTime;
32
31
  const enabled = changeHistoryMode === 'ACTIVE';
33
32
  const disabled = changeHistoryMode === 'INACTIVE';
34
33
  const suspended = changeHistoryMode === 'SUSPENDED';
35
34
  const gap = props.gap ?? 'var(--ab-space-1)';
36
35
  const buttonsPaddingY = props.buttonsPaddingY ?? 2;
37
36
  const buttonPanel = (React.createElement(rebass_1.Flex, { className: "ab-DataChangeHistoryPanel--button-panel", paddingY: buttonsPaddingY, style: { gap: gap } },
38
- disabled && (React.createElement(ButtonPlay_1.ButtonPlay, { className: "ab-DataChangeHistoryPanel--button-activate", "data-name": 'data-change-history--button-activate', tooltip: '', onClick: () => onChangeHistoryEnable() })),
39
- suspended && (React.createElement(ButtonPlay_1.ButtonPlay, { className: "ab-DataChangeHistoryPanel--button-resume", "data-name": 'data-change-history--button-resume', tooltip: 'Resume tracking data changes', onClick: () => onChangeHistoryResume() })),
40
- enabled && (React.createElement(ButtonPause_1.ButtonPause, { className: "ab-DataChangeHistoryPanel--button-suspend", "data-name": 'data-change-history--button-suspend', tooltip: 'Suspend tracking data changes', onClick: () => onChangeHistorySuspend() })),
41
- (enabled || suspended) && (React.createElement(ButtonStop_1.ButtonStop, { className: "ab-DataChangeHistoryPanel--button-deactivate", "data-name": 'data-change-history--button-deactivate', tooltip: 'Deactivate data change tracking', onClick: () => onChangeHistoryDisable() }))));
37
+ disabled && (React.createElement(ButtonPlay_1.ButtonPlay, { "aria-label": "Enable Data Change History", className: "ab-DataChangeHistoryPanel--button-activate", "data-name": 'data-change-history--button-activate', tooltip: '', onClick: () => onChangeHistoryEnable() })),
38
+ suspended && (React.createElement(ButtonPlay_1.ButtonPlay, { "aria-label": "Resume Data Change History", className: "ab-DataChangeHistoryPanel--button-resume", "data-name": 'data-change-history--button-resume', tooltip: 'Resume tracking data changes', onClick: () => onChangeHistoryResume() })),
39
+ enabled && (React.createElement(ButtonPause_1.ButtonPause, { "aria-label": "Suspend Data Change History", className: "ab-DataChangeHistoryPanel--button-suspend", "data-name": 'data-change-history--button-suspend', tooltip: 'Suspend tracking data changes', onClick: () => onChangeHistorySuspend() })),
40
+ (enabled || suspended) && (React.createElement(ButtonStop_1.ButtonStop, { "aria-label": "Deactivate Data Change History", className: "ab-DataChangeHistoryPanel--button-deactivate", "data-name": 'data-change-history--button-deactivate', tooltip: 'Deactivate data change tracking', onClick: () => onChangeHistoryDisable() }))));
42
41
  const dateFormat = `${adaptable.api.optionsApi.getUserInterfaceOptions().dateInputOptions.dateFormat} HH:mm:ss`;
43
42
  const statusPanel = (React.createElement(rebass_1.Flex, { className: "ab-DataChangeHistoryPanel--status-panel", alignItems: 'center', style: { gap: gap } },
44
43
  enabled && (React.createElement(Tooltip_1.default, { label: !!activationTime && `since ${(0, FormatHelper_1.DateFormatter)(activationTime, { Pattern: dateFormat })}` },
@@ -118,7 +118,7 @@ const ColumnsSection = (props) => {
118
118
  React.createElement(Tabs_1.Tabs.Tab, null, "Columns"),
119
119
  React.createElement(Tabs_1.Tabs.Content, null,
120
120
  React.createElement(InfiniteTable_1.DataSource, { data: props.columnsMap, primaryKey: 'field' },
121
- React.createElement(InfiniteTable_1.InfiniteTable, { columnPinning: {
121
+ React.createElement(InfiniteTable_1.InfiniteTableGrid, { columnPinning: {
122
122
  valid: 'end',
123
123
  type: 'end',
124
124
  }, columnTypes: {
@@ -143,7 +143,7 @@ const DataPreview = (props) => {
143
143
  });
144
144
  props.onDataChange(newRowData);
145
145
  } },
146
- React.createElement(InfiniteTable_1.InfiniteTable, { columnPinning: {
146
+ React.createElement(InfiniteTable_1.InfiniteTableGrid, { columnPinning: {
147
147
  valid: 'end',
148
148
  type: 'end',
149
149
  }, columnTypes: {
@@ -30,7 +30,7 @@ class DataSetViewPanelComponent extends React.Component {
30
30
  });
31
31
  const elementType = this.props.viewType === 'Toolbar' ? 'DashboardToolbar' : 'ToolPanel';
32
32
  return (React.createElement(rebass_1.Flex, { flexDirection: "row", className: `ab-${elementType}__DataSet__wrap` },
33
- React.createElement(Select_1.Select, { style: { width: '100%' }, placeholder: 'Select Data Set', disabled: ArrayExtensions_1.default.IsNullOrEmpty(availableDataSets), options: availableDataSets, value: currentDataSetName, className: `ab-${elementType}__DataSet__select`, onChange: (destination) => this.onSelectedDataSetChanged(destination) })));
33
+ React.createElement(Select_1.Select, { "aria-label": 'Select Data Set', style: { width: '100%' }, placeholder: 'Select Data Set', disabled: ArrayExtensions_1.default.IsNullOrEmpty(availableDataSets), options: availableDataSets, value: currentDataSetName, className: `ab-${elementType}__DataSet__select`, onChange: (destination) => this.onSelectedDataSetChanged(destination) })));
34
34
  }
35
35
  onSelectedDataSetChanged(dataSetName) {
36
36
  if (StringExtensions_1.StringExtensions.IsNullOrEmpty(dataSetName)) {
@@ -20,6 +20,6 @@ const ReportFormatSelector = (props) => {
20
20
  });
21
21
  const elementType = props.viewType === 'Toolbar' ? 'DashboardToolbar' : 'ToolPanel';
22
22
  return (react_1.default.createElement(rebass_1.Flex, { "data-name": "report-format-selector", flex: 1, minWidth: 140 },
23
- react_1.default.createElement(Select_1.Select, { style: { width: '100%' }, size: size, placeholder: GeneralConstants_1.SELECT_REPORT_FORMAT_STRING, disabled: !allFormats.length || reportName == undefined, className: `ab-${elementType}__Export__format-select`, options: formatItems, onChange: (format) => onReportFormatSelected(format), value: reportFormat, isClearable: true })));
23
+ react_1.default.createElement(Select_1.Select, { "aria-label": GeneralConstants_1.SELECT_REPORT_FORMAT_STRING, style: { width: '100%' }, size: size, placeholder: GeneralConstants_1.SELECT_REPORT_FORMAT_STRING, disabled: !allFormats.length || reportName == undefined, className: `ab-${elementType}__Export__format-select`, options: formatItems, onChange: (format) => onReportFormatSelected(format), value: reportFormat, isClearable: true })));
24
24
  };
25
25
  exports.ReportFormatSelector = ReportFormatSelector;
@@ -20,6 +20,6 @@ const ReportNameSelector = (props) => {
20
20
  });
21
21
  const elementType = props.viewType === 'Toolbar' ? 'DashboardToolbar' : 'ToolPanel';
22
22
  return (react_1.default.createElement(rebass_1.Flex, { "data-name": "report-name-selector", flex: 1, minWidth: 160 },
23
- react_1.default.createElement(Select_1.Select, { style: { width: '100%' }, size: size, "data-name": "report-name-selector", placeholder: GeneralConstants_1.SELECT_REPORT_STRING, disabled: !allReportNames.length, className: `ab-${elementType}__Export__report-select`, options: reportItems, onChange: (report) => onReportNameSelected(report), value: reportName, isClearable: true })));
23
+ react_1.default.createElement(Select_1.Select, { "aria-label": GeneralConstants_1.SELECT_REPORT_STRING, style: { width: '100%' }, size: size, "data-name": "report-name-selector", placeholder: GeneralConstants_1.SELECT_REPORT_STRING, disabled: !allReportNames.length, className: `ab-${elementType}__Export__report-select`, options: reportItems, onChange: (report) => onReportNameSelected(report), value: reportName, isClearable: true })));
24
24
  };
25
25
  exports.ReportNameSelector = ReportNameSelector;
@@ -33,8 +33,8 @@ class FilterViewPanelComponent extends React.Component {
33
33
  return (React.createElement(rebass_1.Flex, { flexDirection: "row", className: `ab-${elementType}__Filter__wrap`, flexWrap: this.props.viewType === 'ToolPanel' ? 'wrap' : 'nowrap' },
34
34
  React.createElement(rebass_1.Flex, null,
35
35
  ArrayExtensions_1.ArrayExtensions.IsNotNullOrEmpty(this.props.ColumnFilters) && (React.createElement(AdaptablePopover_1.AdaptablePopover, { popupPadding: 0, className: `ab-${elementType}__Filter__info`, headerText: "", bodyText: [React.createElement(ActiveFiltersPanel_1.ActiveFiltersPanel, null)], useButton: true, showEvent: 'focus', hideEvent: "blur", popoverMinWidth: 400 })),
36
- React.createElement(ButtonClear_1.ButtonClear, { className: `ab-${elementType}__Filter__clear`, marginLeft: 1, marginBottom: 0, marginRight: 1, onClick: () => this.onClearFilters(), tooltip: "Clear Filters", disabled: this.props.ColumnFilters.length == 0, showText: this.props.viewType === 'ToolPanel' }, this.props.viewType === 'ToolPanel' && 'Clear'),
37
- React.createElement(SimpleButton_1.default, { className: (0, join_1.default)(`ab-${elementType}__Filter__suspend-button`, isAtLeastOneFilterActive && `ab-${elementType}__Filter__suspend-all`, !isAtLeastOneFilterActive && `ab-${elementType}__Filter__un-suspend-all`), disabled: !isAtLeastOneFilter, onClick: handleSuspendUnsuspendAll, tone: isAtLeastOneFilterActive ? 'neutral' : 'success', variant: "text", icon: isAtLeastOneFilterActive ? 'pause' : 'play', accessLevel: this.props.accessLevel })),
36
+ React.createElement(ButtonClear_1.ButtonClear, { "aria-label": 'Clear Filters', className: `ab-${elementType}__Filter__clear`, marginLeft: 1, marginBottom: 0, marginRight: 1, onClick: () => this.onClearFilters(), tooltip: "Clear Filters", disabled: this.props.ColumnFilters.length == 0, showText: this.props.viewType === 'ToolPanel' }, this.props.viewType === 'ToolPanel' && 'Clear'),
37
+ React.createElement(SimpleButton_1.default, { "aria-label": isAtLeastOneFilterActive ? 'Suspend All Filters' : 'Resume All Filters', className: (0, join_1.default)(`ab-${elementType}__Filter__suspend-button`, isAtLeastOneFilterActive && `ab-${elementType}__Filter__suspend-all`, !isAtLeastOneFilterActive && `ab-${elementType}__Filter__un-suspend-all`), disabled: !isAtLeastOneFilter, onClick: handleSuspendUnsuspendAll, tone: isAtLeastOneFilterActive ? 'neutral' : 'success', variant: "text", icon: isAtLeastOneFilterActive ? 'pause' : 'play', accessLevel: this.props.accessLevel })),
38
38
  React.createElement(rebass_1.Flex, { alignItems: "center" }, this.props.api.filterApi.columnFilterApi.isQuickFilterAvailable() && (React.createElement(CheckBox_1.CheckBox, { className: `ab-${elementType}__Filter__active-check`, disabled: this.props.accessLevel === 'ReadOnly' ||
39
39
  this.props.api.layoutApi.isCurrentLayoutPivot(), marginTop: 0, marginBottom: 0, fontSize: 2, padding: 1, checked: this.props.IsQuickFilterVisible, onChange: (checked) => {
40
40
  checked ? this.props.onShowQuickFilterBar() : this.props.onHideQuickFilterBar();
@@ -94,7 +94,7 @@ const QueryViewPanelComponent = (props) => {
94
94
  columnsDropdown,
95
95
  namedQuerySelector,
96
96
  ' ')) : (React.createElement(React.Fragment, null,
97
- React.createElement(ButtonPlay_1.ButtonPlay, { onClick: () => runQuery(), tooltip: "Run Grid Filter", accessLevel: gridFilterAccessLevel, variant: "text", tone: "neutral", disabled: disabled || !isExpressionValid || expression == '' || expression == gridFilter, marginRight: 1 }),
97
+ React.createElement(ButtonPlay_1.ButtonPlay, { "aria-label": 'Run Grid Filter', onClick: () => runQuery(), tooltip: "Run Grid Filter", accessLevel: gridFilterAccessLevel, variant: "text", tone: "neutral", disabled: disabled || !isExpressionValid || expression == '' || expression == gridFilter, marginRight: 1 }),
98
98
  ' ',
99
99
  React.createElement(ButtonClear_1.ButtonClear, { onClick: () => clearQuery(), tooltip: "Clear Grid Filter", accessLevel: gridFilterAccessLevel, disabled: expression == '' }),
100
100
  ' ',
@@ -44,7 +44,7 @@ const LayoutViewPanelComponent = (props) => {
44
44
  const layoutSelectStyle = elementType === 'ToolPanel' ? { minWidth: '100%' } : {};
45
45
  return (React.createElement(rebass_1.Flex, { flexDirection: "row", className: `ab-${elementType}__Layout__wrap`, flexWrap: viewType === 'ToolPanel' ? 'wrap' : 'nowrap' },
46
46
  React.createElement(rebass_1.Flex, { style: layoutSelectStyle, flex: 1 },
47
- React.createElement(Select_1.Select, { disabled: isErrorLayout, style: { width: '100%' }, options: availableLayoutOptions, className: `ab-${elementType}__Layout__select`, value: layoutEntity ? layoutEntity.Name : null, onChange: (layout) => onSelectLayout(layout) })),
47
+ React.createElement(Select_1.Select, { "aria-label": 'Select Layout', disabled: isErrorLayout, style: { width: '100%' }, options: availableLayoutOptions, className: `ab-${elementType}__Layout__select`, value: layoutEntity ? layoutEntity.Name : null, onChange: (layout) => onSelectLayout(layout) })),
48
48
  React.createElement(rebass_1.Flex, { flexDirection: "row", className: (0, join_1.default)(accessLevel === 'ReadOnly' ? GeneralConstants.READ_ONLY_STYLE : '', `ab-${elementType}__Layout__wrap`) },
49
49
  React.createElement(ButtonEdit_1.ButtonEdit, { disabled: isErrorLayout, onClick: () => api.layoutApi.showLayoutEditor(layoutEntity.Name), tooltip: GeneralConstants_1.LAYOUT_EDIT_TOOLTIP, className: `ab-${elementType}__Layout__edit`, accessLevel: entityAccessLevel }),
50
50
  React.createElement(ButtonClone_1.ButtonClone, { disabled: isErrorLayout, onClick: () => api.layoutApi.showLayoutEditor(layoutEntity.Name, (0, isPivotLayout_1.isPivotLayout)(layoutEntity) ? 'pivot' : 'table', 'Clone'), tooltip: GeneralConstants_1.LAYOUT_CLONE_TOOLTIP, className: `ab-${elementType}__Layout__clone`, tone: "neutral", variant: "text", children: null, accessLevel: cloneAccessLevel }),
@@ -73,6 +73,6 @@ const PivotDetailsPopoup = (props) => {
73
73
  };
74
74
  }, [props.popupProps]);
75
75
  return (React.createElement(InfiniteTable_1.DataSource, { data: data, primaryKey: columnId },
76
- React.createElement(InfiniteTable_1.InfiniteTable, { columnTypes: columnTypes, domProps: tableDOMProps, columns: columns })));
76
+ React.createElement(InfiniteTable_1.InfiniteTableGrid, { columnTypes: columnTypes, domProps: tableDOMProps, columns: columns })));
77
77
  };
78
78
  exports.PivotDetailsPopoup = PivotDetailsPopoup;
@@ -133,7 +133,7 @@ const ColumnsSectionSummary = () => {
133
133
  },
134
134
  };
135
135
  return (React.createElement(InfiniteTable_1.DataSource, { data: data, primaryKey: "columnId" },
136
- React.createElement(InfiniteTable_1.InfiniteTable, { columnTypes: columnTypes, rowHeight: rowHeight, columnHeaderHeight: headerHeight, domProps: tableDOMProps, columns: columns })));
136
+ React.createElement(InfiniteTable_1.InfiniteTableGrid, { columnTypes: columnTypes, rowHeight: rowHeight, columnHeaderHeight: headerHeight, domProps: tableDOMProps, columns: columns })));
137
137
  };
138
138
  exports.ColumnsSectionSummary = ColumnsSectionSummary;
139
139
  const ColumnRow = (props) => {
@@ -91,6 +91,6 @@ const NotePopup = (props) => {
91
91
  }
92
92
  }
93
93
  } },
94
- React.createElement(InfiniteTable_1.InfiniteTable, { columnTypes: columnTypes, headerOptions: headerOptions, domProps: tableDOMProps, columns: columnsMap }))));
94
+ React.createElement(InfiniteTable_1.InfiniteTableGrid, { columnTypes: columnTypes, headerOptions: headerOptions, domProps: tableDOMProps, columns: columnsMap }))));
95
95
  };
96
96
  exports.NotePopup = NotePopup;
@@ -70,7 +70,7 @@ class SmartEditViewPanelComponent extends React.Component {
70
70
  const elementType = this.props.viewType === 'Toolbar' ? 'DashboardToolbar' : 'ToolPanel';
71
71
  return (React.createElement(rebass_1.Flex, { flexDirection: "row", className: `ab-${elementType}__SmartEdit__wrap`, flexWrap: this.props.viewType === 'ToolPanel' ? 'wrap' : 'nowrap' },
72
72
  React.createElement(rebass_1.Flex, null,
73
- React.createElement(Select_1.Select, { value: typeof this.props.SmartEditOperation === 'object'
73
+ React.createElement(Select_1.Select, { "aria-label": 'Select Smart Edit Operation', value: typeof this.props.SmartEditOperation === 'object'
74
74
  ? this.props.SmartEditOperation.name
75
75
  : this.props.SmartEditOperation, options: operationMenuItems, onChange: (operation) => this.props.onSmartEditOperationChange(operation), style: { marginRight: 1 } }),
76
76
  React.createElement(Input_1.default, { style: {
@@ -21,7 +21,7 @@ const LoadButton = (props) => {
21
21
  });
22
22
  };
23
23
  return (React.createElement(SimpleButton_1.default, { ...props, className: "ab-StateManagement__Load-Button" },
24
- React.createElement("input", { type: "file", onChange: (json) => onLoadInitialState(json), accept: '.json', style: {
24
+ React.createElement("input", { "aria-label": "Load Adaptable State", type: "file", onChange: (json) => onLoadInitialState(json), accept: '.json', style: {
25
25
  opacity: 0,
26
26
  position: 'absolute',
27
27
  cursor: 'pointer',
@@ -27,7 +27,7 @@ const ThemeSelector = (props) => {
27
27
  label: theme.Description,
28
28
  };
29
29
  });
30
- return (React.createElement(Select_1.Select, { "data-name": "select-theme-dropdown", searchable: false, options: optionThemes, value: currentTheme, disabled: disabled, size: props.size, onChange: (themeName) => {
30
+ return (React.createElement(Select_1.Select, { "aria-label": "Select Theme", "data-name": "select-theme-dropdown", searchable: false, options: optionThemes, value: currentTheme, disabled: disabled, size: props.size, onChange: (themeName) => {
31
31
  dispatch(ThemeRedux.ThemeSelect(themeName));
32
32
  } }));
33
33
  };
@@ -225,6 +225,16 @@ export declare class AdaptableAgGrid implements IAdaptable {
225
225
  updateRowGroupsExpandedState(layout?: Layout): void;
226
226
  isGroupRowNode(rowNode: IRowNode): boolean;
227
227
  getFilteredData(): any[];
228
+ /**
229
+ * This method internally differentiates between server-side and client-side row model
230
+ * and correctly calls the appropriate method as per the current row model type
231
+ */
232
+ private applyAgGridTransaction;
233
+ /**
234
+ * This method internally differentiates between server-side and client-side row model
235
+ * and correctly calls the appropriate method as per the current row model type
236
+ */
237
+ private applyAgGridTransactionAsync;
228
238
  updateRows(dataRows: any[], dataUpdateConfig?: DataUpdateConfig): Promise<IRowNode[]>;
229
239
  addRows(dataRows: any[], dataUpdateConfig?: DataUpdateConfig): Promise<IRowNode[]>;
230
240
  addOrUpdateRows(dataRows: any[], dataUpdateConfig?: DataUpdateConfig): Promise<{
@@ -1561,8 +1561,11 @@ You need to define at least one Layout!`);
1561
1561
  if (isPivot) {
1562
1562
  // let's also support the pivot result columns
1563
1563
  const pivotResultColumns = gridApi.getPivotResultColumns() || [];
1564
+ const autoGroupColumns = gridApi
1565
+ .getAllGridColumns()
1566
+ .filter((column) => this.api.columnApi.isAutoRowGroupColumn(column.getColId()));
1564
1567
  if (pivotResultColumns.length) {
1565
- agGridCols = [...agGridCols, ...pivotResultColumns];
1568
+ agGridCols = [...agGridCols, ...pivotResultColumns, ...autoGroupColumns];
1566
1569
  }
1567
1570
  }
1568
1571
  const columnGroupChildren = gridApi
@@ -1958,6 +1961,28 @@ You need to define at least one Layout!`);
1958
1961
  });
1959
1962
  return data;
1960
1963
  }
1964
+ /**
1965
+ * This method internally differentiates between server-side and client-side row model
1966
+ * and correctly calls the appropriate method as per the current row model type
1967
+ */
1968
+ applyAgGridTransaction(transaction) {
1969
+ const isServerSideRowModel = this.getAgGridRowModelType() === 'serverSide';
1970
+ const agGridApi = this.agGridAdapter.getAgGridApi();
1971
+ return isServerSideRowModel
1972
+ ? agGridApi.applyServerSideTransaction(transaction)
1973
+ : agGridApi.applyTransaction(transaction);
1974
+ }
1975
+ /**
1976
+ * This method internally differentiates between server-side and client-side row model
1977
+ * and correctly calls the appropriate method as per the current row model type
1978
+ */
1979
+ applyAgGridTransactionAsync(transaction, callback) {
1980
+ const isServerSideRowModel = this.getAgGridRowModelType() === 'serverSide';
1981
+ const agGridApi = this.agGridAdapter.getAgGridApi();
1982
+ return isServerSideRowModel
1983
+ ? agGridApi.applyServerSideTransactionAsync(transaction, callback)
1984
+ : agGridApi.applyTransactionAsync(transaction, callback);
1985
+ }
1961
1986
  updateRows(dataRows, dataUpdateConfig) {
1962
1987
  if (this.hasAutogeneratedPrimaryKey) {
1963
1988
  this.addSyntheticPrimaryKeyIfMissing(dataRows);
@@ -1965,9 +1990,7 @@ You need to define at least one Layout!`);
1965
1990
  dataUpdateConfig = dataUpdateConfig || {};
1966
1991
  if (dataUpdateConfig.runAsync) {
1967
1992
  return new Promise((resolve) => {
1968
- this.agGridAdapter
1969
- .getAgGridApi()
1970
- .applyTransactionAsync({ update: dataRows }, (transaction) => {
1993
+ this.applyAgGridTransactionAsync({ update: dataRows }, (transaction) => {
1971
1994
  if (typeof dataUpdateConfig.callback === 'function') {
1972
1995
  dataUpdateConfig.callback(transaction);
1973
1996
  }
@@ -1979,7 +2002,7 @@ You need to define at least one Layout!`);
1979
2002
  });
1980
2003
  }
1981
2004
  else {
1982
- const transaction = this.agGridAdapter.getAgGridApi().applyTransaction({
2005
+ const transaction = this.applyAgGridTransaction({
1983
2006
  update: dataRows,
1984
2007
  });
1985
2008
  if (dataUpdateConfig.flushAsync) {
@@ -1999,7 +2022,7 @@ You need to define at least one Layout!`);
1999
2022
  }
2000
2023
  if (dataUpdateConfig.runAsync) {
2001
2024
  return new Promise((resolve) => {
2002
- this.agGridAdapter.getAgGridApi().applyTransactionAsync(newData, (transaction) => {
2025
+ this.applyAgGridTransactionAsync(newData, (transaction) => {
2003
2026
  if (typeof dataUpdateConfig.callback === 'function') {
2004
2027
  dataUpdateConfig.callback(transaction);
2005
2028
  }
@@ -2012,7 +2035,7 @@ You need to define at least one Layout!`);
2012
2035
  });
2013
2036
  }
2014
2037
  else {
2015
- const transaction = this.agGridAdapter.getAgGridApi().applyTransaction(newData);
2038
+ const transaction = this.applyAgGridTransaction(newData);
2016
2039
  if (dataUpdateConfig.flushAsync) {
2017
2040
  this.agGridAdapter.getAgGridApi().flushAsyncTransactions();
2018
2041
  }
@@ -2039,9 +2062,7 @@ You need to define at least one Layout!`);
2039
2062
  dataUpdateConfig = dataUpdateConfig || {};
2040
2063
  if (dataUpdateConfig.runAsync) {
2041
2064
  return new Promise((resolve) => {
2042
- this.agGridAdapter
2043
- .getAgGridApi()
2044
- .applyTransactionAsync({ update: updateDataRows, add: addDataRows, addIndex: dataUpdateConfig.addIndex }, (transaction) => {
2065
+ this.applyAgGridTransactionAsync({ update: updateDataRows, add: addDataRows, addIndex: dataUpdateConfig.addIndex }, (transaction) => {
2045
2066
  if (typeof dataUpdateConfig.callback === 'function') {
2046
2067
  dataUpdateConfig.callback(transaction);
2047
2068
  }
@@ -2059,7 +2080,7 @@ You need to define at least one Layout!`);
2059
2080
  });
2060
2081
  }
2061
2082
  else {
2062
- const transaction = this.agGridAdapter.getAgGridApi().applyTransaction({
2083
+ const transaction = this.applyAgGridTransaction({
2063
2084
  update: updateDataRows,
2064
2085
  add: addDataRows,
2065
2086
  addIndex: dataUpdateConfig.addIndex,
@@ -2080,9 +2101,7 @@ You need to define at least one Layout!`);
2080
2101
  dataUpdateConfig = dataUpdateConfig || {};
2081
2102
  if (dataUpdateConfig.runAsync) {
2082
2103
  return new Promise((resolve) => {
2083
- this.agGridAdapter
2084
- .getAgGridApi()
2085
- .applyTransactionAsync({ remove: dataRows }, (transaction) => {
2104
+ this.applyAgGridTransactionAsync({ remove: dataRows }, (transaction) => {
2086
2105
  if (typeof dataUpdateConfig.callback === 'function') {
2087
2106
  dataUpdateConfig.callback(transaction);
2088
2107
  }
@@ -2094,7 +2113,7 @@ You need to define at least one Layout!`);
2094
2113
  });
2095
2114
  }
2096
2115
  else {
2097
- const transaction = this.agGridAdapter.getAgGridApi().applyTransaction({
2116
+ const transaction = this.applyAgGridTransaction({
2098
2117
  remove: dataRows,
2099
2118
  });
2100
2119
  if (dataUpdateConfig.flushAsync) {
@@ -3030,7 +3049,7 @@ You need to define at least one Layout!`);
3030
3049
  // and is specific to Adaptable, therefore we need to refresh it manually
3031
3050
  this.refreshHeader();
3032
3051
  const layoutModel = (0, LayoutHelpers_1.layoutStateToLayoutModel)(layout);
3033
- this.layoutManager?.setLayout(layoutModel, {
3052
+ const layoutChanged = this.layoutManager?.setLayout(layoutModel, {
3034
3053
  skipApplyRowGroupsExpandedState: !shouldUpdateExpandState,
3035
3054
  });
3036
3055
  if (layout.AutoSizeColumns) {
@@ -3053,6 +3072,15 @@ You need to define at least one Layout!`);
3053
3072
  plugin.afterSetLayout(this, layout);
3054
3073
  }
3055
3074
  });
3075
+ if (!layoutChanged) {
3076
+ // we won't get an onLayoutChange event
3077
+ // most likely only filters have changed (column or grid filters)
3078
+ // and because filters are not part of the layout manager
3079
+ // there will be no change to the layout
3080
+ // so we need to manually trigger the onLayoutChange event
3081
+ // for other layout-related updates
3082
+ this.onLayoutChange(layout, { skipRefresh: true });
3083
+ }
3056
3084
  perfSetLayout.end();
3057
3085
  }
3058
3086
  getActiveAdaptableAggFuncForCol(columnId) {
@@ -3176,7 +3204,14 @@ You need to define at least one Layout!`);
3176
3204
  });
3177
3205
  this.refreshCellsBasedOnCellDataChange(rowNode, cellDataChangedInfos);
3178
3206
  this.refreshColumnsBasedOnCellDataChange(cellDataChangedInfos);
3179
- this.filterOnDataChange();
3207
+ const colIds = cellDataChangedInfos.map((c) => c.column.columnId);
3208
+ const { columnFilterApi, gridFilterApi } = this.api.filterApi;
3209
+ const isGridFilterActive = !!gridFilterApi.getCurrentGridFilterExpression();
3210
+ const isColumnFilterActive = colIds.some((colId) => columnFilterApi.isColumnFilterActiveForColumn(colId));
3211
+ const shouldFilter = isGridFilterActive || isColumnFilterActive;
3212
+ if (shouldFilter) {
3213
+ this.filterOnDataChange();
3214
+ }
3180
3215
  }
3181
3216
  refreshCellsBasedOnCellDataChange(rowNode, cellDataChangedInfos) {
3182
3217
  // Check if node is visible as otherwise AG Grid wont refresh
@@ -3354,18 +3389,21 @@ You need to define at least one Layout!`);
3354
3389
  };
3355
3390
  return hasPivotTotals(one) || hasPivotTotals(other);
3356
3391
  }
3357
- onLayoutChange(layout) {
3392
+ onLayoutChange(layout, options) {
3358
3393
  this.logger.info('onLayoutChange()');
3359
- const prevOnChangeLayout = this.__prevLayoutForOnChange || this.api.layoutApi.getCurrentLayout();
3360
- // see #on-regroup-expect-group-column-to-be-recomputed-and-setup-properly
3361
- const rowGroupsChanged = this.isRowGroupDifferentInLayout(prevOnChangeLayout, layout);
3362
- const hasPivotTotalsInLayout = this.hasPivotTotalsInLayout(prevOnChangeLayout, layout);
3363
- const pivotColsChanged = JSON.stringify(layout.PivotColumns) !== JSON.stringify(prevOnChangeLayout.PivotColumns);
3364
- if (rowGroupsChanged || pivotColsChanged || hasPivotTotalsInLayout) {
3365
- this.updateColumnModelAndRefreshGrid();
3366
- }
3367
- else {
3368
- this.deriveAdaptableColumnStateFromAgGrid();
3394
+ const skipRefresh = options?.skipRefresh;
3395
+ if (!skipRefresh) {
3396
+ const prevOnChangeLayout = this.__prevLayoutForOnChange || this.api.layoutApi.getCurrentLayout();
3397
+ // see #on-regroup-expect-group-column-to-be-recomputed-and-setup-properly
3398
+ const rowGroupsChanged = this.isRowGroupDifferentInLayout(prevOnChangeLayout, layout);
3399
+ const hasPivotTotalsInLayout = this.hasPivotTotalsInLayout(prevOnChangeLayout, layout);
3400
+ const pivotColsChanged = JSON.stringify(layout.PivotColumns) !== JSON.stringify(prevOnChangeLayout.PivotColumns);
3401
+ if (rowGroupsChanged || pivotColsChanged || hasPivotTotalsInLayout) {
3402
+ this.updateColumnModelAndRefreshGrid();
3403
+ }
3404
+ else {
3405
+ this.deriveAdaptableColumnStateFromAgGrid();
3406
+ }
3369
3407
  }
3370
3408
  this.__prevLayoutForOnChange = layout;
3371
3409
  this.api.layoutApi.createOrUpdateLayout(layout);
@@ -112,7 +112,7 @@ class AgGridExportAdapter {
112
112
  };
113
113
  }
114
114
  catch (error) {
115
- this.logger.consoleError(`Error exporting ${report.Name} in ${format} format to ${config.destination}`, error);
115
+ this.logger.consoleError(`Error exporting ${report.Name} in ${format} format to ${config.destination}`, error.message);
116
116
  }
117
117
  finally {
118
118
  /**
@@ -11,8 +11,8 @@ function DashboardToolbar(props) {
11
11
  React.createElement("div", { className: "ab-Dashboard__toolbar-content" }, props.children),
12
12
  React.createElement(rebass_1.Flex, { className: "ab-Dashboard__toolbar-title", flexDirection: "row", alignItems: "center" },
13
13
  React.createElement("span", null, props.title),
14
- props.showConfigure && (React.createElement(SimpleButton_1.default, { icon: "spanner", variant: "text", tone: "none", "data-name": "configure", iconSize: 16, marginLeft: 1, tooltip: props.tooltip || `Configure ${props.title}`, onClick: () => props.onConfigure() })),
14
+ props.showConfigure && (React.createElement(SimpleButton_1.default, { "aria-label": `Configure ${props.title}`, icon: "spanner", variant: "text", tone: "none", "data-name": "configure", iconSize: 16, marginLeft: 1, tooltip: props.tooltip || `Configure ${props.title}`, onClick: () => props.onConfigure() })),
15
15
  ' ',
16
- props.showClose && (React.createElement(SimpleButton_1.default, { style: { alignSelf: 'flex-end' }, disabled: props.accessLevel == 'ReadOnly', "data-name": "close", icon: "close", variant: "text", tone: "none", iconSize: 16, marginLeft: 1, tooltip: props.tooltip || `Close ${props.title} Toolbar`, onClick: () => props.onClose() })))));
16
+ props.showClose && (React.createElement(SimpleButton_1.default, { "aria-label": `Close ${props.title}`, style: { alignSelf: 'flex-end' }, disabled: props.accessLevel == 'ReadOnly', "data-name": "close", icon: "close", variant: "text", tone: "none", iconSize: 16, marginLeft: 1, tooltip: props.tooltip || `Close ${props.title} Toolbar`, onClick: () => props.onClose() })))));
17
17
  }
18
18
  exports.DashboardToolbar = DashboardToolbar;
@@ -14,9 +14,45 @@ const DatepickerContext_1 = require("./DatepickerContext");
14
14
  const react_day_picker_1 = require("react-day-picker");
15
15
  const AdaptableDateInlineInput_1 = require("../../View/Components/AdaptableInput/AdaptableDateInlineInput");
16
16
  const date_fns_1 = require("date-fns");
17
- const DatepickerOverlay = ({ onHide, children, onKeyDown, onMouseDown, }) => {
17
+ const Select_1 = require("../Select");
18
+ const onDatePickerDropdownKeyDown = (e) => {
19
+ if (e.key === 'Escape' || e.key === 'Enter') {
20
+ e.stopPropagation();
21
+ }
22
+ };
23
+ const DatePickerComponents = {
24
+ YearsDropdown: (props) => {
25
+ const onChange = (0, react_1.useCallback)((value) => {
26
+ props.onChange?.({
27
+ target: {
28
+ value,
29
+ },
30
+ });
31
+ }, [props.onChange]);
32
+ return (React.createElement(Select_1.Select, { onKeyDown: onDatePickerDropdownKeyDown, value: props.value, onChange: onChange, options: props.options }));
33
+ },
34
+ MonthsDropdown: (props) => {
35
+ const onChange = (0, react_1.useCallback)((value) => {
36
+ props.onChange?.({
37
+ target: {
38
+ value,
39
+ },
40
+ });
41
+ }, [props.onChange]);
42
+ return (React.createElement(Select_1.Select, { onKeyDown: onDatePickerDropdownKeyDown, value: `${props.value}`, onChange: onChange, options: props.options.map((option) => {
43
+ return {
44
+ label: option.label,
45
+ value: `${option.value}`,
46
+ };
47
+ }) }));
48
+ },
49
+ };
50
+ const DatepickerOverlay = ({ onHide, children, onKeyDown, onMouseDown, overlayDOMRef, }) => {
18
51
  const domRef = React.useRef(null);
19
- return (React.createElement("div", { className: "ab-Datepicker-Overlay", ref: domRef, onKeyDown: onKeyDown, onMouseDown: onMouseDown, onBlur: (e) => {
52
+ return (React.createElement("div", { className: "ab-Datepicker-Overlay", tabIndex: -1, ref: (el) => {
53
+ domRef.current = el;
54
+ overlayDOMRef.current = el;
55
+ }, onKeyDown: onKeyDown, onMouseDown: onMouseDown, onBlur: (e) => {
20
56
  const { relatedTarget } = e;
21
57
  const node = domRef.current;
22
58
  // relatedTarget is the newly focused element as a result of this blur event
@@ -78,13 +114,14 @@ exports.Datepicker = React.forwardRef((props, ref) => {
78
114
  clearValue();
79
115
  }, accessLevel: 'Full' })) : null;
80
116
  const calendarButton = (React.createElement(SimpleButton_1.default, { disabled: disabled, variant: "text", icon: "calendar", tooltip: "Date", iconSize: 20, px: 0, py: 0, onClick: () => setVisible(true) }));
117
+ const overlayDOMRef = (0, react_1.useRef)(null);
81
118
  return (React.createElement(rebass_1.Flex, null,
82
- React.createElement(OverlayTrigger_1.default, { visible: visible, render: () => (React.createElement(DatepickerOverlay, { onMouseDown: props.onMouseDown, onHide: () => setVisible(false), onKeyDown: (e) => {
119
+ React.createElement(OverlayTrigger_1.default, { visible: visible, render: () => (React.createElement(DatepickerOverlay, { overlayDOMRef: overlayDOMRef, onMouseDown: props.onMouseDown, onHide: () => setVisible(false), onKeyDown: (e) => {
83
120
  if (e.key === 'Escape' || e.key === 'Enter') {
84
121
  setVisible(false, e.key);
85
122
  }
86
123
  } },
87
- React.createElement(react_day_picker_1.DayPicker, { fixedWeeks: true, autoFocus: autoFocus ?? true, showWeekNumber: showWeekNumber, showOutsideDays: showOutsideDays, mode: "single", captionLayout: "dropdown", month: isNaN(+month) ? new Date() : month, selected: value, onMonthChange: setMonth, onSelect: updateValue, startMonth: START_MONTH, endMonth: END_MONTH, footer: React.createElement(rebass_1.Flex, { justifyContent: "space-between", mt: 2, flexWrap: 'wrap' }, footerButtons) }))) },
124
+ React.createElement(react_day_picker_1.DayPicker, { fixedWeeks: true, autoFocus: autoFocus ?? true, showWeekNumber: showWeekNumber, showOutsideDays: showOutsideDays, mode: "single", captionLayout: "dropdown", month: isNaN(+month) ? new Date() : month, selected: value, onMonthChange: setMonth, onSelect: updateValue, startMonth: START_MONTH, endMonth: END_MONTH, components: DatePickerComponents, footer: React.createElement(rebass_1.Flex, { justifyContent: "space-between", mt: 2, flexWrap: 'wrap' }, footerButtons) }))) },
88
125
  React.createElement(FieldWrap_1.default, { ...boxProps, style: {
89
126
  borderRadius: style?.borderRadius,
90
127
  width: style?.width,
@@ -94,6 +131,14 @@ exports.Datepicker = React.forwardRef((props, ref) => {
94
131
  if (!visible) {
95
132
  setVisible(true);
96
133
  }
134
+ }, onBlur: (e) => {
135
+ const { relatedTarget } = e;
136
+ const overlayDOMNode = overlayDOMRef.current;
137
+ if ((overlayDOMNode && relatedTarget == overlayDOMNode) ||
138
+ overlayDOMNode?.contains(relatedTarget)) {
139
+ return;
140
+ }
141
+ setVisible(false);
97
142
  } },
98
143
  React.createElement(AdaptableDateInlineInput_1.AdaptableDateInlineInput, { ref: ref, value: inputValue,
99
144
  // We do not want to show the format when the date-picker is visible
@@ -38,7 +38,7 @@ const IconComponent = (props) => {
38
38
  };
39
39
  }, [icon]);
40
40
  if ((0, exports.isAdaptableSystemIcon)(icon) && icon.name in icons_1.allIcons) {
41
- return (React.createElement(icons_1.Icon, { name: icon.name, size: icon.size, style: icon.style, className: className }));
41
+ return (React.createElement(icons_1.Icon, { "aria-hidden": "true", name: icon.name, size: icon.size, style: icon.style, className: className }));
42
42
  }
43
43
  if ((0, exports.isAdaptableCustomIcon)(icon)) {
44
44
  let width = icon.style?.width ?? 'var(--ab-cmp-icon__width)';
@@ -1,5 +1,5 @@
1
1
  import { InfiniteTableProps } from '@infinite-table/infinite-react';
2
2
  export * from '@infinite-table/infinite-react';
3
3
  import * as React from 'react';
4
- declare function InfiniteTable<T = any>(props: InfiniteTableProps<T>): React.JSX.Element;
5
- export { InfiniteTable };
4
+ declare function InfiniteTableGrid<T = any>(props: InfiniteTableProps<T>): React.JSX.Element;
5
+ export { InfiniteTableGrid };
@@ -1,13 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.InfiniteTable = void 0;
3
+ exports.InfiniteTableGrid = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const infinite_react_1 = require("@infinite-table/infinite-react");
6
6
  tslib_1.__exportStar(require("@infinite-table/infinite-react"), exports);
7
7
  const EnvVars_1 = require("../../EnvVars");
8
8
  const React = tslib_1.__importStar(require("react"));
9
- function InfiniteTable(props) {
9
+ function InfiniteTableGrid(props) {
10
10
  return (React.createElement(infinite_react_1.InfiniteTable, { sortable: false, rowHeight: '--ab-grid-row-height', draggableColumns: false, keyboardNavigation: false, ...props, licenseKey: EnvVars_1.INFINITE_TABLE_LICENSE_KEY }));
11
11
  }
12
- exports.InfiniteTable = InfiniteTable;
12
+ exports.InfiniteTableGrid = InfiniteTableGrid;
13
13
  infinite_react_1.InfiniteTable.licenseKey = EnvVars_1.INFINITE_TABLE_LICENSE_KEY;
@@ -16,7 +16,7 @@ const GridList = (props) => {
16
16
  };
17
17
  }).filter((data) => !!data.item);
18
18
  return (React.createElement(InfiniteTable_1.DataSource, { data: data, primaryKey: "id" },
19
- React.createElement(InfiniteTable_1.InfiniteTable, { header: false, showZebraRows: props.showZebraRows, rowHeight: props.rowHeight ?? '--ab-grid-row-height', domProps: {
19
+ React.createElement(InfiniteTable_1.InfiniteTableGrid, { header: false, showZebraRows: props.showZebraRows, rowHeight: props.rowHeight ?? '--ab-grid-row-height', domProps: {
20
20
  className: (0, join_1.default)(baseClassName, props.className),
21
21
  style: {
22
22
  minHeight: '15rem',