@adaptabletools/adaptable 17.0.0-canary.9 → 17.0.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 +24 -1
- package/base.css.map +1 -1
- package/bundle.cjs.js +199 -226
- package/index.css +34 -1
- package/index.css.map +1 -1
- package/package.json +1 -2
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/Api/EventApi.d.ts +19 -8
- package/src/Api/Events/CellSelectionChanged.d.ts +11 -0
- package/src/Api/Events/RowSelectionChanged.d.ts +11 -0
- package/src/Api/Events/RowSelectionChanged.js +2 -0
- package/src/Redux/ActionsReducers/PlusMinusRedux.d.ts +16 -0
- package/src/Redux/ActionsReducers/PlusMinusRedux.js +47 -1
- package/src/Strategy/LayoutModule.d.ts +12 -4
- package/src/Strategy/LayoutModule.js +11 -5
- package/src/Strategy/NotesModule.js +1 -1
- package/src/Strategy/PlusMinusModule.js +2 -0
- package/src/Strategy/Utilities/Export/getExportRowsViewItems.d.ts +2 -1
- package/src/Strategy/Utilities/Export/getExportRowsViewItems.js +14 -5
- package/src/Strategy/Utilities/getExpressionViewItems.js +8 -2
- package/src/View/Components/FilterForm/FilterForm.js +0 -1
- package/src/View/Components/FilterForm/ListBoxFilterForm.js +1 -3
- package/src/View/Components/FilterForm/QuickFilterForm.js +1 -1
- package/src/View/Components/FilterForm/QuickFilterValues.js +3 -2
- package/src/View/Components/Selectors/ColumnSelector.d.ts +1 -0
- package/src/View/Components/Selectors/ColumnSelector.js +2 -1
- package/src/View/DataImport/DataImportWizard/sections/DataPreview.js +2 -2
- package/src/View/Export/Wizard/ReportRowsWizardSection.js +3 -1
- package/src/View/GridFilter/GridFilterExpressionEditor.js +1 -1
- package/src/View/GridFilter/GridFilterPopup.js +5 -5
- package/src/View/GridFilter/GridFilterViewPanel.js +11 -10
- package/src/View/GridFilter/NamedQuerySelector.js +1 -1
- package/src/View/GridFilter/useGridFilterExpressionEditor.d.ts +1 -0
- package/src/View/GridFilter/useGridFilterExpressionEditor.js +7 -4
- package/src/View/Layout/Wizard/getGridFilterPreview.d.ts +6 -0
- package/src/View/Layout/Wizard/getGridFilterPreview.js +16 -0
- package/src/View/Layout/Wizard/sections/FilterSection.js +1 -1
- package/src/View/NamedQuery/Wizard/NamedQueryExpressionWizardSection.js +1 -1
- package/src/View/Notes/NotesPopup.js +2 -2
- package/src/View/PlusMinus/MovePlusMinus.d.ts +7 -0
- package/src/View/PlusMinus/MovePlusMinus.js +27 -0
- package/src/agGrid/Adaptable.js +2 -2
- package/src/agGrid/agGridHelper.d.ts +2 -1
- package/src/agGrid/agGridHelper.js +13 -3
- package/src/components/Datepicker/index.js +1 -1
- package/src/components/ExpressionEditor/ExpressionPreview.d.ts +7 -0
- package/src/components/ExpressionEditor/ExpressionPreview.js +25 -0
- package/src/components/ExpressionEditor/QueryBuilder/QueryBuilderInputs.js +11 -7
- package/src/components/ExpressionEditor/index.js +4 -7
- package/src/components/InputGroup/InputGroup.d.ts +7 -0
- package/src/components/InputGroup/InputGroup.js +12 -0
- package/src/components/InputGroup/index.d.ts +1 -0
- package/src/components/InputGroup/index.js +4 -0
- package/src/components/OverlayTrigger/index.js +7 -2
- package/src/components/Select/Select.d.ts +0 -1
- package/src/components/Select/Select.js +1 -3
- package/src/types.d.ts +2 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/src/Api/Events/SelectionChanged.d.ts +0 -16
- /package/src/Api/Events/{SelectionChanged.js → CellSelectionChanged.js} +0 -0
|
@@ -11,6 +11,7 @@ const PermittedValuesSelector_1 = require("../../../View/Components/Selectors/Pe
|
|
|
11
11
|
const CheckBox_1 = require("../../CheckBox");
|
|
12
12
|
const DropdownButton_1 = tslib_1.__importDefault(require("../../DropdownButton"));
|
|
13
13
|
const icons_1 = require("../../icons");
|
|
14
|
+
const InputGroup_1 = require("../../InputGroup");
|
|
14
15
|
const Select_1 = require("../../Select");
|
|
15
16
|
const QueryBuilder_1 = require("./QueryBuilder");
|
|
16
17
|
const utils_1 = require("./utils");
|
|
@@ -85,22 +86,25 @@ const PrimiteValueInput = (props) => {
|
|
|
85
86
|
}
|
|
86
87
|
const options = [
|
|
87
88
|
{
|
|
88
|
-
label:
|
|
89
|
+
label: (react_1.default.createElement(rebass_1.Flex, null,
|
|
90
|
+
react_1.default.createElement(icons_1.Icon, { name: "columns" }),
|
|
91
|
+
react_1.default.createElement(rebass_1.Text, { ml: 2 }, "Column"))),
|
|
89
92
|
icon: 'columns',
|
|
90
93
|
value: 'column-name',
|
|
91
94
|
},
|
|
92
95
|
{
|
|
93
|
-
label:
|
|
96
|
+
label: (react_1.default.createElement(rebass_1.Flex, null,
|
|
97
|
+
react_1.default.createElement(icons_1.Icon, { name: "edit" }),
|
|
98
|
+
react_1.default.createElement(rebass_1.Text, { ml: 2 }, "Value"))),
|
|
94
99
|
icon: 'edit',
|
|
95
100
|
value: 'input-value',
|
|
96
101
|
},
|
|
97
102
|
];
|
|
98
103
|
const typeOption = options.find((option) => option.value === type);
|
|
99
|
-
return (react_1.default.createElement(rebass_1.Flex,
|
|
100
|
-
react_1.default.createElement(
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
}, variant: "raised", value: typeOption.value, options: options, onChange: (value) => handleTypeChange(value) })),
|
|
104
|
+
return (react_1.default.createElement(InputGroup_1.InputGroup, { Component: rebass_1.Flex, "data-id": "query-input-wrapper", mr: 2 },
|
|
105
|
+
react_1.default.createElement(Select_1.Select, { rederSingleValue: (value) => {
|
|
106
|
+
return (react_1.default.createElement(react_1.default.Fragment, null, typeOption.value === 'column-name' ? react_1.default.createElement(icons_1.Icon, { name: "grid" }) : react_1.default.createElement(icons_1.Icon, { name: "edit" })));
|
|
107
|
+
}, value: typeOption.value, options: options, onChange: (value) => handleTypeChange(value) }),
|
|
104
108
|
editor));
|
|
105
109
|
};
|
|
106
110
|
exports.PrimiteValueInput = PrimiteValueInput;
|
|
@@ -32,6 +32,7 @@ function ExpressionEditor(props) {
|
|
|
32
32
|
const { type, module } = props;
|
|
33
33
|
const [data, setData] = (0, react_1.useState)(props.initialData);
|
|
34
34
|
const [showColumnIds, setShowColumnIds] = (0, react_1.useState)(false);
|
|
35
|
+
const [inlineQuery, setInlineQuery] = (0, react_1.useState)(false);
|
|
35
36
|
const [showNamedQueries, setShowNamedQueries] = (0, react_1.useState)(false);
|
|
36
37
|
const baseClassName = `ab-ExpressionEditor`;
|
|
37
38
|
const [selectedFunction, setSelectedFunction] = (0, react_1.useState)(null);
|
|
@@ -94,12 +95,8 @@ function ExpressionEditor(props) {
|
|
|
94
95
|
setData(updateColValue(data, column, new Date(e.target.value)));
|
|
95
96
|
}, style: { width: '100%' }, disabled: column.readOnly })) : column.dataType === 'Boolean' ? (React.createElement(CheckBox_1.CheckBox, { "data-name": "column-input", "data-value": column.columnId, checked: getColValue(column), onChange: (checked) => setData(updateColValue(data, column, checked)), disabled: column.readOnly })) : null))))));
|
|
96
97
|
const namedQueries = (React.createElement(rebass_1.Flex, { flexDirection: "column", alignItems: "start", style: { marginTop: 2 } },
|
|
97
|
-
React.createElement(CheckBox_1.CheckBox, { checked: showColumnIds, onChange: (checked) => setShowColumnIds(checked),
|
|
98
|
-
|
|
99
|
-
margin: 0,
|
|
100
|
-
paddingTop: 'var(--ab-space-1)',
|
|
101
|
-
paddingBottom: 'var(--ab-space-1)',
|
|
102
|
-
} }, 'Show Column IDs'),
|
|
98
|
+
React.createElement(CheckBox_1.CheckBox, { checked: showColumnIds, onChange: (checked) => setShowColumnIds(checked) }, "Show Column IDs"),
|
|
99
|
+
React.createElement(CheckBox_1.CheckBox, { checked: inlineQuery, onChange: (checked) => setInlineQuery(checked) }, "Inline Query"),
|
|
103
100
|
props.namedQueries.map((namedQuery) => (React.createElement(rebass_1.Flex, { key: namedQuery.Uuid, flexDirection: "column", alignItems: "start", style: {
|
|
104
101
|
padding: 3,
|
|
105
102
|
marginTop: 'var(--ab-space-2)',
|
|
@@ -110,7 +107,7 @@ function ExpressionEditor(props) {
|
|
|
110
107
|
React.createElement(EditorButton_1.default, { width: "100%", height: "100%", style: {
|
|
111
108
|
background: 'var(--ab-color-primary)',
|
|
112
109
|
cursor: 'grab',
|
|
113
|
-
}, data: `QUERY("${namedQuery.Name}")`, "data-name": "column", icon: "drag" },
|
|
110
|
+
}, data: inlineQuery ? namedQuery.BooleanExpression : `QUERY("${namedQuery.Name}")`, "data-name": "column", icon: "drag" },
|
|
114
111
|
React.createElement(rebass_1.Flex, { flexDirection: "column", alignItems: "start" }, namedQuery.Name)),
|
|
115
112
|
React.createElement(rebass_1.Flex, { alignItems: "start", style: {
|
|
116
113
|
padding: 5,
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
type InputGroupProps<T extends React.ComponentType<any>> = {
|
|
3
|
+
Component?: T;
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
} & React.ComponentProps<T>;
|
|
6
|
+
export declare const InputGroup: <T extends React.ComponentType<any>>({ Component, children, ...rest }: InputGroupProps<T>) => JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.InputGroup = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const React = tslib_1.__importStar(require("react"));
|
|
6
|
+
const InputGroup = (_a) => {
|
|
7
|
+
var _b;
|
|
8
|
+
var { Component = 'div', children } = _a, rest = tslib_1.__rest(_a, ["Component", "children"]);
|
|
9
|
+
const Comp = Component;
|
|
10
|
+
return (React.createElement(Comp, Object.assign({}, rest, { className: `ab-cmp-input-group ${(_b = rest.className) !== null && _b !== void 0 ? _b : ''}` }), children));
|
|
11
|
+
};
|
|
12
|
+
exports.InputGroup = InputGroup;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './InputGroup';
|
|
@@ -4,6 +4,7 @@ exports.getConstrainRect = exports.getConstrainElement = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const React = tslib_1.__importStar(require("react"));
|
|
6
6
|
const react_1 = require("react");
|
|
7
|
+
const debounce_1 = tslib_1.__importDefault(require("lodash/debounce"));
|
|
7
8
|
const batchUpdate_1 = tslib_1.__importDefault(require("../utils/batchUpdate"));
|
|
8
9
|
const selectParent_1 = tslib_1.__importDefault(require("../utils/selectParent"));
|
|
9
10
|
const useProperty_1 = tslib_1.__importDefault(require("../utils/useProperty"));
|
|
@@ -72,7 +73,11 @@ const OverlayTrigger = React.forwardRef((props, ref) => {
|
|
|
72
73
|
const overlayRef = (0, react_1.useRef)(null);
|
|
73
74
|
const [visible, doSetVisible] = (0, useProperty_1.default)(props, 'visible', false);
|
|
74
75
|
const hideTimeoutRef = (0, react_1.useRef)(null);
|
|
75
|
-
const setVisible = React.useCallback(
|
|
76
|
+
const setVisible = React.useCallback(
|
|
77
|
+
// visible state may quickly change from true -> false -> true
|
|
78
|
+
// when moving the mouse cursor from the trigger to the overlay
|
|
79
|
+
// for this case we debounce the visible change for a very small amount of time
|
|
80
|
+
(0, debounce_1.default)((visible) => {
|
|
76
81
|
onVisibleChange === null || onVisibleChange === void 0 ? void 0 : onVisibleChange(visible);
|
|
77
82
|
if (!visible) {
|
|
78
83
|
hideTimeoutRef.current = setTimeout(() => {
|
|
@@ -86,7 +91,7 @@ const OverlayTrigger = React.forwardRef((props, ref) => {
|
|
|
86
91
|
hideTimeoutRef.current = null;
|
|
87
92
|
}
|
|
88
93
|
doSetVisible(true);
|
|
89
|
-
}, []);
|
|
94
|
+
}, 50), []);
|
|
90
95
|
const prevVisible = (0, usePrevious_1.default)(visible, false);
|
|
91
96
|
ensurePortalElement();
|
|
92
97
|
const onShow = React.useCallback((event) => {
|
|
@@ -24,7 +24,6 @@ export type SelectProps<SelectValue extends unknown, IsMulti extends boolean = f
|
|
|
24
24
|
accessLevel?: AccessLevel;
|
|
25
25
|
style?: React.CSSProperties;
|
|
26
26
|
onInputChange?: (value: string) => void;
|
|
27
|
-
variant?: 'default' | 'raised';
|
|
28
27
|
size?: 'small' | 'normal';
|
|
29
28
|
isCreatable?: boolean;
|
|
30
29
|
};
|
|
@@ -138,9 +138,7 @@ const Select = function (props) {
|
|
|
138
138
|
state;
|
|
139
139
|
return Object.assign(Object.assign(Object.assign({}, baseStyle), commonStyles(state)), {
|
|
140
140
|
// height: 30,
|
|
141
|
-
minHeight: props.size === 'small' ? 0 : 32, boxShadow: state.isFocused ? 'var(--ab-cmp-select-focused__box-shadow)' : 'none', outline: state.isFocused ? 'var(--ab-cmp-select-focused__outline)' : 'none', border:
|
|
142
|
-
? '1px solid transparent'
|
|
143
|
-
: 'var(--ab-cmp-select__border)', '&:hover': {
|
|
141
|
+
minHeight: props.size === 'small' ? 0 : 32, boxShadow: state.isFocused ? 'var(--ab-cmp-select-focused__box-shadow)' : 'none', outline: state.isFocused ? 'var(--ab-cmp-select-focused__outline)' : 'none', border: 'var(--ab-cmp-select__border)', borderRadius: 'var(--ab-cmp-select__border-radius)', '&:hover': {
|
|
144
142
|
border: 'var(--ab-cmp-select__border)',
|
|
145
143
|
} });
|
|
146
144
|
},
|
package/src/types.d.ts
CHANGED
|
@@ -127,7 +127,8 @@ export type { GridFilterAppliedInfo } from './Api/Events/GridFilterApplied';
|
|
|
127
127
|
export type { GridSortedInfo, AdaptableSortState } from './Api/Events/GridSorted';
|
|
128
128
|
export type { AdaptableSearchState } from './Api/Events/AdaptableSearchState';
|
|
129
129
|
export type { DataSetSelectedInfo } from './Api/Events/DataSetSelected';
|
|
130
|
-
export type {
|
|
130
|
+
export type { CellSelectionChangedInfo } from './Api/Events/CellSelectionChanged';
|
|
131
|
+
export type { RowSelectionChangedInfo } from './Api/Events/RowSelectionChanged';
|
|
131
132
|
export type { AdaptableStateReloadedInfo } from './Api/Events/AdaptableStateReloaded';
|
|
132
133
|
export type { ThemeChangedInfo } from './Api/Events/ThemeChanged';
|
|
133
134
|
export type { ThemeEditedInfo } from './Api/Events/ThemeEdited';
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "17.0.0
|
|
1
|
+
declare const _default: "17.0.0";
|
|
2
2
|
export default _default;
|
package/version.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.default = '17.0.0
|
|
3
|
+
exports.default = '17.0.0'; // PLEASE DONT UPDATE THIS!!! - will be updated at build time with the correct version
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { SelectedCellInfo } from '../../PredefinedConfig/Selection/SelectedCellInfo';
|
|
2
|
-
import { SelectedRowInfo } from '../../PredefinedConfig/Selection/SelectedRowInfo';
|
|
3
|
-
import { BaseEventInfo } from './BaseEventInfo';
|
|
4
|
-
/**
|
|
5
|
-
* Event Info published by SelectionChanged event
|
|
6
|
-
*/
|
|
7
|
-
export interface SelectionChangedInfo extends BaseEventInfo {
|
|
8
|
-
/**
|
|
9
|
-
* Details of cells currently selected in the Grid
|
|
10
|
-
*/
|
|
11
|
-
selectedCellInfo: SelectedCellInfo;
|
|
12
|
-
/**
|
|
13
|
-
* Details of rows currently selected in the Grid
|
|
14
|
-
*/
|
|
15
|
-
selectedRowInfo: SelectedRowInfo;
|
|
16
|
-
}
|
|
File without changes
|