@adaptabletools/adaptable 12.0.7 → 12.1.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 +231 -120
- package/bundle.cjs.js +142 -114
- package/index.css +268 -130
- package/package.json +3 -3
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +1 -0
- package/src/AdaptableOptions/SettingsPanelOptions.d.ts +1 -2
- package/src/Api/ColumnApi.d.ts +5 -0
- package/src/Api/EventApi.d.ts +13 -1
- package/src/Api/Events/AdaptableStateReloaded.d.ts +23 -0
- package/src/Api/Events/AdaptableStateReloaded.js +2 -0
- package/src/Api/FilterApi.d.ts +15 -1
- package/src/Api/Implementation/CalculatedColumnApiImpl.js +2 -3
- package/src/Api/Implementation/ColumnApiImpl.d.ts +2 -0
- package/src/Api/Implementation/ColumnApiImpl.js +10 -0
- package/src/Api/Implementation/ConfigApiImpl.js +11 -0
- package/src/Api/Implementation/FilterApiImpl.d.ts +6 -1
- package/src/Api/Implementation/FilterApiImpl.js +58 -0
- package/src/Api/Implementation/LayoutApiImpl.d.ts +2 -1
- package/src/Api/Implementation/LayoutApiImpl.js +8 -16
- package/src/Api/Implementation/ScheduleApiImpl.js +4 -1
- package/src/PredefinedConfig/Common/AdaptableIcon.d.ts +1 -1
- package/src/PredefinedConfig/Common/AdaptablePredicate.d.ts +7 -2
- package/src/PredefinedConfig/Common/CellSummary.d.ts +2 -6
- package/src/PredefinedConfig/LayoutState.d.ts +2 -0
- package/src/PredefinedConfig/ScheduleState.d.ts +4 -0
- package/src/Redux/Store/AdaptableStore.js +12 -6
- package/src/Strategy/AdaptableModuleBase.d.ts +2 -0
- package/src/Strategy/AdaptableModuleBase.js +6 -0
- package/src/Strategy/AlertModule.js +2 -2
- package/src/Strategy/CalculatedColumnModule.d.ts +2 -0
- package/src/Strategy/CalculatedColumnModule.js +4 -0
- package/src/Strategy/CellSummaryModule.js +4 -3
- package/src/Strategy/CustomSortModule.js +2 -2
- package/src/Strategy/ExportModule.js +2 -2
- package/src/Strategy/FlashingCellModule.js +3 -3
- package/src/Strategy/FormatColumnModule.js +2 -2
- package/src/Strategy/LayoutModule.js +10 -17
- package/src/Strategy/ShortcutModule.js +1 -1
- package/src/Strategy/TeamSharingModule.js +4 -2
- package/src/Strategy/Utilities/{getAlertBehaviourViewItems.d.ts → Alert/getAlertBehaviourViewItems.d.ts} +0 -0
- package/src/Strategy/Utilities/{getAlertBehaviourViewItems.js → Alert/getAlertBehaviourViewItems.js} +2 -2
- package/src/Strategy/Utilities/{getAlertPreviewViewItems.d.ts → Alert/getAlertPreviewViewItems.d.ts} +2 -2
- package/src/Strategy/Utilities/{getAlertPreviewViewItems.js → Alert/getAlertPreviewViewItems.js} +2 -2
- package/src/Strategy/Utilities/{getCustomSortColumnViewItems.d.ts → CustomSort/getCustomSortColumnViewItems.d.ts} +1 -1
- package/src/Strategy/Utilities/{getCustomSortColumnViewItems.js → CustomSort/getCustomSortColumnViewItems.js} +0 -0
- package/src/Strategy/Utilities/{getCustomSortSortOrderViewItems.d.ts → CustomSort/getCustomSortSortOrderViewItems.d.ts} +1 -1
- package/src/Strategy/Utilities/{getCustomSortSortOrderViewItems.js → CustomSort/getCustomSortSortOrderViewItems.js} +0 -0
- package/src/Strategy/Utilities/Export/getExportColumnsViewItems.d.ts +3 -0
- package/src/Strategy/Utilities/{getExportColumnsViewItems.js → Export/getExportColumnsViewItems.js} +0 -0
- package/src/Strategy/Utilities/{getExportRowsViewItems.d.ts → Export/getExportRowsViewItems.d.ts} +0 -0
- package/src/Strategy/Utilities/{getExportRowsViewItems.js → Export/getExportRowsViewItems.js} +0 -0
- package/src/Strategy/Utilities/{getFlashingCellDurationViewItems.d.ts → FlashingCell/getFlashingCellDurationViewItems.d.ts} +1 -1
- package/src/Strategy/Utilities/{getFlashingCellDurationViewItems.js → FlashingCell/getFlashingCellDurationViewItems.js} +0 -0
- package/src/Strategy/Utilities/{getFlashingCellStyleViewItems.d.ts → FlashingCell/getFlashingCellStyleViewItems.d.ts} +1 -1
- package/src/Strategy/Utilities/{getFlashingCellStyleViewItems.js → FlashingCell/getFlashingCellStyleViewItems.js} +1 -1
- package/src/Strategy/Utilities/{getFlashingTargetViewItems.d.ts → FlashingCell/getFlashingTargetViewItems.d.ts} +1 -1
- package/src/Strategy/Utilities/{getFlashingTargetViewItems.js → FlashingCell/getFlashingTargetViewItems.js} +0 -0
- package/src/Strategy/Utilities/{getFormatColumnSettingsViewItems.d.ts → FormatColumn/getFormatColumnSettingsViewItems.d.ts} +1 -1
- package/src/Strategy/Utilities/{getFormatColumnSettingsViewItems.js → FormatColumn/getFormatColumnSettingsViewItems.js} +0 -0
- package/src/Strategy/Utilities/{getFormatColumnStyleViewItems.d.ts → FormatColumn/getFormatColumnStyleViewItems.d.ts} +0 -0
- package/src/Strategy/Utilities/{getFormatColumnStyleViewItems.js → FormatColumn/getFormatColumnStyleViewItems.js} +1 -1
- package/src/Strategy/Utilities/Layout/getLayoutFilterViewItems.d.ts +5 -0
- package/src/Strategy/Utilities/Layout/getLayoutFilterViewItems.js +24 -0
- package/src/Strategy/Utilities/Layout/getLayoutSortViewItems.d.ts +5 -0
- package/src/Strategy/Utilities/Layout/getLayoutSortViewItems.js +14 -0
- package/src/Strategy/Utilities/{getShortcutSettingsViewItems.d.ts → Shortcut/getShortcutSettingsViewItems.d.ts} +1 -1
- package/src/Strategy/Utilities/{getShortcutSettingsViewItems.js → Shortcut/getShortcutSettingsViewItems.js} +0 -0
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.d.ts +4 -2
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +144 -0
- package/src/Utilities/ExpressionFunctions/scalarAggregationHelper.d.ts +1 -1
- package/src/Utilities/ExpressionFunctions/scalarAggregationHelper.js +6 -6
- package/src/Utilities/ObjectFactory.d.ts +1 -1
- package/src/Utilities/ObjectFactory.js +12 -11
- package/src/Utilities/Services/CalculatedColumnExpressionService.js +50 -11
- package/src/View/AdaptableView.js +3 -2
- package/src/View/Components/AdaptableObjectList/AdaptableObjectList.d.ts +27 -1
- package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +46 -36
- package/src/View/Components/FilterForm/ListBoxFilterForm.js +5 -4
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupModuleView.js +4 -2
- package/src/View/Components/Popups/AdaptableToaster.js +16 -33
- package/src/View/Components/ValueSelector/index.d.ts +10 -1
- package/src/View/Components/ValueSelector/index.js +16 -8
- package/src/View/FormatColumn/FormatColumnSummary.js +2 -1
- package/src/View/Layout/Wizard/LayoutEditor/index.js +1 -1
- package/src/View/Layout/Wizard/LayoutWizard.d.ts +4 -7
- package/src/View/Layout/Wizard/LayoutWizard.js +127 -13
- package/src/View/Layout/Wizard/sections/AggregationsSection.d.ts +8 -0
- package/src/View/Layout/Wizard/sections/AggregationsSection.js +102 -0
- package/src/View/Layout/Wizard/sections/ColumnsSection.d.ts +8 -0
- package/src/View/Layout/Wizard/sections/ColumnsSection.js +226 -0
- package/src/View/Layout/Wizard/sections/FilterSection.d.ts +8 -0
- package/src/View/Layout/Wizard/sections/FilterSection.js +35 -0
- package/src/View/Layout/Wizard/sections/PivotColumnsSection.d.ts +8 -0
- package/src/View/Layout/Wizard/sections/PivotColumnsSection.js +39 -0
- package/src/View/Layout/Wizard/sections/RowGroupingSection.d.ts +8 -0
- package/src/View/Layout/Wizard/sections/RowGroupingSection.js +46 -0
- package/src/View/Layout/Wizard/sections/SettingsSection.d.ts +8 -0
- package/src/View/Layout/Wizard/sections/SettingsSection.js +51 -0
- package/src/View/Layout/Wizard/sections/SortSection.d.ts +8 -0
- package/src/View/Layout/Wizard/sections/SortSection.js +69 -0
- package/src/View/Layout/Wizard/sections/Utilities.d.ts +2 -0
- package/src/View/Layout/Wizard/sections/Utilities.js +5 -0
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReminder.js +7 -2
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReport.js +2 -2
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsSummary.js +4 -0
- package/src/View/StatusBar/StatusBarPanel.js +1 -1
- package/src/View/Wizard/OnePageAdaptableWizard.d.ts +1 -0
- package/src/View/Wizard/OnePageAdaptableWizard.js +3 -3
- package/src/View/Wizard/OnePageWizards.d.ts +1 -0
- package/src/View/Wizard/OnePageWizards.js +1 -1
- package/src/agGrid/Adaptable.d.ts +3 -0
- package/src/agGrid/Adaptable.js +47 -10
- package/src/agGrid/agGridHelper.js +11 -1
- package/src/components/ExpressionEditor/editorButtonsAggregatedScalar.js +5 -0
- package/src/components/ExpressionEditor/index.js +1 -1
- package/src/components/Tabs/index.js +4 -2
- package/src/components/icons/arrow-down-long.d.ts +3 -0
- package/src/components/icons/arrow-down-long.js +7 -0
- package/src/components/icons/arrow-up-long.d.ts +3 -0
- package/src/components/icons/arrow-up-long.js +7 -0
- package/src/components/icons/index.js +4 -0
- package/src/metamodel/adaptable.metamodel.d.ts +9 -0
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/types.d.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/src/Strategy/Utilities/getExportColumnsViewItems.d.ts +0 -3
- package/src/View/Layout/LayoutEntityRow.d.ts +0 -13
- package/src/View/Layout/LayoutEntityRow.js +0 -23
- package/src/View/Layout/LayoutPopup.d.ts +0 -32
- package/src/View/Layout/LayoutPopup.js +0 -153
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RowGroupingSection = exports.RowGroupingSectionSummary = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const React = tslib_1.__importStar(require("react"));
|
|
6
|
+
const rebass_1 = require("rebass");
|
|
7
|
+
const FormLayout_1 = tslib_1.__importStar(require("../../../../components/FormLayout"));
|
|
8
|
+
const Utilities_1 = require("./Utilities");
|
|
9
|
+
const Tabs_1 = require("../../../../components/Tabs");
|
|
10
|
+
const Tag_1 = require("../../../../components/Tag");
|
|
11
|
+
const sortWithOrder_1 = require("../../../../Utilities/sortWithOrder");
|
|
12
|
+
const AdaptableContext_1 = require("../../../AdaptableContext");
|
|
13
|
+
const ValueSelector_1 = require("../../../Components/ValueSelector");
|
|
14
|
+
const OnePageAdaptableWizard_1 = require("../../../Wizard/OnePageAdaptableWizard");
|
|
15
|
+
const RowGroupingSectionSummary = () => {
|
|
16
|
+
var _a;
|
|
17
|
+
const adaptable = AdaptableContext_1.useAdaptable();
|
|
18
|
+
const { data: layout } = OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext();
|
|
19
|
+
return (React.createElement(rebass_1.Box, null, ((_a = layout.RowGroupedColumns) === null || _a === void 0 ? void 0 : _a.length) ? (layout.RowGroupedColumns.map((columnId) => (React.createElement(Tag_1.Tag, { mr: 1, key: columnId }, adaptable.api.columnApi.getFriendlyNameFromColumnId(columnId))))) : (React.createElement(Tag_1.Tag, null, "No Row Grouping"))));
|
|
20
|
+
};
|
|
21
|
+
exports.RowGroupingSectionSummary = RowGroupingSectionSummary;
|
|
22
|
+
const RowGroupingSection = (props) => {
|
|
23
|
+
var _a, _b, _c;
|
|
24
|
+
const adaptable = AdaptableContext_1.useAdaptable();
|
|
25
|
+
const { data: layout } = OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext();
|
|
26
|
+
const allGroupableColumns = adaptable.api.columnApi.getGroupableColumns();
|
|
27
|
+
const sortedGroupableColumns = React.useMemo(() => {
|
|
28
|
+
var _a;
|
|
29
|
+
return sortWithOrder_1.sortWithOrderArray(allGroupableColumns.map((col) => col.columnId), (_a = layout.RowGroupedColumns) !== null && _a !== void 0 ? _a : [], { sortUnorderedItems: true }).map((colId) => adaptable.api.columnApi.getColumnFromId(colId));
|
|
30
|
+
}, [layout, allGroupableColumns]);
|
|
31
|
+
const handleColumnsChange = (columnIds) => {
|
|
32
|
+
props.onChange(Object.assign(Object.assign({}, layout), { RowGroupedColumns: columnIds }));
|
|
33
|
+
};
|
|
34
|
+
return (React.createElement(Tabs_1.Tabs, { style: { height: '100%' } },
|
|
35
|
+
React.createElement(Tabs_1.Tabs.Tab, null, "Grouped Rows"),
|
|
36
|
+
((_a = layout.ExpandedRowGroupValues) === null || _a === void 0 ? void 0 : _a.length) && React.createElement(Tabs_1.Tabs.Tab, null, "Expanded Rows"),
|
|
37
|
+
React.createElement(Tabs_1.Tabs.Content, null,
|
|
38
|
+
React.createElement(ValueSelector_1.ValueSelector, { showFilterInput: true, showSelectedOnlyPosition: "top", filter: Utilities_1.columnFilter, toIdentifier: (option) => `${option.columnId}`, toLabel: (option) => { var _a; return (_a = option.friendlyName) !== null && _a !== void 0 ? _a : option.columnId; }, options: sortedGroupableColumns, value: (_b = layout.RowGroupedColumns) !== null && _b !== void 0 ? _b : [], allowReorder: true, xSelectedLabel: () => {
|
|
39
|
+
return `Selected Columns:`;
|
|
40
|
+
}, onChange: handleColumnsChange })),
|
|
41
|
+
((_c = layout.ExpandedRowGroupValues) === null || _c === void 0 ? void 0 : _c.length) && (React.createElement(Tabs_1.Tabs.Content, null,
|
|
42
|
+
React.createElement(rebass_1.Box, { backgroundColor: "var(--ab-color-defaultbackground)" },
|
|
43
|
+
React.createElement(FormLayout_1.default, { p: 2 },
|
|
44
|
+
React.createElement(FormLayout_1.FormRow, { label: "Values" }, layout.ExpandedRowGroupValues.map((value, index) => (React.createElement(Tag_1.Tag, { mb: 2, mr: 2, key: index }, value))))))))));
|
|
45
|
+
};
|
|
46
|
+
exports.RowGroupingSection = RowGroupingSection;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Layout } from '../../../../../types';
|
|
3
|
+
export declare const SettingsSectionSummary: React.FunctionComponent;
|
|
4
|
+
interface SettingsSectionProps {
|
|
5
|
+
onChange: (data: Layout) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const SettingsSection: React.FunctionComponent<SettingsSectionProps>;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SettingsSection = exports.SettingsSectionSummary = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const React = tslib_1.__importStar(require("react"));
|
|
6
|
+
const rebass_1 = require("rebass");
|
|
7
|
+
const FormLayout_1 = tslib_1.__importStar(require("../../../../components/FormLayout"));
|
|
8
|
+
const Input_1 = tslib_1.__importDefault(require("../../../../components/Input"));
|
|
9
|
+
const Radio_1 = tslib_1.__importDefault(require("../../../../components/Radio"));
|
|
10
|
+
const Tabs_1 = require("../../../../components/Tabs");
|
|
11
|
+
const Tag_1 = require("../../../../components/Tag");
|
|
12
|
+
const OnePageAdaptableWizard_1 = require("../../../Wizard/OnePageAdaptableWizard");
|
|
13
|
+
const SettingsSectionSummary = () => {
|
|
14
|
+
const { data: layout } = OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext();
|
|
15
|
+
return (React.createElement(rebass_1.Box, null,
|
|
16
|
+
React.createElement(Tag_1.Tag, { mr: 2 },
|
|
17
|
+
"Layout Name: ",
|
|
18
|
+
layout.Name),
|
|
19
|
+
React.createElement(Tag_1.Tag, { mr: 2 },
|
|
20
|
+
"Pivot Layout: ",
|
|
21
|
+
layout.EnablePivot ? 'Yes' : 'No'),
|
|
22
|
+
React.createElement(Tag_1.Tag, { mr: 2 },
|
|
23
|
+
"Suppress Aggregation Function in Header: ",
|
|
24
|
+
layout.SuppressAggFuncInHeader ? 'Yes' : 'No')));
|
|
25
|
+
};
|
|
26
|
+
exports.SettingsSectionSummary = SettingsSectionSummary;
|
|
27
|
+
const SettingsSection = (props) => {
|
|
28
|
+
var _a;
|
|
29
|
+
const { data: layout } = OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext();
|
|
30
|
+
const onNameChange = (event) => {
|
|
31
|
+
props.onChange(Object.assign(Object.assign({}, layout), { Name: event.target.value }));
|
|
32
|
+
};
|
|
33
|
+
const handlePivotChange = (checked) => {
|
|
34
|
+
props.onChange(Object.assign(Object.assign({}, layout), { EnablePivot: checked }));
|
|
35
|
+
};
|
|
36
|
+
return (React.createElement(React.Fragment, null,
|
|
37
|
+
React.createElement(Tabs_1.Tabs, { mb: 3 },
|
|
38
|
+
React.createElement(Tabs_1.Tabs.Tab, null, "Settings"),
|
|
39
|
+
React.createElement(Tabs_1.Tabs.Content, null,
|
|
40
|
+
React.createElement(rebass_1.Flex, { flexDirection: "row" },
|
|
41
|
+
React.createElement(FormLayout_1.default, { width: "100%", style: { maxWidth: 300 } },
|
|
42
|
+
React.createElement(FormLayout_1.FormRow, { label: "Name" },
|
|
43
|
+
React.createElement(Input_1.default, { width: "100%", "data-name": "layout-name", onChange: onNameChange, value: (_a = layout === null || layout === void 0 ? void 0 : layout.Name) !== null && _a !== void 0 ? _a : '' })))))),
|
|
44
|
+
React.createElement(Tabs_1.Tabs, { mb: 2 },
|
|
45
|
+
React.createElement(Tabs_1.Tabs.Tab, null, "Grid Type"),
|
|
46
|
+
React.createElement(Tabs_1.Tabs.Content, null,
|
|
47
|
+
React.createElement(rebass_1.Flex, { flexDirection: "column" },
|
|
48
|
+
React.createElement(Radio_1.default, { onClick: () => handlePivotChange(false), checked: !Boolean(layout.EnablePivot) }, "Table"),
|
|
49
|
+
React.createElement(Radio_1.default, { onClick: () => handlePivotChange(true), checked: Boolean(layout.EnablePivot) }, "Pivot"))))));
|
|
50
|
+
};
|
|
51
|
+
exports.SettingsSection = SettingsSection;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Layout } from '../../../../../types';
|
|
3
|
+
export declare const SortSectionSummary: React.FunctionComponent;
|
|
4
|
+
interface SortSectionProps {
|
|
5
|
+
onChange: (data: Layout) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const SortSection: React.FunctionComponent<SortSectionProps>;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SortSection = exports.SortSectionSummary = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const React = tslib_1.__importStar(require("react"));
|
|
6
|
+
const rebass_1 = require("rebass");
|
|
7
|
+
const SimpleButton_1 = tslib_1.__importDefault(require("../../../../components/SimpleButton"));
|
|
8
|
+
const Tabs_1 = require("../../../../components/Tabs");
|
|
9
|
+
const Tag_1 = require("../../../../components/Tag");
|
|
10
|
+
const getLayoutSortViewItems_1 = require("../../../../Strategy/Utilities/Layout/getLayoutSortViewItems");
|
|
11
|
+
const sortWithOrder_1 = require("../../../../Utilities/sortWithOrder");
|
|
12
|
+
const AdaptableContext_1 = require("../../../AdaptableContext");
|
|
13
|
+
const ValueSelector_1 = require("../../../Components/ValueSelector");
|
|
14
|
+
const OnePageAdaptableWizard_1 = require("../../../Wizard/OnePageAdaptableWizard");
|
|
15
|
+
const Utilities_1 = require("./Utilities");
|
|
16
|
+
const SortSectionSummary = () => {
|
|
17
|
+
const { data: layout } = OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext();
|
|
18
|
+
const adaptable = AdaptableContext_1.useAdaptable();
|
|
19
|
+
const sortViewItems = getLayoutSortViewItems_1.getLayoutSortViewItems(layout, adaptable.api);
|
|
20
|
+
return (React.createElement(rebass_1.Box, null, sortViewItems.values.length ? (sortViewItems.values.map((value) => (React.createElement(Tag_1.Tag, { key: value, mb: 1, mr: 1 }, value)))) : (React.createElement(Tag_1.Tag, null, "No Sorts"))));
|
|
21
|
+
};
|
|
22
|
+
exports.SortSectionSummary = SortSectionSummary;
|
|
23
|
+
const ColumnRow = (props) => {
|
|
24
|
+
var _a, _b, _c;
|
|
25
|
+
const SortOrder = (_c = ((_b = (_a = props.layout) === null || _a === void 0 ? void 0 : _a.ColumnSorts) !== null && _b !== void 0 ? _b : []).find((sort) => sort.ColumnId === props.column.columnId)) === null || _c === void 0 ? void 0 : _c.SortOrder;
|
|
26
|
+
const icon = SortOrder === 'Asc' ? 'sort-asc' : 'sort-desc';
|
|
27
|
+
return (React.createElement(rebass_1.Box, null,
|
|
28
|
+
props.column.friendlyName,
|
|
29
|
+
SortOrder && (React.createElement(SimpleButton_1.default, { ml: 2, onClick: () => props.onSortChange(props.column.columnId, SortOrder === 'Asc' ? 'Desc' : 'Asc'), variant: "raised", icon: icon }))));
|
|
30
|
+
};
|
|
31
|
+
const SortSection = (props) => {
|
|
32
|
+
var _a;
|
|
33
|
+
const adaptable = AdaptableContext_1.useAdaptable();
|
|
34
|
+
const { data: layout } = OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext();
|
|
35
|
+
const allSortableColumns = adaptable.api.columnApi.getSortableColumns().filter((column) => {
|
|
36
|
+
// filter out columns that are not in the layout
|
|
37
|
+
return layout.Columns.includes(column.columnId);
|
|
38
|
+
});
|
|
39
|
+
const sortedSortColumns = React.useMemo(() => {
|
|
40
|
+
var _a;
|
|
41
|
+
return sortWithOrder_1.sortWithOrderArray(allSortableColumns.map((col) => col.columnId), ((_a = layout.ColumnSorts) !== null && _a !== void 0 ? _a : []).map((sort) => sort.ColumnId), { sortUnorderedItems: true }).map((colId) => adaptable.api.columnApi.getColumnFromId(colId));
|
|
42
|
+
}, [layout, allSortableColumns]);
|
|
43
|
+
const handleColumnsSelectionChange = React.useCallback((columnIds) => {
|
|
44
|
+
props.onChange(Object.assign(Object.assign({}, layout), { ColumnSorts: (columnIds || []).map((columnId) => {
|
|
45
|
+
var _a, _b, _c;
|
|
46
|
+
const SortOrder = (_c = (_b = (_a = layout.ColumnSorts) === null || _a === void 0 ? void 0 : _a.find((sort) => sort.ColumnId === columnId)) === null || _b === void 0 ? void 0 : _b.SortOrder) !== null && _c !== void 0 ? _c : 'Asc';
|
|
47
|
+
return {
|
|
48
|
+
ColumnId: columnId,
|
|
49
|
+
SortOrder: SortOrder,
|
|
50
|
+
};
|
|
51
|
+
}) }));
|
|
52
|
+
}, [layout]);
|
|
53
|
+
const handleSortChange = React.useCallback((columnId, SortOrder) => {
|
|
54
|
+
var _a;
|
|
55
|
+
props.onChange(Object.assign(Object.assign({}, layout), { ColumnSorts: (_a = layout.ColumnSorts) === null || _a === void 0 ? void 0 : _a.map((sort) => {
|
|
56
|
+
if (sort.ColumnId === columnId) {
|
|
57
|
+
return Object.assign(Object.assign({}, sort), { SortOrder: SortOrder });
|
|
58
|
+
}
|
|
59
|
+
return sort;
|
|
60
|
+
}) }));
|
|
61
|
+
}, [layout]);
|
|
62
|
+
return (React.createElement(Tabs_1.Tabs, { style: { height: '100%' } },
|
|
63
|
+
React.createElement(Tabs_1.Tabs.Tab, null, "Column Sorts"),
|
|
64
|
+
React.createElement(Tabs_1.Tabs.Content, null,
|
|
65
|
+
React.createElement(ValueSelector_1.ValueSelector, { showFilterInput: true, showSelectedOnlyPosition: "top", filter: Utilities_1.columnFilter, toIdentifier: (option) => `${option.columnId}`, toLabel: (option) => { var _a; return (_a = option.friendlyName) !== null && _a !== void 0 ? _a : option.columnId; }, toListLabel: (column) => (React.createElement(ColumnRow, { onSortChange: handleSortChange, layout: layout, column: column })), options: sortedSortColumns, value: ((_a = layout.ColumnSorts) !== null && _a !== void 0 ? _a : []).map((sort) => sort.ColumnId), allowReorder: () => true, xSelectedLabel: () => {
|
|
66
|
+
return `Active aggregations:`;
|
|
67
|
+
}, onChange: handleColumnsSelectionChange }))));
|
|
68
|
+
};
|
|
69
|
+
exports.SortSection = SortSection;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.columnFilter = void 0;
|
|
4
|
+
const columnFilter = (column, searchText) => [column.friendlyName, column.columnId].some((candidate) => candidate.toLowerCase().includes(searchText.toLowerCase()));
|
|
5
|
+
exports.columnFilter = columnFilter;
|
|
@@ -11,7 +11,7 @@ const DropdownButton_1 = tslib_1.__importDefault(require("../../../../components
|
|
|
11
11
|
const CheckBox_1 = require("../../../../components/CheckBox");
|
|
12
12
|
const MESSAGE_TYPES = ['Success', 'Info', 'Warning', 'Error'];
|
|
13
13
|
const ScheduleSettingsReminder = (props) => {
|
|
14
|
-
var _a, _b, _c, _d;
|
|
14
|
+
var _a, _b, _c, _d, _e;
|
|
15
15
|
const messageTypes = MESSAGE_TYPES.map((messageType) => ({
|
|
16
16
|
label: messageType,
|
|
17
17
|
value: messageType,
|
|
@@ -30,6 +30,9 @@ const ScheduleSettingsReminder = (props) => {
|
|
|
30
30
|
const handleDisplayNotificationChange = (checked) => {
|
|
31
31
|
props.onChange(Object.assign(Object.assign({}, props.reminderSchedule), { DisplayNotification: checked }));
|
|
32
32
|
};
|
|
33
|
+
const handleDisplaySystemStatusChange = (checked) => {
|
|
34
|
+
props.onChange(Object.assign(Object.assign({}, props.reminderSchedule), { DisplaySystemStatusMessage: checked }));
|
|
35
|
+
};
|
|
33
36
|
return (React.createElement(rebass_1.Box, { "data-name": "schedule-settings-remainder" },
|
|
34
37
|
React.createElement(Tabs_1.Tabs, { autoFocus: false },
|
|
35
38
|
React.createElement(Tabs_1.Tabs.Tab, null, "Reminder Schedule Settings"),
|
|
@@ -42,6 +45,8 @@ const ScheduleSettingsReminder = (props) => {
|
|
|
42
45
|
React.createElement(FormLayout_1.FormRow, { label: "Type" },
|
|
43
46
|
React.createElement(DropdownButton_1.default, { style: { width: 300 }, columns: ['label'], placeholder: "Select Option", items: messageTypes }, ((_c = props.reminderSchedule) === null || _c === void 0 ? void 0 : _c.MessageType) || 'Select Option')),
|
|
44
47
|
React.createElement(FormLayout_1.FormRow, { label: "" },
|
|
45
|
-
React.createElement(CheckBox_1.CheckBox, { checked: (_d = props.reminderSchedule) === null || _d === void 0 ? void 0 : _d.DisplayNotification, onChange: handleDisplayNotificationChange }, "Show the Reminder as an Alert"))
|
|
48
|
+
React.createElement(CheckBox_1.CheckBox, { checked: (_d = props.reminderSchedule) === null || _d === void 0 ? void 0 : _d.DisplayNotification, onChange: handleDisplayNotificationChange }, "Show the Reminder as an Alert")),
|
|
49
|
+
React.createElement(FormLayout_1.FormRow, { label: "" },
|
|
50
|
+
React.createElement(CheckBox_1.CheckBox, { checked: (_e = props.reminderSchedule) === null || _e === void 0 ? void 0 : _e.DisplaySystemStatusMessage, onChange: handleDisplaySystemStatusChange }, "Display a System Status Message")))))));
|
|
46
51
|
};
|
|
47
52
|
exports.ScheduleSettingsReminder = ScheduleSettingsReminder;
|
|
@@ -29,8 +29,8 @@ const ScheduleSettingsReport = (props) => {
|
|
|
29
29
|
React.createElement(Tabs_1.Tabs.Content, null,
|
|
30
30
|
React.createElement(FormLayout_1.default, null,
|
|
31
31
|
React.createElement(FormLayout_1.FormRow, { label: "Export" },
|
|
32
|
-
React.createElement(DropdownButton_1.default, { style: { width: 300 }, items: reportOptions }, ((_a = props === null || props === void 0 ? void 0 : props.report) === null || _a === void 0 ? void 0 : _a.ReportName) || 'Select Report')),
|
|
32
|
+
React.createElement(DropdownButton_1.default, { columns: ['label'], style: { width: 300 }, items: reportOptions }, ((_a = props === null || props === void 0 ? void 0 : props.report) === null || _a === void 0 ? void 0 : _a.ReportName) || 'Select Report')),
|
|
33
33
|
React.createElement(FormLayout_1.FormRow, { label: "Destination" },
|
|
34
|
-
React.createElement(DropdownButton_1.default, { style: { width: 300 }, items: destinationOptions }, ((_b = props === null || props === void 0 ? void 0 : props.report) === null || _b === void 0 ? void 0 : _b.ExportDestination) || 'Select Destination')))))));
|
|
34
|
+
React.createElement(DropdownButton_1.default, { columns: ['label'], style: { width: 300 }, items: destinationOptions }, ((_b = props === null || props === void 0 ? void 0 : props.report) === null || _b === void 0 ? void 0 : _b.ExportDestination) || 'Select Destination')))))));
|
|
35
35
|
};
|
|
36
36
|
exports.ScheduleSettingsReport = ScheduleSettingsReport;
|
|
@@ -26,6 +26,10 @@ const getScheduleSettingsValues = (data) => {
|
|
|
26
26
|
label: 'Display Toast Notification',
|
|
27
27
|
value: (reminder === null || reminder === void 0 ? void 0 : reminder.DisplayNotification) ? 'True' : 'False',
|
|
28
28
|
},
|
|
29
|
+
{
|
|
30
|
+
label: 'Show System Status Message',
|
|
31
|
+
value: (reminder === null || reminder === void 0 ? void 0 : reminder.DisplaySystemStatusMessage) ? 'True' : 'False',
|
|
32
|
+
},
|
|
29
33
|
];
|
|
30
34
|
}
|
|
31
35
|
if (data.ScheduleType === Enums_1.ScheduleType.Report) {
|
|
@@ -39,7 +39,7 @@ const StatusBarPanel = (props) => {
|
|
|
39
39
|
const preparedContent = typeof content === 'function'
|
|
40
40
|
? React.createElement(content)
|
|
41
41
|
: content;
|
|
42
|
-
return (React.createElement(rebass_1.Flex, Object.assign({}, flexProps, { alignItems: "center", justifyContent: "center",
|
|
42
|
+
return (React.createElement(rebass_1.Flex, Object.assign({}, flexProps, { alignItems: "center", justifyContent: "center", className: baseClassName, onClick: handleWrapperClick, style: { cursor: shouldTriggerActionOnWrapperClick ? 'pointer' : 'default' } }),
|
|
43
43
|
props.icon && (React.createElement(SimpleButton_1.default, { tooltip: tooltip, color: props.color, icon: props.icon, iconSize: 15, variant: "text", onClick: handleIconClick, mr: preparedContent ? 1 : 0 })),
|
|
44
44
|
popover ? (React.createElement(AdaptablePopover_1.AdaptablePopover, { tooltipText: tooltip, showIcon: false, bodyText: [popoverContent], MessageType: 'Info', showEvent: 'focus', hideEvent: "blur", popoverMinWidth: popoverMinWidth }, preparedContent)) : (preparedContent),
|
|
45
45
|
ArrayExtensions_1.default.IsNotNullOrEmpty(extraActions) && (React.createElement(rebass_1.Box, { ml: 1 }, (_a = extraActions === null || extraActions === void 0 ? void 0 : extraActions.map) === null || _a === void 0 ? void 0 : _a.call(extraActions, (action, index) => React.createElement(action, { key: index }))))));
|
|
@@ -75,8 +75,8 @@ const OnePageAdaptableWizard = (props) => {
|
|
|
75
75
|
};
|
|
76
76
|
exports.OnePageAdaptableWizard = OnePageAdaptableWizard;
|
|
77
77
|
const OnePageWizardSummary = () => {
|
|
78
|
-
const { setCurrentSection } = OnePageWizards_1.useOnePageWizardContext();
|
|
79
|
-
const {
|
|
78
|
+
const { setCurrentSection, sections, data } = OnePageWizards_1.useOnePageWizardContext();
|
|
79
|
+
const { api } = useOnePageAdaptableWizardContext();
|
|
80
80
|
const renderEdit = (index) => (React.createElement(SimpleButton_1.default, { px: 1, variant: "text", style: {
|
|
81
81
|
textDecoration: 'underline',
|
|
82
82
|
display: 'inline-block',
|
|
@@ -97,7 +97,7 @@ const OnePageWizardSummary = () => {
|
|
|
97
97
|
section.title,
|
|
98
98
|
" ",
|
|
99
99
|
renderEdit(index)),
|
|
100
|
-
React.createElement(Tabs_1.Tabs.Content, null, section.renderSummary(data
|
|
100
|
+
React.createElement(Tabs_1.Tabs.Content, null, section.renderSummary(data))));
|
|
101
101
|
})
|
|
102
102
|
.filter(Boolean)));
|
|
103
103
|
};
|
|
@@ -139,7 +139,7 @@ const OnePageWizard = (props) => {
|
|
|
139
139
|
} },
|
|
140
140
|
React.createElement(rebass_1.Flex, { className: "ab-OnePageWizard", flexDirection: "column", "data-name": props.name, style: Object.assign({ height: '100%', width: '90vw', maxWidth: 1200 }, props.style) },
|
|
141
141
|
React.createElement(rebass_1.Flex, { flexDirection: "row", alignItems: "stretch", flex: 1, style: { overflow: 'auto' } },
|
|
142
|
-
React.createElement(rebass_1.Flex, { flexDirection: "column", padding: 3, className: "ab-OnePageWizard__section-title-container", ref: sizeOwnerRef, style: { overflow: 'auto', position: 'relative', flex: 'none' } },
|
|
142
|
+
React.createElement(rebass_1.Flex, { flexDirection: "column", padding: 3, className: "ab-OnePageWizard__section-title-container", ref: sizeOwnerRef, style: Object.assign({ overflow: 'auto', position: 'relative', flex: 'none' }, props.titleContainerStyle) },
|
|
143
143
|
visibleSections.map((section, index) => {
|
|
144
144
|
if (section === '-') {
|
|
145
145
|
return (React.createElement(rebass_1.Box, { as: "hr", mt: 2, className: "ab-OnePageWizard__section-separator", key: `${index}-`, style: {
|
|
@@ -95,6 +95,7 @@ export declare class Adaptable implements IAdaptable {
|
|
|
95
95
|
private listenerGlobalSetRowSelection;
|
|
96
96
|
private listenerGlobalColumnEventsThatTriggerStateChange;
|
|
97
97
|
private listenerGlobalColumnEventsThatTriggerAutoLayoutSave;
|
|
98
|
+
private listenerGlobalRowGroupEventsThatTriggerAutoLayoutSave;
|
|
98
99
|
static init(adaptableOptions: AdaptableOptions): Promise<AdaptableApi>;
|
|
99
100
|
/**
|
|
100
101
|
* Lazy static constructor for Adaptable
|
|
@@ -259,6 +260,7 @@ export declare class Adaptable implements IAdaptable {
|
|
|
259
260
|
setupColumnCellEditor({ colId, col }: ColumnSetupInfo): void;
|
|
260
261
|
setupColumnCellRenderer({ col, colId, abColumn }: ColumnSetupInfo): void;
|
|
261
262
|
setupColumnTooltipValueGetter({ col, colId }: ColumnSetupInfo): void;
|
|
263
|
+
setupColumnQuickFilerText({ col, abColumn }: ColumnSetupInfo): void;
|
|
262
264
|
setupColumnHeader({ col, abColumn }: ColumnSetupInfo): boolean;
|
|
263
265
|
setupColumnFilter({ col, colDef }: ColumnSetupInfo): void;
|
|
264
266
|
setupColumnFloatingFilter({ col, colDef }: ColumnSetupInfo): void;
|
|
@@ -325,6 +327,7 @@ export declare class Adaptable implements IAdaptable {
|
|
|
325
327
|
isGridGroupingActive(): boolean;
|
|
326
328
|
isGridPivotable(): boolean;
|
|
327
329
|
isQuickFilterAvailable(): boolean;
|
|
330
|
+
setAgQuickSearch(query: string): void;
|
|
328
331
|
private hasFloatingFilterOnAtLeastOneColumn;
|
|
329
332
|
showQuickFilter(): void;
|
|
330
333
|
hideQuickFilter(): void;
|
package/src/agGrid/Adaptable.js
CHANGED
|
@@ -2515,6 +2515,7 @@ class Adaptable {
|
|
|
2515
2515
|
this.gridOptions.api.removeGlobalListener(this.listenerGlobalSetRowSelection);
|
|
2516
2516
|
this.gridOptions.api.removeGlobalListener(this.listenerGlobalColumnEventsThatTriggerStateChange);
|
|
2517
2517
|
this.gridOptions.api.removeGlobalListener(this.listenerGlobalColumnEventsThatTriggerAutoLayoutSave);
|
|
2518
|
+
this.gridOptions.api.removeGlobalListener(this.listenerGlobalRowGroupEventsThatTriggerAutoLayoutSave);
|
|
2518
2519
|
this.listenerFirstDataRendered = null;
|
|
2519
2520
|
this.listenerPivotModeChanged = null;
|
|
2520
2521
|
this.listenerPivotChanged = null;
|
|
@@ -2526,6 +2527,7 @@ class Adaptable {
|
|
|
2526
2527
|
this.listenerModelUpdated = null;
|
|
2527
2528
|
this.listenerGlobalColumnEventsThatTriggerStateChange = null;
|
|
2528
2529
|
this.listenerGlobalColumnEventsThatTriggerAutoLayoutSave = null;
|
|
2530
|
+
this.listenerGlobalRowGroupEventsThatTriggerAutoLayoutSave = null;
|
|
2529
2531
|
this.gridOptions.api.__adaptable = null;
|
|
2530
2532
|
this.gridOptions.api.setColumnDefs = GridApi_setColumnDefs;
|
|
2531
2533
|
this.gridOptions.getRowStyle = null;
|
|
@@ -2759,7 +2761,6 @@ class Adaptable {
|
|
|
2759
2761
|
all_modules_1.Events.EVENT_DISPLAYED_COLUMNS_CHANGED,
|
|
2760
2762
|
all_modules_1.Events.EVENT_SORT_CHANGED,
|
|
2761
2763
|
all_modules_1.Events.EVENT_COLUMN_ROW_GROUP_CHANGED,
|
|
2762
|
-
all_modules_1.Events.EVENT_ROW_GROUP_OPENED,
|
|
2763
2764
|
all_modules_1.Events.EVENT_COLUMN_VALUE_CHANGED,
|
|
2764
2765
|
];
|
|
2765
2766
|
// ADD filter event
|
|
@@ -2768,6 +2769,18 @@ class Adaptable {
|
|
|
2768
2769
|
this.debouncedSaveGridLayout();
|
|
2769
2770
|
}
|
|
2770
2771
|
}));
|
|
2772
|
+
// Save Layout if Display Row Groups is "dynamic"
|
|
2773
|
+
const rowGroupEventsThatTriggersAutoLayoutSave = [
|
|
2774
|
+
all_modules_1.Events.EVENT_ROW_GROUP_OPENED,
|
|
2775
|
+
all_modules_1.Events.EVENT_EXPAND_COLLAPSE_ALL,
|
|
2776
|
+
];
|
|
2777
|
+
this.gridOptions.api.addGlobalListener((this.listenerGlobalRowGroupEventsThatTriggerAutoLayoutSave = (type) => {
|
|
2778
|
+
if (rowGroupEventsThatTriggersAutoLayoutSave.indexOf(type) > -1) {
|
|
2779
|
+
if (this.adaptableOptions.layoutOptions.displayRowGroups == 'dynamic') {
|
|
2780
|
+
this.debouncedSaveGridLayout();
|
|
2781
|
+
}
|
|
2782
|
+
}
|
|
2783
|
+
}));
|
|
2771
2784
|
/**
|
|
2772
2785
|
* Use Case: A visible Column has become row grouped and 'hideColumnWhenGrouped' is true
|
|
2773
2786
|
* Action: Make the column invisible
|
|
@@ -3019,6 +3032,7 @@ class Adaptable {
|
|
|
3019
3032
|
this.setupColumnComparator(colSetupInfo);
|
|
3020
3033
|
this.setupColumnCellEditor(colSetupInfo);
|
|
3021
3034
|
this.setupColumnHeader(colSetupInfo);
|
|
3035
|
+
this.setupColumnQuickFilerText(colSetupInfo);
|
|
3022
3036
|
});
|
|
3023
3037
|
this.setupRowStyling();
|
|
3024
3038
|
// setupAggregationColumnHeaders() is executed on every setLayout()
|
|
@@ -3029,6 +3043,9 @@ class Adaptable {
|
|
|
3029
3043
|
this.redrawHeader();
|
|
3030
3044
|
}
|
|
3031
3045
|
setGridOptionsProperty(propertyName, propertyGetter) {
|
|
3046
|
+
if (this.isDestroyed) {
|
|
3047
|
+
return;
|
|
3048
|
+
}
|
|
3032
3049
|
const userKey = `user.${propertyName}`;
|
|
3033
3050
|
const adaptableKey = `adaptable.${propertyName}`;
|
|
3034
3051
|
const value = this.gridOptions[propertyName];
|
|
@@ -3037,15 +3054,17 @@ class Adaptable {
|
|
|
3037
3054
|
this.gridOptionsPropertyCache.set(userKey, value);
|
|
3038
3055
|
}
|
|
3039
3056
|
const userValue = this.gridOptionsPropertyCache.get(userKey);
|
|
3040
|
-
|
|
3041
|
-
|
|
3042
|
-
|
|
3043
|
-
|
|
3044
|
-
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
|
|
3048
|
-
|
|
3057
|
+
let adaptableValue = propertyGetter(userValue);
|
|
3058
|
+
// usualy it is a function, but not always, e.g. in the case of 'suppressAggFuncInHeader'
|
|
3059
|
+
if (typeof adaptableValue === 'function') {
|
|
3060
|
+
const previousValue = adaptableValue;
|
|
3061
|
+
adaptableValue = (...args) => {
|
|
3062
|
+
if (this.isDestroyed) {
|
|
3063
|
+
return;
|
|
3064
|
+
}
|
|
3065
|
+
return previousValue(...args);
|
|
3066
|
+
};
|
|
3067
|
+
}
|
|
3049
3068
|
if (adaptableValue != null) {
|
|
3050
3069
|
this.gridOptionsPropertyCache.set(adaptableKey, adaptableValue);
|
|
3051
3070
|
}
|
|
@@ -3246,6 +3265,21 @@ class Adaptable {
|
|
|
3246
3265
|
}
|
|
3247
3266
|
});
|
|
3248
3267
|
}
|
|
3268
|
+
setupColumnQuickFilerText({ col, abColumn }) {
|
|
3269
|
+
this.setColDefProperty(col, 'getQuickFilterText', (userGetQuickFilterText) => {
|
|
3270
|
+
if (userGetQuickFilterText) {
|
|
3271
|
+
return userGetQuickFilterText;
|
|
3272
|
+
}
|
|
3273
|
+
return (params) => {
|
|
3274
|
+
const visibleCoulmnsMap = this.api.layoutApi.getCurrentVisibleColumnIdsMap();
|
|
3275
|
+
const isVisible = visibleCoulmnsMap[abColumn.columnId];
|
|
3276
|
+
if (!isVisible) {
|
|
3277
|
+
return '';
|
|
3278
|
+
}
|
|
3279
|
+
return this.getDisplayValueFromRowNode(params.node, abColumn.columnId);
|
|
3280
|
+
};
|
|
3281
|
+
});
|
|
3282
|
+
}
|
|
3249
3283
|
setupColumnHeader({ col, abColumn }) {
|
|
3250
3284
|
var _a, _b;
|
|
3251
3285
|
const previousColumnHeader = (_a = col === null || col === void 0 ? void 0 : col.getColDef()) === null || _a === void 0 ? void 0 : _a.headerName;
|
|
@@ -4049,6 +4083,9 @@ class Adaptable {
|
|
|
4049
4083
|
isQuickFilterAvailable() {
|
|
4050
4084
|
return this.hasFloatingFilterOnAtLeastOneColumn() === true;
|
|
4051
4085
|
}
|
|
4086
|
+
setAgQuickSearch(query) {
|
|
4087
|
+
this.gridOptions.api.setQuickFilter(query);
|
|
4088
|
+
}
|
|
4052
4089
|
hasFloatingFilterOnAtLeastOneColumn(defs = this.gridOptions.columnDefs) {
|
|
4053
4090
|
if (this.gridOptions.defaultColDef && this.gridOptions.defaultColDef.floatingFilter) {
|
|
4054
4091
|
return true;
|
|
@@ -130,7 +130,17 @@ class agGridHelper {
|
|
|
130
130
|
}
|
|
131
131
|
else {
|
|
132
132
|
this.gridOptions.getRowId = (params) => {
|
|
133
|
-
|
|
133
|
+
var _a;
|
|
134
|
+
if (params.data[primaryKey]) {
|
|
135
|
+
return params.data[primaryKey];
|
|
136
|
+
}
|
|
137
|
+
// row does not have primary key => might be a group row
|
|
138
|
+
const parentKeys = (_a = params.parentKeys) !== null && _a !== void 0 ? _a : [];
|
|
139
|
+
const values = Object.values(params.data);
|
|
140
|
+
if (values.length) {
|
|
141
|
+
const id = [...parentKeys, values[0]].join('/');
|
|
142
|
+
return id;
|
|
143
|
+
}
|
|
134
144
|
};
|
|
135
145
|
}
|
|
136
146
|
return true;
|
|
@@ -45,7 +45,7 @@ function ExpressionEditor(props) {
|
|
|
45
45
|
props.onChange(value);
|
|
46
46
|
}, testData: data, isFullExpression: props.isFullExpression, api: props.api }));
|
|
47
47
|
// currently only boolean and scalar expressions support nested calculated columns (calc cols which reference other calc cols)
|
|
48
|
-
const queryableColumns = type === 'scalar' || type === 'boolean'
|
|
48
|
+
const queryableColumns = type === 'scalar' || type === 'boolean' || type === 'aggregatedScalar'
|
|
49
49
|
? props.columns
|
|
50
50
|
: props.columns.filter((c) => !props.api.columnApi.isCalculatedColumn(c.columnId));
|
|
51
51
|
// borrowed from https://github.com/ag-grid/ag-grid/blob/v27.2.1/community-modules/core/src/ts/utils/object.ts#L205
|
|
@@ -13,10 +13,12 @@ const TabContext = React.createContext({
|
|
|
13
13
|
setSelectedIndex: (index) => { },
|
|
14
14
|
});
|
|
15
15
|
const isTab = (c) => {
|
|
16
|
-
|
|
16
|
+
var _a;
|
|
17
|
+
return c.type === exports.Tab || ((_a = c.props) === null || _a === void 0 ? void 0 : _a.isTabsTab);
|
|
17
18
|
};
|
|
18
19
|
const isTabContent = (c) => {
|
|
19
|
-
|
|
20
|
+
var _a;
|
|
21
|
+
return c.type === exports.Content || ((_a = c.props) === null || _a === void 0 ? void 0 : _a.isTabsContent);
|
|
20
22
|
};
|
|
21
23
|
const Tabs = (props) => {
|
|
22
24
|
var _a;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const React = tslib_1.__importStar(require("react"));
|
|
5
|
+
const DefaultIcon_1 = tslib_1.__importDefault(require("./DefaultIcon"));
|
|
6
|
+
exports.default = (props) => (React.createElement(DefaultIcon_1.default, Object.assign({}, props),
|
|
7
|
+
React.createElement("path", { d: "m12 22-7-7 1.4-1.425 4.6 4.6V2h2v16.175l4.6-4.575L19 15Z" })));
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const React = tslib_1.__importStar(require("react"));
|
|
5
|
+
const DefaultIcon_1 = tslib_1.__importDefault(require("./DefaultIcon"));
|
|
6
|
+
exports.default = (props) => (React.createElement(DefaultIcon_1.default, Object.assign({}, props),
|
|
7
|
+
React.createElement("path", { d: "M11 22V5.825L6.4 10.4 5 9l7-7 7 7-1.4 1.425-4.6-4.6V22Z" })));
|
|
@@ -7,6 +7,8 @@ const ReactDOMServer = tslib_1.__importStar(require("react-dom/server"));
|
|
|
7
7
|
const arrow_right_1 = tslib_1.__importDefault(require("./arrow-right"));
|
|
8
8
|
const arrow_down_1 = tslib_1.__importDefault(require("./arrow-down"));
|
|
9
9
|
const arrow_up_1 = tslib_1.__importDefault(require("./arrow-up"));
|
|
10
|
+
const arrow_up_long_1 = tslib_1.__importDefault(require("./arrow-up-long"));
|
|
11
|
+
const arrow_down_long_1 = tslib_1.__importDefault(require("./arrow-down-long"));
|
|
10
12
|
const arrow_left_1 = tslib_1.__importDefault(require("./arrow-left"));
|
|
11
13
|
const triangle_up_1 = tslib_1.__importDefault(require("./triangle-up"));
|
|
12
14
|
const triangle_down_1 = tslib_1.__importDefault(require("./triangle-down"));
|
|
@@ -194,8 +196,10 @@ const allIcons = {
|
|
|
194
196
|
'boolean-list': boolean_list_1.default,
|
|
195
197
|
'arrow-right': arrow_right_1.default,
|
|
196
198
|
'arrow-up': arrow_up_1.default,
|
|
199
|
+
'arrow-up-long': arrow_up_long_1.default,
|
|
197
200
|
'triangle-up': triangle_up_1.default,
|
|
198
201
|
'arrow-down': arrow_down_1.default,
|
|
202
|
+
'arrow-down-long': arrow_down_long_1.default,
|
|
199
203
|
'triangle-down': triangle_down_1.default,
|
|
200
204
|
'arrow-left': arrow_left_1.default,
|
|
201
205
|
'check-circle': check_circle_1.default,
|
|
@@ -4066,6 +4066,14 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
4066
4066
|
kind: string;
|
|
4067
4067
|
description: string;
|
|
4068
4068
|
uiLabel: string;
|
|
4069
|
+
isOptional?: undefined;
|
|
4070
|
+
reference?: undefined;
|
|
4071
|
+
} | {
|
|
4072
|
+
name: string;
|
|
4073
|
+
kind: string;
|
|
4074
|
+
description: string;
|
|
4075
|
+
uiLabel: string;
|
|
4076
|
+
isOptional: boolean;
|
|
4069
4077
|
reference?: undefined;
|
|
4070
4078
|
} | {
|
|
4071
4079
|
name: string;
|
|
@@ -4073,6 +4081,7 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
4073
4081
|
description: string;
|
|
4074
4082
|
uiLabel: string;
|
|
4075
4083
|
reference: string;
|
|
4084
|
+
isOptional?: undefined;
|
|
4076
4085
|
})[];
|
|
4077
4086
|
};
|
|
4078
4087
|
ReportContext: {
|