@adaptabletools/adaptable-cjs 22.0.0-canary.2 → 22.0.0-canary.4
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/index.css +64 -26
- package/index.css.map +1 -1
- package/package.json +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +2 -2
- package/src/AdaptableOptions/ActionColumnOptions.d.ts +2 -2
- package/src/AdaptableOptions/CustomSortOptions.d.ts +5 -0
- package/src/AdaptableOptions/DashboardOptions.d.ts +1 -2
- package/src/AdaptableOptions/ToolPanelOptions.d.ts +1 -2
- package/src/AdaptableState/AlertState.d.ts +2 -2
- package/src/AdaptableState/ChartingState.d.ts +3 -3
- package/src/AdaptableState/Common/AdaptableAlert.d.ts +2 -2
- package/src/AdaptableState/Common/AdaptableButton.d.ts +2 -2
- package/src/AdaptableState/Common/AdaptableFlashingCell.d.ts +2 -2
- package/src/AdaptableState/Common/AdaptableObject.d.ts +25 -2
- package/src/AdaptableState/Common/AdaptableStyle.d.ts +8 -0
- package/src/AdaptableState/Common/RowSummary.d.ts +1 -1
- package/src/AdaptableState/Common/Schedule.d.ts +3 -4
- package/src/AdaptableState/Common/SystemStatusMessageInfo.d.ts +2 -2
- package/src/AdaptableState/CustomSortState.d.ts +2 -2
- package/src/AdaptableState/DashboardState.d.ts +2 -2
- package/src/AdaptableState/ExportState.d.ts +2 -2
- package/src/AdaptableState/FlashingCellState.d.ts +2 -2
- package/src/AdaptableState/FormatColumnState.d.ts +2 -10
- package/src/AdaptableState/LayoutState.d.ts +8 -3
- package/src/AdaptableState/NamedQueryState.d.ts +2 -2
- package/src/AdaptableState/PlusMinusState.d.ts +2 -2
- package/src/AdaptableState/ShortcutState.d.ts +2 -2
- package/src/AdaptableState/StyledColumnState.d.ts +1 -1
- package/src/AdaptableState/ThemeState.d.ts +2 -2
- package/src/Api/CustomSortApi.d.ts +6 -3
- package/src/Api/DataSetApi.d.ts +1 -1
- package/src/Api/GridApi.d.ts +3 -3
- package/src/Api/Implementation/CustomSortApiImpl.d.ts +5 -1
- package/src/Api/Implementation/CustomSortApiImpl.js +2 -2
- package/src/Api/Implementation/GridApiImpl.d.ts +9 -9
- package/src/Api/Implementation/GridApiImpl.js +16 -16
- package/src/Api/Implementation/LayoutHelpers.js +7 -0
- package/src/Api/Implementation/ScheduleApiImpl.js +1 -0
- package/src/Api/Internal/ColumnInternalApi.js +1 -1
- package/src/Api/Internal/FormatColumnInternalApi.d.ts +0 -10
- package/src/Api/Internal/FormatColumnInternalApi.js +1 -19
- package/src/Redux/ActionsReducers/LayoutRedux.d.ts +1 -1
- package/src/Redux/ActionsReducers/NoteRedux.js +1 -1
- package/src/Strategy/AlertModule.js +4 -0
- package/src/Strategy/CustomSortModule.js +4 -0
- package/src/Strategy/FlashingCellModule.js +5 -0
- package/src/Strategy/FormatColumnModule.js +4 -0
- package/src/Strategy/LayoutModule.js +4 -4
- package/src/Strategy/PlusMinusModule.js +4 -0
- package/src/Strategy/ScheduleModule.js +4 -0
- package/src/Strategy/ShortcutModule.js +4 -0
- package/src/Strategy/Utilities/FormatColumn/getFormatColumnSettingsViewItems.js +0 -3
- package/src/Utilities/Constants/DocumentationLinkConstants.d.ts +2 -2
- package/src/Utilities/Constants/DocumentationLinkConstants.js +2 -2
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +3 -3
- package/src/Utilities/Extensions/StringExtensions.d.ts +2 -0
- package/src/Utilities/Extensions/StringExtensions.js +17 -0
- package/src/Utilities/Helpers/FormatHelper.js +9 -2
- package/src/Utilities/Helpers/StyleHelper.js +14 -0
- package/src/Utilities/ObjectFactory.js +16 -3
- package/src/Utilities/Services/AnnotationsService.js +1 -1
- package/src/Utilities/Services/ModuleService.js +3 -3
- package/src/View/AdaptablePopover/index.d.ts +1 -0
- package/src/View/AdaptablePopover/index.js +1 -1
- package/src/View/Alert/ActiveAlertsPanel.js +8 -0
- package/src/View/Alert/AlertViewPanel.js +13 -9
- package/src/View/Alert/Utilities/getAlertButtonStyle.d.ts +1 -0
- package/src/View/Alert/Utilities/getAlertButtonStyle.js +8 -0
- package/src/View/Alert/Utilities/getDefaultAlertDefinition.d.ts +2 -1
- package/src/View/Alert/Wizard/AlertTypeWizardSection.d.ts +5 -2
- package/src/View/Alert/Wizard/AlertTypeWizardSection.js +48 -12
- package/src/View/Alert/Wizard/AlertWizard.js +12 -8
- package/src/View/BulkUpdate/BulkUpdateViewPanel.js +23 -11
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.js +2 -2
- package/src/View/CellSummary/CellSummaryViewPanel.js +15 -17
- package/src/View/Components/AdaptableDateInput/index.js +1 -1
- package/src/View/Components/Buttons/ButtonApply.js +1 -1
- package/src/View/Components/Buttons/ButtonClear.d.ts +1 -0
- package/src/View/Components/Buttons/EntityListActionButtons.d.ts +1 -2
- package/src/View/Components/Buttons/SuspendToggleButton/SuspendToggleButton.d.ts +1 -2
- package/src/View/Components/Selectors/BulkUpdateValueSelector.js +18 -17
- package/src/View/Components/StyleComponent.js +20 -1
- package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.d.ts +2 -1
- package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.js +39 -13
- package/src/View/CustomSort/Wizard/CustomSortWizard.js +4 -4
- package/src/View/Dashboard/DashboardPopup.js +4 -5
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +1 -0
- package/src/View/Export/ExportDestinationPicker.js +1 -1
- package/src/View/Export/ExportStatusBar.js +4 -2
- package/src/View/Export/ExportViewPanel.js +25 -18
- package/src/View/FlashingCell/Wizard/FlashingCellSettingsWizardSection.d.ts +2 -1
- package/src/View/FlashingCell/Wizard/FlashingCellSettingsWizardSection.js +36 -15
- package/src/View/FlashingCell/Wizard/FlashingCellWizard.js +13 -9
- package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.js +46 -51
- package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.js +2 -2
- package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +22 -11
- package/src/View/GridInfo/GridInfoPopup/GridInfoPopup.js +57 -65
- package/src/View/Layout/Wizard/sections/PivotColumnsSection.js +8 -0
- package/src/View/PlusMinus/Wizard/PlusMinusSettingsWizardSection.js +32 -9
- package/src/View/PlusMinus/Wizard/PlusMinusWizard.js +20 -15
- package/src/View/QuickSearch/QuickSearchPopup.js +4 -1
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsIPushPull.js +12 -1
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsOpenFin.js +12 -1
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReminder.js +14 -4
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReport.js +12 -1
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/isSettingsValid.d.ts +2 -1
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/isSettingsValid.js +10 -1
- package/src/View/Shortcut/Wizard/ShortcutSettingsWizard.d.ts +2 -1
- package/src/View/Shortcut/Wizard/ShortcutSettingsWizard.js +25 -4
- package/src/View/Shortcut/Wizard/ShortcutWizard.js +18 -14
- package/src/View/UIHelper.d.ts +2 -0
- package/src/View/UIHelper.js +16 -0
- package/src/agGrid/AdaptableAgGrid.d.ts +2 -2
- package/src/agGrid/AdaptableAgGrid.js +5 -5
- package/src/agGrid/AgGridColumnAdapter.js +3 -18
- package/src/components/Dashboard/DashboardToolbar.js +1 -1
- package/src/components/ExpressionEditor/EditorInput.js +19 -3
- package/src/components/Tree/TreeDropdown/index.js +1 -1
- package/src/env.js +2 -2
- package/src/layout-manager/src/LayoutManagerModel.d.ts +1 -0
- package/src/layout-manager/src/index.js +25 -7
- package/src/layout-manager/src/normalizeLayoutModel.js +3 -0
- package/src/metamodel/adaptable.metamodel.d.ts +39 -7
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/migration/AdaptableUpgradeHelper.js +3 -1
- package/src/migration/VersionUpgrade22.d.ts +21 -0
- package/src/migration/VersionUpgrade22.js +191 -0
- package/src/types.d.ts +2 -3
- package/tsconfig.cjs.tsbuildinfo +1 -1
- package/src/AdaptableState/Common/SuspendableObject.d.ts +0 -10
- package/src/AdaptableState/Common/SuspendableObject.js +0 -2
|
@@ -11,6 +11,7 @@ const OnePageAdaptableWizard_1 = require("../../../Wizard/OnePageAdaptableWizard
|
|
|
11
11
|
const Utilities_1 = require("./Utilities");
|
|
12
12
|
const ArrayExtensions_1 = tslib_1.__importDefault(require("../../../../Utilities/Extensions/ArrayExtensions"));
|
|
13
13
|
const Flex_1 = require("../../../../components/Flex");
|
|
14
|
+
const CheckBox_1 = require("../../../../components/CheckBox");
|
|
14
15
|
const PivotColumnsSectionSummary = () => {
|
|
15
16
|
const adaptable = (0, AdaptableContext_1.useAdaptable)();
|
|
16
17
|
const { data: layout } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
|
|
@@ -33,6 +34,13 @@ const PivotColumnsSection = (props) => {
|
|
|
33
34
|
return (React.createElement(Tabs_1.Tabs, { className: "twa:h-full" },
|
|
34
35
|
React.createElement(Tabs_1.Tabs.Tab, null, "Pivot Columns"),
|
|
35
36
|
React.createElement(Tabs_1.Tabs.Content, null,
|
|
37
|
+
React.createElement(Flex_1.Box, { className: "twa:mb-3 twa:px-2" },
|
|
38
|
+
React.createElement(CheckBox_1.CheckBox, { checked: !!layout.PivotResultColumns, onChange: (checked) => {
|
|
39
|
+
props.onChange({
|
|
40
|
+
...layout,
|
|
41
|
+
PivotResultColumns: checked,
|
|
42
|
+
});
|
|
43
|
+
} }, "Persist Order of Pivot Result Columns")),
|
|
36
44
|
React.createElement(ValueSelector_1.ValueSelector, { showFilterInput: true, filter: Utilities_1.columnFilter, toIdentifier: (option) => `${option.columnId}`, toLabel: (option) => option.friendlyName ?? option.columnId, options: sortedPivotColumns, value: layout.PivotColumns ?? [], allowReorder: true, onChange: handleColumnsChange }))));
|
|
37
45
|
};
|
|
38
46
|
exports.PivotColumnsSection = PivotColumnsSection;
|
|
@@ -4,7 +4,6 @@ exports.PlusMinusSettingsWizardSection = exports.isSettingsValid = exports.PlusM
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const React = tslib_1.__importStar(require("react"));
|
|
6
6
|
const Input_1 = tslib_1.__importDefault(require("../../../components/Input"));
|
|
7
|
-
const Radio_1 = tslib_1.__importDefault(require("../../../components/Radio"));
|
|
8
7
|
const FormLayout_1 = tslib_1.__importStar(require("../../../components/FormLayout"));
|
|
9
8
|
const Tabs_1 = require("../../../components/Tabs");
|
|
10
9
|
const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
|
|
@@ -16,13 +15,27 @@ const Flex_1 = require("../../../components/Flex");
|
|
|
16
15
|
const PlusMinusSettingsSummary = (props) => {
|
|
17
16
|
const { data } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
|
|
18
17
|
return (React.createElement(React.Fragment, null,
|
|
18
|
+
React.createElement(OnePageAdaptableWizard_2.SummaryText, null,
|
|
19
|
+
"Name ",
|
|
20
|
+
React.createElement(Tag_1.Tag, null, data.Name || 'Not specified')),
|
|
19
21
|
React.createElement(OnePageAdaptableWizard_2.SummaryText, null,
|
|
20
22
|
"Nudge Value ",
|
|
21
23
|
React.createElement(Tag_1.Tag, null, data.NudgeValue ?? 'Not selected')),
|
|
24
|
+
React.createElement(OnePageAdaptableWizard_2.SummaryText, null,
|
|
25
|
+
"Nudge Type ",
|
|
26
|
+
React.createElement(Tag_1.Tag, null, props.hasCondition ? 'Conditional' : 'Always Apply')),
|
|
22
27
|
props.hasCondition && React.createElement(PlusMinusRuleWizardSection_1.PlusMinusRuleSummary, null)));
|
|
23
28
|
};
|
|
24
29
|
exports.PlusMinusSettingsSummary = PlusMinusSettingsSummary;
|
|
25
30
|
const isSettingsValid = (hasCondition) => (data, api, context) => {
|
|
31
|
+
if (!data.Name?.trim()) {
|
|
32
|
+
return 'Name is required';
|
|
33
|
+
}
|
|
34
|
+
const allPlusMinusNudges = api.plusMinusApi.getAllPlusMinus();
|
|
35
|
+
const isDuplicateName = allPlusMinusNudges.some((nudge) => nudge.Name === data.Name && nudge.Uuid !== data.Uuid);
|
|
36
|
+
if (isDuplicateName) {
|
|
37
|
+
return 'A Plus Minus Nudge already exists with that name';
|
|
38
|
+
}
|
|
26
39
|
if (hasCondition) {
|
|
27
40
|
if (!data?.Rule?.BooleanExpression) {
|
|
28
41
|
return 'No valid Rule is specified';
|
|
@@ -43,6 +56,12 @@ const isSettingsValid = (hasCondition) => (data, api, context) => {
|
|
|
43
56
|
exports.isSettingsValid = isSettingsValid;
|
|
44
57
|
const PlusMinusSettingsWizardSection = (props) => {
|
|
45
58
|
const { data } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
|
|
59
|
+
const handleNameChange = (event) => {
|
|
60
|
+
props.onChange({
|
|
61
|
+
...data,
|
|
62
|
+
Name: event.target.value,
|
|
63
|
+
});
|
|
64
|
+
};
|
|
46
65
|
const handleNudgeValueChange = (event) => {
|
|
47
66
|
const newValue = parseFloat(event.target.value);
|
|
48
67
|
props.onChange({
|
|
@@ -51,16 +70,20 @@ const PlusMinusSettingsWizardSection = (props) => {
|
|
|
51
70
|
});
|
|
52
71
|
};
|
|
53
72
|
return (React.createElement(Flex_1.Flex, { flexDirection: "column", "data-name": "plus-minus-column-settings", className: "twa:h-full" },
|
|
54
|
-
React.createElement(Tabs_1.Tabs, {
|
|
55
|
-
React.createElement(Tabs_1.Tabs.Tab, null, "
|
|
73
|
+
React.createElement(Tabs_1.Tabs, { className: "twa:p-2" },
|
|
74
|
+
React.createElement(Tabs_1.Tabs.Tab, null, "Settings"),
|
|
56
75
|
React.createElement(Tabs_1.Tabs.Content, null,
|
|
57
76
|
React.createElement(FormLayout_1.default, null,
|
|
77
|
+
React.createElement(FormLayout_1.FormRow, { label: "Name" },
|
|
78
|
+
React.createElement(Input_1.default, { "data-name": "plus-minus-name", className: "twa:flex-1 twa:mr-3", onChange: handleNameChange, placeholder: "Enter Name", value: data.Name ?? '' })),
|
|
58
79
|
React.createElement(FormLayout_1.FormRow, { label: "Nudge Value" },
|
|
59
|
-
React.createElement(Input_1.default, { "data-name": "nudge-value", className: "twa:flex-1 twa:mr-3", onChange: handleNudgeValueChange, placeholder: "Enter Number", type: "number", value: data.NudgeValue ?? '' })),
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
80
|
+
React.createElement(Input_1.default, { "data-name": "nudge-value", className: "twa:flex-1 twa:mr-3", onChange: handleNudgeValueChange, placeholder: "Enter Number", type: "number", value: data.NudgeValue ?? '' }))))),
|
|
81
|
+
React.createElement(Tabs_1.Tabs, { className: "twa:p-2", selectedIndex: props.hasCondition ? 1 : 0, onSelectedIndexChange: (index) => props.onConditionChange(index === 1) },
|
|
82
|
+
React.createElement(Tabs_1.Tabs.Tab, { "data-name": "nudge-type-always" }, "Always Apply"),
|
|
83
|
+
React.createElement(Tabs_1.Tabs.Tab, { "data-name": "nudge-type-condition" }, "Conditional"),
|
|
84
|
+
React.createElement(Tabs_1.Tabs.Content, null,
|
|
85
|
+
React.createElement(Flex_1.Flex, { className: "twa:text-2 twa:py-2" }, "The nudge value is always applied when using Plus/Minus")),
|
|
86
|
+
React.createElement(Tabs_1.Tabs.Content, { className: "twa:p-0" },
|
|
87
|
+
React.createElement(PlusMinusRuleWizardSection_1.PlusMinusRuleWizardSection, { defaultPredicateId: "NonBlanks", onChange: props.onChange })))));
|
|
65
88
|
};
|
|
66
89
|
exports.PlusMinusSettingsWizardSection = PlusMinusSettingsWizardSection;
|
|
@@ -13,7 +13,7 @@ const PlusMinusRedux = tslib_1.__importStar(require("../../../Redux/ActionsReduc
|
|
|
13
13
|
const ObjectTagsWizardSection_1 = require("../../Wizard/ObjectTagsWizardSection");
|
|
14
14
|
const Flex_1 = require("../../../components/Flex");
|
|
15
15
|
const PlusMinusWizard = (props) => {
|
|
16
|
-
const [plusMinus,
|
|
16
|
+
const [plusMinus, doSetPlusMinus] = React.useState(() => {
|
|
17
17
|
const newPlusMinus = {
|
|
18
18
|
...(props.data ? props.data : ObjectFactory_1.default.CreateEmptyPlusMinusNudge()),
|
|
19
19
|
Scope: props?.data?.Scope ?? { All: true },
|
|
@@ -26,19 +26,24 @@ const PlusMinusWizard = (props) => {
|
|
|
26
26
|
}
|
|
27
27
|
return newPlusMinus;
|
|
28
28
|
});
|
|
29
|
+
const setPlusMinus = React.useCallback((data) => {
|
|
30
|
+
doSetPlusMinus(data);
|
|
31
|
+
}, []);
|
|
29
32
|
const [hasCondition, setHasCondition] = React.useState(() => {
|
|
30
33
|
// true if on edit and it has a condition
|
|
31
34
|
return Boolean(props?.data?.Rule);
|
|
32
35
|
});
|
|
33
36
|
React.useEffect(() => {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
37
|
+
doSetPlusMinus((prev) => {
|
|
38
|
+
const preparedData = { ...prev };
|
|
39
|
+
if (hasCondition) {
|
|
40
|
+
preparedData.Rule = preparedData.Rule ?? { BooleanExpression: '' };
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
delete preparedData.Rule;
|
|
44
|
+
}
|
|
45
|
+
return preparedData;
|
|
46
|
+
});
|
|
42
47
|
}, [hasCondition]);
|
|
43
48
|
const dispatch = (0, react_redux_1.useDispatch)();
|
|
44
49
|
const handleFinish = () => {
|
|
@@ -51,6 +56,12 @@ const PlusMinusWizard = (props) => {
|
|
|
51
56
|
props.onFinishWizard(plusMinus);
|
|
52
57
|
};
|
|
53
58
|
return (React.createElement(OnePageAdaptableWizard_1.OnePageAdaptableWizard, { defaultCurrentSectionName: props.defaultCurrentSectionName, moduleInfo: props.moduleInfo, data: plusMinus, onHide: props.onCloseWizard, onFinish: handleFinish, sections: [
|
|
59
|
+
{
|
|
60
|
+
title: 'Settings',
|
|
61
|
+
isValid: (0, PlusMinusSettingsWizardSection_1.isSettingsValid)(hasCondition),
|
|
62
|
+
renderSummary: () => React.createElement(PlusMinusSettingsWizardSection_1.PlusMinusSettingsSummary, { hasCondition: hasCondition }),
|
|
63
|
+
render: () => (React.createElement(PlusMinusSettingsWizardSection_1.PlusMinusSettingsWizardSection, { hasCondition: hasCondition, onConditionChange: setHasCondition, onChange: setPlusMinus })),
|
|
64
|
+
},
|
|
54
65
|
{
|
|
55
66
|
title: 'Target',
|
|
56
67
|
isValid: NewScopeComponent_1.isScopeValid,
|
|
@@ -63,12 +74,6 @@ const PlusMinusWizard = (props) => {
|
|
|
63
74
|
render: () => (React.createElement(Flex_1.Box, { className: "twa:p-2" },
|
|
64
75
|
React.createElement(PlusMinusScopeWizardSection_1.PlusMinusScopeWizardSection, { onChange: setPlusMinus }))),
|
|
65
76
|
},
|
|
66
|
-
{
|
|
67
|
-
title: 'Settings',
|
|
68
|
-
isValid: (0, PlusMinusSettingsWizardSection_1.isSettingsValid)(hasCondition),
|
|
69
|
-
renderSummary: () => React.createElement(PlusMinusSettingsWizardSection_1.PlusMinusSettingsSummary, { hasCondition: hasCondition }),
|
|
70
|
-
render: () => (React.createElement(PlusMinusSettingsWizardSection_1.PlusMinusSettingsWizardSection, { hasCondition: hasCondition, onConditionChange: setHasCondition, onChange: setPlusMinus })),
|
|
71
|
-
},
|
|
72
77
|
{
|
|
73
78
|
details: 'Select Plus/Minus Tags',
|
|
74
79
|
title: 'Tags',
|
|
@@ -39,7 +39,10 @@ const QuickSearchPopupComponent = (props) => {
|
|
|
39
39
|
React.createElement(Card_1.Card, null,
|
|
40
40
|
React.createElement(Card_1.Card.Title, null, "Behaviour"),
|
|
41
41
|
React.createElement(Card_1.Card.Body, { className: "twa:p-1", gap: 2 },
|
|
42
|
-
React.createElement(HelpBlock_1.default, { className: "twa:text-2 twa:w-fit" },
|
|
42
|
+
React.createElement(HelpBlock_1.default, { className: "twa:text-2 twa:w-fit" },
|
|
43
|
+
"Filter Grid when searching to only show rows with matching cells; ",
|
|
44
|
+
React.createElement("b", null, "use with care"),
|
|
45
|
+
" as can cause performance issues"),
|
|
43
46
|
React.createElement(CheckBox_1.CheckBox, { "data-name": "filter-quick-search-results", value: "existing", checked: state.RunQueryAfterQuickSearch, disabled: StringExtensions_1.default.IsNotNullOrEmpty(searchText), onChange: onQuickSearchBehaviourChange }, "Filter using Quick Search Results"))),
|
|
44
47
|
React.createElement(Card_1.Card.Title, { border: false, className: "twa:pt-3" }, "Cell Matching Style"),
|
|
45
48
|
React.createElement(Card_1.Card, null,
|
|
@@ -5,11 +5,18 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const React = tslib_1.__importStar(require("react"));
|
|
6
6
|
const Tabs_1 = require("../../../../components/Tabs");
|
|
7
7
|
const FormLayout_1 = tslib_1.__importStar(require("../../../../components/FormLayout"));
|
|
8
|
+
const Input_1 = tslib_1.__importDefault(require("../../../../components/Input"));
|
|
8
9
|
const Radio_1 = tslib_1.__importDefault(require("../../../../components/Radio"));
|
|
9
10
|
const DropdownButton_1 = tslib_1.__importDefault(require("../../../../components/DropdownButton"));
|
|
10
11
|
const OnePageAdaptableWizard_1 = require("../../../Wizard/OnePageAdaptableWizard");
|
|
11
12
|
const Flex_1 = require("../../../../components/Flex");
|
|
12
13
|
const ScheduleSettingsIPushPull = (props) => {
|
|
14
|
+
const handleNameChange = (event) => {
|
|
15
|
+
props.onChange({
|
|
16
|
+
...props.iPushPull,
|
|
17
|
+
Name: event.target.value,
|
|
18
|
+
});
|
|
19
|
+
};
|
|
13
20
|
const reportOptions = props.allReports.map((report) => ({
|
|
14
21
|
label: report.Name,
|
|
15
22
|
value: report.Name,
|
|
@@ -49,9 +56,13 @@ const ScheduleSettingsIPushPull = (props) => {
|
|
|
49
56
|
});
|
|
50
57
|
return (React.createElement(Flex_1.Box, { "data-name": "schedule-settings-ipushpull" },
|
|
51
58
|
React.createElement(Tabs_1.Tabs, { autoFocus: false },
|
|
52
|
-
React.createElement(Tabs_1.Tabs.Tab, null, "
|
|
59
|
+
React.createElement(Tabs_1.Tabs.Tab, null, "Settings"),
|
|
53
60
|
React.createElement(Tabs_1.Tabs.Content, null,
|
|
54
61
|
React.createElement(FormLayout_1.default, null,
|
|
62
|
+
React.createElement(FormLayout_1.FormRow, { label: "Name" },
|
|
63
|
+
React.createElement(Input_1.default, { "data-name": "schedule-name", className: "twa:w-[300px]", onChange: handleNameChange, placeholder: "Enter Schedule Name", type: "string", value: props.iPushPull?.Name ?? '' })),
|
|
64
|
+
React.createElement(FormLayout_1.FormRow, { label: "" },
|
|
65
|
+
React.createElement(Flex_1.Box, { className: "twa:h-2" })),
|
|
55
66
|
React.createElement(FormLayout_1.FormRow, { label: "Select Report" },
|
|
56
67
|
React.createElement(DropdownButton_1.default, { "data-name": "report-name", disabled: props.allReports.length == 0, items: reportOptions, className: "twa:w-[300px]" }, props?.iPushPull?.IPushPullReport?.ReportName || 'Select Report')),
|
|
57
68
|
React.createElement(FormLayout_1.FormRow, { label: "Select Folder" },
|
|
@@ -5,9 +5,16 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const React = tslib_1.__importStar(require("react"));
|
|
6
6
|
const Tabs_1 = require("../../../../components/Tabs");
|
|
7
7
|
const FormLayout_1 = tslib_1.__importStar(require("../../../../components/FormLayout"));
|
|
8
|
+
const Input_1 = tslib_1.__importDefault(require("../../../../components/Input"));
|
|
8
9
|
const DropdownButton_1 = tslib_1.__importDefault(require("../../../../components/DropdownButton"));
|
|
9
10
|
const Flex_1 = require("../../../../components/Flex");
|
|
10
11
|
const ScheduleSettingsOpenFin = (props) => {
|
|
12
|
+
const handleNameChange = (event) => {
|
|
13
|
+
props.onChange({
|
|
14
|
+
...props.openFin,
|
|
15
|
+
Name: event.target.value,
|
|
16
|
+
});
|
|
17
|
+
};
|
|
11
18
|
const reportOptions = props.allReports.map((report) => ({
|
|
12
19
|
label: report.Name,
|
|
13
20
|
value: report.Name,
|
|
@@ -21,9 +28,13 @@ const ScheduleSettingsOpenFin = (props) => {
|
|
|
21
28
|
}));
|
|
22
29
|
return (React.createElement(Flex_1.Box, { "data-name": "schedule-settings-openfin" },
|
|
23
30
|
React.createElement(Tabs_1.Tabs, { autoFocus: false },
|
|
24
|
-
React.createElement(Tabs_1.Tabs.Tab, null, "
|
|
31
|
+
React.createElement(Tabs_1.Tabs.Tab, null, "Settings"),
|
|
25
32
|
React.createElement(Tabs_1.Tabs.Content, null,
|
|
26
33
|
React.createElement(FormLayout_1.default, null,
|
|
34
|
+
React.createElement(FormLayout_1.FormRow, { label: "Name" },
|
|
35
|
+
React.createElement(Input_1.default, { "data-name": "schedule-name", className: "twa:w-[300px]", onChange: handleNameChange, placeholder: "Enter Schedule Name", type: "string", value: props.openFin?.Name ?? '' })),
|
|
36
|
+
React.createElement(FormLayout_1.FormRow, { label: "" },
|
|
37
|
+
React.createElement(Flex_1.Box, { className: "twa:h-2" })),
|
|
27
38
|
React.createElement(FormLayout_1.FormRow, { label: "Select Report" },
|
|
28
39
|
React.createElement(DropdownButton_1.default, { "data-name": "select-report", columns: ['label'], className: "twa:w-[300px]", disabled: props.allReports.length == 0, items: reportOptions }, props?.openFin?.OpenFinReport?.ReportName || 'Select Report')))))));
|
|
29
40
|
};
|
|
@@ -21,16 +21,22 @@ const ScheduleSettingsReminder = (props) => {
|
|
|
21
21
|
});
|
|
22
22
|
},
|
|
23
23
|
}));
|
|
24
|
+
const handleNameChange = (event) => {
|
|
25
|
+
props.onChange({
|
|
26
|
+
...props.reminderSchedule,
|
|
27
|
+
Name: event.target.value,
|
|
28
|
+
});
|
|
29
|
+
};
|
|
24
30
|
const handleHeaderChange = (event) => {
|
|
25
31
|
props.onChange({
|
|
26
32
|
...props.reminderSchedule,
|
|
27
|
-
Header: event.target
|
|
33
|
+
Header: event.target.value,
|
|
28
34
|
});
|
|
29
35
|
};
|
|
30
36
|
const handleMessageChange = (event) => {
|
|
31
37
|
props.onChange({
|
|
32
38
|
...props.reminderSchedule,
|
|
33
|
-
Message: event.target
|
|
39
|
+
Message: event.target.value,
|
|
34
40
|
});
|
|
35
41
|
};
|
|
36
42
|
const handleDisplayNotificationChange = (checked) => {
|
|
@@ -45,11 +51,15 @@ const ScheduleSettingsReminder = (props) => {
|
|
|
45
51
|
DisplaySystemStatusMessage: checked,
|
|
46
52
|
});
|
|
47
53
|
};
|
|
48
|
-
return (React.createElement(Flex_1.Box, { "data-name": "schedule-settings-
|
|
54
|
+
return (React.createElement(Flex_1.Box, { "data-name": "schedule-settings-reminder" },
|
|
49
55
|
React.createElement(Tabs_1.Tabs, { autoFocus: false },
|
|
50
|
-
React.createElement(Tabs_1.Tabs.Tab, null, "
|
|
56
|
+
React.createElement(Tabs_1.Tabs.Tab, null, "Settings"),
|
|
51
57
|
React.createElement(Tabs_1.Tabs.Content, null,
|
|
52
58
|
React.createElement(FormLayout_1.default, null,
|
|
59
|
+
React.createElement(FormLayout_1.FormRow, { label: "Name" },
|
|
60
|
+
React.createElement(Input_1.default, { "data-name": "schedule-name", className: "twa:w-[300px]", onChange: handleNameChange, placeholder: "Enter Schedule Name", type: "string", value: props.reminderSchedule?.Name ?? '' })),
|
|
61
|
+
React.createElement(FormLayout_1.FormRow, { label: "" },
|
|
62
|
+
React.createElement(Flex_1.Box, { className: "twa:h-2" })),
|
|
53
63
|
React.createElement(FormLayout_1.FormRow, { label: "Header" },
|
|
54
64
|
React.createElement(Input_1.default, { "data-name": "header", className: "twa:w-[300px]", onChange: handleHeaderChange, placeholder: "Enter Reminder Header", type: "string", value: props.reminderSchedule?.Header })),
|
|
55
65
|
React.createElement(FormLayout_1.FormRow, { label: "Message" },
|
|
@@ -4,10 +4,17 @@ exports.ScheduleSettingsReport = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const React = tslib_1.__importStar(require("react"));
|
|
6
6
|
const FormLayout_1 = tslib_1.__importStar(require("../../../../components/FormLayout"));
|
|
7
|
+
const Input_1 = tslib_1.__importDefault(require("../../../../components/Input"));
|
|
7
8
|
const Select_1 = require("../../../../components/Select");
|
|
8
9
|
const Tabs_1 = require("../../../../components/Tabs");
|
|
9
10
|
const Flex_1 = require("../../../../components/Flex");
|
|
10
11
|
const ScheduleSettingsReport = (props) => {
|
|
12
|
+
const handleNameChange = (event) => {
|
|
13
|
+
props.onChange({
|
|
14
|
+
...props.report,
|
|
15
|
+
Name: event.target.value,
|
|
16
|
+
});
|
|
17
|
+
};
|
|
11
18
|
const reportOptions = props.allReports.map((report) => ({
|
|
12
19
|
label: report.Name,
|
|
13
20
|
value: report.Name,
|
|
@@ -34,9 +41,13 @@ const ScheduleSettingsReport = (props) => {
|
|
|
34
41
|
}));
|
|
35
42
|
return (React.createElement(Flex_1.Box, { "data-name": "schedule-settings-report" },
|
|
36
43
|
React.createElement(Tabs_1.Tabs, { autoFocus: false, className: "twa:mb-3" },
|
|
37
|
-
React.createElement(Tabs_1.Tabs.Tab, null, "
|
|
44
|
+
React.createElement(Tabs_1.Tabs.Tab, null, "Settings"),
|
|
38
45
|
React.createElement(Tabs_1.Tabs.Content, null,
|
|
39
46
|
React.createElement(FormLayout_1.default, null,
|
|
47
|
+
React.createElement(FormLayout_1.FormRow, { label: "Name" },
|
|
48
|
+
React.createElement(Input_1.default, { "data-name": "schedule-name", className: "twa:w-[300px]", onChange: handleNameChange, placeholder: "Enter Schedule Name", type: "string", value: props.report?.Name ?? '' })),
|
|
49
|
+
React.createElement(FormLayout_1.FormRow, { label: "" },
|
|
50
|
+
React.createElement(Flex_1.Box, { className: "twa:h-2" })),
|
|
40
51
|
React.createElement(FormLayout_1.FormRow, { label: "Export" },
|
|
41
52
|
React.createElement(Flex_1.Box, { className: "twa:max-w-[300px]" },
|
|
42
53
|
React.createElement(Select_1.Select, { "data-name": "select-report", options: reportOptions, value: props?.report?.ReportName, placeholder: "Select Export", onChange: (value) => props.onChange({
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
import { AdaptableApi } from '../../../../Api/AdaptableApi';
|
|
1
2
|
import { BaseSchedule } from '../../../../AdaptableState/Common/Schedule';
|
|
2
|
-
export declare const isSettingsValid: (schedule: BaseSchedule) => true | "Message type not selected" | "Reminder header not specified" | "Reminder message not specified" | "Report source not specified" | "Report format not selected" | "Report not selected" | "Report folder not selected" | "Report page not selected";
|
|
3
|
+
export declare const isSettingsValid: (schedule: BaseSchedule, api: AdaptableApi) => true | "Name is required" | "A Schedule with this name already exists" | "Message type not selected" | "Reminder header not specified" | "Reminder message not specified" | "Report source not specified" | "Report format not selected" | "Report not selected" | "Report folder not selected" | "Report page not selected";
|
|
@@ -4,7 +4,16 @@ exports.isSettingsValid = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const Enums_1 = require("../../../../AdaptableState/Common/Enums");
|
|
6
6
|
const StringExtensions_1 = tslib_1.__importDefault(require("../../../../Utilities/Extensions/StringExtensions"));
|
|
7
|
-
const isSettingsValid = (schedule) => {
|
|
7
|
+
const isSettingsValid = (schedule, api) => {
|
|
8
|
+
// Validate Name - mandatory and unique
|
|
9
|
+
if (!schedule.Name?.trim()) {
|
|
10
|
+
return 'Name is required';
|
|
11
|
+
}
|
|
12
|
+
const allSchedules = api.scheduleApi.getSchedules();
|
|
13
|
+
const isDuplicateName = allSchedules.some((s) => s.Name === schedule.Name && s.Uuid !== schedule.Uuid);
|
|
14
|
+
if (isDuplicateName) {
|
|
15
|
+
return 'A Schedule with this name already exists';
|
|
16
|
+
}
|
|
8
17
|
if (schedule.ScheduleType === Enums_1.ScheduleType.Reminder) {
|
|
9
18
|
const reminder = schedule;
|
|
10
19
|
if (!reminder.MessageType) {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { Shortcut } from '../../../AdaptableState/ShortcutState';
|
|
3
|
-
|
|
3
|
+
import { AdaptableApi } from '../../../types';
|
|
4
|
+
export declare const isSettingsValid: (data: Shortcut, api: AdaptableApi) => string | true;
|
|
4
5
|
export declare const ShortcutSettingsSummary: React.FunctionComponent;
|
|
5
6
|
interface ShortcutSettingsWizardProps {
|
|
6
7
|
availableKeys: Array<string>;
|
|
@@ -13,7 +13,15 @@ const Tag_1 = require("../../../components/Tag");
|
|
|
13
13
|
const HelpBlock_1 = tslib_1.__importDefault(require("../../../components/HelpBlock"));
|
|
14
14
|
const Select_1 = require("../../../components/Select");
|
|
15
15
|
const Flex_1 = require("../../../components/Flex");
|
|
16
|
-
const isSettingsValid = (data) => {
|
|
16
|
+
const isSettingsValid = (data, api) => {
|
|
17
|
+
if (!data.Name?.trim()) {
|
|
18
|
+
return 'Name is required';
|
|
19
|
+
}
|
|
20
|
+
const allShortcuts = api.shortcutApi.getShortcuts();
|
|
21
|
+
const isDuplicateName = allShortcuts.some((s) => s.Name === data.Name && s.Uuid !== data.Uuid);
|
|
22
|
+
if (isDuplicateName) {
|
|
23
|
+
return 'A Shortcut already exists with that name';
|
|
24
|
+
}
|
|
17
25
|
const shortcutKey = data.ShortcutKey && typeof data.ShortcutKey === 'string' ? '' : 'Shortcut key is not selected';
|
|
18
26
|
const shortcutValue = typeof data.ShortcutValue === 'number' ? '' : 'Shortcut value is not specified';
|
|
19
27
|
const shortcutOperation = data.ShortcutOperation && typeof data.ShortcutOperation === 'string'
|
|
@@ -26,6 +34,9 @@ exports.isSettingsValid = isSettingsValid;
|
|
|
26
34
|
const ShortcutSettingsSummary = () => {
|
|
27
35
|
const { data: shortcut } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
|
|
28
36
|
return (React.createElement(React.Fragment, null,
|
|
37
|
+
React.createElement(OnePageAdaptableWizard_2.SummaryText, null,
|
|
38
|
+
"Name ",
|
|
39
|
+
React.createElement(Tag_1.Tag, null, shortcut.Name || 'Not specified')),
|
|
29
40
|
React.createElement(OnePageAdaptableWizard_2.SummaryText, null,
|
|
30
41
|
"Shortcut Key ",
|
|
31
42
|
React.createElement(Tag_1.Tag, null, shortcut.ShortcutKey || 'Not selected')),
|
|
@@ -39,6 +50,12 @@ const ShortcutSettingsSummary = () => {
|
|
|
39
50
|
exports.ShortcutSettingsSummary = ShortcutSettingsSummary;
|
|
40
51
|
const ShortcutSettingsWizard = (props) => {
|
|
41
52
|
const { data: shortcut } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
|
|
53
|
+
const handleNameChange = (event) => {
|
|
54
|
+
props.onChange({
|
|
55
|
+
...shortcut,
|
|
56
|
+
Name: event.target.value,
|
|
57
|
+
});
|
|
58
|
+
};
|
|
42
59
|
const handleKeyChange = React.useCallback((ShortcutKey) => {
|
|
43
60
|
props.onChange({
|
|
44
61
|
...shortcut,
|
|
@@ -69,17 +86,21 @@ const ShortcutSettingsWizard = (props) => {
|
|
|
69
86
|
React.createElement(Tabs_1.Tabs.Tab, null, "Shortcut Settings"),
|
|
70
87
|
React.createElement(Tabs_1.Tabs.Content, null,
|
|
71
88
|
React.createElement(FormLayout_1.default, null,
|
|
72
|
-
React.createElement(FormLayout_1.FormRow,
|
|
89
|
+
React.createElement(FormLayout_1.FormRow, { label: "Name" },
|
|
90
|
+
React.createElement(Input_1.default, { "data-name": "shortcut-name", className: "twa:flex-1 twa:max-w-[200px] twa:mr-3", onChange: handleNameChange, placeholder: "Enter Name", value: shortcut.Name ?? '' })),
|
|
91
|
+
React.createElement(FormLayout_1.FormRow, { label: "" },
|
|
92
|
+
React.createElement(Flex_1.Box, { className: "twa:h-2" })),
|
|
93
|
+
React.createElement(FormLayout_1.FormRow, { label: "" },
|
|
73
94
|
React.createElement(HelpBlock_1.default, { className: "twa:text-2 twa:mb-0" }, "Keyboard key that, when pressed, triggers the Shortcut")),
|
|
74
95
|
React.createElement(FormLayout_1.FormRow, { label: "Key" },
|
|
75
96
|
React.createElement(Flex_1.Flex, { flexDirection: "row" },
|
|
76
97
|
React.createElement(Select_1.Select, { "data-name": "shortcut-key", placeholder: "Select Key", options: optionKeys, onChange: (key) => handleKeyChange(key), value: shortcut.ShortcutKey || 'Select Key' }))),
|
|
77
|
-
React.createElement(FormLayout_1.FormRow,
|
|
98
|
+
React.createElement(FormLayout_1.FormRow, { label: "" },
|
|
78
99
|
React.createElement(HelpBlock_1.default, { className: "twa:text-2 twa:mb-0" }, "Mathematical operation performed on Cell's current value (using the Shortcut's 'value') - used to calculate the Cell's new total")),
|
|
79
100
|
React.createElement(FormLayout_1.FormRow, { label: "Operation" },
|
|
80
101
|
React.createElement(Flex_1.Flex, { flexDirection: "row" },
|
|
81
102
|
React.createElement(Select_1.Select, { "data-name": "shortcut-operation", placeholder: "Select Operation", options: optionActions, onChange: (operation) => handleOperationChange(operation), value: shortcut.ShortcutOperation }))),
|
|
82
|
-
React.createElement(FormLayout_1.FormRow,
|
|
103
|
+
React.createElement(FormLayout_1.FormRow, { label: "" },
|
|
83
104
|
React.createElement(HelpBlock_1.default, { className: "twa:text-2 twa:mb-0" }, "Number that is used - together with the 'Operation' and the current cell value - to calculate the new total for the cell")),
|
|
84
105
|
React.createElement(FormLayout_1.FormRow, { label: "Value" },
|
|
85
106
|
React.createElement(Flex_1.Flex, { flexDirection: "row" },
|
|
@@ -15,8 +15,9 @@ const shortcutKeys_1 = require("../shortcutKeys");
|
|
|
15
15
|
const AdaptableContext_1 = require("../../AdaptableContext");
|
|
16
16
|
const ObjectTagsWizardSection_1 = require("../../Wizard/ObjectTagsWizardSection");
|
|
17
17
|
const Flex_1 = require("../../../components/Flex");
|
|
18
|
+
const StringExtensions_1 = tslib_1.__importDefault(require("../../../Utilities/Extensions/StringExtensions"));
|
|
18
19
|
const ShortcutWizard = (props) => {
|
|
19
|
-
const [shortcut,
|
|
20
|
+
const [shortcut, doSetShortcut] = React.useState(() => {
|
|
20
21
|
const shortcut = props.data ? (0, Helper_1.cloneObject)(props.data) : ObjectFactory_1.default.CreateEmptyShortcut();
|
|
21
22
|
shortcut.Scope = shortcut.Scope ?? { All: true };
|
|
22
23
|
if (props.popupParams?.column && props.popupParams?.action === 'New') {
|
|
@@ -26,10 +27,13 @@ const ShortcutWizard = (props) => {
|
|
|
26
27
|
}
|
|
27
28
|
return shortcut;
|
|
28
29
|
});
|
|
30
|
+
const setShortcut = React.useCallback((data) => {
|
|
31
|
+
doSetShortcut(data);
|
|
32
|
+
}, []);
|
|
29
33
|
const adaptable = (0, AdaptableContext_1.useAdaptable)();
|
|
30
34
|
const availableKeys = React.useMemo(() => {
|
|
31
35
|
const availableKeys = shortcutKeys_1.shortcutKeys.filter((key) => adaptable.api.shortcutApi.getShortcuts().every((shortcut) => shortcut.ShortcutKey !== key));
|
|
32
|
-
if (shortcut) {
|
|
36
|
+
if (shortcut && StringExtensions_1.default.IsNotNullOrEmptyOrWhiteSpace(shortcut.ShortcutKey)) {
|
|
33
37
|
availableKeys.push(shortcut.ShortcutKey);
|
|
34
38
|
}
|
|
35
39
|
availableKeys.sort();
|
|
@@ -46,18 +50,6 @@ const ShortcutWizard = (props) => {
|
|
|
46
50
|
props.onFinishWizard(shortcut);
|
|
47
51
|
};
|
|
48
52
|
return (React.createElement(OnePageAdaptableWizard_1.OnePageAdaptableWizard, { defaultCurrentSectionName: props.defaultCurrentSectionName, moduleInfo: props.moduleInfo, data: shortcut, onHide: props.onCloseWizard, onFinish: handleFinish, sections: [
|
|
49
|
-
{
|
|
50
|
-
title: 'Target',
|
|
51
|
-
isValid: NewScopeComponent_1.isScopeValid,
|
|
52
|
-
details: 'Specify where Shortcut should be applied',
|
|
53
|
-
renderSummary: () => (0, NewScopeComponent_1.renderScopeSummary)(shortcut.Scope, {
|
|
54
|
-
scopeWholeRow: 'Shortcut is triggered for all numeric cells',
|
|
55
|
-
scopeColumns: 'Shortcut is triggered for cells in selected columns',
|
|
56
|
-
scopeDataTypes: 'Shortcut is triggered for all numeric cells',
|
|
57
|
-
}),
|
|
58
|
-
render: () => (React.createElement(Flex_1.Box, { className: "twa:p-2" },
|
|
59
|
-
React.createElement(ShortcutScopeWizardSection_1.ShortcutScopeWizardSection, { onChange: setShortcut }))),
|
|
60
|
-
},
|
|
61
53
|
{
|
|
62
54
|
title: 'Settings',
|
|
63
55
|
isValid: ShortcutSettingsWizard_1.isSettingsValid,
|
|
@@ -73,6 +65,18 @@ const ShortcutWizard = (props) => {
|
|
|
73
65
|
render: () => (React.createElement(Flex_1.Box, { className: "twa:p-2" },
|
|
74
66
|
React.createElement(ShortcutSettingsWizard_1.ShortcutSettingsWizard, { availableKeys: props.availableKeys ?? availableKeys, onChange: setShortcut }))),
|
|
75
67
|
},
|
|
68
|
+
{
|
|
69
|
+
title: 'Target',
|
|
70
|
+
isValid: NewScopeComponent_1.isScopeValid,
|
|
71
|
+
details: 'Specify where Shortcut should be applied',
|
|
72
|
+
renderSummary: () => (0, NewScopeComponent_1.renderScopeSummary)(shortcut.Scope, {
|
|
73
|
+
scopeWholeRow: 'Shortcut is triggered for all numeric cells',
|
|
74
|
+
scopeColumns: 'Shortcut is triggered for cells in selected columns',
|
|
75
|
+
scopeDataTypes: 'Shortcut is triggered for all numeric cells',
|
|
76
|
+
}),
|
|
77
|
+
render: () => (React.createElement(Flex_1.Box, { className: "twa:p-2" },
|
|
78
|
+
React.createElement(ShortcutScopeWizardSection_1.ShortcutScopeWizardSection, { onChange: setShortcut }))),
|
|
79
|
+
},
|
|
76
80
|
{
|
|
77
81
|
details: 'Select Shortcut Tags',
|
|
78
82
|
title: 'Tags',
|
package/src/View/UIHelper.d.ts
CHANGED
|
@@ -38,6 +38,7 @@ export declare function getMessageTypeByStatusColour(statusColour: StatusColour)
|
|
|
38
38
|
export declare function getButtonToneByMessageType(messageType: AdaptableMessageType): 'success' | 'error' | 'neutral' | 'none' | 'warning' | 'info' | 'accent';
|
|
39
39
|
export declare function getGlyphByMessageType(messageType: AdaptableMessageType): AdaptableSystemIconName;
|
|
40
40
|
export declare function getColorByMessageType(messageType: AdaptableMessageType): string;
|
|
41
|
+
export declare function getCSSColorByMessageType(messageType: AdaptableMessageType): string;
|
|
41
42
|
export declare function getStyleForStatusColour(statusColour: StatusColour): CSSProperties;
|
|
42
43
|
export declare function getStyleForMessageType(messageType: AdaptableMessageType): CSSProperties;
|
|
43
44
|
export declare function getGlyphForStatusColour(statusColour: StatusColour): string;
|
|
@@ -75,6 +76,7 @@ export declare const UIHelper: {
|
|
|
75
76
|
getGlyphForMessageType: typeof getGlyphForMessageType;
|
|
76
77
|
getStyleForMessageType: typeof getStyleForMessageType;
|
|
77
78
|
getMessageTypeFromAdaptableAlerts: typeof getMessageTypeFromAdaptableAlerts;
|
|
79
|
+
getCSSColorByMessageType: typeof getCSSColorByMessageType;
|
|
78
80
|
getButtonColourForAdaptableAlerts: typeof getButtonColourForAdaptableAlerts;
|
|
79
81
|
getButtonTextColourForArrayandMessageType: typeof getButtonTextColourForArrayandMessageType;
|
|
80
82
|
getButtonTextColourForMessageType: typeof getButtonTextColourForMessageType;
|
package/src/View/UIHelper.js
CHANGED
|
@@ -13,6 +13,7 @@ exports.getMessageTypeByStatusColour = getMessageTypeByStatusColour;
|
|
|
13
13
|
exports.getButtonToneByMessageType = getButtonToneByMessageType;
|
|
14
14
|
exports.getGlyphByMessageType = getGlyphByMessageType;
|
|
15
15
|
exports.getColorByMessageType = getColorByMessageType;
|
|
16
|
+
exports.getCSSColorByMessageType = getCSSColorByMessageType;
|
|
16
17
|
exports.getStyleForStatusColour = getStyleForStatusColour;
|
|
17
18
|
exports.getStyleForMessageType = getStyleForMessageType;
|
|
18
19
|
exports.getGlyphForStatusColour = getGlyphForStatusColour;
|
|
@@ -234,6 +235,20 @@ function getColorByMessageType(messageType) {
|
|
|
234
235
|
return 'var(--ab-color-info)';
|
|
235
236
|
}
|
|
236
237
|
}
|
|
238
|
+
function getCSSColorByMessageType(messageType) {
|
|
239
|
+
switch (messageType) {
|
|
240
|
+
case 'Error':
|
|
241
|
+
return 'error';
|
|
242
|
+
case 'Warning':
|
|
243
|
+
return 'warn';
|
|
244
|
+
case 'Success':
|
|
245
|
+
return 'success';
|
|
246
|
+
case 'Info':
|
|
247
|
+
return 'info';
|
|
248
|
+
default:
|
|
249
|
+
return '';
|
|
250
|
+
}
|
|
251
|
+
}
|
|
237
252
|
function getStyleForStatusColour(statusColour) {
|
|
238
253
|
let result;
|
|
239
254
|
switch (statusColour) {
|
|
@@ -481,6 +496,7 @@ exports.UIHelper = {
|
|
|
481
496
|
getGlyphForMessageType,
|
|
482
497
|
getStyleForMessageType,
|
|
483
498
|
getMessageTypeFromAdaptableAlerts,
|
|
499
|
+
getCSSColorByMessageType,
|
|
484
500
|
getButtonColourForAdaptableAlerts,
|
|
485
501
|
getButtonTextColourForArrayandMessageType,
|
|
486
502
|
getButtonTextColourForMessageType,
|
|
@@ -257,10 +257,10 @@ export declare class AdaptableAgGrid implements IAdaptable {
|
|
|
257
257
|
added: IRowNode[];
|
|
258
258
|
updated: IRowNode[];
|
|
259
259
|
}>;
|
|
260
|
-
|
|
260
|
+
manageGridRows(dataRows: {
|
|
261
261
|
add?: any[];
|
|
262
262
|
update?: any[];
|
|
263
|
-
|
|
263
|
+
delete?: any[];
|
|
264
264
|
}, config?: DataUpdateConfig): Promise<{
|
|
265
265
|
addedRows: IRowNode[];
|
|
266
266
|
updatedRows: IRowNode[];
|
|
@@ -2471,18 +2471,18 @@ You need to define at least one Layout!`);
|
|
|
2471
2471
|
});
|
|
2472
2472
|
}
|
|
2473
2473
|
}
|
|
2474
|
-
async
|
|
2474
|
+
async manageGridRows(dataRows, config = {}) {
|
|
2475
2475
|
const result = {
|
|
2476
2476
|
addedRows: [],
|
|
2477
2477
|
updatedRows: [],
|
|
2478
2478
|
removedRows: [],
|
|
2479
2479
|
};
|
|
2480
|
-
if (!
|
|
2480
|
+
if (!dataRows) {
|
|
2481
2481
|
return result;
|
|
2482
2482
|
}
|
|
2483
|
-
const addDataRows =
|
|
2484
|
-
const updateDataRows =
|
|
2485
|
-
const removeDataRows =
|
|
2483
|
+
const addDataRows = dataRows.add;
|
|
2484
|
+
const updateDataRows = dataRows.update;
|
|
2485
|
+
const removeDataRows = dataRows.delete;
|
|
2486
2486
|
if (this.hasAutogeneratedPrimaryKey) {
|
|
2487
2487
|
this.addSyntheticPrimaryKeyIfMissing(addDataRows);
|
|
2488
2488
|
}
|
|
@@ -307,12 +307,10 @@ class AgGridColumnAdapter {
|
|
|
307
307
|
// see #header_text_align
|
|
308
308
|
const formatColumnWithTextAlignment = this.getRelevantFormatColumnHeaderStyles(abColumn)
|
|
309
309
|
// we take the first one only, even if multiple are defined
|
|
310
|
-
.find((fc) => fc.
|
|
310
|
+
.find((fc) => fc.Style?.Alignment != undefined);
|
|
311
311
|
if (formatColumnWithTextAlignment) {
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
`ab-header__align-${formatColumnWithTextAlignment.CellAlignment.toLowerCase()}`,
|
|
315
|
-
];
|
|
312
|
+
const alignment = formatColumnWithTextAlignment.Style.Alignment.toLowerCase();
|
|
313
|
+
baseHeaderClass = [...baseHeaderClass, `ab-header__align-${alignment}`];
|
|
316
314
|
}
|
|
317
315
|
const formatColumns = this.adaptableApi.formatColumnApi.internalApi.getFormatColumnWithStyleClassNameForColumn(abColumn, {
|
|
318
316
|
target,
|
|
@@ -1268,19 +1266,6 @@ class AgGridColumnAdapter {
|
|
|
1268
1266
|
const formatColumnStyle = formatColumn.Style
|
|
1269
1267
|
? (0, StyleHelper_1.convertAdaptableStyleToCSS)(formatColumn.Style)
|
|
1270
1268
|
: {};
|
|
1271
|
-
if (formatColumn.CellAlignment) {
|
|
1272
|
-
switch (formatColumn.CellAlignment) {
|
|
1273
|
-
case 'Left':
|
|
1274
|
-
style.textAlign = 'left';
|
|
1275
|
-
break;
|
|
1276
|
-
case 'Right':
|
|
1277
|
-
style.textAlign = 'right';
|
|
1278
|
-
break;
|
|
1279
|
-
case 'Center':
|
|
1280
|
-
style.textAlign = 'center';
|
|
1281
|
-
break;
|
|
1282
|
-
}
|
|
1283
|
-
}
|
|
1284
1269
|
return { ...style, ...formatColumnStyle };
|
|
1285
1270
|
}, {});
|
|
1286
1271
|
}
|