@adaptabletools/adaptable 11.0.0-canary.2 → 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 (82) hide show
  1. package/base.css +5 -1
  2. package/bundle.cjs.js +93 -89
  3. package/index.css +6 -1
  4. package/package.json +31 -31
  5. package/publishTimestamp.d.ts +1 -1
  6. package/publishTimestamp.js +1 -1
  7. package/src/AdaptableOptions/EntitlementOptions.d.ts +1 -1
  8. package/src/AdaptableOptions/ToolPanelOptions.d.ts +0 -1
  9. package/src/Api/GridApi.d.ts +3 -3
  10. package/src/Api/Implementation/DashboardApiImpl.js +1 -1
  11. package/src/Api/Implementation/FlashingCellApiImpl.js +2 -4
  12. package/src/Api/Implementation/GridApiImpl.d.ts +3 -3
  13. package/src/Api/Implementation/GridApiImpl.js +4 -0
  14. package/src/Api/Implementation/LayoutApiImpl.js +1 -1
  15. package/src/PredefinedConfig/Common/DataChangedInfo.d.ts +1 -1
  16. package/src/PredefinedConfig/FlashingCellState.d.ts +2 -1
  17. package/src/Redux/Store/AdaptableReduxLocalStorageEngine.js +1 -1
  18. package/src/Redux/Store/AdaptableReduxMerger.js +5 -5
  19. package/src/Redux/Store/AdaptableStore.js +11 -0
  20. package/src/Strategy/AlertModule.js +1 -1
  21. package/src/Strategy/DataChangeHistoryModule.js +1 -1
  22. package/src/Strategy/FlashingCellModule.d.ts +1 -1
  23. package/src/Strategy/FlashingCellModule.js +32 -16
  24. package/src/Strategy/TeamSharingModule.js +1 -1
  25. package/src/Strategy/Utilities/getFlashingTargetViewItems.d.ts +1 -1
  26. package/src/Strategy/Utilities/getFlashingTargetViewItems.js +3 -1
  27. package/src/Utilities/ExpressionFunctions/aggregationExpressionFunctions.js +1 -1
  28. package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.js +1 -1
  29. package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +1 -1
  30. package/src/Utilities/Extensions/StringExtensions.js +1 -1
  31. package/src/Utilities/Helpers/AdaptableHelper.js +2 -2
  32. package/src/Utilities/ObjectFactory.js +4 -2
  33. package/src/Utilities/Services/LicenseService.js +1 -1
  34. package/src/Utilities/Services/ReportService.js +1 -1
  35. package/src/View/Alert/Wizard/AlertRulesWizardSection.d.ts +1 -1
  36. package/src/View/Alert/Wizard/BaseAlertRulesWizardSection.d.ts +2 -3
  37. package/src/View/Alert/Wizard/BaseAlertRulesWizardSection.js +1 -3
  38. package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.js +15 -4
  39. package/src/View/Components/FilterForm/QuickFilterForm.js +2 -2
  40. package/src/View/Components/ModuleValueSelector/index.js +1 -1
  41. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopup.js +4 -3
  42. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupModuleView.d.ts +3 -1
  43. package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupModuleView.js +19 -6
  44. package/src/View/Components/SharedProps/ModuleViewPopupProps.d.ts +1 -1
  45. package/src/View/Components/ToolPanel/AdaptableToolPanel.js +1 -1
  46. package/src/View/Components/ToolPanel/CustomToolPanelContent.js +1 -1
  47. package/src/View/Components/ToolPanel/ToolPanelPopup.js +4 -4
  48. package/src/View/Components/ValueSelector/index.d.ts +2 -1
  49. package/src/View/Components/ValueSelector/index.js +5 -5
  50. package/src/View/ConditionalStyle/Wizard/ConditionalStyleWizard.js +10 -5
  51. package/src/View/CustomSort/Wizard/CustomSortWizard.js +16 -4
  52. package/src/View/Dashboard/Dashboard.js +3 -2
  53. package/src/View/Dashboard/DashboardPopup.js +5 -5
  54. package/src/View/Export/Wizard/NewReportWizard.js +13 -3
  55. package/src/View/FlashingCell/Wizard/FlashingCellRulesWizardSection.js +17 -26
  56. package/src/View/FlashingCell/Wizard/FlashingCellScopeWizardSection.js +19 -2
  57. package/src/View/FlashingCell/Wizard/FlashingCellSettingsWizardSection.js +20 -5
  58. package/src/View/FlashingCell/Wizard/FlashingCellWizard.js +1 -1
  59. package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +2 -2
  60. package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +10 -5
  61. package/src/View/FreeTextColumn/Wizard/FreeTextColumnWizard.js +12 -5
  62. package/src/View/PlusMinus/Wizard/PlusMinusWizard.js +8 -2
  63. package/src/View/Query/QueryViewPanel.js +12 -9
  64. package/src/View/Query/Wizard/NamedQueryWizard.js +3 -1
  65. package/src/View/QuickSearch/useQuickSearchDebounced.js +1 -1
  66. package/src/View/Schedule/Wizard/ScheduleWizard.js +14 -14
  67. package/src/View/SpecialColumnSettingsWizardStep.js +3 -2
  68. package/src/View/Wizard/AdaptableWizard.js +1 -1
  69. package/src/View/Wizard/Interface/IAdaptableWizard.d.ts +2 -0
  70. package/src/View/Wizard/OnePageAdaptableWizard.js +1 -1
  71. package/src/agGrid/Adaptable.d.ts +0 -2
  72. package/src/agGrid/Adaptable.js +42 -28
  73. package/src/agGrid/agGridHelper.js +1 -1
  74. package/src/agGrid/agGridMenuHelper.js +1 -1
  75. package/src/components/Dashboard/DashboardManager.d.ts +5 -3
  76. package/src/components/Dashboard/DashboardManager.js +33 -27
  77. package/src/components/DropdownButton/renderItem.js +1 -1
  78. package/src/components/FormLayout/index.js +1 -1
  79. package/src/components/OverlayTrigger/Overlay.js +1 -1
  80. package/src/metamodel/adaptable.metamodel.js +1 -1
  81. package/version.d.ts +1 -1
  82. package/version.js +1 -1
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.QuickFilterFormReact = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const React = tslib_1.__importStar(require("react"));
6
- const debounce_1 = tslib_1.__importDefault(require("lodash-es/debounce"));
6
+ const debounce_1 = tslib_1.__importDefault(require("lodash/debounce"));
7
7
  const FilterRedux = tslib_1.__importStar(require("../../../Redux/ActionsReducers/FilterRedux"));
8
8
  const react_redux_1 = require("react-redux");
9
9
  const ObjectFactory_1 = require("../../../Utilities/ObjectFactory");
@@ -16,7 +16,7 @@ const ArrayExtensions_1 = tslib_1.__importDefault(require("../../../Utilities/Ex
16
16
  const AdaptableInput_1 = tslib_1.__importDefault(require("../AdaptableInput"));
17
17
  const renderWithAdaptableContext_1 = require("../../renderWithAdaptableContext");
18
18
  const CheckBox_1 = require("../../../components/CheckBox");
19
- const isEqual_1 = tslib_1.__importDefault(require("lodash-es/isEqual"));
19
+ const isEqual_1 = tslib_1.__importDefault(require("lodash/isEqual"));
20
20
  const runIfNotResolvedIn_1 = require("../../../Utilities/runIfNotResolvedIn");
21
21
  const getDefaultColumnFilterPredicate_1 = require("./getDefaultColumnFilterPredicate");
22
22
  class QuickFilterFormComponent extends React.Component {
@@ -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, isDisabled: props.isDisabled })));
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, isOptionDisabled: props.isOptionDisabled, disabled: props.disabled })));
34
34
  };
@@ -72,8 +72,9 @@ exports.AdaptablePopup = (props) => {
72
72
  const module = props.api.internalApi.getModuleService().getModuleById(componentModule);
73
73
  const moduleInfo = module === null || module === void 0 ? void 0 : module.moduleInfo;
74
74
  // action popups + non-primary module popups
75
- const isActionModule = DefaultSettingsPanel_1.ACTION_POPUPS.includes(moduleInfo === null || moduleInfo === void 0 ? void 0 : moduleInfo.ModuleName) ||
76
- (props.componentName && props.componentName !== moduleInfo.Popup);
75
+ const isActionModule = moduleInfo &&
76
+ (DefaultSettingsPanel_1.ACTION_POPUPS.includes(moduleInfo === null || moduleInfo === void 0 ? void 0 : moduleInfo.ModuleName) ||
77
+ (props.componentName && props.componentName !== (moduleInfo === null || moduleInfo === void 0 ? void 0 : moduleInfo.Popup)));
77
78
  const baseClassName = 'ab-Adaptable-Popup';
78
79
  const className = join_1.default(baseClassName, `${baseClassName}--${(_c = settingsPanelOptions.popupType) !== null && _c !== void 0 ? _c : 'window'}`, isActionModule ? `${baseClassName}--action-popup` : `${baseClassName}--settings-popup`);
79
80
  const isWindowModal = settingsPanelOptions.popupType === 'window';
@@ -84,7 +85,7 @@ exports.AdaptablePopup = (props) => {
84
85
  else if (isActionModule) {
85
86
  style = { maxWidth: 800, maxHeight: 450 };
86
87
  }
87
- const settingsKey = isActionModule ? `action-${moduleInfo.FriendlyName}` : 'settings';
88
+ const settingsKey = isActionModule ? `action-${moduleInfo === null || moduleInfo === void 0 ? void 0 : moduleInfo.FriendlyName}` : 'settings';
88
89
  let popupSettings = react_redux_1.useSelector((state) => { var _a, _b; return (_b = (_a = state === null || state === void 0 ? void 0 : state.System) === null || _a === void 0 ? void 0 : _a.SettingsPanel) === null || _b === void 0 ? void 0 : _b[settingsKey]; });
89
90
  if (!popupSettings) {
90
91
  const size = isActionModule
@@ -1,9 +1,11 @@
1
1
  import * as React from 'react';
2
2
  import { AccessLevel, AdaptableApi } from '../../../../../types';
3
3
  import { IModule } from '../../../../Strategy/Interface/IModule';
4
- export interface AdaptablePopupModuleViewProps {
4
+ import { ModuleParams, ModuleViewPopupProps } from '../../SharedProps/ModuleViewPopupProps';
5
+ export interface AdaptablePopupModuleViewProps extends ModuleViewPopupProps<typeof AdaptablePopupModuleView> {
5
6
  module: IModule;
6
7
  api: AdaptableApi;
7
8
  accessLevel: AccessLevel;
9
+ popupParams?: ModuleParams;
8
10
  }
9
11
  export declare const AdaptablePopupModuleView: React.FunctionComponent<AdaptablePopupModuleViewProps>;
@@ -11,18 +11,27 @@ const AdaptableObjectList_1 = require("../../AdaptableObjectList");
11
11
  const ButtonNew_1 = require("../../Buttons/ButtonNew");
12
12
  const PopupPanel_1 = require("./PopupPanel");
13
13
  exports.AdaptablePopupModuleView = (props) => {
14
- var _a, _b, _c;
14
+ var _a, _b, _c, _d;
15
15
  /**
16
16
  * This triggers an render for each redux change.
17
17
  * Not sure yet how to trigger this component to render when an item is edited.
18
18
  */
19
19
  react_redux_1.useSelector((state) => state);
20
- const [isWizardOpen, setIsWizardOpen] = React.useState(false);
20
+ const [isWizardOpen, setIsWizardOpen] = React.useState(() => {
21
+ var _a, _b;
22
+ return ((_a = props.popupParams) === null || _a === void 0 ? void 0 : _a.action) === 'New' || ((_b = props.popupParams) === null || _b === void 0 ? void 0 : _b.action) === 'Edit';
23
+ });
24
+ React.useEffect(() => {
25
+ var _a, _b;
26
+ if (((_a = props.popupParams) === null || _a === void 0 ? void 0 : _a.action) === 'New' || ((_b = props.popupParams) === null || _b === void 0 ? void 0 : _b.action) === 'Edit') {
27
+ setIsWizardOpen(true);
28
+ }
29
+ }, [(_a = props.popupParams) === null || _a === void 0 ? void 0 : _a.action]);
21
30
  const [abObjectType, setAbObjectType] = React.useState(null);
22
31
  const moduleInfo = props.module.moduleInfo;
23
- const items = (_a = props.module) === null || _a === void 0 ? void 0 : _a.toViewAll();
32
+ const items = (_b = props.module) === null || _b === void 0 ? void 0 : _b.toViewAll();
24
33
  const moduleViewProperties = props.module.getViewProperties();
25
- const EditWizard = (_b = moduleViewProperties === null || moduleViewProperties === void 0 ? void 0 : moduleViewProperties.getEditWizard) === null || _b === void 0 ? void 0 : _b.call(moduleViewProperties);
34
+ const EditWizard = (_c = moduleViewProperties === null || moduleViewProperties === void 0 ? void 0 : moduleViewProperties.getEditWizard) === null || _c === void 0 ? void 0 : _c.call(moduleViewProperties);
26
35
  const emptyView = moduleViewProperties.emptyView;
27
36
  let emptyContent = null;
28
37
  if (typeof emptyView === 'function') {
@@ -34,7 +43,7 @@ exports.AdaptablePopupModuleView = (props) => {
34
43
  // Some modules do not have new button
35
44
  // e.g. filter
36
45
  let newButton = null;
37
- if ((_c = moduleViewProperties === null || moduleViewProperties === void 0 ? void 0 : moduleViewProperties.abObjectTypes) === null || _c === void 0 ? void 0 : _c.length) {
46
+ if ((_d = moduleViewProperties === null || moduleViewProperties === void 0 ? void 0 : moduleViewProperties.abObjectTypes) === null || _d === void 0 ? void 0 : _d.length) {
38
47
  const items = moduleViewProperties === null || moduleViewProperties === void 0 ? void 0 : moduleViewProperties.abObjectTypes.map((abObjctType) => {
39
48
  var _a;
40
49
  return {
@@ -58,10 +67,14 @@ exports.AdaptablePopupModuleView = (props) => {
58
67
  } }));
59
68
  }
60
69
  const handleWizardClose = () => {
70
+ var _a;
61
71
  setAbObjectType(null);
62
72
  setIsWizardOpen(false);
73
+ if (['Toolbar', 'ContextMenu', 'ColumnMenu'].includes((_a = props === null || props === void 0 ? void 0 : props.popupParams) === null || _a === void 0 ? void 0 : _a.source)) {
74
+ props.onClosePopup();
75
+ }
63
76
  };
64
77
  return (React.createElement(PopupPanel_1.PopupPanel, { glyphicon: moduleInfo.Glyph, infoLink: moduleInfo.HelpPage, headerText: moduleInfo.FriendlyName, button: newButton },
65
78
  (items === null || items === void 0 ? void 0 : items.length) ? (React.createElement(AdaptableObjectList_1.AdaptableObjectList, { module: props.module, items: items })) : (React.createElement(EmptyContent_1.default, null, emptyContent !== null && emptyContent !== void 0 ? emptyContent : `Click 'New' to create a new ${moduleInfo.FriendlyName}`)),
66
- isWizardOpen && (React.createElement(EditWizard, { abObjectType: abObjectType, moduleInfo: moduleInfo, data: null, configEntities: null, onCloseWizard: handleWizardClose, onFinishWizard: handleWizardClose }))));
79
+ isWizardOpen && (React.createElement(EditWizard, { abObjectType: abObjectType, moduleInfo: moduleInfo, data: null, popupParams: props.popupParams, configEntities: null, onCloseWizard: handleWizardClose, onFinishWizard: handleWizardClose }))));
67
80
  };
@@ -4,7 +4,7 @@ import { AdaptableColumn } from '../../../PredefinedConfig/Common/AdaptableColum
4
4
  import { ModuleInfo } from '../../../Strategy/Interface/IModule';
5
5
  import { AdaptableObject } from '../../../types';
6
6
  export interface ModuleViewPopupProps<View> extends BaseProps<View> {
7
- popupParams: ModuleParams;
7
+ popupParams?: ModuleParams;
8
8
  onClearPopupParams: () => PopupRedux.PopupClearParamAction;
9
9
  teamSharingActivated: boolean;
10
10
  onClosePopup: () => void;
@@ -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");
@@ -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,7 @@ 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');
67
68
  const isModuleCheckboxDisabled = (module) => {
68
69
  if (module === 'SettingsPanel') {
69
70
  return this.props.api.internalApi.getAdaptableOptions().settingsPanelOptions
@@ -78,9 +79,9 @@ class ToolPanelPopupComponent extends React.Component {
78
79
  React.createElement(Tabs_1.Tabs.Tab, { value: ToolPanelConfigView.Buttons },
79
80
  React.createElement(Radio_1.default, { margin: 0, value: ToolPanelConfigView.Buttons, checked: this.state.ToolPanelConfigView == ToolPanelConfigView.Buttons, tabIndex: -1 }, "Module Buttons")),
80
81
  React.createElement(Tabs_1.Tabs.Content, { value: ToolPanelConfigView.ToolPanels, style: { flex: 1, overflow: 'auto' } },
81
- 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 })),
82
83
  React.createElement(Tabs_1.Tabs.Content, { value: ToolPanelConfigView.Buttons, style: { flex: 1, overflow: 'auto' } },
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) })))));
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) })))));
84
85
  }
85
86
  onShowGridPropertiesChanged(event) {
86
87
  let e = event.target;
@@ -88,8 +89,7 @@ class ToolPanelPopupComponent extends React.Component {
88
89
  this.setState({ ToolPanelConfigView: ToolPanelConfigView });
89
90
  }
90
91
  onToolPanelToolPanelsChanged(selectedValues) {
91
- const currentSelectedToolPanelDefinitions = this.props
92
- .ToolPanelState.ToolPanels;
92
+ const currentSelectedToolPanelDefinitions = this.props.ToolPanelState.ToolPanels;
93
93
  // try to return the pre-existing definition (to maintain the previous collapsed state)
94
94
  // otherwise select the new toolPanel with the default 'collapsed' state
95
95
  let newSelectedToolPanelDefinitions = selectedValues.map((selectedToolPanel) => {
@@ -15,7 +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
- isDisabled?: (option: OPTION_TYPE) => boolean;
18
+ isOptionDisabled?: (option: OPTION_TYPE) => boolean;
19
+ disabled?: boolean;
19
20
  };
20
21
  export declare function ValueSelector<OPTION_TYPE, ID_TYPE extends number | string>(props: ValueSelectorProps<OPTION_TYPE, ID_TYPE>): JSX.Element;
21
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, isDisabled, } = 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, disabled: isDisabled ? isDisabled(option) : false, 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,7 +13,7 @@ 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"));
16
+ const kebabCase_1 = tslib_1.__importDefault(require("lodash/kebabCase"));
17
17
  const AdaptableFormControlTextClear_1 = require("../Components/Forms/AdaptableFormControlTextClear");
18
18
  const useQuickSearchDebounced_1 = require("../QuickSearch/useQuickSearchDebounced");
19
19
  const UIHelper_1 = tslib_1.__importDefault(require("../UIHelper"));
@@ -90,7 +90,8 @@ const DashboardComponent = (props) => {
90
90
  };
91
91
  const renderDashboardButtons = () => {
92
92
  var _a;
93
- 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);
94
95
  let customDashboardButtons = null;
95
96
  if (dashboardButtonsArray) {
96
97
  customDashboardButtons = dashboardButtonsArray.map((button) => {
@@ -58,11 +58,11 @@ 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
66
  const isModuleCheckboxDisabled = (module) => {
67
67
  if (module === 'SettingsPanel') {
68
68
  return this.props.api.internalApi.getAdaptableOptions().settingsPanelOptions
@@ -72,7 +72,7 @@ class DashboardPopupComponent extends React.Component {
72
72
  };
73
73
  return (React.createElement(PopupPanel_1.PopupPanel, { headerText: this.props.moduleInfo.FriendlyName, glyphicon: this.props.moduleInfo.Glyph },
74
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 },
75
+ areDashboardSettingsVisible && (React.createElement(Panel_1.default, { header: 'Dashboard Settings', style: { height: 'auto', overflow: 'visible' }, variant: "default", borderRadius: "none", marginLeft: 2, marginRight: 2 },
76
76
  React.createElement(rebass_1.Flex, null,
77
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
78
  ' ',
@@ -84,8 +84,8 @@ class DashboardPopupComponent extends React.Component {
84
84
  React.createElement(Radio_1.default, { marginLeft: 3, value: DashboardConfigView.Toolbars, checked: this.state.DashboardConfigView == DashboardConfigView.Toolbars, onChange: (_, e) => this.onDashboardConfigViewChanged(e) }, "Toolbars"),
85
85
  React.createElement(Radio_1.default, { marginLeft: 3, value: DashboardConfigView.Buttons, checked: this.state.DashboardConfigView == DashboardConfigView.Buttons, onChange: (_, e) => this.onDashboardConfigViewChanged(e) }, "Buttons")),
86
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) })))))));
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) })))))));
89
89
  }
90
90
  onDashboardConfigViewChanged(event) {
91
91
  let e = event.target;
@@ -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, module: "flashingCell" },
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: 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
  };
@@ -3,7 +3,24 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.FlashingAlertScopeWizardSection = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const React = tslib_1.__importStar(require("react"));
6
- const BaseAlertScopeWizardSection_1 = require("../../Alert/Wizard/BaseAlertScopeWizardSection");
6
+ const rebass_1 = require("rebass");
7
+ const NewScopeComponent_1 = require("../../Components/NewScopeComponent");
8
+ const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
7
9
  exports.FlashingAlertScopeWizardSection = (props) => {
8
- return React.createElement(BaseAlertScopeWizardSection_1.BaseAlertScopeWizardSection, Object.assign({}, props));
10
+ const { data, api } = OnePageAdaptableWizard_1.useOnePageWizardContext();
11
+ return (React.createElement(rebass_1.Flex, { flexDirection: "column", style: { height: '100%' }, padding: 2 },
12
+ React.createElement(NewScopeComponent_1.NewScopeComponent, { descriptions: {
13
+ rowScope: 'Changes anywhere in the row will trigger an Flashing Cell',
14
+ columnScope: 'Changes in selected columns will trigger an Flashing Cell',
15
+ }, scope: data.Scope, updateScope: (Scope) => {
16
+ const newData = Object.assign(Object.assign({}, data), { Scope });
17
+ if (newData.Rule.Predicate) {
18
+ // when scope is changed, reset the rule to predicate of any
19
+ // if it was set to a predicate before
20
+ newData.Rule = {
21
+ Predicate: { PredicateId: 'Any' },
22
+ };
23
+ }
24
+ props.onChange(newData);
25
+ } })));
9
26
  };
@@ -12,6 +12,7 @@ const Tabs_1 = require("../../../components/Tabs");
12
12
  const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
13
13
  const CodeBlock_1 = require("../../../components/CodeBlock");
14
14
  const FormLayout_1 = tslib_1.__importStar(require("../../../components/FormLayout"));
15
+ const CheckBox_1 = require("../../../components/CheckBox");
15
16
  exports.renderFlashingAlertSettingsSummary = (flashingAlert) => {
16
17
  return (React.createElement(React.Fragment, null,
17
18
  React.createElement(rebass_1.Text, { fontSize: 2 }, flashingAlert.FlashDuration === 'always' ? (React.createElement(React.Fragment, null, "Flashing is never removed")) : (React.createElement(React.Fragment, null,
@@ -21,7 +22,7 @@ exports.renderFlashingAlertSettingsSummary = (flashingAlert) => {
21
22
  "milliseconds")))));
22
23
  };
23
24
  exports.FlashingAlertSettingsWizardSection = (props) => {
24
- var _a;
25
+ var _a, _b, _c, _d, _e, _f, _g;
25
26
  let { data: flashingCell } = OnePageAdaptableWizard_1.useOnePageWizardContext();
26
27
  flashingCell = flashingCell !== null && flashingCell !== void 0 ? flashingCell : props.flashingCell;
27
28
  const setDuration = (FlashDuration) => {
@@ -40,8 +41,21 @@ exports.FlashingAlertSettingsWizardSection = (props) => {
40
41
  const handleTypeChange = (type) => {
41
42
  setDuration(type === 'number' ? numberDuration.current : 'always');
42
43
  };
43
- const handleTargetChange = (type) => {
44
- props.onChange(Object.assign(Object.assign({}, flashingCell), { FlashTarget: type }));
44
+ const handleTargetChange = (type, checked) => {
45
+ var _a;
46
+ let FlashTarget = (_a = flashingCell.FlashTarget) !== null && _a !== void 0 ? _a : [];
47
+ if (typeof FlashTarget === 'string') {
48
+ FlashTarget = [FlashTarget];
49
+ }
50
+ if (Array.isArray(FlashTarget)) {
51
+ if (checked) {
52
+ FlashTarget = [...FlashTarget, type];
53
+ }
54
+ else {
55
+ FlashTarget = FlashTarget.filter((target) => type != target);
56
+ }
57
+ }
58
+ props.onChange(Object.assign(Object.assign({}, flashingCell), { FlashTarget }));
45
59
  };
46
60
  return (React.createElement(rebass_1.Flex, { height: "100%", flexDirection: "column", "data-name": "plus-minus-column-settings" },
47
61
  React.createElement(Tabs_1.Tabs, { autoFocus: false, padding: 2 },
@@ -61,6 +75,7 @@ exports.FlashingAlertSettingsWizardSection = (props) => {
61
75
  React.createElement(rebass_1.Text, { fontSize: 2 }, "milliseconds"))),
62
76
  duration === 'always' && (React.createElement(rebass_1.Text, { height: 43, fontSize: 3 }, "Persists the flashing style indeterminately - can be removed manually"))),
63
77
  React.createElement(FormLayout_1.FormRow, { label: "Flash Target" },
64
- React.createElement(Radio_1.default, { onChange: () => handleTargetChange('cell'), mr: 3, checked: (flashingCell === null || flashingCell === void 0 ? void 0 : flashingCell.FlashTarget) == 'cell', tabIndex: -1 }, "Cell"),
65
- React.createElement(Radio_1.default, { onChange: () => handleTargetChange('row'), checked: (flashingCell === null || flashingCell === void 0 ? void 0 : flashingCell.FlashTarget) == 'row', tabIndex: -1 }, "Row")))))));
78
+ React.createElement(CheckBox_1.CheckBox, { onChange: (checked) => handleTargetChange('cell', checked), mr: 3, checked: (flashingCell === null || flashingCell === void 0 ? void 0 : flashingCell.FlashTarget) === 'cell' || ((_c = (_b = flashingCell === null || flashingCell === void 0 ? void 0 : flashingCell.FlashTarget) === null || _b === void 0 ? void 0 : _b.includes) === null || _c === void 0 ? void 0 : _c.call(_b, 'cell')), tabIndex: -1 }, "Cell"),
79
+ React.createElement(CheckBox_1.CheckBox, { mr: 3, onChange: (checked) => handleTargetChange('row', checked), checked: (flashingCell === null || flashingCell === void 0 ? void 0 : flashingCell.FlashTarget) === 'row' || ((_e = (_d = flashingCell === null || flashingCell === void 0 ? void 0 : flashingCell.FlashTarget) === null || _d === void 0 ? void 0 : _d.includes) === null || _e === void 0 ? void 0 : _e.call(_d, 'row')), tabIndex: -1 }, "Row"),
80
+ React.createElement(CheckBox_1.CheckBox, { onChange: (checked) => handleTargetChange('aggFuncCell', checked), checked: (flashingCell === null || flashingCell === void 0 ? void 0 : flashingCell.FlashTarget) === 'aggFuncCell' || ((_g = (_f = flashingCell === null || flashingCell === void 0 ? void 0 : flashingCell.FlashTarget) === null || _f === void 0 ? void 0 : _f.includes) === null || _g === void 0 ? void 0 : _g.call(_f, 'aggFuncCell')), tabIndex: -1 }, "Aggregated Function Cell")))))));
66
81
  };
@@ -69,7 +69,7 @@ exports.FlashingCellWizard = (props) => {
69
69
  isValid: isValidFlashingCellRules_1.isValidFlashingCellRules,
70
70
  render: () => React.createElement(FlashingCellRulesWizardSection_1.FlashingAlertRulesWizardSection, { onChange: setFlashingCell }),
71
71
  renderSummary: FlashingCellRulesWizardSection_1.renderFlashingAlertRulesSummary,
72
- title: 'Condition',
72
+ title: 'Rule',
73
73
  },
74
74
  {
75
75
  details: 'Select the Duration of the Flash',
@@ -4,8 +4,8 @@ exports.FormatColumnFormatWizardSection = exports.getFormatDisplayTypeForScope =
4
4
  const tslib_1 = require("tslib");
5
5
  const React = tslib_1.__importStar(require("react"));
6
6
  const rebass_1 = require("rebass");
7
- const uniq_1 = tslib_1.__importDefault(require("lodash-es/uniq"));
8
- const clamp_1 = tslib_1.__importDefault(require("lodash-es/clamp"));
7
+ const uniq_1 = tslib_1.__importDefault(require("lodash/uniq"));
8
+ const clamp_1 = tslib_1.__importDefault(require("lodash/clamp"));
9
9
  const HelpBlock_1 = tslib_1.__importDefault(require("../../../components/HelpBlock"));
10
10
  const Input_1 = tslib_1.__importDefault(require("../../../components/Input"));
11
11
  const SimpleButton_1 = tslib_1.__importDefault(require("../../../components/SimpleButton"));
@@ -70,15 +70,20 @@ const adjustFormatColumn = (formatColumn, api) => {
70
70
  return formatColumn;
71
71
  };
72
72
  function FormatColumnWizard(props) {
73
+ var _a;
73
74
  const { api } = AdaptableContext_1.useAdaptable();
75
+ const data = (_a = props.data) !== null && _a !== void 0 ? _a : props.popupParams.value;
74
76
  const [formatColumn, doSetFormatColumn] = react_1.useState(() => {
75
- var _a;
76
- let formatColumn = props.data
77
- ? Helper_1.cloneObject(props.data)
78
- : ObjectFactory_1.default.CreateEmptyFormatColumn();
77
+ var _a, _b, _c, _d;
78
+ let formatColumn = data ? Helper_1.cloneObject(data) : ObjectFactory_1.default.CreateEmptyFormatColumn();
79
79
  formatColumn.Scope = (_a = formatColumn.Scope) !== null && _a !== void 0 ? _a : {
80
80
  ColumnIds: [],
81
81
  };
82
+ if (((_b = props.popupParams) === null || _b === void 0 ? void 0 : _b.action) === 'New' && ((_c = props.popupParams) === null || _c === void 0 ? void 0 : _c.column)) {
83
+ formatColumn.Scope = {
84
+ ColumnIds: [(_d = props.popupParams) === null || _d === void 0 ? void 0 : _d.column.columnId],
85
+ };
86
+ }
82
87
  formatColumn = adjustFormatColumn(formatColumn, api);
83
88
  return formatColumn;
84
89
  });
@@ -87,7 +92,7 @@ function FormatColumnWizard(props) {
87
92
  }, []);
88
93
  const dispatch = react_redux_1.useDispatch();
89
94
  const handleFinish = () => {
90
- if (props.data) {
95
+ if (data) {
91
96
  dispatch(FormatColumnRedux.FormatColumnEdit(formatColumn));
92
97
  }
93
98
  else {