@adaptabletools/adaptable 13.0.0-canary.20 → 13.0.0-canary.22

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 (62) hide show
  1. package/bundle.cjs.js +218 -218
  2. package/package.json +1 -1
  3. package/publishTimestamp.d.ts +1 -1
  4. package/publishTimestamp.js +1 -1
  5. package/src/AdaptableOptions/UserInterfaceOptions.d.ts +2 -2
  6. package/src/Api/AdaptableApi.d.ts +0 -5
  7. package/src/Api/ConfigApi.d.ts +0 -5
  8. package/src/Api/Implementation/AdaptableApiImpl.d.ts +0 -2
  9. package/src/Api/Implementation/AdaptableApiImpl.js +0 -3
  10. package/src/Api/Implementation/AlertApiImpl.js +9 -4
  11. package/src/Api/Implementation/ConfigApiImpl.d.ts +0 -2
  12. package/src/Api/Implementation/ConfigApiImpl.js +0 -11
  13. package/src/Api/Implementation/FlashingCellApiImpl.js +4 -1
  14. package/src/Api/Implementation/InternalApiImpl.d.ts +1 -0
  15. package/src/Api/Implementation/InternalApiImpl.js +5 -0
  16. package/src/Api/InternalApi.d.ts +1 -0
  17. package/src/Redux/DeadRedux.d.ts +6 -0
  18. package/src/Redux/DeadRedux.js +19 -1
  19. package/src/Redux/Store/AdaptableStore.js +2 -8
  20. package/src/Strategy/ConditionalStyleModule.d.ts +2 -23
  21. package/src/Strategy/ConditionalStyleModule.js +0 -189
  22. package/src/Strategy/FormatColumnModule.js +2 -2
  23. package/src/Strategy/LayoutModule.js +0 -4
  24. package/src/Utilities/Defaults/DefaultSettingsPanel.js +0 -1
  25. package/src/Utilities/Services/ModuleService.js +0 -2
  26. package/src/Utilities/Services/QueryLanguageService.js +1 -1
  27. package/src/View/Alert/Wizard/AlertBehaviourWizardSection.js +12 -11
  28. package/src/View/Alert/Wizard/AlertButtonsEditor.js +24 -1
  29. package/src/View/Alert/Wizard/isValidAlertRules.js +1 -1
  30. package/src/View/GridInfo/ColumnInfoComponent.js +0 -7
  31. package/src/agGrid/agGridHelper.js +1 -2
  32. package/src/metamodel/adaptable.metamodel.d.ts +22 -26
  33. package/src/metamodel/adaptable.metamodel.js +1 -1
  34. package/src/types.d.ts +0 -2
  35. package/version.d.ts +1 -1
  36. package/version.js +1 -1
  37. package/src/Api/ConditionalStyleApi.d.ts +0 -86
  38. package/src/Api/ConditionalStyleApi.js +0 -2
  39. package/src/Api/Implementation/ConditionalStyleApiImpl.d.ts +0 -29
  40. package/src/Api/Implementation/ConditionalStyleApiImpl.js +0 -98
  41. package/src/Redux/ActionsReducers/ConditionalStyleRedux.d.ts +0 -31
  42. package/src/Redux/ActionsReducers/ConditionalStyleRedux.js +0 -77
  43. package/src/Strategy/Interface/IConditionalStyleModule.d.ts +0 -6
  44. package/src/Strategy/Interface/IConditionalStyleModule.js +0 -2
  45. package/src/Strategy/Utilities/getStyleViewItems.d.ts +0 -2
  46. package/src/Strategy/Utilities/getStyleViewItems.js +0 -16
  47. package/src/View/ConditionalStyle/ConditionalStylePopupHeader.d.ts +0 -2
  48. package/src/View/ConditionalStyle/ConditionalStylePopupHeader.js +0 -18
  49. package/src/View/ConditionalStyle/ConditionalStyleSummary.d.ts +0 -25
  50. package/src/View/ConditionalStyle/ConditionalStyleSummary.js +0 -108
  51. package/src/View/ConditionalStyle/Wizard/ConditionalStyleRuleWizardSection.d.ts +0 -9
  52. package/src/View/ConditionalStyle/Wizard/ConditionalStyleRuleWizardSection.js +0 -42
  53. package/src/View/ConditionalStyle/Wizard/ConditionalStyleScopeWizardSection.d.ts +0 -8
  54. package/src/View/ConditionalStyle/Wizard/ConditionalStyleScopeWizardSection.js +0 -43
  55. package/src/View/ConditionalStyle/Wizard/ConditionalStyleSettingsWizardSettings.d.ts +0 -8
  56. package/src/View/ConditionalStyle/Wizard/ConditionalStyleSettingsWizardSettings.js +0 -29
  57. package/src/View/ConditionalStyle/Wizard/ConditionalStyleStyleWizardSection.d.ts +0 -8
  58. package/src/View/ConditionalStyle/Wizard/ConditionalStyleStyleWizardSection.js +0 -23
  59. package/src/View/ConditionalStyle/Wizard/ConditionalStyleWizard.d.ts +0 -6
  60. package/src/View/ConditionalStyle/Wizard/ConditionalStyleWizard.js +0 -104
  61. package/src/View/ConditionalStyle/Wizard/DEFAULT_PREDICATE_ID_FOR_CONDITIONAL_STYLE.d.ts +0 -1
  62. package/src/View/ConditionalStyle/Wizard/DEFAULT_PREDICATE_ID_FOR_CONDITIONAL_STYLE.js +0 -4
@@ -38,9 +38,8 @@ const HighlightStyle = (props) => {
38
38
  props.onChange(checked);
39
39
  } }, props.label),
40
40
  Boolean(props.highlight) && (React.createElement(DropdownButton_1.default, { items: options, columns: ['label'] }, typeof props.highlight === 'boolean' ? (React.createElement(rebass_1.Text, { fontSize: 2, mt: 1 },
41
- "Use Message Type's",
42
- ' ',
43
- (0, AdaptableContext_1.useAdaptable)().api.internalApi.getCorrectEnglishVariant('Colour'))) : (React.createElement(rebass_1.Text, { fontSize: 2, mt: 1 }, "Create a Custom Style"))))),
41
+ "Use Message Type's ",
42
+ adaptable.api.internalApi.getCorrectEnglishVariant('Colour'))) : (React.createElement(rebass_1.Text, { fontSize: 2, mt: 1 }, "Create a Custom Style"))))),
44
43
  typeof props.highlight === 'object' && (React.createElement(Panel_1.default, { margin: 2 },
45
44
  React.createElement(rebass_1.Box, { paddingLeft: 3 },
46
45
  React.createElement(StyleComponent_1.StyleComponent, { headless: true, api: adaptable.api, Style: props.highlight, UpdateStyle: (style) => {
@@ -93,32 +92,34 @@ const AlertBehaviourWizardSection = (props) => {
93
92
  const rowAddedAlert = api.internalApi.isAlertDefinitionForAddedRowChangeEvent(data);
94
93
  const rowRemovedAlert = api.internalApi.isAlertDefinitionForRemovedRowChangeEvent(data);
95
94
  const cellChangedAlert = !rowAddedAlert && !rowRemovedAlert;
95
+ const hasPreventCellEdit = cellChangedAlert;
96
+ const hasHighlightCell = cellChangedAlert;
97
+ const hasHighlightRow = cellChangedAlert || rowAddedAlert;
98
+ const hasJumpToCell = cellChangedAlert;
99
+ const hasJumpToRow = cellChangedAlert || rowAddedAlert;
96
100
  const onChange = (AlertProperties) => {
97
101
  props.onChange(Object.assign(Object.assign({}, data), { AlertProperties: Object.assign(Object.assign({}, data.AlertProperties), AlertProperties) }));
98
102
  };
99
103
  return (React.createElement(Tabs_1.Tabs, null,
100
104
  React.createElement(Tabs_1.Tabs.Tab, null, api.internalApi.getCorrectEnglishVariant('Behaviour')),
101
105
  React.createElement(Tabs_1.Tabs.Content, null,
102
- cellChangedAlert && (React.createElement(CheckBox_1.CheckBox, { "data-name": "prevet-cell-edit", style: { alignItems: 'flex-start' }, checked: AlertProperties.PreventEdit, onChange: (PreventEdit) => {
106
+ hasPreventCellEdit && (React.createElement(CheckBox_1.CheckBox, { "data-name": "prevent-cell-edit", style: { alignItems: 'flex-start' }, checked: AlertProperties.PreventEdit, onChange: (PreventEdit) => {
103
107
  onChange({
104
108
  PreventEdit,
105
109
  });
106
110
  } },
107
111
  "Prevent Cell Edit",
108
112
  React.createElement(rebass_1.Text, { fontSize: 2, mt: 1 }, "(automatically undo data change which triggered Alert)"))),
109
- cellChangedAlert && (React.createElement(HighlightStyle, { dataName: "highlight-cell", highlight: AlertProperties.HighlightCell, label: "Highlight Cell", onChange: (HighlightCell) => {
113
+ hasHighlightCell && (React.createElement(HighlightStyle, { dataName: "highlight-cell", highlight: AlertProperties.HighlightCell, label: "Highlight Cell", onChange: (HighlightCell) => {
110
114
  onChange({ HighlightCell });
111
115
  } })),
112
- cellChangedAlert && (React.createElement(HighlightStyle, { dataName: "highlight-row", highlight: AlertProperties.HighlightRow, label: "Highlight Row", onChange: (HighlightRow) => {
116
+ hasHighlightRow && (React.createElement(HighlightStyle, { dataName: "highlight-row", highlight: AlertProperties.HighlightRow, label: "Highlight Row", onChange: (HighlightRow) => {
113
117
  onChange({ HighlightRow });
114
118
  } })),
115
- rowAddedAlert && (React.createElement(HighlightStyle, { dataName: "highlight-row", highlight: AlertProperties.HighlightRow, label: "Highlight Row", onChange: (HighlightRow) => {
116
- onChange({ HighlightRow });
117
- } })),
118
- cellChangedAlert && (React.createElement(CheckBox_1.CheckBox, { "data-name": "jump-to-cell", checked: AlertProperties.JumpToCell, onChange: (JumpToCell) => {
119
+ hasJumpToCell && (React.createElement(CheckBox_1.CheckBox, { "data-name": "jump-to-cell", checked: AlertProperties.JumpToCell, onChange: (JumpToCell) => {
119
120
  onChange({ JumpToCell });
120
121
  } }, "Jump To Cell")),
121
- rowAddedAlert && (React.createElement(CheckBox_1.CheckBox, { "data-name": "jump-to-row", checked: AlertProperties.JumpToRow, onChange: (JumpToRow) => {
122
+ hasJumpToRow && (React.createElement(CheckBox_1.CheckBox, { "data-name": "jump-to-row", checked: AlertProperties.JumpToRow, onChange: (JumpToRow) => {
122
123
  onChange({ JumpToRow });
123
124
  } }, "Jump To Row")),
124
125
  React.createElement(CheckBox_1.CheckBox, { "data-name": "show-in-div", checked: AlertProperties.ShowInDiv, onChange: (ShowInDiv) => {
@@ -17,9 +17,32 @@ const AlertButtonsEditor = (props) => {
17
17
  const onChange = (newButtons) => {
18
18
  props.onChange(newButtons);
19
19
  };
20
+ const alertDefinition = adaptableAlert.alertDefinition;
21
+ const rowAddedAlert = api.internalApi.isAlertDefinitionForAddedRowChangeEvent(alertDefinition);
22
+ const rowRemovedAlert = api.internalApi.isAlertDefinitionForRemovedRowChangeEvent(alertDefinition);
23
+ const cellChangedAlert = !rowAddedAlert && !rowRemovedAlert;
24
+ const hasHighlightCell = cellChangedAlert;
25
+ const hasHighlightRow = cellChangedAlert || rowAddedAlert;
26
+ const hasJumpToCell = cellChangedAlert;
27
+ const hasJumpToRow = cellChangedAlert || rowAddedAlert;
28
+ const hasUndo = cellChangedAlert;
20
29
  const AlertButtons = (0, Helper_1.cloneObject)(props.AlertButtons || []) || [];
21
30
  const buttonActions = [];
22
- buttonActions.push('highlight-row', 'jump-to-row', 'highlight-cell', 'jump-to-cell', 'undo');
31
+ if (hasHighlightRow) {
32
+ buttonActions.push('highlight-row');
33
+ }
34
+ if (hasJumpToRow) {
35
+ buttonActions.push('jump-to-row');
36
+ }
37
+ if (hasHighlightCell) {
38
+ buttonActions.push('highlight-cell');
39
+ }
40
+ if (hasJumpToCell) {
41
+ buttonActions.push('jump-to-cell');
42
+ }
43
+ if (hasUndo) {
44
+ buttonActions.push('undo');
45
+ }
23
46
  buttonActions.push('suspend');
24
47
  return (React.createElement(React.Fragment, null,
25
48
  React.createElement(rebass_1.Flex, { flexDirection: "row", alignItems: "center", justifyContent: "space-between" },
@@ -38,7 +38,7 @@ const isValidAlertRules = (alert, api, context) => {
38
38
  if (valid && alert.Rule.AggregatedBooleanExpression) {
39
39
  valid = api.queryLanguageApi.isValidAggregatedBooleanExpression(alert.Rule.AggregatedBooleanExpression, ModuleConstants_1.AlertModuleId);
40
40
  if (!valid) {
41
- return 'The Expression is not a valid Aggregation Expression';
41
+ return 'The Expression is not a valid AggregatedBoolean Expression';
42
42
  }
43
43
  }
44
44
  return true;
@@ -6,7 +6,6 @@ const React = tslib_1.__importStar(require("react"));
6
6
  const rebass_1 = require("rebass");
7
7
  const ModuleConstants = tslib_1.__importStar(require("../../Utilities/Constants/ModuleConstants"));
8
8
  const CustomSortSummary_1 = require("../CustomSort/CustomSortSummary");
9
- const ConditionalStyleSummary_1 = require("../ConditionalStyle/ConditionalStyleSummary");
10
9
  const FilterSummary_1 = require("../Filter/FilterSummary");
11
10
  const PlusMinusSummary_1 = require("../PlusMinus/PlusMinusSummary");
12
11
  const FormatColumnSummary_1 = require("../FormatColumn/FormatColumnSummary");
@@ -100,12 +99,6 @@ class ColumnInfoComponent extends React.Component {
100
99
  : '' },
101
100
  React.createElement(CustomSortSummary_1.CustomSortSummary, { key: ModuleConstants.CustomSortModuleId, summarisedColumn: this.state.SelectedColumn, teamSharingActivated: this.props.teamSharingActivated, accessLevel: this.getAccessLevel(ModuleConstants.CustomSortModuleId), api: this.props.api, moduleInfo: moduleService.getModuleInfoByModule(ModuleConstants.CustomSortModuleId) })));
102
101
  }
103
- if (this.isModuleAvailable(ModuleConstants.ConditionalStyleModuleId)) {
104
- summaries.push(React.createElement("div", { key: ModuleConstants.ConditionalStyleModuleId, className: this.isModuleReadOnly(ModuleConstants.ConditionalStyleModuleId)
105
- ? GeneralConstants.READ_ONLY_STYLE
106
- : '' },
107
- React.createElement(ConditionalStyleSummary_1.ConditionalStyleSummary, { key: ModuleConstants.ConditionalStyleModuleId, summarisedColumn: this.state.SelectedColumn, teamSharingActivated: this.props.teamSharingActivated, accessLevel: this.getAccessLevel(ModuleConstants.ConditionalStyleModuleId), api: this.props.api, moduleInfo: moduleService.getModuleInfoByModule(ModuleConstants.ConditionalStyleModuleId) })));
108
- }
109
102
  if (this.isModuleAvailable(ModuleConstants.FilterModuleId)) {
110
103
  summaries.push(React.createElement("div", { key: ModuleConstants.FilterModuleId, className: this.isModuleReadOnly(ModuleConstants.FilterModuleId)
111
104
  ? GeneralConstants.READ_ONLY_STYLE
@@ -7,7 +7,6 @@ const AlertModule_1 = require("../Strategy/AlertModule");
7
7
  const BulkUpdateModule_1 = require("../Strategy/BulkUpdateModule");
8
8
  const CalculatedColumnModule_1 = require("../Strategy/CalculatedColumnModule");
9
9
  const CellSummaryModule_1 = require("../Strategy/CellSummaryModule");
10
- const ConditionalStyleModule_1 = require("../Strategy/ConditionalStyleModule");
11
10
  const CustomSortModule_1 = require("../Strategy/CustomSortModule");
12
11
  const DashboardModule_1 = require("../Strategy/DashboardModule");
13
12
  const DataSetModule_1 = require("../Strategy/DataSetModule");
@@ -81,7 +80,7 @@ class agGridHelper {
81
80
  modules.set(ModuleConstants.BulkUpdateModuleId, new BulkUpdateModule_1.BulkUpdateModule(api));
82
81
  modules.set(ModuleConstants.CalculatedColumnModuleId, new CalculatedColumnModule_1.CalculatedColumnModule(api));
83
82
  modules.set(ModuleConstants.CellSummaryModuleId, new CellSummaryModule_1.CellSummaryModule(api));
84
- modules.set(ModuleConstants.ConditionalStyleModuleId, new ConditionalStyleModule_1.ConditionalStyleModule(api));
83
+ // modules.set(ModuleConstants.ConditionalStyleModuleId, new ConditionalStyleModule(api));
85
84
  modules.set(ModuleConstants.CustomSortModuleId, new CustomSortModule_1.CustomSortModule(api));
86
85
  modules.set(ModuleConstants.DataChangeHistoryModuleId, new DataChangeHistoryModule_1.DataChangeHistoryModule(api));
87
86
  modules.set(ModuleConstants.DataSetModuleId, new DataSetModule_1.DataSetModule(api));
@@ -1610,32 +1610,6 @@ export declare const ADAPTABLE_METAMODEL: {
1610
1610
  reference: string;
1611
1611
  }[];
1612
1612
  };
1613
- ConditionalStyle: {
1614
- name: string;
1615
- kind: string;
1616
- description: string;
1617
- };
1618
- ConditionalStyleApi: {
1619
- name: string;
1620
- kind: string;
1621
- description: string;
1622
- properties: {
1623
- name: string;
1624
- kind: string;
1625
- description: string;
1626
- uiLabel: string;
1627
- }[];
1628
- };
1629
- ConditionalStyleRule: {
1630
- name: string;
1631
- kind: string;
1632
- description: string;
1633
- };
1634
- ConditionalStyleState: {
1635
- name: string;
1636
- kind: string;
1637
- description: string;
1638
- };
1639
1613
  ConfigApi: {
1640
1614
  name: string;
1641
1615
  kind: string;
@@ -1874,6 +1848,28 @@ export declare const ADAPTABLE_METAMODEL: {
1874
1848
  name: string;
1875
1849
  kind: string;
1876
1850
  description: string;
1851
+ properties: ({
1852
+ name: string;
1853
+ kind: string;
1854
+ description: string;
1855
+ uiLabel: string;
1856
+ isOptional?: undefined;
1857
+ reference?: undefined;
1858
+ } | {
1859
+ name: string;
1860
+ kind: string;
1861
+ description: string;
1862
+ uiLabel: string;
1863
+ isOptional: boolean;
1864
+ reference?: undefined;
1865
+ } | {
1866
+ name: string;
1867
+ kind: string;
1868
+ description: string;
1869
+ uiLabel: string;
1870
+ reference: string;
1871
+ isOptional?: undefined;
1872
+ })[];
1877
1873
  };
1878
1874
  CustomDisplayFormatterContext: {
1879
1875
  name: string;