@adaptabletools/adaptable 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 +16 -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 +47 -12
  72. package/src/View/Alert/Wizard/AlertWizard.js +14 -10
  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 +19 -18
  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 +40 -14
  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 +34 -14
  93. package/src/View/FlashingCell/Wizard/FlashingCellWizard.js +14 -10
  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 +20 -9
  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 +15 -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 +187 -0
  128. package/src/types.d.ts +2 -3
  129. package/tsconfig.esm.tsbuildinfo +1 -1
  130. package/src/AdaptableState/Common/SuspendableObject.d.ts +0 -10
  131. package/src/AdaptableState/Common/SuspendableObject.js +0 -1
@@ -1,6 +1,5 @@
1
1
  import * as React from 'react';
2
2
  import Input from '../../../components/Input';
3
- import Radio from '../../../components/Radio';
4
3
  import FormLayout, { FormRow } from '../../../components/FormLayout';
5
4
  import { Tabs } from '../../../components/Tabs';
6
5
  import { useOnePageAdaptableWizardContext, } from '../../Wizard/OnePageAdaptableWizard';
@@ -12,12 +11,26 @@ import { Flex } from '../../../components/Flex';
12
11
  export const PlusMinusSettingsSummary = (props) => {
13
12
  const { data } = useOnePageAdaptableWizardContext();
14
13
  return (React.createElement(React.Fragment, null,
14
+ React.createElement(SummaryText, null,
15
+ "Name ",
16
+ React.createElement(Tag, null, data.Name || 'Not specified')),
15
17
  React.createElement(SummaryText, null,
16
18
  "Nudge Value ",
17
19
  React.createElement(Tag, null, data.NudgeValue ?? 'Not selected')),
20
+ React.createElement(SummaryText, null,
21
+ "Nudge Type ",
22
+ React.createElement(Tag, null, props.hasCondition ? 'Conditional' : 'Always Apply')),
18
23
  props.hasCondition && React.createElement(PlusMinusRuleSummary, null)));
19
24
  };
20
25
  export const isSettingsValid = (hasCondition) => (data, api, context) => {
26
+ if (!data.Name?.trim()) {
27
+ return 'Name is required';
28
+ }
29
+ const allPlusMinusNudges = api.plusMinusApi.getAllPlusMinus();
30
+ const isDuplicateName = allPlusMinusNudges.some((nudge) => nudge.Name === data.Name && nudge.Uuid !== data.Uuid);
31
+ if (isDuplicateName) {
32
+ return 'A Plus Minus Nudge already exists with that name';
33
+ }
21
34
  if (hasCondition) {
22
35
  if (!data?.Rule?.BooleanExpression) {
23
36
  return 'No valid Rule is specified';
@@ -37,6 +50,12 @@ export const isSettingsValid = (hasCondition) => (data, api, context) => {
37
50
  };
38
51
  export const PlusMinusSettingsWizardSection = (props) => {
39
52
  const { data } = useOnePageAdaptableWizardContext();
53
+ const handleNameChange = (event) => {
54
+ props.onChange({
55
+ ...data,
56
+ Name: event.target.value,
57
+ });
58
+ };
40
59
  const handleNudgeValueChange = (event) => {
41
60
  const newValue = parseFloat(event.target.value);
42
61
  props.onChange({
@@ -45,15 +64,19 @@ export const PlusMinusSettingsWizardSection = (props) => {
45
64
  });
46
65
  };
47
66
  return (React.createElement(Flex, { flexDirection: "column", "data-name": "plus-minus-column-settings", className: "twa:h-full" },
48
- React.createElement(Tabs, { autoFocus: false, className: "twa:p-2" },
49
- React.createElement(Tabs.Tab, null, "Plus Minus Settings"),
67
+ React.createElement(Tabs, { className: "twa:p-2" },
68
+ React.createElement(Tabs.Tab, null, "Settings"),
50
69
  React.createElement(Tabs.Content, null,
51
70
  React.createElement(FormLayout, null,
71
+ React.createElement(FormRow, { label: "Name" },
72
+ React.createElement(Input, { "data-name": "plus-minus-name", className: "twa:flex-1 twa:mr-3", onChange: handleNameChange, placeholder: "Enter Name", value: data.Name ?? '' })),
52
73
  React.createElement(FormRow, { label: "Nudge Value" },
53
- React.createElement(Input, { "data-name": "nudge-value", className: "twa:flex-1 twa:mr-3", onChange: handleNudgeValueChange, placeholder: "Enter Number", type: "number", value: data.NudgeValue ?? '' })),
54
- React.createElement(FormRow, { label: "Nudge Type" },
55
- React.createElement(Flex, null,
56
- React.createElement(Radio, { "data-name": "nudge-type-always", value: "Always", checked: !props.hasCondition, onChange: () => props.onConditionChange(false) }, "Always Apply Nudge"),
57
- React.createElement(Radio, { "data-name": "nudge-type-condition", className: "twa:ml-3", value: "Expression", checked: props.hasCondition, onChange: () => props.onConditionChange(true) }, "Create a Rule")))))),
58
- props.hasCondition && (React.createElement(PlusMinusRuleWizardSection, { defaultPredicateId: "NonBlanks", onChange: props.onChange }))));
74
+ React.createElement(Input, { "data-name": "nudge-value", className: "twa:flex-1 twa:mr-3", onChange: handleNudgeValueChange, placeholder: "Enter Number", type: "number", value: data.NudgeValue ?? '' }))))),
75
+ React.createElement(Tabs, { className: "twa:p-2", selectedIndex: props.hasCondition ? 1 : 0, onSelectedIndexChange: (index) => props.onConditionChange(index === 1) },
76
+ React.createElement(Tabs.Tab, { "data-name": "nudge-type-always" }, "Always Apply"),
77
+ React.createElement(Tabs.Tab, { "data-name": "nudge-type-condition" }, "Conditional"),
78
+ React.createElement(Tabs.Content, null,
79
+ React.createElement(Flex, { className: "twa:text-2 twa:py-2" }, "The nudge value is always applied when using Plus/Minus")),
80
+ React.createElement(Tabs.Content, { className: "twa:p-0" },
81
+ React.createElement(PlusMinusRuleWizardSection, { defaultPredicateId: "NonBlanks", onChange: props.onChange })))));
59
82
  };
@@ -9,7 +9,7 @@ import * as PlusMinusRedux from '../../../Redux/ActionsReducers/PlusMinusRedux';
9
9
  import { ObjectTagsWizardSection, renderObjectTagsSummary, } from '../../Wizard/ObjectTagsWizardSection';
10
10
  import { Box } from '../../../components/Flex';
11
11
  export const PlusMinusWizard = (props) => {
12
- const [plusMinus, setPlusMinus] = React.useState(() => {
12
+ const [plusMinus, doSetPlusMinus] = React.useState(() => {
13
13
  const newPlusMinus = {
14
14
  ...(props.data ? props.data : ObjectFactory.CreateEmptyPlusMinusNudge()),
15
15
  Scope: props?.data?.Scope ?? { All: true },
@@ -22,19 +22,24 @@ export const PlusMinusWizard = (props) => {
22
22
  }
23
23
  return newPlusMinus;
24
24
  });
25
+ const setPlusMinus = React.useCallback((data) => {
26
+ doSetPlusMinus(data);
27
+ }, []);
25
28
  const [hasCondition, setHasCondition] = React.useState(() => {
26
29
  // true if on edit and it has a condition
27
30
  return Boolean(props?.data?.Rule);
28
31
  });
29
32
  React.useEffect(() => {
30
- const preparedData = { ...plusMinus };
31
- if (hasCondition) {
32
- preparedData.Rule = preparedData.Rule ?? { BooleanExpression: '' };
33
- }
34
- else {
35
- delete preparedData.Rule;
36
- }
37
- setPlusMinus(preparedData);
33
+ doSetPlusMinus((prev) => {
34
+ const preparedData = { ...prev };
35
+ if (hasCondition) {
36
+ preparedData.Rule = preparedData.Rule ?? { BooleanExpression: '' };
37
+ }
38
+ else {
39
+ delete preparedData.Rule;
40
+ }
41
+ return preparedData;
42
+ });
38
43
  }, [hasCondition]);
39
44
  const dispatch = useDispatch();
40
45
  const handleFinish = () => {
@@ -47,6 +52,12 @@ export const PlusMinusWizard = (props) => {
47
52
  props.onFinishWizard(plusMinus);
48
53
  };
49
54
  return (React.createElement(OnePageAdaptableWizard, { defaultCurrentSectionName: props.defaultCurrentSectionName, moduleInfo: props.moduleInfo, data: plusMinus, onHide: props.onCloseWizard, onFinish: handleFinish, sections: [
55
+ {
56
+ title: 'Settings',
57
+ isValid: isSettingsValid(hasCondition),
58
+ renderSummary: () => React.createElement(PlusMinusSettingsSummary, { hasCondition: hasCondition }),
59
+ render: () => (React.createElement(PlusMinusSettingsWizardSection, { hasCondition: hasCondition, onConditionChange: setHasCondition, onChange: setPlusMinus })),
60
+ },
50
61
  {
51
62
  title: 'Target',
52
63
  isValid: isScopeValid,
@@ -59,12 +70,6 @@ export const PlusMinusWizard = (props) => {
59
70
  render: () => (React.createElement(Box, { className: "twa:p-2" },
60
71
  React.createElement(PlusMinusScopeWizardSection, { onChange: setPlusMinus }))),
61
72
  },
62
- {
63
- title: 'Settings',
64
- isValid: isSettingsValid(hasCondition),
65
- renderSummary: () => React.createElement(PlusMinusSettingsSummary, { hasCondition: hasCondition }),
66
- render: () => (React.createElement(PlusMinusSettingsWizardSection, { hasCondition: hasCondition, onConditionChange: setHasCondition, onChange: setPlusMinus })),
67
- },
68
73
  {
69
74
  details: 'Select Plus/Minus Tags',
70
75
  title: 'Tags',
@@ -35,7 +35,10 @@ const QuickSearchPopupComponent = (props) => {
35
35
  React.createElement(Card, null,
36
36
  React.createElement(Card.Title, null, "Behaviour"),
37
37
  React.createElement(Card.Body, { className: "twa:p-1", gap: 2 },
38
- React.createElement(HelpBlock, { className: "twa:text-2 twa:w-fit" }, "Filters the Grid to only show rows with matching cells; use with care as can cause performance issues"),
38
+ React.createElement(HelpBlock, { className: "twa:text-2 twa:w-fit" },
39
+ "Filter Grid when searching to only show rows with matching cells; ",
40
+ React.createElement("b", null, "use with care"),
41
+ " as can cause performance issues"),
39
42
  React.createElement(CheckBox, { "data-name": "filter-quick-search-results", value: "existing", checked: state.RunQueryAfterQuickSearch, disabled: StringExtensions.IsNotNullOrEmpty(searchText), onChange: onQuickSearchBehaviourChange }, "Filter using Quick Search Results"))),
40
43
  React.createElement(Card.Title, { border: false, className: "twa:pt-3" }, "Cell Matching Style"),
41
44
  React.createElement(Card, null,
@@ -1,11 +1,18 @@
1
1
  import * as React from 'react';
2
2
  import { Tabs } from '../../../../components/Tabs';
3
3
  import FormLayout, { FormRow } from '../../../../components/FormLayout';
4
+ import Input from '../../../../components/Input';
4
5
  import Radio from '../../../../components/Radio';
5
6
  import DropdownButton from '../../../../components/DropdownButton';
6
7
  import { FormDescriptionText } from '../../../Wizard/OnePageAdaptableWizard';
7
8
  import { Box } from '../../../../components/Flex';
8
9
  export const ScheduleSettingsIPushPull = (props) => {
10
+ const handleNameChange = (event) => {
11
+ props.onChange({
12
+ ...props.iPushPull,
13
+ Name: event.target.value,
14
+ });
15
+ };
9
16
  const reportOptions = props.allReports.map((report) => ({
10
17
  label: report.Name,
11
18
  value: report.Name,
@@ -45,9 +52,13 @@ export const ScheduleSettingsIPushPull = (props) => {
45
52
  });
46
53
  return (React.createElement(Box, { "data-name": "schedule-settings-ipushpull" },
47
54
  React.createElement(Tabs, { autoFocus: false },
48
- React.createElement(Tabs.Tab, null, "Ipushpull Schedule Settings"),
55
+ React.createElement(Tabs.Tab, null, "Settings"),
49
56
  React.createElement(Tabs.Content, null,
50
57
  React.createElement(FormLayout, null,
58
+ React.createElement(FormRow, { label: "Name" },
59
+ React.createElement(Input, { "data-name": "schedule-name", className: "twa:w-[300px]", onChange: handleNameChange, placeholder: "Enter Schedule Name", type: "string", value: props.iPushPull?.Name ?? '' })),
60
+ React.createElement(FormRow, { label: "" },
61
+ React.createElement(Box, { className: "twa:h-2" })),
51
62
  React.createElement(FormRow, { label: "Select Report" },
52
63
  React.createElement(DropdownButton, { "data-name": "report-name", disabled: props.allReports.length == 0, items: reportOptions, className: "twa:w-[300px]" }, props?.iPushPull?.IPushPullReport?.ReportName || 'Select Report')),
53
64
  React.createElement(FormRow, { label: "Select Folder" },
@@ -1,9 +1,16 @@
1
1
  import * as React from 'react';
2
2
  import { Tabs } from '../../../../components/Tabs';
3
3
  import FormLayout, { FormRow } from '../../../../components/FormLayout';
4
+ import Input from '../../../../components/Input';
4
5
  import DropdownButton from '../../../../components/DropdownButton';
5
6
  import { Box } from '../../../../components/Flex';
6
7
  export const ScheduleSettingsOpenFin = (props) => {
8
+ const handleNameChange = (event) => {
9
+ props.onChange({
10
+ ...props.openFin,
11
+ Name: event.target.value,
12
+ });
13
+ };
7
14
  const reportOptions = props.allReports.map((report) => ({
8
15
  label: report.Name,
9
16
  value: report.Name,
@@ -17,9 +24,13 @@ export const ScheduleSettingsOpenFin = (props) => {
17
24
  }));
18
25
  return (React.createElement(Box, { "data-name": "schedule-settings-openfin" },
19
26
  React.createElement(Tabs, { autoFocus: false },
20
- React.createElement(Tabs.Tab, null, "OpenFin Schedule Settings"),
27
+ React.createElement(Tabs.Tab, null, "Settings"),
21
28
  React.createElement(Tabs.Content, null,
22
29
  React.createElement(FormLayout, null,
30
+ React.createElement(FormRow, { label: "Name" },
31
+ React.createElement(Input, { "data-name": "schedule-name", className: "twa:w-[300px]", onChange: handleNameChange, placeholder: "Enter Schedule Name", type: "string", value: props.openFin?.Name ?? '' })),
32
+ React.createElement(FormRow, { label: "" },
33
+ React.createElement(Box, { className: "twa:h-2" })),
23
34
  React.createElement(FormRow, { label: "Select Report" },
24
35
  React.createElement(DropdownButton, { "data-name": "select-report", columns: ['label'], className: "twa:w-[300px]", disabled: props.allReports.length == 0, items: reportOptions }, props?.openFin?.OpenFinReport?.ReportName || 'Select Report')))))));
25
36
  };
@@ -17,16 +17,22 @@ export const ScheduleSettingsReminder = (props) => {
17
17
  });
18
18
  },
19
19
  }));
20
+ const handleNameChange = (event) => {
21
+ props.onChange({
22
+ ...props.reminderSchedule,
23
+ Name: event.target.value,
24
+ });
25
+ };
20
26
  const handleHeaderChange = (event) => {
21
27
  props.onChange({
22
28
  ...props.reminderSchedule,
23
- Header: event.target?.value,
29
+ Header: event.target.value,
24
30
  });
25
31
  };
26
32
  const handleMessageChange = (event) => {
27
33
  props.onChange({
28
34
  ...props.reminderSchedule,
29
- Message: event.target?.value,
35
+ Message: event.target.value,
30
36
  });
31
37
  };
32
38
  const handleDisplayNotificationChange = (checked) => {
@@ -41,11 +47,15 @@ export const ScheduleSettingsReminder = (props) => {
41
47
  DisplaySystemStatusMessage: checked,
42
48
  });
43
49
  };
44
- return (React.createElement(Box, { "data-name": "schedule-settings-remainder" },
50
+ return (React.createElement(Box, { "data-name": "schedule-settings-reminder" },
45
51
  React.createElement(Tabs, { autoFocus: false },
46
- React.createElement(Tabs.Tab, null, "Reminder Schedule Settings"),
52
+ React.createElement(Tabs.Tab, null, "Settings"),
47
53
  React.createElement(Tabs.Content, null,
48
54
  React.createElement(FormLayout, null,
55
+ React.createElement(FormRow, { label: "Name" },
56
+ React.createElement(Input, { "data-name": "schedule-name", className: "twa:w-[300px]", onChange: handleNameChange, placeholder: "Enter Schedule Name", type: "string", value: props.reminderSchedule?.Name ?? '' })),
57
+ React.createElement(FormRow, { label: "" },
58
+ React.createElement(Box, { className: "twa:h-2" })),
49
59
  React.createElement(FormRow, { label: "Header" },
50
60
  React.createElement(Input, { "data-name": "header", className: "twa:w-[300px]", onChange: handleHeaderChange, placeholder: "Enter Reminder Header", type: "string", value: props.reminderSchedule?.Header })),
51
61
  React.createElement(FormRow, { label: "Message" },
@@ -1,9 +1,16 @@
1
1
  import * as React from 'react';
2
2
  import FormLayout, { FormRow } from '../../../../components/FormLayout';
3
+ import Input from '../../../../components/Input';
3
4
  import { Select } from '../../../../components/Select';
4
5
  import { Tabs } from '../../../../components/Tabs';
5
6
  import { Box } from '../../../../components/Flex';
6
7
  export const ScheduleSettingsReport = (props) => {
8
+ const handleNameChange = (event) => {
9
+ props.onChange({
10
+ ...props.report,
11
+ Name: event.target.value,
12
+ });
13
+ };
7
14
  const reportOptions = props.allReports.map((report) => ({
8
15
  label: report.Name,
9
16
  value: report.Name,
@@ -30,9 +37,13 @@ export const ScheduleSettingsReport = (props) => {
30
37
  }));
31
38
  return (React.createElement(Box, { "data-name": "schedule-settings-report" },
32
39
  React.createElement(Tabs, { autoFocus: false, className: "twa:mb-3" },
33
- React.createElement(Tabs.Tab, null, "Report Settings"),
40
+ React.createElement(Tabs.Tab, null, "Settings"),
34
41
  React.createElement(Tabs.Content, null,
35
42
  React.createElement(FormLayout, null,
43
+ React.createElement(FormRow, { label: "Name" },
44
+ React.createElement(Input, { "data-name": "schedule-name", className: "twa:w-[300px]", onChange: handleNameChange, placeholder: "Enter Schedule Name", type: "string", value: props.report?.Name ?? '' })),
45
+ React.createElement(FormRow, { label: "" },
46
+ React.createElement(Box, { className: "twa:h-2" })),
36
47
  React.createElement(FormRow, { label: "Export" },
37
48
  React.createElement(Box, { className: "twa:max-w-[300px]" },
38
49
  React.createElement(Select, { "data-name": "select-report", options: reportOptions, value: props?.report?.ReportName, placeholder: "Select Export", onChange: (value) => props.onChange({
@@ -1,2 +1,3 @@
1
+ import { AdaptableApi } from '../../../../Api/AdaptableApi';
1
2
  import { BaseSchedule } from '../../../../AdaptableState/Common/Schedule';
2
- export declare const isSettingsValid: (schedule: BaseSchedule) => true | "Message type not selected" | "Reminder header not specified" | "Reminder message not specified" | "Report source not specified" | "Report format not selected" | "Report not selected" | "Report folder not selected" | "Report page not selected";
3
+ export declare const isSettingsValid: (schedule: BaseSchedule, api: AdaptableApi) => true | "Name is required" | "A Schedule with this name already exists" | "Message type not selected" | "Reminder header not specified" | "Reminder message not specified" | "Report source not specified" | "Report format not selected" | "Report not selected" | "Report folder not selected" | "Report page not selected";
@@ -1,6 +1,15 @@
1
1
  import { ScheduleType } from '../../../../AdaptableState/Common/Enums';
2
2
  import StringExtensions from '../../../../Utilities/Extensions/StringExtensions';
3
- export const isSettingsValid = (schedule) => {
3
+ export const isSettingsValid = (schedule, api) => {
4
+ // Validate Name - mandatory and unique
5
+ if (!schedule.Name?.trim()) {
6
+ return 'Name is required';
7
+ }
8
+ const allSchedules = api.scheduleApi.getSchedules();
9
+ const isDuplicateName = allSchedules.some((s) => s.Name === schedule.Name && s.Uuid !== schedule.Uuid);
10
+ if (isDuplicateName) {
11
+ return 'A Schedule with this name already exists';
12
+ }
4
13
  if (schedule.ScheduleType === ScheduleType.Reminder) {
5
14
  const reminder = schedule;
6
15
  if (!reminder.MessageType) {
@@ -1,6 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { Shortcut } from '../../../AdaptableState/ShortcutState';
3
- export declare const isSettingsValid: (data: Shortcut) => string | true;
3
+ import { AdaptableApi } from '../../../types';
4
+ export declare const isSettingsValid: (data: Shortcut, api: AdaptableApi) => string | true;
4
5
  export declare const ShortcutSettingsSummary: React.FunctionComponent;
5
6
  interface ShortcutSettingsWizardProps {
6
7
  availableKeys: Array<string>;
@@ -9,7 +9,15 @@ import { Tag } from '../../../components/Tag';
9
9
  import HelpBlock from '../../../components/HelpBlock';
10
10
  import { Select } from '../../../components/Select';
11
11
  import { Box, Flex } from '../../../components/Flex';
12
- export const isSettingsValid = (data) => {
12
+ export const isSettingsValid = (data, api) => {
13
+ if (!data.Name?.trim()) {
14
+ return 'Name is required';
15
+ }
16
+ const allShortcuts = api.shortcutApi.getShortcuts();
17
+ const isDuplicateName = allShortcuts.some((s) => s.Name === data.Name && s.Uuid !== data.Uuid);
18
+ if (isDuplicateName) {
19
+ return 'A Shortcut already exists with that name';
20
+ }
13
21
  const shortcutKey = data.ShortcutKey && typeof data.ShortcutKey === 'string' ? '' : 'Shortcut key is not selected';
14
22
  const shortcutValue = typeof data.ShortcutValue === 'number' ? '' : 'Shortcut value is not specified';
15
23
  const shortcutOperation = data.ShortcutOperation && typeof data.ShortcutOperation === 'string'
@@ -21,6 +29,9 @@ export const isSettingsValid = (data) => {
21
29
  export const ShortcutSettingsSummary = () => {
22
30
  const { data: shortcut } = useOnePageAdaptableWizardContext();
23
31
  return (React.createElement(React.Fragment, null,
32
+ React.createElement(SummaryText, null,
33
+ "Name ",
34
+ React.createElement(Tag, null, shortcut.Name || 'Not specified')),
24
35
  React.createElement(SummaryText, null,
25
36
  "Shortcut Key ",
26
37
  React.createElement(Tag, null, shortcut.ShortcutKey || 'Not selected')),
@@ -33,6 +44,12 @@ export const ShortcutSettingsSummary = () => {
33
44
  };
34
45
  export const ShortcutSettingsWizard = (props) => {
35
46
  const { data: shortcut } = useOnePageAdaptableWizardContext();
47
+ const handleNameChange = (event) => {
48
+ props.onChange({
49
+ ...shortcut,
50
+ Name: event.target.value,
51
+ });
52
+ };
36
53
  const handleKeyChange = React.useCallback((ShortcutKey) => {
37
54
  props.onChange({
38
55
  ...shortcut,
@@ -63,17 +80,21 @@ export const ShortcutSettingsWizard = (props) => {
63
80
  React.createElement(Tabs.Tab, null, "Shortcut Settings"),
64
81
  React.createElement(Tabs.Content, null,
65
82
  React.createElement(FormLayout, null,
66
- React.createElement(FormRow, null,
83
+ React.createElement(FormRow, { label: "Name" },
84
+ React.createElement(Input, { "data-name": "shortcut-name", className: "twa:flex-1 twa:max-w-[200px] twa:mr-3", onChange: handleNameChange, placeholder: "Enter Name", value: shortcut.Name ?? '' })),
85
+ React.createElement(FormRow, { label: "" },
86
+ React.createElement(Box, { className: "twa:h-2" })),
87
+ React.createElement(FormRow, { label: "" },
67
88
  React.createElement(HelpBlock, { className: "twa:text-2 twa:mb-0" }, "Keyboard key that, when pressed, triggers the Shortcut")),
68
89
  React.createElement(FormRow, { label: "Key" },
69
90
  React.createElement(Flex, { flexDirection: "row" },
70
91
  React.createElement(Select, { "data-name": "shortcut-key", placeholder: "Select Key", options: optionKeys, onChange: (key) => handleKeyChange(key), value: shortcut.ShortcutKey || 'Select Key' }))),
71
- React.createElement(FormRow, null,
92
+ React.createElement(FormRow, { label: "" },
72
93
  React.createElement(HelpBlock, { className: "twa:text-2 twa:mb-0" }, "Mathematical operation performed on Cell's current value (using the Shortcut's 'value') - used to calculate the Cell's new total")),
73
94
  React.createElement(FormRow, { label: "Operation" },
74
95
  React.createElement(Flex, { flexDirection: "row" },
75
96
  React.createElement(Select, { "data-name": "shortcut-operation", placeholder: "Select Operation", options: optionActions, onChange: (operation) => handleOperationChange(operation), value: shortcut.ShortcutOperation }))),
76
- React.createElement(FormRow, null,
97
+ React.createElement(FormRow, { label: "" },
77
98
  React.createElement(HelpBlock, { className: "twa:text-2 twa:mb-0" }, "Number that is used - together with the 'Operation' and the current cell value - to calculate the new total for the cell")),
78
99
  React.createElement(FormRow, { label: "Value" },
79
100
  React.createElement(Flex, { flexDirection: "row" },
@@ -11,8 +11,9 @@ import { shortcutKeys } from '../shortcutKeys';
11
11
  import { useAdaptable } from '../../AdaptableContext';
12
12
  import { ObjectTagsWizardSection, renderObjectTagsSummary, } from '../../Wizard/ObjectTagsWizardSection';
13
13
  import { Box } from '../../../components/Flex';
14
+ import StringExtensions from '../../../Utilities/Extensions/StringExtensions';
14
15
  export const ShortcutWizard = (props) => {
15
- const [shortcut, setShortcut] = React.useState(() => {
16
+ const [shortcut, doSetShortcut] = React.useState(() => {
16
17
  const shortcut = props.data ? cloneObject(props.data) : ObjectFactory.CreateEmptyShortcut();
17
18
  shortcut.Scope = shortcut.Scope ?? { All: true };
18
19
  if (props.popupParams?.column && props.popupParams?.action === 'New') {
@@ -22,10 +23,13 @@ export const ShortcutWizard = (props) => {
22
23
  }
23
24
  return shortcut;
24
25
  });
26
+ const setShortcut = React.useCallback((data) => {
27
+ doSetShortcut(data);
28
+ }, []);
25
29
  const adaptable = useAdaptable();
26
30
  const availableKeys = React.useMemo(() => {
27
31
  const availableKeys = shortcutKeys.filter((key) => adaptable.api.shortcutApi.getShortcuts().every((shortcut) => shortcut.ShortcutKey !== key));
28
- if (shortcut) {
32
+ if (shortcut && StringExtensions.IsNotNullOrEmptyOrWhiteSpace(shortcut.ShortcutKey)) {
29
33
  availableKeys.push(shortcut.ShortcutKey);
30
34
  }
31
35
  availableKeys.sort();
@@ -42,18 +46,6 @@ export const ShortcutWizard = (props) => {
42
46
  props.onFinishWizard(shortcut);
43
47
  };
44
48
  return (React.createElement(OnePageAdaptableWizard, { defaultCurrentSectionName: props.defaultCurrentSectionName, moduleInfo: props.moduleInfo, data: shortcut, onHide: props.onCloseWizard, onFinish: handleFinish, sections: [
45
- {
46
- title: 'Target',
47
- isValid: isScopeValid,
48
- details: 'Specify where Shortcut should be applied',
49
- renderSummary: () => renderScopeSummary(shortcut.Scope, {
50
- scopeWholeRow: 'Shortcut is triggered for all numeric cells',
51
- scopeColumns: 'Shortcut is triggered for cells in selected columns',
52
- scopeDataTypes: 'Shortcut is triggered for all numeric cells',
53
- }),
54
- render: () => (React.createElement(Box, { className: "twa:p-2" },
55
- React.createElement(ShortcutScopeWizardSection, { onChange: setShortcut }))),
56
- },
57
49
  {
58
50
  title: 'Settings',
59
51
  isValid: isSettingsValid,
@@ -69,6 +61,18 @@ export const ShortcutWizard = (props) => {
69
61
  render: () => (React.createElement(Box, { className: "twa:p-2" },
70
62
  React.createElement(ShortcutSettingsWizard, { availableKeys: props.availableKeys ?? availableKeys, onChange: setShortcut }))),
71
63
  },
64
+ {
65
+ title: 'Target',
66
+ isValid: isScopeValid,
67
+ details: 'Specify where Shortcut should be applied',
68
+ renderSummary: () => renderScopeSummary(shortcut.Scope, {
69
+ scopeWholeRow: 'Shortcut is triggered for all numeric cells',
70
+ scopeColumns: 'Shortcut is triggered for cells in selected columns',
71
+ scopeDataTypes: 'Shortcut is triggered for all numeric cells',
72
+ }),
73
+ render: () => (React.createElement(Box, { className: "twa:p-2" },
74
+ React.createElement(ShortcutScopeWizardSection, { onChange: setShortcut }))),
75
+ },
72
76
  {
73
77
  details: 'Select Shortcut Tags',
74
78
  title: 'Tags',
@@ -38,6 +38,7 @@ export declare function getMessageTypeByStatusColour(statusColour: StatusColour)
38
38
  export declare function getButtonToneByMessageType(messageType: AdaptableMessageType): 'success' | 'error' | 'neutral' | 'none' | 'warning' | 'info' | 'accent';
39
39
  export declare function getGlyphByMessageType(messageType: AdaptableMessageType): AdaptableSystemIconName;
40
40
  export declare function getColorByMessageType(messageType: AdaptableMessageType): string;
41
+ export declare function getCSSColorByMessageType(messageType: AdaptableMessageType): string;
41
42
  export declare function getStyleForStatusColour(statusColour: StatusColour): CSSProperties;
42
43
  export declare function getStyleForMessageType(messageType: AdaptableMessageType): CSSProperties;
43
44
  export declare function getGlyphForStatusColour(statusColour: StatusColour): string;
@@ -75,6 +76,7 @@ export declare const UIHelper: {
75
76
  getGlyphForMessageType: typeof getGlyphForMessageType;
76
77
  getStyleForMessageType: typeof getStyleForMessageType;
77
78
  getMessageTypeFromAdaptableAlerts: typeof getMessageTypeFromAdaptableAlerts;
79
+ getCSSColorByMessageType: typeof getCSSColorByMessageType;
78
80
  getButtonColourForAdaptableAlerts: typeof getButtonColourForAdaptableAlerts;
79
81
  getButtonTextColourForArrayandMessageType: typeof getButtonTextColourForArrayandMessageType;
80
82
  getButtonTextColourForMessageType: typeof getButtonTextColourForMessageType;
@@ -202,6 +202,20 @@ export function getColorByMessageType(messageType) {
202
202
  return 'var(--ab-color-info)';
203
203
  }
204
204
  }
205
+ export function getCSSColorByMessageType(messageType) {
206
+ switch (messageType) {
207
+ case 'Error':
208
+ return 'error';
209
+ case 'Warning':
210
+ return 'warn';
211
+ case 'Success':
212
+ return 'success';
213
+ case 'Info':
214
+ return 'info';
215
+ default:
216
+ return '';
217
+ }
218
+ }
205
219
  export function getStyleForStatusColour(statusColour) {
206
220
  let result;
207
221
  switch (statusColour) {
@@ -449,6 +463,7 @@ export const UIHelper = {
449
463
  getGlyphForMessageType,
450
464
  getStyleForMessageType,
451
465
  getMessageTypeFromAdaptableAlerts,
466
+ getCSSColorByMessageType,
452
467
  getButtonColourForAdaptableAlerts,
453
468
  getButtonTextColourForArrayandMessageType,
454
469
  getButtonTextColourForMessageType,
@@ -257,10 +257,10 @@ export declare class AdaptableAgGrid implements IAdaptable {
257
257
  added: IRowNode[];
258
258
  updated: IRowNode[];
259
259
  }>;
260
- applyGridDataTransaction(dataTransaction: {
260
+ manageGridRows(dataRows: {
261
261
  add?: any[];
262
262
  update?: any[];
263
- remove?: any[];
263
+ delete?: any[];
264
264
  }, config?: DataUpdateConfig): Promise<{
265
265
  addedRows: IRowNode[];
266
266
  updatedRows: IRowNode[];
@@ -2467,18 +2467,18 @@ You need to define at least one Layout!`);
2467
2467
  });
2468
2468
  }
2469
2469
  }
2470
- async applyGridDataTransaction(dataTransaction, config = {}) {
2470
+ async manageGridRows(dataRows, config = {}) {
2471
2471
  const result = {
2472
2472
  addedRows: [],
2473
2473
  updatedRows: [],
2474
2474
  removedRows: [],
2475
2475
  };
2476
- if (!dataTransaction) {
2476
+ if (!dataRows) {
2477
2477
  return result;
2478
2478
  }
2479
- const addDataRows = dataTransaction.add;
2480
- const updateDataRows = dataTransaction.update;
2481
- const removeDataRows = dataTransaction.remove;
2479
+ const addDataRows = dataRows.add;
2480
+ const updateDataRows = dataRows.update;
2481
+ const removeDataRows = dataRows.delete;
2482
2482
  if (this.hasAutogeneratedPrimaryKey) {
2483
2483
  this.addSyntheticPrimaryKeyIfMissing(addDataRows);
2484
2484
  }
@@ -302,12 +302,10 @@ export class AgGridColumnAdapter {
302
302
  // see #header_text_align
303
303
  const formatColumnWithTextAlignment = this.getRelevantFormatColumnHeaderStyles(abColumn)
304
304
  // we take the first one only, even if multiple are defined
305
- .find((fc) => fc.CellAlignment != undefined);
305
+ .find((fc) => fc.Style?.Alignment != undefined);
306
306
  if (formatColumnWithTextAlignment) {
307
- baseHeaderClass = [
308
- ...baseHeaderClass,
309
- `ab-header__align-${formatColumnWithTextAlignment.CellAlignment.toLowerCase()}`,
310
- ];
307
+ const alignment = formatColumnWithTextAlignment.Style.Alignment.toLowerCase();
308
+ baseHeaderClass = [...baseHeaderClass, `ab-header__align-${alignment}`];
311
309
  }
312
310
  const formatColumns = this.adaptableApi.formatColumnApi.internalApi.getFormatColumnWithStyleClassNameForColumn(abColumn, {
313
311
  target,
@@ -1263,19 +1261,6 @@ export class AgGridColumnAdapter {
1263
1261
  const formatColumnStyle = formatColumn.Style
1264
1262
  ? convertAdaptableStyleToCSS(formatColumn.Style)
1265
1263
  : {};
1266
- if (formatColumn.CellAlignment) {
1267
- switch (formatColumn.CellAlignment) {
1268
- case 'Left':
1269
- style.textAlign = 'left';
1270
- break;
1271
- case 'Right':
1272
- style.textAlign = 'right';
1273
- break;
1274
- case 'Center':
1275
- style.textAlign = 'center';
1276
- break;
1277
- }
1278
- }
1279
1264
  return { ...style, ...formatColumnStyle };
1280
1265
  }, {});
1281
1266
  }
@@ -8,5 +8,5 @@ export function DashboardToolbar(props) {
8
8
  React.createElement(Flex, { className: "ab-Dashboard__toolbar-title twa:items-center twa:justify-center twa:px-2 twa:pb-1 twa:opacity-70", flexDirection: "row" },
9
9
  React.createElement("span", { className: "twa:text-2" }, props.title),
10
10
  props.showConfigure && (React.createElement(SimpleButton, { "aria-label": `Configure ${props.title}`, icon: "spanner", variant: "text", tone: "none", "data-name": "configure", iconSize: 16, className: "twa:ml-1", tooltip: props.tooltip || `Configure ${props.title}`, onClick: () => props.onConfigure() })),
11
- props.showClose && (React.createElement(SimpleButton, { "aria-label": `Close ${props.title}`, style: { alignSelf: 'flex-end' }, disabled: props.accessLevel == 'ReadOnly', "data-name": "close", icon: "close", variant: "text", tone: "none", iconSize: 16, className: "twa:ml-1", tooltip: props.tooltip || `Close ${props.title} Toolbar`, onClick: () => props.onClose() })))));
11
+ props.showClose && (React.createElement(SimpleButton, { "aria-label": `Close ${props.title}`, style: { alignSelf: 'flex-end' }, disabled: props.accessLevel == 'ReadOnly', "data-name": "close", icon: "close", variant: "text", tone: "none", iconSize: 16, className: "twa:ml-1", tooltip: props.tooltip || `Close ${props.title} Toolbar`, onClick: () => props.onClose?.() })))));
12
12
  }
@@ -3,7 +3,6 @@ import { useMemo } from 'react';
3
3
  import { BaseEditorInput } from './BaseEditorInput';
4
4
  import { editorButtonsSearch } from './editorButtonsSearch';
5
5
  import { useExpressionEditor } from './EditorContext';
6
- import StringExtensions from '../../Utilities/Extensions/StringExtensions';
7
6
  import { editorButtonsAggregatedScalar } from './editorButtonsAggregatedScalar';
8
7
  import { cumulativeAggregatedExpressionFunctions, quantileAggregatedExpressionFunctions, } from '../../Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions';
9
8
  import { editorButtonsCumulativeAggregatedScalar } from './editorButtonsCumulativeAggregatedScalar';
@@ -49,8 +48,25 @@ function EditorInput(props) {
49
48
  };
50
49
  }, [props.type]);
51
50
  const { setSelectedFunction } = useExpressionEditor();
52
- const queryName = `${StringExtensions.CapitaliseFirstLetter(props.type)}Query`;
53
- return (React.createElement(BaseEditorInput, { type: 'main', value: props.value, placeholder: `Create ${queryName}`, onChange: props.onChange, onSelectedFunctionChange: setSelectedFunction, expressionFunctions: expressionFunctions, editorButtons: props.type === 'aggregatedScalar'
51
+ let queryName;
52
+ switch (props.type) {
53
+ case 'boolean':
54
+ queryName = 'Create an Expression that returns true / false';
55
+ break;
56
+ case 'scalar':
57
+ queryName = "Create an Expression that returns a single value of any type";
58
+ break;
59
+ case 'aggregatedScalar':
60
+ queryName = "Create an Expression that evaluates multiple rows and returns a value of any type";
61
+ break;
62
+ case 'cumulativeAggregatedScalar':
63
+ queryName = "Create a Cumulative Expression";
64
+ break;
65
+ case 'quantileAggregatedScalar':
66
+ queryName = "Create a Quantile Expression";
67
+ break;
68
+ }
69
+ return (React.createElement(BaseEditorInput, { type: 'main', value: props.value, placeholder: queryName, onChange: props.onChange, onSelectedFunctionChange: setSelectedFunction, expressionFunctions: expressionFunctions, editorButtons: props.type === 'aggregatedScalar'
54
70
  ? editorButtonsAggregatedScalar
55
71
  : props.type === 'cumulativeAggregatedScalar'
56
72
  ? editorButtonsCumulativeAggregatedScalar