@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
@@ -1,9 +1,12 @@
1
1
  import * as React from 'react';
2
2
  import { AlertType } from '../Utilities/getAlertType';
3
+ import { AdaptableApi, AlertDefinition } from '../../../types';
4
+ export declare const isSettingsValid: (data: AlertDefinition, api: AdaptableApi) => true | "Name is required" | "An Alert already exists with that name";
3
5
  export declare const renderAlertTypeSummary: (alertType: AlertType) => React.JSX.Element;
4
- type AlertBehaviourWizardSectionProps = {
6
+ type AlertTypeWizardSectionProps = {
5
7
  onAlertTypeChange: (alertType: AlertType) => void;
6
8
  alertType: AlertType | null;
9
+ onChange: (data: AlertDefinition) => void;
7
10
  };
8
- export declare const AlertTypeWizardSection: (props: AlertBehaviourWizardSectionProps) => React.JSX.Element;
11
+ export declare const AlertTypeWizardSection: (props: AlertTypeWizardSectionProps) => React.JSX.Element;
9
12
  export {};
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AlertTypeWizardSection = exports.renderAlertTypeSummary = void 0;
3
+ exports.AlertTypeWizardSection = exports.renderAlertTypeSummary = exports.isSettingsValid = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const React = tslib_1.__importStar(require("react"));
6
6
  const Tabs_1 = require("../../../components/Tabs");
@@ -8,21 +8,57 @@ const getAlertType_1 = require("../Utilities/getAlertType");
8
8
  const TypeRadio_1 = require("../../Wizard/TypeRadio");
9
9
  const Tag_1 = require("../../../components/Tag");
10
10
  const Flex_1 = require("../../../components/Flex");
11
+ const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
12
+ const FormLayout_1 = tslib_1.__importStar(require("../../../components/FormLayout"));
13
+ const Input_1 = tslib_1.__importDefault(require("../../../components/Input"));
14
+ const OnePageAdaptableWizard_2 = require("../../Wizard/OnePageAdaptableWizard");
15
+ const isSettingsValid = (data, api) => {
16
+ if (!data.Name?.trim()) {
17
+ return 'Name is required';
18
+ }
19
+ const allAlerts = api.alertApi.getAlertDefinitions();
20
+ const isDuplicateName = allAlerts.some((a) => a.Name === data.Name && a.Uuid !== data.Uuid);
21
+ if (isDuplicateName) {
22
+ return 'An Alert already exists with that name';
23
+ }
24
+ return true;
25
+ };
26
+ exports.isSettingsValid = isSettingsValid;
11
27
  const renderAlertTypeSummary = (alertType) => {
28
+ const { data } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
12
29
  const text = (0, getAlertType_1.getAlertTypeText)(alertType);
13
- return (React.createElement(Flex_1.Box, null,
14
- React.createElement(Tag_1.Tag, null, text)));
30
+ return (React.createElement(React.Fragment, null,
31
+ React.createElement(OnePageAdaptableWizard_2.SummaryText, null,
32
+ "Name ",
33
+ React.createElement(Tag_1.Tag, null, data.Name || 'Not specified')),
34
+ React.createElement(OnePageAdaptableWizard_2.SummaryText, null,
35
+ "Type ",
36
+ React.createElement(Tag_1.Tag, null, text))));
15
37
  };
16
38
  exports.renderAlertTypeSummary = renderAlertTypeSummary;
17
39
  const AlertTypeWizardSection = (props) => {
18
- return (React.createElement(Tabs_1.Tabs, null,
19
- React.createElement(Tabs_1.Tabs.Tab, null, "Alert Type"),
20
- React.createElement(Tabs_1.Tabs.Content, null,
21
- React.createElement(Flex_1.Flex, { flexDirection: "column" },
22
- React.createElement(TypeRadio_1.TypeRadio, { text: (0, getAlertType_1.getAlertTypeText)(getAlertType_1.AlertType.DataChange), description: "A change has been made to the Grid's underlying data", checked: props.alertType === getAlertType_1.AlertType.DataChange, onClick: () => props.onAlertTypeChange(getAlertType_1.AlertType.DataChange) }),
23
- React.createElement(TypeRadio_1.TypeRadio, { text: (0, getAlertType_1.getAlertTypeText)(getAlertType_1.AlertType.RowChange), description: "A Row was added or removed from the data source", checked: props.alertType === getAlertType_1.AlertType.RowChange, onClick: () => props.onAlertTypeChange(getAlertType_1.AlertType.RowChange) }),
24
- React.createElement(TypeRadio_1.TypeRadio, { text: (0, getAlertType_1.getAlertTypeText)(getAlertType_1.AlertType.Aggregation), description: "A change has been made to aggregated data (i.e. from multiple Rows)", onClick: () => props.onAlertTypeChange(getAlertType_1.AlertType.Aggregation), checked: props.alertType === getAlertType_1.AlertType.Aggregation }),
25
- React.createElement(TypeRadio_1.TypeRadio, { text: (0, getAlertType_1.getAlertTypeText)(getAlertType_1.AlertType.Observable), description: "A specified change (or lack of change) over time has been observed in the Grid", onClick: () => props.onAlertTypeChange(getAlertType_1.AlertType.Observable), checked: props.alertType === getAlertType_1.AlertType.Observable }),
26
- React.createElement(TypeRadio_1.TypeRadio, { text: (0, getAlertType_1.getAlertTypeText)(getAlertType_1.AlertType.Validation), description: "A change has broken a data validation rule", checked: props.alertType === getAlertType_1.AlertType.Validation, onClick: () => props.onAlertTypeChange(getAlertType_1.AlertType.Validation) })))));
40
+ const { data } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
41
+ const handleNameChange = (event) => {
42
+ props.onChange({
43
+ ...data,
44
+ Name: event.target.value,
45
+ });
46
+ };
47
+ return (React.createElement(Flex_1.Flex, { flexDirection: "column" },
48
+ React.createElement(Tabs_1.Tabs, null,
49
+ React.createElement(Tabs_1.Tabs.Tab, null, "Settings"),
50
+ React.createElement(Tabs_1.Tabs.Content, null,
51
+ React.createElement(FormLayout_1.default, null,
52
+ React.createElement(FormLayout_1.FormRow, { label: "Name" },
53
+ React.createElement(Input_1.default, { "data-name": "alert-name", className: "twa:flex-1 twa:max-w-[200px] twa:mr-3", onChange: handleNameChange, placeholder: "Enter Name", value: data.Name ?? '' }))))),
54
+ React.createElement(Tabs_1.Tabs, { className: "twa:mt-2" },
55
+ React.createElement(Tabs_1.Tabs.Tab, null, "Alert Type"),
56
+ React.createElement(Tabs_1.Tabs.Content, null,
57
+ React.createElement(Flex_1.Flex, { flexDirection: "column" },
58
+ React.createElement(TypeRadio_1.TypeRadio, { text: (0, getAlertType_1.getAlertTypeText)(getAlertType_1.AlertType.DataChange), description: "A change has been made to the Grid's underlying data", checked: props.alertType === getAlertType_1.AlertType.DataChange, onClick: () => props.onAlertTypeChange(getAlertType_1.AlertType.DataChange) }),
59
+ React.createElement(TypeRadio_1.TypeRadio, { text: (0, getAlertType_1.getAlertTypeText)(getAlertType_1.AlertType.RowChange), description: "A Row was added or removed from the data source", checked: props.alertType === getAlertType_1.AlertType.RowChange, onClick: () => props.onAlertTypeChange(getAlertType_1.AlertType.RowChange) }),
60
+ React.createElement(TypeRadio_1.TypeRadio, { text: (0, getAlertType_1.getAlertTypeText)(getAlertType_1.AlertType.Aggregation), description: "A change has been made to aggregated data (i.e. from multiple Rows)", onClick: () => props.onAlertTypeChange(getAlertType_1.AlertType.Aggregation), checked: props.alertType === getAlertType_1.AlertType.Aggregation }),
61
+ React.createElement(TypeRadio_1.TypeRadio, { text: (0, getAlertType_1.getAlertTypeText)(getAlertType_1.AlertType.Observable), description: "A specified change (or lack of change) over time has been observed in the Grid", onClick: () => props.onAlertTypeChange(getAlertType_1.AlertType.Observable), checked: props.alertType === getAlertType_1.AlertType.Observable }),
62
+ React.createElement(TypeRadio_1.TypeRadio, { text: (0, getAlertType_1.getAlertTypeText)(getAlertType_1.AlertType.Validation), description: "A change has broken a data validation rule", checked: props.alertType === getAlertType_1.AlertType.Validation, onClick: () => props.onAlertTypeChange(getAlertType_1.AlertType.Validation) }))))));
27
63
  };
28
64
  exports.AlertTypeWizardSection = AlertTypeWizardSection;
@@ -29,7 +29,7 @@ const AlertWizard = (props) => {
29
29
  const { api } = (0, AdaptableContext_1.useAdaptable)();
30
30
  const dispatch = (0, react_redux_1.useDispatch)();
31
31
  const behaviourSpelling = api.internalApi.getCorrectEnglishVariant('Behaviour');
32
- const [alertDefinition, setAlertDefinition] = (0, react_1.useState)(() => {
32
+ const [alertDefinition, doSetAlertDefinition] = (0, react_1.useState)(() => {
33
33
  const alertDefinition = props.data
34
34
  ? (0, Helper_1.cloneObject)(props.data)
35
35
  : ObjectFactory_1.default.CreateEmptyAlertDefinition();
@@ -49,6 +49,9 @@ const AlertWizard = (props) => {
49
49
  alertDefinition.MessageType = alertDefinition.MessageType ?? ObjectDefaultConstants_1.ALERT_DEFAULT_MESSAGE_TYPE;
50
50
  return alertDefinition;
51
51
  });
52
+ const setAlertDefinition = (0, react_1.useCallback)((data) => {
53
+ doSetAlertDefinition(data);
54
+ }, []);
52
55
  // Alert type is based initialy on data, but can be changed by the user
53
56
  // the default objects do not neccesary have enough information to determine the type
54
57
  const [alertType, setAlertType] = (0, react_1.useState)(() => {
@@ -63,22 +66,23 @@ const AlertWizard = (props) => {
63
66
  }
64
67
  props.onCloseWizard();
65
68
  };
66
- const updateAlertDefinition = (newAlertDefinition) => {
67
- setAlertDefinition((0, mapAlertDefinition_1.mapAlertDefinition)(api, newAlertDefinition));
68
- };
69
+ const updateAlertDefinition = (0, react_1.useCallback)((newAlertDefinition) => {
70
+ doSetAlertDefinition((0, mapAlertDefinition_1.mapAlertDefinition)(api, newAlertDefinition));
71
+ }, [api]);
69
72
  const handleAlertTypeChange = (newAlertType) => {
70
73
  setAlertType(newAlertType);
71
- setAlertDefinition((0, getDefaultAlertDefinition_1.getDefaultAlertDefinition)(alertDefinition, newAlertType));
74
+ doSetAlertDefinition((0, getDefaultAlertDefinition_1.getDefaultAlertDefinition)(alertDefinition, newAlertType));
72
75
  };
73
76
  return (React.createElement(OnePageAdaptableWizard_1.OnePageAdaptableWizard, { defaultCurrentSectionName: props.defaultCurrentSectionName, moduleInfo: props.moduleInfo, modal: props.modal, data: alertDefinition, onHide: props.onCloseWizard, onFinish: handleFinish, sections: [
74
77
  {
75
- title: 'Type',
78
+ title: 'Name & Type',
79
+ isValid: AlertTypeWizardSection_1.isSettingsValid,
76
80
  details: (React.createElement(React.Fragment, null,
77
- "Select ",
81
+ "Enter Name and select ",
78
82
  React.createElement("b", null, "what"),
79
83
  " type of change in AdapTable will cause the Alert to fire")),
80
84
  render: () => (React.createElement(Flex_1.Box, { className: "twa:p-2" },
81
- React.createElement(AlertTypeWizardSection_1.AlertTypeWizardSection, { alertType: alertType, onAlertTypeChange: handleAlertTypeChange }))),
85
+ React.createElement(AlertTypeWizardSection_1.AlertTypeWizardSection, { alertType: alertType, onAlertTypeChange: handleAlertTypeChange, onChange: setAlertDefinition }))),
82
86
  renderSummary: () => (0, AlertTypeWizardSection_1.renderAlertTypeSummary)(alertType),
83
87
  },
84
88
  {
@@ -42,24 +42,36 @@ class BulkUpdateViewPanelComponent extends React.Component {
42
42
  let statusColour = this.getStatusColour();
43
43
  let selectedColumn = this.props.BulkUpdateValidationResult.Column;
44
44
  let previewPanel = (React.createElement(PreviewResultsPanel_1.PreviewResultsPanel, { previewInfo: this.props.PreviewInfo, api: this.props.api, selectedColumn: selectedColumn, showPanel: true, showHeader: false }));
45
- let shouldDisable = this.props.accessLevel == 'ReadOnly' ||
45
+ const valueSelectorDisabled = this.props.accessLevel == 'ReadOnly' ||
46
46
  !this.props.BulkUpdateValidationResult.IsValid ||
47
- this.props.api.layoutApi.isCurrentLayoutPivot() == true;
47
+ this.props.api.layoutApi.isCurrentLayoutPivot();
48
+ const valueOperationDisabled = valueSelectorDisabled ||
49
+ StringExtensions_1.StringExtensions.IsNullOrEmpty(this.props.BulkUpdateValue) ||
50
+ (this.props.PreviewInfo != null &&
51
+ this.props.PreviewInfo.previewValidationSummary.validationResult == 'All');
48
52
  const applyStyle = {
49
53
  color: statusColour,
50
54
  fill: 'currentColor',
51
55
  };
52
- const elementType = this.props.viewType === 'Toolbar' ? 'DashboardToolbar' : 'ToolPanel';
53
- return (React.createElement(Flex_1.Flex, { flexDirection: "row", className: (0, clsx_1.default)(shouldDisable ? GeneralConstants.READ_ONLY_STYLE : '', `ab-${elementType}__BulkUpdate__wrap twa:min-w-[150px]`), flexWrap: this.props.viewType === 'ToolPanel' ? 'wrap' : 'nowrap' },
54
- React.createElement(Flex_1.Flex, null,
56
+ const isToolbar = this.props.viewType === 'Toolbar';
57
+ const elementType = isToolbar ? 'DashboardToolbar' : 'ToolPanel';
58
+ const messageStyle = UIHelper_1.UIHelper.getMessageTypeByStatusColour(statusColour);
59
+ const infoStyle = messageStyle === 'Success' ? 'Info' : messageStyle;
60
+ return (React.createElement(Flex_1.Flex, { className: (0, clsx_1.default)(valueSelectorDisabled ? GeneralConstants.READ_ONLY_STYLE : '', `ab-${elementType}__BulkUpdate__wrap twa:gap-1 twa:flex-row`, {
61
+ 'twa:min-w-[300px] twa:max-w-[300px] twa:w-[300px] twa:flex-nowrap': isToolbar,
62
+ 'twa:flex-1 twa:flex-wrap': !isToolbar,
63
+ }), flexWrap: isToolbar ? 'nowrap' : 'wrap' },
64
+ React.createElement(Flex_1.Flex, { className: (0, clsx_1.default)('twa:flex-1', {
65
+ 'twa:min-w-[100px]': !isToolbar,
66
+ 'twa:min-w-0': isToolbar,
67
+ }) },
55
68
  React.createElement(BulkUpdateValueSelector_1.BulkUpdateValueSelector, { selectedGridCells: this.props.SelectedGridCells, newLabel: "New", existingLabel: "Existing", dropdownButtonProps: {
56
69
  listMinWidth: 160,
57
- }, className: `ab-${elementType}__BulkUpdate__select`, disabled: shouldDisable, selectedColumnValue: this.props.BulkUpdateValue, selectedColumn: selectedColumn, api: this.props.api, onColumnValueChange: (columns) => this.onColumnValueSelectedChanged(columns) })),
58
- React.createElement(Flex_1.Flex, null,
59
- !shouldDisable && StringExtensions_1.StringExtensions.IsNotNullOrEmpty(this.props.BulkUpdateValue) && (React.createElement(ButtonApply_1.ButtonApply, { className: `ab-${elementType}__BulkUpdate__apply twa:ml-2`, onClick: () => this.onApplyClick(), style: applyStyle, tooltip: "Apply Bulk Update", disabled: StringExtensions_1.StringExtensions.IsNullOrEmpty(this.props.BulkUpdateValue) ||
60
- (this.props.PreviewInfo != null &&
61
- this.props.PreviewInfo.previewValidationSummary.validationResult == 'All'), accessLevel: this.props.accessLevel }, this.props.viewType === 'ToolPanel' && 'Update')),
62
- !shouldDisable && StringExtensions_1.StringExtensions.IsNotNullOrEmpty(this.props.BulkUpdateValue) && (React.createElement(AdaptablePopover_1.AdaptablePopover, { popoverMinWidth: 360, className: `ab-${elementType}__BulkUpdate__info`, headerText: "Preview Results", bodyText: [previewPanel], MessageType: UIHelper_1.UIHelper.getMessageTypeByStatusColour(statusColour), useButton: true, showEvent: 'focus', hideEvent: "blur" })))));
70
+ }, className: `ab-${elementType}__BulkUpdate__select twa:w-full`, disabled: valueSelectorDisabled, selectedColumnValue: this.props.BulkUpdateValue, selectedColumn: selectedColumn, api: this.props.api, onColumnValueChange: (columns) => this.onColumnValueSelectedChanged(columns) })),
71
+ React.createElement(Flex_1.Flex, { className: "twa:flex-shrink-0 twa:gap-1" },
72
+ React.createElement(Flex_1.Flex, { className: "twa:flex twa:box-border twa:items-center" },
73
+ React.createElement(ButtonApply_1.ButtonApply, { className: `ab-${elementType}__BulkUpdate__apply twa:h-full`, onClick: () => this.onApplyClick(), style: applyStyle, tooltip: "Apply Bulk Update", disabled: valueOperationDisabled, accessLevel: this.props.accessLevel }, 'Apply')),
74
+ React.createElement(AdaptablePopover_1.AdaptablePopover, { popoverMinWidth: 360, className: `ab-${elementType}__BulkUpdate__info`, headerText: "Preview Results", bodyText: [previewPanel], MessageType: infoStyle, useButton: true, showEvent: 'focus', hideEvent: "blur", disabled: valueSelectorDisabled || StringExtensions_1.StringExtensions.IsNullOrEmpty(this.props.BulkUpdateValue) }))));
63
75
  }
64
76
  onColumnValueSelectedChanged(selectedColumnValue) {
65
77
  this.props.onBulkUpdateValueChange(selectedColumnValue);
@@ -22,11 +22,11 @@ const isValidCalculatedColumnExpression = (data, api) => {
22
22
  const calculatedColumnExpressionService = api.internalApi.getCalculatedColumnExpressionService();
23
23
  const expression = api.expressionApi.getAdaptableQueryExpression(data.Query)?.trim();
24
24
  if (!expression) {
25
- return 'Calculated column expression cannot be empty';
25
+ return 'Calculated Column Expression cannot be empty';
26
26
  }
27
27
  const isValid = calculatedColumnExpressionService.isCalculatedColumnQueryValid(data.Query);
28
28
  if (!isValid) {
29
- return 'Calculated column expression is not valid';
29
+ return 'Calculated Column Expression is not valid';
30
30
  }
31
31
  return true;
32
32
  };
@@ -13,6 +13,7 @@ const InternalRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/
13
13
  const react_redux_1 = require("react-redux");
14
14
  const Select_1 = require("../../components/Select");
15
15
  const Flex_1 = require("../../components/Flex");
16
+ const clsx_1 = tslib_1.__importDefault(require("clsx"));
16
17
  class CellSummaryViewPanelComponent extends React.Component {
17
18
  cleanupEvent;
18
19
  constructor(props) {
@@ -48,30 +49,27 @@ class CellSummaryViewPanelComponent extends React.Component {
48
49
  });
49
50
  let cellSummaryPopover = React.createElement(CellSummaryPopover_1.CellSummaryPopover, { CellSummary: this.props.CellSummary });
50
51
  let shouldDisable = this.props.accessLevel == 'ReadOnly' || this.props.CellSummary == null;
51
- const renderOperationValue = () => {
52
- if (shouldDisable) {
53
- return;
54
- }
55
- const operationValue = this.getOperationValue();
56
- if (operationValue == undefined) {
57
- return;
58
- }
59
- return this.props.viewType === 'ToolPanel' ? (React.createElement(Flex_1.Flex, { className: `ab-${elementType}__CellSummary__value twa:rounded-standard twa:mr-2 twa:p-2 twa:text-text-on-info twa:bg-info twa:text-2` }, operationValue)) : (React.createElement(Flex_1.Flex, { justifyContent: "center", className: `ab-${elementType}__CellSummary__value twa:flex-1 twa:mr-2 twa:ml-1 text-text-on-primary` }, operationValue));
60
- };
61
- const elementType = this.props.viewType === 'Toolbar' ? 'DashboardToolbar' : 'ToolPanel';
62
- return (React.createElement(Flex_1.Flex, { flexDirection: "row", className: shouldDisable ? GeneralConstants.READ_ONLY_STYLE : `ab-${elementType}__CellSummary__wrap`, flexWrap: this.props.viewType === 'ToolPanel' ? 'wrap' : 'nowrap' },
52
+ const isToolbar = this.props.viewType === 'Toolbar';
53
+ const elementType = isToolbar ? 'DashboardToolbar' : 'ToolPanel';
54
+ const operationValue = this.getOperationValue() ?? 'N/A';
55
+ return (React.createElement(Flex_1.Flex, { className: (0, clsx_1.default)(shouldDisable ? GeneralConstants.READ_ONLY_STYLE : '', `ab-${elementType}__CellSummary__wrap twa:gap-2 twa:flex-row`, {
56
+ 'twa:min-w-[215px] twa:max-w-[215px] twa:w-[215px] twa:flex-nowrap': isToolbar,
57
+ 'twa:flex-1 twa:flex-wrap': !isToolbar,
58
+ }) },
63
59
  React.createElement(Flex_1.Flex, { className: "twa:flex-1" },
64
60
  React.createElement(Select_1.Select, { "aria-label": "Cell Summary Operation Selector", className: `ab-${elementType}__CellSummary__select twa:w-full`, disabled: shouldDisable, options: [...operationMenuItems, ...operationDefinitions], onChange: (x) => this.props.onCellSummaryOperationChange(x), value: this.props.CellSummaryOperation })),
65
- React.createElement(Flex_1.Flex, { alignItems: "center", className: "twa:ml-2" }, React.createElement(React.Fragment, null,
66
- renderOperationValue(),
67
- this.props.CellSummary != null && this.props.CellSummary.Count > 0 && (React.createElement(AdaptablePopover_1.AdaptablePopover, { popoverMaxWidth: 360, className: "ab-ToolPanel__CellSummary__info", bodyText: [cellSummaryPopover], useButton: true, showEvent: 'focus', hideEvent: "blur", tooltipText: 'Show Cell Summaries' }))))));
61
+ React.createElement(Flex_1.Flex, { className: "twa:items-center twa:gap-1" }, React.createElement(React.Fragment, null,
62
+ React.createElement(Flex_1.Flex, { className: (0, clsx_1.default)(`ab-${elementType}__CellSummary__value twa:min-w-[50px]`, {
63
+ 'twa:rounded-standard twa:text-color-text-on-info twa:bg-color-info twa:text-2': !isToolbar,
64
+ 'twa:flex-1 twa:text-color-text-on-primary twa:justify-center': isToolbar,
65
+ }) }, operationValue),
66
+ React.createElement(AdaptablePopover_1.AdaptablePopover, { popoverMaxWidth: 360, className: "ab-ToolPanel__CellSummary__info", bodyText: [cellSummaryPopover], useButton: true, showEvent: 'focus', hideEvent: "blur", tooltipText: 'Show Cell Summaries', disabled: !this.props.CellSummary?.Count })))));
68
67
  }
69
68
  checkSelectedCells() {
70
69
  this.props.onCreateCellSummary();
71
70
  }
72
71
  getOperationValue() {
73
- const api = this.props.api;
74
- return api.cellSummaryApi.getCellSummaryOperationValue(this.props.CellSummaryOperation);
72
+ return this.props.api.cellSummaryApi.getCellSummaryOperationValue(this.props.CellSummaryOperation);
75
73
  }
76
74
  }
77
75
  function mapStateToProps(state, ownProps) {
@@ -11,7 +11,7 @@ const AdaptableDateInput = React.forwardRef(function AdaptableDateInputCmp(props
11
11
  const { value: _, defaultValue: __, onChange, required, disabled, showClearButton, ...inputProps } = props;
12
12
  const [value, setValue] = (0, useProperty_1.default)(props, 'value', undefined, {
13
13
  onChange: (dateString) =>
14
- // wrap date value in FormEvent in order to keep the external API unchanged
14
+ // wrap date value in ChangeEvent in order to keep the external API unchanged
15
15
  props.onChange?.({
16
16
  target: {
17
17
  // ALWAYS trigger onChange with the ISO format
@@ -6,7 +6,7 @@ const React = tslib_1.__importStar(require("react"));
6
6
  const SimpleButton_1 = tslib_1.__importDefault(require("../../../components/SimpleButton"));
7
7
  class ButtonApply extends React.Component {
8
8
  render() {
9
- return (React.createElement(SimpleButton_1.default, { "data-name": "apply", tooltip: "Apply", iconSize: 20, icon: "check", variant: "text", ...this.props }));
9
+ return (React.createElement(SimpleButton_1.default, { "data-name": "apply", tooltip: "Apply", iconSize: 20, icon: "check", variant: "outlined", ...this.props }));
10
10
  }
11
11
  }
12
12
  exports.ButtonApply = ButtonApply;
@@ -3,6 +3,7 @@ import { SimpleButtonProps } from '../../../components/SimpleButton';
3
3
  export interface ClearButtonProps extends SimpleButtonProps {
4
4
  showText?: boolean;
5
5
  showIcon?: boolean;
6
+ variant?: SimpleButtonProps['variant'];
6
7
  }
7
8
  export declare class ButtonClear extends React.Component<ClearButtonProps, {}> {
8
9
  render(): React.JSX.Element;
@@ -2,8 +2,7 @@ import * as React from 'react';
2
2
  import * as Redux from 'redux';
3
3
  import { AccessLevel } from '../../../AdaptableState/Common/Entitlement';
4
4
  import { AdaptableSharedEntityConfig } from '../../../AdaptableState/TeamSharingState';
5
- import { AdaptableObject } from '../../../AdaptableState/Common/AdaptableObject';
6
- import { SuspendableObject } from '../../../AdaptableState/Common/SuspendableObject';
5
+ import { AdaptableObject, SuspendableObject } from '../../../AdaptableState/Common/AdaptableObject';
7
6
  export interface EntityListActionButtonsProps extends React.ClassAttributes<EntityListActionButtons> {
8
7
  editClick?: () => void;
9
8
  cloneClick?: () => void;
@@ -1,7 +1,6 @@
1
1
  import * as React from 'react';
2
- import { AdaptableObject } from '../../../../AdaptableState/Common/AdaptableObject';
2
+ import { AdaptableObject, SuspendableObject } from '../../../../AdaptableState/Common/AdaptableObject';
3
3
  import { AccessLevel } from '../../../../AdaptableState/Common/Entitlement';
4
- import { SuspendableObject } from '../../../../AdaptableState/Common/SuspendableObject';
5
4
  interface EntityListSuspendButtonProps {
6
5
  onSuspend: (adaptableObject: AdaptableObject) => void;
7
6
  onUnSuspend: (adaptableObject: AdaptableObject) => void;
@@ -3,15 +3,16 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.BulkUpdateValueSelector = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const React = tslib_1.__importStar(require("react"));
6
- const FieldWrap_1 = tslib_1.__importDefault(require("../../../components/FieldWrap"));
6
+ const react_1 = require("react");
7
+ const DropdownButton_1 = tslib_1.__importDefault(require("../../../components/DropdownButton"));
7
8
  const UIHelper_1 = tslib_1.__importDefault(require("../../UIHelper"));
8
9
  const AdaptableInput_1 = tslib_1.__importDefault(require("../AdaptableInput"));
9
10
  const PermittedValuesSelector_1 = require("./PermittedValuesSelector");
10
- const Select_1 = require("../../../components/Select");
11
11
  const AdaptableContext_1 = require("../../AdaptableContext");
12
- const react_1 = require("react");
13
12
  const clsx_1 = tslib_1.__importDefault(require("clsx"));
14
13
  const Flex_1 = require("../../../components/Flex");
14
+ const icons_1 = require("../../../components/icons");
15
+ const InputGroup_1 = require("../../../components/InputGroup");
15
16
  const BulkUpdateValueSelector = (props) => {
16
17
  const [valueType, setValueType] = React.useState('existing');
17
18
  const adaptable = (0, AdaptableContext_1.useAdaptable)();
@@ -21,8 +22,8 @@ const BulkUpdateValueSelector = (props) => {
21
22
  // TODO = this seems to be called whenever we edit a cell
22
23
  // which is then triggering a get all values
23
24
  // not sure that we need to
24
- const permittedValueSelector = (React.createElement(Flex_1.Box, null,
25
- React.createElement(PermittedValuesSelector_1.PermittedValuesSelector, { allowNewValues: true, searchable: 'inline', disabled: props.disabled || !props.selectedColumn, value: props.selectedColumnValue === '' ? null : props.selectedColumnValue, columnId: columnId, placeholder: isDateType ? 'Select' : 'Select or type new value', loadValues: (0, react_1.useCallback)(({ currentSearchValue }) => {
25
+ const permittedValueSelector = (React.createElement(Flex_1.Box, { className: 'twa:flex-1' },
26
+ React.createElement(PermittedValuesSelector_1.PermittedValuesSelector, { allowNewValues: true, searchable: 'inline', disabled: props.disabled || !props.selectedColumn, value: props.selectedColumnValue === '' ? null : props.selectedColumnValue, columnId: columnId, placeholder: 'Select value', loadValues: (0, react_1.useCallback)(({ currentSearchValue }) => {
26
27
  if (!columnId || !props.selectedGridCells.length) {
27
28
  return Promise.resolve([]);
28
29
  }
@@ -45,17 +46,17 @@ const BulkUpdateValueSelector = (props) => {
45
46
  : 'Enter Value', autoFocus: true, disabled: props.disabled, className: "twa:w-full", value: props.selectedColumnValue, onChange: (e) => {
46
47
  props.onColumnValueChange(e.target.value);
47
48
  } }));
48
- let valueTypeSelector = null;
49
- if (isDateType) {
50
- valueTypeSelector = (React.createElement(Select_1.Select, { "aria-label": "Bulk Update Value Selector", options: [
51
- { label: 'New', value: 'new' },
52
- { label: 'Existing', value: 'existing' },
53
- ], value: valueType, onChange: (value) => {
54
- setValueType(value);
55
- } }));
56
- }
57
- return (React.createElement(FieldWrap_1.default, { className: (0, clsx_1.default)('twa:overflow-visible twa:max-w-full', props.className), style: props.style }, isDateType ? (React.createElement(React.Fragment, null,
58
- valueType === 'new' ? input : permittedValueSelector,
59
- valueTypeSelector)) : (permittedValueSelector)));
49
+ return (React.createElement(Flex_1.Flex, { className: (0, clsx_1.default)('twa:overflow-visible twa:max-w-full', props.className), style: props.style }, isDateType ? (React.createElement(React.Fragment, null,
50
+ React.createElement(InputGroup_1.InputGroup, { Component: Flex_1.Flex, "data-id": "bulk-update-input-wrapper", className: "twa:w-full" },
51
+ React.createElement(DropdownButton_1.default, { "aria-label": "Bulk Update Value Selector", "data-id": "bulk-update-value-type-selector", "data-value": valueType, columns: ['label'], variant: "outlined", tone: "neutral", items: [
52
+ { label: 'New', icon: React.createElement(icons_1.Icon, { name: "edit" }), onClick: () => setValueType('new') },
53
+ {
54
+ label: 'Existing',
55
+ icon: React.createElement(icons_1.Icon, { name: "grid" }),
56
+ onClick: () => setValueType('existing'),
57
+ },
58
+ ] },
59
+ React.createElement(React.Fragment, null, valueType === 'existing' ? React.createElement(icons_1.Icon, { name: "grid" }) : React.createElement(icons_1.Icon, { name: "edit" }))),
60
+ valueType === 'new' ? input : permittedValueSelector))) : (permittedValueSelector)));
60
61
  };
61
62
  exports.BulkUpdateValueSelector = BulkUpdateValueSelector;
@@ -133,6 +133,14 @@ const StyleComponent = (props) => {
133
133
  }
134
134
  setComponentStyle(newStyle);
135
135
  };
136
+ const onAlignmentChange = (alignment) => {
137
+ const newStyle = { ...componentStyle };
138
+ newStyle.Alignment = alignment;
139
+ if (alignment == 'Default') {
140
+ delete newStyle.Alignment;
141
+ }
142
+ setComponentStyle(newStyle);
143
+ };
136
144
  const Cmp = props.headless ? Flex_1.Box : Panel_1.default;
137
145
  const headerText = props.headerText ?? 'Style';
138
146
  const cmpProps = props.headless
@@ -220,7 +228,18 @@ const StyleComponent = (props) => {
220
228
  ], value: componentStyle.FontSize?.toString() ?? '', onChange: (value) => onFontSizeChange(value) }))) : (React.createElement(Flex_1.Flex, { flexDirection: "row", alignItems: "center", className: "twa:gap-2 twa:flex-wrap" }, fontSizes.map((enumName) => {
221
229
  return (React.createElement(Radio_1.default, { onClick: () => onFontSizeChange(enumName), checked: (enumName == 'Default' && !componentStyle.FontSize) ||
222
230
  componentStyle.FontSize === enumName, key: enumName }, enumName));
223
- }))))))),
231
+ }))),
232
+ React.createElement("span", null, "Alignment"),
233
+ React.createElement(Toggle_1.ToggleGroup, null,
234
+ React.createElement(Toggle_1.Toggle, { icon: "align-left", pressed: componentStyle.Alignment === 'Left', onPressedChange: (pressed) => pressed
235
+ ? onAlignmentChange('Left')
236
+ : onAlignmentChange('Default') }),
237
+ React.createElement(Toggle_1.Toggle, { icon: "align-center", pressed: componentStyle.Alignment === 'Center', onPressedChange: (pressed) => pressed
238
+ ? onAlignmentChange('Center')
239
+ : onAlignmentChange('Default') }),
240
+ React.createElement(Toggle_1.Toggle, { icon: "align-right", pressed: componentStyle.Alignment === 'Right', onPressedChange: (pressed) => pressed
241
+ ? onAlignmentChange('Right')
242
+ : onAlignmentChange('Default') })))))),
224
243
  !props.hidePreview && (React.createElement(Card_1.Card, { shadow: false },
225
244
  React.createElement(Card_1.Card.Title, null, "Preview"),
226
245
  React.createElement(Card_1.Card.Body, { className: "twa:grid twa:place-items-center" },
@@ -3,7 +3,8 @@ import { CustomSort } from '../../../AdaptableState/CustomSortState';
3
3
  export type CustomSortColumnWizardSectionProps = {
4
4
  onChange: (data: CustomSort) => void;
5
5
  isNew: boolean;
6
+ allCustomSorts: CustomSort[];
6
7
  };
7
8
  export declare const renderCustomSortColumn: (data: CustomSort) => React.JSX.Element;
8
- export declare const isValidCustomSortColumn: (data: CustomSort) => true | string;
9
+ export declare const isValidCustomSortColumn: (data: CustomSort, allCustomSorts: CustomSort[]) => true | string;
9
10
  export declare const CustomSortColumnWizardSection: (props: CustomSortColumnWizardSectionProps) => React.JSX.Element;
@@ -8,14 +8,26 @@ const Tag_1 = require("../../../components/Tag");
8
8
  const ColumnSelector_1 = require("../../Components/ColumnSelector");
9
9
  const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
10
10
  const Flex_1 = require("../../../components/Flex");
11
+ const FormLayout_1 = tslib_1.__importStar(require("../../../components/FormLayout"));
12
+ const Input_1 = tslib_1.__importDefault(require("../../../components/Input"));
11
13
  const renderCustomSortColumn = (data) => {
12
14
  const { api } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
13
15
  return (React.createElement(Flex_1.Box, { className: "twa:text-2 twa:py-2 twa:pr-2" },
14
- "Custom sort column: ",
15
- React.createElement(Tag_1.Tag, null, api.columnApi.getFriendlyNameForColumnId(data.ColumnId))));
16
+ React.createElement(Tag_1.Tag, { className: "twa:mr-2" },
17
+ "Name: ",
18
+ data.Name),
19
+ React.createElement(Tag_1.Tag, null,
20
+ "Column: ",
21
+ api.columnApi.getFriendlyNameForColumnId(data.ColumnId))));
16
22
  };
17
23
  exports.renderCustomSortColumn = renderCustomSortColumn;
18
- const isValidCustomSortColumn = (data) => {
24
+ const isValidCustomSortColumn = (data, allCustomSorts) => {
25
+ if (!data.Name) {
26
+ return 'Custom Sort Name cannot be blank';
27
+ }
28
+ if (allCustomSorts.some((customSort) => customSort.Name === data.Name && customSort.Uuid !== data.Uuid)) {
29
+ return 'A Custom Sort already exists with that name';
30
+ }
19
31
  if (!data.ColumnId) {
20
32
  return 'You have to select a Column for Custom Sort';
21
33
  }
@@ -48,15 +60,29 @@ const CustomSortColumnWizardSection = (props) => {
48
60
  });
49
61
  });
50
62
  }, []);
51
- return (React.createElement(Tabs_1.Tabs, { style: { height: '100%' } },
52
- React.createElement(Tabs_1.Tabs.Tab, null, "Column"),
53
- React.createElement(Tabs_1.Tabs.Content, null,
54
- React.createElement(ColumnSelector_1.NewColumnSelector, { availableColumns: sortableCols, selected: data.ColumnId ? [data.ColumnId] : [], singleSelect: true, onChange: (ids) => {
55
- props.onChange({
56
- ...data,
57
- SortedValues: [],
58
- ColumnId: ids[0],
59
- });
60
- }, allowReorder: false }))));
63
+ const onNameChange = (event) => {
64
+ props.onChange({
65
+ ...data,
66
+ Name: event.target.value,
67
+ });
68
+ };
69
+ return (React.createElement(Flex_1.Flex, { flexDirection: "column", style: { height: '100%' } },
70
+ React.createElement(Tabs_1.Tabs, { className: "twa:mb-3" },
71
+ React.createElement(Tabs_1.Tabs.Tab, null, "Settings"),
72
+ React.createElement(Tabs_1.Tabs.Content, null,
73
+ React.createElement(Flex_1.Flex, { flexDirection: "row" },
74
+ React.createElement(FormLayout_1.default, { className: "twa:max-w-[300px] twa:w-full" },
75
+ React.createElement(FormLayout_1.FormRow, { label: "Name" },
76
+ React.createElement(Input_1.default, { className: "twa:w-full", "data-name": "custom-sort-name", onChange: onNameChange, value: data?.Name ?? '' })))))),
77
+ React.createElement(Tabs_1.Tabs, { style: { flex: 1, minHeight: 0 } },
78
+ React.createElement(Tabs_1.Tabs.Tab, null, "Column"),
79
+ React.createElement(Tabs_1.Tabs.Content, null,
80
+ React.createElement(ColumnSelector_1.NewColumnSelector, { availableColumns: sortableCols, selected: data.ColumnId ? [data.ColumnId] : [], singleSelect: true, onChange: (ids) => {
81
+ props.onChange({
82
+ ...data,
83
+ SortedValues: [],
84
+ ColumnId: ids[0],
85
+ });
86
+ }, allowReorder: false })))));
61
87
  };
62
88
  exports.CustomSortColumnWizardSection = CustomSortColumnWizardSection;
@@ -41,14 +41,14 @@ const CustomSortWizard = (props) => {
41
41
  };
42
42
  return (React.createElement(OnePageAdaptableWizard_1.OnePageAdaptableWizard, { defaultCurrentSectionName: props.defaultCurrentSectionName, moduleInfo: props.moduleInfo, data: customSort, onFinish: handleFinish, onHide: props.onCloseWizard, sections: [
43
43
  {
44
- isValid: CustomSortColumnWizardSection_1.isValidCustomSortColumn,
44
+ isValid: (data) => (0, CustomSortColumnWizardSection_1.isValidCustomSortColumn)(data, allCustomSorts),
45
45
  renderSummary: CustomSortColumnWizardSection_1.renderCustomSortColumn,
46
- details: 'Select a Column for Custom Sort',
46
+ details: 'Enter Name and select a Column for Custom Sort',
47
47
  render: () => {
48
48
  return (React.createElement(Flex_1.Box, { className: "twa:p-2 twa:h-full" },
49
- React.createElement(CustomSortColumnWizardSection_1.CustomSortColumnWizardSection, { isNew: props.isNew, onChange: setCustomSort })));
49
+ React.createElement(CustomSortColumnWizardSection_1.CustomSortColumnWizardSection, { isNew: props.isNew, onChange: setCustomSort, allCustomSorts: allCustomSorts })));
50
50
  },
51
- title: 'Column',
51
+ title: 'Name & Column',
52
52
  },
53
53
  {
54
54
  title: 'Sort Order',
@@ -73,18 +73,17 @@ class DashboardPopupComponent extends React.Component {
73
73
  React.createElement(Flex_1.Flex, { flexDirection: "column", className: "twa:h-full twa:gap-4" },
74
74
  areDashboardSettingsVisible && (React.createElement(React.Fragment, null,
75
75
  React.createElement(Card_1.Card, null,
76
- React.createElement(Card_1.Card.Title, { gap: 8 },
77
- "Display Settings",
78
- React.createElement(ToggleButton_1.ToggleButton, { className: "twa:self-end", onChange: (visible) => this.props.onSetDashboardHidden(!visible), checked: !this.props.IsHidden, "data-name": "dashboard-visibility" }, this.props.IsHidden ? 'Hidden' : 'Visible')),
76
+ React.createElement(Card_1.Card.Title, { gap: 8 }, "Display Settings"),
79
77
  React.createElement(Card_1.Card.Body, { gap: 2, className: "twa:p-2" },
80
- React.createElement(ToggleButton_1.ToggleButton, { disabled: this.props.IsFloating, className: "twa:w-24", onChange: (expanded) => this.props.onSetDashboardCollapsed(!expanded), checked: !this.props.IsCollapsed, "data-name": "expand-state" }, this.props.IsCollapsed ? 'Collapsed' : 'Expanded'),
78
+ React.createElement(ToggleButton_1.ToggleButton, { className: "twa:w-24", onChange: (visible) => this.props.onSetDashboardHidden(!visible), checked: !this.props.IsHidden, "data-name": "dashboard-visibility" }, this.props.IsHidden ? 'Hidden' : 'Visible'),
79
+ this.props.DashboardState.Tabs?.length > 0 ? (React.createElement(ToggleButton_1.ToggleButton, { disabled: this.props.IsFloating, className: "twa:w-24", onChange: (expanded) => this.props.onSetDashboardCollapsed(!expanded), checked: !this.props.IsCollapsed, "data-name": "expand-state" }, this.props.IsCollapsed ? 'Collapsed' : 'Expanded')) : null,
81
80
  this.props.api.optionsApi.getDashboardOptions().canFloat ? (React.createElement(ToggleButton_1.ToggleButton, { className: "twa:w-24", onChange: (pinned) => this.props.onSetDashboardFloating(!pinned), checked: !this.props.IsFloating, "data-name": "floating" }, this.props.IsFloating ? 'Floating' : 'Pinned')) : null)))),
82
81
  React.createElement(Card_1.Card, { className: "twa:flex-1 twa:overflow-hidden", gap: 0 },
83
82
  React.createElement(Card_1.Card.Title, null, "Contents"),
84
83
  React.createElement(Card_1.Card.Body, { className: "twa:p-2" },
85
84
  React.createElement(Tabs_1.Tabs, { className: "twa:flex-1 twa:min-h-0" },
86
85
  React.createElement(Tabs_1.Tabs.Tab, { value: "pinned-toolbars" }, "Pinned Toolbars"),
87
- React.createElement(Tabs_1.Tabs.Tab, { value: "tabbed-toolbars" }, "Tabbed Toolbars"),
86
+ React.createElement(Tabs_1.Tabs.Tab, { value: "tabbed-toolbars" }, "Tabs & Toolbars"),
88
87
  React.createElement(Tabs_1.Tabs.Tab, { value: "buttons" }, "Buttons"),
89
88
  React.createElement(Tabs_1.Tabs.Content, { value: "pinned-toolbars", className: contentCls },
90
89
  React.createElement(PinnedToolbarsSelector_1.PinnedToolbarsSelector, null)),
@@ -165,6 +165,7 @@ const buildAdaptableOptions = (mainAdaptableInstance, adaptableContainerId, agGr
165
165
  Revision: Date.now(),
166
166
  FormatColumns: [
167
167
  {
168
+ Name: 'Changed At',
168
169
  Scope: {
169
170
  ColumnIds: ['changeInfo.changedAt'],
170
171
  },
@@ -16,7 +16,7 @@ const ExportDestinationPicker = ({ reportName, reportFormat, viewType, }) => {
16
16
  };
17
17
  const supportedDestinations = exportApi.getSupportedExportDestinations(reportFormat);
18
18
  if (supportedDestinations.length === 0 || supportedDestinations.length === 1) {
19
- return (react_1.default.createElement(ButtonExport_1.ButtonExport, { className: (0, clsx_1.default)(viewType !== 'StatusBar' ? 'twa:mr-[20px]' : undefined, 'twa:pr-0'), onClick: () => handleExport(supportedDestinations[0]), tooltip: "Export Report", disabled: reportName == undefined || reportFormat == undefined }));
19
+ return (react_1.default.createElement(ButtonExport_1.ButtonExport, { className: (0, clsx_1.default)(viewType !== 'StatusBar' ? '' : undefined, ''), onClick: () => handleExport(supportedDestinations[0]), tooltip: "Export Report", disabled: reportName == undefined || reportFormat == undefined }));
20
20
  }
21
21
  const destinationItems = supportedDestinations.map((destination) => ({
22
22
  label: destination,
@@ -8,14 +8,16 @@ const ReportNameSelector_1 = require("./ReportNameSelector");
8
8
  const ReportFormatSelector_1 = require("./ReportFormatSelector");
9
9
  const ExportDestinationPicker_1 = require("./ExportDestinationPicker");
10
10
  const AdaptableContext_1 = require("../AdaptableContext");
11
+ const Flex_1 = require("../../components/Flex");
11
12
  const ExportStatusBar = () => {
12
13
  const adaptable = (0, AdaptableContext_1.useAdaptable)();
13
14
  const exportApi = adaptable.api.exportApi;
14
15
  const currentReportName = (0, react_redux_1.useSelector)((state) => state.Export.CurrentReport);
15
16
  const currentFormat = (0, react_redux_1.useSelector)((state) => state.Export.CurrentFormat);
16
17
  return (react_1.default.createElement(react_1.default.Fragment, null,
17
- react_1.default.createElement(ReportNameSelector_1.ReportNameSelector, { viewType: "StatusBar", size: 'small', reportName: currentReportName, onReportNameSelected: (reportName) => exportApi.selectReport(reportName) }),
18
- react_1.default.createElement(ReportFormatSelector_1.ReportFormatSelector, { viewType: "StatusBar", size: 'small', reportName: currentReportName, reportFormat: currentFormat, onReportFormatSelected: (reportFormat) => exportApi.selectFormat(reportFormat) }),
18
+ react_1.default.createElement(Flex_1.Flex, { className: "twa:gap-1" },
19
+ react_1.default.createElement(ReportNameSelector_1.ReportNameSelector, { viewType: "StatusBar", reportName: currentReportName, onReportNameSelected: (reportName) => exportApi.selectReport(reportName) }),
20
+ react_1.default.createElement(ReportFormatSelector_1.ReportFormatSelector, { viewType: "StatusBar", reportName: currentReportName, reportFormat: currentFormat, onReportFormatSelected: (reportFormat) => exportApi.selectFormat(reportFormat) })),
19
21
  react_1.default.createElement(ExportDestinationPicker_1.ExportDestinationPicker, { viewType: "StatusBar", reportName: currentReportName, reportFormat: currentFormat })));
20
22
  };
21
23
  exports.ExportStatusBar = ExportStatusBar;