@adaptabletools/adaptable 12.1.7 → 12.2.0-canary.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/base.css +127 -71
- package/bundle.cjs.js +108 -108
- package/index.css +145 -83
- package/package.json +1 -1
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +1 -0
- package/src/AdaptableOptions/AdaptableQLOptions.d.ts +44 -10
- package/src/AdaptableOptions/FilterOptions.d.ts +12 -0
- package/src/AdaptableOptions/FinancePluginOptions.d.ts +22 -1
- package/src/AdaptableOptions/LayoutOptions.d.ts +10 -1
- package/src/AdaptableOptions/StateOptions.d.ts +25 -12
- package/src/Api/ColumnApi.d.ts +5 -0
- package/src/Api/ExportApi.d.ts +5 -0
- package/src/Api/FilterApi.d.ts +23 -0
- package/src/Api/GridApi.d.ts +1 -0
- package/src/Api/Implementation/AlertApiImpl.js +1 -2
- package/src/Api/Implementation/ColumnApiImpl.d.ts +1 -0
- package/src/Api/Implementation/ColumnApiImpl.js +5 -0
- package/src/Api/Implementation/ExportApiImpl.d.ts +3 -1
- package/src/Api/Implementation/ExportApiImpl.js +19 -3
- package/src/Api/Implementation/FilterApiImpl.d.ts +5 -0
- package/src/Api/Implementation/FilterApiImpl.js +25 -2
- package/src/Api/Implementation/GridApiImpl.d.ts +1 -0
- package/src/Api/Implementation/InternalApiImpl.d.ts +3 -2
- package/src/Api/Implementation/InternalApiImpl.js +34 -3
- package/src/Api/Implementation/PredicateApiImpl.js +4 -0
- package/src/Api/Implementation/QueryLanguageApiImpl.d.ts +1 -0
- package/src/Api/Implementation/QueryLanguageApiImpl.js +14 -1
- package/src/Api/InternalApi.d.ts +6 -2
- package/src/Api/QueryLanguageApi.d.ts +5 -0
- package/src/PredefinedConfig/CalculatedColumnState.d.ts +2 -2
- package/src/PredefinedConfig/Common/AdaptablePredicate.js +16 -4
- package/src/PredefinedConfig/Common/AdaptableQuery.js +1 -1
- package/src/PredefinedConfig/Common/AggregationColumns.d.ts +6 -0
- package/src/PredefinedConfig/Common/AggregationColumns.js +4 -0
- package/src/PredefinedConfig/Common/ColumnFilter.d.ts +2 -2
- package/src/PredefinedConfig/Common/Enums.d.ts +0 -15
- package/src/PredefinedConfig/Common/Enums.js +1 -18
- package/src/PredefinedConfig/ExportState.d.ts +12 -4
- package/src/PredefinedConfig/LayoutState.d.ts +2 -1
- package/src/PredefinedConfig/PopupState.d.ts +1 -2
- package/src/Redux/ActionsReducers/AlertRedux.d.ts +1 -1
- package/src/Redux/ActionsReducers/AlertRedux.js +1 -1
- package/src/Redux/ActionsReducers/ConditionalStyleRedux.d.ts +1 -1
- package/src/Redux/ActionsReducers/ConditionalStyleRedux.js +1 -1
- package/src/Redux/ActionsReducers/CustomSortRedux.d.ts +1 -1
- package/src/Redux/ActionsReducers/CustomSortRedux.js +1 -1
- package/src/Redux/ActionsReducers/FlashingCellRedux.d.ts +1 -1
- package/src/Redux/ActionsReducers/FlashingCellRedux.js +1 -1
- package/src/Redux/ActionsReducers/FormatColumnRedux.d.ts +1 -1
- package/src/Redux/ActionsReducers/FormatColumnRedux.js +1 -1
- package/src/Redux/ActionsReducers/LayoutRedux.d.ts +28 -0
- package/src/Redux/ActionsReducers/LayoutRedux.js +80 -2
- package/src/Redux/ActionsReducers/PlusMinusRedux.d.ts +1 -1
- package/src/Redux/ActionsReducers/PlusMinusRedux.js +1 -1
- package/src/Redux/ActionsReducers/PopupRedux.d.ts +0 -2
- package/src/Redux/ActionsReducers/PopupRedux.js +1 -28
- package/src/Redux/ActionsReducers/ScheduleRedux.d.ts +5 -5
- package/src/Redux/ActionsReducers/ScheduleRedux.js +5 -5
- package/src/Redux/ActionsReducers/ShortcutRedux.d.ts +1 -1
- package/src/Redux/ActionsReducers/ShortcutRedux.js +1 -1
- package/src/Redux/Store/AdaptableStore.js +15 -6
- package/src/Strategy/AlertModule.d.ts +1 -0
- package/src/Strategy/AlertModule.js +20 -0
- package/src/Strategy/BulkUpdateModule.d.ts +1 -1
- package/src/Strategy/CalculatedColumnModule.js +3 -3
- package/src/Strategy/ExportModule.d.ts +0 -1
- package/src/Strategy/ExportModule.js +0 -16
- package/src/Strategy/FilterModule.js +6 -0
- package/src/Strategy/Interface/IModule.d.ts +4 -0
- package/src/Strategy/LayoutModule.js +20 -20
- package/src/Strategy/QueryModule.js +1 -1
- package/src/Strategy/Utilities/Export/getExportRowsViewItems.js +0 -13
- package/src/Strategy/Utilities/FormatColumn/getFormatColumnStyleViewItems.js +16 -1
- package/src/Strategy/Utilities/Layout/getLayoutFilterViewItems.js +15 -11
- package/src/Strategy/Utilities/getExpressionViewItems.d.ts +3 -4
- package/src/Strategy/Utilities/getExpressionViewItems.js +3 -3
- package/src/Strategy/Utilities/getRuleViewItems.js +1 -1
- package/src/Utilities/Constants/DocumentationLinkConstants.d.ts +1 -0
- package/src/Utilities/Constants/DocumentationLinkConstants.js +2 -1
- package/src/Utilities/Defaults/DefaultAdaptableOptions.js +3 -0
- package/src/Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions.d.ts +12 -2
- package/src/Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions.js +30 -66
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.d.ts +22 -6
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +423 -220
- package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.d.ts +7 -1
- package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.js +25 -7
- package/src/Utilities/ExpressionFunctions/scalarAggregationHelper.d.ts +0 -1
- package/src/Utilities/ExpressionFunctions/scalarAggregationHelper.js +6 -54
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.d.ts +1 -1
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +31 -5
- package/src/Utilities/Interface/MessagePopups.d.ts +0 -4
- package/src/Utilities/ObjectFactory.d.ts +4 -2
- package/src/Utilities/ObjectFactory.js +16 -3
- package/src/Utilities/Services/AggregatedScalarLiveValue.d.ts +25 -0
- package/src/Utilities/Services/AggregatedScalarLiveValue.js +103 -0
- package/src/Utilities/Services/AlertService.d.ts +0 -1
- package/src/Utilities/Services/AlertService.js +5 -17
- package/src/Utilities/Services/CalculatedColumnExpressionService.d.ts +4 -4
- package/src/Utilities/Services/CalculatedColumnExpressionService.js +29 -154
- package/src/Utilities/Services/Interface/ICalculatedColumnExpressionService.d.ts +2 -2
- package/src/Utilities/Services/Interface/IQueryLanguageService.d.ts +8 -3
- package/src/Utilities/Services/QueryLanguageService.d.ts +8 -4
- package/src/Utilities/Services/QueryLanguageService.js +68 -25
- package/src/Utilities/Services/ReportService.js +48 -48
- package/src/View/AdaptableView.js +1 -2
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/AdaptableOptionsForm.d.ts +1 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/AdaptableOptionsForm.js +10 -10
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/Components/FormBox.d.ts +3 -0
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/Components/FormBox.js +9 -0
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizard.js +14 -15
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/EntitlementsForm.d.ts +1 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/EntitlementsForm.js +2 -2
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/FinanceForm/FinanceForm.d.ts +7 -0
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/FinanceForm/FinanceForm.js +280 -0
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/FinanceForm/index.d.ts +1 -0
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/FinanceForm/index.js +5 -0
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/GridOptionsForm.d.ts +1 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/GridOptionsForm.js +4 -4
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsStatusbarForm.js +2 -8
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UiOptionsForm.d.ts +1 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UiOptionsForm.js +3 -3
- package/src/View/AdaptableWizardView/Wizard.js +2 -2
- package/src/View/CalculatedColumn/CalculatedColumnSummary.d.ts +0 -1
- package/src/View/CalculatedColumn/CalculatedColumnSummary.js +1 -8
- package/src/View/CalculatedColumn/Utilities/getCalculatedColumnSettingsTags.d.ts +2 -0
- package/src/View/CalculatedColumn/Utilities/{getCalculatedColumnSettingTags.js → getCalculatedColumnSettingsTags.js} +3 -3
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnDefinitionWizardSection.d.ts +10 -0
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnDefinitionWizardSection.js +80 -0
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.js +24 -14
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.d.ts +1 -2
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +9 -52
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.js +17 -6
- package/src/View/Components/AdaptableObjectCollection/index.d.ts +3 -4
- package/src/View/Components/AdaptableObjectCollection/index.js +7 -8
- package/src/View/Components/AdaptableObjectList/AdaptableObjectCompactList.js +42 -6
- package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +1 -1
- package/src/View/Components/AdaptableObjectRow/index.js +1 -4
- package/src/View/Components/EntityRulesEditor/index.js +28 -7
- package/src/View/Components/FilterForm/FilterForm.js +8 -4
- package/src/View/Components/FilterForm/ListBoxFilterForm.js +1 -0
- package/src/View/Components/FilterForm/QuickFilterForm.js +19 -7
- package/src/View/Components/PermittedValuesSelector/PermitedValuesSelector.d.ts +9 -0
- package/src/View/Components/PermittedValuesSelector/PermitedValuesSelector.js +28 -0
- package/src/View/Components/PermittedValuesSelector/index.d.ts +1 -0
- package/src/View/Components/PermittedValuesSelector/index.js +5 -0
- package/src/View/Components/Popups/AdaptablePopup/Navigation.js +2 -2
- package/src/View/Components/Popups/AdaptablePopup/PopupPanel.d.ts +1 -0
- package/src/View/Components/Popups/AdaptablePopup/PopupPanel.js +2 -1
- package/src/View/Components/Popups/AdaptableToaster.js +2 -7
- package/src/View/Components/Popups/WindowPopups/windowFactory.d.ts +0 -1
- package/src/View/Components/Popups/WindowPopups/windowFactory.js +1 -4
- package/src/View/Components/ValueSelector/index.js +8 -19
- package/src/View/CustomSort/CustomSortSummary.js +1 -1
- package/src/View/Dashboard/DashboardPopup.js +11 -10
- package/src/View/Export/ExportViewPanel.d.ts +1 -2
- package/src/View/Export/ExportViewPanel.js +4 -8
- package/src/View/Export/Wizard/ReportColumnTypeWizard.d.ts +1 -2
- package/src/View/Export/Wizard/ReportColumnTypeWizard.js +11 -12
- package/src/View/Export/Wizard/ReportRowTypeWizard.d.ts +1 -2
- package/src/View/Export/Wizard/ReportRowTypeWizard.js +12 -13
- package/src/View/Export/Wizard/ReportRowsWizardSection.js +4 -3
- package/src/View/Export/Wizard/ReportSettingsWizard.js +1 -2
- package/src/View/Filter/FilterViewPanel.js +21 -4
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +1 -1
- package/src/View/GridInfo/AdaptableObjectsSummary.js +5 -3
- package/src/View/GridInfo/AdaptableOptionsComponent.js +1 -1
- package/src/View/GridInfo/GridInfoPopup.js +6 -7
- package/src/View/Layout/Wizard/{LayoutEditor → Components}/ColumnLabels.d.ts +0 -0
- package/src/View/Layout/Wizard/{LayoutEditor → Components}/ColumnLabels.js +0 -0
- package/src/View/Layout/Wizard/LayoutWizard.js +1 -0
- package/src/View/Layout/Wizard/sections/AggregationsSection.d.ts +1 -0
- package/src/View/Layout/Wizard/sections/AggregationsSection.js +69 -8
- package/src/View/Layout/Wizard/sections/ColumnsSection.js +1 -1
- package/src/View/Query/QueryViewPanel.js +1 -1
- package/src/View/Query/Wizard/NamedQueryExpressionWizardSection.js +3 -4
- package/src/View/StateManagement/StateManagementPopup.js +18 -19
- package/src/agGrid/Adaptable.d.ts +12 -3
- package/src/agGrid/Adaptable.js +264 -148
- package/src/agGrid/agGridHelper.d.ts +1 -0
- package/src/agGrid/agGridHelper.js +5 -3
- package/src/agGrid/agGridMenuHelper.d.ts +1 -0
- package/src/agGrid/agGridMenuHelper.js +4 -2
- package/src/agGrid/weightedAverage.d.ts +6 -0
- package/src/agGrid/weightedAverage.js +66 -0
- package/src/bundle-dependencies/bundles/react-toastify/index.js +1 -1
- package/src/components/DragAndDropContext/ModuleManager.js +3 -4
- package/src/components/DragAndDropContext/TabList.js +9 -30
- package/src/components/DragAndDropContext/UnusedPanel.js +1 -7
- package/src/components/DropdownButton/index.js +2 -2
- package/src/components/EmptyContent/index.js +2 -2
- package/src/components/ExpressionEditor/BaseEditorInput.d.ts +1 -0
- package/src/components/ExpressionEditor/BaseEditorInput.js +3 -3
- package/src/components/ExpressionEditor/EditorInput.d.ts +1 -1
- package/src/components/ExpressionEditor/EditorInput.js +24 -4
- package/src/components/ExpressionEditor/{EditorInputReactive.d.ts → EditorInputWithWhereClause.d.ts} +3 -3
- package/src/components/ExpressionEditor/{EditorInputReactive.js → EditorInputWithWhereClause.js} +6 -5
- package/src/components/ExpressionEditor/editorButtonsAggregatedBoolean.d.ts +2 -0
- package/src/components/ExpressionEditor/{editorButtonsReactive.js → editorButtonsAggregatedBoolean.js} +22 -37
- package/src/components/ExpressionEditor/editorButtonsAggregatedScalar.js +5 -10
- package/src/components/ExpressionEditor/editorButtonsCumulativeAggregatedScalar.d.ts +2 -0
- package/src/components/ExpressionEditor/editorButtonsCumulativeAggregatedScalar.js +50 -0
- package/src/components/ExpressionEditor/editorButtonsObservable.d.ts +2 -0
- package/src/components/ExpressionEditor/editorButtonsObservable.js +40 -0
- package/src/components/ExpressionEditor/index.d.ts +1 -1
- package/src/components/ExpressionEditor/index.js +50 -19
- package/src/metamodel/adaptable.metamodel.d.ts +86 -5
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/parser/src/types.d.ts +14 -10
- package/src/types.d.ts +4 -4
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/src/View/CalculatedColumn/Utilities/getCalculatedColumnSettingTags.d.ts +0 -2
- package/src/View/Layout/LayoutEditorStandalonePopup.d.ts +0 -3
- package/src/View/Layout/LayoutEditorStandalonePopup.js +0 -78
- package/src/View/Layout/Wizard/LayoutEditor/ColumnList.d.ts +0 -27
- package/src/View/Layout/Wizard/LayoutEditor/ColumnList.js +0 -86
- package/src/View/Layout/Wizard/LayoutEditor/ColumnSortList.d.ts +0 -16
- package/src/View/Layout/Wizard/LayoutEditor/ColumnSortList.js +0 -89
- package/src/View/Layout/Wizard/LayoutEditor/PivotList.d.ts +0 -15
- package/src/View/Layout/Wizard/LayoutEditor/PivotList.js +0 -70
- package/src/View/Layout/Wizard/LayoutEditor/RowGroupsList.d.ts +0 -15
- package/src/View/Layout/Wizard/LayoutEditor/RowGroupsList.js +0 -70
- package/src/View/Layout/Wizard/LayoutEditor/droppableIds.d.ts +0 -7
- package/src/View/Layout/Wizard/LayoutEditor/droppableIds.js +0 -11
- package/src/View/Layout/Wizard/LayoutEditor/getItemStyle.d.ts +0 -6
- package/src/View/Layout/Wizard/LayoutEditor/getItemStyle.js +0 -26
- package/src/View/Layout/Wizard/LayoutEditor/index.d.ts +0 -9
- package/src/View/Layout/Wizard/LayoutEditor/index.js +0 -367
- package/src/View/Layout/Wizard/LayoutEditor/reducer.d.ts +0 -28
- package/src/View/Layout/Wizard/LayoutEditor/reducer.js +0 -46
- package/src/View/Layout/Wizard/LayoutEditor/utils.d.ts +0 -10
- package/src/View/Layout/Wizard/LayoutEditor/utils.js +0 -14
- package/src/View/Layout/Wizard/LayoutEditorWizard.d.ts +0 -30
- package/src/View/Layout/Wizard/LayoutEditorWizard.js +0 -132
- package/src/components/ExpressionEditor/editorButtonsReactive.d.ts +0 -2
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { AdaptableApi } from '../../../Api/AdaptableApi';
|
|
3
2
|
import { CalculatedColumn } from '../../../PredefinedConfig/CalculatedColumnState';
|
|
4
3
|
export declare type CalculatedColumnSettingsWizardSectionProps = {
|
|
5
4
|
onChange: (data: CalculatedColumn) => void;
|
|
6
5
|
isEdit: boolean;
|
|
7
6
|
};
|
|
8
7
|
export declare const renderCalculatedColumnSettingsSummary: (data: CalculatedColumn) => JSX.Element;
|
|
9
|
-
export declare const isValidCalculatedColumnSettings: (data: CalculatedColumn
|
|
8
|
+
export declare const isValidCalculatedColumnSettings: (data: CalculatedColumn) => true | string;
|
|
10
9
|
export declare const CalculatedColumnSettingsWizardSection: (props: CalculatedColumnSettingsWizardSectionProps) => JSX.Element;
|
|
@@ -3,66 +3,41 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.CalculatedColumnSettingsWizardSection = exports.isValidCalculatedColumnSettings = exports.renderCalculatedColumnSettingsSummary = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const React = tslib_1.__importStar(require("react"));
|
|
6
|
+
const react_1 = require("react");
|
|
6
7
|
const rebass_1 = require("rebass");
|
|
7
8
|
const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
|
|
8
9
|
const FormLayout_1 = tslib_1.__importStar(require("../../../components/FormLayout"));
|
|
9
10
|
const Input_1 = tslib_1.__importDefault(require("../../../components/Input"));
|
|
10
|
-
const react_1 = require("react");
|
|
11
11
|
const DropdownButton_1 = tslib_1.__importDefault(require("../../../components/DropdownButton"));
|
|
12
|
-
const CheckBox_1 = require("../../../components/CheckBox");
|
|
13
12
|
const ErrorBox_1 = tslib_1.__importDefault(require("../../../components/ErrorBox"));
|
|
14
13
|
const Tabs_1 = require("../../../components/Tabs");
|
|
15
14
|
const ValueSelector_1 = require("../../Components/ValueSelector");
|
|
16
|
-
const Tag_1 = require("../../../components/Tag");
|
|
17
|
-
const getCalculatedColumnSettingTags_1 = require("../Utilities/getCalculatedColumnSettingTags");
|
|
18
15
|
const SpecialColumnSettingsWizardStep_1 = require("../../SpecialColumnSettingsWizardStep");
|
|
16
|
+
const getCalculatedColumnSettingsTags_1 = require("../Utilities/getCalculatedColumnSettingsTags");
|
|
19
17
|
const renderCalculatedColumnSettingsSummary = (data) => {
|
|
20
|
-
|
|
21
|
-
const options = getCalculatedColumnSettingTags_1.getCalculatedColumnSettingTags(data.CalculatedColumnSettings);
|
|
18
|
+
const options = getCalculatedColumnSettingsTags_1.getCalculatedColumnSettingsTags(data.CalculatedColumnSettings);
|
|
22
19
|
return (React.createElement(rebass_1.Box, { fontSize: 2 },
|
|
23
|
-
React.createElement(rebass_1.Box, null,
|
|
24
|
-
"Column Identifier: ",
|
|
25
|
-
React.createElement(Tag_1.Tag, null, data.ColumnId)),
|
|
26
|
-
data.FriendlyName ? (React.createElement(rebass_1.Box, { mt: 3 },
|
|
27
|
-
"Column Name: ",
|
|
28
|
-
React.createElement(Tag_1.Tag, null, (_a = data.FriendlyName) !== null && _a !== void 0 ? _a : data.ColumnId))) : null,
|
|
29
|
-
React.createElement(rebass_1.Box, { mb: 3 }),
|
|
30
20
|
React.createElement(ValueSelector_1.ValueOptionsTags, { toLabel: (x) => x, toIdentifier: (c) => c, readOnly: true, options: options, value: options })));
|
|
31
21
|
};
|
|
32
22
|
exports.renderCalculatedColumnSettingsSummary = renderCalculatedColumnSettingsSummary;
|
|
33
|
-
const isValidCalculatedColumnSettings = (data
|
|
23
|
+
const isValidCalculatedColumnSettings = (data) => {
|
|
34
24
|
var _a;
|
|
35
|
-
const columns = api.columnApi.getColumns();
|
|
36
|
-
if (!data.ColumnId) {
|
|
37
|
-
return 'Column Id cannot be empty';
|
|
38
|
-
}
|
|
39
25
|
if (!((_a = data.CalculatedColumnSettings) === null || _a === void 0 ? void 0 : _a.DataType)) {
|
|
40
26
|
return 'No data type is specified and it could not be inferred from the defined expression';
|
|
41
27
|
}
|
|
42
|
-
|
|
43
|
-
const hasAlreadyExistingId = data.Uuid ? columnsWithSameIdCount > 1 : columnsWithSameIdCount > 0;
|
|
44
|
-
return hasAlreadyExistingId ? 'A Column already exists with that id' : true;
|
|
28
|
+
return true;
|
|
45
29
|
};
|
|
46
30
|
exports.isValidCalculatedColumnSettings = isValidCalculatedColumnSettings;
|
|
47
31
|
const CalculatedColumnSettingsWizardSection = (props) => {
|
|
48
32
|
var _a, _b;
|
|
49
33
|
const { data, api } = OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext();
|
|
50
34
|
const calculatedColumnExpressionService = react_1.useMemo(() => api.internalApi.getCalculatedColumnExpressionService(), []);
|
|
51
|
-
const handleColumnIdChange = (event) => {
|
|
52
|
-
let e = event.target;
|
|
53
|
-
props.onChange(Object.assign(Object.assign({}, data), { ColumnId: e.value }));
|
|
54
|
-
};
|
|
55
|
-
const handleColumnNameChange = (event) => {
|
|
56
|
-
let e = event.target;
|
|
57
|
-
props.onChange(Object.assign(Object.assign({}, data), { FriendlyName: e.value }));
|
|
58
|
-
};
|
|
59
35
|
const handleDataTypeChange = (dataType) => {
|
|
60
36
|
var _a;
|
|
61
37
|
const aggregatable = dataType == 'Number' ? (_a = data.CalculatedColumnSettings) === null || _a === void 0 ? void 0 : _a.Aggregatable : false;
|
|
62
38
|
props.onChange(Object.assign(Object.assign({}, data), { CalculatedColumnSettings: Object.assign(Object.assign({}, data.CalculatedColumnSettings), { DataType: dataType, Aggregatable: aggregatable }) }));
|
|
63
39
|
};
|
|
64
|
-
const
|
|
65
|
-
const validCheck = exports.isValidCalculatedColumnSettings(data, api);
|
|
40
|
+
const validCheck = exports.isValidCalculatedColumnSettings(data);
|
|
66
41
|
const ErrorMessage = validCheck === true ? null : validCheck;
|
|
67
42
|
let options = [
|
|
68
43
|
{ value: 'Number', label: 'Number' },
|
|
@@ -70,11 +45,8 @@ const CalculatedColumnSettingsWizardSection = (props) => {
|
|
|
70
45
|
{ value: 'Date', label: 'Date' },
|
|
71
46
|
{ value: 'Boolean', label: 'Boolean' },
|
|
72
47
|
];
|
|
73
|
-
const [ColumnNameFocused, setColumnNameFocused] = react_1.useState(false);
|
|
74
|
-
const ColumnName = data.FriendlyName;
|
|
75
|
-
const ColumnId = data.ColumnId;
|
|
76
48
|
let { DataType: dataType } = (_a = data.CalculatedColumnSettings) !== null && _a !== void 0 ? _a : {};
|
|
77
|
-
const { Width
|
|
49
|
+
const { Width } = (_b = data.CalculatedColumnSettings) !== null && _b !== void 0 ? _b : {};
|
|
78
50
|
const handleSpecialColumnSettingsChange = (settings) => {
|
|
79
51
|
props.onChange(Object.assign(Object.assign({}, data), { CalculatedColumnSettings: Object.assign(Object.assign({}, data.CalculatedColumnSettings), settings) }));
|
|
80
52
|
};
|
|
@@ -86,18 +58,10 @@ const CalculatedColumnSettingsWizardSection = (props) => {
|
|
|
86
58
|
}, []);
|
|
87
59
|
return (React.createElement(rebass_1.Box, { "data-name": 'calculated-column-settings' },
|
|
88
60
|
React.createElement(Tabs_1.Tabs, { autoFocus: false },
|
|
89
|
-
React.createElement(Tabs_1.Tabs.Tab, null, "Column
|
|
61
|
+
React.createElement(Tabs_1.Tabs.Tab, null, "Column Settings"),
|
|
90
62
|
React.createElement(Tabs_1.Tabs.Content, null,
|
|
91
63
|
React.createElement(rebass_1.Flex, { flexDirection: "row" },
|
|
92
64
|
React.createElement(FormLayout_1.default, null,
|
|
93
|
-
React.createElement(FormLayout_1.FormRow, { label: "Column Id" },
|
|
94
|
-
React.createElement(Input_1.default, { "data-name": "column-id", value: data.ColumnId || '', width: 300, autoFocus: !inEdit, disabled: inEdit, type: "text", placeholder: "Enter an Id for the column", onChange: handleColumnIdChange })),
|
|
95
|
-
React.createElement(FormLayout_1.FormRow, { label: "Name" },
|
|
96
|
-
React.createElement(Input_1.default, { "data-name": "column-name", autoFocus: inEdit, onFocus: () => {
|
|
97
|
-
setColumnNameFocused(true);
|
|
98
|
-
}, onBlur: () => {
|
|
99
|
-
setColumnNameFocused(false);
|
|
100
|
-
}, value: ColumnNameFocused ? ColumnName || '' : ColumnName || ColumnId || '', width: 300, type: "text", placeholder: "Enter column name", onChange: handleColumnNameChange })),
|
|
101
65
|
React.createElement(FormLayout_1.FormRow, { label: "Data Type" },
|
|
102
66
|
React.createElement(DropdownButton_1.default, { "data-name": "column-type", style: {
|
|
103
67
|
width: '300px',
|
|
@@ -112,14 +76,7 @@ const CalculatedColumnSettingsWizardSection = (props) => {
|
|
|
112
76
|
React.createElement(FormLayout_1.FormRow, { label: "Width" },
|
|
113
77
|
React.createElement(Input_1.default, { "data-name": "column-width", type: "number", width: 300, value: Width || '', onChange: (e) => handleSpecialColumnSettingsChange({
|
|
114
78
|
Width: Number(e.target.value),
|
|
115
|
-
}) })),
|
|
116
|
-
React.createElement(FormLayout_1.FormRow, { label: "Header Tooltip" },
|
|
117
|
-
React.createElement(Input_1.default, { "data-name": "header-tooltip", type: "text", width: 300, value: HeaderToolTip, onChange: (e) => handleSpecialColumnSettingsChange({
|
|
118
|
-
HeaderToolTip: e.target.value,
|
|
119
|
-
}) })),
|
|
120
|
-
' ',
|
|
121
|
-
React.createElement(FormLayout_1.FormRow, { label: "" },
|
|
122
|
-
React.createElement(CheckBox_1.CheckBox, { "data-name": "column-show-tooltip", onChange: (checked) => handleSpecialColumnSettingsChange({ ShowToolTip: checked }), checked: ShowToolTip }, "Show Expression as Cell Tooltip")))))),
|
|
79
|
+
}) })))))),
|
|
123
80
|
ErrorMessage ? React.createElement(ErrorBox_1.default, { marginTop: 2 }, ErrorMessage) : null,
|
|
124
81
|
React.createElement(SpecialColumnSettingsWizardStep_1.SpecialColumnSettingsWizardStep, { isEditable: false, settings: data.CalculatedColumnSettings, onChange: handleSpecialColumnSettingsChange })));
|
|
125
82
|
};
|
|
@@ -8,12 +8,13 @@ const Helper_1 = require("../../../Utilities/Helpers/Helper");
|
|
|
8
8
|
const react_1 = require("react");
|
|
9
9
|
const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
|
|
10
10
|
const CalculatedColumnExpressionWizardSection_1 = require("./CalculatedColumnExpressionWizardSection");
|
|
11
|
-
const
|
|
11
|
+
const CalculatedColumnDefinitionWizardSection_1 = require("./CalculatedColumnDefinitionWizardSection");
|
|
12
12
|
const AdaptableContext_1 = require("../../AdaptableContext");
|
|
13
13
|
const ObjectFactory_1 = tslib_1.__importDefault(require("../../../Utilities/ObjectFactory"));
|
|
14
14
|
const react_redux_1 = require("react-redux");
|
|
15
15
|
const CalculatedColumnRedux = tslib_1.__importStar(require("../../../Redux/ActionsReducers/CalculatedColumnRedux"));
|
|
16
16
|
const ObjectTagsWizardSection_1 = require("../../Wizard/ObjectTagsWizardSection");
|
|
17
|
+
const CalculatedColumnSettingsWizardSection_1 = require("./CalculatedColumnSettingsWizardSection");
|
|
17
18
|
const CalculatedColumnWizard = (props) => {
|
|
18
19
|
var _a;
|
|
19
20
|
const adaptable = AdaptableContext_1.useAdaptable();
|
|
@@ -44,13 +45,13 @@ const CalculatedColumnWizard = (props) => {
|
|
|
44
45
|
};
|
|
45
46
|
return (React.createElement(OnePageAdaptableWizard_1.OnePageAdaptableWizard, { defaultCurrentSectionName: props.defaultCurrentSectionName, moduleInfo: props.moduleInfo, data: calculatedColumn, onHide: props.onCloseWizard, onFinish: handleFinish, sections: [
|
|
46
47
|
{
|
|
47
|
-
title: '
|
|
48
|
-
details: 'Specify Column details
|
|
49
|
-
isValid:
|
|
50
|
-
renderSummary:
|
|
48
|
+
title: 'Definition',
|
|
49
|
+
details: 'Specify Column details',
|
|
50
|
+
isValid: CalculatedColumnDefinitionWizardSection_1.isValidCalculatedColumnDefinition,
|
|
51
|
+
renderSummary: CalculatedColumnDefinitionWizardSection_1.renderCalculatedColumnDefinitionSummary,
|
|
51
52
|
render: () => {
|
|
52
53
|
return (React.createElement(rebass_1.Box, { padding: 2 },
|
|
53
|
-
React.createElement(
|
|
54
|
+
React.createElement(CalculatedColumnDefinitionWizardSection_1.CalculatedColumnDefinitionWizardSection, { isEdit: isEdit, onChange: setCalculatedColumn })));
|
|
54
55
|
},
|
|
55
56
|
},
|
|
56
57
|
{
|
|
@@ -62,6 +63,16 @@ const CalculatedColumnWizard = (props) => {
|
|
|
62
63
|
return React.createElement(CalculatedColumnExpressionWizardSection_1.CalculatedColumnExpressionWizardSection, { onChange: setCalculatedColumn });
|
|
63
64
|
},
|
|
64
65
|
},
|
|
66
|
+
{
|
|
67
|
+
title: 'Settings',
|
|
68
|
+
details: 'Specify Column properties',
|
|
69
|
+
isValid: CalculatedColumnSettingsWizardSection_1.isValidCalculatedColumnSettings,
|
|
70
|
+
renderSummary: CalculatedColumnSettingsWizardSection_1.renderCalculatedColumnSettingsSummary,
|
|
71
|
+
render: () => {
|
|
72
|
+
return (React.createElement(rebass_1.Box, { padding: 2 },
|
|
73
|
+
React.createElement(CalculatedColumnSettingsWizardSection_1.CalculatedColumnSettingsWizardSection, { isEdit: isEdit, onChange: setCalculatedColumn })));
|
|
74
|
+
},
|
|
75
|
+
},
|
|
65
76
|
{
|
|
66
77
|
details: 'Select Calculated Column tags',
|
|
67
78
|
title: 'Tags',
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { IColItem } from '../../UIInterfaces';
|
|
3
|
-
|
|
3
|
+
import { BoxProps } from 'rebass';
|
|
4
|
+
export interface AdaptableObjectCollectionProps extends BoxProps {
|
|
4
5
|
colItems: IColItem[];
|
|
5
6
|
items: any[];
|
|
6
7
|
allowOverflow?: boolean;
|
|
7
8
|
style?: React.CSSProperties;
|
|
8
9
|
headerAlign?: string;
|
|
9
10
|
}
|
|
10
|
-
export declare
|
|
11
|
-
render(): any;
|
|
12
|
-
}
|
|
11
|
+
export declare const AdaptableObjectCollection: React.FunctionComponent<AdaptableObjectCollectionProps>;
|
|
@@ -5,12 +5,11 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const React = tslib_1.__importStar(require("react"));
|
|
6
6
|
/// <reference path="../../typings/.d.ts" />
|
|
7
7
|
const PanelWithRow_1 = require("../Panels/PanelWithRow");
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
8
|
+
const rebass_1 = require("rebass");
|
|
9
|
+
const AdaptableObjectCollection = (props) => {
|
|
10
|
+
const allowOverflow = props.allowOverflow ? 'visible' : 'auto';
|
|
11
|
+
return (React.createElement(rebass_1.Box, { style: Object.assign({}, props.style), className: "ab-ObjectCollection" },
|
|
12
|
+
React.createElement(PanelWithRow_1.PanelWithRow, { border: "none", colItems: props.colItems, headerAlign: props.headerAlign }),
|
|
13
|
+
React.createElement("div", { className: "ab-ObjectCollection__items", style: { overflowY: allowOverflow, boxShadow: 'none' } }, props.items)));
|
|
14
|
+
};
|
|
16
15
|
exports.AdaptableObjectCollection = AdaptableObjectCollection;
|
|
@@ -11,7 +11,7 @@ const ValueSelector_1 = require("../ValueSelector");
|
|
|
11
11
|
const baseClassName = 'ab-Adaptable-Object-Compact-List';
|
|
12
12
|
const ICON_SIZE = 20;
|
|
13
13
|
const AdaptableObjectCompactListItem = (props) => {
|
|
14
|
-
var _a, _b, _c, _d, _e, _f;
|
|
14
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
15
15
|
const dispatch = react_redux_1.useDispatch();
|
|
16
16
|
const adaptable = AdaptableContext_1.useAdaptable();
|
|
17
17
|
const objectView = props.module.toViewCompact(props.abObject);
|
|
@@ -20,9 +20,24 @@ const AdaptableObjectCompactListItem = (props) => {
|
|
|
20
20
|
const moduleAccessLevel = adaptable.api.internalApi
|
|
21
21
|
.getEntitlementService()
|
|
22
22
|
.getEntitlementAccessLevelForModule(props.module.moduleInfo.ModuleName);
|
|
23
|
-
const
|
|
23
|
+
const suspendAction = (_d = viewOptions === null || viewOptions === void 0 ? void 0 : viewOptions.getCompactSuspendAction) === null || _d === void 0 ? void 0 : _d.call(viewOptions, props.abObject);
|
|
24
|
+
const unSuspendAction = (_e = viewOptions === null || viewOptions === void 0 ? void 0 : viewOptions.getCompactUnSuspendAction) === null || _e === void 0 ? void 0 : _e.call(viewOptions, props.abObject);
|
|
25
|
+
const isSuspended = props.abObject.IsSuspended;
|
|
26
|
+
const handleDelete = React.useCallback((event) => {
|
|
27
|
+
event.stopPropagation();
|
|
28
|
+
event.preventDefault();
|
|
24
29
|
dispatch(deleteAction);
|
|
25
30
|
}, []);
|
|
31
|
+
const handleSuspendUnSuspend = React.useCallback((event) => {
|
|
32
|
+
event.stopPropagation();
|
|
33
|
+
event.preventDefault();
|
|
34
|
+
if (isSuspended) {
|
|
35
|
+
dispatch(unSuspendAction);
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
dispatch(suspendAction);
|
|
39
|
+
}
|
|
40
|
+
}, [props.abObject]);
|
|
26
41
|
let labelEl = objectView.item.label;
|
|
27
42
|
if (typeof labelEl === 'function') {
|
|
28
43
|
labelEl = React.createElement(labelEl, { data: props.abObject });
|
|
@@ -35,21 +50,42 @@ const AdaptableObjectCompactListItem = (props) => {
|
|
|
35
50
|
React.createElement(objectView.item.view, {
|
|
36
51
|
data: props.abObject,
|
|
37
52
|
}),
|
|
38
|
-
Boolean(((
|
|
53
|
+
Boolean(((_f = objectView.item) === null || _f === void 0 ? void 0 : _f.values) && ((_h = (_g = objectView.item) === null || _g === void 0 ? void 0 : _g.values) === null || _h === void 0 ? void 0 : _h.length)) && (React.createElement(rebass_1.Box, { mb: 2, className: `${baseClassName}__Item__Values` },
|
|
39
54
|
React.createElement(ValueSelector_1.ValueOptionsTags, { style: { marginRight: 0 }, readOnly: true, options: objectView.item.values, value: objectView.item.values, allowWrap: true, toIdentifier: (c) => c, toLabel: (c) => React.createElement(React.Fragment, null, c) })))),
|
|
40
|
-
|
|
55
|
+
suspendAction && unSuspendAction && (React.createElement(SimpleButton_1.default, { onMouseDown: handleSuspendUnSuspend, tone: isSuspended ? 'neutral' : 'success', variant: "text", icon: isSuspended ? 'play' : 'pause' })),
|
|
56
|
+
React.createElement(rebass_1.Flex, { ml: 1 }, deleteAction && (React.createElement(SimpleButton_1.default, { iconSize: ICON_SIZE, icon: "delete", variant: "text", onMouseDown: handleDelete, accessLevel: moduleAccessLevel })))));
|
|
41
57
|
};
|
|
42
58
|
exports.AdaptableObjectCompactListItem = AdaptableObjectCompactListItem;
|
|
43
59
|
const AdaptableObjectCompactList = (props) => {
|
|
44
|
-
var _a, _b, _c;
|
|
60
|
+
var _a, _b, _c, _d, _e;
|
|
61
|
+
const adaptable = AdaptableContext_1.useAdaptable();
|
|
45
62
|
const viewProperties = (_b = (_a = props.module).getViewProperties) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
46
63
|
const deleteAllAction = (_c = viewProperties === null || viewProperties === void 0 ? void 0 : viewProperties.getDeleteAllAction) === null || _c === void 0 ? void 0 : _c.call(viewProperties);
|
|
64
|
+
const suspendAllAction = (_d = viewProperties === null || viewProperties === void 0 ? void 0 : viewProperties.getSuspendAllAction) === null || _d === void 0 ? void 0 : _d.call(viewProperties);
|
|
65
|
+
const unSuspendAllAction = (_e = viewProperties === null || viewProperties === void 0 ? void 0 : viewProperties.getUnSuspendAllAction) === null || _e === void 0 ? void 0 : _e.call(viewProperties);
|
|
47
66
|
const dispatch = react_redux_1.useDispatch();
|
|
67
|
+
const accessLevel = adaptable.api.internalApi
|
|
68
|
+
.getEntitlementService()
|
|
69
|
+
.getEntitlementAccessLevelForModule(props.module.moduleInfo.ModuleName);
|
|
70
|
+
const isAtLeastOneAbObjectActive = props.abObjects.some((abObject) => {
|
|
71
|
+
return !abObject.IsSuspended;
|
|
72
|
+
});
|
|
73
|
+
const handleSuspendUnsuspendAll = React.useCallback((event) => {
|
|
74
|
+
event.stopPropagation();
|
|
75
|
+
event.preventDefault();
|
|
76
|
+
if (isAtLeastOneAbObjectActive) {
|
|
77
|
+
dispatch(suspendAllAction);
|
|
78
|
+
}
|
|
79
|
+
else {
|
|
80
|
+
dispatch(unSuspendAllAction);
|
|
81
|
+
}
|
|
82
|
+
}, [isAtLeastOneAbObjectActive]);
|
|
48
83
|
return (React.createElement(rebass_1.Flex, { flexDirection: "column", className: baseClassName },
|
|
49
84
|
React.createElement(rebass_1.Flex, { className: `${baseClassName}__Header`, fontSize: 3 },
|
|
50
85
|
React.createElement(rebass_1.Box, { className: `${baseClassName}__Title` }, props.module.moduleInfo.FriendlyName),
|
|
51
86
|
React.createElement(rebass_1.Box, { flex: 1 }),
|
|
52
|
-
|
|
87
|
+
suspendAllAction && unSuspendAllAction && (React.createElement(SimpleButton_1.default, { mr: 2, onMouseDown: handleSuspendUnsuspendAll, tone: isAtLeastOneAbObjectActive ? 'neutral' : 'success', variant: "raised", icon: isAtLeastOneAbObjectActive ? 'pause' : 'play', accessLevel: accessLevel }, isAtLeastOneAbObjectActive ? 'Suspend All' : 'Unsuspend All')),
|
|
88
|
+
deleteAllAction && (React.createElement(SimpleButton_1.default, { onMouseDown: () => dispatch(deleteAllAction), variant: "raised", tone: "neutral", accessLevel: accessLevel }, "Clear All"))),
|
|
53
89
|
React.createElement(rebass_1.Box, { className: `${baseClassName}__Body` }, props.abObjects.map((abObject) => {
|
|
54
90
|
return (React.createElement(exports.AdaptableObjectCompactListItem, { key: abObject.Uuid, abObject: abObject, module: props.module }));
|
|
55
91
|
}))));
|
|
@@ -28,7 +28,7 @@ const AdaptableObjectListItemView = (props) => {
|
|
|
28
28
|
labelEl = React.createElement(tag.label, { data: props.abObject });
|
|
29
29
|
}
|
|
30
30
|
labelEl = labelEl !== null && labelEl !== void 0 ? labelEl : tag.name;
|
|
31
|
-
return (React.createElement(rebass_1.Flex, { "data-name": tag.name, key: index
|
|
31
|
+
return (React.createElement(rebass_1.Flex, { "data-name": tag.name, key: `${index}-${tag.name}`, mb: 2, className: `${baseClassName}__row` },
|
|
32
32
|
React.createElement(rebass_1.Box, { className: `${baseClassName}__label`, mr: 3 },
|
|
33
33
|
labelEl,
|
|
34
34
|
props.showEditButton && (React.createElement(SimpleButton_1.default, { accessLevel: props.accessLevel, className: `${baseClassName}__edit-property`, ml: 1, icon: "edit", tooltip: "edit", iconSize: 18, variant: "text", onClick: () => {
|
|
@@ -15,10 +15,7 @@ class AdaptableObjectRow extends React.Component {
|
|
|
15
15
|
overflow: 'hidden',
|
|
16
16
|
}, "data-name": "list-group-cell", paddingLeft: 1, paddingRight: 1 }, colItem.Content)));
|
|
17
17
|
const className = join_1.default('ab-AdaptableObjectRow', this.props.isSuspended && 'ab-AdaptableObjectRow--is-suspended');
|
|
18
|
-
return (React.createElement(
|
|
19
|
-
React.createElement(rebass_1.Flex, { "data-name": "list-group-item", className: "list-group-item", alignItems: "center", padding: 2, margin: 0, style: {
|
|
20
|
-
overflowY: 'visible',
|
|
21
|
-
} }, colItems)));
|
|
18
|
+
return (React.createElement(rebass_1.Flex, { className: className, onClick: this.props.onClick, style: this.props.style }, colItems));
|
|
22
19
|
}
|
|
23
20
|
}
|
|
24
21
|
exports.AdaptableObjectRow = AdaptableObjectRow;
|
|
@@ -14,6 +14,7 @@ const AdaptableContext_1 = require("../../AdaptableContext");
|
|
|
14
14
|
const ButtonInfo_1 = require("../Buttons/ButtonInfo");
|
|
15
15
|
const DocumentationLinkConstants_1 = require("../../../Utilities/Constants/DocumentationLinkConstants");
|
|
16
16
|
const react_1 = require("react");
|
|
17
|
+
const PermittedValuesSelector_1 = require("../PermittedValuesSelector");
|
|
17
18
|
const isRuleValid = (abObject, api, context) => {
|
|
18
19
|
var _a, _b, _c, _d, _e, _f;
|
|
19
20
|
if (!((_a = abObject === null || abObject === void 0 ? void 0 : abObject.Rule) === null || _a === void 0 ? void 0 : _a.Predicate) && !((_b = abObject === null || abObject === void 0 ? void 0 : abObject.Rule) === null || _b === void 0 ? void 0 : _b.BooleanExpression)) {
|
|
@@ -46,8 +47,8 @@ QueryTab.defaultProps = {
|
|
|
46
47
|
};
|
|
47
48
|
const EntityRulesSummary = (props) => {
|
|
48
49
|
const { data } = props;
|
|
49
|
-
const { api: { predicateApi,
|
|
50
|
-
return (React.createElement(rebass_1.Text, { fontSize: 2 }, data.Rule.Predicate ? (React.createElement(React.Fragment, null, props.renderPredicate(predicateApi.predicateToString(data.Rule.Predicate)))) : (React.createElement(React.Fragment, null, props.renderQueryExpression(
|
|
50
|
+
const { api: { predicateApi, internalApi }, } = AdaptableContext_1.useAdaptable();
|
|
51
|
+
return (React.createElement(rebass_1.Text, { fontSize: 2 }, data.Rule.Predicate ? (React.createElement(React.Fragment, null, props.renderPredicate(predicateApi.predicateToString(data.Rule.Predicate)))) : (React.createElement(React.Fragment, null, props.renderQueryExpression(internalApi.getAdaptableQueryExpressionText(data.Rule))))));
|
|
51
52
|
};
|
|
52
53
|
exports.EntityRulesSummary = EntityRulesSummary;
|
|
53
54
|
const EntityRulesEditor = (props) => {
|
|
@@ -90,6 +91,19 @@ const EntityRulesEditor = (props) => {
|
|
|
90
91
|
const predicateId = data.Rule.Predicate != undefined ? data.Rule.Predicate.PredicateId : undefined;
|
|
91
92
|
const predicateInputs = predicateId ? (_a = data.Rule.Predicate.Inputs) !== null && _a !== void 0 ? _a : [] : [];
|
|
92
93
|
const currentPredicateDef = api.predicateApi.getPredicateDefById(predicateId);
|
|
94
|
+
const isValuesPredicateDef = (colDef) => colDef && ['Values', 'ExcludeValues'].includes(colDef.id);
|
|
95
|
+
const predicateDefsOptions = predicateDefs
|
|
96
|
+
.filter((def) => {
|
|
97
|
+
if (isValuesPredicateDef(def)) {
|
|
98
|
+
return 'ColumnIds' in data.Scope && data.Scope.ColumnIds.length === 1;
|
|
99
|
+
}
|
|
100
|
+
return true;
|
|
101
|
+
})
|
|
102
|
+
.map((item) => ({
|
|
103
|
+
value: item.id,
|
|
104
|
+
label: item.label,
|
|
105
|
+
onClick: () => onPredicateChange(item),
|
|
106
|
+
}));
|
|
93
107
|
const onPredicateInputChange = (e, index) => {
|
|
94
108
|
const { value } = e.target;
|
|
95
109
|
const newInputs = [...predicateInputs];
|
|
@@ -101,6 +115,14 @@ const EntityRulesEditor = (props) => {
|
|
|
101
115
|
},
|
|
102
116
|
} }));
|
|
103
117
|
};
|
|
118
|
+
const onPredicateValuesChange = (inputs) => {
|
|
119
|
+
props.onChange(Object.assign(Object.assign({}, data), { Rule: {
|
|
120
|
+
Predicate: {
|
|
121
|
+
PredicateId: predicateId,
|
|
122
|
+
Inputs: inputs,
|
|
123
|
+
},
|
|
124
|
+
} }));
|
|
125
|
+
};
|
|
104
126
|
const onPredicateChange = (item) => {
|
|
105
127
|
var _a;
|
|
106
128
|
if (item) {
|
|
@@ -146,14 +168,13 @@ const EntityRulesEditor = (props) => {
|
|
|
146
168
|
overflow: 'hidden',
|
|
147
169
|
textOverflow: 'ellipsis',
|
|
148
170
|
maxWidth: 'inherit',
|
|
149
|
-
}, placeholder: "Select Rule", showClearButton: !!data.Rule.Predicate, onClear: clearPredicate, items:
|
|
150
|
-
value: item.id,
|
|
151
|
-
label: item.label,
|
|
152
|
-
onClick: () => onPredicateChange(item),
|
|
153
|
-
})), columns: ['label'] }, currentPredicateDef ? currentPredicateDef.label : 'Select Rule'), (_b = currentPredicateDef === null || currentPredicateDef === void 0 ? void 0 : currentPredicateDef.inputs) === null || _b === void 0 ? void 0 :
|
|
171
|
+
}, placeholder: "Select Rule", showClearButton: !!data.Rule.Predicate, onClear: clearPredicate, items: predicateDefsOptions, columns: ['label'] }, currentPredicateDef ? currentPredicateDef.label : 'Select Rule'), (_b = currentPredicateDef === null || currentPredicateDef === void 0 ? void 0 : currentPredicateDef.inputs) === null || _b === void 0 ? void 0 :
|
|
154
172
|
_b.map((predicateDefInput, index) => (React.createElement(rebass_1.Flex, { key: predicateId + index, flexDirection: "column" },
|
|
155
173
|
index > 0 && React.createElement(HelpBlock_1.default, { marginTop: 2 }, "AND"),
|
|
156
174
|
React.createElement(AdaptableInput_1.default, { marginTop: 2, type: predicateDefInput.type, autoFocus: index === 0, value: predicateInputs[index], onChange: (e) => onPredicateInputChange(e, index) })))),
|
|
175
|
+
isValuesPredicateDef(currentPredicateDef) &&
|
|
176
|
+
'ColumnIds' in data.Scope &&
|
|
177
|
+
data.Scope.ColumnIds.length === 1 && (React.createElement(PermittedValuesSelector_1.PermitedValuesSelector, { onPredicateValuesChange: onPredicateValuesChange, predicate: data.Rule.Predicate, scope: data.Scope })),
|
|
157
178
|
showDocumentationLinks && (React.createElement(HelpBlock_1.default, { "data-name": "query-documentation", mt: 3, mb: 2, style: {
|
|
158
179
|
fontSize: 'var(--ab-font-size-3)',
|
|
159
180
|
padding: 0,
|
|
@@ -144,7 +144,7 @@ class FilterFormComponent extends React.Component {
|
|
|
144
144
|
React.createElement(Radio_1.default, { marginLeft: 2, flex: 1, checked: this.state.currentTab == 'predicates', onChange: () => this.setState({ currentTab: 'predicates' }) },
|
|
145
145
|
React.createElement(rebass_1.Flex, { fontSize: 'var( --ab-font-size-2)' }, "Filters")))),
|
|
146
146
|
this.state.currentTab === 'values' && (React.createElement("div", null,
|
|
147
|
-
React.createElement(ListBoxFilterForm_1.ListBoxFilterForm, { suppressClientSideFilter: this.state.suppressClientSideFilter, isLoading: this.state.isDistinctColumnValuesLoading, onFilterChange: this.handleFilterChange, currentColumn: this.props.currentColumn, columns: this.props.columns, columnDistinctValues: this.state.distinctColumnValues, dataType: this.props.currentColumn.dataType, uiSelectedColumnValues: uiSelectedColumnValues, useAgGridStyle: useAgGridStyle, onColumnValueSelectedChange: (list) => this.onColumnValuesChange(list) }))),
|
|
147
|
+
React.createElement(ListBoxFilterForm_1.ListBoxFilterForm, { disabled: this.isFilterDisabled(), suppressClientSideFilter: this.state.suppressClientSideFilter, isLoading: this.state.isDistinctColumnValuesLoading, onFilterChange: this.handleFilterChange, currentColumn: this.props.currentColumn, columns: this.props.columns, columnDistinctValues: this.state.distinctColumnValues, dataType: this.props.currentColumn.dataType, uiSelectedColumnValues: uiSelectedColumnValues, useAgGridStyle: useAgGridStyle, onColumnValueSelectedChange: (list) => this.onColumnValuesChange(list) }))),
|
|
148
148
|
this.state.currentTab === 'predicates' && (React.createElement("div", null,
|
|
149
149
|
' ',
|
|
150
150
|
this.state.showTab && React.createElement("hr", null),
|
|
@@ -157,7 +157,7 @@ class FilterFormComponent extends React.Component {
|
|
|
157
157
|
const { editedColumnFilter } = this.state;
|
|
158
158
|
const checked = ((_a = editedColumnFilter === null || editedColumnFilter === void 0 ? void 0 : editedColumnFilter.Predicate) === null || _a === void 0 ? void 0 : _a.PredicateId) === predicateDef.id;
|
|
159
159
|
return (React.createElement(rebass_1.Flex, { key: index, flexDirection: "column" },
|
|
160
|
-
React.createElement(Radio_1.default, { fontSize: 'var(--ab-font-size-2)', margin: 1, flex: 1, checked: checked, onChange: () => this.selectColumnPredicate(predicateDef) }, predicateDef.label),
|
|
160
|
+
React.createElement(Radio_1.default, { disabled: this.isFilterDisabled(), fontSize: 'var(--ab-font-size-2)', margin: 1, flex: 1, checked: checked, onChange: () => this.selectColumnPredicate(predicateDef) }, predicateDef.label),
|
|
161
161
|
React.createElement(rebass_1.Flex, { flexDirection: "column", flex: 0, marginLeft: 3, marginRight: 2 }, checked && this.renderPredicateInput(predicateDef, editedColumnFilter))));
|
|
162
162
|
}
|
|
163
163
|
renderPredicateInput(predicateDef, filter) {
|
|
@@ -165,7 +165,7 @@ class FilterFormComponent extends React.Component {
|
|
|
165
165
|
if ((predicateDef === null || predicateDef === void 0 ? void 0 : predicateDef.id) === 'BooleanToggle') {
|
|
166
166
|
// custom tri-state checkbox: true, false, all(indeterminate)
|
|
167
167
|
return (React.createElement(rebass_1.Flex, { flexDirection: "row", flex: 1, justifyContent: "center", alignItems: "center" },
|
|
168
|
-
React.createElement(CheckBox_1.CheckBox, { checked: filter.Predicate.Inputs[0] === 'true'
|
|
168
|
+
React.createElement(CheckBox_1.CheckBox, { disabled: this.isFilterDisabled(), checked: filter.Predicate.Inputs[0] === 'true'
|
|
169
169
|
? true
|
|
170
170
|
: filter.Predicate.Inputs[0] === 'false'
|
|
171
171
|
? false
|
|
@@ -181,12 +181,16 @@ class FilterFormComponent extends React.Component {
|
|
|
181
181
|
} })));
|
|
182
182
|
}
|
|
183
183
|
return (_a = predicateDef.inputs) === null || _a === void 0 ? void 0 : _a.map((predicateInput, index) => (React.createElement(rebass_1.Flex, { key: index, flexDirection: "row" },
|
|
184
|
-
React.createElement(AdaptableInput_1.default, { type: predicateInput.type, autoFocus: index === 0, value: filter.Predicate.Inputs[index], onChange: (e) => this.changeColumnPredicateInput(e.target.value, index), style: {
|
|
184
|
+
React.createElement(AdaptableInput_1.default, { disabled: this.isFilterDisabled(), type: predicateInput.type, autoFocus: index === 0, value: filter.Predicate.Inputs[index], onChange: (e) => this.changeColumnPredicateInput(e.target.value, index), style: {
|
|
185
185
|
marginBottom: 5,
|
|
186
186
|
flex: 1,
|
|
187
187
|
fontSize: 'var( --ab-font-size-2)',
|
|
188
188
|
} }))));
|
|
189
189
|
}
|
|
190
|
+
isFilterDisabled() {
|
|
191
|
+
var _a;
|
|
192
|
+
return Boolean((_a = this.state.editedColumnFilter) === null || _a === void 0 ? void 0 : _a.IsSuspended);
|
|
193
|
+
}
|
|
190
194
|
isFilterable() {
|
|
191
195
|
if (!this.props.currentColumn.filterable) {
|
|
192
196
|
return 'Column is not filterable';
|
|
@@ -58,6 +58,7 @@ const ListBoxFilterForm = (props) => {
|
|
|
58
58
|
children: distinctValue.label,
|
|
59
59
|
checked: isActive,
|
|
60
60
|
onChange: () => onClickItemColumnValue(distinctValue.value),
|
|
61
|
+
disabled: props.disabled,
|
|
61
62
|
});
|
|
62
63
|
}
|
|
63
64
|
return (React.createElement(ListGroupItem_1.default, { noZebra: props.useAgGridStyle, key: 'columnValue' + index, onClick: () => onClickItemColumnValue(distinctValue.value), active: isActive, value: distinctValue.value }, distinctValue.label));
|
|
@@ -56,7 +56,7 @@ class QuickFilterFormComponent extends React.Component {
|
|
|
56
56
|
};
|
|
57
57
|
}
|
|
58
58
|
componentDidMount() {
|
|
59
|
-
var _a, _b;
|
|
59
|
+
var _a, _b, _c;
|
|
60
60
|
if (this.hasValuesPredicate((_b = (_a = this.state) === null || _a === void 0 ? void 0 : _a.filter) === null || _b === void 0 ? void 0 : _b.Predicate)) {
|
|
61
61
|
this.loadPermittedValues();
|
|
62
62
|
}
|
|
@@ -67,6 +67,14 @@ class QuickFilterFormComponent extends React.Component {
|
|
|
67
67
|
// there is no way to find out if the changed rows are relevant for this filter, so we have to update it every time :/
|
|
68
68
|
this.handleGridValueChange();
|
|
69
69
|
});
|
|
70
|
+
if ((_c = this.props.api.internalApi.getAdaptableOptions().filterOptions) === null || _c === void 0 ? void 0 : _c.showDistinctFilteredValuesOnly) {
|
|
71
|
+
this.props.api.internalApi.getAdaptableInstance()._on('GridFiltered', () => {
|
|
72
|
+
const filter = this.getFilterFromProps();
|
|
73
|
+
if (this.hasValuesPredicate(filter === null || filter === void 0 ? void 0 : filter.Predicate)) {
|
|
74
|
+
this.loadPermittedValues();
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
}
|
|
70
78
|
}
|
|
71
79
|
componentWillUnmount() {
|
|
72
80
|
var _a, _b;
|
|
@@ -74,6 +82,9 @@ class QuickFilterFormComponent extends React.Component {
|
|
|
74
82
|
(_a = this.unsubscribeOnCellChanged) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
75
83
|
(_b = this.unsubscribeOnGridDataChanged) === null || _b === void 0 ? void 0 : _b.call(this);
|
|
76
84
|
}
|
|
85
|
+
isFilterDisabled() {
|
|
86
|
+
return Boolean(this.state.filter.IsSuspended);
|
|
87
|
+
}
|
|
77
88
|
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
78
89
|
const filter = this.getFilterFromProps(nextProps);
|
|
79
90
|
if (isEqual_1.default(filter, this.state.filter)) {
|
|
@@ -142,7 +153,7 @@ class QuickFilterFormComponent extends React.Component {
|
|
|
142
153
|
React.createElement("span", { style: { width: 20, marginRight: 10 } },
|
|
143
154
|
React.createElement(icons_1.Icon, { name: "delete" })),
|
|
144
155
|
"Clear"))),
|
|
145
|
-
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) },
|
|
156
|
+
predicateDefs.map((p) => (React.createElement(SimpleButton_1.default, { disabled: this.isFilterDisabled(), 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) },
|
|
146
157
|
React.createElement("span", { style: { width: 20, marginRight: 10 } }, this.renderPredicateIcon(p)),
|
|
147
158
|
p.label))))) },
|
|
148
159
|
React.createElement(SimpleButton_1.default, { style: {
|
|
@@ -161,7 +172,7 @@ class QuickFilterFormComponent extends React.Component {
|
|
|
161
172
|
return this.renderValuesDropdown(filter);
|
|
162
173
|
}
|
|
163
174
|
return (activePredicateDef &&
|
|
164
|
-
(activePredicateDef === null || activePredicateDef === void 0 ? void 0 : activePredicateDef.inputs) === undefined && (React.createElement(rebass_1.Box, { p: 1, alignSelf: "center" }, activePredicateDef.label)));
|
|
175
|
+
(activePredicateDef === null || activePredicateDef === void 0 ? void 0 : activePredicateDef.inputs) === undefined && (React.createElement(rebass_1.Box, { color: this.isFilterDisabled() && 'var(--ab-color-text-on-primary)', disabled: this.isFilterDisabled(), p: 1, alignSelf: "center" }, activePredicateDef.label)));
|
|
165
176
|
}
|
|
166
177
|
renderPredicateIcon(predicateDef) {
|
|
167
178
|
if (!predicateDef || !predicateDef.icon) {
|
|
@@ -179,7 +190,7 @@ class QuickFilterFormComponent extends React.Component {
|
|
|
179
190
|
if ((predicateDef === null || predicateDef === void 0 ? void 0 : predicateDef.id) === 'BooleanToggle') {
|
|
180
191
|
// custom tri-state checkbox: 'checked', 'unchecked', 'all'
|
|
181
192
|
return (React.createElement(rebass_1.Flex, { flexDirection: "row", flex: 1, justifyContent: "center", alignItems: "center", style: { position: 'absolute', left: 0, right: 0, bottom: 0, top: 0 } },
|
|
182
|
-
React.createElement(CheckBox_1.CheckBox, { checked: filter.Predicate.Inputs[0] === 'checked'
|
|
193
|
+
React.createElement(CheckBox_1.CheckBox, { disabled: this.isFilterDisabled(), checked: filter.Predicate.Inputs[0] === 'checked'
|
|
183
194
|
? true
|
|
184
195
|
: filter.Predicate.Inputs[0] === 'unchecked'
|
|
185
196
|
? false
|
|
@@ -196,7 +207,7 @@ class QuickFilterFormComponent extends React.Component {
|
|
|
196
207
|
}
|
|
197
208
|
return (_a = predicateDef === null || predicateDef === void 0 ? void 0 : predicateDef.inputs) === null || _a === void 0 ? void 0 : _a.map((predicateInput, index) => {
|
|
198
209
|
var _a, _b;
|
|
199
|
-
return (React.createElement(AdaptableInput_1.default, { key: index, type: predicateInput.type === 'number' ? 'text' : predicateInput.type,
|
|
210
|
+
return (React.createElement(AdaptableInput_1.default, { disabled: this.isFilterDisabled(), key: index, type: predicateInput.type === 'number' ? 'text' : predicateInput.type,
|
|
200
211
|
// autoFocus has to be FALSE because if the input receives focus in the init phase,
|
|
201
212
|
// it may scroll the ag-grid header viewport into view and de-synchronize it (relative to the content viewport)
|
|
202
213
|
autoFocus: false, value: (_b = (_a = filter.Predicate.Inputs) === null || _a === void 0 ? void 0 : _a[index]) !== null && _b !== void 0 ? _b : '', onChange: (e) => this.changeColumnPredicateInput(e.target.value, index), onKeyDownCapture: (e) => {
|
|
@@ -266,7 +277,7 @@ class QuickFilterFormComponent extends React.Component {
|
|
|
266
277
|
React.createElement(SimpleButton_1.default, { onClick: () => this.clearFilter() }, "Clear Filter"),
|
|
267
278
|
((_a = this.props.api.internalApi.getAdaptableOptions().filterOptions) === null || _a === void 0 ? void 0 : _a.autoApplyFilter) ==
|
|
268
279
|
false && (React.createElement(SimpleButton_1.default, { ml: 2, onClick: () => this.updateFilter(this.state.filter) }, "Apply Filter"))),
|
|
269
|
-
React.createElement(ListBoxFilterForm_1.ListBoxFilterForm, { suppressClientSideFilter: this.state.suppressClientSideFilter, isLoading: this.state.isDistinctColumnValuesLoading, onFilterChange: this.handleFilterChange, currentColumn: this.props.currentColumn, columns: [], columnDistinctValues: this.state.distinctColumnValues, dataType: this.props.currentColumn.dataType, uiSelectedColumnValues: this.state.filter.Predicate.Inputs.filter((input) => input !== ''), useAgGridStyle: true, onColumnValueSelectedChange: (list) => this.onColumnValuesChange(list) })));
|
|
280
|
+
React.createElement(ListBoxFilterForm_1.ListBoxFilterForm, { disabled: this.isFilterDisabled(), suppressClientSideFilter: this.state.suppressClientSideFilter, isLoading: this.state.isDistinctColumnValuesLoading, onFilterChange: this.handleFilterChange, currentColumn: this.props.currentColumn, columns: [], columnDistinctValues: this.state.distinctColumnValues, dataType: this.props.currentColumn.dataType, uiSelectedColumnValues: this.state.filter.Predicate.Inputs.filter((input) => input !== ''), useAgGridStyle: true, onColumnValueSelectedChange: (list) => this.onColumnValuesChange(list) })));
|
|
270
281
|
} },
|
|
271
282
|
React.createElement(SimpleButton_1.default, { style: {
|
|
272
283
|
flex: 1,
|
|
@@ -276,7 +287,8 @@ class QuickFilterFormComponent extends React.Component {
|
|
|
276
287
|
borderRadius: 0,
|
|
277
288
|
borderLeftWidth: 0,
|
|
278
289
|
borderColor: 'var(--ab-color-primarydark)',
|
|
279
|
-
}, disabled:
|
|
290
|
+
}, disabled: this.isFilterDisabled() ||
|
|
291
|
+
ArrayExtensions_1.default.IsNullOrEmptyOrContainsSingleEmptyValue(this.state.distinctColumnValues) }, selectedValues)));
|
|
280
292
|
}
|
|
281
293
|
onColumnValuesChange(columnValues) {
|
|
282
294
|
var _a;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ScopeColumnIds } from '../../../PredefinedConfig/Common/AdaptableScope';
|
|
3
|
+
import { AdaptablePredicate } from '../../../types';
|
|
4
|
+
export interface PermitedValuesSelectorProps {
|
|
5
|
+
scope: ScopeColumnIds;
|
|
6
|
+
onPredicateValuesChange: (inputs: any[]) => void;
|
|
7
|
+
predicate: AdaptablePredicate;
|
|
8
|
+
}
|
|
9
|
+
export declare const PermitedValuesSelector: React.FunctionComponent<PermitedValuesSelectorProps>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PermitedValuesSelector = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const React = tslib_1.__importStar(require("react"));
|
|
6
|
+
const rebass_1 = require("rebass");
|
|
7
|
+
const OverlayTrigger_1 = tslib_1.__importDefault(require("../../../components/OverlayTrigger"));
|
|
8
|
+
const SimpleButton_1 = tslib_1.__importDefault(require("../../../components/SimpleButton"));
|
|
9
|
+
const AdaptableContext_1 = require("../../AdaptableContext");
|
|
10
|
+
const ListBoxFilterForm_1 = require("../FilterForm/ListBoxFilterForm");
|
|
11
|
+
const PermitedValuesSelector = (props) => {
|
|
12
|
+
var _a;
|
|
13
|
+
const adaptable = AdaptableContext_1.useAdaptable();
|
|
14
|
+
const columnId = props.scope.ColumnIds[0];
|
|
15
|
+
const column = adaptable.api.columnApi.getColumnFromId(columnId);
|
|
16
|
+
const distinctValues = ((_a = adaptable.api.columnApi.getDistinctDisplayValuesForColumn(columnId)) !== null && _a !== void 0 ? _a : []).map((value) => ({ value: value, label: value }));
|
|
17
|
+
const predicateInputs = props.predicate.Inputs;
|
|
18
|
+
const isClearDisabled = predicateInputs.filter((item) => item !== undefined || item !== null || item !== '')
|
|
19
|
+
.length === 0;
|
|
20
|
+
const popupContent = (React.createElement(rebass_1.Flex, { className: "ab-PermitedValuesSelector__PopupContent", padding: 1, flexDirection: "column" },
|
|
21
|
+
React.createElement(ListBoxFilterForm_1.ListBoxFilterForm, { currentColumn: column, columns: [], columnDistinctValues: distinctValues, dataType: column.dataType, uiSelectedColumnValues: props.predicate.Inputs, useAgGridStyle: true, onColumnValueSelectedChange: (list) => props.onPredicateValuesChange(list) })));
|
|
22
|
+
return (React.createElement(rebass_1.Box, { className: "ab-PermitedValuesSelector", mt: 2 },
|
|
23
|
+
React.createElement(rebass_1.Box, { flex: 1 },
|
|
24
|
+
React.createElement(OverlayTrigger_1.default, { render: () => popupContent },
|
|
25
|
+
React.createElement(SimpleButton_1.default, { width: "100%", mb: 2 }, (predicateInputs === null || predicateInputs === void 0 ? void 0 : predicateInputs.join(', ')) || 'No Selected values'))),
|
|
26
|
+
React.createElement(SimpleButton_1.default, { disabled: isClearDisabled, onClick: () => props.onPredicateValuesChange([]) }, "Clear Values")));
|
|
27
|
+
};
|
|
28
|
+
exports.PermitedValuesSelector = PermitedValuesSelector;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { PermitedValuesSelector } from './PermitedValuesSelector';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PermitedValuesSelector = void 0;
|
|
4
|
+
var PermitedValuesSelector_1 = require("./PermitedValuesSelector");
|
|
5
|
+
Object.defineProperty(exports, "PermitedValuesSelector", { enumerable: true, get: function () { return PermitedValuesSelector_1.PermitedValuesSelector; } });
|