@adaptabletools/adaptable 10.0.4-canary.5 → 11.0.0-canary.0

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 (179) hide show
  1. package/base.css +1 -5
  2. package/bundle.cjs.js +115 -113
  3. package/index.css +1 -7
  4. package/package.json +2 -2
  5. package/publishTimestamp.d.ts +1 -1
  6. package/publishTimestamp.js +1 -1
  7. package/src/AdaptableInterfaces/IAdaptable.d.ts +9 -3
  8. package/src/AdaptableOptions/AdaptableOptions.d.ts +13 -2
  9. package/src/AdaptableOptions/ContainerOptions.d.ts +0 -7
  10. package/src/AdaptableOptions/DashboardOptions.d.ts +4 -7
  11. package/src/AdaptableOptions/FlashingCellOptions.d.ts +31 -0
  12. package/src/AdaptableOptions/{ChartPluginOptions.js → FlashingCellOptions.js} +0 -0
  13. package/src/AdaptableOptions/GeneralOptions.d.ts +1 -1
  14. package/src/AdaptableOptions/MenuOptions.d.ts +2 -2
  15. package/src/AdaptableOptions/NotificationsOptions.d.ts +0 -7
  16. package/src/AdaptableOptions/SettingsPanelOptions.d.ts +14 -2
  17. package/src/AdaptableOptions/ToolPanelOptions.d.ts +0 -14
  18. package/src/AdaptableOptions/UserInterfaceOptions.d.ts +5 -0
  19. package/src/Api/AdaptableApi.d.ts +6 -6
  20. package/src/Api/ChartingApi.d.ts +9 -0
  21. package/src/Api/{ChartApi.js → ChartingApi.js} +0 -0
  22. package/src/Api/ColumnApi.d.ts +11 -1
  23. package/src/Api/ConfigApi.d.ts +0 -12
  24. package/src/Api/EventApi.d.ts +3 -3
  25. package/src/Api/Events/AdaptableReady.d.ts +1 -1
  26. package/src/Api/Events/FlashingCellDisplayed.d.ts +2 -2
  27. package/src/Api/FlashingCellApi.d.ts +35 -24
  28. package/src/Api/Implementation/AdaptableApiImpl.d.ts +2 -2
  29. package/src/Api/Implementation/AdaptableApiImpl.js +2 -2
  30. package/src/Api/Implementation/CalculatedColumnApiImpl.js +1 -1
  31. package/src/Api/Implementation/ChartingApiImpl.d.ts +5 -0
  32. package/src/Api/Implementation/ChartingApiImpl.js +10 -0
  33. package/src/Api/Implementation/ColumnApiImpl.d.ts +3 -1
  34. package/src/Api/Implementation/ColumnApiImpl.js +9 -3
  35. package/src/Api/Implementation/ConfigApiImpl.d.ts +0 -4
  36. package/src/Api/Implementation/ConfigApiImpl.js +0 -16
  37. package/src/Api/Implementation/FlashingCellApiImpl.d.ts +8 -4
  38. package/src/Api/Implementation/FlashingCellApiImpl.js +39 -24
  39. package/src/Api/Implementation/FreeTextColumnApiImpl.js +1 -1
  40. package/src/Api/Implementation/GridApiImpl.js +1 -1
  41. package/src/Api/Implementation/InternalApiImpl.d.ts +0 -4
  42. package/src/Api/Implementation/InternalApiImpl.js +1 -7
  43. package/src/Api/Implementation/PluginsApiImpl.d.ts +0 -2
  44. package/src/Api/Implementation/PluginsApiImpl.js +0 -6
  45. package/src/Api/Implementation/PlusMinusApiImpl.js +1 -1
  46. package/src/Api/Implementation/QueryApiImpl.js +1 -1
  47. package/src/Api/Implementation/ToolPanelApiImpl.js +2 -2
  48. package/src/Api/InternalApi.d.ts +0 -4
  49. package/src/Api/PluginsApi.d.ts +0 -2
  50. package/src/PredefinedConfig/AdaptableState.d.ts +0 -4
  51. package/src/PredefinedConfig/Common/AdaptablePredicate.d.ts +4 -4
  52. package/src/PredefinedConfig/Common/AdaptablePredicate.js +38 -38
  53. package/src/PredefinedConfig/Common/Enums.js +1 -0
  54. package/src/PredefinedConfig/Common/Menu.d.ts +15 -19
  55. package/src/PredefinedConfig/Common/SpecialColumnSettings.d.ts +4 -0
  56. package/src/PredefinedConfig/Common/Types.d.ts +5 -5
  57. package/src/PredefinedConfig/Common/Types.js +0 -2
  58. package/src/PredefinedConfig/FlashingCellState.d.ts +14 -19
  59. package/src/PredefinedConfig/PredefinedConfig.d.ts +0 -10
  60. package/src/PredefinedConfig/SystemState.d.ts +0 -4
  61. package/src/PredefinedConfig/ThemeState.d.ts +2 -1
  62. package/src/Redux/ActionsReducers/DashboardRedux.js +1 -1
  63. package/src/Redux/ActionsReducers/PopupRedux.d.ts +0 -2
  64. package/src/Redux/ActionsReducers/SystemRedux.d.ts +0 -12
  65. package/src/Redux/ActionsReducers/SystemRedux.js +1 -21
  66. package/src/Redux/ActionsReducers/ToolPanelRedux.js +1 -2
  67. package/src/Redux/Store/AdaptableStore.js +10 -20
  68. package/src/Strategy/AdaptableModuleBase.d.ts +1 -1
  69. package/src/Strategy/AdaptableModuleBase.js +0 -3
  70. package/src/Strategy/AlertModule.js +1 -1
  71. package/src/Strategy/CalculatedColumnModule.js +17 -12
  72. package/src/Strategy/ChartingModule.d.ts +7 -0
  73. package/src/Strategy/ChartingModule.js +15 -0
  74. package/src/Strategy/ConditionalStyleModule.js +1 -1
  75. package/src/Strategy/FilterModule.js +3 -2
  76. package/src/Strategy/FlashingCellModule.js +4 -4
  77. package/src/Strategy/FormatColumnModule.js +2 -2
  78. package/src/Strategy/Interface/IModule.d.ts +0 -1
  79. package/src/Strategy/LayoutModule.js +15 -3
  80. package/src/Strategy/QueryModule.d.ts +1 -1
  81. package/src/Strategy/QueryModule.js +1 -3
  82. package/src/Strategy/SetingsPanelModule.d.ts +1 -0
  83. package/src/Strategy/SetingsPanelModule.js +7 -1
  84. package/src/Strategy/Utilities/getFlashingTargetViewItems.d.ts +5 -0
  85. package/src/Strategy/Utilities/getFlashingTargetViewItems.js +9 -0
  86. package/src/Strategy/Utilities/getFormatColumnStyleViewItems.d.ts +3 -0
  87. package/src/Strategy/Utilities/getFormatColumnStyleViewItems.js +10 -0
  88. package/src/Utilities/Constants/ConfigConstants.d.ts +0 -1
  89. package/src/Utilities/Constants/ConfigConstants.js +1 -2
  90. package/src/Utilities/Constants/GeneralConstants.d.ts +0 -9
  91. package/src/Utilities/Constants/GeneralConstants.js +1 -12
  92. package/src/Utilities/Constants/ModuleConstants.d.ts +1 -2
  93. package/src/Utilities/Constants/ModuleConstants.js +2 -3
  94. package/src/Utilities/Defaults/DefaultAdaptableOptions.js +19 -18
  95. package/src/Utilities/Defaults/DefaultSettingsPanel.d.ts +2 -1
  96. package/src/Utilities/Helpers/AdaptableHelper.js +2 -2
  97. package/src/Utilities/Interface/MessagePopups.d.ts +0 -3
  98. package/src/Utilities/ObjectFactory.d.ts +0 -10
  99. package/src/Utilities/ObjectFactory.js +2 -65
  100. package/src/Utilities/Services/EntitlementService.js +1 -1
  101. package/src/Utilities/Services/ModuleService.js +7 -11
  102. package/src/View/AdaptableView.js +1 -7
  103. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ColumnsList.d.ts +4 -3
  104. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ColumnsList.js +2 -1
  105. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationForm.js +9 -9
  106. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/index.js +3 -3
  107. package/src/View/AdaptableWizardView/index.js +1 -1
  108. package/src/View/Alert/AlertEmptyView.js +1 -1
  109. package/src/View/Alert/Wizard/AlertRulesWizardSection.d.ts +1 -0
  110. package/src/View/Alert/Wizard/AlertWizard.js +3 -3
  111. package/src/View/Alert/Wizard/BaseAlertRulesWizardSection.d.ts +1 -0
  112. package/src/View/Alert/Wizard/BaseAlertRulesWizardSection.js +4 -1
  113. package/src/View/CalculatedColumn/Utilities/getCalculatedColumnSettingTags.js +0 -1
  114. package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.d.ts +1 -0
  115. package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +1 -1
  116. package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.js +2 -1
  117. package/src/View/Components/ModuleValueSelector/index.d.ts +3 -1
  118. package/src/View/Components/ModuleValueSelector/index.js +1 -1
  119. package/src/View/Components/NewScopeComponent.js +1 -1
  120. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopup.js +5 -4
  121. package/src/View/Components/ToolPanel/AdaptableToolPanel.js +45 -80
  122. package/src/View/Components/ToolPanel/ToolPanelPopup.js +8 -1
  123. package/src/View/Components/ValueSelector/index.d.ts +1 -0
  124. package/src/View/Components/ValueSelector/index.js +2 -2
  125. package/src/View/Dashboard/Dashboard.js +11 -34
  126. package/src/View/Dashboard/DashboardPopup.js +22 -14
  127. package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +3 -2
  128. package/src/View/FlashingCell/Wizard/FlashingCellDurationWizardSection.js +1 -1
  129. package/src/View/FlashingCell/Wizard/FlashingCellRulesWizardSection.js +6 -6
  130. package/src/View/FlashingCell/Wizard/FlashingCellWizard.js +1 -3
  131. package/src/View/FlashingCell/Wizard/isValidFlashingCellRules.js +1 -1
  132. package/src/View/GridInfo/GridInfoPopup.js +3 -2
  133. package/src/View/Query/Wizard/NamedQueryWizard.js +10 -7
  134. package/src/View/QuickSearch/QuickSearchPopup.js +1 -1
  135. package/src/View/Shortcut/shortcutKeys.js +0 -1
  136. package/src/View/UIHelper.d.ts +0 -4
  137. package/src/View/UIHelper.js +1 -34
  138. package/src/agGrid/Adaptable.d.ts +10 -5
  139. package/src/agGrid/Adaptable.js +59 -49
  140. package/src/agGrid/agGridHelper.d.ts +1 -2
  141. package/src/agGrid/agGridHelper.js +7 -4
  142. package/src/agGrid/agGridMenuHelper.js +11 -7
  143. package/src/components/ApplicationIcon.d.ts +1 -1
  144. package/src/components/icons/column-add.d.ts +3 -0
  145. package/src/components/icons/column-add.js +10 -0
  146. package/src/components/icons/index.js +2 -0
  147. package/src/metamodel/adaptable.metamodel.d.ts +58 -91
  148. package/src/metamodel/adaptable.metamodel.js +239 -288
  149. package/src/types.d.ts +4 -7
  150. package/version.d.ts +1 -1
  151. package/version.js +1 -1
  152. package/src/AdaptableOptions/ChartPluginOptions.d.ts +0 -20
  153. package/src/Api/ChartApi.d.ts +0 -20
  154. package/src/Api/Implementation/SparklineColumnApiImpl.d.ts +0 -9
  155. package/src/Api/Implementation/SparklineColumnApiImpl.js +0 -24
  156. package/src/Api/SparklineColumnApi.d.ts +0 -23
  157. package/src/Api/SparklineColumnApi.js +0 -2
  158. package/src/PredefinedConfig/ChartState.d.ts +0 -144
  159. package/src/PredefinedConfig/ChartState.js +0 -2
  160. package/src/PredefinedConfig/Common/ChartEnums.d.ts +0 -123
  161. package/src/PredefinedConfig/Common/ChartEnums.js +0 -152
  162. package/src/PredefinedConfig/SparklineColumnState.d.ts +0 -40
  163. package/src/PredefinedConfig/SparklineColumnState.js +0 -2
  164. package/src/Redux/ActionsReducers/SparklineColumnRedux.d.ts +0 -35
  165. package/src/Redux/ActionsReducers/SparklineColumnRedux.js +0 -70
  166. package/src/Utilities/Defaults/DefaultCategoryChartProperties.d.ts +0 -2
  167. package/src/Utilities/Defaults/DefaultCategoryChartProperties.js +0 -56
  168. package/src/Utilities/Defaults/DefaultPieChartProperties.d.ts +0 -2
  169. package/src/Utilities/Defaults/DefaultPieChartProperties.js +0 -13
  170. package/src/Utilities/Defaults/DefaultSparklinesChartProperties.d.ts +0 -2
  171. package/src/Utilities/Defaults/DefaultSparklinesChartProperties.js +0 -25
  172. package/src/View/Components/Panels/PanelWithIImageThreeButtons.d.ts +0 -11
  173. package/src/View/Components/Panels/PanelWithIImageThreeButtons.js +0 -28
  174. package/src/View/Components/Popups/AdaptableChart.d.ts +0 -18
  175. package/src/View/Components/Popups/AdaptableChart.js +0 -40
  176. package/src/View/Components/SharedProps/ChartDisplayPopupPropsBase.d.ts +0 -7
  177. package/src/View/Components/SharedProps/ChartDisplayPopupPropsBase.js +0 -2
  178. package/src/components/ChartContainer/index.d.ts +0 -15
  179. package/src/components/ChartContainer/index.js +0 -22
@@ -2,6 +2,7 @@
2
2
  import { AlertDefinition } from '../../../PredefinedConfig/AlertState';
3
3
  declare type AlertRulesWizardSectionProps = {
4
4
  onChange: (data: AlertDefinition) => void;
5
+ module: 'alert' | 'flashingCell';
5
6
  };
6
7
  export declare const AlertRulesWizardSection: (props: AlertRulesWizardSectionProps) => JSX.Element;
7
8
  export declare const renderAlertRulesSummary: (alertDefinition: AlertDefinition) => JSX.Element;
@@ -60,16 +60,16 @@ exports.AlertWizard = (props) => {
60
60
  React.createElement("b", null, "when"),
61
61
  " the Alert should trigger")),
62
62
  isValid: isValidAlertRules_1.isValidAlertRules,
63
- render: () => React.createElement(AlertRulesWizardSection_1.AlertRulesWizardSection, { onChange: setAlertDefinition }),
63
+ render: () => React.createElement(AlertRulesWizardSection_1.AlertRulesWizardSection, { onChange: setAlertDefinition, module: "alert" }),
64
64
  renderSummary: AlertRulesWizardSection_1.renderAlertRulesSummary,
65
- title: 'Condition',
65
+ title: 'Rule',
66
66
  },
67
67
  {
68
68
  details: "Select the Alert's Message Type and Notification option",
69
69
  render: () => (React.createElement(rebass_1.Box, { padding: 2 },
70
70
  React.createElement(AlertDisplayWizardSection_1.AlertDisplayWizardSection, { onChange: setAlertDefinition }))),
71
71
  renderSummary: AlertDisplayWizardSection_1.renderAlertDisplaySummary,
72
- title: 'Type and Display',
72
+ title: 'Type & Display',
73
73
  },
74
74
  {
75
75
  details: 'Configure behaviour for the Alert',
@@ -3,6 +3,7 @@ import { AlertDefinition } from '../../../types';
3
3
  import { FlashingCellDefinition } from '../../../../types';
4
4
  export interface BaseAlertRulesWizardSectionProps<T> {
5
5
  onChange: (data: T) => void;
6
+ module: 'alert' | 'flashingCell';
6
7
  wholeRowScope?: boolean;
7
8
  children?: React.ReactNode;
8
9
  }
@@ -8,7 +8,10 @@ const EntityRulesEditor_1 = require("../../Components/EntityRulesEditor");
8
8
  exports.BaseAlertRulesWizardSection = (props) => {
9
9
  const { data, api, moduleInfo } = OnePageAdaptableWizard_1.useOnePageWizardContext();
10
10
  const wholeRowScope = props.wholeRowScope != null ? props.wholeRowScope : api.scopeApi.scopeIsAll(data.Scope);
11
- return (React.createElement(EntityRulesEditor_1.EntityRulesEditor, { module: moduleInfo.ModuleName, defaultPredicateId: "Any", data: data, predicateDefs: api.alertApi.getAlertPredicateDefsForScope(data.Scope), onChange: props.onChange, showAggregation: !wholeRowScope ? false : true, showObservable: !wholeRowScope ? false : true, showBoolean: true, showPredicate: true, descriptions: {
11
+ const predicateDefs = props.module == 'alert'
12
+ ? api.alertApi.getAlertPredicateDefsForScope(data.Scope)
13
+ : api.flashingCellApi.getFlashingCellPredicateDefsForScope(data.Scope);
14
+ return (React.createElement(EntityRulesEditor_1.EntityRulesEditor, { module: moduleInfo.ModuleName, defaultPredicateId: "Any", data: data, predicateDefs: predicateDefs, onChange: props.onChange, showAggregation: !wholeRowScope ? false : true, showObservable: !wholeRowScope ? false : true, showBoolean: true, showPredicate: true, descriptions: {
12
15
  selectPredicate: 'Select an Alert Rule - to be applied when data changes',
13
16
  useBooleanQuery: (React.createElement(React.Fragment, null,
14
17
  "Use an BooleanQuery if ",
@@ -11,7 +11,6 @@ exports.getCalculatedColumnSettingTags = (settings) => {
11
11
  Resizable ? 'Resizable' : null,
12
12
  Groupable ? 'Groupable' : null,
13
13
  Sortable ? 'Sortable' : null,
14
- Pivotable ? 'Pivotable' : null,
15
14
  Aggregatable ? 'Aggregatable' : null,
16
15
  ].filter(Boolean);
17
16
  };
@@ -3,6 +3,7 @@ import { AdaptableApi } from '../../../Api/AdaptableApi';
3
3
  import { CalculatedColumn } from '../../../PredefinedConfig/CalculatedColumnState';
4
4
  export declare type CalculatedColumnSettingsWizardSectionProps = {
5
5
  onChange: (data: CalculatedColumn) => void;
6
+ isEdit: boolean;
6
7
  };
7
8
  export declare const renderCalculatedColumnSettingsSummary: (data: CalculatedColumn) => JSX.Element;
8
9
  export declare const isValidCalculatedColumnSettings: (data: CalculatedColumn, api: AdaptableApi) => true | string;
@@ -59,7 +59,7 @@ exports.CalculatedColumnSettingsWizardSection = (props) => {
59
59
  const aggregatable = dataType == 'Number' ? (_a = data.CalculatedColumnSettings) === null || _a === void 0 ? void 0 : _a.Aggregatable : false;
60
60
  props.onChange(Object.assign(Object.assign({}, data), { CalculatedColumnSettings: Object.assign(Object.assign({}, data.CalculatedColumnSettings), { DataType: dataType, Aggregatable: aggregatable }) }));
61
61
  };
62
- const inEdit = !!data.Uuid;
62
+ const inEdit = props.isEdit;
63
63
  const validCheck = exports.isValidCalculatedColumnSettings(data, api);
64
64
  const ErrorMessage = validCheck === true ? null : validCheck;
65
65
  let options = [
@@ -20,6 +20,7 @@ exports.CalculatedColumnWizard = (props) => {
20
20
  : ObjectFactory_1.default.CreateEmptyCalculatedColumn(adaptable.api.internalApi.getAdaptableOptions().filterOptions.enableFilterOnSpecialColumns);
21
21
  });
22
22
  const dispatch = react_redux_1.useDispatch();
23
+ const isEdit = Boolean(props.data);
23
24
  const handleFinish = () => {
24
25
  if (props.data) {
25
26
  dispatch(CalculatedColumnRedux.CalculatedColumnEdit(calculatedColumn));
@@ -46,7 +47,7 @@ exports.CalculatedColumnWizard = (props) => {
46
47
  renderSummary: CalculatedColumnSettingsWizardSection_1.renderCalculatedColumnSettingsSummary,
47
48
  render: () => {
48
49
  return (React.createElement(rebass_1.Box, { padding: 2 },
49
- React.createElement(CalculatedColumnSettingsWizardSection_1.CalculatedColumnSettingsWizardSection, { onChange: setCalculatedColumn })));
50
+ React.createElement(CalculatedColumnSettingsWizardSection_1.CalculatedColumnSettingsWizardSection, { isEdit: isEdit, onChange: setCalculatedColumn })));
50
51
  },
51
52
  },
52
53
  '-',
@@ -1,5 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import { ValueSelectorProps } from '../ValueSelector';
3
3
  import { AdaptableModule } from '../../../PredefinedConfig/Common/Types';
4
- export declare type ModuleValueSelectorProps = Omit<ValueSelectorProps<AdaptableModule, AdaptableModule>, 'allowReorder' | 'toIdentifier' | 'toLabel'>;
4
+ export interface ModuleValueSelectorProps extends Omit<ValueSelectorProps<AdaptableModule, AdaptableModule>, 'allowReorder' | 'toIdentifier' | 'toLabel'> {
5
+ isDisabled?: (module: AdaptableModule) => boolean;
6
+ }
5
7
  export declare const ModuleValueSelector: (props: ModuleValueSelectorProps) => JSX.Element;
@@ -30,5 +30,5 @@ exports.ModuleValueSelector = (props) => {
30
30
  const sortedOptions = react_1.useMemo(() => {
31
31
  return sortWithOrder_1.sortWithOrderArray(options, value, { sortUnorderedItems: true });
32
32
  }, [allowReorder, options, value]);
33
- return (React.createElement(ValueSelector_1.ValueSelector, Object.assign({}, valueSelectorProps, { options: sortedOptions, value: value, onChange: onChange, allowReorder: allowReorder, toIdentifier: (module) => module, toLabel: (module) => moduleLabelMap.get(module), selectionBoxPosition: selectionBoxPosition })));
33
+ return (React.createElement(ValueSelector_1.ValueSelector, Object.assign({}, valueSelectorProps, { options: sortedOptions, value: value, onChange: onChange, allowReorder: allowReorder, toIdentifier: (module) => module, toLabel: (module) => moduleLabelMap.get(module), selectionBoxPosition: selectionBoxPosition, isDisabled: props.isDisabled })));
34
34
  };
@@ -132,7 +132,7 @@ exports.NewScopeComponent = (props) => {
132
132
  React.createElement(Tabs_1.Tabs.Tab, { value: "Column" },
133
133
  React.createElement(Radio_1.default, { margin: 0, value: "Column", checked: scopeChoice == 'Column', tabIndex: -1 }, "Columns")),
134
134
  React.createElement(Tabs_1.Tabs.Tab, { value: "DataType" },
135
- React.createElement(Radio_1.default, { margin: 0, value: "DataType", checked: scopeChoice == 'DataType', tabIndex: -1 }, "DataTypes")),
135
+ React.createElement(Radio_1.default, { margin: 0, value: "DataType", checked: scopeChoice == 'DataType', tabIndex: -1 }, "Data Types")),
136
136
  props.hideWholeRow ? null : (React.createElement(Tabs_1.Tabs.Content, { value: "Row", style: { flex: 'none' }, "data-name": "row-scope" },
137
137
  React.createElement(rebass_1.Text, { padding: 2, fontSize: 2 }, props.descriptions.rowScope))),
138
138
  React.createElement(Tabs_1.Tabs.Content, { value: "Column", style: { flex: 1, overflow: 'auto' }, "data-name": "column-scope", padding: 0 },
@@ -21,8 +21,9 @@ const CustomSettingsPanelView_1 = require("./CustomSettingsPanelView");
21
21
  exports.AdaptablePopup = (props) => {
22
22
  var _a, _b, _c, _d, _e;
23
23
  const adaptable = AdaptableContext_1.useAdaptable();
24
- const settingsPanelOptions = adaptable.adaptableOptions.settingsPanelOptions;
25
24
  const dispatch = react_redux_1.useDispatch();
25
+ const settingsPanelOptions = adaptable.adaptableOptions.settingsPanelOptions;
26
+ const settingsPanelTitle = adaptable.api.internalApi.getModuleFriendlyName('SettingsPanel');
26
27
  // Navigation
27
28
  const allMenuItems = react_redux_1.useSelector((state) => { var _a; return (_a = state === null || state === void 0 ? void 0 : state.Grid) === null || _a === void 0 ? void 0 : _a.ModuleDropdownMenuItems; });
28
29
  const menuItems = React.useMemo(() => {
@@ -74,8 +75,8 @@ exports.AdaptablePopup = (props) => {
74
75
  const isActionModule = DefaultSettingsPanel_1.ACTION_POPUPS.includes(moduleInfo === null || moduleInfo === void 0 ? void 0 : moduleInfo.ModuleName) ||
75
76
  (props.componentName && props.componentName !== moduleInfo.Popup);
76
77
  const baseClassName = 'ab-Adaptable-Popup';
77
- const className = join_1.default(baseClassName, `${baseClassName}--${(_c = settingsPanelOptions.type) !== null && _c !== void 0 ? _c : 'window'}`, isActionModule ? `${baseClassName}--action-popup` : `${baseClassName}--settings-popup`);
78
- const isWindowModal = settingsPanelOptions.type === 'window';
78
+ const className = join_1.default(baseClassName, `${baseClassName}--${(_c = settingsPanelOptions.popupType) !== null && _c !== void 0 ? _c : 'window'}`, isActionModule ? `${baseClassName}--action-popup` : `${baseClassName}--settings-popup`);
79
+ const isWindowModal = settingsPanelOptions.popupType === 'window';
79
80
  let style = { maxWidth: 1400, maxHeight: 1200 };
80
81
  if (isWindowModal) {
81
82
  style = { height: '100%' };
@@ -112,7 +113,7 @@ exports.AdaptablePopup = (props) => {
112
113
  position: popupSettings.position,
113
114
  onChange: handleWindowSettings,
114
115
  }, style: style, padding: 0, height: isWindowModal ? null : '90vh', width: isWindowModal ? null : '90vw', className: className, onDismiss: props.onHide, isOpen: true, showCloseButton: true }, props.moduleProps),
115
- !isActionModule && (React.createElement(TopBar_1.default, { icon: settingsPanelOptions.icon }, settingsPanelOptions.title)),
116
+ !isActionModule && React.createElement(TopBar_1.default, { icon: settingsPanelOptions.icon }, settingsPanelTitle),
116
117
  React.createElement(rebass_1.Flex, { "data-name": props.componentName, flexDirection: "row", flex: "1 1 0", style: { minHeight: 0 }, className: accessLevel == 'ReadOnly' ? GeneralConstants.READ_ONLY_STYLE : '' },
117
118
  !isActionModule && (React.createElement(Navigation_1.Navigation, { menuItems: menuItems, api: props.api, moduleInfo: moduleInfo, activeCustomSettingPanel: customSettingsPanel, customSettingsPanels: settingsPanelOptions.customSettingsPanels })),
118
119
  React.createElement(rebass_1.Flex, { flex: 1, className: "ab-Adaptable-Popup__Body" }, isCustomSettingsPanel ? (React.createElement(CustomSettingsPanelView_1.CustomSettingsPanelView, { settingsPanel: customSettingsPanel })) : (React.createElement(AdaptablePopupBody_1.AdaptablePopupBody, { api: props.api, module: module, componentName: props.componentName, moduleParams: props.moduleParams, onClearParams: props.onClearParams, onHide: props.onHide })))))));
@@ -25,12 +25,12 @@ const HelpBlock_1 = tslib_1.__importDefault(require("../../../components/HelpBlo
25
25
  const preventDefault = (e) => e.preventDefault();
26
26
  const AdaptableToolPanelComponent = (props) => {
27
27
  var _a;
28
- const functionsGlyph = React.createElement(icons_1.Icon, { name: 'home' });
29
- const colsGlyph = React.createElement(icons_1.Icon, { name: 'list' });
30
28
  const toolPanelsGlyph = React.createElement(icons_1.Icon, { name: 'align-justify' });
31
29
  const entitlementService = props.api.internalApi.getEntitlementService();
32
30
  const moduleService = props.api.internalApi.getModuleService();
33
- const toolPanelOptions = props.api.internalApi.getAdaptableOptions().toolPanelOptions;
31
+ const adaptableOptions = props.api.internalApi.getAdaptableOptions();
32
+ const toolPanelOptions = adaptableOptions.toolPanelOptions;
33
+ const settingsPanelOptions = adaptableOptions.settingsPanelOptions;
34
34
  if (entitlementService.isModuleHiddenEntitlement('ToolPanel')) {
35
35
  // do NOT show any toolPanel content if the required entitlements are missing
36
36
  return (React.createElement(HelpBlock_1.default, { mt: 2, mb: 2, p: 2, style: { fontSize: 'var(--ab-font-size-3)' } }, "Not enough rights"));
@@ -80,19 +80,6 @@ const AdaptableToolPanelComponent = (props) => {
80
80
  return (React.createElement(ToolPanelWrapper_1.ToolPanelWrapper, { key: moduleToolPanel, adaptableToolPanel: moduleToolPanel, visibilityMode: visibilityMode, onVisibilityModeChange: (state) => onStateChange(moduleToolPanel, state) }));
81
81
  }
82
82
  });
83
- const renderModuleDropdowns = () => {
84
- if (!toolPanelOptions.showModulesDropdown) {
85
- return;
86
- }
87
- let menuItems = availableModuleItems.map((menuItem) => {
88
- return {
89
- onClick: () => props.onClick(menuItem.reduxAction),
90
- icon: React.createElement(icons_1.Icon, { name: menuItem.icon }),
91
- label: menuItem.label,
92
- };
93
- });
94
- return (React.createElement(DropdownButton_1.default, { variant: "text", tone: "none", items: menuItems, tooltip: "Adaptable Modules", className: "ab-ToolPanel__modules", key: 'dropdown-modules', id: 'dropdown-modules' }, functionsGlyph));
95
- };
96
83
  const renderToolPanelDropdowns = () => {
97
84
  if (!toolPanelOptions.showToolPanelsDropdown) {
98
85
  return;
@@ -139,76 +126,55 @@ const AdaptableToolPanelComponent = (props) => {
139
126
  });
140
127
  return (React.createElement(DropdownButton_1.default, { variant: "text", tone: "none", collapseOnItemClick: false, key: 'dropdown-toolpanels', id: 'dropdown-toolpanels', className: "ab-ToolPanel__toolbars", columns: ['label'], items: toolpanelItems, tooltip: "Manage Tool Panels" }, toolPanelsGlyph));
141
128
  };
142
- const renderColumnsDropdown = () => {
143
- if (!toolPanelOptions.showColumnsDropdown) {
144
- return;
145
- }
146
- let colItems = [
147
- {
148
- clickable: false,
149
- label: (React.createElement("div", { key: "colTitle" },
150
- ' ',
151
- "\u00A0\u00A0",
152
- React.createElement("b", null, 'Columns'))),
153
- },
154
- ];
155
- props.Columns.forEach((col, index) => {
156
- colItems.push({
157
- id: col.columnId,
158
- onClick: () => {
159
- onSetColumnVisibility(col.columnId);
160
- },
161
- label: (React.createElement(CheckBox_1.CheckBox, { as: "div", className: "ab-dd-checkbox", variant: "agGrid", my: 0, value: col.columnId, key: col.columnId, checked: col.visible, onMouseDown: preventDefault }, col.friendlyName)),
162
- });
163
- });
164
- return (React.createElement(DropdownButton_1.default, { listMinWidth: 150, variant: "text", tone: "none", collapseOnItemClick: false, items: colItems, columns: ['label'], className: "ab-Toolpanel__columns", key: 'dropdown-cols', id: 'dropdown-cols', tooltip: "Select Columns" }, colsGlyph));
165
- };
166
129
  const renderToolPanelButtons = () => {
167
- var _a;
168
130
  const toolPanelButtons = [];
169
- // 1. process custom buttons
170
- if (props.api.toolPanelApi.getCustomToolPanelButtons().length) {
171
- toolPanelButtons.push(props.api.toolPanelApi.getCustomToolPanelButtons().map((button) => {
172
- // TODO: variants of this mapping are present in several places (just search for api.internalApi.getStyleForButton() usages)
173
- // with the next opportunity we should abstract it
174
- // the default size of AdapTable SVG ModuleButtons
175
- const defaultIconProps = {
176
- style: {
177
- height: 'var(--ab-cmp-simple-button__height)',
178
- width: 'var(--ab-cmp-simple-button__width)',
179
- },
180
- };
181
- const iconProps = button.icon && Object.assign({}, defaultIconProps, button.icon);
182
- const toolPanelContext = {
183
- adaptableApi: props.api,
184
- toolPanelState: props.api.toolPanelApi.getToolPanelState(),
185
- };
186
- let buttonStyle = props.api.internalApi.getStyleForButton(button, toolPanelContext);
187
- let buttonLabel = props.api.internalApi.getLabelForButton(button, toolPanelContext);
188
- let buttonTooltip = props.api.internalApi.getTooltipForButton(button, toolPanelContext);
189
- if (button.hidden && button.hidden(button, toolPanelContext)) {
190
- return null;
191
- }
192
- const disabled = button.disabled && button.disabled(button, toolPanelContext);
193
- const buttonVariant = buttonStyle && buttonStyle.variant ? buttonStyle.variant : 'text';
194
- const buttonTone = buttonStyle && buttonStyle.tone ? buttonStyle.tone : 'none';
195
- const uniqueKey = buttonLabel !== null && buttonLabel !== void 0 ? buttonLabel : uuid_1.createUuid();
196
- return (React.createElement(SimpleButton_1.default, { key: uniqueKey, variant: buttonVariant, tone: buttonTone, className: `ab-ToolPanel__Home__${kebabCase_1.default(buttonLabel)} ${(buttonStyle === null || buttonStyle === void 0 ? void 0 : buttonStyle.className) || ''}`, tooltip: buttonTooltip, disabled: disabled, onClick: () => button.onClick(button, toolPanelContext), accessLevel: 'Full' },
197
- button.icon ? React.createElement("img", Object.assign({}, iconProps)) : null,
198
- buttonLabel));
199
- }));
131
+ let moduleButtons = props.ModuleButtons;
132
+ const shouldAddSettingsPanel = settingsPanelOptions.alwaysShowInToolPanel &&
133
+ !props.api.internalApi.getEntitlementService().isModuleHiddenEntitlement('SettingsPanel');
134
+ if (shouldAddSettingsPanel && !moduleButtons.includes('SettingsPanel')) {
135
+ moduleButtons = ['SettingsPanel', ...moduleButtons];
200
136
  }
201
- // 2. process module buttons
202
- if ((_a = props.ModuleButtons) === null || _a === void 0 ? void 0 : _a.length) {
203
- toolPanelButtons.push(props.ModuleButtons.map((x) => {
137
+ if (moduleButtons === null || moduleButtons === void 0 ? void 0 : moduleButtons.length) {
138
+ toolPanelButtons.push(moduleButtons.map((x) => {
204
139
  let menuItem = props.MainMenuItems.find((y) => y.isVisible && y.module == x);
205
140
  if (menuItem) {
206
- return (React.createElement(SimpleButton_1.default, { key: menuItem.label, icon: menuItem.icon, variant: "text", className: `ab-ToolPanel__Home__${kebabCase_1.default(menuItem.label)}`, tooltip: menuItem.label, onClick: () => props.onClick(menuItem.reduxAction), accessLevel: 'Full' }));
141
+ return (React.createElement(SimpleButton_1.default, { "data-name": menuItem.module, key: menuItem.label, icon: menuItem.icon, tone: "none", variant: "text", className: `ab-ToolPanel__Home__${kebabCase_1.default(menuItem.label)}`, tooltip: menuItem.label, onClick: () => props.onClick(menuItem.reduxAction), accessLevel: 'Full' }));
207
142
  }
208
143
  }));
209
144
  }
210
145
  return toolPanelButtons;
211
146
  };
147
+ const renderCustomToolPanelButtons = () => {
148
+ return props.api.toolPanelApi.getCustomToolPanelButtons().map((button) => {
149
+ // TODO: variants of this mapping are present in several places (just search for api.internalApi.getStyleForButton() usages)
150
+ // with the next opportunity we should abstract it
151
+ // the default size of AdapTable SVG ModuleButtons
152
+ const defaultIconProps = {
153
+ style: {
154
+ height: 'var(--ab-cmp-simple-button__height)',
155
+ width: 'var(--ab-cmp-simple-button__width)',
156
+ },
157
+ };
158
+ const iconProps = button.icon && Object.assign({}, defaultIconProps, button.icon);
159
+ const toolPanelContext = {
160
+ adaptableApi: props.api,
161
+ toolPanelState: props.api.toolPanelApi.getToolPanelState(),
162
+ };
163
+ let buttonStyle = props.api.internalApi.getStyleForButton(button, toolPanelContext);
164
+ let buttonLabel = props.api.internalApi.getLabelForButton(button, toolPanelContext);
165
+ let buttonTooltip = props.api.internalApi.getTooltipForButton(button, toolPanelContext);
166
+ if (button.hidden && button.hidden(button, toolPanelContext)) {
167
+ return null;
168
+ }
169
+ const disabled = button.disabled && button.disabled(button, toolPanelContext);
170
+ const buttonVariant = buttonStyle && buttonStyle.variant ? buttonStyle.variant : 'text';
171
+ const buttonTone = buttonStyle && buttonStyle.tone ? buttonStyle.tone : 'none';
172
+ const uniqueKey = buttonLabel !== null && buttonLabel !== void 0 ? buttonLabel : uuid_1.createUuid();
173
+ return (React.createElement(SimpleButton_1.default, { key: uniqueKey, variant: buttonVariant, tone: buttonTone, className: `ab-ToolPanel__Home__${kebabCase_1.default(buttonLabel)} ${(buttonStyle === null || buttonStyle === void 0 ? void 0 : buttonStyle.className) || ''}`, tooltip: buttonTooltip, disabled: disabled, onClick: () => button.onClick(button, toolPanelContext), accessLevel: 'Full' },
174
+ button.icon ? React.createElement("img", Object.assign({}, iconProps)) : null,
175
+ buttonLabel));
176
+ });
177
+ };
212
178
  const onSetColumnVisibility = (name) => {
213
179
  let changedColumn = props.api.columnApi.getColumnFromId(name);
214
180
  let columns = [].concat(props.Columns);
@@ -239,12 +205,11 @@ const AdaptableToolPanelComponent = (props) => {
239
205
  return (React.createElement(rebass_1.Flex, { className: "ab-ToolPanel", "data-name": "adaptable-tool-panel", flexDirection: "column", justifyContent: "center", padding: 2, style: {
240
206
  width: '100%',
241
207
  } },
242
- React.createElement(rebass_1.Flex, { className: "ab-ToolPanel__header", flexDirection: "row", justifyContent: "left", padding: 1, style: { width: '100%' } },
243
- renderModuleDropdowns(),
208
+ React.createElement(rebass_1.Flex, { className: "ab-ToolPanel__header", flexDirection: "row", justifyContent: "left", padding: 1, flexWrap: "wrap", style: { width: '100%' } },
244
209
  isToolPanelModuleConfigurable && renderToolPanelDropdowns(),
245
- renderColumnsDropdown(),
210
+ toolPanelButtons,
246
211
  isToolPanelModuleConfigurable && renderToolPanelConfigureButton()),
247
- ArrayExtensions_1.default.IsNotNullOrEmpty(toolPanelButtons) ? (React.createElement(rebass_1.Flex, { className: "ab-ToolPanel__header__buttons", flexDirection: "row", justifyContent: "left", padding: 1, flexWrap: "wrap" }, toolPanelButtons)) : null,
212
+ Boolean(props.api.toolPanelApi.getCustomToolPanelButtons().length) && (React.createElement(rebass_1.Flex, { className: "ab-ToolPanel__header__buttons", flexDirection: "row", justifyContent: "left", padding: 1, flexWrap: "wrap" }, renderCustomToolPanelButtons())),
248
213
  visibleToolPanelControls));
249
214
  };
250
215
  function mapStateToProps(state) {
@@ -64,6 +64,13 @@ class ToolPanelPopupComponent extends React.Component {
64
64
  const selectedToolPanels = this.props.ToolPanelState.ToolPanels.map((toolPanelDefinition) => toolPanelDefinition.Name)
65
65
  // ensure that the visible state has only valid tool panels
66
66
  .filter((visibleToolPanel) => availableToolPanels.includes(visibleToolPanel));
67
+ const isModuleCheckboxDisabled = (module) => {
68
+ if (module === 'SettingsPanel') {
69
+ return this.props.api.internalApi.getAdaptableOptions().settingsPanelOptions
70
+ .alwaysShowInDashboard;
71
+ }
72
+ return false;
73
+ };
67
74
  return (React.createElement(PopupPanel_1.PopupPanel, { headerText: "ToolPanel Configuration", glyphicon: this.props.moduleInfo.Glyph },
68
75
  React.createElement(Tabs_1.Tabs, { "data-name": 'toolPanelPopup-component', className: "ab-ToolPanelPopup", value: this.state.ToolPanelConfigView, style: { height: '100%' }, onValueChange: (value) => this.setState({ ToolPanelConfigView: value }) },
69
76
  React.createElement(Tabs_1.Tabs.Tab, { value: ToolPanelConfigView.ToolPanels },
@@ -73,7 +80,7 @@ class ToolPanelPopupComponent extends React.Component {
73
80
  React.createElement(Tabs_1.Tabs.Content, { value: ToolPanelConfigView.ToolPanels, style: { flex: 1, overflow: 'auto' } },
74
81
  React.createElement(ModuleValueSelector_1.ModuleValueSelector, { options: availableToolPanels, value: selectedToolPanels, noSelectionLabel: 'No selected Tool Panel', xSelectedLabel: () => `Visible ToolPanels:`, onChange: (selectedValues) => this.onToolPanelToolPanelsChanged(selectedValues) })),
75
82
  React.createElement(Tabs_1.Tabs.Content, { value: ToolPanelConfigView.Buttons, style: { flex: 1, overflow: 'auto' } },
76
- React.createElement(ModuleValueSelector_1.ModuleValueSelector, { options: allModuleButtons, value: selectedModuleButtons, noSelectionLabel: 'No selected Module Button', xSelectedLabel: () => `Visible Module Buttons:`, onChange: (selectedValues) => this.props.onToolPanelSetModuleButtons(selectedValues) })))));
83
+ React.createElement(ModuleValueSelector_1.ModuleValueSelector, { options: allModuleButtons, value: selectedModuleButtons, noSelectionLabel: 'No selected Module Button', xSelectedLabel: () => `Visible Module Buttons:`, isDisabled: isModuleCheckboxDisabled, onChange: (selectedValues) => this.props.onToolPanelSetModuleButtons(selectedValues) })))));
77
84
  }
78
85
  onShowGridPropertiesChanged(event) {
79
86
  let e = event.target;
@@ -15,6 +15,7 @@ export declare type ValueSelectorProps<OPTION_TYPE, ID_TYPE extends number | str
15
15
  xSelectedLabel?: (count: number) => ReactNode;
16
16
  selectionBoxPosition?: 'top' | 'bottom';
17
17
  onShowSelectedOnlyChange?: (selectedOnly: boolean) => void;
18
+ isDisabled?: (option: OPTION_TYPE) => boolean;
18
19
  };
19
20
  export declare function ValueSelector<OPTION_TYPE, ID_TYPE extends number | string>(props: ValueSelectorProps<OPTION_TYPE, ID_TYPE>): JSX.Element;
20
21
  export declare namespace ValueSelector {
@@ -38,7 +38,7 @@ function useValuesMap({ options, value, toIdentifier, selectedMap, }) {
38
38
  return { selectedMap: result, optionsMap };
39
39
  }
40
40
  function ValueSelector(props) {
41
- const { options, value, filter, onChange, allowReorder, singleSelect, toLabel, toIdentifier, noSelectionLabel, clearSelectionLabel, showSelectedOnlyLabel, xSelectedLabel, selectionBoxPosition = 'bottom', onShowSelectedOnlyChange, } = props;
41
+ const { options, value, filter, onChange, allowReorder, singleSelect, toLabel, toIdentifier, noSelectionLabel, clearSelectionLabel, showSelectedOnlyLabel, xSelectedLabel, selectionBoxPosition = 'bottom', onShowSelectedOnlyChange, isDisabled, } = props;
42
42
  const [selectedOnly, doSetSelectedOnly] = react_1.useState(false);
43
43
  const setSelectedOnly = react_1.useCallback((selectedOnly) => {
44
44
  doSetSelectedOnly(selectedOnly);
@@ -74,7 +74,7 @@ function ValueSelector(props) {
74
74
  selectedMap.delete(identifier);
75
75
  }
76
76
  notifyChange();
77
- } }, label)) : (React.createElement(CheckBox_1.CheckBox, { "data-name": identifier, onChange: (checked) => {
77
+ } }, label)) : (React.createElement(CheckBox_1.CheckBox, { "data-name": identifier, disabled: isDisabled ? isDisabled(option) : false, onChange: (checked) => {
78
78
  if (checked) {
79
79
  selectedMap.set(identifier, option);
80
80
  }
@@ -14,19 +14,15 @@ const SimpleButton_1 = tslib_1.__importDefault(require("../../components/SimpleB
14
14
  const rebass_1 = require("rebass");
15
15
  const Dashboard_1 = require("../../components/Dashboard");
16
16
  const kebabCase_1 = tslib_1.__importDefault(require("lodash-es/kebabCase"));
17
- const icons_1 = require("../../components/icons");
18
- const DropdownButton_1 = tslib_1.__importDefault(require("../../components/DropdownButton"));
19
17
  const AdaptableFormControlTextClear_1 = require("../Components/Forms/AdaptableFormControlTextClear");
20
18
  const useQuickSearchDebounced_1 = require("../QuickSearch/useQuickSearchDebounced");
21
19
  const UIHelper_1 = tslib_1.__importDefault(require("../UIHelper"));
22
20
  const ModuleToolbarWrapper_1 = require("./ModuleToolbarWrapper");
23
21
  const CustomToolbarWrapper_1 = require("./CustomToolbarWrapper");
24
22
  const ModuleConstants_1 = require("../../Utilities/Constants/ModuleConstants");
25
- const DefaultSettingsPanel_1 = require("../../Utilities/Defaults/DefaultSettingsPanel");
26
23
  const ApplicationIcon_1 = require("../../components/ApplicationIcon");
27
24
  const DashboardComponent = (props) => {
28
25
  const [searchText, search] = useQuickSearchDebounced_1.useQuickSearchDebounced(props);
29
- const dispatch = react_redux_1.useDispatch();
30
26
  const dashboardAccessLevel = props.api.internalApi
31
27
  .getEntitlementService()
32
28
  .getEntitlementAccessLevelForModule('Dashboard');
@@ -73,6 +69,13 @@ const DashboardComponent = (props) => {
73
69
  const renderModuleButtons = () => {
74
70
  let shortcutsArray = props.DashboardState.ModuleButtons;
75
71
  let shortcuts = null;
72
+ const alwaysShowInDashboard = props.api.internalApi.getAdaptableOptions().settingsPanelOptions
73
+ .alwaysShowInDashboard;
74
+ const shouldAddSettingsPanel = alwaysShowInDashboard &&
75
+ !props.api.internalApi.getEntitlementService().isModuleHiddenEntitlement('SettingsPanel');
76
+ if (shouldAddSettingsPanel && !shortcutsArray.includes('SettingsPanel')) {
77
+ shortcutsArray.push('SettingsPanel');
78
+ }
76
79
  if (shortcutsArray) {
77
80
  shortcuts = shortcutsArray.map((x, index) => {
78
81
  var _a, _b, _c;
@@ -122,34 +125,8 @@ const DashboardComponent = (props) => {
122
125
  }
123
126
  return customDashboardButtons;
124
127
  };
125
- const renderDashboardIcon = (icon) => {
126
- return React.createElement(ApplicationIcon_1.ApplicationIcon, { icon: icon });
127
- };
128
- const actionModuleMenuItems = react_redux_1.useSelector((state) => { var _a; return (_a = state === null || state === void 0 ? void 0 : state.Grid) === null || _a === void 0 ? void 0 : _a.ModuleDropdownMenuItems; })
129
- .filter((menuItem) => menuItem.module !== 'General' && DefaultSettingsPanel_1.ACTION_POPUPS.includes(menuItem.module))
130
- .map((menuItem) => ({
131
- disabled: props.accessLevel == 'Hidden',
132
- onClick: () => props.dispatch(menuItem.reduxAction),
133
- icon: React.createElement(icons_1.Icon, { name: menuItem.icon }),
134
- label: menuItem.label,
135
- }));
136
- const renderModulesDropdown = () => {
137
- let moduleService = props.api.internalApi.getModuleService();
138
- let moduleInfo = moduleService.getModuleInfoByModule(ModuleConstants.DashboardModuleId);
139
- // JW 23/1/22: we should check the SettingsPanel entitlement here...
140
- const handleOpenPopup = () => {
141
- dispatch(PopupRedux.PopupShowScreen());
142
- };
143
- return (React.createElement(React.Fragment, null,
144
- React.createElement(SimpleButton_1.default, { className: "ab-SettingsButton", onClick: handleOpenPopup, variant: "text", tone: "none", icon: "settings" }),
145
- React.createElement(DropdownButton_1.default, { icon: "edit", variant: "text", tone: "none", items: actionModuleMenuItems, className: "ab-DashboardToolbar__Home__functions", key: 'dropdown-functions', id: 'dropdown-functions', showToggleIcon: false })));
146
- };
147
128
  const renderQuickSearch = () => {
148
- let moduleInfo = props.api.internalApi
149
- .getModuleService()
150
- .getModuleInfoByModule('QuickSearch');
151
- return (React.createElement(React.Fragment, null,
152
- React.createElement(SimpleButton_1.default, { icon: "quick-search", variant: "text", tone: "none", onClick: props.onShowQuickSearchPopup, tooltip: moduleInfo.FriendlyName, mr: 2 }),
129
+ return (React.createElement(rebass_1.Box, { ml: 2 },
153
130
  React.createElement(AdaptableFormControlTextClear_1.AdaptableFormControlTextClear, { type: "text", placeholder: props.api.internalApi.getAdaptableOptions().searchOptions.quickSearchPlaceholder, className: "ab-DashboardToolbar__QuickSearch__text", value: searchText, OnTextChange: search, style: { width: 'auto' }, inputStyle: { width: '7rem' } })));
154
131
  };
155
132
  let instanceName = props.api.internalApi.setToolbarTitle();
@@ -173,10 +150,10 @@ const DashboardComponent = (props) => {
173
150
  props.onSetFloatingPosition(FloatingPositionCallback);
174
151
  }
175
152
  }, left: React.createElement(React.Fragment, null,
176
- renderDashboardIcon(props.api.internalApi.getAdaptableOptions().userInterfaceOptions.applicationIcon),
177
- dashboardOptions.showSettingsPanel && renderModulesDropdown()), right: React.createElement(React.Fragment, null,
153
+ React.createElement(ApplicationIcon_1.ApplicationIcon, { icon: props.api.internalApi.getAdaptableOptions().userInterfaceOptions.applicationIcon }),
154
+ dashboardOptions.buttonsLocation === 'left' && renderModuleButtons()), right: React.createElement(React.Fragment, null,
178
155
  renderDashboardButtons(),
179
- renderModuleButtons(),
156
+ dashboardOptions.buttonsLocation === 'right' && renderModuleButtons(),
180
157
  shouldRenderQuickSearchHeader && renderQuickSearch()), onShowDashboardPopup: props.onShowDashboardPopup }, props.DashboardState.Tabs &&
181
158
  props.DashboardState.Tabs.map((tab, index) => (React.createElement(Dashboard_1.DashboardTab, { key: index, title: tab.Name }, renderTab(tab))))));
182
159
  };
@@ -63,21 +63,29 @@ class DashboardPopupComponent extends React.Component {
63
63
  .getEntitlementService()
64
64
  .getEntitlementAccessLevelForModule('Dashboard');
65
65
  const areDashboardSettingsEnabled = dashboardAccessLevel == 'Full' || dashboardAccessLevel == 'ReadOnly';
66
+ const isModuleCheckboxDisabled = (module) => {
67
+ if (module === 'SettingsPanel') {
68
+ return this.props.api.internalApi.getAdaptableOptions().settingsPanelOptions
69
+ .alwaysShowInDashboard;
70
+ }
71
+ return false;
72
+ };
66
73
  return (React.createElement(PopupPanel_1.PopupPanel, { headerText: this.props.moduleInfo.FriendlyName, glyphicon: this.props.moduleInfo.Glyph },
67
- areDashboardSettingsEnabled && (React.createElement(Panel_1.default, { header: 'Dashboard Settings', style: { height: 'auto' }, variant: "default", borderRadius: "none", marginLeft: 2, marginRight: 2 },
68
- React.createElement(rebass_1.Flex, null,
69
- React.createElement(CheckBox_1.CheckBox, { mr: 3, className: `${baseClassName}__Checkbox__collapsed-check`, checked: this.props.IsCollapsed, onChange: (checked) => this.props.onSetDashboardCollapsed(checked) }, "Collapse"),
70
- ' ',
71
- this.props.api.internalApi.getAdaptableOptions().dashboardOptions.canFloat && (React.createElement(CheckBox_1.CheckBox, { mr: 3, className: `${baseClassName}__Checkbox__collapsed-check`, checked: this.props.IsFloating, onChange: (checked) => this.props.onSetDashboardFloating(checked) }, "Float")),
72
- ' ',
73
- React.createElement(CheckBox_1.CheckBox, { className: `${baseClassName}__Checkbox__hidden-check`, checked: this.props.IsHidden, onChange: (checked) => this.props.onSetDashboardHidden(checked) }, "Hidden")))),
74
- React.createElement(Panel_1.default, { header: 'Dashboard Contents', style: { height: 'auto' }, variant: "default", borderRadius: "none", marginTop: 4, marginLeft: 2, marginRight: 2 },
75
- React.createElement(rebass_1.Flex, { flexDirection: "row", padding: 2, "data-name": "dashboard-configuration-select", style: { borderBottom: '1px solid var(--ab-color-primary)' } },
76
- React.createElement(Radio_1.default, { marginLeft: 3, value: DashboardConfigView.Toolbars, checked: this.state.DashboardConfigView == DashboardConfigView.Toolbars, onChange: (_, e) => this.onDashboardConfigViewChanged(e) }, "Toolbars"),
77
- React.createElement(Radio_1.default, { marginLeft: 3, value: DashboardConfigView.Buttons, checked: this.state.DashboardConfigView == DashboardConfigView.Buttons, onChange: (_, e) => this.onDashboardConfigViewChanged(e) }, "Buttons")),
78
- React.createElement(rebass_1.Box, { className: `${baseClassName}__Module-Selector`, style: { overflow: 'auto', flex: 1 }, padding: 2 },
79
- this.state.DashboardConfigView == DashboardConfigView.Toolbars && (React.createElement(DashboardManager_1.default, { availableToolbars: [...systemToolbars, ...customToolbars], tabs: tabs, onTabsChange: this.props.onDashboardSetTabs, api: this.props.api })),
80
- this.state.DashboardConfigView == DashboardConfigView.Buttons && (React.createElement(ModuleValueSelector_1.ModuleValueSelector, { options: allModuleButtons, value: selectedModuleButtons, noSelectionLabel: 'No selected Module Button', xSelectedLabel: () => `Visible Module Buttons:`, onChange: (selectedValues) => this.props.onDashboardSetModuleButtons(selectedValues) }))))));
74
+ React.createElement(rebass_1.Flex, { flex: 1, height: "100%", flexDirection: "column" },
75
+ areDashboardSettingsEnabled && (React.createElement(Panel_1.default, { header: 'Dashboard Settings', style: { height: 'auto', overflow: 'visible' }, variant: "default", borderRadius: "none", marginLeft: 2, marginRight: 2 },
76
+ React.createElement(rebass_1.Flex, null,
77
+ React.createElement(CheckBox_1.CheckBox, { mr: 3, className: `${baseClassName}__Checkbox__collapsed-check`, checked: this.props.IsCollapsed, onChange: (checked) => this.props.onSetDashboardCollapsed(checked) }, "Collapse"),
78
+ ' ',
79
+ this.props.api.internalApi.getAdaptableOptions().dashboardOptions.canFloat && (React.createElement(CheckBox_1.CheckBox, { mr: 3, className: `${baseClassName}__Checkbox__collapsed-check`, checked: this.props.IsFloating, onChange: (checked) => this.props.onSetDashboardFloating(checked) }, "Float")),
80
+ ' ',
81
+ React.createElement(CheckBox_1.CheckBox, { className: `${baseClassName}__Checkbox__hidden-check`, checked: this.props.IsHidden, onChange: (checked) => this.props.onSetDashboardHidden(checked) }, "Hidden")))),
82
+ React.createElement(Panel_1.default, { header: 'Dashboard Contents', style: { borderBottom: '1px solid var(--ab-color-primary)' }, variant: "default", borderRadius: "none", marginTop: 4, marginLeft: 2, marginRight: 2 },
83
+ React.createElement(rebass_1.Flex, { flexDirection: "row", padding: 2, "data-name": "dashboard-configuration-select" },
84
+ React.createElement(Radio_1.default, { marginLeft: 3, value: DashboardConfigView.Toolbars, checked: this.state.DashboardConfigView == DashboardConfigView.Toolbars, onChange: (_, e) => this.onDashboardConfigViewChanged(e) }, "Toolbars"),
85
+ React.createElement(Radio_1.default, { marginLeft: 3, value: DashboardConfigView.Buttons, checked: this.state.DashboardConfigView == DashboardConfigView.Buttons, onChange: (_, e) => this.onDashboardConfigViewChanged(e) }, "Buttons")),
86
+ React.createElement(rebass_1.Box, { className: `${baseClassName}__Module-Selector`, style: { minHeight: 0, flex: '1 1 0' }, padding: 2 },
87
+ this.state.DashboardConfigView == DashboardConfigView.Toolbars && (React.createElement(DashboardManager_1.default, { availableToolbars: [...systemToolbars, ...customToolbars], tabs: tabs, onTabsChange: this.props.onDashboardSetTabs, api: this.props.api })),
88
+ this.state.DashboardConfigView == DashboardConfigView.Buttons && (React.createElement(ModuleValueSelector_1.ModuleValueSelector, { options: allModuleButtons, value: selectedModuleButtons, noSelectionLabel: 'No selected Module Button', isDisabled: isModuleCheckboxDisabled, xSelectedLabel: () => `Visible Module Buttons:`, onChange: (selectedValues) => this.props.onDashboardSetModuleButtons(selectedValues) })))))));
81
89
  }
82
90
  onDashboardConfigViewChanged(event) {
83
91
  let e = event.target;
@@ -64,7 +64,7 @@ exports.DataChangeHistoryGrid = (props) => {
64
64
  // 2. this UI will be reimplemented with Infinite Table anyway
65
65
  const addedRows = mapChangeHistoryRowData(addedChangeHistoryLogs, mainAdaptableInstance);
66
66
  const removedRows = mapChangeHistoryRowData(removedChangeHistoryLogs, mainAdaptableInstance);
67
- adaptableApi.internalApi.getAdaptableOptions().agGridOptions.api.applyTransactionAsync({
67
+ adaptableApi.internalApi.getAdaptableOptions().gridOptions.api.applyTransactionAsync({
68
68
  add: addedRows,
69
69
  remove: removedRows,
70
70
  });
@@ -81,7 +81,8 @@ const buildAdaptableOptions = (mainAdaptableInstance, gridOptions, adaptableCont
81
81
  changeKey && onUndoChange(changeKey);
82
82
  };
83
83
  const options = {
84
- agGridOptions: Object.assign(Object.assign({}, gridOptions), { modules: [...all_modules_1.AllCommunityModules] }),
84
+ gridOptions: gridOptions,
85
+ modules: [...all_modules_1.AllCommunityModules],
85
86
  primaryKey: 'primaryKey',
86
87
  licenseKey: mainAdaptableOptions.licenseKey,
87
88
  userName: `${mainAdaptableOptions.userName}`,
@@ -24,7 +24,7 @@ exports.FlashingAlertDurationWizardSection = (props) => {
24
24
  let { data: flashingAlert } = OnePageAdaptableWizard_1.useOnePageWizardContext();
25
25
  flashingAlert = flashingAlert !== null && flashingAlert !== void 0 ? flashingAlert : props.flashingAlert;
26
26
  const setDuration = (FlashDuration) => {
27
- props.onChange(Object.assign(Object.assign({}, flashingAlert), { FlashDuration }));
27
+ props.onChange(Object.assign(Object.assign({}, flashingAlert), { FlashDuration: FlashDuration }));
28
28
  };
29
29
  const duration = (_a = flashingAlert.FlashDuration) !== null && _a !== void 0 ? _a : 500;
30
30
  const numberDuration = React.useRef(typeof duration === 'number' ? duration : 500);
@@ -34,20 +34,20 @@ exports.renderFlashingAlertRulesSummary = (flashingAlert) => {
34
34
  exports.FlashingAlertRulesWizardSection = (props) => {
35
35
  var _a;
36
36
  const { data: flashingAlert, api } = OnePageAdaptableWizard_1.useOnePageWizardContext();
37
- const FlashTarget = (_a = flashingAlert.FlashTarget) !== null && _a !== void 0 ? _a : api.flashingCellApi.getFlashingCellFlashTarget(flashingAlert);
38
- return (React.createElement(BaseAlertRulesWizardSection_1.BaseAlertRulesWizardSection, { onChange: props.onChange, wholeRowScope: false },
37
+ const flashTarget = (_a = flashingAlert.FlashTarget) !== null && _a !== void 0 ? _a : api.flashingCellApi.getFlashingCellFlashTarget(flashingAlert);
38
+ return (React.createElement(BaseAlertRulesWizardSection_1.BaseAlertRulesWizardSection, { onChange: props.onChange, wholeRowScope: false, module: "flashingCell" },
39
39
  React.createElement(rebass_1.Text, { fontSize: 2, mb: 2, pl: 2, pt: 2 }, "Flash target"),
40
- React.createElement(Tabs_1.Tabs, { value: FlashTarget !== null && FlashTarget !== void 0 ? FlashTarget : 'row', pl: 2, onValueChange: (FlashTarget) => {
41
- props.onChange(Object.assign(Object.assign({}, flashingAlert), { FlashTarget }));
40
+ React.createElement(Tabs_1.Tabs, { value: flashTarget !== null && flashTarget !== void 0 ? flashTarget : 'row', pl: 2, onValueChange: (flashTarget) => {
41
+ props.onChange(Object.assign(Object.assign({}, flashingAlert), { FlashTarget: flashTarget }));
42
42
  } },
43
43
  React.createElement(Tabs_1.Tabs.Tab, { value: "row" },
44
- React.createElement(Radio_1.default, { margin: 0, tabIndex: -1, checked: FlashTarget === 'row' }, "Row")),
44
+ React.createElement(Radio_1.default, { margin: 0, tabIndex: -1, checked: flashTarget === 'row' }, "Row")),
45
45
  React.createElement(Tabs_1.Tabs.Content, { value: "row" },
46
46
  React.createElement(rebass_1.Text, { fontSize: 2 },
47
47
  "Flash the whole ",
48
48
  React.createElement("b", null, "row"))),
49
49
  React.createElement(Tabs_1.Tabs.Tab, { value: "cell" },
50
- React.createElement(Radio_1.default, { margin: 0, tabIndex: -1, checked: FlashTarget === 'cell' }, "Cell")),
50
+ React.createElement(Radio_1.default, { margin: 0, tabIndex: -1, checked: flashTarget === 'cell' }, "Cell")),
51
51
  React.createElement(Tabs_1.Tabs.Content, { value: "cell" },
52
52
  React.createElement(rebass_1.Text, { fontSize: 2 },
53
53
  "Flash the updated ",
@@ -21,12 +21,10 @@ const FlashingCellRedux = tslib_1.__importStar(require("../../../Redux/ActionsRe
21
21
  exports.FlashingCellWizard = (props) => {
22
22
  const { api } = AdaptableContext_1.useAdaptable();
23
23
  const [flashingCell, setFlashingCell] = react_1.useState(() => {
24
- var _a;
25
- const defaults = (_a = api.internalApi.getAdaptableOptions().notificationsOptions.flashingCellDefaultProperties) !== null && _a !== void 0 ? _a : {};
26
24
  let flashingCell = props.data
27
25
  ? Helper_1.cloneObject(props.data)
28
26
  : ObjectFactory_1.default.CreateEmptyFlashingCellDefinition();
29
- flashingCell = Object.assign(Object.assign({ FlashDuration: 500 }, defaults), flashingCell);
27
+ flashingCell = api.flashingCellApi.mergeFlashingCellDefinitionWithDefaults(flashingCell);
30
28
  if (!flashingCell.Rule.BooleanExpression && !flashingCell.Rule.Predicate) {
31
29
  flashingCell.Rule.BooleanExpression = '';
32
30
  }