@adaptabletools/adaptable 11.0.0-canary.2 → 11.0.0-canary.6
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/agGrid.d.ts +1 -1
- package/agGrid.js +3 -3
- package/base.css +138 -68
- package/bundle.cjs.js +131 -127
- package/index.css +140 -68
- package/package.json +33 -33
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableInterfaces/AdaptableNoCodeWizard.d.ts +7 -5
- package/src/AdaptableOptions/AdaptableFrameworkComponent.d.ts +1 -3
- package/src/AdaptableOptions/AdaptableOptions.d.ts +11 -2
- package/src/AdaptableOptions/AlertOptions.d.ts +82 -0
- package/src/AdaptableOptions/AlertOptions.js +2 -0
- package/src/AdaptableOptions/ContainerOptions.d.ts +2 -2
- package/src/AdaptableOptions/EntitlementOptions.d.ts +1 -1
- package/src/AdaptableOptions/FilterOptions.d.ts +1 -1
- package/src/AdaptableOptions/NotificationsOptions.d.ts +1 -78
- package/src/AdaptableOptions/QueryLanguageOptions.d.ts +3 -7
- package/src/AdaptableOptions/StateOptions.d.ts +2 -1
- package/src/AdaptableOptions/TeamSharingOptions.d.ts +2 -2
- package/src/AdaptableOptions/ToolPanelOptions.d.ts +0 -3
- package/src/AdaptableOptions/UserInterfaceOptions.d.ts +3 -3
- package/src/Api/AdaptableApi.d.ts +6 -0
- package/src/Api/AlertApi.d.ts +2 -3
- package/src/Api/ColumnApi.d.ts +0 -4
- package/src/Api/EventApi.d.ts +8 -3
- package/src/Api/Events/GridDataChanged.d.ts +4 -2
- package/src/Api/Events/SystemStatusMessageDisplayed.d.ts +1 -1
- package/src/Api/FreeTextColumnApi.d.ts +0 -12
- package/src/Api/GridApi.d.ts +5 -4
- package/src/Api/IPushPullApi.d.ts +1 -1
- package/src/Api/Implementation/AdaptableApiImpl.d.ts +2 -1
- package/src/Api/Implementation/AdaptableApiImpl.js +2 -0
- package/src/Api/Implementation/AlertApiImpl.d.ts +1 -2
- package/src/Api/Implementation/AlertApiImpl.js +19 -10
- package/src/Api/Implementation/ApiBase.d.ts +2 -0
- package/src/Api/Implementation/ApiBase.js +3 -0
- package/src/Api/Implementation/ColumnApiImpl.d.ts +0 -1
- package/src/Api/Implementation/ColumnApiImpl.js +0 -5
- package/src/Api/Implementation/DashboardApiImpl.js +1 -1
- package/src/Api/Implementation/FlashingCellApiImpl.js +2 -4
- package/src/Api/Implementation/FreeTextColumnApiImpl.d.ts +0 -5
- package/src/Api/Implementation/FreeTextColumnApiImpl.js +0 -9
- package/src/Api/Implementation/GridApiImpl.d.ts +5 -4
- package/src/Api/Implementation/GridApiImpl.js +4 -0
- package/src/Api/Implementation/InternalApiImpl.js +2 -2
- package/src/Api/Implementation/LayoutApiImpl.d.ts +2 -0
- package/src/Api/Implementation/LayoutApiImpl.js +12 -1
- package/src/Api/Implementation/QueryApiImpl.js +4 -1
- package/src/Api/Implementation/QueryLanguageApiImpl.d.ts +1 -1
- package/src/Api/Implementation/QueryLanguageApiImpl.js +6 -7
- package/src/Api/Implementation/SettingsPanelApiImpl.d.ts +7 -0
- package/src/Api/Implementation/SettingsPanelApiImpl.js +15 -0
- package/src/Api/LayoutApi.d.ts +7 -0
- package/src/Api/OpenFinApi.d.ts +5 -0
- package/src/Api/PluginsApi.d.ts +29 -0
- package/src/Api/QueryLanguageApi.d.ts +10 -10
- package/src/Api/SettingsPanelApi.d.ts +17 -0
- package/src/Api/SettingsPanelApi.js +2 -0
- package/src/Api/UserInterfaceApi.d.ts +5 -2
- package/src/PredefinedConfig/AlertState.d.ts +4 -6
- package/src/PredefinedConfig/CalculatedColumnState.d.ts +0 -1
- package/src/PredefinedConfig/Common/AdaptableQuery.d.ts +7 -4
- package/src/PredefinedConfig/Common/AdaptableQuery.js +3 -3
- package/src/PredefinedConfig/Common/CellHighlightInfo.d.ts +1 -12
- package/src/PredefinedConfig/Common/DataChangedInfo.d.ts +1 -1
- package/src/PredefinedConfig/Common/Enums.d.ts +0 -1
- package/src/PredefinedConfig/Common/Enums.js +0 -2
- package/src/PredefinedConfig/Common/FDC3Context.d.ts +4 -12
- package/src/PredefinedConfig/Common/RowHighlightInfo.d.ts +15 -0
- package/src/PredefinedConfig/Common/RowHighlightInfo.js +2 -0
- package/src/PredefinedConfig/Common/Types.d.ts +1 -1
- package/src/PredefinedConfig/CustomSortState.d.ts +0 -1
- package/src/PredefinedConfig/FlashingCellState.d.ts +5 -2
- package/src/PredefinedConfig/FreeTextColumnState.d.ts +1 -1
- package/src/PredefinedConfig/LayoutState.d.ts +0 -2
- package/src/PredefinedConfig/PredefinedConfig.d.ts +5 -2
- package/src/PredefinedConfig/SystemState.d.ts +2 -1
- package/src/Redux/ActionsReducers/ApplicationRedux.js +9 -3
- package/src/Redux/ActionsReducers/FlashingCellRedux.js +4 -8
- package/src/Redux/ActionsReducers/GridRedux.js +3 -1
- package/src/Redux/ActionsReducers/PopupRedux.js +13 -3
- package/src/Redux/ActionsReducers/QuickSearchRedux.js +3 -1
- package/src/Redux/ActionsReducers/SystemRedux.d.ts +6 -5
- package/src/Redux/ActionsReducers/SystemRedux.js +16 -14
- package/src/Redux/ActionsReducers/ThemeRedux.js +3 -1
- package/src/Redux/Store/AdaptableReduxLocalStorageEngine.js +1 -1
- package/src/Redux/Store/AdaptableReduxMerger.js +5 -5
- package/src/Redux/Store/AdaptableStore.js +18 -6
- package/src/Strategy/AlertModule.js +14 -4
- package/src/Strategy/ConditionalStyleModule.js +4 -0
- package/src/Strategy/DataChangeHistoryModule.js +1 -1
- package/src/Strategy/FlashingCellModule.d.ts +1 -1
- package/src/Strategy/FlashingCellModule.js +34 -18
- package/src/Strategy/FreeTextColumnModule.d.ts +2 -2
- package/src/Strategy/FreeTextColumnModule.js +10 -0
- package/src/Strategy/LayoutModule.js +1 -6
- package/src/Strategy/TeamSharingModule.js +1 -1
- package/src/Strategy/ToolPanelModule.js +5 -3
- package/src/Strategy/Utilities/getFlashingTargetViewItems.d.ts +1 -1
- package/src/Strategy/Utilities/getFlashingTargetViewItems.js +3 -1
- package/src/Strategy/Utilities/getFormatColumnSettingsViewItems.js +1 -1
- package/src/Strategy/Utilities/getRuleViewItems.d.ts +0 -1
- package/src/Strategy/Utilities/getRuleViewItems.js +0 -1
- package/src/Utilities/Defaults/DefaultAdaptableOptions.js +8 -6
- package/src/Utilities/ExpressionFunctions/{aggregationExpressionFunctions.d.ts → aggregatedBooleanExpressionFunctions.d.ts} +1 -1
- package/src/Utilities/ExpressionFunctions/{aggregationExpressionFunctions.js → aggregatedBooleanExpressionFunctions.js} +4 -4
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.d.ts +7 -0
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +42 -0
- package/src/Utilities/ExpressionFunctions/dateUtils.d.ts +1 -0
- package/src/Utilities/ExpressionFunctions/dateUtils.js +13 -0
- package/src/Utilities/ExpressionFunctions/deepMap.d.ts +35 -0
- package/src/Utilities/ExpressionFunctions/deepMap.js +283 -0
- package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.js +1 -1
- package/src/Utilities/ExpressionFunctions/groupingMap.d.ts +36 -0
- package/src/Utilities/ExpressionFunctions/groupingMap.js +104 -0
- package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +2 -3
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +13 -4
- package/src/Utilities/Extensions/StringExtensions.js +1 -1
- package/src/Utilities/Helpers/AdaptableHelper.js +3 -2
- package/src/Utilities/Helpers/CalendarHelper.js +220 -55
- package/src/Utilities/Interface/MessagePopups.d.ts +6 -2
- package/src/Utilities/ObjectFactory.js +5 -2
- package/src/Utilities/Services/AlertService.js +3 -3
- package/src/Utilities/Services/DataService.js +6 -1
- package/src/Utilities/Services/Interface/IQueryLanguageService.d.ts +2 -2
- package/src/Utilities/Services/LicenseService.js +1 -1
- package/src/Utilities/Services/QueryLanguageService.d.ts +2 -2
- package/src/Utilities/Services/QueryLanguageService.js +21 -16
- package/src/Utilities/Services/ReportService.js +7 -3
- package/src/Utilities/Services/TeamSharingService.js +5 -3
- package/src/View/AdaptablePopover/index.js +6 -1
- package/src/View/AdaptableView.js +1 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ColumnsList.js +5 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationForm.js +5 -2
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/index.js +4 -1
- package/src/View/AdaptableWizardView/helper.js +5 -3
- package/src/View/Alert/Wizard/AlertButtonsEditor.d.ts +1 -1
- package/src/View/Alert/Wizard/AlertButtonsEditor.js +5 -1
- package/src/View/Alert/Wizard/AlertRulesWizardSection.d.ts +1 -1
- package/src/View/Alert/Wizard/AlertWizard.js +2 -2
- package/src/View/Alert/Wizard/BaseAlertRulesWizardSection.d.ts +2 -3
- package/src/View/Alert/Wizard/BaseAlertRulesWizardSection.js +3 -5
- package/src/View/Alert/Wizard/BaseAlertScopeWizardSection.js +3 -2
- package/src/View/Alert/Wizard/isValidAlertRules.js +3 -3
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.js +17 -6
- package/src/View/CellSummary/CellSummaryViewPanel.js +1 -2
- package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +5 -2
- package/src/View/Components/EntityRulesEditor/index.js +9 -9
- package/src/View/Components/FilterForm/FilterForm.js +0 -2
- package/src/View/Components/FilterForm/QuickFilterForm.js +8 -7
- package/src/View/Components/FilterForm/getDefaultColumnFilterPredicate.d.ts +1 -1
- package/src/View/Components/ModuleValueSelector/index.js +1 -1
- package/src/View/Components/Panels/PanelWithImage.d.ts +1 -1
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopup.d.ts +0 -3
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopup.js +45 -87
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupDialog.d.ts +11 -0
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupDialog.js +78 -0
- 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.d.ts +1 -3
- package/src/View/Components/Popups/AdaptablePopup/Navigation.js +5 -13
- package/src/View/Components/Popups/AdaptablePopup/TopBar.js +5 -4
- package/src/View/Components/Popups/AdaptablePopup/useMenuItems.d.ts +2 -0
- package/src/View/Components/Popups/AdaptablePopup/useMenuItems.js +44 -0
- package/src/View/Components/Popups/AdaptablePopupConfirmation.js +3 -1
- package/src/View/Components/Popups/AdaptablePopupPrompt.d.ts +5 -12
- package/src/View/Components/Popups/AdaptablePopupPrompt.js +38 -37
- package/src/View/Components/Popups/AdaptablePopupTeamSharing.js +4 -1
- package/src/View/Components/ScopeComponent.js +4 -1
- package/src/View/Components/SharedProps/ModuleViewPopupProps.d.ts +1 -1
- package/src/View/Components/ToolPanel/AdaptableToolPanel.js +1 -1
- package/src/View/Components/ToolPanel/CustomToolPanelContent.js +6 -2
- package/src/View/Components/ToolPanel/ToolPanelPopup.js +7 -5
- package/src/View/Components/ToolPanel/ToolPanelWrapper.js +1 -1
- package/src/View/Components/ValueSelector/index.d.ts +2 -1
- package/src/View/Components/ValueSelector/index.js +5 -5
- package/src/View/ConditionalStyle/Wizard/ConditionalStyleRuleWizardSection.js +2 -2
- package/src/View/ConditionalStyle/Wizard/ConditionalStyleSettingsWizardSettings.d.ts +8 -0
- package/src/View/ConditionalStyle/Wizard/ConditionalStyleSettingsWizardSettings.js +27 -0
- package/src/View/ConditionalStyle/Wizard/ConditionalStyleWizard.js +17 -5
- package/src/View/CustomSort/Wizard/CustomSortValuesWizardSection.js +3 -1
- package/src/View/CustomSort/Wizard/CustomSortWizard.js +17 -5
- package/src/View/Dashboard/CustomToolbarWrapper.js +5 -1
- package/src/View/Dashboard/Dashboard.js +5 -5
- package/src/View/Dashboard/DashboardPopup.js +8 -6
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +2 -1
- package/src/View/Export/Wizard/NewReportWizard.js +13 -3
- package/src/View/Export/Wizard/ReportColumnTypeWizard.js +3 -1
- package/src/View/Export/Wizard/ReportRowTypeWizard.js +3 -1
- package/src/View/Filter/FilterViewPanel.d.ts +1 -4
- package/src/View/Filter/FilterViewPanel.js +1 -3
- package/src/View/FlashingCell/Wizard/FlashingCellRulesWizardSection.js +17 -26
- package/src/View/FlashingCell/Wizard/FlashingCellScopeWizardSection.js +19 -2
- package/src/View/FlashingCell/Wizard/FlashingCellSettingsWizardSection.js +20 -5
- package/src/View/FlashingCell/Wizard/FlashingCellWizard.js +2 -2
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +2 -2
- package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +11 -6
- package/src/View/FreeTextColumn/FreeTextColumnSummary.js +1 -2
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnWizard.js +12 -5
- package/src/View/GridInfo/AdaptableOptionsComponent.js +4 -1
- package/src/View/Layout/Wizard/LayoutEditor/index.js +5 -1
- package/src/View/Layout/Wizard/LayoutEditorWizard.js +7 -1
- package/src/View/PlusMinus/Wizard/PlusMinusWizard.js +8 -2
- package/src/View/Query/ExpandedQueryPopup.js +9 -2
- package/src/View/Query/QueryViewPanel.js +15 -10
- package/src/View/Query/Wizard/NamedQueryWizard.js +6 -4
- package/src/View/QuickSearch/QuickSearchPopup.js +3 -3
- package/src/View/QuickSearch/useQuickSearchDebounced.js +1 -1
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsSummary.js +12 -2
- package/src/View/Schedule/Wizard/ScheduleWizard.js +14 -14
- package/src/View/SpecialColumnSettingsWizardStep.js +1 -1
- package/src/View/UIHelper.js +4 -1
- package/src/View/Wizard/AdaptableWizard.js +13 -4
- package/src/View/Wizard/Interface/IAdaptableWizard.d.ts +2 -0
- package/src/View/Wizard/OnePageAdaptableWizard.js +6 -2
- package/src/agGrid/Adaptable.d.ts +2 -5
- package/src/agGrid/Adaptable.js +127 -75
- package/src/agGrid/agGridHelper.js +3 -8
- package/src/agGrid/agGridMenuHelper.js +5 -9
- package/src/agGrid/editors/AdaptableDateEditor/index.js +1 -1
- package/src/agGrid/editors/AdaptableNumberEditor/index.js +1 -1
- package/src/components/ApplicationIcon.d.ts +1 -0
- package/src/components/ApplicationIcon.js +2 -2
- package/src/components/Dashboard/Dashboard.js +4 -1
- package/src/components/Dashboard/DashboardManager.d.ts +5 -3
- package/src/components/Dashboard/DashboardManager.js +33 -27
- package/src/components/Dropdown/index.js +8 -1
- package/src/components/DropdownButton/renderItem.js +1 -1
- package/src/components/ExpressionEditor/EditorInputReactive.d.ts +1 -1
- package/src/components/ExpressionEditor/EditorInputReactive.js +4 -2
- package/src/components/ExpressionEditor/ExpressionFunctionDocumentation.js +4 -1
- package/src/components/ExpressionEditor/index.d.ts +1 -1
- package/src/components/ExpressionEditor/index.js +12 -5
- package/src/components/FormLayout/index.js +1 -1
- package/src/components/OverlayTrigger/Overlay.js +1 -1
- package/src/components/SizedContainer/index.js +7 -1
- package/src/components/WindowModal/WindowModal.js +4 -1
- package/src/metamodel/adaptable.metamodel.d.ts +75 -24
- package/src/metamodel/adaptable.metamodel.js +223 -115
- package/src/types.d.ts +6 -3
- package/themes/dark.css +4 -4
- package/version.d.ts +1 -1
- package/version.js +1 -1
|
@@ -9,6 +9,7 @@ const Input_1 = tslib_1.__importDefault(require("../../../components/Input"));
|
|
|
9
9
|
const rebass_1 = require("rebass");
|
|
10
10
|
const DefaultAdaptableOptions_1 = require("../../../Utilities/Defaults/DefaultAdaptableOptions");
|
|
11
11
|
const ConfigurationForm = (props) => {
|
|
12
|
+
var _a;
|
|
12
13
|
let abOptions = props.adaptableOptions;
|
|
13
14
|
const layoutOptions = Object.assign(Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.layoutOptions), abOptions.layoutOptions);
|
|
14
15
|
const generalOptions = Object.assign(Object.assign({}, DefaultAdaptableOptions_1.DefaultAdaptableOptions.generalOptions), abOptions.generalOptions);
|
|
@@ -37,10 +38,12 @@ const ConfigurationForm = (props) => {
|
|
|
37
38
|
props.onChangeadaptableOptions(abOptions);
|
|
38
39
|
} })),
|
|
39
40
|
React.createElement(FormLayout_1.FormRow, { label: "Show Quick Filter" },
|
|
40
|
-
React.createElement(CheckBox_1.CheckBox, { checked: gridOptions.floatingFilter, onChange: (floatingFilter) => {
|
|
41
|
+
React.createElement(CheckBox_1.CheckBox, { checked: (_a = gridOptions.defaultColDef) === null || _a === void 0 ? void 0 : _a.floatingFilter, onChange: (floatingFilter) => {
|
|
41
42
|
abOptions = Object.assign({}, abOptions);
|
|
42
43
|
abOptions.gridOptions = Object.assign({}, abOptions.gridOptions);
|
|
43
|
-
abOptions.gridOptions.
|
|
44
|
+
abOptions.gridOptions.defaultColDef = {
|
|
45
|
+
floatingFilter,
|
|
46
|
+
};
|
|
44
47
|
props.onChangeadaptableOptions(abOptions);
|
|
45
48
|
} })),
|
|
46
49
|
React.createElement(FormLayout_1.FormRow, { label: "Suppress Column Virtualisation" },
|
|
@@ -43,7 +43,10 @@ const ConfigurationDialog = (props) => {
|
|
|
43
43
|
setCurrentStep(1);
|
|
44
44
|
};
|
|
45
45
|
const stepOne = (React.createElement(React.Fragment, null,
|
|
46
|
-
React.createElement(Panel_1.default, { header: 'Configure AdapTable', border: "none", bodyScroll: false, bodyProps: {
|
|
46
|
+
React.createElement(Panel_1.default, { header: 'Configure AdapTable', border: "none", bodyScroll: false, bodyProps: {
|
|
47
|
+
padding: 0,
|
|
48
|
+
style: { overflow: 'auto', display: 'flex', flexFlow: 'column' },
|
|
49
|
+
}, borderRadius: "none", style: { fontSize: 16, flex: 1 } },
|
|
47
50
|
React.createElement(Panel_1.default, { border: "none" },
|
|
48
51
|
React.createElement(FormLayout_1.default, null,
|
|
49
52
|
React.createElement(FormLayout_1.FormRow, { label: "AdaptableId" },
|
|
@@ -51,7 +51,7 @@ const typeToColType = {
|
|
|
51
51
|
boolean: 'abColDefBoolean',
|
|
52
52
|
date: 'abColDefDate',
|
|
53
53
|
};
|
|
54
|
-
const
|
|
54
|
+
const abColDefCustom = 'abColDefCustom';
|
|
55
55
|
exports.getColTypeFromValue = (value) => {
|
|
56
56
|
const dataType = typeof value;
|
|
57
57
|
let columnType = typeToColType[dataType] || typeToColType.string;
|
|
@@ -59,7 +59,7 @@ exports.getColTypeFromValue = (value) => {
|
|
|
59
59
|
columnType = typeToColType.date;
|
|
60
60
|
}
|
|
61
61
|
if (Array.isArray(value) && value.length && typeof value[0] === 'number') {
|
|
62
|
-
columnType =
|
|
62
|
+
columnType = abColDefCustom;
|
|
63
63
|
}
|
|
64
64
|
return columnType;
|
|
65
65
|
};
|
|
@@ -80,9 +80,11 @@ exports.prepareGridOptions = (dataSourceInfo) => {
|
|
|
80
80
|
};
|
|
81
81
|
});
|
|
82
82
|
const gridOptions = {
|
|
83
|
+
defaultColDef: {
|
|
84
|
+
floatingFilter: true,
|
|
85
|
+
},
|
|
83
86
|
rowData: dataSourceInfo.data,
|
|
84
87
|
columnDefs,
|
|
85
|
-
floatingFilter: true,
|
|
86
88
|
enableRangeSelection: true,
|
|
87
89
|
rowSelection: 'multiple',
|
|
88
90
|
rowHeight: 30,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { AlertButton } from '../../../PredefinedConfig/AlertState';
|
|
3
3
|
import { AdaptableAlert } from '../../../PredefinedConfig/Common/AdaptableAlert';
|
|
4
4
|
import { AdaptableApi } from '../../../Api/AdaptableApi';
|
|
5
|
-
import { AlertButtonContext } from '../../../
|
|
5
|
+
import { AlertButtonContext } from '../../../types';
|
|
6
6
|
declare type AlertButtonsEditorProps = {
|
|
7
7
|
AlertButtons: AlertButton<AlertButtonContext>[];
|
|
8
8
|
onChange: (buttons: AlertButton<AlertButtonContext>[]) => void;
|
|
@@ -94,7 +94,11 @@ exports.AlertButtonsEditor = (props) => {
|
|
|
94
94
|
' ',
|
|
95
95
|
StringExtensions_1.default.CapitaliseFirstLetter((_a = buttonStyle === null || buttonStyle === void 0 ? void 0 : buttonStyle.variant) !== null && _a !== void 0 ? _a : 'raised'))),
|
|
96
96
|
React.createElement(DropdownButton_1.default, { columns: ['label'], marginLeft: 2, style: { minWidth: 120 }, items: [
|
|
97
|
-
{
|
|
97
|
+
{
|
|
98
|
+
label: 'Use Alert Tone',
|
|
99
|
+
value: 'text',
|
|
100
|
+
onClick: () => setTone(null),
|
|
101
|
+
},
|
|
98
102
|
...['success', 'info', 'error', 'warning', 'accent', 'neutral'].map((tone) => {
|
|
99
103
|
return {
|
|
100
104
|
label: StringExtensions_1.default.CapitaliseFirstLetter(tone),
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { AlertDefinition } from '../../../PredefinedConfig/AlertState';
|
|
3
3
|
declare type AlertRulesWizardSectionProps = {
|
|
4
4
|
onChange: (data: AlertDefinition) => void;
|
|
5
|
-
module: 'alert'
|
|
5
|
+
module: 'alert';
|
|
6
6
|
};
|
|
7
7
|
export declare const AlertRulesWizardSection: (props: AlertRulesWizardSectionProps) => JSX.Element;
|
|
8
8
|
export declare const renderAlertRulesSummary: (alertDefinition: AlertDefinition) => JSX.Element;
|
|
@@ -26,7 +26,7 @@ exports.AlertWizard = (props) => {
|
|
|
26
26
|
: ObjectFactory_1.default.CreateEmptyAlertDefinition();
|
|
27
27
|
if (!alertDefinition.Rule.BooleanExpression &&
|
|
28
28
|
!alertDefinition.Rule.ObservableExpression &&
|
|
29
|
-
!alertDefinition.Rule.
|
|
29
|
+
!alertDefinition.Rule.AggregatedBooleanExpression &&
|
|
30
30
|
!alertDefinition.Rule.Predicate) {
|
|
31
31
|
alertDefinition.Rule.BooleanExpression = '';
|
|
32
32
|
}
|
|
@@ -72,7 +72,7 @@ exports.AlertWizard = (props) => {
|
|
|
72
72
|
title: 'Type & Display',
|
|
73
73
|
},
|
|
74
74
|
{
|
|
75
|
-
details: 'Configure
|
|
75
|
+
details: 'Configure Behaviour for the Alert',
|
|
76
76
|
title: 'Behaviour',
|
|
77
77
|
render: () => (React.createElement(rebass_1.Box, { padding: 2 },
|
|
78
78
|
React.createElement(AlertBehaviourWizardSection_1.AlertBehaviourWizardSection, { onChange: setAlertDefinition }))),
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { AlertDefinition } from '../../../types';
|
|
3
|
-
import { FlashingCellDefinition } from '../../../../types';
|
|
4
3
|
export interface BaseAlertRulesWizardSectionProps<T> {
|
|
5
4
|
onChange: (data: T) => void;
|
|
6
|
-
module: 'alert'
|
|
5
|
+
module: 'alert';
|
|
7
6
|
wholeRowScope?: boolean;
|
|
8
7
|
children?: React.ReactNode;
|
|
9
8
|
}
|
|
10
|
-
export declare const BaseAlertRulesWizardSection: <T extends AlertDefinition
|
|
9
|
+
export declare const BaseAlertRulesWizardSection: <T extends AlertDefinition>(props: BaseAlertRulesWizardSectionProps<T>) => JSX.Element;
|
|
@@ -8,9 +8,7 @@ const EntityRulesEditor_1 = require("../../Components/EntityRulesEditor");
|
|
|
8
8
|
exports.BaseAlertRulesWizardSection = (props) => {
|
|
9
9
|
const { data, api, moduleInfo } = OnePageAdaptableWizard_1.useOnePageWizardContext();
|
|
10
10
|
const wholeRowScope = props.wholeRowScope != null ? props.wholeRowScope : api.scopeApi.scopeIsAll(data.Scope);
|
|
11
|
-
const predicateDefs =
|
|
12
|
-
? api.alertApi.getAlertPredicateDefsForScope(data.Scope)
|
|
13
|
-
: api.flashingCellApi.getFlashingCellPredicateDefsForScope(data.Scope);
|
|
11
|
+
const predicateDefs = api.alertApi.getAlertPredicateDefsForScope(data.Scope);
|
|
14
12
|
return (React.createElement(EntityRulesEditor_1.EntityRulesEditor, { module: moduleInfo.ModuleName, defaultPredicateId: "Any", data: data, predicateDefs: predicateDefs, onChange: props.onChange, showAggregation: !wholeRowScope ? false : true, showObservable: !wholeRowScope ? false : true, showBoolean: true, showPredicate: true, descriptions: {
|
|
15
13
|
selectPredicate: 'Select an Alert Rule - to be applied when data changes',
|
|
16
14
|
useBooleanQuery: (React.createElement(React.Fragment, null,
|
|
@@ -22,8 +20,8 @@ exports.BaseAlertRulesWizardSection = (props) => {
|
|
|
22
20
|
React.createElement("i", null, "Scope"),
|
|
23
21
|
" is 'Whole Row' - so any data change may be evaluated in a complex ObservableExpression")),
|
|
24
22
|
useAggregationQuery: (React.createElement(React.Fragment, null,
|
|
25
|
-
"Use an
|
|
23
|
+
"Use an AggregatedBooleanQuery if ",
|
|
26
24
|
React.createElement("i", null, "Scope"),
|
|
27
|
-
" is 'Whole Row' - so any data change may be evaluated in a complex
|
|
25
|
+
" is 'Whole Row' - so any data change may be evaluated in a complex AggregatedBooleanExpression")),
|
|
28
26
|
} }));
|
|
29
27
|
};
|
|
@@ -29,11 +29,12 @@ exports.BaseAlertScopeWizardSection = (props) => {
|
|
|
29
29
|
delete newData.Rule.ObservableExpression;
|
|
30
30
|
newData.Rule.BooleanExpression = '';
|
|
31
31
|
}
|
|
32
|
-
if (newData.Rule.
|
|
32
|
+
if (newData.Rule.AggregatedBooleanExpression !== undefined &&
|
|
33
|
+
!api.scopeApi.scopeIsAll(Scope)) {
|
|
33
34
|
// if it had aggregation expression and the scope is changed to partial
|
|
34
35
|
// we need to reset to not be an aggregation expression, as aggregation is not supported
|
|
35
36
|
// for partial scope
|
|
36
|
-
delete newData.Rule.
|
|
37
|
+
delete newData.Rule.AggregatedBooleanExpression;
|
|
37
38
|
newData.Rule.BooleanExpression = '';
|
|
38
39
|
}
|
|
39
40
|
props.onChange(newData);
|
|
@@ -7,7 +7,7 @@ exports.isValidAlertRules = (alert, api, context) => {
|
|
|
7
7
|
if (!alert.Rule.Predicate &&
|
|
8
8
|
!alert.Rule.BooleanExpression &&
|
|
9
9
|
!alert.Rule.ObservableExpression &&
|
|
10
|
-
!alert.Rule.
|
|
10
|
+
!alert.Rule.AggregatedBooleanExpression) {
|
|
11
11
|
return 'No condition defined for alert';
|
|
12
12
|
}
|
|
13
13
|
if (valid && alert.Rule.Predicate) {
|
|
@@ -35,8 +35,8 @@ exports.isValidAlertRules = (alert, api, context) => {
|
|
|
35
35
|
return 'The query is not a valid observable query';
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
|
-
if (valid && alert.Rule.
|
|
39
|
-
valid = api.queryLanguageApi.
|
|
38
|
+
if (valid && alert.Rule.AggregatedBooleanExpression) {
|
|
39
|
+
valid = api.queryLanguageApi.isValidAggregatedBooleanExpression(alert.Rule.AggregatedBooleanExpression, ModuleConstants_1.AlertModuleId);
|
|
40
40
|
if (!valid) {
|
|
41
41
|
return 'The query is not a valid aggregation query';
|
|
42
42
|
}
|
|
@@ -14,15 +14,26 @@ const ObjectFactory_1 = tslib_1.__importDefault(require("../../../Utilities/Obje
|
|
|
14
14
|
const react_redux_1 = require("react-redux");
|
|
15
15
|
const CalculatedColumnRedux = tslib_1.__importStar(require("../../../Redux/ActionsReducers/CalculatedColumnRedux"));
|
|
16
16
|
exports.CalculatedColumnWizard = (props) => {
|
|
17
|
+
var _a;
|
|
17
18
|
const adaptable = AdaptableContext_1.useAdaptable();
|
|
19
|
+
const allCalculatedColumns = react_redux_1.useSelector((state) => state.CalculatedColumn.CalculatedColumns);
|
|
18
20
|
const [calculatedColumn, setCalculatedColumn] = react_1.useState(() => {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
+
var _a;
|
|
22
|
+
if (props.data) {
|
|
23
|
+
return Helper_1.cloneObject(props.data);
|
|
24
|
+
}
|
|
25
|
+
if ((_a = props.popupParams) === null || _a === void 0 ? void 0 : _a.column) {
|
|
26
|
+
const calculatedColumn = allCalculatedColumns.find((calculatedColumn) => calculatedColumn.ColumnId === props.popupParams.column.columnId);
|
|
27
|
+
if (calculatedColumn) {
|
|
28
|
+
return calculatedColumn;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return ObjectFactory_1.default.CreateEmptyCalculatedColumn(adaptable.api.internalApi.getAdaptableOptions().filterOptions.enableFilterOnSpecialColumns);
|
|
21
32
|
});
|
|
22
33
|
const dispatch = react_redux_1.useDispatch();
|
|
23
|
-
const isEdit = Boolean(props.data);
|
|
34
|
+
const isEdit = Boolean(props.data) || ((_a = props.popupParams) === null || _a === void 0 ? void 0 : _a.action) === 'Edit';
|
|
24
35
|
const handleFinish = () => {
|
|
25
|
-
if (
|
|
36
|
+
if (isEdit) {
|
|
26
37
|
dispatch(CalculatedColumnRedux.CalculatedColumnEdit(calculatedColumn));
|
|
27
38
|
}
|
|
28
39
|
else {
|
|
@@ -33,7 +44,7 @@ exports.CalculatedColumnWizard = (props) => {
|
|
|
33
44
|
return (React.createElement(OnePageAdaptableWizard_1.OnePageAdaptableWizard, { defaultCurrentSectionName: props.defaultCurrentSectionName, moduleInfo: props.moduleInfo, data: calculatedColumn, onHide: props.onCloseWizard, onFinish: handleFinish, sections: [
|
|
34
45
|
{
|
|
35
46
|
title: 'Expression',
|
|
36
|
-
details: 'Specify the
|
|
47
|
+
details: 'Specify the Calculated Column Expression',
|
|
37
48
|
isValid: CalculatedColumnExpressionWizardSection_1.isValidCalculatedColumnExpression,
|
|
38
49
|
renderSummary: CalculatedColumnExpressionWizardSection_1.renderCalculatedColumnExpressionSummary,
|
|
39
50
|
render: () => {
|
|
@@ -42,7 +53,7 @@ exports.CalculatedColumnWizard = (props) => {
|
|
|
42
53
|
},
|
|
43
54
|
{
|
|
44
55
|
title: 'Settings',
|
|
45
|
-
details: 'Specify
|
|
56
|
+
details: 'Specify Column details and properties',
|
|
46
57
|
isValid: CalculatedColumnSettingsWizardSection_1.isValidCalculatedColumnSettings,
|
|
47
58
|
renderSummary: CalculatedColumnSettingsWizardSection_1.renderCalculatedColumnSettingsSummary,
|
|
48
59
|
render: () => {
|
|
@@ -38,8 +38,7 @@ class CellSummaryViewPanelComponent extends React.Component {
|
|
|
38
38
|
onClick: () => this.props.onCellSummaryOperationChange(summaryOperation),
|
|
39
39
|
};
|
|
40
40
|
});
|
|
41
|
-
const cellSummaryOperationDefinitions = this.props.api.internalApi.getAdaptableOptions()
|
|
42
|
-
.generalOptions.cellSummaryOperations;
|
|
41
|
+
const cellSummaryOperationDefinitions = this.props.api.internalApi.getAdaptableOptions().generalOptions.cellSummaryOperations;
|
|
43
42
|
const operationDefinitions = ArrayExtensions_1.default.IsNullOrEmpty(cellSummaryOperationDefinitions)
|
|
44
43
|
? []
|
|
45
44
|
: cellSummaryOperationDefinitions.map((operationDefinition) => {
|
|
@@ -45,13 +45,16 @@ exports.AdaptableObjectListItem = (props) => {
|
|
|
45
45
|
};
|
|
46
46
|
const hasSuspend = Boolean(viewOptions.getSuspendAction);
|
|
47
47
|
const actions = (_e = (_d = viewOptions === null || viewOptions === void 0 ? void 0 : viewOptions.actions) === null || _d === void 0 ? void 0 : _d.map) === null || _e === void 0 ? void 0 : _e.call(_d, (component, index) => {
|
|
48
|
-
return React.createElement(component, {
|
|
48
|
+
return React.createElement(component, {
|
|
49
|
+
data: props.data.abObject,
|
|
50
|
+
key: index,
|
|
51
|
+
});
|
|
49
52
|
});
|
|
50
53
|
const iconSize = 26;
|
|
51
54
|
return (React.createElement(rebass_1.Flex, { as: "li", mb: 3, className: itemClassName },
|
|
52
55
|
React.createElement(rebass_1.Box, { flex: 1, className: `${baseClassName}__rows` }, (_f = props.data.items) === null || _f === void 0 ? void 0 : _f.map((tag, index) => {
|
|
53
56
|
var _a;
|
|
54
|
-
return (React.createElement(rebass_1.Flex, { key: index, mb: 2, className: `${baseClassName}__row` },
|
|
57
|
+
return (React.createElement(rebass_1.Flex, { "data-name": tag.name, key: index, mb: 2, className: `${baseClassName}__row` },
|
|
55
58
|
React.createElement(rebass_1.Box, { className: `${baseClassName}__label`, mr: 3 },
|
|
56
59
|
tag.label || tag.name,
|
|
57
60
|
EditWizard && (React.createElement(SimpleButton_1.default, { accessLevel: accessLevel, className: `${baseClassName}__edit-property`, ml: 1, icon: "edit", tooltip: "edit", iconSize: 18, variant: "text", onClick: () => {
|
|
@@ -56,8 +56,8 @@ exports.EntityRulesEditor = (props) => {
|
|
|
56
56
|
? 'BooleanExpression'
|
|
57
57
|
: data.Rule.ObservableExpression != undefined && showObservable
|
|
58
58
|
? 'ObservableExpression'
|
|
59
|
-
: data.Rule.
|
|
60
|
-
? '
|
|
59
|
+
: data.Rule.AggregatedBooleanExpression != undefined && showAggregation
|
|
60
|
+
? 'AggregatedBooleanExpression'
|
|
61
61
|
: 'Predicate';
|
|
62
62
|
const [selectedTab, setSelectedTab] = React.useState(type);
|
|
63
63
|
const setType = (type) => {
|
|
@@ -72,9 +72,9 @@ exports.EntityRulesEditor = (props) => {
|
|
|
72
72
|
ObservableExpression: '',
|
|
73
73
|
} }));
|
|
74
74
|
}
|
|
75
|
-
else if (type === '
|
|
75
|
+
else if (type === 'AggregatedBooleanExpression' && showAggregation) {
|
|
76
76
|
props.onChange(Object.assign(Object.assign({}, data), { Rule: {
|
|
77
|
-
|
|
77
|
+
AggregatedBooleanExpression: '',
|
|
78
78
|
} }));
|
|
79
79
|
}
|
|
80
80
|
else {
|
|
@@ -127,7 +127,7 @@ exports.EntityRulesEditor = (props) => {
|
|
|
127
127
|
props.onChange(Object.assign(Object.assign({}, data), { Rule: { ObservableExpression: expression } }));
|
|
128
128
|
};
|
|
129
129
|
const setAggregationExpression = (expression) => {
|
|
130
|
-
props.onChange(Object.assign(Object.assign({}, data), { Rule: {
|
|
130
|
+
props.onChange(Object.assign(Object.assign({}, data), { Rule: { AggregatedBooleanExpression: expression } }));
|
|
131
131
|
};
|
|
132
132
|
const initialData = api.internalApi.getQueryPreviewData();
|
|
133
133
|
const showDocumentationLinks = api.internalApi.isDocumentationLinksDisplayed();
|
|
@@ -162,13 +162,13 @@ exports.EntityRulesEditor = (props) => {
|
|
|
162
162
|
background: 'var(--ab-color-action-add)',
|
|
163
163
|
}, onClick: () => window.open(DocumentationLinkConstants_1.PredicateDocsLink, '_blank') }),
|
|
164
164
|
"See Predicate documentation for more details and examples")))) : null,
|
|
165
|
-
showBoolean ?
|
|
165
|
+
showBoolean ? React.createElement(QueryTab, { value: "BooleanExpression", type: type, label: "Boolean" }) : null,
|
|
166
166
|
showBoolean ? (React.createElement(Tabs_1.Tabs.Content, { value: 'BooleanExpression', paddingLeft: 0 },
|
|
167
167
|
React.createElement(ExpressionEditor_1.ExpressionEditor, { type: 'boolean', module: module, value: data.Rule.BooleanExpression, onChange: setBooleanExpression, initialData: initialData, columns: api.columnApi.getQueryableColumns(), namedQueries: api.queryApi.getAllNamedQuery(), api: api }))) : null,
|
|
168
168
|
showObservable ? (React.createElement(QueryTab, { value: "ObservableExpression", type: type, label: "Observable" })) : null,
|
|
169
169
|
showObservable ? (React.createElement(Tabs_1.Tabs.Content, { value: 'ObservableExpression', paddingLeft: 0 },
|
|
170
170
|
React.createElement(ExpressionEditor_1.ExpressionEditor, { type: 'observable', module: module, value: data.Rule.ObservableExpression, onChange: setReactiveExpression, initialData: initialData, columns: api.columnApi.getQueryableColumns(), namedQueries: api.queryApi.getAllNamedQuery(), api: api }))) : null,
|
|
171
|
-
showAggregation ? (React.createElement(QueryTab, { value: "
|
|
172
|
-
showAggregation ? (React.createElement(Tabs_1.Tabs.Content, { value: '
|
|
173
|
-
React.createElement(ExpressionEditor_1.ExpressionEditor, { type: '
|
|
171
|
+
showAggregation ? (React.createElement(QueryTab, { value: "AggregatedBooleanExpression", type: type, label: "AggregatedBoolean" })) : null,
|
|
172
|
+
showAggregation ? (React.createElement(Tabs_1.Tabs.Content, { value: 'AggregatedBooleanExpression', paddingLeft: 0 },
|
|
173
|
+
React.createElement(ExpressionEditor_1.ExpressionEditor, { type: 'aggregatedBoolean', module: module, value: data.Rule.AggregatedBooleanExpression, onChange: setAggregationExpression, initialData: initialData, columns: api.columnApi.getQueryableColumns(), namedQueries: api.queryApi.getAllNamedQuery(), api: api }))) : null)));
|
|
174
174
|
};
|
|
@@ -5,7 +5,6 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const React = tslib_1.__importStar(require("react"));
|
|
6
6
|
const react_redux_1 = require("react-redux");
|
|
7
7
|
const FilterRedux = tslib_1.__importStar(require("../../../Redux/ActionsReducers/FilterRedux"));
|
|
8
|
-
const PopupRedux = tslib_1.__importStar(require("../../../Redux/ActionsReducers/PopupRedux"));
|
|
9
8
|
const Enums_1 = require("../../../PredefinedConfig/Common/Enums");
|
|
10
9
|
const ListBoxFilterForm_1 = require("./ListBoxFilterForm");
|
|
11
10
|
const ButtonClose_1 = require("../Buttons/ButtonClose");
|
|
@@ -276,7 +275,6 @@ function mapDispatchToProps(dispatch) {
|
|
|
276
275
|
onAddColumnFilter: (columnFilter) => dispatch(FilterRedux.ColumnFilterAdd(columnFilter)),
|
|
277
276
|
onEditColumnFilter: (columnFilter) => dispatch(FilterRedux.ColumnFilterEdit(columnFilter)),
|
|
278
277
|
onSetColumnFilter: (columnFilter) => dispatch(FilterRedux.ColumnFilterSet(columnFilter)),
|
|
279
|
-
onShowPrompt: (prompt) => dispatch(PopupRedux.PopupShowPrompt(prompt)),
|
|
280
278
|
onHideFilterForm: () => dispatch(FilterRedux.FilterFormHide()),
|
|
281
279
|
};
|
|
282
280
|
}
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.QuickFilterFormReact = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const React = tslib_1.__importStar(require("react"));
|
|
6
|
-
const debounce_1 = tslib_1.__importDefault(require("lodash
|
|
6
|
+
const debounce_1 = tslib_1.__importDefault(require("lodash/debounce"));
|
|
7
7
|
const FilterRedux = tslib_1.__importStar(require("../../../Redux/ActionsReducers/FilterRedux"));
|
|
8
8
|
const react_redux_1 = require("react-redux");
|
|
9
9
|
const ObjectFactory_1 = require("../../../Utilities/ObjectFactory");
|
|
@@ -16,7 +16,7 @@ const ArrayExtensions_1 = tslib_1.__importDefault(require("../../../Utilities/Ex
|
|
|
16
16
|
const AdaptableInput_1 = tslib_1.__importDefault(require("../AdaptableInput"));
|
|
17
17
|
const renderWithAdaptableContext_1 = require("../../renderWithAdaptableContext");
|
|
18
18
|
const CheckBox_1 = require("../../../components/CheckBox");
|
|
19
|
-
const isEqual_1 = tslib_1.__importDefault(require("lodash
|
|
19
|
+
const isEqual_1 = tslib_1.__importDefault(require("lodash/isEqual"));
|
|
20
20
|
const runIfNotResolvedIn_1 = require("../../../Utilities/runIfNotResolvedIn");
|
|
21
21
|
const getDefaultColumnFilterPredicate_1 = require("./getDefaultColumnFilterPredicate");
|
|
22
22
|
class QuickFilterFormComponent extends React.Component {
|
|
@@ -106,14 +106,12 @@ class QuickFilterFormComponent extends React.Component {
|
|
|
106
106
|
hideEvent = 'blur';
|
|
107
107
|
}
|
|
108
108
|
let showQuickFilterDropdown = true;
|
|
109
|
-
let hideQuickFilterDropdownFunction = this.props.api.internalApi.getAdaptableOptions()
|
|
110
|
-
.filterOptions.hideQuickFilterDropdown;
|
|
109
|
+
let hideQuickFilterDropdownFunction = this.props.api.internalApi.getAdaptableOptions().filterOptions.hideQuickFilterDropdown;
|
|
111
110
|
if (hideQuickFilterDropdownFunction) {
|
|
112
111
|
showQuickFilterDropdown = !hideQuickFilterDropdownFunction(this.props.currentColumn);
|
|
113
112
|
}
|
|
114
113
|
let showQuickFilterInput = true;
|
|
115
|
-
let hideQuickFilterInputFunction = this.props.api.internalApi.getAdaptableOptions()
|
|
116
|
-
.filterOptions.hideQuickFilterInput;
|
|
114
|
+
let hideQuickFilterInputFunction = this.props.api.internalApi.getAdaptableOptions().filterOptions.hideQuickFilterInput;
|
|
117
115
|
if (hideQuickFilterInputFunction) {
|
|
118
116
|
showQuickFilterInput = !hideQuickFilterInputFunction(this.props.currentColumn);
|
|
119
117
|
}
|
|
@@ -132,7 +130,10 @@ class QuickFilterFormComponent extends React.Component {
|
|
|
132
130
|
predicateDefs.map((p) => (React.createElement(SimpleButton_1.default, { key: p.id, p: 2, variant: "text", tone: (filter === null || filter === void 0 ? void 0 : filter.Predicate.PredicateId) === p.id ? 'info' : 'none', onClick: () => this.selectColumnPredicate(p.id) },
|
|
133
131
|
React.createElement("span", { style: { width: 20, marginRight: 10 } }, this.renderPredicateIcon(p)),
|
|
134
132
|
p.label))))) },
|
|
135
|
-
React.createElement(SimpleButton_1.default, { style: {
|
|
133
|
+
React.createElement(SimpleButton_1.default, { style: {
|
|
134
|
+
borderRadius: 0,
|
|
135
|
+
borderColor: 'var(--ab-color-primarydark)',
|
|
136
|
+
} }, this.renderPredicateIcon(activePredicateDef)))),
|
|
136
137
|
showQuickFilterInput && this.renderLabel(filter, activePredicateDef),
|
|
137
138
|
showQuickFilterInput && this.renderPredicateInput(activePredicateDef, filter)));
|
|
138
139
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { AdaptableColumn } from '../../../PredefinedConfig/Common/AdaptableColumn';
|
|
2
2
|
import { SystemFilterPredicateId } from '../../../PredefinedConfig/FilterState';
|
|
3
|
-
export declare const getDefaultColumnFilterPredicate: (column: AdaptableColumn, defaultColumnFilter: "
|
|
3
|
+
export declare const getDefaultColumnFilterPredicate: (column: AdaptableColumn, defaultColumnFilter: "Before" | "After" | "Today" | "Yesterday" | "Tomorrow" | "Values" | "Blanks" | "NonBlanks" | "GreaterThan" | "LessThan" | "Positive" | "Negative" | "Zero" | "Equals" | "NotEquals" | "Between" | "NotBetween" | "Is" | "IsNot" | "Contains" | "NotContains" | "StartsWith" | "EndsWith" | "Regex" | "ThisWeek" | "ThisMonth" | "ThisQuarter" | "ThisYear" | "InPast" | "InFuture" | "On" | "NotOn" | "NextWorkDay" | "LastWorkDay" | "InRange" | "True" | "False" | "BooleanToggle" | ((column: AdaptableColumn) => SystemFilterPredicateId)) => SystemFilterPredicateId;
|
|
@@ -30,5 +30,5 @@ exports.ModuleValueSelector = (props) => {
|
|
|
30
30
|
const sortedOptions = react_1.useMemo(() => {
|
|
31
31
|
return sortWithOrder_1.sortWithOrderArray(options, value, { sortUnorderedItems: true });
|
|
32
32
|
}, [allowReorder, options, value]);
|
|
33
|
-
return (React.createElement(ValueSelector_1.ValueSelector, Object.assign({}, valueSelectorProps, { options: sortedOptions, value: value, onChange: onChange, allowReorder: allowReorder, toIdentifier: (module) => module, toLabel: (module) => moduleLabelMap.get(module), selectionBoxPosition: selectionBoxPosition,
|
|
33
|
+
return (React.createElement(ValueSelector_1.ValueSelector, Object.assign({}, valueSelectorProps, { options: sortedOptions, value: value, onChange: onChange, allowReorder: allowReorder, toIdentifier: (module) => module, toLabel: (module) => moduleLabelMap.get(module), selectionBoxPosition: selectionBoxPosition, isOptionDisabled: props.isOptionDisabled, disabled: props.disabled })));
|
|
34
34
|
};
|
|
@@ -148,7 +148,7 @@ export declare const PanelWithImage: React.ForwardRefExoticComponent<{
|
|
|
148
148
|
'aria-rowspan'?: number;
|
|
149
149
|
'aria-selected'?: boolean | "false" | "true";
|
|
150
150
|
'aria-setsize'?: number;
|
|
151
|
-
'aria-sort'?: "none" | "
|
|
151
|
+
'aria-sort'?: "none" | "other" | "ascending" | "descending";
|
|
152
152
|
'aria-valuemax'?: number;
|
|
153
153
|
'aria-valuemin'?: number;
|
|
154
154
|
'aria-valuenow'?: number;
|
|
@@ -3,9 +3,6 @@ import * as PopupRedux from '../../../../Redux/ActionsReducers/PopupRedux';
|
|
|
3
3
|
import { ModuleParams } from '../../SharedProps/ModuleViewPopupProps';
|
|
4
4
|
import { AdaptableModule } from '../../../../PredefinedConfig/Common/Types';
|
|
5
5
|
import { AdaptableApi } from '../../../../Api/AdaptableApi';
|
|
6
|
-
/**
|
|
7
|
-
* This is the main popup that we use - so all Module popups will appear here.
|
|
8
|
-
*/
|
|
9
6
|
export interface AdaptablePopupProps {
|
|
10
7
|
componentName?: string;
|
|
11
8
|
componentModule: AdaptableModule;
|
|
@@ -4,100 +4,65 @@ exports.AdaptablePopup = void 0;
|
|
|
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 react_redux_1 = require("react-redux");
|
|
8
|
-
const PopupRedux = tslib_1.__importStar(require("../../../../Redux/ActionsReducers/PopupRedux"));
|
|
9
7
|
const GeneralConstants = tslib_1.__importStar(require("../../../../Utilities/Constants/GeneralConstants"));
|
|
10
8
|
const TopBar_1 = tslib_1.__importDefault(require("./TopBar"));
|
|
11
9
|
const join_1 = tslib_1.__importDefault(require("../../../../components/utils/join"));
|
|
12
10
|
const Navigation_1 = require("./Navigation");
|
|
13
11
|
const PopupContext_1 = tslib_1.__importDefault(require("./PopupContext"));
|
|
14
12
|
const AdaptablePopupBody_1 = require("./AdaptablePopupBody");
|
|
15
|
-
const Dialog_1 = tslib_1.__importDefault(require("../../../../components/Dialog"));
|
|
16
|
-
const SystemRedux_1 = require("../../../../Redux/ActionsReducers/SystemRedux");
|
|
17
|
-
const Utilities_1 = require("./Utilities");
|
|
18
13
|
const DefaultSettingsPanel_1 = require("../../../../Utilities/Defaults/DefaultSettingsPanel");
|
|
19
14
|
const AdaptableContext_1 = require("../../../AdaptableContext");
|
|
20
15
|
const CustomSettingsPanelView_1 = require("./CustomSettingsPanelView");
|
|
16
|
+
const useMenuItems_1 = require("./useMenuItems");
|
|
17
|
+
const AdaptablePopupDialog_1 = require("./AdaptablePopupDialog");
|
|
21
18
|
exports.AdaptablePopup = (props) => {
|
|
22
|
-
var _a, _b
|
|
19
|
+
var _a, _b;
|
|
23
20
|
const adaptable = AdaptableContext_1.useAdaptable();
|
|
24
|
-
const dispatch = react_redux_1.useDispatch();
|
|
25
21
|
const settingsPanelOptions = adaptable.adaptableOptions.settingsPanelOptions;
|
|
26
22
|
const settingsPanelTitle = adaptable.api.internalApi.getModuleFriendlyName('SettingsPanel');
|
|
27
|
-
|
|
28
|
-
const allMenuItems = react_redux_1.useSelector((state) => { var _a; return (_a = state === null || state === void 0 ? void 0 : state.Grid) === null || _a === void 0 ? void 0 : _a.ModuleDropdownMenuItems; });
|
|
29
|
-
const menuItems = React.useMemo(() => {
|
|
30
|
-
var _a;
|
|
31
|
-
let navigationItems = (_a = settingsPanelOptions === null || settingsPanelOptions === void 0 ? void 0 : settingsPanelOptions.navigation) === null || _a === void 0 ? void 0 : _a.items;
|
|
32
|
-
if (!navigationItems) {
|
|
33
|
-
navigationItems = [...DefaultSettingsPanel_1.DEFAULT_NAVIGATION_ITEMS];
|
|
34
|
-
if (settingsPanelOptions.customSettingsPanels) {
|
|
35
|
-
navigationItems.push(...settingsPanelOptions.customSettingsPanels.map((panel) => panel.name));
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
const visibleItems = allMenuItems.filter((item) => item.module !== 'General' && !DefaultSettingsPanel_1.ACTION_POPUPS.includes(item.module) && item.isVisible);
|
|
39
|
-
return navigationItems
|
|
40
|
-
.map((moduleName) => {
|
|
41
|
-
var _a, _b;
|
|
42
|
-
if (moduleName === '-') {
|
|
43
|
-
return moduleName;
|
|
44
|
-
}
|
|
45
|
-
const customSettingsPanel = (_b = (_a = settingsPanelOptions === null || settingsPanelOptions === void 0 ? void 0 : settingsPanelOptions.customSettingsPanels) === null || _a === void 0 ? void 0 : _a.find) === null || _b === void 0 ? void 0 : _b.call(_a, (panel) => panel.name === moduleName);
|
|
46
|
-
let customPanelMenuItem = null;
|
|
47
|
-
if (customSettingsPanel) {
|
|
48
|
-
customPanelMenuItem = {
|
|
49
|
-
label: customSettingsPanel.name,
|
|
50
|
-
isVisible: true,
|
|
51
|
-
reduxAction: PopupRedux.PopupShowScreen(null, customSettingsPanel.name, null, {
|
|
52
|
-
isCustomSettingsPanel: true,
|
|
53
|
-
}),
|
|
54
|
-
};
|
|
55
|
-
}
|
|
56
|
-
return customPanelMenuItem || visibleItems.find((item) => item.module === moduleName);
|
|
57
|
-
})
|
|
58
|
-
.filter(Boolean);
|
|
59
|
-
}, [allMenuItems]);
|
|
60
|
-
const isCustomSettingsPanel = (_a = props.moduleProps) === null || _a === void 0 ? void 0 : _a.isCustomSettingsPanel;
|
|
61
|
-
const customSettingsPanel = isCustomSettingsPanel &&
|
|
62
|
-
settingsPanelOptions.customSettingsPanels.find((settingsPanel) => settingsPanel.name === props.componentName);
|
|
63
|
-
let componentModule = props.componentModule;
|
|
64
|
-
// When it is opened without specifying a module
|
|
65
|
-
const firstMenuItem = (_b = menuItems.find((menuItem) => menuItem !== '-')) === null || _b === void 0 ? void 0 : _b.module;
|
|
66
|
-
if (!customSettingsPanel && !props.componentModule && firstMenuItem !== 'General') {
|
|
67
|
-
componentModule = firstMenuItem;
|
|
68
|
-
}
|
|
69
|
-
const accessLevel = props.api.internalApi
|
|
70
|
-
.getEntitlementService()
|
|
71
|
-
.getEntitlementAccessLevelForModule(componentModule);
|
|
72
|
-
const module = props.api.internalApi.getModuleService().getModuleById(componentModule);
|
|
73
|
-
const moduleInfo = module === null || module === void 0 ? void 0 : module.moduleInfo;
|
|
74
|
-
// action popups + non-primary module popups
|
|
75
|
-
const isActionModule = DefaultSettingsPanel_1.ACTION_POPUPS.includes(moduleInfo === null || moduleInfo === void 0 ? void 0 : moduleInfo.ModuleName) ||
|
|
76
|
-
(props.componentName && props.componentName !== moduleInfo.Popup);
|
|
77
|
-
const baseClassName = 'ab-Adaptable-Popup';
|
|
78
|
-
const className = join_1.default(baseClassName, `${baseClassName}--${(_c = settingsPanelOptions.popupType) !== null && _c !== void 0 ? _c : 'window'}`, isActionModule ? `${baseClassName}--action-popup` : `${baseClassName}--settings-popup`);
|
|
23
|
+
const menuItems = useMenuItems_1.useMenuItems();
|
|
79
24
|
const isWindowModal = settingsPanelOptions.popupType === 'window';
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
25
|
+
const modalContainer = (_b = (_a = adaptable.adaptableOptions) === null || _a === void 0 ? void 0 : _a.containerOptions) === null || _b === void 0 ? void 0 : _b.modalContainer;
|
|
26
|
+
let friendlyName = null;
|
|
27
|
+
let isActionModule = false;
|
|
28
|
+
let moduleViewContent = null;
|
|
29
|
+
let activeItem = null;
|
|
30
|
+
let accessLevel = 'Full';
|
|
31
|
+
const firstMenuItem = menuItems.find((menuItem) => menuItem !== '-');
|
|
32
|
+
const firstMenuModule = firstMenuItem === null || firstMenuItem === void 0 ? void 0 : firstMenuItem.module;
|
|
33
|
+
let componentModule = props.componentModule;
|
|
34
|
+
let componentName = props.componentName;
|
|
35
|
+
// ts forces to check for General, there is no menu item General
|
|
36
|
+
const useFirstItem = !props.componentModule;
|
|
37
|
+
if (useFirstItem && firstMenuModule !== 'General') {
|
|
38
|
+
componentModule = firstMenuModule;
|
|
83
39
|
}
|
|
84
|
-
|
|
85
|
-
|
|
40
|
+
const isCustomSettingsPanel = componentModule === 'CustomSettingsPanelModule';
|
|
41
|
+
if (isCustomSettingsPanel) {
|
|
42
|
+
if (useFirstItem) {
|
|
43
|
+
componentName = firstMenuItem.label;
|
|
44
|
+
}
|
|
45
|
+
const customSettingsPanel = settingsPanelOptions.customSettingsPanels.find((settingsPanel) => settingsPanel.name === componentName);
|
|
46
|
+
friendlyName = customSettingsPanel.name;
|
|
47
|
+
activeItem = customSettingsPanel.name;
|
|
48
|
+
moduleViewContent = React.createElement(CustomSettingsPanelView_1.CustomSettingsPanelView, { settingsPanel: customSettingsPanel });
|
|
86
49
|
}
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
50
|
+
else {
|
|
51
|
+
const module = props.api.internalApi.getModuleService().getModuleById(componentModule);
|
|
52
|
+
const moduleInfo = module === null || module === void 0 ? void 0 : module.moduleInfo;
|
|
53
|
+
accessLevel = props.api.internalApi
|
|
54
|
+
.getEntitlementService()
|
|
55
|
+
.getEntitlementAccessLevelForModule(componentModule);
|
|
56
|
+
friendlyName = moduleInfo.FriendlyName;
|
|
57
|
+
isActionModule =
|
|
58
|
+
moduleInfo &&
|
|
59
|
+
(DefaultSettingsPanel_1.ACTION_POPUPS.includes(moduleInfo === null || moduleInfo === void 0 ? void 0 : moduleInfo.ModuleName) ||
|
|
60
|
+
(props.componentName && props.componentName !== (moduleInfo === null || moduleInfo === void 0 ? void 0 : moduleInfo.Popup)));
|
|
61
|
+
activeItem = moduleInfo.ModuleName;
|
|
62
|
+
moduleViewContent = (React.createElement(AdaptablePopupBody_1.AdaptablePopupBody, { api: props.api, module: module, componentName: props.componentName, moduleParams: props.moduleParams, onClearParams: props.onClearParams, onHide: props.onHide }));
|
|
97
63
|
}
|
|
98
|
-
const
|
|
99
|
-
|
|
100
|
-
};
|
|
64
|
+
const baseClassName = 'ab-Adaptable-Popup';
|
|
65
|
+
const className = join_1.default(baseClassName, `${baseClassName}--${isWindowModal ? 'window' : 'modal'}`, isActionModule ? `${baseClassName}--action-popup` : `${baseClassName}--settings-popup`);
|
|
101
66
|
return (React.createElement(PopupContext_1.default.Provider, { value: {
|
|
102
67
|
hidePopup: () => {
|
|
103
68
|
if (props.onHide) {
|
|
@@ -105,16 +70,9 @@ exports.AdaptablePopup = (props) => {
|
|
|
105
70
|
}
|
|
106
71
|
},
|
|
107
72
|
} },
|
|
108
|
-
React.createElement(
|
|
109
|
-
handleSelector: isActionModule
|
|
110
|
-
? `.${baseClassName} .ab-Panel__header`
|
|
111
|
-
: '.ab-Adaptable-Popup__TopBar',
|
|
112
|
-
size: popupSettings.size,
|
|
113
|
-
position: popupSettings.position,
|
|
114
|
-
onChange: handleWindowSettings,
|
|
115
|
-
}, style: style, padding: 0, height: isWindowModal ? null : '90vh', width: isWindowModal ? null : '90vw', className: className, onDismiss: props.onHide, isOpen: true, showCloseButton: true }, props.moduleProps),
|
|
73
|
+
React.createElement(AdaptablePopupDialog_1.AdaptablePopupDialog, { baseClassName: baseClassName, className: className, friendlyName: friendlyName, isActionModule: isActionModule, isWindowModal: isWindowModal, onHide: props.onHide, modalContainer: modalContainer },
|
|
116
74
|
!isActionModule && React.createElement(TopBar_1.default, { icon: settingsPanelOptions.icon }, settingsPanelTitle),
|
|
117
75
|
React.createElement(rebass_1.Flex, { "data-name": props.componentName, flexDirection: "row", flex: "1 1 0", style: { minHeight: 0 }, className: accessLevel == 'ReadOnly' ? GeneralConstants.READ_ONLY_STYLE : '' },
|
|
118
|
-
!isActionModule && (React.createElement(Navigation_1.Navigation, { menuItems: menuItems, api: props.api,
|
|
119
|
-
React.createElement(rebass_1.Flex, { flex: 1, className: "ab-Adaptable-Popup__Body" },
|
|
76
|
+
!isActionModule && (React.createElement(Navigation_1.Navigation, { menuItems: menuItems, api: props.api, activeItem: activeItem, customSettingsPanels: settingsPanelOptions.customSettingsPanels })),
|
|
77
|
+
React.createElement(rebass_1.Flex, { flex: 1, className: "ab-Adaptable-Popup__Body" }, moduleViewContent)))));
|
|
120
78
|
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export declare const AdaptablePopupDialog: React.FunctionComponent<{
|
|
3
|
+
baseClassName: string;
|
|
4
|
+
className: string;
|
|
5
|
+
friendlyName: string;
|
|
6
|
+
isActionModule: boolean;
|
|
7
|
+
isWindowModal: boolean;
|
|
8
|
+
onHide: () => void;
|
|
9
|
+
style?: React.CSSProperties;
|
|
10
|
+
modalContainer?: string | HTMLElement;
|
|
11
|
+
}>;
|