@adaptabletools/adaptable 11.0.0-canary.3 → 11.0.0-canary.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 (37) hide show
  1. package/base.css +3 -0
  2. package/bundle.cjs.js +77 -77
  3. package/index.css +4 -0
  4. package/package.json +2 -2
  5. package/publishTimestamp.d.ts +1 -1
  6. package/publishTimestamp.js +1 -1
  7. package/src/Api/GridApi.d.ts +2 -1
  8. package/src/Api/Implementation/GridApiImpl.d.ts +2 -1
  9. package/src/Api/Implementation/InternalApiImpl.js +1 -1
  10. package/src/PredefinedConfig/Common/CellHighlightInfo.d.ts +1 -12
  11. package/src/PredefinedConfig/Common/RowHighlightInfo.d.ts +15 -0
  12. package/src/PredefinedConfig/Common/RowHighlightInfo.js +2 -0
  13. package/src/PredefinedConfig/Common/Types.d.ts +1 -1
  14. package/src/PredefinedConfig/SystemState.d.ts +2 -1
  15. package/src/Redux/ActionsReducers/SystemRedux.d.ts +6 -5
  16. package/src/Redux/ActionsReducers/SystemRedux.js +13 -13
  17. package/src/Redux/Store/AdaptableStore.js +2 -2
  18. package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +1 -2
  19. package/src/View/Components/FilterForm/QuickFilterForm.js +2 -4
  20. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopup.d.ts +0 -3
  21. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopup.js +43 -88
  22. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupDialog.d.ts +10 -0
  23. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupDialog.js +54 -0
  24. package/src/View/Components/Popups/AdaptablePopup/Navigation.d.ts +1 -3
  25. package/src/View/Components/Popups/AdaptablePopup/Navigation.js +5 -13
  26. package/src/View/Components/Popups/AdaptablePopup/useMenuItems.d.ts +2 -0
  27. package/src/View/Components/Popups/AdaptablePopup/useMenuItems.js +44 -0
  28. package/src/View/Dashboard/Dashboard.js +1 -2
  29. package/src/View/SpecialColumnSettingsWizardStep.js +1 -2
  30. package/src/agGrid/Adaptable.js +9 -12
  31. package/src/agGrid/agGridHelper.js +1 -2
  32. package/src/agGrid/agGridMenuHelper.js +4 -8
  33. package/src/metamodel/adaptable.metamodel.d.ts +9 -0
  34. package/src/metamodel/adaptable.metamodel.js +7 -0
  35. package/src/types.d.ts +2 -1
  36. package/version.d.ts +1 -1
  37. package/version.js +1 -1
package/index.css CHANGED
@@ -2233,6 +2233,7 @@ template {
2233
2233
  --ab-cmp-adaptable-popup--settings__height: 90vh;
2234
2234
  --ab-cmp-adaptable-popup__height: 90vh;
2235
2235
  --ab-cmp-adaptable-popup__max-height: 1200px;
2236
+ --ab-cmp-adaptable-popup__box-shadow: 2px 2px 14px 0px rgb(0 0 0 / 26%);
2236
2237
  --ab-cmp-adaptable-popup-navigation-list__padding: var(--ab-space-1) var(--ab-space-2);
2237
2238
  --ab-cmp-adaptable-popup-navigation-list__border-right: 2px solid var(--ab-color-defaultbackground);
2238
2239
  --ab-cmp-adaptable-popup-navigation-list__font-size: var(--ab-font-size-3);
@@ -3510,6 +3511,9 @@ html.ab--theme-dark .ab-ListBoxFilterForm--aggrid-style {
3510
3511
  background: var(--ab-cmp-adaptable-popup__background);
3511
3512
  max-height: var(--ab-cmp-adaptable-popup__max-height); }
3512
3513
 
3514
+ .ab-Adaptable-Popup--window {
3515
+ box-shadow: var(--ab-cmp-adaptable-popup__box-shadow); }
3516
+
3513
3517
  .ab-Adaptable-Popup__Navigation {
3514
3518
  padding-top: 10px;
3515
3519
  overflow: auto;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adaptabletools/adaptable",
3
- "version": "11.0.0-canary.3",
3
+ "version": "11.0.0-canary.4",
4
4
  "description": "Powerful data-agnostic HTML5 datagrid add-on that sits on top of an underlying grid component and provides all the rich functionality that advanced users expect from their DataGrids and Data Tables",
5
5
  "keywords": [
6
6
  "web-components",
@@ -41,7 +41,7 @@
41
41
  "re-resizable": "^6.9.1",
42
42
  "react": ">=16.8.0",
43
43
  "react-beautiful-dnd": "13.1.0",
44
- "react-day-picker": "8.0.0-beta.37",
44
+ "react-day-picker": "8.0.0-beta.38",
45
45
  "react-dom": ">=16.8.0",
46
46
  "react-redux": "7.2.4",
47
47
  "react-remove-scroll": "2.4.2",
@@ -1,2 +1,2 @@
1
- declare const _default: 1643989382977;
1
+ declare const _default: 1644245839064;
2
2
  export default _default;
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = 1643989382977;
3
+ exports.default = 1644245839064;
@@ -5,7 +5,8 @@ import { ColumnSort } from '../PredefinedConfig/Common/ColumnSort';
5
5
  import { GridCell } from '../PredefinedConfig/Selection/GridCell';
6
6
  import { DataUpdateConfig } from '../PredefinedConfig/Common/DataUpdateConfig';
7
7
  import { DataChangedInfo } from '../PredefinedConfig/Common/DataChangedInfo';
8
- import { CellHighlightInfo, RowHighlightInfo } from '../PredefinedConfig/Common/CellHighlightInfo';
8
+ import { CellHighlightInfo } from '../PredefinedConfig/Common/CellHighlightInfo';
9
+ import { RowHighlightInfo } from '../PredefinedConfig/Common/RowHighlightInfo';
9
10
  import { AdaptableModule } from '../PredefinedConfig/Common/Types';
10
11
  import { AccessLevel } from '../PredefinedConfig/Common/Entitlement';
11
12
  import { GridOptions, RowNode } from '@ag-grid-community/all-modules';
@@ -7,7 +7,8 @@ import { GridCell } from '../../PredefinedConfig/Selection/GridCell';
7
7
  import { ColumnSort } from '../../PredefinedConfig/Common/ColumnSort';
8
8
  import { DataUpdateConfig } from '../../PredefinedConfig/Common/DataUpdateConfig';
9
9
  import { DataChangedInfo, AccessLevel, AdaptableModule } from '../../types';
10
- import { CellHighlightInfo, RowHighlightInfo } from '../../PredefinedConfig/Common/CellHighlightInfo';
10
+ import { CellHighlightInfo } from '../../PredefinedConfig/Common/CellHighlightInfo';
11
+ import { RowHighlightInfo } from '../../PredefinedConfig/Common/RowHighlightInfo';
11
12
  import { GridOptions, RowNode } from '@ag-grid-community/all-modules';
12
13
  import { GridCellRange } from '../../PredefinedConfig/Selection/GridCellRange';
13
14
  export declare class GridApiImpl extends ApiBase implements GridApi {
@@ -68,7 +68,7 @@ class InternalApiImpl extends ApiBase_1.ApiBase {
68
68
  const forPrimaryKey = (_a = AdaptableFlashingAlerts[primaryKey]) !== null && _a !== void 0 ? _a : {};
69
69
  const toFlashingAlert = (uuid) => { var _a; return uuid ? (_a = AdaptableFlashingAlertsMap[uuid]) !== null && _a !== void 0 ? _a : null : null; };
70
70
  if (!columnId) {
71
- return toFlashingAlert(forPrimaryKey[SystemRedux_1.FLASHING_ALERT_ROW_KEY]);
71
+ return toFlashingAlert(forPrimaryKey[SystemRedux_1.FLASHING_CELL_ROW_KEY]);
72
72
  }
73
73
  return toFlashingAlert(forPrimaryKey[columnId]);
74
74
  }
@@ -15,19 +15,8 @@ export interface CellHighlightInfo {
15
15
  * Time after which Cell should be unhilighted
16
16
  */
17
17
  timeout?: number;
18
- highlightStyle: AdaptableStyle;
19
- }
20
- export interface RowHighlightInfo {
21
- /**
22
- * Primary key value for the row to be highlighted
23
- */
24
- primaryKeyValue: any;
25
- /**
26
- * Timeout after which the highlight is removed
27
- */
28
- timeout?: number;
29
18
  /**
30
- * Highlight style
19
+ * Adaptable Style to use in the Cell Highlight
31
20
  */
32
21
  highlightStyle: AdaptableStyle;
33
22
  }
@@ -0,0 +1,15 @@
1
+ import { AdaptableStyle } from '../../../types';
2
+ export interface RowHighlightInfo {
3
+ /**
4
+ * Primary key value for the row to be highlighted
5
+ */
6
+ primaryKeyValue: any;
7
+ /**
8
+ * Timeout after which the highlight is removed
9
+ */
10
+ timeout?: number;
11
+ /**
12
+ * Highlight style
13
+ */
14
+ highlightStyle: AdaptableStyle;
15
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -22,7 +22,7 @@ export declare type AdaptableModuleButtons = AdaptableModuleButton[];
22
22
  export declare type AdaptableModuleButton = 'Alert' | 'FlashingCell' | 'BulkUpdate' | 'CalculatedColumn' | 'CellSummary' | 'ConditionalStyle' | 'CustomSort' | 'Dashboard' | 'DataChangeHistory' | 'DataSource' | 'Export' | 'Filter' | 'FormatColumn' | 'FreeTextColumn' | 'Glue42' | 'GridInfo' | 'Layout' | 'OpenFin' | 'PlusMinus' | 'Query' | 'QuickSearch' | 'Schedule' | 'SettingsPanel' | 'Shortcut' | 'SmartEdit' | 'StateManagement' | 'SystemStatus' | 'TeamSharing' | 'Theme';
23
23
  export declare type AdaptableStateKeys = AdaptableStateKey[];
24
24
  export declare type AdaptableStateKey = 'Alert' | 'FlashingCell' | 'Application' | 'CalculatedColumn' | 'Charting' | 'ConditionalStyle' | 'CustomSort' | 'Dashboard' | 'DataSource' | 'Export' | 'Filter' | 'FormatColumn' | 'FreeTextColumn' | 'Glue42' | 'IPushPull' | 'Layout' | 'OpenFin' | 'PlusMinus' | 'Query' | 'QuickSearch' | 'Schedule' | 'Shortcut' | 'Theme' | 'ToolPanel';
25
- export declare type AdaptableModule = 'Alert' | 'BulkUpdate' | 'CalculatedColumn' | 'CellSummary' | 'Charting' | 'ConditionalStyle' | 'CustomSort' | 'Dashboard' | 'DataChangeHistory' | 'DataSource' | 'Export' | 'Filter' | 'FlashingCell' | 'FormatColumn' | 'FreeTextColumn' | 'Glue42' | 'GridInfo' | 'IPushPull' | 'Layout' | 'OpenFin' | 'PlusMinus' | 'Query' | 'QuickSearch' | 'Schedule' | 'SettingsPanel' | 'Shortcut' | 'SmartEdit' | 'StateManagement' | 'SystemStatus' | 'TeamSharing' | 'Theme' | 'ToolPanel';
25
+ export declare type AdaptableModule = 'Alert' | 'BulkUpdate' | 'CalculatedColumn' | 'CellSummary' | 'Charting' | 'ConditionalStyle' | 'CustomSort' | 'Dashboard' | 'DataChangeHistory' | 'DataSource' | 'Export' | 'Filter' | 'FlashingCell' | 'FormatColumn' | 'FreeTextColumn' | 'Glue42' | 'GridInfo' | 'IPushPull' | 'Layout' | 'OpenFin' | 'PlusMinus' | 'Query' | 'QuickSearch' | 'Schedule' | 'SettingsPanel' | 'Shortcut' | 'SmartEdit' | 'StateManagement' | 'SystemStatus' | 'TeamSharing' | 'Theme' | 'ToolPanel' | 'CustomSettingsPanelModule';
26
26
  export declare type AdaptableSettingsPanel = 'Alert' | 'CalculatedColumn' | 'ConditionalStyle' | 'CustomSort' | 'Dashboard' | 'DataChangeHistory' | 'DataSource' | 'Export' | 'Filter' | 'FlashingCell' | 'FormatColumn' | 'FreeTextColumn' | 'GridInfo' | 'Layout' | 'PlusMinus' | 'Query' | 'QuickSearch' | 'Schedule' | 'Shortcut' | 'StateManagement' | 'SystemStatus' | 'TeamSharing' | 'Theme' | 'ToolPanel';
27
27
  export declare type TypeHint<Base, Literals> = (Base & {
28
28
  __subType?: true;
@@ -6,7 +6,8 @@ import type { IPushPullState, IPushPullReport, IPushPullDomain } from './IPushPu
6
6
  import { Glue42State, Glue42Report } from './Glue42State';
7
7
  import { OpenFinState, OpenFinReport } from './OpenFinState';
8
8
  import { AdaptableAlert } from './Common/AdaptableAlert';
9
- import { CellHighlightInfo, RowHighlightInfo } from './Common/CellHighlightInfo';
9
+ import { CellHighlightInfo } from './Common/CellHighlightInfo';
10
+ import { RowHighlightInfo } from './Common/RowHighlightInfo';
10
11
  import { SystemStatusMessageInfo } from './Common/SystemStatusMessageInfo';
11
12
  import { CachedQuery } from './QueryState';
12
13
  import { AdaptableFlashingCell } from './Common/AdaptableFlashingCell';
@@ -1,6 +1,7 @@
1
1
  import * as Redux from 'redux';
2
2
  import { SystemState } from '../../PredefinedConfig/SystemState';
3
- import { CellHighlightInfo, RowHighlightInfo } from '../../PredefinedConfig/Common/CellHighlightInfo';
3
+ import { CellHighlightInfo } from '../../PredefinedConfig/Common/CellHighlightInfo';
4
+ import { RowHighlightInfo } from '../../PredefinedConfig/Common/RowHighlightInfo';
4
5
  import { PreviewInfo } from '../../Utilities/Interface/Preview';
5
6
  import { ExportCustomDestinationPopup, Report } from '../../PredefinedConfig/ExportState';
6
7
  import { BulkUpdateValidationResult } from '../../Strategy/Interface/IBulkUpdateModule';
@@ -11,14 +12,14 @@ import { CachedQuery } from '../../PredefinedConfig/QueryState';
11
12
  import { AdaptableFlashingCell } from '../../PredefinedConfig/Common/AdaptableFlashingCell';
12
13
  import { MathOperation, SummaryOperation } from '../../PredefinedConfig/Common/Enums';
13
14
  import { DataChangedInfo } from '../../PredefinedConfig/Common/DataChangedInfo';
14
- export declare const FLASHING_ALERT_ROW_KEY = "__ROW";
15
+ export declare const FLASHING_CELL_ROW_KEY = "__ROW";
15
16
  export declare const SYSTEM_ALERT_ADD = "SYSTEM_ALERT_ADD";
16
17
  export declare const SYSTEM_ALERT_DELETE = "SYSTEM_ALERT_DELETE";
17
18
  export declare const SYSTEM_ALERT_DELETE_ALL = "SYSTEM_ALERT_DELETE_ALL";
18
19
  export declare const SYSTEM_ALERT_REMOVE_HIGHLIGHT = "SYSTEM_ALERT_REMOVE_HIGHLIGHT";
19
- export declare const SYSTEM_FLASHING_ALERT_ADD = "SYSTEM_FLASHING_ALERT_ADD";
20
- export declare const SYSTEM_FLASHING_ALERT_DELETE = "SYSTEM_FLASHING_ALERT_DELETE";
21
- export declare const SYSTEM_FLASHING_ALERT_DELETE_ALL = "SYSTEM_FLASHING_ALERT_DELETE_ALL";
20
+ export declare const SYSTEM_FLASHING_CELL_ADD = "SYSTEM_FLASHING_CELL_ADD";
21
+ export declare const SYSTEM_FLASHING_CELL_DELETE = "SYSTEM_FLASHING_CELL_DELETE";
22
+ export declare const SYSTEM_FLASHING_CELL_DELETE_ALL = "SYSTEM_FLASHING_CELL_DELETE_ALL";
22
23
  export declare const SYSTEM_STATUS_MESSAGE_INFO_ADD = "SYSTEM_STATUS_MESSAGE_INFO_ADD";
23
24
  export declare const SYSTEM_STATUS_MESSAGE_INFO_DELETE = "SYSTEM_STATUS_MESSAGE_INFO_DELETE";
24
25
  export declare const SYSTEM_STATUS_MESSAGE_INFO_DELETE_ALL = "SYSTEM_STATUS_MESSAGE_INFO_DELETE_ALL";
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SystemReducer = exports.getSystemExportCustomDestinationPopups = exports.SystemSettingsPanelSet = exports.SystemExportCustomDestinationPopupHide = exports.SystemExportCustomDestinationPopupShow = exports.SystemDataChangeHistoryResume = exports.SystemDataChangeHistorySuspend = exports.SystemDataChangeHistoryDisable = exports.SystemDataChangeHistoryEnable = exports.SystemDataChangeHistoryUndo = exports.SystemDataChangeHistoryAdd = exports.SystemLicenseDisablePersistence = exports.SystemLicenseShowWatermark = exports.SystemProgressIndicatorHide = exports.SystemProgressIndicatorShow = exports.SystemCellSummaryChangeOperation = exports.SystemCachedQueryAdd = exports.SetLastAppliedShortcut = exports.SetNewColumnListOrder = exports.BulkUpdateChangeValue = exports.BulkUpdateSetPreview = exports.BulkUpdateSetValidSelection = exports.BulkUpdateCheckCellSelection = exports.SmartEditSetPreview = exports.SmartEditSetValidSelection = exports.SmartEditCheckCellSelection = exports.SmartEditChangeOperation = exports.SmartEditChangeValue = exports.SystemStatusMessageInfoDeleteAll = exports.SystemStatusMessageInfoDelete = exports.SystemStatusMessageInfoAdd = exports.SystemFlashingCellDeleteAll = exports.SystemFlashingCellDelete = exports.SystemFlashingCellAdd = exports.SystemAlertRemoveHighlight = exports.SystemAlertDeleteAll = exports.SystemAlertDelete = exports.SystemAlertAdd = exports.SystemHighlightRowDeleteAll = exports.SystemHighlightRowDelete = exports.SystemHighlightRowAdd = exports.SystemHighlightCellDeleteAll = exports.SystemHighlightCellDelete = exports.SystemHighlightCellAdd = exports.SYSTEM_SETTINGS_PANEL_SET = exports.SYSTEM_DATA_CHANGE_HISTORY_RESUME = exports.SYSTEM_DATA_CHANGE_HISTORY_SUSPEND = exports.SYSTEM_DATA_CHANGE_HISTORY_DISABLE = exports.SYSTEM_DATA_CHANGE_HISTORY_ENABLE = exports.SYSTEM_DATA_CHANGE_HISTORY_UNDO = exports.SYSTEM_DATA_CHANGE_HISTORY_ADD = exports.SYSTEM_LICENSE_DISABLE_PERSISTENCE = exports.SYSTEM_LICENSE_SHOW_WATERMARK = exports.SYSTEM_PROGRESS_INDICATOR_HIDE = exports.SYSTEM_PROGRESS_INDICATOR_SHOW = exports.SYSTEM_EXPORT_CUSTOM_DESTINATION_POPUP_HIDE = exports.SYSTEM_EXPORT_CUSTOM_DESTINATION_POPUP_SHOW = exports.SYSTEM_CELL_SUMMARY_CHANGE_OPERATION = exports.SYSTEM_CACHED_QUERY_ADD = exports.SYSTEM_SET_LAST_APPLIED_SHORTCUT = exports.SYSTEM_SET_NEW_COLUMN_LIST_ORDER = exports.SYSTEM_HIGHLIGHT_ROW_DELETE_ALL = exports.SYSTEM_HIGHLIGHT_ROW_DELETE = exports.SYSTEM_HIGHLIGHT_ROW_ADD = exports.SYSTEM_HIGHLIGHT_CELL_DELETE_ALL = exports.SYSTEM_HIGHLIGHT_CELL_DELETE = exports.SYSTEM_HIGHLIGHT_CELL_ADD = exports.SYSTEM_BULK_UPDATE_CHANGE_VALUE = exports.SYSTEM_BULK_UPDATE_SET_PREVIEW = exports.SYSTEM_BULK_UPDATE_SET_VALID_SELECTION = exports.SYSTEM_BULK_UPDATE_CHECK_CELL_SELECTION = exports.SYSTEM_SMART_EDIT_CHANGE_OPERATION = exports.SYSTEM_SMART_EDIT_CHANGE_VALUE = exports.SYSTEM_SMARTEDIT_SET_PREVIEW = exports.SYSTEM_SMARTEDIT_SET_VALID_SELECTION = exports.SYSTEM_SMARTEDIT_FETCH_PREVIEW = exports.SYSTEM_SMARTEDIT_CHECK_CELL_SELECTION = exports.SYSTEM_STATUS_MESSAGE_INFO_DELETE_ALL = exports.SYSTEM_STATUS_MESSAGE_INFO_DELETE = exports.SYSTEM_STATUS_MESSAGE_INFO_ADD = exports.SYSTEM_FLASHING_ALERT_DELETE_ALL = exports.SYSTEM_FLASHING_ALERT_DELETE = exports.SYSTEM_FLASHING_ALERT_ADD = exports.SYSTEM_ALERT_REMOVE_HIGHLIGHT = exports.SYSTEM_ALERT_DELETE_ALL = exports.SYSTEM_ALERT_DELETE = exports.SYSTEM_ALERT_ADD = exports.FLASHING_ALERT_ROW_KEY = void 0;
3
+ exports.SystemReducer = exports.getSystemExportCustomDestinationPopups = exports.SystemSettingsPanelSet = exports.SystemExportCustomDestinationPopupHide = exports.SystemExportCustomDestinationPopupShow = exports.SystemDataChangeHistoryResume = exports.SystemDataChangeHistorySuspend = exports.SystemDataChangeHistoryDisable = exports.SystemDataChangeHistoryEnable = exports.SystemDataChangeHistoryUndo = exports.SystemDataChangeHistoryAdd = exports.SystemLicenseDisablePersistence = exports.SystemLicenseShowWatermark = exports.SystemProgressIndicatorHide = exports.SystemProgressIndicatorShow = exports.SystemCellSummaryChangeOperation = exports.SystemCachedQueryAdd = exports.SetLastAppliedShortcut = exports.SetNewColumnListOrder = exports.BulkUpdateChangeValue = exports.BulkUpdateSetPreview = exports.BulkUpdateSetValidSelection = exports.BulkUpdateCheckCellSelection = exports.SmartEditSetPreview = exports.SmartEditSetValidSelection = exports.SmartEditCheckCellSelection = exports.SmartEditChangeOperation = exports.SmartEditChangeValue = exports.SystemStatusMessageInfoDeleteAll = exports.SystemStatusMessageInfoDelete = exports.SystemStatusMessageInfoAdd = exports.SystemFlashingCellDeleteAll = exports.SystemFlashingCellDelete = exports.SystemFlashingCellAdd = exports.SystemAlertRemoveHighlight = exports.SystemAlertDeleteAll = exports.SystemAlertDelete = exports.SystemAlertAdd = exports.SystemHighlightRowDeleteAll = exports.SystemHighlightRowDelete = exports.SystemHighlightRowAdd = exports.SystemHighlightCellDeleteAll = exports.SystemHighlightCellDelete = exports.SystemHighlightCellAdd = exports.SYSTEM_SETTINGS_PANEL_SET = exports.SYSTEM_DATA_CHANGE_HISTORY_RESUME = exports.SYSTEM_DATA_CHANGE_HISTORY_SUSPEND = exports.SYSTEM_DATA_CHANGE_HISTORY_DISABLE = exports.SYSTEM_DATA_CHANGE_HISTORY_ENABLE = exports.SYSTEM_DATA_CHANGE_HISTORY_UNDO = exports.SYSTEM_DATA_CHANGE_HISTORY_ADD = exports.SYSTEM_LICENSE_DISABLE_PERSISTENCE = exports.SYSTEM_LICENSE_SHOW_WATERMARK = exports.SYSTEM_PROGRESS_INDICATOR_HIDE = exports.SYSTEM_PROGRESS_INDICATOR_SHOW = exports.SYSTEM_EXPORT_CUSTOM_DESTINATION_POPUP_HIDE = exports.SYSTEM_EXPORT_CUSTOM_DESTINATION_POPUP_SHOW = exports.SYSTEM_CELL_SUMMARY_CHANGE_OPERATION = exports.SYSTEM_CACHED_QUERY_ADD = exports.SYSTEM_SET_LAST_APPLIED_SHORTCUT = exports.SYSTEM_SET_NEW_COLUMN_LIST_ORDER = exports.SYSTEM_HIGHLIGHT_ROW_DELETE_ALL = exports.SYSTEM_HIGHLIGHT_ROW_DELETE = exports.SYSTEM_HIGHLIGHT_ROW_ADD = exports.SYSTEM_HIGHLIGHT_CELL_DELETE_ALL = exports.SYSTEM_HIGHLIGHT_CELL_DELETE = exports.SYSTEM_HIGHLIGHT_CELL_ADD = exports.SYSTEM_BULK_UPDATE_CHANGE_VALUE = exports.SYSTEM_BULK_UPDATE_SET_PREVIEW = exports.SYSTEM_BULK_UPDATE_SET_VALID_SELECTION = exports.SYSTEM_BULK_UPDATE_CHECK_CELL_SELECTION = exports.SYSTEM_SMART_EDIT_CHANGE_OPERATION = exports.SYSTEM_SMART_EDIT_CHANGE_VALUE = exports.SYSTEM_SMARTEDIT_SET_PREVIEW = exports.SYSTEM_SMARTEDIT_SET_VALID_SELECTION = exports.SYSTEM_SMARTEDIT_FETCH_PREVIEW = exports.SYSTEM_SMARTEDIT_CHECK_CELL_SELECTION = exports.SYSTEM_STATUS_MESSAGE_INFO_DELETE_ALL = exports.SYSTEM_STATUS_MESSAGE_INFO_DELETE = exports.SYSTEM_STATUS_MESSAGE_INFO_ADD = exports.SYSTEM_FLASHING_CELL_DELETE_ALL = exports.SYSTEM_FLASHING_CELL_DELETE = exports.SYSTEM_FLASHING_CELL_ADD = exports.SYSTEM_ALERT_REMOVE_HIGHLIGHT = exports.SYSTEM_ALERT_DELETE_ALL = exports.SYSTEM_ALERT_DELETE = exports.SYSTEM_ALERT_ADD = exports.FLASHING_CELL_ROW_KEY = void 0;
4
4
  const GeneralConstants_1 = require("../../Utilities/Constants/GeneralConstants");
5
5
  const Helper_1 = require("../../Utilities/Helpers/Helper");
6
6
  /*
@@ -8,16 +8,16 @@ Bit of a mixed bag of actions but essentially its those that are related to Stra
8
8
  This allows us to keep the other reducers pure in terms of everything persists
9
9
  Not sure if its a good idea or not and perhaps we need 2 stores but I think its better than it was...
10
10
  */
11
- exports.FLASHING_ALERT_ROW_KEY = '__ROW';
11
+ exports.FLASHING_CELL_ROW_KEY = '__ROW';
12
12
  // Alerts
13
13
  exports.SYSTEM_ALERT_ADD = 'SYSTEM_ALERT_ADD';
14
14
  exports.SYSTEM_ALERT_DELETE = 'SYSTEM_ALERT_DELETE';
15
15
  exports.SYSTEM_ALERT_DELETE_ALL = 'SYSTEM_ALERT_DELETE_ALL';
16
16
  exports.SYSTEM_ALERT_REMOVE_HIGHLIGHT = 'SYSTEM_ALERT_REMOVE_HIGHLIGHT';
17
17
  // Flashing Alerts
18
- exports.SYSTEM_FLASHING_ALERT_ADD = 'SYSTEM_FLASHING_ALERT_ADD';
19
- exports.SYSTEM_FLASHING_ALERT_DELETE = 'SYSTEM_FLASHING_ALERT_DELETE';
20
- exports.SYSTEM_FLASHING_ALERT_DELETE_ALL = 'SYSTEM_FLASHING_ALERT_DELETE_ALL';
18
+ exports.SYSTEM_FLASHING_CELL_ADD = 'SYSTEM_FLASHING_CELL_ADD';
19
+ exports.SYSTEM_FLASHING_CELL_DELETE = 'SYSTEM_FLASHING_CELL_DELETE';
20
+ exports.SYSTEM_FLASHING_CELL_DELETE_ALL = 'SYSTEM_FLASHING_CELL_DELETE_ALL';
21
21
  // Status Message
22
22
  exports.SYSTEM_STATUS_MESSAGE_INFO_ADD = 'SYSTEM_STATUS_MESSAGE_INFO_ADD';
23
23
  exports.SYSTEM_STATUS_MESSAGE_INFO_DELETE = 'SYSTEM_STATUS_MESSAGE_INFO_DELETE';
@@ -113,15 +113,15 @@ exports.SystemAlertRemoveHighlight = (alert) => ({
113
113
  alert: alert,
114
114
  });
115
115
  exports.SystemFlashingCellAdd = (flashingCell) => ({
116
- type: exports.SYSTEM_FLASHING_ALERT_ADD,
116
+ type: exports.SYSTEM_FLASHING_CELL_ADD,
117
117
  flashingCell: flashingCell,
118
118
  });
119
119
  exports.SystemFlashingCellDelete = (flashingCell) => ({
120
- type: exports.SYSTEM_FLASHING_ALERT_DELETE,
120
+ type: exports.SYSTEM_FLASHING_CELL_DELETE,
121
121
  flashingCell: flashingCell,
122
122
  });
123
123
  exports.SystemFlashingCellDeleteAll = (flashingCells) => ({
124
- type: exports.SYSTEM_FLASHING_ALERT_DELETE_ALL,
124
+ type: exports.SYSTEM_FLASHING_CELL_DELETE_ALL,
125
125
  flashingCells: flashingCells,
126
126
  });
127
127
  exports.SystemStatusMessageInfoAdd = (SystemStatusMessageInfo, MaxSystemStatusMessagesInStore) => ({
@@ -305,14 +305,14 @@ exports.SystemReducer = (state = initialState, action) => {
305
305
  return abObject;
306
306
  }) });
307
307
  }
308
- case exports.SYSTEM_FLASHING_ALERT_ADD: {
308
+ case exports.SYSTEM_FLASHING_CELL_ADD: {
309
309
  const { flashingCell: FlashingCell } = action;
310
310
  const { rowPrimaryKey } = FlashingCell;
311
311
  const AdaptableFlashingCells = Object.assign({}, state.AdaptableFlashingCells);
312
312
  AdaptableFlashingCells[rowPrimaryKey] = Object.assign({}, AdaptableFlashingCells[rowPrimaryKey]);
313
313
  const secondaryIds = Object.keys(FlashingCell.flashColumnIds);
314
314
  if (FlashingCell.flashTarget === 'row') {
315
- secondaryIds.push(exports.FLASHING_ALERT_ROW_KEY);
315
+ secondaryIds.push(exports.FLASHING_CELL_ROW_KEY);
316
316
  }
317
317
  secondaryIds.forEach((COL_ID) => {
318
318
  AdaptableFlashingCells[rowPrimaryKey][COL_ID] = FlashingCell.Uuid;
@@ -324,7 +324,7 @@ exports.SystemReducer = (state = initialState, action) => {
324
324
  AdaptableFlashingCellsMap: AdaptableFlashingCellsMap,
325
325
  });
326
326
  }
327
- case exports.SYSTEM_FLASHING_ALERT_DELETE: {
327
+ case exports.SYSTEM_FLASHING_CELL_DELETE: {
328
328
  const { flashingCell: FlashingCell } = action;
329
329
  const { rowPrimaryKey } = FlashingCell;
330
330
  const AdaptableFlashingCells = Object.assign({}, state.AdaptableFlashingCells);
@@ -332,7 +332,7 @@ exports.SystemReducer = (state = initialState, action) => {
332
332
  AdaptableFlashingCells[rowPrimaryKey] = Object.assign({}, AdaptableFlashingCells[rowPrimaryKey]);
333
333
  const secondaryIds = Object.keys(FlashingCell.flashColumnIds);
334
334
  if (FlashingCell.flashTarget === 'row') {
335
- secondaryIds.push(exports.FLASHING_ALERT_ROW_KEY);
335
+ secondaryIds.push(exports.FLASHING_CELL_ROW_KEY);
336
336
  }
337
337
  secondaryIds.forEach((COL_ID) => {
338
338
  if (AdaptableFlashingCells[rowPrimaryKey][COL_ID] === FlashingCell.Uuid) {
@@ -345,7 +345,7 @@ exports.SystemReducer = (state = initialState, action) => {
345
345
  delete AdaptableFlashingCellsMap[FlashingCell.Uuid];
346
346
  return Object.assign(Object.assign({}, state), { AdaptableFlashingCells: AdaptableFlashingCells, AdaptableFlashingCellsMap: AdaptableFlashingCellsMap });
347
347
  }
348
- case exports.SYSTEM_FLASHING_ALERT_DELETE_ALL: {
348
+ case exports.SYSTEM_FLASHING_CELL_DELETE_ALL: {
349
349
  return Object.assign({}, state, {
350
350
  AdaptableFlashingCells: {},
351
351
  AdaptableFlashingCellsMap: {},
@@ -316,8 +316,8 @@ const adaptableMiddleware = (adaptable) => function (middlewareAPI) {
316
316
  /*******************
317
317
  * FLASHING ALERT ACTIONS
318
318
  *******************/
319
- case SystemRedux.SYSTEM_FLASHING_ALERT_ADD:
320
- case SystemRedux.SYSTEM_FLASHING_ALERT_DELETE: {
319
+ case SystemRedux.SYSTEM_FLASHING_CELL_ADD:
320
+ case SystemRedux.SYSTEM_FLASHING_CELL_DELETE: {
321
321
  const { flashingCell: FlashingCell, } = action;
322
322
  const { dataChangedInfo } = FlashingCell;
323
323
  let ret = next(action);
@@ -417,8 +417,7 @@ const getSlidingTimeframe$ = (source$, timeframeDuration, onTimeframeEnter, onTi
417
417
  }));
418
418
  };
419
419
  const getMaxTimeframeSize = (expressionValue, context) => {
420
- let maxTimeframeSize = context.api.internalApi.getAdaptableOptions().queryLanguageOptions
421
- .maxTimeframeSize;
420
+ let maxTimeframeSize = context.api.internalApi.getAdaptableOptions().queryLanguageOptions.maxTimeframeSize;
422
421
  if (maxTimeframeSize > SYSTEM_MAX_TIMEFRAME_SIZE) {
423
422
  maxTimeframeSize = SYSTEM_MAX_TIMEFRAME_SIZE;
424
423
  }
@@ -106,14 +106,12 @@ class QuickFilterFormComponent extends React.Component {
106
106
  hideEvent = 'blur';
107
107
  }
108
108
  let showQuickFilterDropdown = true;
109
- let hideQuickFilterDropdownFunction = this.props.api.internalApi.getAdaptableOptions()
110
- .filterOptions.hideQuickFilterDropdown;
109
+ let hideQuickFilterDropdownFunction = this.props.api.internalApi.getAdaptableOptions().filterOptions.hideQuickFilterDropdown;
111
110
  if (hideQuickFilterDropdownFunction) {
112
111
  showQuickFilterDropdown = !hideQuickFilterDropdownFunction(this.props.currentColumn);
113
112
  }
114
113
  let showQuickFilterInput = true;
115
- let hideQuickFilterInputFunction = this.props.api.internalApi.getAdaptableOptions()
116
- .filterOptions.hideQuickFilterInput;
114
+ let hideQuickFilterInputFunction = this.props.api.internalApi.getAdaptableOptions().filterOptions.hideQuickFilterInput;
117
115
  if (hideQuickFilterInputFunction) {
118
116
  showQuickFilterInput = !hideQuickFilterInputFunction(this.props.currentColumn);
119
117
  }
@@ -3,9 +3,6 @@ import * as PopupRedux from '../../../../Redux/ActionsReducers/PopupRedux';
3
3
  import { ModuleParams } from '../../SharedProps/ModuleViewPopupProps';
4
4
  import { AdaptableModule } from '../../../../PredefinedConfig/Common/Types';
5
5
  import { AdaptableApi } from '../../../../Api/AdaptableApi';
6
- /**
7
- * This is the main popup that we use - so all Module popups will appear here.
8
- */
9
6
  export interface AdaptablePopupProps {
10
7
  componentName?: string;
11
8
  componentModule: AdaptableModule;
@@ -4,101 +4,63 @@ exports.AdaptablePopup = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const React = tslib_1.__importStar(require("react"));
6
6
  const rebass_1 = require("rebass");
7
- const react_redux_1 = require("react-redux");
8
- const PopupRedux = tslib_1.__importStar(require("../../../../Redux/ActionsReducers/PopupRedux"));
9
7
  const GeneralConstants = tslib_1.__importStar(require("../../../../Utilities/Constants/GeneralConstants"));
10
8
  const TopBar_1 = tslib_1.__importDefault(require("./TopBar"));
11
9
  const join_1 = tslib_1.__importDefault(require("../../../../components/utils/join"));
12
10
  const Navigation_1 = require("./Navigation");
13
11
  const PopupContext_1 = tslib_1.__importDefault(require("./PopupContext"));
14
12
  const AdaptablePopupBody_1 = require("./AdaptablePopupBody");
15
- const Dialog_1 = tslib_1.__importDefault(require("../../../../components/Dialog"));
16
- const SystemRedux_1 = require("../../../../Redux/ActionsReducers/SystemRedux");
17
- const Utilities_1 = require("./Utilities");
18
13
  const DefaultSettingsPanel_1 = require("../../../../Utilities/Defaults/DefaultSettingsPanel");
19
14
  const AdaptableContext_1 = require("../../../AdaptableContext");
20
15
  const CustomSettingsPanelView_1 = require("./CustomSettingsPanelView");
16
+ const useMenuItems_1 = require("./useMenuItems");
17
+ const AdaptablePopupDialog_1 = require("./AdaptablePopupDialog");
21
18
  exports.AdaptablePopup = (props) => {
22
- var _a, _b, _c, _d, _e;
23
19
  const adaptable = AdaptableContext_1.useAdaptable();
24
- const dispatch = react_redux_1.useDispatch();
25
20
  const settingsPanelOptions = adaptable.adaptableOptions.settingsPanelOptions;
26
21
  const settingsPanelTitle = adaptable.api.internalApi.getModuleFriendlyName('SettingsPanel');
27
- // Navigation
28
- const allMenuItems = react_redux_1.useSelector((state) => { var _a; return (_a = state === null || state === void 0 ? void 0 : state.Grid) === null || _a === void 0 ? void 0 : _a.ModuleDropdownMenuItems; });
29
- const menuItems = React.useMemo(() => {
30
- var _a;
31
- let navigationItems = (_a = settingsPanelOptions === null || settingsPanelOptions === void 0 ? void 0 : settingsPanelOptions.navigation) === null || _a === void 0 ? void 0 : _a.items;
32
- if (!navigationItems) {
33
- navigationItems = [...DefaultSettingsPanel_1.DEFAULT_NAVIGATION_ITEMS];
34
- if (settingsPanelOptions.customSettingsPanels) {
35
- navigationItems.push(...settingsPanelOptions.customSettingsPanels.map((panel) => panel.name));
36
- }
37
- }
38
- const visibleItems = allMenuItems.filter((item) => item.module !== 'General' && !DefaultSettingsPanel_1.ACTION_POPUPS.includes(item.module) && item.isVisible);
39
- return navigationItems
40
- .map((moduleName) => {
41
- var _a, _b;
42
- if (moduleName === '-') {
43
- return moduleName;
44
- }
45
- const customSettingsPanel = (_b = (_a = settingsPanelOptions === null || settingsPanelOptions === void 0 ? void 0 : settingsPanelOptions.customSettingsPanels) === null || _a === void 0 ? void 0 : _a.find) === null || _b === void 0 ? void 0 : _b.call(_a, (panel) => panel.name === moduleName);
46
- let customPanelMenuItem = null;
47
- if (customSettingsPanel) {
48
- customPanelMenuItem = {
49
- label: customSettingsPanel.name,
50
- isVisible: true,
51
- reduxAction: PopupRedux.PopupShowScreen(null, customSettingsPanel.name, null, {
52
- isCustomSettingsPanel: true,
53
- }),
54
- };
55
- }
56
- return customPanelMenuItem || visibleItems.find((item) => item.module === moduleName);
57
- })
58
- .filter(Boolean);
59
- }, [allMenuItems]);
60
- const isCustomSettingsPanel = (_a = props.moduleProps) === null || _a === void 0 ? void 0 : _a.isCustomSettingsPanel;
61
- const customSettingsPanel = isCustomSettingsPanel &&
62
- settingsPanelOptions.customSettingsPanels.find((settingsPanel) => settingsPanel.name === props.componentName);
63
- let componentModule = props.componentModule;
64
- // When it is opened without specifying a module
65
- const firstMenuItem = (_b = menuItems.find((menuItem) => menuItem !== '-')) === null || _b === void 0 ? void 0 : _b.module;
66
- if (!customSettingsPanel && !props.componentModule && firstMenuItem !== 'General') {
67
- componentModule = firstMenuItem;
68
- }
69
- const accessLevel = props.api.internalApi
70
- .getEntitlementService()
71
- .getEntitlementAccessLevelForModule(componentModule);
72
- const module = props.api.internalApi.getModuleService().getModuleById(componentModule);
73
- const moduleInfo = module === null || module === void 0 ? void 0 : module.moduleInfo;
74
- // action popups + non-primary module popups
75
- const isActionModule = moduleInfo &&
76
- (DefaultSettingsPanel_1.ACTION_POPUPS.includes(moduleInfo === null || moduleInfo === void 0 ? void 0 : moduleInfo.ModuleName) ||
77
- (props.componentName && props.componentName !== (moduleInfo === null || moduleInfo === void 0 ? void 0 : moduleInfo.Popup)));
78
- const baseClassName = 'ab-Adaptable-Popup';
79
- const className = join_1.default(baseClassName, `${baseClassName}--${(_c = settingsPanelOptions.popupType) !== null && _c !== void 0 ? _c : 'window'}`, isActionModule ? `${baseClassName}--action-popup` : `${baseClassName}--settings-popup`);
22
+ const menuItems = useMenuItems_1.useMenuItems();
80
23
  const isWindowModal = settingsPanelOptions.popupType === 'window';
81
- let style = { maxWidth: 1400, maxHeight: 1200 };
82
- if (isWindowModal) {
83
- style = { height: '100%' };
24
+ let friendlyName = null;
25
+ let isActionModule = false;
26
+ let moduleViewContent = null;
27
+ let activeItem = null;
28
+ let accessLevel = 'Full';
29
+ const firstMenuItem = menuItems.find((menuItem) => menuItem !== '-');
30
+ const firstMenuModule = firstMenuItem === null || firstMenuItem === void 0 ? void 0 : firstMenuItem.module;
31
+ let componentModule = props.componentModule;
32
+ let componentName = props.componentName;
33
+ // ts forces to check for General, there is no menu item General
34
+ const useFirstItem = !props.componentModule;
35
+ if (useFirstItem && firstMenuModule !== 'General') {
36
+ componentModule = firstMenuModule;
84
37
  }
85
- else if (isActionModule) {
86
- style = { maxWidth: 800, maxHeight: 450 };
38
+ const isCustomSettingsPanel = componentModule === 'CustomSettingsPanelModule';
39
+ if (isCustomSettingsPanel) {
40
+ if (useFirstItem) {
41
+ componentName = firstMenuItem.label;
42
+ }
43
+ const customSettingsPanel = settingsPanelOptions.customSettingsPanels.find((settingsPanel) => settingsPanel.name === componentName);
44
+ friendlyName = customSettingsPanel.name;
45
+ activeItem = customSettingsPanel.name;
46
+ moduleViewContent = React.createElement(CustomSettingsPanelView_1.CustomSettingsPanelView, { settingsPanel: customSettingsPanel });
87
47
  }
88
- const settingsKey = isActionModule ? `action-${moduleInfo === null || moduleInfo === void 0 ? void 0 : moduleInfo.FriendlyName}` : 'settings';
89
- let popupSettings = react_redux_1.useSelector((state) => { var _a, _b; return (_b = (_a = state === null || state === void 0 ? void 0 : state.System) === null || _a === void 0 ? void 0 : _a.SettingsPanel) === null || _b === void 0 ? void 0 : _b[settingsKey]; });
90
- if (!popupSettings) {
91
- const size = isActionModule
92
- ? Utilities_1.getActionPanelSize()
93
- : (_d = settingsPanelOptions.size) !== null && _d !== void 0 ? _d : Utilities_1.getSettingsPanelSize();
94
- popupSettings = {
95
- size: size,
96
- position: (_e = settingsPanelOptions.position) !== null && _e !== void 0 ? _e : Utilities_1.getMiddlePosition(size),
97
- };
48
+ else {
49
+ const module = props.api.internalApi.getModuleService().getModuleById(componentModule);
50
+ const moduleInfo = module === null || module === void 0 ? void 0 : module.moduleInfo;
51
+ accessLevel = props.api.internalApi
52
+ .getEntitlementService()
53
+ .getEntitlementAccessLevelForModule(componentModule);
54
+ friendlyName = moduleInfo.FriendlyName;
55
+ isActionModule =
56
+ moduleInfo &&
57
+ (DefaultSettingsPanel_1.ACTION_POPUPS.includes(moduleInfo === null || moduleInfo === void 0 ? void 0 : moduleInfo.ModuleName) ||
58
+ (props.componentName && props.componentName !== (moduleInfo === null || moduleInfo === void 0 ? void 0 : moduleInfo.Popup)));
59
+ activeItem = moduleInfo.ModuleName;
60
+ moduleViewContent = (React.createElement(AdaptablePopupBody_1.AdaptablePopupBody, { api: props.api, module: module, componentName: props.componentName, moduleParams: props.moduleParams, onClearParams: props.onClearParams, onHide: props.onHide }));
98
61
  }
99
- const handleWindowSettings = (settings) => {
100
- dispatch(SystemRedux_1.SystemSettingsPanelSet(settingsKey, settings));
101
- };
62
+ const baseClassName = 'ab-Adaptable-Popup';
63
+ const className = join_1.default(baseClassName, `${baseClassName}--${isWindowModal ? 'window' : 'modal'}`, isActionModule ? `${baseClassName}--action-popup` : `${baseClassName}--settings-popup`);
102
64
  return (React.createElement(PopupContext_1.default.Provider, { value: {
103
65
  hidePopup: () => {
104
66
  if (props.onHide) {
@@ -106,16 +68,9 @@ exports.AdaptablePopup = (props) => {
106
68
  }
107
69
  },
108
70
  } },
109
- React.createElement(Dialog_1.default, Object.assign({ windowModal: isWindowModal, fixed: false, windowModalProps: {
110
- handleSelector: isActionModule
111
- ? `.${baseClassName} .ab-Panel__header`
112
- : '.ab-Adaptable-Popup__TopBar',
113
- size: popupSettings.size,
114
- position: popupSettings.position,
115
- onChange: handleWindowSettings,
116
- }, style: style, padding: 0, height: isWindowModal ? null : '90vh', width: isWindowModal ? null : '90vw', className: className, onDismiss: props.onHide, isOpen: true, showCloseButton: true }, props.moduleProps),
71
+ React.createElement(AdaptablePopupDialog_1.AdaptablePopupDialog, { baseClassName: baseClassName, className: className, friendlyName: friendlyName, isActionModule: isActionModule, isWindowModal: isWindowModal, onHide: props.onHide },
117
72
  !isActionModule && React.createElement(TopBar_1.default, { icon: settingsPanelOptions.icon }, settingsPanelTitle),
118
73
  React.createElement(rebass_1.Flex, { "data-name": props.componentName, flexDirection: "row", flex: "1 1 0", style: { minHeight: 0 }, className: accessLevel == 'ReadOnly' ? GeneralConstants.READ_ONLY_STYLE : '' },
119
- !isActionModule && (React.createElement(Navigation_1.Navigation, { menuItems: menuItems, api: props.api, moduleInfo: moduleInfo, activeCustomSettingPanel: customSettingsPanel, customSettingsPanels: settingsPanelOptions.customSettingsPanels })),
120
- React.createElement(rebass_1.Flex, { flex: 1, className: "ab-Adaptable-Popup__Body" }, isCustomSettingsPanel ? (React.createElement(CustomSettingsPanelView_1.CustomSettingsPanelView, { settingsPanel: customSettingsPanel })) : (React.createElement(AdaptablePopupBody_1.AdaptablePopupBody, { api: props.api, module: module, componentName: props.componentName, moduleParams: props.moduleParams, onClearParams: props.onClearParams, onHide: props.onHide })))))));
74
+ !isActionModule && (React.createElement(Navigation_1.Navigation, { menuItems: menuItems, api: props.api, activeItem: activeItem, customSettingsPanels: settingsPanelOptions.customSettingsPanels })),
75
+ React.createElement(rebass_1.Flex, { flex: 1, className: "ab-Adaptable-Popup__Body" }, moduleViewContent)))));
121
76
  };
@@ -0,0 +1,10 @@
1
+ import * as React from 'react';
2
+ export declare const AdaptablePopupDialog: React.FunctionComponent<{
3
+ baseClassName: string;
4
+ className: string;
5
+ friendlyName: string;
6
+ isActionModule: boolean;
7
+ isWindowModal: boolean;
8
+ onHide: () => void;
9
+ style?: React.CSSProperties;
10
+ }>;
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AdaptablePopupDialog = 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 Dialog_1 = tslib_1.__importDefault(require("../../../../components/Dialog"));
8
+ const SystemRedux_1 = require("../../../../Redux/ActionsReducers/SystemRedux");
9
+ const AdaptableContext_1 = require("../../../AdaptableContext");
10
+ const Utilities_1 = require("./Utilities");
11
+ const WindowDialog = (props) => {
12
+ var _a, _b;
13
+ const { onChange, style, baseClassName, className, isActionModule, settingsPanelOptionsKey, onHide } = props, dialogProps = tslib_1.__rest(props, ["onChange", "style", "baseClassName", "className", "isActionModule", "settingsPanelOptionsKey", "onHide"]);
14
+ const adaptable = AdaptableContext_1.useAdaptable();
15
+ const dispatch = react_redux_1.useDispatch();
16
+ const settingsPanelOptions = adaptable.adaptableOptions.settingsPanelOptions;
17
+ let popupSettings = react_redux_1.useSelector((state) => { var _a, _b; return (_b = (_a = state === null || state === void 0 ? void 0 : state.System) === null || _a === void 0 ? void 0 : _a.SettingsPanel) === null || _b === void 0 ? void 0 : _b[settingsPanelOptionsKey]; });
18
+ const handleWindowSettings = (settings) => {
19
+ dispatch(SystemRedux_1.SystemSettingsPanelSet(settingsPanelOptionsKey, settings));
20
+ };
21
+ if (!popupSettings) {
22
+ const size = isActionModule
23
+ ? Utilities_1.getActionPanelSize()
24
+ : (_a = settingsPanelOptions.size) !== null && _a !== void 0 ? _a : Utilities_1.getSettingsPanelSize();
25
+ popupSettings = {
26
+ size: size,
27
+ position: (_b = settingsPanelOptions.position) !== null && _b !== void 0 ? _b : Utilities_1.getMiddlePosition(size),
28
+ };
29
+ }
30
+ const windowModalProps = {
31
+ handleSelector: isActionModule
32
+ ? `.${baseClassName} .ab-Panel__header`
33
+ : '.ab-Adaptable-Popup__TopBar',
34
+ size: popupSettings.size,
35
+ position: popupSettings.position,
36
+ onChange: handleWindowSettings,
37
+ };
38
+ return (React.createElement(Dialog_1.default, Object.assign({ windowModal: true, fixed: false, windowModalProps: windowModalProps, style: Object.assign(Object.assign({}, props.style), { height: '100%' }), padding: 0, className: className, onDismiss: onHide, isOpen: true, showCloseButton: true }, dialogProps)));
39
+ };
40
+ const PopupDialog = (props) => {
41
+ const { style, className, onHide, children } = props, dialogProps = tslib_1.__rest(props, ["style", "className", "onHide", "children"]);
42
+ return (React.createElement(Dialog_1.default, Object.assign({ fixed: false, style: props.style, padding: 0, height: '90vh', width: '90vw', className: className, onDismiss: onHide, isOpen: true, showCloseButton: true }, dialogProps), children));
43
+ };
44
+ exports.AdaptablePopupDialog = (props) => {
45
+ const { isActionModule, style, friendlyName, baseClassName, className, children, onHide, isWindowModal, } = props;
46
+ if (isWindowModal) {
47
+ const settingsPanelOptionsKey = isActionModule ? `action-${friendlyName}` : 'settings';
48
+ return (React.createElement(WindowDialog, { settingsPanelOptionsKey: settingsPanelOptionsKey, isActionModule: isActionModule, onHide: onHide, style: style, baseClassName: baseClassName, className: className }, children));
49
+ }
50
+ else {
51
+ const modalStyle = Object.assign(Object.assign({}, style), (isActionModule ? { maxWidth: 800, maxHeight: 600 } : { maxWidth: 1200, maxHeight: 1000 }));
52
+ return (React.createElement(PopupDialog, { onHide: onHide, style: modalStyle, className: className }, children));
53
+ }
54
+ };
@@ -1,12 +1,10 @@
1
1
  import * as React from 'react';
2
2
  import { AdaptableApi, AdaptableMenuItem } from '../../../../../types';
3
3
  import { CustomSettingsPanel } from '../../../../AdaptableOptions/SettingsPanelOptions';
4
- import { ModuleInfo } from '../../../../Strategy/Interface/IModule';
5
4
  interface NavigationProps {
6
5
  api: AdaptableApi;
7
6
  menuItems: (AdaptableMenuItem | '-')[];
8
- moduleInfo?: ModuleInfo;
9
- activeCustomSettingPanel?: CustomSettingsPanel;
7
+ activeItem: string;
10
8
  customSettingsPanels?: CustomSettingsPanel[];
11
9
  }
12
10
  export declare const Navigation: React.FunctionComponent<NavigationProps>;