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

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 (233) hide show
  1. package/base.css +19 -15
  2. package/bundle.cjs.js +121 -115
  3. package/index.css +20 -17
  4. package/package.json +32 -32
  5. package/publishTimestamp.d.ts +1 -1
  6. package/publishTimestamp.js +1 -1
  7. package/src/AdaptableInterfaces/IAdaptable.d.ts +9 -4
  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 +7 -9
  11. package/src/AdaptableOptions/EntitlementOptions.d.ts +1 -1
  12. package/src/AdaptableOptions/FlashingCellOptions.d.ts +31 -0
  13. package/src/AdaptableOptions/{ChartPluginOptions.js → FlashingCellOptions.js} +0 -0
  14. package/src/AdaptableOptions/GeneralOptions.d.ts +1 -1
  15. package/src/AdaptableOptions/MenuOptions.d.ts +2 -2
  16. package/src/AdaptableOptions/NotificationsOptions.d.ts +0 -7
  17. package/src/AdaptableOptions/SettingsPanelOptions.d.ts +14 -2
  18. package/src/AdaptableOptions/TeamSharingOptions.d.ts +1 -1
  19. package/src/AdaptableOptions/ToolPanelOptions.d.ts +0 -15
  20. package/src/AdaptableOptions/UserInterfaceOptions.d.ts +5 -0
  21. package/src/Api/AdaptableApi.d.ts +6 -6
  22. package/src/Api/ChartingApi.d.ts +9 -0
  23. package/src/Api/{ChartApi.js → ChartingApi.js} +0 -0
  24. package/src/Api/ColumnApi.d.ts +11 -1
  25. package/src/Api/ConfigApi.d.ts +0 -12
  26. package/src/Api/EventApi.d.ts +3 -3
  27. package/src/Api/Events/AdaptableReady.d.ts +1 -1
  28. package/src/Api/Events/FlashingCellDisplayed.d.ts +2 -2
  29. package/src/Api/Events/SearchChanged.d.ts +1 -1
  30. package/src/Api/FlashingCellApi.d.ts +35 -24
  31. package/src/Api/GridApi.d.ts +3 -3
  32. package/src/Api/Implementation/AdaptableApiImpl.d.ts +2 -2
  33. package/src/Api/Implementation/AdaptableApiImpl.js +2 -2
  34. package/src/Api/Implementation/CalculatedColumnApiImpl.js +1 -1
  35. package/src/Api/Implementation/ChartingApiImpl.d.ts +5 -0
  36. package/src/Api/Implementation/ChartingApiImpl.js +10 -0
  37. package/src/Api/Implementation/ColumnApiImpl.d.ts +3 -1
  38. package/src/Api/Implementation/ColumnApiImpl.js +9 -3
  39. package/src/Api/Implementation/ConfigApiImpl.d.ts +0 -4
  40. package/src/Api/Implementation/ConfigApiImpl.js +0 -16
  41. package/src/Api/Implementation/DashboardApiImpl.js +1 -1
  42. package/src/Api/Implementation/FlashingCellApiImpl.d.ts +8 -4
  43. package/src/Api/Implementation/FlashingCellApiImpl.js +42 -29
  44. package/src/Api/Implementation/FreeTextColumnApiImpl.js +1 -1
  45. package/src/Api/Implementation/GridApiImpl.d.ts +3 -3
  46. package/src/Api/Implementation/GridApiImpl.js +5 -1
  47. package/src/Api/Implementation/InternalApiImpl.d.ts +0 -5
  48. package/src/Api/Implementation/InternalApiImpl.js +1 -15
  49. package/src/Api/Implementation/LayoutApiImpl.js +1 -1
  50. package/src/Api/Implementation/PluginsApiImpl.d.ts +0 -2
  51. package/src/Api/Implementation/PluginsApiImpl.js +0 -6
  52. package/src/Api/Implementation/PlusMinusApiImpl.js +1 -1
  53. package/src/Api/Implementation/QueryApiImpl.js +1 -1
  54. package/src/Api/Implementation/ToolPanelApiImpl.js +2 -2
  55. package/src/Api/InternalApi.d.ts +0 -5
  56. package/src/Api/PluginsApi.d.ts +0 -2
  57. package/src/PredefinedConfig/AdaptableState.d.ts +0 -4
  58. package/src/PredefinedConfig/Common/AdaptablePredicate.d.ts +4 -4
  59. package/src/PredefinedConfig/Common/AdaptablePredicate.js +38 -38
  60. package/src/PredefinedConfig/Common/DataChangedInfo.d.ts +1 -1
  61. package/src/PredefinedConfig/Common/Enums.js +1 -0
  62. package/src/PredefinedConfig/Common/Menu.d.ts +15 -19
  63. package/src/PredefinedConfig/Common/SpecialColumnSettings.d.ts +4 -0
  64. package/src/PredefinedConfig/Common/Types.d.ts +5 -5
  65. package/src/PredefinedConfig/Common/Types.js +0 -2
  66. package/src/PredefinedConfig/DashboardState.d.ts +4 -4
  67. package/src/PredefinedConfig/FlashingCellState.d.ts +16 -20
  68. package/src/PredefinedConfig/PredefinedConfig.d.ts +0 -10
  69. package/src/PredefinedConfig/SystemState.d.ts +0 -4
  70. package/src/PredefinedConfig/ThemeState.d.ts +2 -1
  71. package/src/Redux/ActionsReducers/DashboardRedux.d.ts +0 -7
  72. package/src/Redux/ActionsReducers/DashboardRedux.js +2 -12
  73. package/src/Redux/ActionsReducers/PopupRedux.d.ts +0 -2
  74. package/src/Redux/ActionsReducers/SystemRedux.d.ts +0 -12
  75. package/src/Redux/ActionsReducers/SystemRedux.js +1 -21
  76. package/src/Redux/ActionsReducers/ToolPanelRedux.js +1 -2
  77. package/src/Redux/Store/AdaptableReduxLocalStorageEngine.js +1 -1
  78. package/src/Redux/Store/AdaptableReduxMerger.js +5 -5
  79. package/src/Redux/Store/AdaptableStore.js +21 -21
  80. package/src/Strategy/AdaptableModuleBase.d.ts +1 -1
  81. package/src/Strategy/AdaptableModuleBase.js +0 -3
  82. package/src/Strategy/AlertModule.js +2 -2
  83. package/src/Strategy/CalculatedColumnModule.js +17 -12
  84. package/src/Strategy/ChartingModule.d.ts +7 -0
  85. package/src/Strategy/ChartingModule.js +15 -0
  86. package/src/Strategy/ConditionalStyleModule.js +1 -1
  87. package/src/Strategy/DataChangeHistoryModule.js +1 -1
  88. package/src/Strategy/FilterModule.js +3 -2
  89. package/src/Strategy/FlashingCellModule.d.ts +1 -1
  90. package/src/Strategy/FlashingCellModule.js +35 -19
  91. package/src/Strategy/FormatColumnModule.js +2 -2
  92. package/src/Strategy/Interface/IModule.d.ts +0 -1
  93. package/src/Strategy/LayoutModule.js +15 -3
  94. package/src/Strategy/QueryModule.d.ts +1 -1
  95. package/src/Strategy/QueryModule.js +1 -3
  96. package/src/Strategy/SetingsPanelModule.d.ts +1 -0
  97. package/src/Strategy/SetingsPanelModule.js +7 -1
  98. package/src/Strategy/TeamSharingModule.js +1 -1
  99. package/src/Strategy/Utilities/getFlashingTargetViewItems.d.ts +5 -0
  100. package/src/Strategy/Utilities/getFlashingTargetViewItems.js +11 -0
  101. package/src/Strategy/Utilities/getFormatColumnStyleViewItems.d.ts +3 -0
  102. package/src/Strategy/Utilities/getFormatColumnStyleViewItems.js +10 -0
  103. package/src/Utilities/Constants/ConfigConstants.d.ts +0 -1
  104. package/src/Utilities/Constants/ConfigConstants.js +1 -2
  105. package/src/Utilities/Constants/GeneralConstants.d.ts +0 -9
  106. package/src/Utilities/Constants/GeneralConstants.js +1 -12
  107. package/src/Utilities/Constants/ModuleConstants.d.ts +1 -2
  108. package/src/Utilities/Constants/ModuleConstants.js +2 -3
  109. package/src/Utilities/Defaults/DefaultAdaptableOptions.js +19 -18
  110. package/src/Utilities/Defaults/DefaultSettingsPanel.d.ts +2 -1
  111. package/src/Utilities/ExpressionFunctions/aggregationExpressionFunctions.js +1 -1
  112. package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.js +1 -1
  113. package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +1 -1
  114. package/src/Utilities/Extensions/StringExtensions.js +1 -1
  115. package/src/Utilities/Helpers/AdaptableHelper.js +4 -4
  116. package/src/Utilities/Interface/MessagePopups.d.ts +0 -3
  117. package/src/Utilities/ObjectFactory.d.ts +0 -10
  118. package/src/Utilities/ObjectFactory.js +6 -67
  119. package/src/Utilities/Services/EntitlementService.js +1 -1
  120. package/src/Utilities/Services/LicenseService.js +1 -1
  121. package/src/Utilities/Services/ModuleService.js +7 -11
  122. package/src/Utilities/Services/ReportService.js +1 -1
  123. package/src/View/AdaptableView.js +2 -8
  124. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ColumnsList.d.ts +4 -3
  125. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ColumnsList.js +2 -1
  126. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationForm.js +9 -9
  127. package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/index.js +3 -3
  128. package/src/View/AdaptableWizardView/index.js +1 -1
  129. package/src/View/Alert/AlertEmptyView.js +1 -1
  130. package/src/View/Alert/Wizard/AlertRulesWizardSection.d.ts +1 -0
  131. package/src/View/Alert/Wizard/AlertWizard.js +3 -3
  132. package/src/View/Alert/Wizard/BaseAlertRulesWizardSection.d.ts +2 -2
  133. package/src/View/Alert/Wizard/BaseAlertRulesWizardSection.js +2 -1
  134. package/src/View/CalculatedColumn/Utilities/getCalculatedColumnSettingTags.js +0 -1
  135. package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.d.ts +1 -0
  136. package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +11 -24
  137. package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.js +16 -4
  138. package/src/View/Components/FilterForm/QuickFilterForm.js +2 -2
  139. package/src/View/Components/ModuleValueSelector/index.d.ts +3 -1
  140. package/src/View/Components/ModuleValueSelector/index.js +1 -1
  141. package/src/View/Components/NewScopeComponent.js +1 -1
  142. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopup.js +9 -7
  143. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupModuleView.d.ts +3 -1
  144. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupModuleView.js +19 -6
  145. package/src/View/Components/Popups/AdaptablePopup/Navigation.js +1 -1
  146. package/src/View/Components/SharedProps/ModuleViewPopupProps.d.ts +1 -1
  147. package/src/View/Components/ToolPanel/AdaptableToolPanel.js +46 -81
  148. package/src/View/Components/ToolPanel/CustomToolPanelContent.js +1 -1
  149. package/src/View/Components/ToolPanel/ToolPanelPopup.js +11 -4
  150. package/src/View/Components/ValueSelector/index.d.ts +2 -0
  151. package/src/View/Components/ValueSelector/index.js +5 -5
  152. package/src/View/ConditionalStyle/Wizard/ConditionalStyleWizard.js +10 -5
  153. package/src/View/CustomSort/Wizard/CustomSortWizard.js +16 -4
  154. package/src/View/Dashboard/Dashboard.js +14 -36
  155. package/src/View/Dashboard/DashboardPopup.js +24 -16
  156. package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +3 -2
  157. package/src/View/Export/Wizard/NewReportWizard.js +13 -3
  158. package/src/View/FlashingCell/Wizard/FlashingCellRulesWizardSection.js +17 -26
  159. package/src/View/FlashingCell/Wizard/FlashingCellScopeWizardSection.js +19 -2
  160. package/src/View/FlashingCell/Wizard/{FlashingCellDurationWizardSection.d.ts → FlashingCellSettingsWizardSection.d.ts} +3 -3
  161. package/src/View/FlashingCell/Wizard/FlashingCellSettingsWizardSection.js +81 -0
  162. package/src/View/FlashingCell/Wizard/FlashingCellWizard.js +6 -8
  163. package/src/View/FlashingCell/Wizard/isValidFlashingCellRules.js +1 -1
  164. package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +2 -2
  165. package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +10 -5
  166. package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.js +8 -3
  167. package/src/View/FreeTextColumn/Wizard/FreeTextColumnWizard.js +13 -5
  168. package/src/View/GridInfo/GridInfoPopup.js +3 -2
  169. package/src/View/PlusMinus/Wizard/PlusMinusWizard.js +8 -2
  170. package/src/View/Query/QueryViewPanel.js +12 -9
  171. package/src/View/Query/Wizard/NamedQueryWizard.js +13 -8
  172. package/src/View/QuickSearch/QuickSearchPopup.js +1 -1
  173. package/src/View/QuickSearch/useQuickSearchDebounced.js +1 -1
  174. package/src/View/Schedule/Wizard/ScheduleWizard.js +14 -14
  175. package/src/View/Shortcut/shortcutKeys.js +0 -1
  176. package/src/View/SpecialColumnSettingsWizardStep.d.ts +9 -0
  177. package/src/View/SpecialColumnSettingsWizardStep.js +63 -0
  178. package/src/View/UIHelper.d.ts +0 -4
  179. package/src/View/UIHelper.js +1 -34
  180. package/src/View/Wizard/AdaptableWizard.js +1 -1
  181. package/src/View/Wizard/Interface/IAdaptableWizard.d.ts +2 -0
  182. package/src/View/Wizard/OnePageAdaptableWizard.js +1 -1
  183. package/src/agGrid/Adaptable.d.ts +10 -7
  184. package/src/agGrid/Adaptable.js +80 -57
  185. package/src/agGrid/agGridHelper.d.ts +1 -2
  186. package/src/agGrid/agGridHelper.js +8 -5
  187. package/src/agGrid/agGridMenuHelper.js +12 -8
  188. package/src/components/ApplicationIcon.d.ts +1 -1
  189. package/src/components/Dashboard/Dashboard.js +1 -1
  190. package/src/components/Dashboard/DashboardManager.d.ts +5 -3
  191. package/src/components/Dashboard/DashboardManager.js +33 -27
  192. package/src/components/DropdownButton/renderItem.js +1 -1
  193. package/src/components/FormLayout/index.js +1 -1
  194. package/src/components/OverlayTrigger/Overlay.js +1 -1
  195. package/src/components/WindowModal/WindowModal.js +17 -2
  196. package/src/components/icons/column-add.d.ts +3 -0
  197. package/src/components/icons/column-add.js +10 -0
  198. package/src/components/icons/index.js +2 -0
  199. package/src/components/utils/useDraggable.js +2 -1
  200. package/src/metamodel/adaptable.metamodel.d.ts +58 -91
  201. package/src/metamodel/adaptable.metamodel.js +248 -297
  202. package/src/types.d.ts +4 -7
  203. package/version.d.ts +1 -1
  204. package/version.js +1 -1
  205. package/src/AdaptableOptions/ChartPluginOptions.d.ts +0 -20
  206. package/src/Api/ChartApi.d.ts +0 -20
  207. package/src/Api/Implementation/SparklineColumnApiImpl.d.ts +0 -9
  208. package/src/Api/Implementation/SparklineColumnApiImpl.js +0 -24
  209. package/src/Api/SparklineColumnApi.d.ts +0 -23
  210. package/src/Api/SparklineColumnApi.js +0 -2
  211. package/src/PredefinedConfig/ChartState.d.ts +0 -144
  212. package/src/PredefinedConfig/ChartState.js +0 -2
  213. package/src/PredefinedConfig/Common/ChartEnums.d.ts +0 -123
  214. package/src/PredefinedConfig/Common/ChartEnums.js +0 -152
  215. package/src/PredefinedConfig/SparklineColumnState.d.ts +0 -40
  216. package/src/PredefinedConfig/SparklineColumnState.js +0 -2
  217. package/src/Redux/ActionsReducers/SparklineColumnRedux.d.ts +0 -35
  218. package/src/Redux/ActionsReducers/SparklineColumnRedux.js +0 -70
  219. package/src/Utilities/Defaults/DefaultCategoryChartProperties.d.ts +0 -2
  220. package/src/Utilities/Defaults/DefaultCategoryChartProperties.js +0 -56
  221. package/src/Utilities/Defaults/DefaultPieChartProperties.d.ts +0 -2
  222. package/src/Utilities/Defaults/DefaultPieChartProperties.js +0 -13
  223. package/src/Utilities/Defaults/DefaultSparklinesChartProperties.d.ts +0 -2
  224. package/src/Utilities/Defaults/DefaultSparklinesChartProperties.js +0 -25
  225. package/src/View/Components/Panels/PanelWithIImageThreeButtons.d.ts +0 -11
  226. package/src/View/Components/Panels/PanelWithIImageThreeButtons.js +0 -28
  227. package/src/View/Components/Popups/AdaptableChart.d.ts +0 -18
  228. package/src/View/Components/Popups/AdaptableChart.js +0 -40
  229. package/src/View/Components/SharedProps/ChartDisplayPopupPropsBase.d.ts +0 -7
  230. package/src/View/Components/SharedProps/ChartDisplayPopupPropsBase.js +0 -2
  231. package/src/View/FlashingCell/Wizard/FlashingCellDurationWizardSection.js +0 -60
  232. package/src/components/ChartContainer/index.d.ts +0 -15
  233. package/src/components/ChartContainer/index.js +0 -22
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.AdaptableToolPanelAgGridComponent = exports.getAdaptableToolPanelAgGridComponent = exports.ConnectedAdaptableToolPanel = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const React = tslib_1.__importStar(require("react"));
6
- const kebabCase_1 = tslib_1.__importDefault(require("lodash-es/kebabCase"));
6
+ const kebabCase_1 = tslib_1.__importDefault(require("lodash/kebabCase"));
7
7
  const ToolPanelRedux = tslib_1.__importStar(require("../../../Redux/ActionsReducers/ToolPanelRedux"));
8
8
  const SystemRedux = tslib_1.__importStar(require("../../../Redux/ActionsReducers/SystemRedux"));
9
9
  const react_redux_1 = require("react-redux");
@@ -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) {
@@ -7,7 +7,7 @@ const react_1 = require("react");
7
7
  const AdaptableContext_1 = require("../../AdaptableContext");
8
8
  const uuid_1 = require("../../../components/utils/uuid");
9
9
  const SimpleButton_1 = tslib_1.__importDefault(require("../../../components/SimpleButton"));
10
- const kebabCase_1 = tslib_1.__importDefault(require("lodash-es/kebabCase"));
10
+ const kebabCase_1 = tslib_1.__importDefault(require("lodash/kebabCase"));
11
11
  exports.CustomToolPanelContent = (props) => {
12
12
  var _a;
13
13
  const { customToolPanel } = props;
@@ -64,6 +64,14 @@ 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 isToolPanelReadOnly = entitlementService.isModuleReadOnlyEntitlement('ToolPanel');
68
+ const isModuleCheckboxDisabled = (module) => {
69
+ if (module === 'SettingsPanel') {
70
+ return this.props.api.internalApi.getAdaptableOptions().settingsPanelOptions
71
+ .alwaysShowInDashboard;
72
+ }
73
+ return false;
74
+ };
67
75
  return (React.createElement(PopupPanel_1.PopupPanel, { headerText: "ToolPanel Configuration", glyphicon: this.props.moduleInfo.Glyph },
68
76
  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
77
  React.createElement(Tabs_1.Tabs.Tab, { value: ToolPanelConfigView.ToolPanels },
@@ -71,9 +79,9 @@ class ToolPanelPopupComponent extends React.Component {
71
79
  React.createElement(Tabs_1.Tabs.Tab, { value: ToolPanelConfigView.Buttons },
72
80
  React.createElement(Radio_1.default, { margin: 0, value: ToolPanelConfigView.Buttons, checked: this.state.ToolPanelConfigView == ToolPanelConfigView.Buttons, tabIndex: -1 }, "Module Buttons")),
73
81
  React.createElement(Tabs_1.Tabs.Content, { value: ToolPanelConfigView.ToolPanels, style: { flex: 1, overflow: 'auto' } },
74
- React.createElement(ModuleValueSelector_1.ModuleValueSelector, { options: availableToolPanels, value: selectedToolPanels, noSelectionLabel: 'No selected Tool Panel', xSelectedLabel: () => `Visible ToolPanels:`, onChange: (selectedValues) => this.onToolPanelToolPanelsChanged(selectedValues) })),
82
+ React.createElement(ModuleValueSelector_1.ModuleValueSelector, { options: availableToolPanels, value: selectedToolPanels, noSelectionLabel: 'No selected Tool Panel', xSelectedLabel: () => `Visible ToolPanels:`, onChange: (selectedValues) => this.onToolPanelToolPanelsChanged(selectedValues), disabled: isToolPanelReadOnly })),
75
83
  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) })))));
84
+ React.createElement(ModuleValueSelector_1.ModuleValueSelector, { options: allModuleButtons, value: selectedModuleButtons, noSelectionLabel: 'No selected Module Button', xSelectedLabel: () => `Visible Module Buttons:`, isOptionDisabled: isModuleCheckboxDisabled, disabled: isToolPanelReadOnly, onChange: (selectedValues) => this.props.onToolPanelSetModuleButtons(selectedValues) })))));
77
85
  }
78
86
  onShowGridPropertiesChanged(event) {
79
87
  let e = event.target;
@@ -81,8 +89,7 @@ class ToolPanelPopupComponent extends React.Component {
81
89
  this.setState({ ToolPanelConfigView: ToolPanelConfigView });
82
90
  }
83
91
  onToolPanelToolPanelsChanged(selectedValues) {
84
- const currentSelectedToolPanelDefinitions = this.props
85
- .ToolPanelState.ToolPanels;
92
+ const currentSelectedToolPanelDefinitions = this.props.ToolPanelState.ToolPanels;
86
93
  // try to return the pre-existing definition (to maintain the previous collapsed state)
87
94
  // otherwise select the new toolPanel with the default 'collapsed' state
88
95
  let newSelectedToolPanelDefinitions = selectedValues.map((selectedToolPanel) => {
@@ -15,6 +15,8 @@ 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
+ isOptionDisabled?: (option: OPTION_TYPE) => boolean;
19
+ disabled?: boolean;
18
20
  };
19
21
  export declare function ValueSelector<OPTION_TYPE, ID_TYPE extends number | string>(props: ValueSelectorProps<OPTION_TYPE, ID_TYPE>): JSX.Element;
20
22
  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, isOptionDisabled, disabled, } = 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: disabled || (isOptionDisabled ? isOptionDisabled(option) : false), onChange: (checked) => {
78
78
  if (checked) {
79
79
  selectedMap.set(identifier, option);
80
80
  }
@@ -91,13 +91,13 @@ function ValueSelector(props) {
91
91
  };
92
92
  const renderSelectionSection = () => {
93
93
  const selectionBox = (React.createElement(rebass_1.Box, { fontSize: 2, style: { whiteSpace: 'nowrap', flex: 'none' } }, !value.length ? (React.createElement(React.Fragment, null, noSelectionLabel !== null && noSelectionLabel !== void 0 ? noSelectionLabel : 'No selected options',
94
- !singleSelect ? (React.createElement(SimpleButton_1.default, { px: 1, variant: "text", style: { textDecoration: 'underline', display: 'inline-block' }, onClick: () => {
94
+ !singleSelect ? (React.createElement(SimpleButton_1.default, { px: 1, disabled: disabled, variant: "text", style: { textDecoration: 'underline', display: 'inline-block' }, onClick: () => {
95
95
  options.forEach((option) => {
96
96
  selectedMap.set(toIdentifier(option), option);
97
97
  });
98
98
  notifyChange();
99
99
  } }, "Select all")) : null)) : (React.createElement(React.Fragment, null,
100
- React.createElement(SimpleButton_1.default, { tabIndex: 0, px: 1, mr: 1, variant: "text", style: { textDecoration: 'underline', display: 'inline-block' }, onClick: () => {
100
+ React.createElement(SimpleButton_1.default, { disabled: disabled, tabIndex: 0, px: 1, mr: 1, variant: "text", style: { textDecoration: 'underline', display: 'inline-block' }, onClick: () => {
101
101
  selectedMap.clear();
102
102
  notifyChange();
103
103
  } }, clearSelectionLabel !== null && clearSelectionLabel !== void 0 ? clearSelectionLabel : 'Clear selection.'),
@@ -106,7 +106,7 @@ function ValueSelector(props) {
106
106
  : `Your selected ${value.length} ${value.length > 1 ? 'options' : 'option'}.`))));
107
107
  return (React.createElement(rebass_1.Box, { mt: selectionBoxPosition === 'bottom' ? 3 : 0, mb: selectionBoxPosition === 'top' ? 3 : 0 },
108
108
  selectionBox,
109
- React.createElement(ValueOptionsTags, { options: options, value: value, selectedMap: selectedMap, toLabel: toLabel, toIdentifier: toIdentifier, onClearOption: notifyChange })));
109
+ React.createElement(ValueOptionsTags, { options: options, value: value, selectedMap: selectedMap, toLabel: toLabel, toIdentifier: toIdentifier, onClearOption: notifyChange, readOnly: disabled })));
110
110
  };
111
111
  return (React.createElement(rebass_1.Flex, { flexDirection: "column", flex: 1, className: "ab-ValueSelector", style: {
112
112
  overflow: 'hidden',
@@ -18,14 +18,14 @@ const ObjectFactory_1 = tslib_1.__importDefault(require("../../../Utilities/Obje
18
18
  const react_redux_1 = require("react-redux");
19
19
  const ConditionalStyleRedux = tslib_1.__importStar(require("../../../Redux/ActionsReducers/ConditionalStyleRedux"));
20
20
  exports.ConditionalStyleWizard = (props) => {
21
+ var _a;
22
+ const data = (_a = props.data) !== null && _a !== void 0 ? _a : props.popupParams.value;
21
23
  const [conditionalStyle, setConditionalStyle] = react_1.useState(() => {
22
- var _a;
24
+ var _a, _b, _c;
23
25
  const DEFAULT_RULE = {
24
26
  BooleanExpression: '',
25
27
  };
26
- const conditionalStyle = props.data
27
- ? Helper_1.cloneObject(props.data)
28
- : ObjectFactory_1.default.CreateEmptyConditionalStyle();
28
+ const conditionalStyle = data ? Helper_1.cloneObject(data) : ObjectFactory_1.default.CreateEmptyConditionalStyle();
29
29
  conditionalStyle.Scope = (_a = conditionalStyle.Scope) !== null && _a !== void 0 ? _a : { All: true };
30
30
  if (!conditionalStyle.Rule) {
31
31
  conditionalStyle.Rule = DEFAULT_RULE;
@@ -33,11 +33,16 @@ exports.ConditionalStyleWizard = (props) => {
33
33
  if (!conditionalStyle.Rule.Predicate && conditionalStyle.Rule.BooleanExpression == undefined) {
34
34
  conditionalStyle.Rule.BooleanExpression = '';
35
35
  }
36
+ if (((_b = props.popupParams) === null || _b === void 0 ? void 0 : _b.action) === 'New' && ((_c = props.popupParams) === null || _c === void 0 ? void 0 : _c.column)) {
37
+ conditionalStyle.Scope = {
38
+ ColumnIds: [props.popupParams.column.columnId],
39
+ };
40
+ }
36
41
  return conditionalStyle;
37
42
  });
38
43
  const dispatch = react_redux_1.useDispatch();
39
44
  const handleFinish = () => {
40
- if (props.data) {
45
+ if (data) {
41
46
  dispatch(ConditionalStyleRedux.ConditionalStyleEdit(conditionalStyle));
42
47
  }
43
48
  else {
@@ -13,14 +13,26 @@ const ObjectFactory_1 = tslib_1.__importDefault(require("../../../Utilities/Obje
13
13
  const react_redux_1 = require("react-redux");
14
14
  const CustomSortRedux = tslib_1.__importStar(require("../../../Redux/ActionsReducers/CustomSortRedux"));
15
15
  exports.CustomSortWizard = (props) => {
16
+ var _a, _b;
17
+ let data = props.data;
18
+ const allCustomSorts = react_redux_1.useSelector((state) => { var _a; return (_a = state.CustomSort) === null || _a === void 0 ? void 0 : _a.CustomSorts; });
19
+ if (((_a = props.popupParams) === null || _a === void 0 ? void 0 : _a.action) === 'Edit' && ((_b = props.popupParams) === null || _b === void 0 ? void 0 : _b.column)) {
20
+ data = allCustomSorts.find((x) => { var _a; return x.ColumnId == ((_a = props.popupParams) === null || _a === void 0 ? void 0 : _a.column.columnId); });
21
+ }
16
22
  const [customSort, setCustomSort] = react_1.useState(() => {
17
- return props.data
18
- ? Helper_1.cloneObject(props.data)
19
- : ObjectFactory_1.default.CreateEmptyCustomSort();
23
+ var _a, _b;
24
+ if (data) {
25
+ return Helper_1.cloneObject(data);
26
+ }
27
+ const newData = ObjectFactory_1.default.CreateEmptyCustomSort();
28
+ if ((_a = props.popupParams) === null || _a === void 0 ? void 0 : _a.column) {
29
+ newData.ColumnId = (_b = props.popupParams) === null || _b === void 0 ? void 0 : _b.column.columnId;
30
+ }
31
+ return newData;
20
32
  });
21
33
  const dispatch = react_redux_1.useDispatch();
22
34
  const handleFinish = () => {
23
- if (props.data) {
35
+ if (data) {
24
36
  dispatch(CustomSortRedux.CustomSortEdit(customSort));
25
37
  }
26
38
  else {
@@ -13,20 +13,16 @@ const LoggingHelper_1 = require("../../Utilities/Helpers/LoggingHelper");
13
13
  const SimpleButton_1 = tslib_1.__importDefault(require("../../components/SimpleButton"));
14
14
  const rebass_1 = require("rebass");
15
15
  const Dashboard_1 = require("../../components/Dashboard");
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"));
16
+ const kebabCase_1 = tslib_1.__importDefault(require("lodash/kebabCase"));
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;
@@ -87,7 +90,8 @@ const DashboardComponent = (props) => {
87
90
  };
88
91
  const renderDashboardButtons = () => {
89
92
  var _a;
90
- let dashboardButtonsArray = (_a = props.api.dashboardApi.getCustomDashboardButtons()) === null || _a === void 0 ? void 0 : _a.filter((c) => c);
93
+ let dashboardButtonsArray = (_a = props.api.dashboardApi
94
+ .getCustomDashboardButtons()) === null || _a === void 0 ? void 0 : _a.filter((c) => c);
91
95
  let customDashboardButtons = null;
92
96
  if (dashboardButtonsArray) {
93
97
  customDashboardButtons = dashboardButtonsArray.map((button) => {
@@ -122,34 +126,8 @@ const DashboardComponent = (props) => {
122
126
  }
123
127
  return customDashboardButtons;
124
128
  };
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
129
  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 }),
130
+ return (React.createElement(rebass_1.Box, { ml: 2 },
153
131
  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
132
  };
155
133
  let instanceName = props.api.internalApi.setToolbarTitle();
@@ -173,10 +151,10 @@ const DashboardComponent = (props) => {
173
151
  props.onSetFloatingPosition(FloatingPositionCallback);
174
152
  }
175
153
  }, left: React.createElement(React.Fragment, null,
176
- renderDashboardIcon(props.api.internalApi.getAdaptableOptions().userInterfaceOptions.applicationIcon),
177
- dashboardOptions.showSettingsPanel && renderModulesDropdown()), right: React.createElement(React.Fragment, null,
154
+ React.createElement(ApplicationIcon_1.ApplicationIcon, { icon: props.api.internalApi.getAdaptableOptions().userInterfaceOptions.applicationIcon }),
155
+ dashboardOptions.buttonsLocation === 'left' && renderModuleButtons()), right: React.createElement(React.Fragment, null,
178
156
  renderDashboardButtons(),
179
- renderModuleButtons(),
157
+ dashboardOptions.buttonsLocation === 'right' && renderModuleButtons(),
180
158
  shouldRenderQuickSearchHeader && renderQuickSearch()), onShowDashboardPopup: props.onShowDashboardPopup }, props.DashboardState.Tabs &&
181
159
  props.DashboardState.Tabs.map((tab, index) => (React.createElement(Dashboard_1.DashboardTab, { key: index, title: tab.Name }, renderTab(tab))))));
182
160
  };
@@ -58,26 +58,34 @@ class DashboardPopupComponent extends React.Component {
58
58
  });
59
59
  const allModuleButtons = this.props.GridState.ModuleDropdownMenuItems.map((x) => x.module);
60
60
  const baseClassName = 'ab-Dashboard-Popup';
61
- // const isDisabled = this.props.Entitlements
62
61
  const dashboardAccessLevel = this.props.api.internalApi
63
62
  .getEntitlementService()
64
63
  .getEntitlementAccessLevelForModule('Dashboard');
65
- const areDashboardSettingsEnabled = dashboardAccessLevel == 'Full' || dashboardAccessLevel == 'ReadOnly';
64
+ const areDashboardSettingsVisible = dashboardAccessLevel == 'Full' || dashboardAccessLevel == 'ReadOnly';
65
+ const isDashboardDisabled = 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
+ areDashboardSettingsVisible && (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, { disabled: isDashboardDisabled, availableToolbars: [...systemToolbars, ...customToolbars], tabs: tabs, onTabsChange: this.props.onDashboardSetTabs, api: this.props.api })),
88
+ this.state.DashboardConfigView == DashboardConfigView.Buttons && (React.createElement(ModuleValueSelector_1.ModuleValueSelector, { disabled: isDashboardDisabled, options: allModuleButtons, value: selectedModuleButtons, noSelectionLabel: 'No selected Module Button', isOptionDisabled: 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}`,
@@ -14,13 +14,23 @@ const ObjectFactory_1 = tslib_1.__importDefault(require("../../../Utilities/Obje
14
14
  const react_redux_1 = require("react-redux");
15
15
  const ExportRedux = tslib_1.__importStar(require("../../../Redux/ActionsReducers/ExportRedux"));
16
16
  exports.NewReportWizard = (props) => {
17
+ var _a, _b;
18
+ const isEdit = ((_a = props.popupParams) === null || _a === void 0 ? void 0 : _a.action) ? props.popupParams.action === 'Edit'
19
+ : Boolean(props.data);
20
+ const currentReport = react_redux_1.useSelector((state) => {
21
+ if (!isEdit) {
22
+ return;
23
+ }
24
+ return state.Export.Reports.find((report) => report.Name === state.Export.CurrentReport);
25
+ });
26
+ const data = (_b = props.data) !== null && _b !== void 0 ? _b : currentReport;
17
27
  const [report, setReport] = react_1.useState(() => {
18
- return props.data ? Helper_1.cloneObject(props.data) : ObjectFactory_1.default.CreateEmptyReport();
28
+ return data ? Helper_1.cloneObject(data) : ObjectFactory_1.default.CreateEmptyReport();
19
29
  });
20
30
  const dispatch = react_redux_1.useDispatch();
21
31
  const handleFinish = () => {
22
- if (props.data) {
23
- dispatch(ExportRedux.ReportDelete(report));
32
+ if (isEdit) {
33
+ dispatch(ExportRedux.ReportEdit(report));
24
34
  }
25
35
  else {
26
36
  dispatch(ExportRedux.ReportAdd(report));
@@ -4,10 +4,6 @@ exports.FlashingAlertRulesWizardSection = exports.renderFlashingAlertRulesSummar
4
4
  const tslib_1 = require("tslib");
5
5
  const React = tslib_1.__importStar(require("react"));
6
6
  const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
7
- const Tabs_1 = require("../../../components/Tabs");
8
- const rebass_1 = require("rebass");
9
- const Radio_1 = tslib_1.__importDefault(require("../../../components/Radio"));
10
- const BaseAlertRulesWizardSection_1 = require("../../Alert/Wizard/BaseAlertRulesWizardSection");
11
7
  const CodeBlock_1 = require("../../../components/CodeBlock");
12
8
  const EntityRulesEditor_1 = require("../../Components/EntityRulesEditor");
13
9
  exports.renderFlashingAlertRulesSummary = (flashingAlert) => {
@@ -32,26 +28,21 @@ exports.renderFlashingAlertRulesSummary = (flashingAlert) => {
32
28
  } }));
33
29
  };
34
30
  exports.FlashingAlertRulesWizardSection = (props) => {
35
- var _a;
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 },
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 }));
42
- } },
43
- React.createElement(Tabs_1.Tabs.Tab, { value: "row" },
44
- React.createElement(Radio_1.default, { margin: 0, tabIndex: -1, checked: FlashTarget === 'row' }, "Row")),
45
- React.createElement(Tabs_1.Tabs.Content, { value: "row" },
46
- React.createElement(rebass_1.Text, { fontSize: 2 },
47
- "Flash the whole ",
48
- React.createElement("b", null, "row"))),
49
- React.createElement(Tabs_1.Tabs.Tab, { value: "cell" },
50
- React.createElement(Radio_1.default, { margin: 0, tabIndex: -1, checked: FlashTarget === 'cell' }, "Cell")),
51
- React.createElement(Tabs_1.Tabs.Content, { value: "cell" },
52
- React.createElement(rebass_1.Text, { fontSize: 2 },
53
- "Flash the updated ",
54
- React.createElement("b", null, "cell"),
55
- " only"))),
56
- React.createElement(rebass_1.Text, { mt: 3, fontSize: 2, pl: 2 }, "Flash rules")));
31
+ const { data, api, moduleInfo } = OnePageAdaptableWizard_1.useOnePageWizardContext();
32
+ const predicateDefs = api.flashingCellApi.getFlashingCellPredicateDefsForScope(data.Scope);
33
+ return (React.createElement(EntityRulesEditor_1.EntityRulesEditor, { module: moduleInfo.ModuleName, defaultPredicateId: "Any", data: data, predicateDefs: predicateDefs, onChange: props.onChange, showAggregation: false, showObservable: false, showBoolean: true, showPredicate: true, descriptions: {
34
+ selectPredicate: 'Select an Flashing Cell Rule - to be applied when data changes',
35
+ useBooleanQuery: (React.createElement(React.Fragment, null,
36
+ "Use an BooleanQuery if ",
37
+ React.createElement("i", null, "Scope"),
38
+ " is 'Whole Row' - so any data change may be evaluated in a complex BooleanExpression")),
39
+ useObservableQuery: (React.createElement(React.Fragment, null,
40
+ "Use an ObservableQuery if ",
41
+ React.createElement("i", null, "Scope"),
42
+ " is 'Whole Row' - so any data change may be evaluated in a complex ObservableExpression")),
43
+ useAggregationQuery: (React.createElement(React.Fragment, null,
44
+ "Use an AggregationQuery if ",
45
+ React.createElement("i", null, "Scope"),
46
+ " is 'Whole Row' - so any data change may be evaluated in a complex AggregationExpression")),
47
+ } }));
57
48
  };