@bigbinary/neeto-filters-frontend 3.1.0 → 3.1.1
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/dist/index.cjs.js +7 -5
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +7 -6
- package/dist/index.js.map +1 -1
- package/package.json +3 -1
package/dist/index.js
CHANGED
|
@@ -2,12 +2,13 @@ import React, { useState, useRef, useEffect, useTransition, useMemo } from 'reac
|
|
|
2
2
|
import classnames from 'classnames';
|
|
3
3
|
import i18next, { t as t$1 } from 'i18next';
|
|
4
4
|
import { capitalize, removeBy, findBy, isNotEmpty, humanize, hyphenate, noop as noop$1, toLabelAndValue, replaceBy, isPresent, existsBy, isNotPresent, filterBy } from '@bigbinary/neeto-cist';
|
|
5
|
-
import {
|
|
5
|
+
import { useMutationWithInvalidation, useQueryParams, useDebounce, withT } from '@bigbinary/neeto-commons-frontend/react-utils';
|
|
6
6
|
import { getQueryParams, dateFormat, buildUrl } from '@bigbinary/neeto-commons-frontend/utils';
|
|
7
7
|
import { Tooltip, Typography, Dropdown as Dropdown$2, Button, Pane as Pane$1, Alert, Select, DatePicker, TimePicker, Input as Input$1, Accordion, Spinner } from '@bigbinary/neetoui';
|
|
8
8
|
import { groupBy, anyPass, isNil, isEmpty, any, toLower, mergeLeft, identity, omit, mergeRight, toPairs, not, pluck, either, has, concat, equals, pick, modify, prop, isNotNil, append, last, mergeDeepRight } from 'ramda';
|
|
9
9
|
import { useTranslation, Trans } from 'react-i18next';
|
|
10
10
|
import { useHistory, useLocation } from 'react-router-dom';
|
|
11
|
+
import useHotkeys from '@bigbinary/neeto-hotkeys';
|
|
11
12
|
import { Help, Close, MenuHorizontal, Down, Settings } from '@bigbinary/neeto-icons';
|
|
12
13
|
import { Form, Input, ActionBlock } from '@bigbinary/neetoui/formik';
|
|
13
14
|
import { useQuery } from 'react-query';
|
|
@@ -1035,12 +1036,12 @@ var Block = function Block(_ref) {
|
|
|
1035
1036
|
var blockLength = label.length + ruleContent.length + filterValue.length;
|
|
1036
1037
|
var toolTipDisabled = blockLength <= 50;
|
|
1037
1038
|
var blockContent = !toolTipDisabled ? "".concat(filterValue.slice(0, 50 - blockLength), "...") : filterValue;
|
|
1038
|
-
var deleteBlockHotKeyRef =
|
|
1039
|
+
var deleteBlockHotKeyRef = useHotkeys(SHORTCUTS.deleteBlock.sequence, function () {
|
|
1039
1040
|
return handleDelete(key);
|
|
1040
1041
|
}, {
|
|
1041
1042
|
mode: "scoped"
|
|
1042
1043
|
});
|
|
1043
|
-
var openFilterPaneHotKeyRef =
|
|
1044
|
+
var openFilterPaneHotKeyRef = useHotkeys(SHORTCUTS.openFilterPane.sequence, function () {
|
|
1044
1045
|
return setIsPaneOpen(key);
|
|
1045
1046
|
}, {
|
|
1046
1047
|
mode: "scoped"
|
|
@@ -1085,12 +1086,12 @@ var ChildBlock = function ChildBlock(_ref) {
|
|
|
1085
1086
|
var childKey = _ref.childKey,
|
|
1086
1087
|
setIsPaneOpen = _ref.setIsPaneOpen,
|
|
1087
1088
|
handleDelete = _ref.handleDelete;
|
|
1088
|
-
var deleteBlockHotKeyRef =
|
|
1089
|
+
var deleteBlockHotKeyRef = useHotkeys(SHORTCUTS.deleteBlock.sequence, function () {
|
|
1089
1090
|
return handleDelete(childKey);
|
|
1090
1091
|
}, {
|
|
1091
1092
|
mode: "scoped"
|
|
1092
1093
|
});
|
|
1093
|
-
var openFilterPaneHotKeyRef =
|
|
1094
|
+
var openFilterPaneHotKeyRef = useHotkeys(SHORTCUTS.openFilterPane.sequence, function () {
|
|
1094
1095
|
return setIsPaneOpen(childKey);
|
|
1095
1096
|
}, {
|
|
1096
1097
|
mode: "scoped"
|
|
@@ -2414,7 +2415,7 @@ var Slider = function Slider(_ref) {
|
|
|
2414
2415
|
className = _ref$className === void 0 ? "" : _ref$className,
|
|
2415
2416
|
children = _ref.children,
|
|
2416
2417
|
otherProps = _objectWithoutProperties(_ref, _excluded$1);
|
|
2417
|
-
|
|
2418
|
+
useHotkeys(SHORTCUTS.closePane.sequence, onClose, {
|
|
2418
2419
|
mode: "global"
|
|
2419
2420
|
});
|
|
2420
2421
|
return /*#__PURE__*/React.createElement(Portal, {
|