@adaptabletools/adaptable 22.0.0-canary.6 → 22.0.0-canary.7

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 (99) hide show
  1. package/index.css +0 -3
  2. package/index.css.map +1 -1
  3. package/package.json +1 -1
  4. package/src/AdaptableState/AlertState.d.ts +1 -2
  5. package/src/AdaptableState/Common/AdaptableObject.d.ts +4 -0
  6. package/src/AdaptableState/Common/BaseContext.d.ts +2 -0
  7. package/src/AdaptableState/Common/NamedObject.d.ts +10 -0
  8. package/src/AdaptableState/Common/NamedObject.js +1 -0
  9. package/src/AdaptableState/Common/RowSummary.d.ts +1 -1
  10. package/src/AdaptableState/Common/Schedule.d.ts +2 -2
  11. package/src/AdaptableState/Common/SuspendableObject.d.ts +10 -0
  12. package/src/AdaptableState/Common/SuspendableObject.js +1 -0
  13. package/src/AdaptableState/CustomSortState.d.ts +1 -1
  14. package/src/AdaptableState/FormatColumnState.d.ts +1 -1
  15. package/src/AdaptableState/LayoutState.d.ts +1 -1
  16. package/src/AdaptableState/PlusMinusState.d.ts +1 -1
  17. package/src/AdaptableState/ShortcutState.d.ts +1 -1
  18. package/src/AdaptableState/StyledColumnState.d.ts +1 -1
  19. package/src/Api/AlertApi.d.ts +6 -0
  20. package/src/Api/CustomSortApi.d.ts +6 -0
  21. package/src/Api/FlashingCellApi.d.ts +6 -0
  22. package/src/Api/FormatColumnApi.d.ts +10 -4
  23. package/src/Api/Implementation/AlertApiImpl.d.ts +1 -0
  24. package/src/Api/Implementation/AlertApiImpl.js +3 -0
  25. package/src/Api/Implementation/ChartingApiImpl.js +2 -2
  26. package/src/Api/Implementation/CustomSortApiImpl.d.ts +1 -0
  27. package/src/Api/Implementation/CustomSortApiImpl.js +3 -0
  28. package/src/Api/Implementation/FlashingCellApiImpl.d.ts +1 -0
  29. package/src/Api/Implementation/FlashingCellApiImpl.js +3 -0
  30. package/src/Api/Implementation/FormatColumnApiImpl.d.ts +6 -5
  31. package/src/Api/Implementation/FormatColumnApiImpl.js +6 -5
  32. package/src/Api/Implementation/LayoutApiImpl.js +1 -1
  33. package/src/Api/Implementation/NamedQueryApiImpl.js +2 -2
  34. package/src/Api/Implementation/PlusMinusApiImpl.d.ts +1 -0
  35. package/src/Api/Implementation/PlusMinusApiImpl.js +3 -0
  36. package/src/Api/Implementation/ScheduleApiImpl.d.ts +1 -0
  37. package/src/Api/Implementation/ScheduleApiImpl.js +3 -0
  38. package/src/Api/Implementation/ShortcutApiImpl.d.ts +1 -0
  39. package/src/Api/Implementation/ShortcutApiImpl.js +3 -0
  40. package/src/Api/Implementation/SystemStatusApiImpl.js +4 -4
  41. package/src/Api/Internal/CalculatedColumnInternalApi.js +2 -2
  42. package/src/Api/Internal/FreeTextColumnInternalApi.js +2 -2
  43. package/src/Api/Internal/LayoutInternalApi.js +1 -1
  44. package/src/Api/Internal/NamedQueryInternalApi.js +4 -4
  45. package/src/Api/PlusMinusApi.d.ts +6 -0
  46. package/src/Api/ScheduleApi.d.ts +6 -0
  47. package/src/Api/ShortcutApi.d.ts +6 -0
  48. package/src/Redux/ActionsReducers/FormatColumnRedux.d.ts +8 -0
  49. package/src/Redux/ActionsReducers/FormatColumnRedux.js +15 -0
  50. package/src/Redux/Store/AdaptableStore.js +18 -16
  51. package/src/Strategy/BulkUpdateModule.js +8 -8
  52. package/src/Strategy/PlusMinusModule.js +1 -1
  53. package/src/Strategy/QuickSearchModule.js +1 -1
  54. package/src/Strategy/SettingsPanelModule.js +11 -7
  55. package/src/Strategy/SmartEditModule.js +10 -10
  56. package/src/Utilities/Services/DataService.js +1 -1
  57. package/src/Utilities/Services/Fdc3Service.js +4 -4
  58. package/src/Utilities/Services/ModuleService.js +1 -3
  59. package/src/Utilities/Services/ThemeService.js +2 -6
  60. package/src/Utilities/Services/ValidationService.js +1 -1
  61. package/src/Utilities/logDeprecation.js +3 -4
  62. package/src/View/Alert/Wizard/isValidAlertRules.js +1 -1
  63. package/src/View/CalculatedColumn/Wizard/CalculatedColumnDefinitionWizardSection.js +2 -2
  64. package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.js +2 -2
  65. package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +1 -1
  66. package/src/View/Charting/ChartingWizard/AgChargingWizard/SettingsSection.js +2 -2
  67. package/src/View/Charting/ChartingWizard/ExternalChartingWizard/SettingsSection.js +2 -2
  68. package/src/View/Components/CellPopup/index.js +1 -1
  69. package/src/View/Components/EntityRulesEditor/Utilities.js +5 -5
  70. package/src/View/Components/NewScopeComponent.js +3 -3
  71. package/src/View/Components/Popups/AdaptablePopupConfirmation.js +1 -1
  72. package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.js +3 -3
  73. package/src/View/CustomSort/Wizard/CustomSortValuesWizardSection.js +1 -1
  74. package/src/View/FlashingCell/Wizard/isValidFlashingCellRules.js +1 -1
  75. package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.d.ts +1 -1
  76. package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.js +3 -3
  77. package/src/View/Layout/LayoutViewPanel.js +1 -1
  78. package/src/View/Layout/Wizard/sections/AggregationsSection.js +1 -1
  79. package/src/View/Layout/Wizard/sections/FilterSection.js +1 -1
  80. package/src/View/Layout/Wizard/sections/GridFilterSection.js +1 -1
  81. package/src/View/Layout/Wizard/sections/PivotAggregationsSection.js +3 -3
  82. package/src/View/Layout/Wizard/sections/RowSummarySection.js +1 -1
  83. package/src/View/NamedQuery/Wizard/NamedQueryExpressionWizardSection.js +2 -2
  84. package/src/View/PlusMinus/Wizard/PlusMinusSettingsWizardSection.js +5 -5
  85. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/isSettingsValid.d.ts +1 -1
  86. package/src/View/Schedule/Wizard/ScheduleSettingsWizard/isSettingsValid.js +11 -11
  87. package/src/View/StateManagement/handleExportState.js +1 -1
  88. package/src/View/StyledColumn/Wizard/StyledColumnWizardColumnSection.js +1 -1
  89. package/src/agGrid/AdaptableAgGrid.js +38 -51
  90. package/src/agGrid/AgGridAdapter.js +8 -8
  91. package/src/agGrid/AgGridColumnAdapter.js +1 -1
  92. package/src/agGrid/AgGridExportAdapter.js +5 -5
  93. package/src/agGrid/AgGridThemeAdapter.js +2 -2
  94. package/src/components/OverlayTrigger/index.js +1 -1
  95. package/src/env.js +2 -2
  96. package/src/migration/AdaptableUpgradeHelper.js +2 -2
  97. package/src/migration/VersionUpgrade17.js +4 -4
  98. package/src/migration/VersionUpgrade20.js +4 -4
  99. package/tsconfig.esm.tsbuildinfo +1 -1
@@ -43,8 +43,8 @@ export class SmartEditModule extends AdaptableModuleBase {
43
43
  return {
44
44
  Alert: {
45
45
  alertType: 'generic',
46
- header: 'Smart Edit Error',
47
- message: 'Cannot edit while Grid is in Pivot Mode.',
46
+ header: 'Smart Edit',
47
+ message: 'Editing is not available in Pivot Mode.',
48
48
  alertDefinition: ObjectFactory.CreateInternalAlertDefinitionForMessages('Error'),
49
49
  },
50
50
  };
@@ -53,8 +53,8 @@ export class SmartEditModule extends AdaptableModuleBase {
53
53
  return {
54
54
  Alert: {
55
55
  alertType: 'generic',
56
- header: 'Smart Edit Error',
57
- message: 'No cells are selected.\nPlease select some cells.',
56
+ header: 'Smart Edit',
57
+ message: 'No cells selected. Please select one or more cells to continue.',
58
58
  alertDefinition: ObjectFactory.CreateInternalAlertDefinitionForMessages('Error'),
59
59
  },
60
60
  };
@@ -63,8 +63,8 @@ export class SmartEditModule extends AdaptableModuleBase {
63
63
  return {
64
64
  Alert: {
65
65
  alertType: 'generic',
66
- header: 'Smart Edit Error',
67
- message: 'Smart Edit only supports single column edit.\nPlease adjust cell selection.',
66
+ header: 'Smart Edit',
67
+ message: 'Smart Edit supports editing a single column at a time. Please adjust your selection.',
68
68
  alertDefinition: ObjectFactory.CreateInternalAlertDefinitionForMessages('Error'),
69
69
  },
70
70
  };
@@ -75,8 +75,8 @@ export class SmartEditModule extends AdaptableModuleBase {
75
75
  return {
76
76
  Alert: {
77
77
  alertType: 'generic',
78
- header: 'Smart Edit Error',
79
- message: 'Smart Edit only supports editing of numeric columns.\nPlease adjust the cell selection.',
78
+ header: 'Smart Edit',
79
+ message: 'Smart Edit only applies to numeric columns. Please adjust your selection.',
80
80
  alertDefinition: ObjectFactory.CreateInternalAlertDefinitionForMessages('Error'),
81
81
  },
82
82
  };
@@ -87,8 +87,8 @@ export class SmartEditModule extends AdaptableModuleBase {
87
87
  return {
88
88
  Alert: {
89
89
  alertType: 'generic',
90
- header: 'Smart Edit Error',
91
- message: 'Smart Edit is not permitted on readonly cells.\nPlease adjust the cell selection.',
90
+ header: 'Smart Edit',
91
+ message: 'Smart Edit is not available for read-only cells. Please adjust your selection.',
92
92
  alertDefinition: ObjectFactory.CreateInternalAlertDefinitionForMessages('Error'),
93
93
  },
94
94
  };
@@ -64,7 +64,7 @@ export class DataService {
64
64
  // why 2 and not 3 or 1? no good reason, only seems like a reasonable waiting time :)
65
65
  const UNDO_WAIT = 2000;
66
66
  const timeoutId = setTimeout(() => {
67
- this.adaptable.logger.warn(`Undo change was NOT handled, this should NOT happen: PK(${change.primaryKeyValue}) Col(${change.column}) RevertedValue(${change.newValue}) NewValue(${change.oldValue})`);
67
+ this.adaptable.logger.warn(`Undo change was not handled within timeout: column="${change.column}", primaryKey="${change.primaryKeyValue}", from=${change.newValue} to=${change.oldValue}.`);
68
68
  this.extractUndoChange(change);
69
69
  }, UNDO_WAIT);
70
70
  this.undoChangeTimers.set(undoChangeKey, timeoutId);
@@ -78,7 +78,7 @@ export class Fdc3Service {
78
78
  getDesktopAgent() {
79
79
  if (globalThis.fdc3 == null && !this.loggedAgentError) {
80
80
  this.loggedAgentError = true;
81
- this.adaptableApi.consoleError('FDC3 Desktop Agent not found. This should be provided by the wrapper application.');
81
+ this.adaptableApi.consoleError('FDC3 Desktop Agent not found. The host application must provide the FDC3 agent on globalThis.fdc3.');
82
82
  }
83
83
  return globalThis.fdc3;
84
84
  }
@@ -161,11 +161,11 @@ export class Fdc3Service {
161
161
  if (!this.getFdc3Options().enableLogging) {
162
162
  return;
163
163
  }
164
- this.adaptableApi.consoleLog(`FDC3::${type} - `, params.join(' : '));
164
+ this.adaptableApi.consoleLog(`FDC3 ${type}: ${params.join(' : ')}`);
165
165
  }
166
166
  logFdc3Error(error) {
167
- this.adaptableApi.consoleError(`FDC3 error`, error);
168
- this.adaptableApi.alertApi.showAlertError('FDC3 Error', 'See console for details');
167
+ this.adaptableApi.consoleError('FDC3 operation failed.', error);
168
+ this.adaptableApi.alertApi.showAlertError('FDC3', 'An error occurred. See the browser console for details.');
169
169
  }
170
170
  getFdc3Api() {
171
171
  return this.adaptableApi.fdc3Api;
@@ -32,9 +32,7 @@ export class ModuleService {
32
32
  const registeredAgGridModuleNames = agGridModulesAdapter.getAgGridRegisteredModuleNames();
33
33
  const missingAgGridModuleNames = mandatoryAgGridModuleNames.filter((moduleName) => !registeredAgGridModuleNames.includes(moduleName));
34
34
  if (missingAgGridModuleNames.length) {
35
- this.adaptableApi.consoleError(`AdapTable requires the following AG Grid modules to be registered: ${missingAgGridModuleNames.join(', ')}.
36
-
37
- See for more information: ${AgGridRequiredModulesDocsLink}`);
35
+ this.adaptableApi.consoleError(`Adaptable requires these AG Grid modules: ${missingAgGridModuleNames.join(', ')}. Please register them. See: ${AgGridRequiredModulesDocsLink}`);
38
36
  }
39
37
  // log optional missing AG Grid dependencies for all modules
40
38
  this.getModuleCollection().forEach((adaptableModule) => {
@@ -70,15 +70,11 @@ export class ThemeService {
70
70
  return val;
71
71
  });
72
72
  if (abLoaded !== '777') {
73
- logger.consoleError('Please import Adaptable styles from "@adaptabletools/adaptable/index.css"');
73
+ logger.consoleError('Adaptable styles not detected. Please import "@adaptabletools/adaptable/index.css".');
74
74
  }
75
75
  const isCustomUserTheme = !this.api.themeApi.internalApi.isSystemTheme(themeName);
76
76
  if (!isCustomUserTheme && abThemeLoaded !== themeName) {
77
- logger.consoleWarn(`Theme "${themeName}" doesn't seem to be loaded! Make sure you import the css file for the "${themeName}" theme!
78
-
79
- If it's an AdapTable system theme, try
80
-
81
- import "@adaptabletools/adaptable/themes/${themeName}.css"`);
77
+ logger.consoleWarn(`Theme "${themeName}" does not appear to be loaded. Ensure the CSS file is imported, e.g.: import "@adaptabletools/adaptable/themes/${themeName}.css".`);
82
78
  }
83
79
  }
84
80
  // prefers-color-scheme
@@ -53,7 +53,7 @@ export class ValidationService {
53
53
  let alert = {
54
54
  alertType: 'cellChanged',
55
55
  header: 'Alert',
56
- message: 'Perform Edit Alert Fired',
56
+ message: 'A validation rule was triggered for this edit.',
57
57
  alertDefinition: failedRules[0],
58
58
  cellDataChangedInfo: cellDataChangedInfo,
59
59
  };
@@ -11,13 +11,12 @@ const doOnce = (func, key) => {
11
11
  };
12
12
  export const logDeprecation = (logger, typeName, oldProp, newProp, message) => {
13
13
  const newPropMsg = newProp ? `Please use '${typeName}.${newProp}()' instead. ` : '';
14
- doOnce(() => logger.consoleWarn(`'${typeName}.${oldProp}()' is deprecated. ${newPropMsg}${message ?? ''}`), `Deprecated_${oldProp}`);
14
+ doOnce(() => logger.consoleWarn(`${typeName}.${oldProp}() is deprecated. ${newPropMsg}${message ?? ''}`), `Deprecated_${oldProp}`);
15
15
  };
16
16
  export const logDeprecationExternal = (logger, oldTypeName, oldProp, newTypeName, newProp, message) => {
17
17
  const newPropMsg = newProp ? `Please use '${newTypeName}.${newProp}()' instead. ` : '';
18
- doOnce(() => logger.consoleWarn(`'${oldTypeName}.${oldProp}()' is deprecated. ${newPropMsg}${message ?? ''}`), `Deprecated_${oldProp}`);
18
+ doOnce(() => logger.consoleWarn(`${oldTypeName}.${oldProp}() is deprecated. ${newPropMsg}${message ?? ''}`), `Deprecated_${oldProp}`);
19
19
  };
20
20
  export const logDeprecationInternal = (logger, typeName, oldProp) => {
21
- doOnce(() => logger.consoleWarn(`'${typeName}.${oldProp}()' is deprecated. The method will be removed in the next major release.
22
- Please contact support if you need the missing functionality.`), `Deprecated_${oldProp}`);
21
+ doOnce(() => logger.consoleWarn(`${typeName}.${oldProp}() is deprecated and will be removed in the next major release. Contact support if you need this functionality.`), `Deprecated_${oldProp}`);
23
22
  };
@@ -4,7 +4,7 @@ export const isValidAlertRules = (alert, api, context) => {
4
4
  !alert.Rule.BooleanExpression &&
5
5
  !alert.Rule.ObservableExpression &&
6
6
  !alert.Rule.AggregatedBooleanExpression) {
7
- return 'No Rule defined for Alert';
7
+ return 'A rule is required for the Alert.';
8
8
  }
9
9
  const isRuleValid = isAdaptableRuleValid(alert, api, context);
10
10
  if (typeof isRuleValid === 'string') {
@@ -21,11 +21,11 @@ export const renderCalculatedColumnDefinitionSummary = (data) => {
21
21
  export const isValidCalculatedColumnDefinition = (data, api) => {
22
22
  const columns = api.columnApi.getColumns();
23
23
  if (!data.ColumnId) {
24
- return 'Column Id cannot be empty';
24
+ return 'A Column ID is required.';
25
25
  }
26
26
  const columnsWithSameIdCount = columns.filter((c) => c.columnId === data.ColumnId).length;
27
27
  const hasAlreadyExistingId = data.Uuid ? columnsWithSameIdCount > 1 : columnsWithSameIdCount > 0;
28
- return hasAlreadyExistingId ? 'A Column already exists with that id' : true;
28
+ return hasAlreadyExistingId ? 'A column with this ID already exists.' : true;
29
29
  };
30
30
  export const CalculatedColumnDefinitionWizardSection = (props) => {
31
31
  const { data, api } = useOnePageAdaptableWizardContext();
@@ -17,11 +17,11 @@ export const isValidCalculatedColumnExpression = (data, api) => {
17
17
  const calculatedColumnExpressionService = api.internalApi.getCalculatedColumnExpressionService();
18
18
  const expression = api.expressionApi.getAdaptableQueryExpression(data.Query)?.trim();
19
19
  if (!expression) {
20
- return 'Calculated Column Expression cannot be empty';
20
+ return 'An expression is required for the Calculated Column.';
21
21
  }
22
22
  const isValid = calculatedColumnExpressionService.isCalculatedColumnQueryValid(data.Query);
23
23
  if (!isValid) {
24
- return 'Calculated Column Expression is not valid';
24
+ return 'The Calculated Column expression is not valid.';
25
25
  }
26
26
  return true;
27
27
  };
@@ -16,7 +16,7 @@ export const renderCalculatedColumnSettingsSummary = (data) => {
16
16
  };
17
17
  export const isValidCalculatedColumnSettings = (data) => {
18
18
  if (!data.CalculatedColumnSettings?.DataType) {
19
- return 'No data type is specified and it could not be inferred from the defined expression';
19
+ return 'A data type is required. It could not be inferred from the expression.';
20
20
  }
21
21
  return true;
22
22
  };
@@ -5,12 +5,12 @@ import FormLayout, { FormRow } from '../../../../components/FormLayout';
5
5
  import AdaptableInput from '../../../Components/AdaptableInput';
6
6
  export const isSettingsValid = (chartDefinition, api) => {
7
7
  if (!chartDefinition.Name) {
8
- return 'Name is mandatory';
8
+ return 'A name is required.';
9
9
  }
10
10
  const allChartDefinitions = api.chartingApi.getChartDefinitions();
11
11
  if (allChartDefinitions.some((chartDefinitionLoopItem) => chartDefinitionLoopItem.Uuid !== chartDefinition.Uuid &&
12
12
  chartDefinitionLoopItem.Name === chartDefinition.Name)) {
13
- return 'There is already a chart with this name';
13
+ return 'A Chart with this name already exists.';
14
14
  }
15
15
  return true;
16
16
  };
@@ -3,12 +3,12 @@ import FormLayout, { FormRow } from '../../../../components/FormLayout';
3
3
  import AdaptableInput from '../../../Components/AdaptableInput';
4
4
  export const isSettingsValid = (chartDefinition, api) => {
5
5
  if (!chartDefinition.Name) {
6
- return 'Name is mandatory';
6
+ return 'A name is required.';
7
7
  }
8
8
  const allChartDefinitions = api.chartingApi.getExternalChartDefinitions();
9
9
  if (allChartDefinitions.some((chartDefinitionLoopItem) => chartDefinitionLoopItem.Uuid !== chartDefinition.Uuid &&
10
10
  chartDefinitionLoopItem.Name === chartDefinition.Name)) {
11
- return 'There is already a chart with this name';
11
+ return 'A Chart with this name already exists.';
12
12
  }
13
13
  return true;
14
14
  };
@@ -32,7 +32,7 @@ export const CellPopup = React.forwardRef((props, ref) => {
32
32
  const cellSelector = `[row-id="${props.primaryKeyValue}"] [col-id="${props.columnId}"]`;
33
33
  const alignTo = document.querySelector(cellSelector);
34
34
  if (!alignTo) {
35
- adaptable.logger.consoleError(`Could not find cell with selector ${cellSelector} to show popup`);
35
+ adaptable.logger.consoleError(`Cell not found for selector "${cellSelector}". Unable to display popup.`);
36
36
  return;
37
37
  }
38
38
  const showOverlayOptions = {
@@ -1,28 +1,28 @@
1
1
  export const isAdaptableRuleValid = (abObject, api, context) => {
2
2
  if (abObject?.Rule?.Predicates?.length) {
3
3
  if (!api.predicateApi.isEveryPredicateValid(abObject?.Rule?.Predicates)) {
4
- return `The Predicate${abObject?.Rule?.Predicates?.length === 1 ? ' is' : 's are'} not valid`;
4
+ return `The predicate${abObject?.Rule?.Predicates?.length === 1 ? ' is' : 's are'} not valid.`;
5
5
  }
6
6
  }
7
7
  if (abObject?.Rule?.BooleanExpression) {
8
8
  if (!api.expressionApi.isValidBooleanExpression(abObject?.Rule?.BooleanExpression, context.moduleInfo.ModuleName)) {
9
- return 'The Expression is not a valid Boolean Expression';
9
+ return 'The Boolean expression is not valid.';
10
10
  }
11
11
  }
12
12
  if (abObject?.Rule?.ObservableExpression) {
13
13
  if (!api.expressionApi.isValidObservableExpression(abObject?.Rule?.ObservableExpression, context.moduleInfo.ModuleName)) {
14
- return 'The Expression is not a valid Observable Expression';
14
+ return 'The Observable expression is not valid.';
15
15
  }
16
16
  }
17
17
  if (abObject?.Rule?.AggregatedBooleanExpression) {
18
18
  if (!api.expressionApi.isValidAggregatedBooleanExpression(abObject?.Rule?.AggregatedBooleanExpression, context.moduleInfo.ModuleName)) {
19
- return 'The Expression is not a valid Aggregated Boolean Expression';
19
+ return 'The Aggregated Boolean expression is not valid.';
20
20
  }
21
21
  }
22
22
  if (abObject?.Rule?.Predicates?.length) {
23
23
  const isAPredicateWithInvalidColumnId = abObject?.Rule?.Predicates?.some((predicate) => predicate.ColumnId !== undefined && predicate.ColumnId === '');
24
24
  if (isAPredicateWithInvalidColumnId) {
25
- return 'Predicates with custom scope need a valid column';
25
+ return 'Predicates with a custom scope require a valid column.';
26
26
  }
27
27
  }
28
28
  return true;
@@ -14,13 +14,13 @@ import { TagList } from '../../components/Tag/Tag';
14
14
  export const isScopeValid = ({ Scope }) => {
15
15
  const result = [];
16
16
  if (!Scope) {
17
- return 'No scope specified or scope is empty';
17
+ return 'A scope is required.';
18
18
  }
19
19
  if (Scope && 'ColumnIds' in Scope && Scope.ColumnIds.length === 0) {
20
- result.push('No Columns selected in Scope');
20
+ result.push('Please select at least one column for the scope.');
21
21
  }
22
22
  if (Scope && 'DataTypes' in Scope && Scope.DataTypes.length === 0) {
23
- result.push('No Data Types selected in Scope');
23
+ result.push('Please select at least one data type for the scope.');
24
24
  }
25
25
  return result.length ? result.join(', ') : true;
26
26
  };
@@ -51,7 +51,7 @@ export const AdaptablePopupConfirmation = (props) => {
51
51
  setDisableDeleteConfirmation(!disableDeleteConfirmation);
52
52
  } }, "Do not show this again")),
53
53
  props.showInputBox && (React.createElement(Box, { className: "twa:p-2", "data-name": "body" },
54
- React.createElement("p", null, "Please enter a comment to confirm"),
54
+ React.createElement("p", null, "Please enter a comment to confirm."),
55
55
  React.createElement(Input, { className: "twa:mt-2 twa:w-full", value: promptText, type: "string", placeholder: "Enter text", onChange: (e) => changeContent(e) }))),
56
56
  React.createElement(Flex, { className: "twa:mt-3 twa:p-2", "data-name": "footer", justifyContent: "space-between" },
57
57
  props.cancelButtonText != null ? (React.createElement(SimpleButton, { "data-name": "cancel", tone: "neutral", variant: "raised", onClick: () => onCancelForm() }, props.cancelButtonText)) : (React.createElement("div", null)),
@@ -18,13 +18,13 @@ export const renderCustomSortColumn = (data) => {
18
18
  };
19
19
  export const isValidCustomSortColumn = (data, allCustomSorts) => {
20
20
  if (!data.Name) {
21
- return 'Custom Sort Name cannot be blank';
21
+ return 'A name is required.';
22
22
  }
23
23
  if (allCustomSorts.some((customSort) => customSort.Name === data.Name && customSort.Uuid !== data.Uuid)) {
24
- return 'A Custom Sort already exists with that name';
24
+ return 'A Custom Sort with this name already exists.';
25
25
  }
26
26
  if (!data.ColumnId) {
27
- return 'You have to select a Column for Custom Sort';
27
+ return 'Please select a column for the Custom Sort.';
28
28
  }
29
29
  return true;
30
30
  };
@@ -11,7 +11,7 @@ import { parseToISO } from '../../../Utilities/Helpers/DateHelper';
11
11
  import { TagList } from '../../../components/Tag';
12
12
  export const isValidCustomSortOrder = (data) => {
13
13
  if (!data.SortedValues || !data.SortedValues.length) {
14
- return 'You have to specify at least one value for Custom Sort order';
14
+ return 'At least one value is required for the Custom Sort order.';
15
15
  }
16
16
  return true;
17
17
  };
@@ -1,7 +1,7 @@
1
1
  import { isAdaptableRuleValid } from '../../Components/EntityRulesEditor/Utilities';
2
2
  export const isValidFlashingCellRules = (flashingCell, api, context) => {
3
3
  if (!flashingCell.Rule?.Predicates?.length && !flashingCell.Rule.BooleanExpression) {
4
- return 'No Rule defined for Flashing Cell';
4
+ return 'A rule is required for the Flashing Cell.';
5
5
  }
6
6
  const isRuleValid = isAdaptableRuleValid(flashingCell, api, context);
7
7
  if (typeof isRuleValid === 'string') {
@@ -2,7 +2,7 @@ import * as React from 'react';
2
2
  import { FreeTextColumn } from '../../../AdaptableState/FreeTextColumnState';
3
3
  import { AdaptableApi } from '../../../Api/AdaptableApi';
4
4
  export declare const renderFreeTextColumnSummary: (data: FreeTextColumn) => React.JSX.Element;
5
- export declare const isValidFreeTextColumn: (data: FreeTextColumn, api: AdaptableApi) => true | "Column Id cannot be empty" | "A Column already exists with that id" | "No data type specified for column";
5
+ export declare const isValidFreeTextColumn: (data: FreeTextColumn, api: AdaptableApi) => true | "A Column ID is required." | "A column with this ID already exists." | "A data type is required for the column.";
6
6
  export type FreeTextColumnSettingsWizardSectionProps = {
7
7
  onChange: (data: FreeTextColumn) => void;
8
8
  isEdit: boolean;
@@ -40,15 +40,15 @@ export const renderFreeTextColumnSummary = (data) => {
40
40
  export const isValidFreeTextColumn = (data, api) => {
41
41
  const columns = api.columnApi.getUIAvailableColumns();
42
42
  if (!data.ColumnId) {
43
- return 'Column Id cannot be empty';
43
+ return 'A Column ID is required.';
44
44
  }
45
45
  const columnsWithSameIdCount = columns.filter((c) => c.columnId === data.ColumnId).length;
46
46
  const hasAlreadyExistingId = data.Uuid ? columnsWithSameIdCount > 1 : columnsWithSameIdCount > 0;
47
47
  if (hasAlreadyExistingId) {
48
- return 'A Column already exists with that id';
48
+ return 'A column with this ID already exists.';
49
49
  }
50
50
  if (!data.FreeTextColumnSettings.DataType) {
51
- return 'No data type specified for column';
51
+ return 'A data type is required for the column.';
52
52
  }
53
53
  return true;
54
54
  };
@@ -79,7 +79,7 @@ function mapDispatchToProps(dispatch) {
79
79
  showMissingLayoutsError: () => {
80
80
  dispatch(PopupRedux.PopupShowConfirmation({
81
81
  Header: 'Missing Layouts',
82
- Msg: 'You have not defined any Layout! See the console for more details.',
82
+ Msg: 'No Layouts have been defined. Please check the console for details.',
83
83
  ConfirmAction: null,
84
84
  ConfirmButtonText: 'OK',
85
85
  CancelButtonText: null,
@@ -19,7 +19,7 @@ export const isAggregationsSectionValid = (data) => {
19
19
  AggFunc.type === 'weightedAverage')?.AggFunc
20
20
  : null;
21
21
  if (weightedAvg && !weightedAvg.weightedColumnId) {
22
- return 'The Weighted Average Aggregation requires a Weighted Column';
22
+ return 'Weighted Average requires a weight column to be selected.';
23
23
  }
24
24
  return true;
25
25
  };
@@ -13,7 +13,7 @@ import { Box } from '../../../../components/Flex';
13
13
  export const isColumnFiltersValid = (layout) => {
14
14
  const invalidColumnFilters = (layout.ColumnFilters ?? [])?.filter((columnFilter) => !columnFilter?.Predicates[0]?.PredicateId);
15
15
  if (invalidColumnFilters.length > 0) {
16
- return 'Please select a Predicate for each Column Filter';
16
+ return 'Please select a predicate for each column filter.';
17
17
  }
18
18
  return true;
19
19
  };
@@ -13,7 +13,7 @@ export const isGridFiltersValid = (layout, api) => {
13
13
  return true;
14
14
  }
15
15
  return (api.internalApi.getQueryLanguageService().validateBoolean(expression, GridFilterModuleId)
16
- .isValid || 'Invalid Expression');
16
+ .isValid || 'The expression is not valid.');
17
17
  };
18
18
  export const GridFilterSectionSummary = () => {
19
19
  const { data: layout } = useOnePageAdaptableWizardContext();
@@ -216,7 +216,7 @@ export const isPivotAggregationsSectionValid = (data) => {
216
216
  .find((agg) => typeof agg === 'object' && agg.type === 'weightedAverage')
217
217
  : null;
218
218
  if (weightedAvg && !weightedAvg.weightedColumnId) {
219
- return 'The Weighted Average Aggregation requires a Weighted Column';
219
+ return 'Weighted Average requires a weight column to be selected.';
220
220
  }
221
221
  return true;
222
222
  };
@@ -303,12 +303,12 @@ export const PivotAggregationsSection = (props) => {
303
303
  }
304
304
  const firstAggFuncName = getAggFuncName(aggregationColumns[0].AggFunc);
305
305
  if (layout.PivotAggregationColumns?.some((aggCol) => getAggFuncName(aggCol.AggFunc) !== firstAggFuncName)) {
306
- return 'Requires identical aggregation on all columns';
306
+ return 'All columns must use the same aggregation function.';
307
307
  }
308
308
  // check that no Aggregation Total Column is enabled
309
309
  const hasAggregationTotalColumn = aggregationColumns.some((aggCol) => aggCol.Total !== false && aggCol.Total != null);
310
310
  if (hasAggregationTotalColumn) {
311
- return 'Can only be enabled when no Aggregation Total Column is present';
311
+ return 'This option is not available when an Aggregation Total Column is present.';
312
312
  }
313
313
  return true;
314
314
  };
@@ -24,7 +24,7 @@ export const areSummaryRowsValid = (layout) => {
24
24
  layout.RowSummaries?.find((rowSummary) => {
25
25
  for (const [_, fn] of Object.entries(rowSummary.ColumnsMap ?? {})) {
26
26
  if (!fn) {
27
- valid = 'All row summary columns must have an aggregation function.';
27
+ valid = 'Each row summary column requires an aggregation function.';
28
28
  return true;
29
29
  }
30
30
  }
@@ -7,11 +7,11 @@ import { useOnePageAdaptableWizardContext } from '../../Wizard/OnePageAdaptableW
7
7
  import { Box } from '../../../components/Flex';
8
8
  export const isValidNamedQueryExpression = (data, api) => {
9
9
  if (!data.BooleanExpression) {
10
- return 'Expression is empty';
10
+ return 'An expression is required.';
11
11
  }
12
12
  const valid = api.expressionApi.isValidBooleanExpression(data.BooleanExpression, NamedQueryModuleId);
13
13
  if (!valid) {
14
- return 'Query is not a valid Boolean Query';
14
+ return 'The query is not a valid Boolean expression.';
15
15
  }
16
16
  return valid;
17
17
  };
@@ -24,16 +24,16 @@ export const PlusMinusSettingsSummary = (props) => {
24
24
  };
25
25
  export const isSettingsValid = (hasCondition) => (data, api, context) => {
26
26
  if (!data.Name?.trim()) {
27
- return 'Name is required';
27
+ return 'A name is required.';
28
28
  }
29
29
  const allPlusMinusNudges = api.plusMinusApi.getAllPlusMinus();
30
30
  const isDuplicateName = allPlusMinusNudges.some((nudge) => nudge.Name === data.Name && nudge.Uuid !== data.Uuid);
31
31
  if (isDuplicateName) {
32
- return 'A Plus Minus Nudge already exists with that name';
32
+ return 'A Plus/Minus Nudge with this name already exists.';
33
33
  }
34
34
  if (hasCondition) {
35
35
  if (!data?.Rule?.BooleanExpression) {
36
- return 'No valid Rule is specified';
36
+ return 'A valid rule is required.';
37
37
  }
38
38
  const ruleValidation = isAdaptableRuleValid(data, api, context);
39
39
  if (typeof ruleValidation === 'string') {
@@ -41,10 +41,10 @@ export const isSettingsValid = (hasCondition) => (data, api, context) => {
41
41
  }
42
42
  }
43
43
  if (typeof data.NudgeValue !== 'number') {
44
- return 'Nudge value is not specified';
44
+ return 'A nudge value is required.';
45
45
  }
46
46
  if (data.NudgeValue === 0) {
47
- return 'Nudge value must be different than 0';
47
+ return 'Nudge value must not be zero.';
48
48
  }
49
49
  return true;
50
50
  };
@@ -1,3 +1,3 @@
1
1
  import { AdaptableApi } from '../../../../Api/AdaptableApi';
2
2
  import { BaseSchedule } from '../../../../AdaptableState/Common/Schedule';
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";
3
+ export declare const isSettingsValid: (schedule: BaseSchedule, api: AdaptableApi) => true | "A name is required." | "A Schedule with this name already exists." | "Please select a message type." | "A reminder header is required." | "A reminder message is required." | "Please select a report." | "Please select a report format." | "Please select a report folder." | "Please select a report page.";
@@ -3,50 +3,50 @@ import StringExtensions from '../../../../Utilities/Extensions/StringExtensions'
3
3
  export const isSettingsValid = (schedule, api) => {
4
4
  // Validate Name - mandatory and unique
5
5
  if (!schedule.Name?.trim()) {
6
- return 'Name is required';
6
+ return 'A name is required.';
7
7
  }
8
8
  const allSchedules = api.scheduleApi.getSchedules();
9
9
  const isDuplicateName = allSchedules.some((s) => s.Name === schedule.Name && s.Uuid !== schedule.Uuid);
10
10
  if (isDuplicateName) {
11
- return 'A Schedule with this name already exists';
11
+ return 'A Schedule with this name already exists.';
12
12
  }
13
13
  if (schedule.ScheduleType === ScheduleType.Reminder) {
14
14
  const reminder = schedule;
15
15
  if (!reminder.MessageType) {
16
- return 'Message type not selected';
16
+ return 'Please select a message type.';
17
17
  }
18
18
  if (StringExtensions.IsNullOrEmpty(reminder?.Header)) {
19
- return 'Reminder header not specified';
19
+ return 'A reminder header is required.';
20
20
  }
21
21
  if (StringExtensions.IsNullOrEmpty(reminder?.Message)) {
22
- return 'Reminder message not specified';
22
+ return 'A reminder message is required.';
23
23
  }
24
24
  }
25
25
  if (schedule.ScheduleType === ScheduleType.Report) {
26
26
  const report = schedule;
27
27
  if (StringExtensions.IsNullOrEmpty(report?.ReportName)) {
28
- return 'Report source not specified';
28
+ return 'Please select a report.';
29
29
  }
30
30
  if (StringExtensions.IsNullOrEmpty(report?.ReportFormat)) {
31
- return 'Report format not selected';
31
+ return 'Please select a report format.';
32
32
  }
33
33
  }
34
34
  if (schedule.ScheduleType === ScheduleType.ipushpull) {
35
35
  const ipushpull = schedule;
36
36
  if (StringExtensions.IsNullOrEmpty(ipushpull?.IPushPullReport?.ReportName)) {
37
- return 'Report not selected';
37
+ return 'Please select a report.';
38
38
  }
39
39
  if (StringExtensions.IsNullOrEmpty(ipushpull?.IPushPullReport?.Folder)) {
40
- return 'Report folder not selected';
40
+ return 'Please select a report folder.';
41
41
  }
42
42
  if (StringExtensions.IsNullOrEmpty(ipushpull?.IPushPullReport?.Page)) {
43
- return 'Report page not selected';
43
+ return 'Please select a report page.';
44
44
  }
45
45
  }
46
46
  if (schedule.ScheduleType === ScheduleType.OpenFin) {
47
47
  const openfin = schedule;
48
48
  if (StringExtensions.IsNullOrEmpty(openfin?.OpenFinReport?.ReportName)) {
49
- return 'Report not selected';
49
+ return 'Please select a report.';
50
50
  }
51
51
  }
52
52
  return true;
@@ -6,7 +6,7 @@ export const handleExportState = (type, name, state, api) => {
6
6
  Helper.copyToClipboard(stringifiedState);
7
7
  break;
8
8
  case 'Console':
9
- api.consoleLog('Adaptable State: ', state);
9
+ api.consoleLog('Adaptable state:', state);
10
10
  break;
11
11
  case 'JSON':
12
12
  const jsonFileName = name + '.json';
@@ -15,7 +15,7 @@ export const renderStyledColumnColumnSummary = (data) => {
15
15
  };
16
16
  export const isValidStyledColumnColumn = (data) => {
17
17
  if (!data.ColumnId) {
18
- return 'You have to select a Column for Styled Column';
18
+ return 'Please select a column for the Styled Column.';
19
19
  }
20
20
  return true;
21
21
  };