@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.
- package/base.css +19 -15
- package/bundle.cjs.js +121 -115
- package/index.css +20 -17
- package/package.json +32 -32
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +9 -4
- package/src/AdaptableOptions/AdaptableOptions.d.ts +13 -2
- package/src/AdaptableOptions/ContainerOptions.d.ts +0 -7
- package/src/AdaptableOptions/DashboardOptions.d.ts +7 -9
- package/src/AdaptableOptions/EntitlementOptions.d.ts +1 -1
- package/src/AdaptableOptions/FlashingCellOptions.d.ts +31 -0
- package/src/AdaptableOptions/{ChartPluginOptions.js → FlashingCellOptions.js} +0 -0
- package/src/AdaptableOptions/GeneralOptions.d.ts +1 -1
- package/src/AdaptableOptions/MenuOptions.d.ts +2 -2
- package/src/AdaptableOptions/NotificationsOptions.d.ts +0 -7
- package/src/AdaptableOptions/SettingsPanelOptions.d.ts +14 -2
- package/src/AdaptableOptions/TeamSharingOptions.d.ts +1 -1
- package/src/AdaptableOptions/ToolPanelOptions.d.ts +0 -15
- package/src/AdaptableOptions/UserInterfaceOptions.d.ts +5 -0
- package/src/Api/AdaptableApi.d.ts +6 -6
- package/src/Api/ChartingApi.d.ts +9 -0
- package/src/Api/{ChartApi.js → ChartingApi.js} +0 -0
- package/src/Api/ColumnApi.d.ts +11 -1
- package/src/Api/ConfigApi.d.ts +0 -12
- package/src/Api/EventApi.d.ts +3 -3
- package/src/Api/Events/AdaptableReady.d.ts +1 -1
- package/src/Api/Events/FlashingCellDisplayed.d.ts +2 -2
- package/src/Api/Events/SearchChanged.d.ts +1 -1
- package/src/Api/FlashingCellApi.d.ts +35 -24
- package/src/Api/GridApi.d.ts +3 -3
- package/src/Api/Implementation/AdaptableApiImpl.d.ts +2 -2
- package/src/Api/Implementation/AdaptableApiImpl.js +2 -2
- package/src/Api/Implementation/CalculatedColumnApiImpl.js +1 -1
- package/src/Api/Implementation/ChartingApiImpl.d.ts +5 -0
- package/src/Api/Implementation/ChartingApiImpl.js +10 -0
- package/src/Api/Implementation/ColumnApiImpl.d.ts +3 -1
- package/src/Api/Implementation/ColumnApiImpl.js +9 -3
- package/src/Api/Implementation/ConfigApiImpl.d.ts +0 -4
- package/src/Api/Implementation/ConfigApiImpl.js +0 -16
- package/src/Api/Implementation/DashboardApiImpl.js +1 -1
- package/src/Api/Implementation/FlashingCellApiImpl.d.ts +8 -4
- package/src/Api/Implementation/FlashingCellApiImpl.js +42 -29
- package/src/Api/Implementation/FreeTextColumnApiImpl.js +1 -1
- package/src/Api/Implementation/GridApiImpl.d.ts +3 -3
- package/src/Api/Implementation/GridApiImpl.js +5 -1
- package/src/Api/Implementation/InternalApiImpl.d.ts +0 -5
- package/src/Api/Implementation/InternalApiImpl.js +1 -15
- package/src/Api/Implementation/LayoutApiImpl.js +1 -1
- package/src/Api/Implementation/PluginsApiImpl.d.ts +0 -2
- package/src/Api/Implementation/PluginsApiImpl.js +0 -6
- package/src/Api/Implementation/PlusMinusApiImpl.js +1 -1
- package/src/Api/Implementation/QueryApiImpl.js +1 -1
- package/src/Api/Implementation/ToolPanelApiImpl.js +2 -2
- package/src/Api/InternalApi.d.ts +0 -5
- package/src/Api/PluginsApi.d.ts +0 -2
- package/src/PredefinedConfig/AdaptableState.d.ts +0 -4
- package/src/PredefinedConfig/Common/AdaptablePredicate.d.ts +4 -4
- package/src/PredefinedConfig/Common/AdaptablePredicate.js +38 -38
- package/src/PredefinedConfig/Common/DataChangedInfo.d.ts +1 -1
- package/src/PredefinedConfig/Common/Enums.js +1 -0
- package/src/PredefinedConfig/Common/Menu.d.ts +15 -19
- package/src/PredefinedConfig/Common/SpecialColumnSettings.d.ts +4 -0
- package/src/PredefinedConfig/Common/Types.d.ts +5 -5
- package/src/PredefinedConfig/Common/Types.js +0 -2
- package/src/PredefinedConfig/DashboardState.d.ts +4 -4
- package/src/PredefinedConfig/FlashingCellState.d.ts +16 -20
- package/src/PredefinedConfig/PredefinedConfig.d.ts +0 -10
- package/src/PredefinedConfig/SystemState.d.ts +0 -4
- package/src/PredefinedConfig/ThemeState.d.ts +2 -1
- package/src/Redux/ActionsReducers/DashboardRedux.d.ts +0 -7
- package/src/Redux/ActionsReducers/DashboardRedux.js +2 -12
- package/src/Redux/ActionsReducers/PopupRedux.d.ts +0 -2
- package/src/Redux/ActionsReducers/SystemRedux.d.ts +0 -12
- package/src/Redux/ActionsReducers/SystemRedux.js +1 -21
- package/src/Redux/ActionsReducers/ToolPanelRedux.js +1 -2
- package/src/Redux/Store/AdaptableReduxLocalStorageEngine.js +1 -1
- package/src/Redux/Store/AdaptableReduxMerger.js +5 -5
- package/src/Redux/Store/AdaptableStore.js +21 -21
- package/src/Strategy/AdaptableModuleBase.d.ts +1 -1
- package/src/Strategy/AdaptableModuleBase.js +0 -3
- package/src/Strategy/AlertModule.js +2 -2
- package/src/Strategy/CalculatedColumnModule.js +17 -12
- package/src/Strategy/ChartingModule.d.ts +7 -0
- package/src/Strategy/ChartingModule.js +15 -0
- package/src/Strategy/ConditionalStyleModule.js +1 -1
- package/src/Strategy/DataChangeHistoryModule.js +1 -1
- package/src/Strategy/FilterModule.js +3 -2
- package/src/Strategy/FlashingCellModule.d.ts +1 -1
- package/src/Strategy/FlashingCellModule.js +35 -19
- package/src/Strategy/FormatColumnModule.js +2 -2
- package/src/Strategy/Interface/IModule.d.ts +0 -1
- package/src/Strategy/LayoutModule.js +15 -3
- package/src/Strategy/QueryModule.d.ts +1 -1
- package/src/Strategy/QueryModule.js +1 -3
- package/src/Strategy/SetingsPanelModule.d.ts +1 -0
- package/src/Strategy/SetingsPanelModule.js +7 -1
- package/src/Strategy/TeamSharingModule.js +1 -1
- package/src/Strategy/Utilities/getFlashingTargetViewItems.d.ts +5 -0
- package/src/Strategy/Utilities/getFlashingTargetViewItems.js +11 -0
- package/src/Strategy/Utilities/getFormatColumnStyleViewItems.d.ts +3 -0
- package/src/Strategy/Utilities/getFormatColumnStyleViewItems.js +10 -0
- package/src/Utilities/Constants/ConfigConstants.d.ts +0 -1
- package/src/Utilities/Constants/ConfigConstants.js +1 -2
- package/src/Utilities/Constants/GeneralConstants.d.ts +0 -9
- package/src/Utilities/Constants/GeneralConstants.js +1 -12
- package/src/Utilities/Constants/ModuleConstants.d.ts +1 -2
- package/src/Utilities/Constants/ModuleConstants.js +2 -3
- package/src/Utilities/Defaults/DefaultAdaptableOptions.js +19 -18
- package/src/Utilities/Defaults/DefaultSettingsPanel.d.ts +2 -1
- package/src/Utilities/ExpressionFunctions/aggregationExpressionFunctions.js +1 -1
- package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.js +1 -1
- package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +1 -1
- package/src/Utilities/Extensions/StringExtensions.js +1 -1
- package/src/Utilities/Helpers/AdaptableHelper.js +4 -4
- package/src/Utilities/Interface/MessagePopups.d.ts +0 -3
- package/src/Utilities/ObjectFactory.d.ts +0 -10
- package/src/Utilities/ObjectFactory.js +6 -67
- package/src/Utilities/Services/EntitlementService.js +1 -1
- package/src/Utilities/Services/LicenseService.js +1 -1
- package/src/Utilities/Services/ModuleService.js +7 -11
- package/src/Utilities/Services/ReportService.js +1 -1
- package/src/View/AdaptableView.js +2 -8
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ColumnsList.d.ts +4 -3
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ColumnsList.js +2 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationForm.js +9 -9
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/index.js +3 -3
- package/src/View/AdaptableWizardView/index.js +1 -1
- package/src/View/Alert/AlertEmptyView.js +1 -1
- package/src/View/Alert/Wizard/AlertRulesWizardSection.d.ts +1 -0
- package/src/View/Alert/Wizard/AlertWizard.js +3 -3
- package/src/View/Alert/Wizard/BaseAlertRulesWizardSection.d.ts +2 -2
- package/src/View/Alert/Wizard/BaseAlertRulesWizardSection.js +2 -1
- package/src/View/CalculatedColumn/Utilities/getCalculatedColumnSettingTags.js +0 -1
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.d.ts +1 -0
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +11 -24
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.js +16 -4
- package/src/View/Components/FilterForm/QuickFilterForm.js +2 -2
- package/src/View/Components/ModuleValueSelector/index.d.ts +3 -1
- package/src/View/Components/ModuleValueSelector/index.js +1 -1
- package/src/View/Components/NewScopeComponent.js +1 -1
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopup.js +9 -7
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupModuleView.d.ts +3 -1
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupModuleView.js +19 -6
- package/src/View/Components/Popups/AdaptablePopup/Navigation.js +1 -1
- package/src/View/Components/SharedProps/ModuleViewPopupProps.d.ts +1 -1
- package/src/View/Components/ToolPanel/AdaptableToolPanel.js +46 -81
- package/src/View/Components/ToolPanel/CustomToolPanelContent.js +1 -1
- package/src/View/Components/ToolPanel/ToolPanelPopup.js +11 -4
- package/src/View/Components/ValueSelector/index.d.ts +2 -0
- package/src/View/Components/ValueSelector/index.js +5 -5
- package/src/View/ConditionalStyle/Wizard/ConditionalStyleWizard.js +10 -5
- package/src/View/CustomSort/Wizard/CustomSortWizard.js +16 -4
- package/src/View/Dashboard/Dashboard.js +14 -36
- package/src/View/Dashboard/DashboardPopup.js +24 -16
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +3 -2
- package/src/View/Export/Wizard/NewReportWizard.js +13 -3
- package/src/View/FlashingCell/Wizard/FlashingCellRulesWizardSection.js +17 -26
- package/src/View/FlashingCell/Wizard/FlashingCellScopeWizardSection.js +19 -2
- package/src/View/FlashingCell/Wizard/{FlashingCellDurationWizardSection.d.ts → FlashingCellSettingsWizardSection.d.ts} +3 -3
- package/src/View/FlashingCell/Wizard/FlashingCellSettingsWizardSection.js +81 -0
- package/src/View/FlashingCell/Wizard/FlashingCellWizard.js +6 -8
- package/src/View/FlashingCell/Wizard/isValidFlashingCellRules.js +1 -1
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +2 -2
- package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +10 -5
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.js +8 -3
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnWizard.js +13 -5
- package/src/View/GridInfo/GridInfoPopup.js +3 -2
- package/src/View/PlusMinus/Wizard/PlusMinusWizard.js +8 -2
- package/src/View/Query/QueryViewPanel.js +12 -9
- package/src/View/Query/Wizard/NamedQueryWizard.js +13 -8
- package/src/View/QuickSearch/QuickSearchPopup.js +1 -1
- package/src/View/QuickSearch/useQuickSearchDebounced.js +1 -1
- package/src/View/Schedule/Wizard/ScheduleWizard.js +14 -14
- package/src/View/Shortcut/shortcutKeys.js +0 -1
- package/src/View/SpecialColumnSettingsWizardStep.d.ts +9 -0
- package/src/View/SpecialColumnSettingsWizardStep.js +63 -0
- package/src/View/UIHelper.d.ts +0 -4
- package/src/View/UIHelper.js +1 -34
- package/src/View/Wizard/AdaptableWizard.js +1 -1
- package/src/View/Wizard/Interface/IAdaptableWizard.d.ts +2 -0
- package/src/View/Wizard/OnePageAdaptableWizard.js +1 -1
- package/src/agGrid/Adaptable.d.ts +10 -7
- package/src/agGrid/Adaptable.js +80 -57
- package/src/agGrid/agGridHelper.d.ts +1 -2
- package/src/agGrid/agGridHelper.js +8 -5
- package/src/agGrid/agGridMenuHelper.js +12 -8
- package/src/components/ApplicationIcon.d.ts +1 -1
- package/src/components/Dashboard/Dashboard.js +1 -1
- package/src/components/Dashboard/DashboardManager.d.ts +5 -3
- package/src/components/Dashboard/DashboardManager.js +33 -27
- package/src/components/DropdownButton/renderItem.js +1 -1
- package/src/components/FormLayout/index.js +1 -1
- package/src/components/OverlayTrigger/Overlay.js +1 -1
- package/src/components/WindowModal/WindowModal.js +17 -2
- package/src/components/icons/column-add.d.ts +3 -0
- package/src/components/icons/column-add.js +10 -0
- package/src/components/icons/index.js +2 -0
- package/src/components/utils/useDraggable.js +2 -1
- package/src/metamodel/adaptable.metamodel.d.ts +58 -91
- package/src/metamodel/adaptable.metamodel.js +248 -297
- package/src/types.d.ts +4 -7
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/src/AdaptableOptions/ChartPluginOptions.d.ts +0 -20
- package/src/Api/ChartApi.d.ts +0 -20
- package/src/Api/Implementation/SparklineColumnApiImpl.d.ts +0 -9
- package/src/Api/Implementation/SparklineColumnApiImpl.js +0 -24
- package/src/Api/SparklineColumnApi.d.ts +0 -23
- package/src/Api/SparklineColumnApi.js +0 -2
- package/src/PredefinedConfig/ChartState.d.ts +0 -144
- package/src/PredefinedConfig/ChartState.js +0 -2
- package/src/PredefinedConfig/Common/ChartEnums.d.ts +0 -123
- package/src/PredefinedConfig/Common/ChartEnums.js +0 -152
- package/src/PredefinedConfig/SparklineColumnState.d.ts +0 -40
- package/src/PredefinedConfig/SparklineColumnState.js +0 -2
- package/src/Redux/ActionsReducers/SparklineColumnRedux.d.ts +0 -35
- package/src/Redux/ActionsReducers/SparklineColumnRedux.js +0 -70
- package/src/Utilities/Defaults/DefaultCategoryChartProperties.d.ts +0 -2
- package/src/Utilities/Defaults/DefaultCategoryChartProperties.js +0 -56
- package/src/Utilities/Defaults/DefaultPieChartProperties.d.ts +0 -2
- package/src/Utilities/Defaults/DefaultPieChartProperties.js +0 -13
- package/src/Utilities/Defaults/DefaultSparklinesChartProperties.d.ts +0 -2
- package/src/Utilities/Defaults/DefaultSparklinesChartProperties.js +0 -25
- package/src/View/Components/Panels/PanelWithIImageThreeButtons.d.ts +0 -11
- package/src/View/Components/Panels/PanelWithIImageThreeButtons.js +0 -28
- package/src/View/Components/Popups/AdaptableChart.d.ts +0 -18
- package/src/View/Components/Popups/AdaptableChart.js +0 -40
- package/src/View/Components/SharedProps/ChartDisplayPopupPropsBase.d.ts +0 -7
- package/src/View/Components/SharedProps/ChartDisplayPopupPropsBase.js +0 -2
- package/src/View/FlashingCell/Wizard/FlashingCellDurationWizardSection.js +0 -60
- package/src/components/ChartContainer/index.d.ts +0 -15
- package/src/components/ChartContainer/index.js +0 -22
|
@@ -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
|
|
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
|
-
|
|
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
|
};
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import { FlashingCellDefinition } from '../../../types';
|
|
3
3
|
declare type FlashingAlertDurationWizardSectionProps = {
|
|
4
4
|
readOnly?: boolean;
|
|
5
|
-
|
|
5
|
+
flashingCell?: FlashingCellDefinition;
|
|
6
6
|
onChange: (data: FlashingCellDefinition) => void;
|
|
7
7
|
};
|
|
8
|
-
export declare const
|
|
9
|
-
export declare const
|
|
8
|
+
export declare const renderFlashingAlertSettingsSummary: (flashingAlert: FlashingCellDefinition) => JSX.Element;
|
|
9
|
+
export declare const FlashingAlertSettingsWizardSection: (props: FlashingAlertDurationWizardSectionProps) => JSX.Element;
|
|
10
10
|
export {};
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FlashingAlertSettingsWizardSection = exports.renderFlashingAlertSettingsSummary = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const React = tslib_1.__importStar(require("react"));
|
|
6
|
+
const react_1 = require("react");
|
|
7
|
+
const rebass_1 = require("rebass");
|
|
8
|
+
const Input_1 = tslib_1.__importDefault(require("../../../components/Input"));
|
|
9
|
+
const usePrevious_1 = tslib_1.__importDefault(require("../../../components/utils/usePrevious"));
|
|
10
|
+
const Radio_1 = tslib_1.__importDefault(require("../../../components/Radio"));
|
|
11
|
+
const Tabs_1 = require("../../../components/Tabs");
|
|
12
|
+
const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
|
|
13
|
+
const CodeBlock_1 = require("../../../components/CodeBlock");
|
|
14
|
+
const FormLayout_1 = tslib_1.__importStar(require("../../../components/FormLayout"));
|
|
15
|
+
const CheckBox_1 = require("../../../components/CheckBox");
|
|
16
|
+
exports.renderFlashingAlertSettingsSummary = (flashingAlert) => {
|
|
17
|
+
return (React.createElement(React.Fragment, null,
|
|
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,
|
|
19
|
+
"Flashing is removed after ",
|
|
20
|
+
React.createElement(CodeBlock_1.CodeBlock, null, flashingAlert.FlashDuration),
|
|
21
|
+
' ',
|
|
22
|
+
"milliseconds")))));
|
|
23
|
+
};
|
|
24
|
+
exports.FlashingAlertSettingsWizardSection = (props) => {
|
|
25
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
26
|
+
let { data: flashingCell } = OnePageAdaptableWizard_1.useOnePageWizardContext();
|
|
27
|
+
flashingCell = flashingCell !== null && flashingCell !== void 0 ? flashingCell : props.flashingCell;
|
|
28
|
+
const setDuration = (FlashDuration) => {
|
|
29
|
+
props.onChange(Object.assign(Object.assign({}, flashingCell), { FlashDuration: FlashDuration }));
|
|
30
|
+
};
|
|
31
|
+
const duration = (_a = flashingCell.FlashDuration) !== null && _a !== void 0 ? _a : 500;
|
|
32
|
+
const numberDuration = React.useRef(typeof duration === 'number' ? duration : 500);
|
|
33
|
+
const inputRef = react_1.useRef(null);
|
|
34
|
+
const oldDuration = usePrevious_1.default(duration, duration);
|
|
35
|
+
React.useEffect(() => {
|
|
36
|
+
var _a;
|
|
37
|
+
if (oldDuration === 'always' && duration != oldDuration) {
|
|
38
|
+
(_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
39
|
+
}
|
|
40
|
+
}, [duration, oldDuration]);
|
|
41
|
+
const handleTypeChange = (type) => {
|
|
42
|
+
setDuration(type === 'number' ? numberDuration.current : 'always');
|
|
43
|
+
};
|
|
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 }));
|
|
59
|
+
};
|
|
60
|
+
return (React.createElement(rebass_1.Flex, { height: "100%", flexDirection: "column", "data-name": "plus-minus-column-settings" },
|
|
61
|
+
React.createElement(Tabs_1.Tabs, { autoFocus: false, padding: 2 },
|
|
62
|
+
React.createElement(Tabs_1.Tabs.Tab, null, "Flashing Cell Settings"),
|
|
63
|
+
React.createElement(Tabs_1.Tabs.Content, null,
|
|
64
|
+
React.createElement(FormLayout_1.default, null,
|
|
65
|
+
React.createElement(FormLayout_1.FormRow, { label: "Duration Type" },
|
|
66
|
+
React.createElement(Radio_1.default, { mr: 3, checked: duration == 'always', tabIndex: -1, onChange: () => handleTypeChange('always') }, "Always"),
|
|
67
|
+
React.createElement(Radio_1.default, { checked: duration !== 'always', tabIndex: -1, onChange: () => handleTypeChange('number') }, "Limited (ms)")),
|
|
68
|
+
React.createElement(FormLayout_1.FormRow, { label: "" },
|
|
69
|
+
duration !== 'always' && (React.createElement(rebass_1.Flex, { flexDirection: "row", alignItems: "baseline" },
|
|
70
|
+
React.createElement(rebass_1.Text, { fontSize: 2, mr: 2 }, "After"),
|
|
71
|
+
React.createElement(Input_1.default, { readOnly: props.readOnly, type: "text", name: "value", ref: inputRef, mt: 2, mr: 1, value: duration, onChange: (event) => {
|
|
72
|
+
const value = event.target.value;
|
|
73
|
+
setDuration(isNaN(Number(value)) ? 500 : Number(value));
|
|
74
|
+
} }),
|
|
75
|
+
React.createElement(rebass_1.Text, { fontSize: 2 }, "milliseconds"))),
|
|
76
|
+
duration === 'always' && (React.createElement(rebass_1.Text, { height: 43, fontSize: 3 }, "Persists the flashing style indeterminately - can be removed manually"))),
|
|
77
|
+
React.createElement(FormLayout_1.FormRow, { label: "Flash Target" },
|
|
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")))))));
|
|
81
|
+
};
|
|
@@ -6,7 +6,7 @@ const React = tslib_1.__importStar(require("react"));
|
|
|
6
6
|
const react_1 = require("react");
|
|
7
7
|
const rebass_1 = require("rebass");
|
|
8
8
|
const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
|
|
9
|
-
const
|
|
9
|
+
const FlashingCellSettingsWizardSection_1 = require("./FlashingCellSettingsWizardSection");
|
|
10
10
|
const Helper_1 = require("../../../Utilities/Helpers/Helper");
|
|
11
11
|
const FlashingCellRulesWizardSection_1 = require("./FlashingCellRulesWizardSection");
|
|
12
12
|
const FlashingCellStyleWizardSection_1 = require("./FlashingCellStyleWizardSection");
|
|
@@ -21,12 +21,10 @@ const FlashingCellRedux = tslib_1.__importStar(require("../../../Redux/ActionsRe
|
|
|
21
21
|
exports.FlashingCellWizard = (props) => {
|
|
22
22
|
const { api } = AdaptableContext_1.useAdaptable();
|
|
23
23
|
const [flashingCell, setFlashingCell] = react_1.useState(() => {
|
|
24
|
-
var _a;
|
|
25
|
-
const defaults = (_a = api.internalApi.getAdaptableOptions().notificationsOptions.flashingCellDefaultProperties) !== null && _a !== void 0 ? _a : {};
|
|
26
24
|
let flashingCell = props.data
|
|
27
25
|
? Helper_1.cloneObject(props.data)
|
|
28
26
|
: ObjectFactory_1.default.CreateEmptyFlashingCellDefinition();
|
|
29
|
-
flashingCell =
|
|
27
|
+
flashingCell = api.flashingCellApi.mergeFlashingCellDefinitionWithDefaults(flashingCell);
|
|
30
28
|
if (!flashingCell.Rule.BooleanExpression && !flashingCell.Rule.Predicate) {
|
|
31
29
|
flashingCell.Rule.BooleanExpression = '';
|
|
32
30
|
}
|
|
@@ -71,14 +69,14 @@ exports.FlashingCellWizard = (props) => {
|
|
|
71
69
|
isValid: isValidFlashingCellRules_1.isValidFlashingCellRules,
|
|
72
70
|
render: () => React.createElement(FlashingCellRulesWizardSection_1.FlashingAlertRulesWizardSection, { onChange: setFlashingCell }),
|
|
73
71
|
renderSummary: FlashingCellRulesWizardSection_1.renderFlashingAlertRulesSummary,
|
|
74
|
-
title: '
|
|
72
|
+
title: 'Rule',
|
|
75
73
|
},
|
|
76
74
|
{
|
|
77
75
|
details: 'Select the Duration of the Flash',
|
|
78
76
|
render: () => (React.createElement(rebass_1.Box, { padding: 2 },
|
|
79
|
-
React.createElement(
|
|
80
|
-
renderSummary:
|
|
81
|
-
title: '
|
|
77
|
+
React.createElement(FlashingCellSettingsWizardSection_1.FlashingAlertSettingsWizardSection, { onChange: setFlashingCell }))),
|
|
78
|
+
renderSummary: FlashingCellSettingsWizardSection_1.renderFlashingAlertSettingsSummary,
|
|
79
|
+
title: 'Settings',
|
|
82
80
|
},
|
|
83
81
|
{
|
|
84
82
|
details: 'Choose the Flashing Styles',
|
|
@@ -5,7 +5,7 @@ const ModuleConstants_1 = require("../../../Utilities/Constants/ModuleConstants"
|
|
|
5
5
|
exports.isValidFlashingCellRules = (flashingCell, api, context) => {
|
|
6
6
|
let valid = true;
|
|
7
7
|
if (!flashingCell.Rule.Predicate && !flashingCell.Rule.BooleanExpression) {
|
|
8
|
-
return 'No
|
|
8
|
+
return 'No Rule defined for Flashing Cell';
|
|
9
9
|
}
|
|
10
10
|
if (valid && flashingCell.Rule.Predicate) {
|
|
11
11
|
valid = api.predicateApi.isValidPredicate(flashingCell.Rule.Predicate);
|
|
@@ -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
|
|
8
|
-
const clamp_1 = tslib_1.__importDefault(require("lodash
|
|
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 =
|
|
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 (
|
|
95
|
+
if (data) {
|
|
91
96
|
dispatch(FormatColumnRedux.FormatColumnEdit(formatColumn));
|
|
92
97
|
}
|
|
93
98
|
else {
|
|
@@ -17,6 +17,7 @@ const CheckBox_1 = require("../../../components/CheckBox");
|
|
|
17
17
|
const FormatHelper_1 = require("../../../Utilities/Helpers/FormatHelper");
|
|
18
18
|
const DateHelper_1 = require("../../../Utilities/Helpers/DateHelper");
|
|
19
19
|
const Tag_1 = require("../../../components/Tag");
|
|
20
|
+
const SpecialColumnSettingsWizardStep_1 = require("../../SpecialColumnSettingsWizardStep");
|
|
20
21
|
const options = [
|
|
21
22
|
{ value: Enums_1.DataType.Number, label: Enums_1.DataType.Number },
|
|
22
23
|
{ value: Enums_1.DataType.String, label: Enums_1.DataType.String },
|
|
@@ -59,8 +60,7 @@ exports.isValidFreeTextColumn = (data, api) => {
|
|
|
59
60
|
};
|
|
60
61
|
exports.FreeTextColumnSettingsWizardSection = (props) => {
|
|
61
62
|
const { data, api } = OnePageAdaptableWizard_1.useOnePageWizardContext();
|
|
62
|
-
const Pattern = api.internalApi.getAdaptableOptions().userInterfaceOptions.dateInputOptions
|
|
63
|
-
.dateFormat;
|
|
63
|
+
const Pattern = api.internalApi.getAdaptableOptions().userInterfaceOptions.dateInputOptions.dateFormat;
|
|
64
64
|
const [ColumnNameFocused, setColumnNameFocused] = react_1.useState(false);
|
|
65
65
|
const inEdit = props.isEdit;
|
|
66
66
|
const validCheck = exports.isValidFreeTextColumn(data, api);
|
|
@@ -98,6 +98,9 @@ exports.FreeTextColumnSettingsWizardSection = (props) => {
|
|
|
98
98
|
}
|
|
99
99
|
props.onChange(Object.assign(Object.assign({}, data), { DefaultValue }));
|
|
100
100
|
};
|
|
101
|
+
const handleSpecialColumnSettingsChange = (settings) => {
|
|
102
|
+
props.onChange(Object.assign(Object.assign({}, data), { FreeTextColumnSettings: Object.assign(Object.assign({}, data === null || data === void 0 ? void 0 : data.FreeTextColumnSettings), settings) }));
|
|
103
|
+
};
|
|
101
104
|
return (React.createElement(React.Fragment, null,
|
|
102
105
|
React.createElement(FormLayout_1.default, null,
|
|
103
106
|
React.createElement(FormLayout_1.FormRow, { label: "ColumnId" },
|
|
@@ -127,5 +130,7 @@ exports.FreeTextColumnSettingsWizardSection = (props) => {
|
|
|
127
130
|
data.DataType == 'String' && (React.createElement(FormLayout_1.FormRow, { label: "Editor Type" },
|
|
128
131
|
React.createElement(Radio_1.default, { value: "Inline", checked: data.TextEditor == 'Inline', onChange: (_, e) => onDynamicSelectChanged(e), marginRight: 2 }, "Inline Editor"),
|
|
129
132
|
React.createElement(Radio_1.default, { value: "Large", checked: data.TextEditor == 'Large', onChange: (_, e) => onDynamicSelectChanged(e) }, "Large Editor")))),
|
|
130
|
-
ErrorMessage ? React.createElement(ErrorBox_1.default, {
|
|
133
|
+
ErrorMessage ? (React.createElement(ErrorBox_1.default, { mt: 2, mb: 2 }, ErrorMessage)) : null,
|
|
134
|
+
React.createElement(rebass_1.Box, { mt: 2 },
|
|
135
|
+
React.createElement(SpecialColumnSettingsWizardStep_1.SpecialColumnSettingsWizardStep, { isEditable: true, settings: data.FreeTextColumnSettings, onChange: handleSpecialColumnSettingsChange }))));
|
|
131
136
|
};
|
|
@@ -12,15 +12,22 @@ const ObjectFactory_1 = tslib_1.__importDefault(require("../../../Utilities/Obje
|
|
|
12
12
|
const FreeTextColumnRedux = tslib_1.__importStar(require("../../../Redux/ActionsReducers/FreeTextColumnRedux"));
|
|
13
13
|
const react_redux_1 = require("react-redux");
|
|
14
14
|
exports.FreeTextColumnWizard = (props) => {
|
|
15
|
+
var _a;
|
|
16
|
+
const allFreeTextColumns = react_redux_1.useSelector((state) => state.FreeTextColumn.FreeTextColumns);
|
|
15
17
|
const [freeTextColumn, setFreeTextColumn] = react_1.useState(() => {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
var _a, _b;
|
|
19
|
+
if (props.data) {
|
|
20
|
+
return Helper_1.cloneObject(props.data);
|
|
21
|
+
}
|
|
22
|
+
if (((_a = props.popupParams) === null || _a === void 0 ? void 0 : _a.action) === 'Edit' && ((_b = props.popupParams) === null || _b === void 0 ? void 0 : _b.column)) {
|
|
23
|
+
return allFreeTextColumns.find((column) => column.ColumnId === props.popupParams.column.columnId);
|
|
24
|
+
}
|
|
25
|
+
return ObjectFactory_1.default.CreateEmptyFreeTextColumn(false);
|
|
20
26
|
});
|
|
21
27
|
const dispatch = react_redux_1.useDispatch();
|
|
28
|
+
const isEdit = props.data || ((_a = props.popupParams) === null || _a === void 0 ? void 0 : _a.action) === 'Edit';
|
|
22
29
|
const handleFinish = () => {
|
|
23
|
-
if (
|
|
30
|
+
if (isEdit) {
|
|
24
31
|
dispatch(FreeTextColumnRedux.FreeTextColumnEdit(freeTextColumn));
|
|
25
32
|
}
|
|
26
33
|
else {
|
|
@@ -32,6 +39,7 @@ exports.FreeTextColumnWizard = (props) => {
|
|
|
32
39
|
{
|
|
33
40
|
title: 'Settings',
|
|
34
41
|
details: 'Configure the Free Text Column',
|
|
42
|
+
isValid: FreeTextColumnSettingsWizardSection_1.isValidFreeTextColumn,
|
|
35
43
|
render: () => {
|
|
36
44
|
return (React.createElement(rebass_1.Box, { padding: 2 },
|
|
37
45
|
React.createElement(FreeTextColumnSettingsWizardSection_1.FreeTextColumnSettingsWizardSection, { isEdit: Boolean(props.data), onChange: setFreeTextColumn })));
|
|
@@ -91,11 +91,12 @@ exports.GridInfoPopup = (props) => {
|
|
|
91
91
|
let gridSummaries = CreateGridSummaries(propValueColItems).map((x, index) => {
|
|
92
92
|
return React.createElement(AdaptableObjectRow_1.AdaptableObjectRow, { key: index, colItems: x });
|
|
93
93
|
});
|
|
94
|
+
const showRadioButtons = [showGridSummary, showAdaptableOptions, showColumnInfo].filter((item) => item).length > 1;
|
|
94
95
|
return (React.createElement(PopupPanel_1.PopupPanel, { headerText: 'Grid Info', glyphicon: 'info-sign' },
|
|
95
|
-
React.createElement(rebass_1.Flex, { marginBottom: 2, padding: 3 },
|
|
96
|
+
React.createElement(rebass_1.Flex, { marginBottom: 2, padding: 3 }, showRadioButtons && (React.createElement(React.Fragment, null,
|
|
96
97
|
showGridSummary && (React.createElement(Radio_1.default, { "data-name": "radioButton-GridSummary", marginRight: 3, value: "GridSummary", checked: state.ActiveTab == 'GridSummary', onChange: (_, e) => onShowGridSummaryChanged('GridSummary') }, "Grid Summary")),
|
|
97
98
|
showAdaptableOptions && (React.createElement(Radio_1.default, { "data-name": "radioButton-AdaptableOptions", marginRight: 3, value: "AdaptableOptions", checked: state.ActiveTab == 'AdaptableOptions', onChange: (_, e) => onShowGridSummaryChanged('AdaptableOptions') }, "Adaptable Options")),
|
|
98
|
-
showColumnInfo && (React.createElement(Radio_1.default, { "data-name": "radioButton-Column", value: "Column", checked: state.ActiveTab == 'ColumnInfo', onChange: (_, e) => onShowGridSummaryChanged('ColumnInfo') }, "Column Info"))),
|
|
99
|
+
showColumnInfo && (React.createElement(Radio_1.default, { "data-name": "radioButton-Column", value: "Column", checked: state.ActiveTab == 'ColumnInfo', onChange: (_, e) => onShowGridSummaryChanged('ColumnInfo') }, "Column Info"))))),
|
|
99
100
|
state.ActiveTab == 'GridSummary' && (React.createElement(rebass_1.Box, { margin: 2 },
|
|
100
101
|
React.createElement(AdaptableObjectCollection_1.AdaptableObjectCollection, { colItems: propValueColItems, items: gridSummaries }))),
|
|
101
102
|
state.ActiveTab == 'AdaptableOptions' && React.createElement(AdaptableOptionsComponent_1.AdaptableOptionsComponent, { api: props.api }),
|
|
@@ -13,8 +13,14 @@ const react_redux_1 = require("react-redux");
|
|
|
13
13
|
const PlusMinusRedux = tslib_1.__importStar(require("../../../Redux/ActionsReducers/PlusMinusRedux"));
|
|
14
14
|
exports.PlusMinusWizard = (props) => {
|
|
15
15
|
const [plusMinus, setPlusMinus] = React.useState(() => {
|
|
16
|
-
var _a, _b, _c, _d;
|
|
17
|
-
|
|
16
|
+
var _a, _b, _c, _d, _e;
|
|
17
|
+
const newPlusMinus = Object.assign(Object.assign({}, (props.data ? props.data : ObjectFactory_1.default.CreateEmptyPlusMinusNudge())), { Scope: (_b = (_a = props === null || props === void 0 ? void 0 : props.data) === null || _a === void 0 ? void 0 : _a.Scope) !== null && _b !== void 0 ? _b : { All: true }, NudgeValue: (_d = (_c = props === null || props === void 0 ? void 0 : props.data) === null || _c === void 0 ? void 0 : _c.NudgeValue) !== null && _d !== void 0 ? _d : 20 });
|
|
18
|
+
if ((_e = props === null || props === void 0 ? void 0 : props.popupParams) === null || _e === void 0 ? void 0 : _e.column) {
|
|
19
|
+
newPlusMinus.Scope = {
|
|
20
|
+
ColumnIds: [props.popupParams.column.columnId],
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
return newPlusMinus;
|
|
18
24
|
});
|
|
19
25
|
const [hasCondition, setHasCondition] = React.useState(() => {
|
|
20
26
|
var _a;
|
|
@@ -78,28 +78,31 @@ class QueryViewPanelComponent extends React.Component {
|
|
|
78
78
|
};
|
|
79
79
|
});
|
|
80
80
|
const elementType = this.props.viewType === 'Toolbar' ? 'DashboardToolbar' : 'ToolPanel';
|
|
81
|
+
const handleEnter = (e) => {
|
|
82
|
+
if (e.key === 'Enter') {
|
|
83
|
+
this.runQuery();
|
|
84
|
+
}
|
|
85
|
+
};
|
|
81
86
|
const renderTextInput = () => {
|
|
82
87
|
return this.props.viewType === 'Toolbar' ? (React.createElement(FieldWrap_1.default, { marginRight: 1, width: 600 },
|
|
83
88
|
React.createElement(ButtonExpand_1.ButtonExpand, { variant: "text", tone: "neutral", onClick: () => this.props.onExpand(this.state.expression), tooltip: "Expand", marginLeft: 1 }),
|
|
84
|
-
React.createElement(Input_1.default, { type: "text", placeholder: "Query", spellCheck: false, value: this.state.expression, onChange: (x) => this.setState({ expression: x.target.value }), style: { fontFamily: 'monospace', fontSize: 12 }
|
|
85
|
-
if (e.key === 'Enter') {
|
|
86
|
-
this.runQuery();
|
|
87
|
-
}
|
|
88
|
-
} }),
|
|
89
|
+
React.createElement(Input_1.default, { type: "text", placeholder: "Query", spellCheck: false, value: this.state.expression, onChange: (x) => this.setState({ expression: x.target.value }), style: { fontFamily: 'monospace', fontSize: 12 } }),
|
|
89
90
|
isExpressionValid ? (React.createElement(ButtonPlay_1.ButtonPlay, { onClick: () => this.runQuery(), tooltip: '', accessLevel: 'Full', variant: "text", tone: "neutral", disabled: this.state.expression == '' || this.state.expression == this.props.CurrentQuery, marginRight: 1 })) : (React.createElement(ButtonInvalid_1.ButtonInvalid, { variant: "text", tone: "neutral", tooltip: "Invalid Query", marginRight: 1 })),
|
|
90
91
|
' ',
|
|
91
|
-
this.props.CurrentQuery !== '' && (React.createElement(ButtonClear_1.ButtonClear, { onClick: () => this.
|
|
92
|
+
this.props.CurrentQuery !== '' && (React.createElement(ButtonClear_1.ButtonClear, { onClick: () => this.clearQuery(), tooltip: "Clear Query", accessLevel: 'Full' })))) : (React.createElement(Input_1.default, { type: "text", placeholder: "Query", spellCheck: false, value: this.state.expression, onChange: (x) => this.setState({ expression: x.target.value }), style: { width: '100%' } }));
|
|
92
93
|
};
|
|
93
94
|
const queryModuleAccessLevel = this.props.api.internalApi
|
|
94
95
|
.getEntitlementService()
|
|
95
96
|
.getEntitlementAccessLevelForModule(ModuleConstants_1.QueryModuleId);
|
|
97
|
+
const saveButton = (React.createElement(ButtonSave_1.ButtonSave, { onClick: () => this.saveQuery(), tooltip: "Save as New Query", accessLevel: queryModuleAccessLevel, disabled: !isExpressionValid || isExpressionNamedQuery || this.state.expression == '', variant: "text", tone: "neutral", marginRight: 1 }));
|
|
96
98
|
const renderButtons = () => {
|
|
97
99
|
return this.props.viewType === 'Toolbar' ? (React.createElement(React.Fragment, null,
|
|
98
|
-
|
|
100
|
+
saveButton,
|
|
99
101
|
React.createElement(DropdownButton_1.default, { variant: "text", items: availableColumns, marginRight: 1, tooltip: "Pick Columns" },
|
|
100
102
|
React.createElement(icons_1.Icon, { name: 'list' })),
|
|
101
103
|
React.createElement(DropdownButton_1.default, { disabled: ArrayExtensions_1.ArrayExtensions.IsNullOrEmpty(availableSearches), variant: "text", items: availableSearches, marginRight: 1, tooltip: "Load Query", icon: "folder-open" }),
|
|
102
104
|
' ')) : (React.createElement(React.Fragment, null,
|
|
105
|
+
saveButton,
|
|
103
106
|
React.createElement(ButtonExpand_1.ButtonExpand, { variant: "text", tone: "neutral", onClick: () => this.props.onExpand(this.state.expression), tooltip: "Expand", marginLeft: 1 }),
|
|
104
107
|
React.createElement(ButtonClear_1.ButtonClear, { onClick: () => this.clearQuery(), tooltip: "Clear Query", accessLevel: 'Full', disabled: this.state.expression == '' }),
|
|
105
108
|
React.createElement(ButtonPlay_1.ButtonPlay, { onClick: () => this.runQuery(), tooltip: "Run Query", accessLevel: 'Full', variant: "text", tone: "neutral", disabled: !isExpressionValid ||
|
|
@@ -107,12 +110,12 @@ class QueryViewPanelComponent extends React.Component {
|
|
|
107
110
|
this.state.expression == this.props.CurrentQuery, marginRight: 1 }),
|
|
108
111
|
React.createElement(DropdownButton_1.default, { variant: "text", disabled: ArrayExtensions_1.ArrayExtensions.IsNullOrEmpty(availableSearches), items: availableSearches, marginRight: 1, tooltip: "Load Query", icon: "folder-open" })));
|
|
109
112
|
};
|
|
110
|
-
return (React.createElement(rebass_1.Flex, { flexDirection: "row", className: `ab-${elementType}__Query__wrap`, flexWrap: this.props.viewType === 'ToolPanel' ? 'wrap' : 'nowrap' },
|
|
113
|
+
return (React.createElement(rebass_1.Flex, { onKeyDown: handleEnter, flexDirection: "row", className: `ab-${elementType}__Query__wrap`, flexWrap: this.props.viewType === 'ToolPanel' ? 'wrap' : 'nowrap' },
|
|
111
114
|
React.createElement(rebass_1.Flex, null, renderTextInput()),
|
|
112
115
|
React.createElement(rebass_1.Flex, null, renderButtons())));
|
|
113
116
|
}
|
|
114
117
|
clearQuery() {
|
|
115
|
-
this.
|
|
118
|
+
this.props.onRunQuery('');
|
|
116
119
|
}
|
|
117
120
|
saveQuery() {
|
|
118
121
|
this.props.onShowNamedQueries(this.state.expression, this.props.moduleInfo.Popup);
|
|
@@ -14,18 +14,23 @@ const react_redux_1 = require("react-redux");
|
|
|
14
14
|
const QueryRedux = tslib_1.__importStar(require("../../../Redux/ActionsReducers/QueryRedux"));
|
|
15
15
|
function NamedQueryWizard(props) {
|
|
16
16
|
const [namedQuery, setNamedQuery] = react_1.useState(() => {
|
|
17
|
+
var _a, _b;
|
|
18
|
+
const value = (_b = (_a = props.popupParams) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : '';
|
|
17
19
|
return props.data
|
|
18
20
|
? Helper_1.cloneObject(props.data)
|
|
19
|
-
: ObjectFactory_1.default.CreateEmptyNamedQuery();
|
|
21
|
+
: ObjectFactory_1.default.CreateEmptyNamedQuery(value);
|
|
20
22
|
});
|
|
21
23
|
const dispatch = react_redux_1.useDispatch();
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
const handleFinish = () => {
|
|
25
|
+
if (props.data) {
|
|
26
|
+
dispatch(QueryRedux.NamedQueryEdit(namedQuery));
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
dispatch(QueryRedux.NamedQueryAdd(namedQuery));
|
|
30
|
+
}
|
|
31
|
+
props.onFinishWizard(namedQuery);
|
|
32
|
+
};
|
|
33
|
+
return (React.createElement(OnePageAdaptableWizard_1.OnePageAdaptableWizard, { defaultCurrentSectionName: props.defaultCurrentSectionName, onFinish: handleFinish, sections: [
|
|
29
34
|
{
|
|
30
35
|
title: 'Expression',
|
|
31
36
|
details: 'Specify the query expression',
|
|
@@ -40,7 +40,7 @@ const QuickSearchPopupComponent = (props) => {
|
|
|
40
40
|
React.createElement(rebass_1.Flex, { flexDirection: "column" },
|
|
41
41
|
React.createElement(FormLayout_1.default, { columns: [1, 2] },
|
|
42
42
|
React.createElement(FormLayout_1.FormRow, null,
|
|
43
|
-
React.createElement(CheckBox_1.CheckBox, { value: "existing", marginLeft: 1, marginRight: 3, checked: state.RunQueryAfterQuickSearch, disabled: StringExtensions_1.default.IsNotNullOrEmpty(searchText), onChange: onQuickSearchBehaviourChange }, "Run
|
|
43
|
+
React.createElement(CheckBox_1.CheckBox, { value: "existing", marginLeft: 1, marginRight: 3, checked: state.RunQueryAfterQuickSearch, disabled: StringExtensions_1.default.IsNotNullOrEmpty(searchText), onChange: onQuickSearchBehaviourChange }, "Run Simultaneous Query"))))),
|
|
44
44
|
React.createElement(StyleComponent_1.StyleComponent, { style: { height: '100%' }, api: props.api, Style: props.QuickSearchStyle, UpdateStyle: onUpdateStyle })));
|
|
45
45
|
};
|
|
46
46
|
function mapStateToProps(state, ownProps) {
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.useQuickSearchDebounced = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = require("react");
|
|
6
|
-
const debounce_1 = tslib_1.__importDefault(require("lodash
|
|
6
|
+
const debounce_1 = tslib_1.__importDefault(require("lodash/debounce"));
|
|
7
7
|
const GeneralConstants_1 = require("../../Utilities/Constants/GeneralConstants");
|
|
8
8
|
exports.useQuickSearchDebounced = (props) => {
|
|
9
9
|
var _a;
|
|
@@ -13,39 +13,39 @@ const ObjectFactory_1 = tslib_1.__importDefault(require("../../../Utilities/Obje
|
|
|
13
13
|
const react_redux_1 = require("react-redux");
|
|
14
14
|
const ScheduleRedux = tslib_1.__importStar(require("../../../Redux/ActionsReducers/ScheduleRedux"));
|
|
15
15
|
exports.ScheduleWizard = (props) => {
|
|
16
|
-
var _a;
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
var _a, _b;
|
|
17
|
+
const data = (_a = props.data) !== null && _a !== void 0 ? _a : props.popupParams.value;
|
|
18
|
+
const isNew = props.popupParams.action ? props.popupParams.action === 'New' : !props.data;
|
|
19
|
+
const scheduleType = data ? data.ScheduleType : (_b = props === null || props === void 0 ? void 0 : props.abObjectType) === null || _b === void 0 ? void 0 : _b.name;
|
|
20
20
|
const [schedule, setSchedule] = React.useState(() => {
|
|
21
|
-
if (
|
|
22
|
-
return
|
|
21
|
+
if (data) {
|
|
22
|
+
return data;
|
|
23
23
|
}
|
|
24
|
-
let
|
|
24
|
+
let scheduleState = null;
|
|
25
25
|
switch (scheduleType) {
|
|
26
26
|
case Enums_1.ScheduleType.Reminder:
|
|
27
|
-
|
|
27
|
+
scheduleState = ObjectFactory_1.default.CreateEmptyReminderSchedule();
|
|
28
28
|
break;
|
|
29
29
|
case Enums_1.ScheduleType.Report:
|
|
30
|
-
|
|
30
|
+
scheduleState = ObjectFactory_1.default.CreateEmptyReportSchedule();
|
|
31
31
|
break;
|
|
32
32
|
case Enums_1.ScheduleType.ipushpull:
|
|
33
|
-
|
|
33
|
+
scheduleState = ObjectFactory_1.default.CreateEmptyIPushPullSchedule();
|
|
34
34
|
break;
|
|
35
35
|
case Enums_1.ScheduleType.Glue42:
|
|
36
|
-
|
|
36
|
+
scheduleState = ObjectFactory_1.default.CreateEmptyGlue42Schedule();
|
|
37
37
|
break;
|
|
38
38
|
case Enums_1.ScheduleType.OpenFin:
|
|
39
|
-
|
|
39
|
+
scheduleState = ObjectFactory_1.default.CreateEmptyOpenFinSchedule();
|
|
40
40
|
break;
|
|
41
41
|
}
|
|
42
|
-
return
|
|
42
|
+
return scheduleState;
|
|
43
43
|
});
|
|
44
44
|
const [isOneOff, setIsOneOff] = React.useState(false);
|
|
45
45
|
const dispatch = react_redux_1.useDispatch();
|
|
46
46
|
const handleFinish = () => {
|
|
47
47
|
let action = null;
|
|
48
|
-
if (
|
|
48
|
+
if (!isNew) {
|
|
49
49
|
switch (scheduleType) {
|
|
50
50
|
case Enums_1.ScheduleType.Reminder:
|
|
51
51
|
action = ScheduleRedux.ReminderScheduleEdit(schedule);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { SpecialColumnSettings } from '../../types';
|
|
3
|
+
interface SpecialColumnTypeSettingsProps {
|
|
4
|
+
settings: SpecialColumnSettings;
|
|
5
|
+
onChange: (settings: SpecialColumnSettings) => void;
|
|
6
|
+
isEditable?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare const SpecialColumnSettingsWizardStep: React.FunctionComponent<SpecialColumnTypeSettingsProps>;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SpecialColumnSettingsWizardStep = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const chunk_1 = tslib_1.__importDefault(require("lodash/chunk"));
|
|
6
|
+
const React = tslib_1.__importStar(require("react"));
|
|
7
|
+
const rebass_1 = require("rebass");
|
|
8
|
+
const CheckBox_1 = require("../components/CheckBox");
|
|
9
|
+
const FormLayout_1 = tslib_1.__importStar(require("../components/FormLayout"));
|
|
10
|
+
const Tabs_1 = require("../components/Tabs");
|
|
11
|
+
const AdaptableContext_1 = require("./AdaptableContext");
|
|
12
|
+
exports.SpecialColumnSettingsWizardStep = (props) => {
|
|
13
|
+
var _a, _b;
|
|
14
|
+
const adaptable = AdaptableContext_1.useAdaptable();
|
|
15
|
+
const possibleColumnTypes = adaptable.api.internalApi.getAdaptableOptions().userInterfaceOptions
|
|
16
|
+
.columnTypes;
|
|
17
|
+
const { Filterable, Resizable, Groupable, Sortable, Pivotable, Aggregatable, SuppressMenu, SuppressMovable, } = (_a = props.settings) !== null && _a !== void 0 ? _a : {};
|
|
18
|
+
const handleColumnTypeChange = (columnType, checked) => {
|
|
19
|
+
var _a, _b, _c;
|
|
20
|
+
const columnTypes = (_b = (_a = props.settings) === null || _a === void 0 ? void 0 : _a.ColumnTypes) !== null && _b !== void 0 ? _b : [];
|
|
21
|
+
if (checked) {
|
|
22
|
+
props.onChange(Object.assign(Object.assign({}, props.settings), { ColumnTypes: [...columnTypes, columnType] }));
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
props.onChange(Object.assign(Object.assign({}, props.settings), { ColumnTypes: (_c = columnTypes === null || columnTypes === void 0 ? void 0 : columnTypes.filter) === null || _c === void 0 ? void 0 : _c.call(columnTypes, (item) => item !== columnType) }));
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
const onSettingsChange = (values) => {
|
|
29
|
+
props.onChange(Object.assign(Object.assign({}, props.settings), values));
|
|
30
|
+
};
|
|
31
|
+
return (React.createElement(React.Fragment, null,
|
|
32
|
+
React.createElement(Tabs_1.Tabs, { marginTop: 2, autoFocus: false },
|
|
33
|
+
React.createElement(Tabs_1.Tabs.Tab, null, "Column Properties"),
|
|
34
|
+
React.createElement(Tabs_1.Tabs.Content, null,
|
|
35
|
+
React.createElement(rebass_1.Flex, { flexDirection: "row" },
|
|
36
|
+
React.createElement(FormLayout_1.default, { style: { width: '100%' }, columns: [
|
|
37
|
+
{ name: 'first', size: '30%' },
|
|
38
|
+
{ size: '30%', name: 'second' },
|
|
39
|
+
{ size: '30%', name: 'third' },
|
|
40
|
+
] },
|
|
41
|
+
React.createElement(FormLayout_1.FormRow, null,
|
|
42
|
+
React.createElement(CheckBox_1.CheckBox, { checked: Filterable, onChange: (Filterable) => onSettingsChange({ Filterable }), disabled: !adaptable.api.internalApi.getAdaptableOptions().filterOptions
|
|
43
|
+
.enableFilterOnSpecialColumns }, "Filterable"),
|
|
44
|
+
React.createElement(CheckBox_1.CheckBox, { checked: Resizable, onChange: (Resizable) => onSettingsChange({ Resizable }) }, "Resizable"),
|
|
45
|
+
React.createElement(CheckBox_1.CheckBox, { checked: Groupable, onChange: (Groupable) => onSettingsChange({ Groupable }) }, "Groupable")),
|
|
46
|
+
React.createElement(FormLayout_1.FormRow, null,
|
|
47
|
+
React.createElement(CheckBox_1.CheckBox, { checked: Sortable, onChange: (Sortable) => onSettingsChange({ Sortable }) }, "Sortable"),
|
|
48
|
+
React.createElement(CheckBox_1.CheckBox, { checked: Pivotable, onChange: (Pivotable) => onSettingsChange({ Pivotable }) }, "Pivotable"),
|
|
49
|
+
React.createElement(CheckBox_1.CheckBox, { checked: Aggregatable, onChange: (Aggregatable) => onSettingsChange({ Aggregatable }) }, "Aggregatable")),
|
|
50
|
+
React.createElement(FormLayout_1.FormRow, null,
|
|
51
|
+
React.createElement(CheckBox_1.CheckBox, { checked: SuppressMenu, onChange: (SuppressMenu) => onSettingsChange({ SuppressMenu }) }, "Suppress Menu"),
|
|
52
|
+
React.createElement(CheckBox_1.CheckBox, { checked: SuppressMovable, onChange: (SuppressMovable) => onSettingsChange({ SuppressMovable }) }, "Suppress Movable"),
|
|
53
|
+
React.createElement(CheckBox_1.CheckBox, { disabled: true, checked: props.isEditable }, "Editable")))))),
|
|
54
|
+
Boolean(possibleColumnTypes === null || possibleColumnTypes === void 0 ? void 0 : possibleColumnTypes.length) && (React.createElement(Tabs_1.Tabs, { marginTop: 2, autoFocus: false },
|
|
55
|
+
React.createElement(Tabs_1.Tabs.Tab, null, "Column Types"),
|
|
56
|
+
React.createElement(Tabs_1.Tabs.Content, null,
|
|
57
|
+
React.createElement(FormLayout_1.default, { columns: [{ name: 'first', size: '30%' }, { name: 'second' }] }, (_b = chunk_1.default(possibleColumnTypes !== null && possibleColumnTypes !== void 0 ? possibleColumnTypes : [], 2)) === null || _b === void 0 ? void 0 : _b.map(([first, second]) => {
|
|
58
|
+
var _a, _b, _c, _d, _e, _f;
|
|
59
|
+
return (React.createElement(FormLayout_1.FormRow, { key: first },
|
|
60
|
+
first && (React.createElement(CheckBox_1.CheckBox, { onChange: (checked) => handleColumnTypeChange(first, checked), checked: (_c = (_b = (_a = props.settings) === null || _a === void 0 ? void 0 : _a.ColumnTypes) === null || _b === void 0 ? void 0 : _b.includes) === null || _c === void 0 ? void 0 : _c.call(_b, first) }, first)),
|
|
61
|
+
second && (React.createElement(CheckBox_1.CheckBox, { onChange: (checked) => handleColumnTypeChange(second, checked), checked: (_f = (_e = (_d = props.settings) === null || _d === void 0 ? void 0 : _d.ColumnTypes) === null || _e === void 0 ? void 0 : _e.includes) === null || _f === void 0 ? void 0 : _f.call(_e, second) }, second))));
|
|
62
|
+
})))))));
|
|
63
|
+
};
|
package/src/View/UIHelper.d.ts
CHANGED
|
@@ -32,8 +32,6 @@ export declare function getEmptyConfigState(): EditableConfigEntityState;
|
|
|
32
32
|
export declare function getDescriptionForDataType(dataType: 'String' | 'Number' | 'NumberArray' | 'Boolean' | 'Date' | 'Object' | 'Unknown'): "string" | "number" | "date";
|
|
33
33
|
export declare function getPlaceHolderforDataType(dataType: 'String' | 'Number' | 'NumberArray' | 'Boolean' | 'Date' | 'Object' | 'Unknown'): "Enter Value" | "Enter Number" | "Enter Date";
|
|
34
34
|
export declare function getModalContainer(adaptableOptions: AdaptableOptions, document: Document): HTMLElement;
|
|
35
|
-
export declare function getChartContainer(adaptableOptions: AdaptableOptions, document: Document, showModal: boolean): HTMLElement;
|
|
36
|
-
export declare function isValidUserChartContainer(adaptableOptions: AdaptableOptions, document: Document): boolean;
|
|
37
35
|
export declare function IsEmptyStyle(style: AdaptableStyle): boolean;
|
|
38
36
|
export declare function IsNotEmptyStyle(style: AdaptableStyle): boolean;
|
|
39
37
|
export declare function getMessageTypeByStatusColour(statusColour: StatusColour): AdaptableMessageType;
|
|
@@ -62,8 +60,6 @@ export declare const UIHelper: {
|
|
|
62
60
|
getDescriptionForDataType: typeof getDescriptionForDataType;
|
|
63
61
|
getPlaceHolderforDataType: typeof getPlaceHolderforDataType;
|
|
64
62
|
getModalContainer: typeof getModalContainer;
|
|
65
|
-
getChartContainer: typeof getChartContainer;
|
|
66
|
-
isValidUserChartContainer: typeof isValidUserChartContainer;
|
|
67
63
|
IsEmptyStyle: typeof IsEmptyStyle;
|
|
68
64
|
IsNotEmptyStyle: typeof IsNotEmptyStyle;
|
|
69
65
|
getMessageTypeByStatusColour: typeof getMessageTypeByStatusColour;
|