@adaptabletools/adaptable-cjs 22.0.0-canary.2 → 22.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 (131) hide show
  1. package/index.css +64 -26
  2. package/index.css.map +1 -1
  3. package/package.json +1 -1
  4. package/src/AdaptableInterfaces/IAdaptable.d.ts +2 -2
  5. package/src/AdaptableOptions/ActionColumnOptions.d.ts +2 -2
  6. package/src/AdaptableOptions/CustomSortOptions.d.ts +5 -0
  7. package/src/AdaptableOptions/DashboardOptions.d.ts +1 -2
  8. package/src/AdaptableOptions/ToolPanelOptions.d.ts +1 -2
  9. package/src/AdaptableState/AlertState.d.ts +2 -2
  10. package/src/AdaptableState/ChartingState.d.ts +3 -3
  11. package/src/AdaptableState/Common/AdaptableAlert.d.ts +2 -2
  12. package/src/AdaptableState/Common/AdaptableButton.d.ts +2 -2
  13. package/src/AdaptableState/Common/AdaptableFlashingCell.d.ts +2 -2
  14. package/src/AdaptableState/Common/AdaptableObject.d.ts +25 -2
  15. package/src/AdaptableState/Common/AdaptableStyle.d.ts +8 -0
  16. package/src/AdaptableState/Common/RowSummary.d.ts +1 -1
  17. package/src/AdaptableState/Common/Schedule.d.ts +3 -4
  18. package/src/AdaptableState/Common/SystemStatusMessageInfo.d.ts +2 -2
  19. package/src/AdaptableState/CustomSortState.d.ts +2 -2
  20. package/src/AdaptableState/DashboardState.d.ts +2 -2
  21. package/src/AdaptableState/ExportState.d.ts +2 -2
  22. package/src/AdaptableState/FlashingCellState.d.ts +2 -2
  23. package/src/AdaptableState/FormatColumnState.d.ts +2 -10
  24. package/src/AdaptableState/LayoutState.d.ts +8 -3
  25. package/src/AdaptableState/NamedQueryState.d.ts +2 -2
  26. package/src/AdaptableState/PlusMinusState.d.ts +2 -2
  27. package/src/AdaptableState/ShortcutState.d.ts +2 -2
  28. package/src/AdaptableState/StyledColumnState.d.ts +1 -1
  29. package/src/AdaptableState/ThemeState.d.ts +2 -2
  30. package/src/Api/CustomSortApi.d.ts +6 -3
  31. package/src/Api/DataSetApi.d.ts +1 -1
  32. package/src/Api/GridApi.d.ts +3 -3
  33. package/src/Api/Implementation/CustomSortApiImpl.d.ts +5 -1
  34. package/src/Api/Implementation/CustomSortApiImpl.js +2 -2
  35. package/src/Api/Implementation/GridApiImpl.d.ts +9 -9
  36. package/src/Api/Implementation/GridApiImpl.js +16 -16
  37. package/src/Api/Implementation/LayoutHelpers.js +7 -0
  38. package/src/Api/Implementation/ScheduleApiImpl.js +1 -0
  39. package/src/Api/Internal/ColumnInternalApi.js +1 -1
  40. package/src/Api/Internal/FormatColumnInternalApi.d.ts +0 -10
  41. package/src/Api/Internal/FormatColumnInternalApi.js +1 -19
  42. package/src/Redux/ActionsReducers/LayoutRedux.d.ts +1 -1
  43. package/src/Redux/ActionsReducers/NoteRedux.js +1 -1
  44. package/src/Strategy/AlertModule.js +4 -0
  45. package/src/Strategy/CustomSortModule.js +4 -0
  46. package/src/Strategy/FlashingCellModule.js +5 -0
  47. package/src/Strategy/FormatColumnModule.js +4 -0
  48. package/src/Strategy/LayoutModule.js +4 -4
  49. package/src/Strategy/PlusMinusModule.js +4 -0
  50. package/src/Strategy/ScheduleModule.js +4 -0
  51. package/src/Strategy/ShortcutModule.js +4 -0
  52. package/src/Strategy/Utilities/FormatColumn/getFormatColumnSettingsViewItems.js +0 -3
  53. package/src/Utilities/Constants/DocumentationLinkConstants.d.ts +2 -2
  54. package/src/Utilities/Constants/DocumentationLinkConstants.js +2 -2
  55. package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +3 -3
  56. package/src/Utilities/Extensions/StringExtensions.d.ts +2 -0
  57. package/src/Utilities/Extensions/StringExtensions.js +17 -0
  58. package/src/Utilities/Helpers/FormatHelper.js +9 -2
  59. package/src/Utilities/Helpers/StyleHelper.js +14 -0
  60. package/src/Utilities/ObjectFactory.js +16 -3
  61. package/src/Utilities/Services/AnnotationsService.js +1 -1
  62. package/src/Utilities/Services/ModuleService.js +3 -3
  63. package/src/View/AdaptablePopover/index.d.ts +1 -0
  64. package/src/View/AdaptablePopover/index.js +1 -1
  65. package/src/View/Alert/ActiveAlertsPanel.js +8 -0
  66. package/src/View/Alert/AlertViewPanel.js +13 -9
  67. package/src/View/Alert/Utilities/getAlertButtonStyle.d.ts +1 -0
  68. package/src/View/Alert/Utilities/getAlertButtonStyle.js +8 -0
  69. package/src/View/Alert/Utilities/getDefaultAlertDefinition.d.ts +2 -1
  70. package/src/View/Alert/Wizard/AlertTypeWizardSection.d.ts +5 -2
  71. package/src/View/Alert/Wizard/AlertTypeWizardSection.js +48 -12
  72. package/src/View/Alert/Wizard/AlertWizard.js +12 -8
  73. package/src/View/BulkUpdate/BulkUpdateViewPanel.js +23 -11
  74. package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.js +2 -2
  75. package/src/View/CellSummary/CellSummaryViewPanel.js +15 -17
  76. package/src/View/Components/AdaptableDateInput/index.js +1 -1
  77. package/src/View/Components/Buttons/ButtonApply.js +1 -1
  78. package/src/View/Components/Buttons/ButtonClear.d.ts +1 -0
  79. package/src/View/Components/Buttons/EntityListActionButtons.d.ts +1 -2
  80. package/src/View/Components/Buttons/SuspendToggleButton/SuspendToggleButton.d.ts +1 -2
  81. package/src/View/Components/Selectors/BulkUpdateValueSelector.js +18 -17
  82. package/src/View/Components/StyleComponent.js +20 -1
  83. package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.d.ts +2 -1
  84. package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.js +39 -13
  85. package/src/View/CustomSort/Wizard/CustomSortWizard.js +4 -4
  86. package/src/View/Dashboard/DashboardPopup.js +4 -5
  87. package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +1 -0
  88. package/src/View/Export/ExportDestinationPicker.js +1 -1
  89. package/src/View/Export/ExportStatusBar.js +4 -2
  90. package/src/View/Export/ExportViewPanel.js +25 -18
  91. package/src/View/FlashingCell/Wizard/FlashingCellSettingsWizardSection.d.ts +2 -1
  92. package/src/View/FlashingCell/Wizard/FlashingCellSettingsWizardSection.js +36 -15
  93. package/src/View/FlashingCell/Wizard/FlashingCellWizard.js +13 -9
  94. package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.js +46 -51
  95. package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.js +2 -2
  96. package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +22 -11
  97. package/src/View/GridInfo/GridInfoPopup/GridInfoPopup.js +57 -65
  98. package/src/View/Layout/Wizard/sections/PivotColumnsSection.js +8 -0
  99. package/src/View/PlusMinus/Wizard/PlusMinusSettingsWizardSection.js +32 -9
  100. package/src/View/PlusMinus/Wizard/PlusMinusWizard.js +20 -15
  101. package/src/View/QuickSearch/QuickSearchPopup.js +4 -1
  102. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsIPushPull.js +12 -1
  103. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsOpenFin.js +12 -1
  104. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReminder.js +14 -4
  105. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReport.js +12 -1
  106. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/isSettingsValid.d.ts +2 -1
  107. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/isSettingsValid.js +10 -1
  108. package/src/View/Shortcut/Wizard/ShortcutSettingsWizard.d.ts +2 -1
  109. package/src/View/Shortcut/Wizard/ShortcutSettingsWizard.js +25 -4
  110. package/src/View/Shortcut/Wizard/ShortcutWizard.js +18 -14
  111. package/src/View/UIHelper.d.ts +2 -0
  112. package/src/View/UIHelper.js +16 -0
  113. package/src/agGrid/AdaptableAgGrid.d.ts +2 -2
  114. package/src/agGrid/AdaptableAgGrid.js +5 -5
  115. package/src/agGrid/AgGridColumnAdapter.js +3 -18
  116. package/src/components/Dashboard/DashboardToolbar.js +1 -1
  117. package/src/components/ExpressionEditor/EditorInput.js +19 -3
  118. package/src/components/Tree/TreeDropdown/index.js +1 -1
  119. package/src/env.js +2 -2
  120. package/src/layout-manager/src/LayoutManagerModel.d.ts +1 -0
  121. package/src/layout-manager/src/index.js +25 -7
  122. package/src/layout-manager/src/normalizeLayoutModel.js +3 -0
  123. package/src/metamodel/adaptable.metamodel.d.ts +39 -7
  124. package/src/metamodel/adaptable.metamodel.js +1 -1
  125. package/src/migration/AdaptableUpgradeHelper.js +3 -1
  126. package/src/migration/VersionUpgrade22.d.ts +21 -0
  127. package/src/migration/VersionUpgrade22.js +191 -0
  128. package/src/types.d.ts +2 -3
  129. package/tsconfig.cjs.tsbuildinfo +1 -1
  130. package/src/AdaptableState/Common/SuspendableObject.d.ts +0 -10
  131. package/src/AdaptableState/Common/SuspendableObject.js +0 -2
@@ -19,6 +19,7 @@ const ReportNameSelector_1 = require("./ReportNameSelector");
19
19
  const ReportFormatSelector_1 = require("./ReportFormatSelector");
20
20
  const ExportDestinationPicker_1 = require("./ExportDestinationPicker");
21
21
  const Flex_1 = require("../../components/Flex");
22
+ const clsx_1 = tslib_1.__importDefault(require("clsx"));
22
23
  const ExportViewPanel = (props) => {
23
24
  const dispatch = (0, react_redux_1.useDispatch)();
24
25
  const exportApi = props.api.exportApi;
@@ -30,28 +31,34 @@ const ExportViewPanel = (props) => {
30
31
  const deleteMessage = currentReport
31
32
  ? `Are you sure you want to delete '${currentReport.Name}'?`
32
33
  : 'Are you sure you want to delete this report?';
33
- const elementType = props.viewType === 'Toolbar' ? 'DashboardToolbar' : 'ToolPanel';
34
- return (React.createElement(Flex_1.Flex, { flexDirection: "row", className: `ab-${elementType}__Export__panel twa:gap-2`, flexWrap: props.viewType === 'ToolPanel' ? 'wrap' : 'nowrap' },
34
+ const isToolbar = props.viewType === 'Toolbar';
35
+ const elementType = isToolbar ? 'DashboardToolbar' : 'ToolPanel';
36
+ return (React.createElement(Flex_1.Flex, { flexDirection: "row", className: (0, clsx_1.default)(`ab-${elementType}__CellSummary__wrap twa:gap-2 twa:flex-row`, {
37
+ 'twa:min-w-[486px] twa:flex-nowrap': isToolbar,
38
+ 'twa:flex-1 twa:flex-wrap': !isToolbar,
39
+ }) },
35
40
  React.createElement(ReportNameSelector_1.ReportNameSelector, { viewType: props.viewType, reportName: currentReportName, userReports: userReports, onReportNameSelected: (reportName) => exportApi.selectReport(reportName) }),
36
41
  React.createElement(ReportFormatSelector_1.ReportFormatSelector, { viewType: props.viewType, reportName: currentReportName, reportFormat: currentFormat, onReportFormatSelected: (reportFormat) => exportApi.selectFormat(reportFormat) }),
37
42
  React.createElement(Flex_1.Flex, { className: (0, join_1.default)(accessLevel == 'ReadOnly' ? GeneralConstants.READ_ONLY_STYLE : '', `ab-${elementType}__Export__controls twa:w-full`) },
38
- React.createElement(ExportDestinationPicker_1.ExportDestinationPicker, { viewType: props.viewType, reportName: currentReportName, reportFormat: currentFormat }),
39
- React.createElement(ButtonEdit_1.ButtonEdit, { onClick: () => dispatch(PopupRedux.PopupShowScreen(ModuleConstants.ExportModuleId, props.moduleInfo.Popup, {
40
- action: 'Edit',
41
- source: 'Toolbar',
42
- })), tooltip: "Edit Report", className: `ab-${elementType}__Export__edit`, disabled: currentReport == null, accessLevel: accessLevel }),
43
- React.createElement(ButtonNew_1.ButtonNew, { variant: "text", className: `ab-${elementType}__Export__new`, tone: "neutral", children: null, onClick: () => dispatch(PopupRedux.PopupShowScreen(ModuleConstants.ExportModuleId, props.moduleInfo.Popup, {
44
- action: 'New',
45
- source: 'Toolbar',
46
- })), tooltip: "Create New Report", accessLevel: props.accessLevel }),
47
- React.createElement(ButtonDelete_1.ButtonDelete, { tooltip: "Delete Report", className: `ab-${elementType}__Export__delete`, disabled: currentReport == null, ConfirmAction: ExportRedux.ReportDelete(currentReport), ConfirmationMsg: deleteMessage, ConfirmationTitle: 'Delete Report', accessLevel: accessLevel }),
48
- props.api.entitlementApi.isModuleFullEntitlement('Schedule') && (React.createElement(ButtonSchedule_1.ButtonSchedule, { className: `ab-${elementType}__Export__schedule twa:ml-1`, onClick: () => {
49
- const reportSchedule = ObjectFactory_1.default.CreateReportSchedule(currentReportName, currentFormat);
50
- dispatch(PopupRedux.PopupShowScreen(ModuleConstants.ScheduleModuleId, 'SchedulePopup', {
43
+ React.createElement(Flex_1.Flex, { className: "twa:min-w-[44px]" },
44
+ React.createElement(ExportDestinationPicker_1.ExportDestinationPicker, { viewType: props.viewType, reportName: currentReportName, reportFormat: currentFormat })),
45
+ React.createElement(Flex_1.Flex, null,
46
+ React.createElement(ButtonEdit_1.ButtonEdit, { onClick: () => dispatch(PopupRedux.PopupShowScreen(ModuleConstants.ExportModuleId, props.moduleInfo.Popup, {
47
+ action: 'Edit',
48
+ source: 'Toolbar',
49
+ })), tooltip: "Edit Report", className: `ab-${elementType}__Export__edit`, disabled: currentReport == null, accessLevel: accessLevel }),
50
+ React.createElement(ButtonNew_1.ButtonNew, { variant: "text", className: `ab-${elementType}__Export__new`, tone: "neutral", children: null, onClick: () => dispatch(PopupRedux.PopupShowScreen(ModuleConstants.ExportModuleId, props.moduleInfo.Popup, {
51
51
  action: 'New',
52
52
  source: 'Toolbar',
53
- value: reportSchedule,
54
- }));
55
- }, tooltip: "Schedule", disabled: currentReport == null, accessLevel: props.accessLevel })))));
53
+ })), tooltip: "Create New Report", accessLevel: props.accessLevel }),
54
+ React.createElement(ButtonDelete_1.ButtonDelete, { tooltip: "Delete Report", className: `ab-${elementType}__Export__delete`, disabled: currentReport == null, ConfirmAction: ExportRedux.ReportDelete(currentReport), ConfirmationMsg: deleteMessage, ConfirmationTitle: 'Delete Report', accessLevel: accessLevel }),
55
+ props.api.entitlementApi.isModuleFullEntitlement('Schedule') && (React.createElement(ButtonSchedule_1.ButtonSchedule, { className: `ab-${elementType}__Export__schedule`, onClick: () => {
56
+ const reportSchedule = ObjectFactory_1.default.CreateReportSchedule(currentReportName, currentFormat);
57
+ dispatch(PopupRedux.PopupShowScreen(ModuleConstants.ScheduleModuleId, 'SchedulePopup', {
58
+ action: 'New',
59
+ source: 'Toolbar',
60
+ value: reportSchedule,
61
+ }));
62
+ }, tooltip: "Schedule", disabled: currentReport == null, accessLevel: props.accessLevel }))))));
56
63
  };
57
64
  exports.ExportViewPanel = ExportViewPanel;
@@ -1,10 +1,11 @@
1
1
  import * as React from 'react';
2
- import { FlashingCellDefinition } from '../../../types';
2
+ import { AdaptableApi, FlashingCellDefinition } from '../../../types';
3
3
  type FlashingAlertDurationWizardSectionProps = {
4
4
  readOnly?: boolean;
5
5
  flashingCell?: FlashingCellDefinition;
6
6
  onChange: (data: FlashingCellDefinition) => void;
7
7
  };
8
+ export declare const isSettingsValid: (data: FlashingCellDefinition, api: AdaptableApi) => true | "Name is required" | "A Flashing Cell already exists with that name";
8
9
  export declare const renderFlashingAlertSettingsSummary: (flashingAlert: FlashingCellDefinition) => React.JSX.Element;
9
10
  export declare const FlashingAlertSettingsWizardSection: (props: FlashingAlertDurationWizardSectionProps) => React.JSX.Element;
10
11
  export {};
@@ -1,20 +1,36 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FlashingAlertSettingsWizardSection = exports.renderFlashingAlertSettingsSummary = void 0;
3
+ exports.FlashingAlertSettingsWizardSection = exports.renderFlashingAlertSettingsSummary = exports.isSettingsValid = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const React = tslib_1.__importStar(require("react"));
6
6
  const react_1 = require("react");
7
7
  const Input_1 = tslib_1.__importDefault(require("../../../components/Input"));
8
8
  const usePrevious_1 = tslib_1.__importDefault(require("../../../components/utils/usePrevious"));
9
- const Radio_1 = tslib_1.__importDefault(require("../../../components/Radio"));
10
9
  const Tabs_1 = require("../../../components/Tabs");
11
10
  const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
12
11
  const CodeBlock_1 = require("../../../components/CodeBlock");
13
12
  const FormLayout_1 = tslib_1.__importStar(require("../../../components/FormLayout"));
14
13
  const CheckBox_1 = require("../../../components/CheckBox");
15
14
  const Flex_1 = require("../../../components/Flex");
15
+ const Tag_1 = require("../../../components/Tag");
16
+ const OnePageAdaptableWizard_2 = require("../../Wizard/OnePageAdaptableWizard");
17
+ const isSettingsValid = (data, api) => {
18
+ if (!data.Name?.trim()) {
19
+ return 'Name is required';
20
+ }
21
+ const allFlashingCells = api.flashingCellApi.getFlashingCellDefinitions();
22
+ const isDuplicateName = allFlashingCells.some((fc) => fc.Name === data.Name && fc.Uuid !== data.Uuid);
23
+ if (isDuplicateName) {
24
+ return 'A Flashing Cell already exists with that name';
25
+ }
26
+ return true;
27
+ };
28
+ exports.isSettingsValid = isSettingsValid;
16
29
  const renderFlashingAlertSettingsSummary = (flashingAlert) => {
17
30
  return (React.createElement(React.Fragment, null,
31
+ React.createElement(OnePageAdaptableWizard_2.SummaryText, null,
32
+ "Name ",
33
+ React.createElement(Tag_1.Tag, null, flashingAlert.Name || 'Not specified')),
18
34
  React.createElement(Flex_1.Box, { className: "twa:text-2" }, flashingAlert.FlashDuration === 'always' ? (React.createElement(React.Fragment, null, "Flashing is never removed")) : (React.createElement(React.Fragment, null,
19
35
  "Flashing is removed after ",
20
36
  React.createElement(CodeBlock_1.CodeBlock, null, flashingAlert.FlashDuration),
@@ -25,6 +41,12 @@ exports.renderFlashingAlertSettingsSummary = renderFlashingAlertSettingsSummary;
25
41
  const FlashingAlertSettingsWizardSection = (props) => {
26
42
  let { data: flashingCell } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
27
43
  flashingCell = flashingCell ?? props.flashingCell;
44
+ const handleNameChange = (event) => {
45
+ props.onChange({
46
+ ...flashingCell,
47
+ Name: event.target.value,
48
+ });
49
+ };
28
50
  const setDuration = (FlashDuration) => {
29
51
  props.onChange({ ...flashingCell, FlashDuration: FlashDuration });
30
52
  };
@@ -63,24 +85,23 @@ const FlashingAlertSettingsWizardSection = (props) => {
63
85
  React.createElement(Tabs_1.Tabs.Tab, null, "Flashing Cell Settings"),
64
86
  React.createElement(Tabs_1.Tabs.Content, null,
65
87
  React.createElement(FormLayout_1.default, null,
66
- React.createElement(FormLayout_1.FormRow, { label: "Duration Type" },
67
- React.createElement(Radio_1.default, { "data-name": "duration-type-always", className: "twa:mr-3", checked: duration == 'always', tabIndex: -1, onChange: () => handleTypeChange('always') }, "Always"),
68
- React.createElement(Radio_1.default, { "data-name": "duration-type-number", checked: duration !== 'always', tabIndex: -1, onChange: () => handleTypeChange('number') }, "Limited (ms)")),
69
- React.createElement(FormLayout_1.FormRow, { label: "" },
70
- duration !== 'always' && (React.createElement(Flex_1.Flex, { flexDirection: "row", alignItems: "baseline" },
71
- React.createElement(Flex_1.Box, { className: "twa:text-2 twa:mr-2" }, "After"),
72
- React.createElement(Input_1.default, { "data-name": "duration-input", readOnly: props.readOnly, type: "text", name: "value", ref: inputRef, className: "twa:mt-2 twa:mr-1", value: duration, onChange: (event) => {
73
- const value = event.target.value;
74
- setDuration(isNaN(Number(value)) ? 500 : Number(value));
75
- } }),
76
- React.createElement(Flex_1.Box, { className: "twa:text-2" }, "milliseconds"))),
77
- duration === 'always' && (React.createElement(Flex_1.Box, { className: "twa:text-3 twa:h-[43px]" }, "Persists the flashing style indeterminately - can be removed manually"))),
88
+ React.createElement(FormLayout_1.FormRow, { label: "Name" },
89
+ React.createElement(Input_1.default, { "data-name": "flashing-cell-name", className: "twa:flex-1 twa:mr-3", onChange: handleNameChange, placeholder: "Enter Name", value: flashingCell.Name ?? '' })),
78
90
  React.createElement(FormLayout_1.FormRow, { label: "Flash Target" },
79
91
  React.createElement(CheckBox_1.CheckBox, { "data-name": "flashing-target", onChange: (checked) => handleTargetChange('cell', checked), className: "twa:mr-3", checked: flashingCell?.FlashTarget === 'cell' ||
80
92
  flashingCell?.FlashTarget?.includes?.('cell'), tabIndex: -1 }, "Cell"),
81
93
  React.createElement(CheckBox_1.CheckBox, { "data-name": "flashing-target-row", className: "twa:mr-3", onChange: (checked) => handleTargetChange('row', checked), checked: flashingCell?.FlashTarget === 'row' ||
82
94
  flashingCell?.FlashTarget?.includes?.('row'), tabIndex: -1 }, "Row"),
83
95
  React.createElement(CheckBox_1.CheckBox, { "data-name": "flashing-target-aggFuncCell", onChange: (checked) => handleTargetChange('aggFuncCell', checked), checked: flashingCell?.FlashTarget === 'aggFuncCell' ||
84
- flashingCell?.FlashTarget?.includes?.('aggFuncCell'), tabIndex: -1 }, "Aggregated Function Cell")))))));
96
+ flashingCell?.FlashTarget?.includes?.('aggFuncCell'), tabIndex: -1 }, "Aggregated Function Cell")),
97
+ React.createElement(FormLayout_1.FormRow, { label: "Duration" },
98
+ React.createElement(Flex_1.Flex, { alignItems: "center" },
99
+ React.createElement(CheckBox_1.CheckBox, { "data-name": "duration-always", checked: duration === 'always', onChange: (checked) => handleTypeChange(checked ? 'always' : 'number'), className: "twa:mr-4", tabIndex: -1 }, "Always"),
100
+ duration !== 'always' && (React.createElement(React.Fragment, null,
101
+ React.createElement(Input_1.default, { "data-name": "duration-input", readOnly: props.readOnly, type: "number", name: "value", ref: inputRef, className: "twa:w-20 twa:mr-2", value: duration, onChange: (event) => {
102
+ const value = event.target.value;
103
+ setDuration(isNaN(Number(value)) ? 500 : Number(value));
104
+ } }),
105
+ React.createElement(Flex_1.Box, { className: "twa:text-2" }, "ms"))))))))));
85
106
  };
86
107
  exports.FlashingAlertSettingsWizardSection = FlashingAlertSettingsWizardSection;
@@ -21,7 +21,7 @@ const ObjectTagsWizardSection_1 = require("../../Wizard/ObjectTagsWizardSection"
21
21
  const Flex_1 = require("../../../components/Flex");
22
22
  const FlashingCellWizard = (props) => {
23
23
  const { api } = (0, AdaptableContext_1.useAdaptable)();
24
- const [flashingCell, setFlashingCell] = (0, react_1.useState)(() => {
24
+ const [flashingCell, doSetFlashingCell] = (0, react_1.useState)(() => {
25
25
  let flashingCell = props.data
26
26
  ? (0, Helper_1.cloneObject)(props.data)
27
27
  : ObjectFactory_1.default.CreateEmptyFlashingCellDefinition();
@@ -37,9 +37,12 @@ const FlashingCellWizard = (props) => {
37
37
  }
38
38
  return flashingCell;
39
39
  });
40
+ const setFlashingCell = (0, react_1.useCallback)((data) => {
41
+ doSetFlashingCell(data);
42
+ }, []);
40
43
  const updateProperty = (propName) => {
41
44
  return (value) => {
42
- setFlashingCell((flashingCell) => {
45
+ doSetFlashingCell((flashingCell) => {
43
46
  flashingCell = { ...flashingCell, [propName]: value };
44
47
  return flashingCell;
45
48
  });
@@ -61,6 +64,14 @@ const FlashingCellWizard = (props) => {
61
64
  props.onFinishWizard(flashingCell);
62
65
  };
63
66
  return (React.createElement(OnePageAdaptableWizard_1.OnePageAdaptableWizard, { defaultCurrentSectionName: props.defaultCurrentSectionName, moduleInfo: props.moduleInfo, data: flashingCell, onHide: props.onCloseWizard, onFinish: handleFinish, sections: [
67
+ {
68
+ details: 'Set Name, Duration and Target Properties',
69
+ isValid: FlashingCellSettingsWizardSection_1.isSettingsValid,
70
+ render: () => (React.createElement(Flex_1.Box, { className: "twa:p-2" },
71
+ React.createElement(FlashingCellSettingsWizardSection_1.FlashingAlertSettingsWizardSection, { onChange: setFlashingCell }))),
72
+ renderSummary: FlashingCellSettingsWizardSection_1.renderFlashingAlertSettingsSummary,
73
+ title: 'Settings',
74
+ },
64
75
  {
65
76
  details: 'Specify which data changes should trigger Cell Flashing',
66
77
  isValid: NewScopeComponent_1.isScopeValid,
@@ -84,13 +95,6 @@ const FlashingCellWizard = (props) => {
84
95
  renderSummary: FlashingCellStyleWizardSection_1.renderFlashingAlertStyleSummary,
85
96
  title: 'Flash Styles',
86
97
  },
87
- {
88
- details: 'Set Duration and Target Properties',
89
- render: () => (React.createElement(Flex_1.Box, { className: "twa:p-2" },
90
- React.createElement(FlashingCellSettingsWizardSection_1.FlashingAlertSettingsWizardSection, { onChange: setFlashingCell }))),
91
- renderSummary: FlashingCellSettingsWizardSection_1.renderFlashingAlertSettingsSummary,
92
- title: 'Settings',
93
- },
94
98
  {
95
99
  details: 'Select Flashing Cell Tags',
96
100
  title: 'Tags',
@@ -7,16 +7,15 @@ const FormLayout_1 = tslib_1.__importStar(require("../../../components/FormLayou
7
7
  const CheckBox_1 = require("../../../components/CheckBox");
8
8
  const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
9
9
  const Tag_1 = require("../../../components/Tag");
10
- const ToggleGroup_1 = require("../../../components/Toggle/ToggleGroup");
11
- const Toggle_1 = require("../../../components/Toggle/Toggle");
12
10
  const Radio_1 = tslib_1.__importStar(require("../../../components/Radio"));
13
11
  const Flex_1 = require("../../../components/Flex");
14
- const Card_1 = require("../../../components/Card");
12
+ const Tabs_1 = require("../../../components/Tabs");
13
+ const Input_1 = tslib_1.__importDefault(require("../../../components/Input"));
15
14
  const renderFormatColumnSettingsSummary = (data) => {
16
15
  return (React.createElement(Flex_1.Box, { className: "twa:p-2" },
17
- React.createElement(Flex_1.Box, null,
18
- "Cell alignment ",
19
- React.createElement(Tag_1.Tag, null, data.CellAlignment ?? 'default')),
16
+ React.createElement(Flex_1.Box, { className: "twa:mt-3" },
17
+ "Name ",
18
+ React.createElement(Tag_1.Tag, null, data.Name)),
20
19
  React.createElement(Flex_1.Box, { className: "twa:mt-3" },
21
20
  "Data Rows ",
22
21
  React.createElement(Tag_1.Tag, null, data.RowScope?.ExcludeDataRows ? 'no' : 'yes')),
@@ -40,12 +39,11 @@ const renderFormatColumnSettingsSummary = (data) => {
40
39
  exports.renderFormatColumnSettingsSummary = renderFormatColumnSettingsSummary;
41
40
  const FormatColumnSettingsWizardSection = (props) => {
42
41
  const { data } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
43
- const onCellAlignmentSelectChanged = (CellAlignment) => {
44
- const newData = { ...data, CellAlignment };
45
- if (CellAlignment === null) {
46
- delete newData.CellAlignment;
47
- }
48
- props.onChange(newData);
42
+ const onNameChange = (event) => {
43
+ props.onChange({
44
+ ...data,
45
+ Name: event.target.value,
46
+ });
49
47
  };
50
48
  const onExcludeDataRowsChanged = (ExcludeDataRows) => {
51
49
  props.onChange({
@@ -83,44 +81,41 @@ const FormatColumnSettingsWizardSection = (props) => {
83
81
  },
84
82
  });
85
83
  };
86
- return (React.createElement(Card_1.Card, null,
87
- React.createElement(Card_1.Card.Title, null, "Settings"),
88
- React.createElement(Card_1.Card.Body, null,
89
- React.createElement(Flex_1.Flex, { flexDirection: "row" },
90
- React.createElement(FormLayout_1.default, null,
91
- React.createElement(FormLayout_1.FormRow, { label: "Cell Alignment" },
92
- React.createElement(ToggleGroup_1.ToggleGroup, null,
93
- React.createElement(Toggle_1.Toggle, { icon: "align-left", pressed: data.CellAlignment === 'Left', onPressedChange: (pressed) => pressed
94
- ? onCellAlignmentSelectChanged('Left')
95
- : onCellAlignmentSelectChanged(null) }),
96
- React.createElement(Toggle_1.Toggle, { icon: "align-center", pressed: data.CellAlignment === 'Center', onPressedChange: (pressed) => pressed
97
- ? onCellAlignmentSelectChanged('Center')
98
- : onCellAlignmentSelectChanged(null) }),
99
- React.createElement(Toggle_1.Toggle, { icon: "align-right", pressed: data.CellAlignment === 'Right', onPressedChange: (pressed) => pressed
100
- ? onCellAlignmentSelectChanged('Right')
101
- : onCellAlignmentSelectChanged(null) }))),
102
- data.Target === 'cell' && (React.createElement(React.Fragment, null,
103
- React.createElement(FormLayout_1.FormRow, { label: "Exclude Data Rows:" },
104
- React.createElement(Flex_1.Flex, { alignItems: "center", className: "twa:ml-2" },
105
- React.createElement(CheckBox_1.CheckBox, { "data-name": "exclude-data-rows-checkbox", checked: data.RowScope?.ExcludeDataRows, onChange: onExcludeDataRowsChanged, className: "twa:mr-2" }))),
106
- React.createElement(FormLayout_1.FormRow, { label: "Exclude Group Rows:" },
107
- React.createElement(Flex_1.Flex, { alignItems: "center", className: "twa:ml-2" },
108
- React.createElement(CheckBox_1.CheckBox, { "data-name": "exclude-grouped-rows-checkbox", checked: data.RowScope?.ExcludeGroupRows, onChange: onExcludeGroupedRowsChanged, className: "twa:mr-2" }))),
109
- React.createElement(FormLayout_1.FormRow, { label: "Exclude Row Summaries:" },
110
- React.createElement(Flex_1.Flex, { alignItems: "center", className: "twa:ml-2" },
111
- React.createElement(CheckBox_1.CheckBox, { "data-name": "exclude-summary-rows-checkbox", checked: data.RowScope?.ExcludeSummaryRows, onChange: onExcludeSummaryRowsChanged, className: "twa:mr-2" }))),
112
- React.createElement(FormLayout_1.FormRow, { label: "Exclude Total Rows:" },
113
- React.createElement(Flex_1.Flex, { alignItems: "center", className: "twa:ml-2" },
114
- React.createElement(CheckBox_1.CheckBox, { "data-name": "exclude-total-rows-checkbox", checked: data.RowScope?.ExcludeTotalRows, onChange: onExcludeTotalRowsChanged, className: "twa:mr-2" }))))),
115
- React.createElement(FormLayout_1.FormRow, { label: "Apply on Column Group:" },
116
- React.createElement(Radio_1.RadioGroup, { value: data.ColumnGroupScope || 'Both', name: "columnGroupScope", orientation: "horizontal", onRadioChange: (columnGroupScope) => {
117
- props.onChange({
118
- ...data,
119
- ColumnGroupScope: columnGroupScope,
120
- });
121
- } },
122
- React.createElement(Radio_1.default, { className: "twa:ml-1", value: "Both" }, "Always"),
123
- React.createElement(Radio_1.default, { className: "twa:ml-4", value: "Expanded" }, "Expanded"),
124
- React.createElement(Radio_1.default, { className: "twa:ml-4", value: "Collapsed" }, "Collapsed"))))))));
84
+ return (React.createElement(Flex_1.Flex, { flexDirection: "column", style: { height: '100%' } },
85
+ React.createElement(Tabs_1.Tabs, { className: "twa:mb-3" },
86
+ React.createElement(Tabs_1.Tabs.Tab, null, "Settings"),
87
+ React.createElement(Tabs_1.Tabs.Content, null,
88
+ React.createElement(Flex_1.Flex, { flexDirection: "row" },
89
+ React.createElement(FormLayout_1.default, { className: "twa:max-w-[300px] twa:w-full" },
90
+ React.createElement(FormLayout_1.FormRow, { label: "Name" },
91
+ React.createElement(Input_1.default, { className: "twa:w-full", "data-name": "format-column-name", onChange: onNameChange, value: data?.Name ?? '' })))))),
92
+ React.createElement(Tabs_1.Tabs, null,
93
+ React.createElement(Tabs_1.Tabs.Tab, null, "Configuration"),
94
+ React.createElement(Tabs_1.Tabs.Content, null,
95
+ React.createElement(Flex_1.Flex, { flexDirection: "row" },
96
+ React.createElement(FormLayout_1.default, null,
97
+ data.Target === 'cell' && (React.createElement(React.Fragment, null,
98
+ React.createElement(FormLayout_1.FormRow, { label: "Exclude Data Rows:" },
99
+ React.createElement(Flex_1.Flex, { alignItems: "center", className: "twa:ml-2" },
100
+ React.createElement(CheckBox_1.CheckBox, { "data-name": "exclude-data-rows-checkbox", checked: data.RowScope?.ExcludeDataRows, onChange: onExcludeDataRowsChanged, className: "twa:mr-2" }))),
101
+ React.createElement(FormLayout_1.FormRow, { label: "Exclude Group Rows:" },
102
+ React.createElement(Flex_1.Flex, { alignItems: "center", className: "twa:ml-2" },
103
+ React.createElement(CheckBox_1.CheckBox, { "data-name": "exclude-grouped-rows-checkbox", checked: data.RowScope?.ExcludeGroupRows, onChange: onExcludeGroupedRowsChanged, className: "twa:mr-2" }))),
104
+ React.createElement(FormLayout_1.FormRow, { label: "Exclude Row Summaries:" },
105
+ React.createElement(Flex_1.Flex, { alignItems: "center", className: "twa:ml-2" },
106
+ React.createElement(CheckBox_1.CheckBox, { "data-name": "exclude-summary-rows-checkbox", checked: data.RowScope?.ExcludeSummaryRows, onChange: onExcludeSummaryRowsChanged, className: "twa:mr-2" }))),
107
+ React.createElement(FormLayout_1.FormRow, { label: "Exclude Total Rows:" },
108
+ React.createElement(Flex_1.Flex, { alignItems: "center", className: "twa:ml-2" },
109
+ React.createElement(CheckBox_1.CheckBox, { "data-name": "exclude-total-rows-checkbox", checked: data.RowScope?.ExcludeTotalRows, onChange: onExcludeTotalRowsChanged, className: "twa:mr-2" }))))),
110
+ React.createElement(FormLayout_1.FormRow, { label: "Apply on Column Group:" },
111
+ React.createElement(Radio_1.RadioGroup, { value: data.ColumnGroupScope || 'Both', name: "columnGroupScope", orientation: "horizontal", onRadioChange: (columnGroupScope) => {
112
+ props.onChange({
113
+ ...data,
114
+ ColumnGroupScope: columnGroupScope,
115
+ });
116
+ } },
117
+ React.createElement(Radio_1.default, { className: "twa:ml-1", value: "Both" }, "Always"),
118
+ React.createElement(Radio_1.default, { className: "twa:ml-4", value: "Expanded" }, "When Expanded"),
119
+ React.createElement(Radio_1.default, { className: "twa:ml-4", value: "Collapsed" }, "When Collapsed")))))))));
125
120
  };
126
121
  exports.FormatColumnSettingsWizardSection = FormatColumnSettingsWizardSection;
@@ -13,7 +13,6 @@ const isFormatColumnStyleValid = (data, api) => {
13
13
  if (data.Style &&
14
14
  UIHelper_1.default.IsEmptyStyle(data.Style) &&
15
15
  data.DisplayFormat === undefined &&
16
- data.CellAlignment === undefined &&
17
16
  !api.columnScopeApi.isSingleBooleanColumnScope(data.Scope)) {
18
17
  return 'No format applied';
19
18
  }
@@ -25,7 +24,8 @@ const toStyle = (data) => {
25
24
  ...(0, StyleHelper_1.convertAdaptableStyleToCSS)(data.Style ?? {}),
26
25
  borderWidth: data.Style?.BorderColor ? 2 : 0,
27
26
  borderStyle: 'solid',
28
- textAlign: data.CellAlignment ? data.CellAlignment.toLowerCase() : undefined,
27
+ // ToDO abcdefg
28
+ textAlign: data.Style?.Alignment ? data.Style.Alignment.toLowerCase() : undefined,
29
29
  };
30
30
  };
31
31
  const renderFormatColumnStyleWizardSummary = (data) => {
@@ -11,9 +11,10 @@ const FormatColumnStyleWizardSection_1 = require("./FormatColumnStyleWizardSecti
11
11
  const FormatColumnFormatWizardSection_1 = require("./FormatColumnFormatWizardSection");
12
12
  const AdaptableContext_1 = require("../../AdaptableContext");
13
13
  const FormatColumnSettingsWizardSection_1 = require("./FormatColumnSettingsWizardSection");
14
+ const react_redux_1 = require("react-redux");
14
15
  const NewScopeComponent_1 = require("../../Components/NewScopeComponent");
15
16
  const ObjectFactory_1 = tslib_1.__importDefault(require("../../../Utilities/ObjectFactory"));
16
- const react_redux_1 = require("react-redux");
17
+ const react_redux_2 = require("react-redux");
17
18
  const FormatColumnRedux = tslib_1.__importStar(require("../../../Redux/ActionsReducers/FormatColumnRedux"));
18
19
  const ObjectTagsWizardSection_1 = require("../../Wizard/ObjectTagsWizardSection");
19
20
  const Utilities_1 = require("../../Components/EntityRulesEditor/Utilities");
@@ -61,6 +62,7 @@ const adjustFormatColumn = (formatColumn, api) => {
61
62
  };
62
63
  function FormatColumnWizard(props) {
63
64
  const { api } = (0, AdaptableContext_1.useAdaptable)();
65
+ const allFormatColumns = (0, react_redux_1.useSelector)((state) => state.FormatColumn?.FormatColumns ?? []);
64
66
  const data = props.data ?? props.popupParams?.value;
65
67
  const [formatColumn, doSetFormatColumn] = (0, react_1.useState)(() => {
66
68
  let formatColumn = data ? (0, Helper_1.cloneObject)(data) : ObjectFactory_1.default.CreateEmptyFormatColumn();
@@ -78,7 +80,7 @@ function FormatColumnWizard(props) {
78
80
  const setFormatColumn = React.useCallback((formatColumn) => {
79
81
  doSetFormatColumn(adjustFormatColumn(formatColumn, api));
80
82
  }, []);
81
- const dispatch = (0, react_redux_1.useDispatch)();
83
+ const dispatch = (0, react_redux_2.useDispatch)();
82
84
  const handleFinish = () => {
83
85
  if (formatColumn?.DisplayFormat?.Options &&
84
86
  (0, ObjectExtensions_1.isObjectEmpty)(formatColumn?.DisplayFormat?.Options)) {
@@ -96,6 +98,24 @@ function FormatColumnWizard(props) {
96
98
  props.onFinishWizard(formatColumn);
97
99
  };
98
100
  return (React.createElement(OnePageAdaptableWizard_1.OnePageAdaptableWizard, { defaultCurrentSectionName: props.defaultCurrentSectionName, moduleInfo: props.moduleInfo, modal: props.modal, data: formatColumn, onHide: props.onCloseWizard, onFinish: handleFinish, sections: [
101
+ {
102
+ title: 'Settings',
103
+ details: 'Enter Name and set Additional Properties',
104
+ isValid: (formatColumnData) => {
105
+ if (!formatColumnData.Name) {
106
+ return 'Format Column Name cannot be blank';
107
+ }
108
+ if (allFormatColumns.some((fc) => fc.Name === formatColumnData.Name && fc.Uuid !== formatColumnData.Uuid)) {
109
+ return 'A Format Column already exists with that name';
110
+ }
111
+ return true;
112
+ },
113
+ renderSummary: FormatColumnSettingsWizardSection_1.renderFormatColumnSettingsSummary,
114
+ render: () => {
115
+ return (React.createElement(Flex_1.Box, { className: "twa:p-2" },
116
+ React.createElement(FormatColumnSettingsWizardSection_1.FormatColumnSettingsWizardSection, { onChange: setFormatColumn })));
117
+ },
118
+ },
99
119
  {
100
120
  title: 'Scope',
101
121
  details: 'Select which Columns will be formatted',
@@ -146,15 +166,6 @@ function FormatColumnWizard(props) {
146
166
  return React.createElement(FormatColumnFormatWizardSection_1.FormatColumnFormatWizardSection, { onChange: setFormatColumn });
147
167
  },
148
168
  },
149
- {
150
- title: 'Settings',
151
- details: 'Set Additional Properties',
152
- renderSummary: FormatColumnSettingsWizardSection_1.renderFormatColumnSettingsSummary,
153
- render: () => {
154
- return (React.createElement(Flex_1.Box, { className: "twa:p-2" },
155
- React.createElement(FormatColumnSettingsWizardSection_1.FormatColumnSettingsWizardSection, { onChange: setFormatColumn })));
156
- },
157
- },
158
169
  {
159
170
  details: 'Select Format Column Tags',
160
171
  title: 'Tags',
@@ -3,84 +3,75 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.GridInfoPopup = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const React = tslib_1.__importStar(require("react"));
6
+ const ArrayExtensions_1 = tslib_1.__importDefault(require("../../../Utilities/Extensions/ArrayExtensions"));
7
+ const EnvVars_1 = require("../../../EnvVars");
8
+ const AgGridModulesAdapter_1 = require("../../../agGrid/AgGridModulesAdapter");
9
+ const InfiniteTable_1 = require("../../../components/InfiniteTable");
6
10
  const Panel_1 = tslib_1.__importDefault(require("../../../components/Panel"));
7
11
  const Tabs_1 = require("../../../components/Tabs");
8
- const ArrayExtensions_1 = tslib_1.__importDefault(require("../../../Utilities/Extensions/ArrayExtensions"));
9
- const Helper_1 = tslib_1.__importDefault(require("../../../Utilities/Helpers/Helper"));
10
- const AdaptablePopover_1 = require("../../AdaptablePopover");
11
- const AdaptableObjectCollection_1 = require("../../Components/AdaptableObjectCollection");
12
- const AdaptableObjectRow_1 = require("../../Components/AdaptableObjectRow");
13
12
  const PopupPanel_1 = require("../../Components/Popups/AdaptablePopup/PopupPanel");
14
13
  const AdaptableObjectsSummary_1 = require("./AdaptableObjectsSummary");
15
- const EnvVars_1 = require("../../../EnvVars");
16
- const AgGridModulesAdapter_1 = require("../../../agGrid/AgGridModulesAdapter");
17
14
  const clsx_1 = tslib_1.__importDefault(require("clsx"));
18
15
  const adaptableVersion = EnvVars_1.ADAPTABLE_VERSION;
19
16
  const agGridVersion = AgGridModulesAdapter_1.AG_GRID_VERSION;
20
17
  const GridInfoPopup = (props) => {
21
18
  const api = props.api;
22
- const CreateGridSummaries = (colItems) => {
23
- const returnRows = [];
24
- const calcColumns = api.calculatedColumnApi
25
- .getCalculatedColumns()
26
- .map((c) => c.ColumnId);
27
- const actionColumns = api.actionColumnApi
28
- .getActionColumns()
29
- .map((ac) => ac.columnId);
30
- const freeTextColumns = api.freeTextColumnApi
31
- .getFreeTextColumns()
32
- .map((c) => c.ColumnId);
33
- const columnFilterDescription = api.filterApi.columnFilterApi.columnFiltersToString(api.filterApi.columnFilterApi.getColumnFilters());
34
- const gridFilterExpression = api.filterApi.gridFilterApi.getCurrentGridFilterExpression();
35
- const sorts = ArrayExtensions_1.default.IsNotNullOrEmpty(props.api.gridApi.getColumnSorts())
36
- ? api.gridApi.getColumnSorts().map((gs) => {
37
- return api.columnApi.getFriendlyNameForColumnId(gs.ColumnId) + ': ' + gs.SortOrder;
38
- })
39
- : null;
40
- const selectedRowInfo = api.gridApi.getSelectedRowInfo();
41
- if (api.optionsApi.getUserInterfaceOptions()?.showAdapTableVersion) {
42
- returnRows.push(createReadOnlyColItem(colItems, 'AdapTable Version', adaptableVersion));
43
- }
44
- if (api.optionsApi.getUserInterfaceOptions()?.showAgGridVersion) {
45
- returnRows.push(createReadOnlyColItem(colItems, 'AG Grid Version', agGridVersion));
46
- }
47
- returnRows.push(createReadOnlyColItem(colItems, 'Sorted Columns', ArrayExtensions_1.default.IsNotNullOrEmpty(sorts) ? sorts.join('; ') : 'None'));
48
- returnRows.push(createReadOnlyColItem(colItems, 'Column Filters', columnFilterDescription));
49
- returnRows.push(createReadOnlyColItem(colItems, 'Grid Filter', gridFilterExpression));
50
- returnRows.push(createReadOnlyColItem(colItems, 'All Rows', props.api.gridApi.getRowCount()));
51
- returnRows.push(createReadOnlyColItem(colItems, 'Visible Rows', props.api.gridApi.getVisibleRowCount()));
52
- returnRows.push(createReadOnlyColItem(colItems, 'Selected Rows', selectedRowInfo?.gridRows.length));
53
- returnRows.push(createReadOnlyColItem(colItems, 'Visible Selected Rows', selectedRowInfo?.gridRows.filter((gr) => gr.rowNode?.displayed == true).length));
54
- returnRows.push(createReadOnlyColItem(colItems, 'All Columns', props.api.gridApi.getColumnCount()));
55
- returnRows.push(createReadOnlyColItem(colItems, 'Visible Columns', props.api.gridApi.getVisibleColumnCount()));
56
- returnRows.push(createReadOnlyColItem(colItems, 'Calculated Columns', ArrayExtensions_1.default.IsNotNullOrEmpty(calcColumns)
19
+ const keyValuePairs = [];
20
+ const calcColumns = api.calculatedColumnApi
21
+ .getCalculatedColumns()
22
+ .map((c) => c.ColumnId);
23
+ const actionColumns = api.actionColumnApi
24
+ .getActionColumns()
25
+ .map((ac) => ac.columnId);
26
+ const freeTextColumns = api.freeTextColumnApi
27
+ .getFreeTextColumns()
28
+ .map((c) => c.ColumnId);
29
+ const columnFilterDescription = api.filterApi.columnFilterApi.columnFiltersToString(api.filterApi.columnFilterApi.getColumnFilters());
30
+ const gridFilterExpression = api.filterApi.gridFilterApi.getCurrentGridFilterExpression();
31
+ const sorts = ArrayExtensions_1.default.IsNotNullOrEmpty(props.api.gridApi.getColumnSorts())
32
+ ? api.gridApi.getColumnSorts().map((gs) => {
33
+ return api.columnApi.getFriendlyNameForColumnId(gs.ColumnId) + ': ' + gs.SortOrder;
34
+ })
35
+ : null;
36
+ const selectedRowInfo = api.gridApi.getSelectedRowInfo();
37
+ if (api.optionsApi.getUserInterfaceOptions()?.showAdapTableVersion) {
38
+ keyValuePairs.push({ Key: 'AdapTable Version', Value: adaptableVersion });
39
+ }
40
+ if (api.optionsApi.getUserInterfaceOptions()?.showAgGridVersion) {
41
+ keyValuePairs.push({ Key: 'AG Grid Version', Value: agGridVersion });
42
+ }
43
+ keyValuePairs.push({ Key: 'Sorted Columns', Value: ArrayExtensions_1.default.IsNotNullOrEmpty(sorts) ? sorts.join('; ') : 'None' });
44
+ keyValuePairs.push({ Key: 'Column Filters', Value: columnFilterDescription });
45
+ keyValuePairs.push({ Key: 'Grid Filter', Value: gridFilterExpression });
46
+ keyValuePairs.push({ Key: 'All Rows', Value: props.api.gridApi.getRowCount() });
47
+ keyValuePairs.push({ Key: 'Visible Rows', Value: props.api.gridApi.getVisibleRowCount() });
48
+ keyValuePairs.push({ Key: 'Selected Rows', Value: selectedRowInfo?.gridRows.length });
49
+ keyValuePairs.push({ Key: 'Visible Selected Rows', Value: selectedRowInfo?.gridRows.filter((gr) => gr.rowNode?.displayed == true).length });
50
+ keyValuePairs.push({ Key: 'All Columns', Value: props.api.gridApi.getColumnCount() });
51
+ keyValuePairs.push({ Key: 'Visible Columns', Value: props.api.gridApi.getVisibleColumnCount() });
52
+ keyValuePairs.push({ Key: 'Calculated Columns', Value: ArrayExtensions_1.default.IsNotNullOrEmpty(calcColumns)
57
53
  ? ArrayExtensions_1.default.createCommaSeparatedString(calcColumns)
58
- : 'None'));
59
- returnRows.push(createReadOnlyColItem(colItems, 'Free Text Columns', ArrayExtensions_1.default.IsNotNullOrEmpty(freeTextColumns)
54
+ : 'None' });
55
+ keyValuePairs.push({ Key: 'Free Text Columns', Value: ArrayExtensions_1.default.IsNotNullOrEmpty(freeTextColumns)
60
56
  ? ArrayExtensions_1.default.createCommaSeparatedString(freeTextColumns)
61
- : 'None'));
62
- returnRows.push(createReadOnlyColItem(colItems, 'Action Columns', ArrayExtensions_1.default.IsNotNullOrEmpty(actionColumns)
57
+ : 'None' });
58
+ keyValuePairs.push({ Key: 'CalcuActionlated Columns', Value: ArrayExtensions_1.default.IsNotNullOrEmpty(actionColumns)
63
59
  ? ArrayExtensions_1.default.createCommaSeparatedString(actionColumns)
64
- : 'None'));
65
- return returnRows;
60
+ : 'None' });
61
+ const domProps = {
62
+ className: 'twa:flex-1 twa:min-h-0 twa:w-full',
66
63
  };
67
- const createReadOnlyColItem = (colItems, item1, item2, item3) => {
68
- let rowColItems = Helper_1.default.cloneObject(colItems);
69
- rowColItems[0].Content = item1;
70
- rowColItems[1].Content = item2;
71
- if (item3) {
72
- let infoButton = React.createElement(AdaptablePopover_1.AdaptablePopover, { headerText: null, bodyText: [item3] });
73
- rowColItems[2].Content = infoButton;
74
- }
75
- return rowColItems;
64
+ keyValuePairs.map((keyValuePair) => {
65
+ return {
66
+ Key: keyValuePair.Key,
67
+ Value: keyValuePair.Value === 'Ignore' ? null : keyValuePair.Value,
68
+ };
69
+ })
70
+ .filter((x) => x.Value);
71
+ const columnsMap = {
72
+ Key: { field: 'Key', header: 'Property', defaultFlex: 1 },
73
+ Value: { field: 'Value', header: 'Value', defaultFlex: 3 },
76
74
  };
77
- let propValueColItems = [
78
- { Content: 'Property', Size: 5 },
79
- { Content: 'Value', Size: 7 },
80
- ];
81
- let gridSummaries = CreateGridSummaries(propValueColItems).map((x, index) => {
82
- return React.createElement(AdaptableObjectRow_1.AdaptableObjectRow, { key: index, colItems: x });
83
- });
84
75
  const baseClassName = 'ab-GridInfo';
85
76
  return (React.createElement(PopupPanel_1.PopupPanel, { className: (0, clsx_1.default)(baseClassName), headerText: 'Grid Info', glyphicon: 'info', scrollable: false },
86
77
  React.createElement(Panel_1.default, { className: "twa:flex-1 twa:border-none twa:shadow-md twa:overflow-hidden" },
@@ -89,7 +80,8 @@ const GridInfoPopup = (props) => {
89
80
  React.createElement(Tabs_1.Tabs.Tab, null, "Grid Summary"),
90
81
  React.createElement(Tabs_1.Tabs.Tab, null, "Grid State"),
91
82
  React.createElement(Tabs_1.Tabs.Content, null,
92
- React.createElement(AdaptableObjectCollection_1.AdaptableObjectCollection, { className: "twa:flex-1 twa:min-h-0" /* so the collection scrolls nicely, the header remains fixed*/, colItems: propValueColItems, items: gridSummaries })),
83
+ React.createElement(InfiniteTable_1.DataSource, { data: keyValuePairs, primaryKey: "Key" },
84
+ React.createElement(InfiniteTable_1.InfiniteTableGrid, { domProps: domProps, columns: columnsMap }))),
93
85
  React.createElement(Tabs_1.Tabs.Content, null,
94
86
  React.createElement(AdaptableObjectsSummary_1.AdaptableObjectsSummary, { className: "twa:min-h-0 twa:overflow-auto twa:p-2" })))))));
95
87
  };