@reltio/components 1.4.1722 → 1.4.1723
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/cjs/components/EntityUriLink/EntityUriLink.js +5 -2
- package/cjs/components/Link/Link.js +2 -1
- package/cjs/components/PivotingUriLink/PivotingUriLink.js +7 -3
- package/cjs/components/attributes/editMode/EntitySelector/components/SingleValue.d.ts +14 -9
- package/cjs/components/attributes/editMode/EntitySelector/components/SingleValue.js +12 -10
- package/cjs/core/utils.d.ts +9 -8
- package/cjs/core/utils.js +3 -1
- package/esm/components/EntityUriLink/EntityUriLink.js +5 -2
- package/esm/components/Link/Link.js +2 -1
- package/esm/components/PivotingUriLink/PivotingUriLink.js +8 -4
- package/esm/components/attributes/editMode/EntitySelector/components/SingleValue.d.ts +14 -9
- package/esm/components/attributes/editMode/EntitySelector/components/SingleValue.js +12 -10
- package/esm/core/utils.d.ts +9 -8
- package/esm/core/utils.js +2 -1
- package/package.json +1 -1
|
@@ -47,6 +47,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
47
47
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
48
|
var react_1 = __importStar(require("react"));
|
|
49
49
|
var contexts_1 = require("../../contexts");
|
|
50
|
+
var core_1 = require("../../core");
|
|
50
51
|
var EntityUriLink = (0, react_1.forwardRef)(function (_a, ref) {
|
|
51
52
|
var value = _a.value, children = _a.children, screen = _a.screen, className = _a.className, _b = _a.shouldOpenInNewTab, shouldOpenInNewTab = _b === void 0 ? false : _b, otherProps = __rest(_a, ["value", "children", "screen", "className", "shouldOpenInNewTab"]);
|
|
52
53
|
var viewId = (0, react_1.useContext)(contexts_1.ViewIdContext);
|
|
@@ -55,9 +56,11 @@ var EntityUriLink = (0, react_1.forwardRef)(function (_a, ref) {
|
|
|
55
56
|
var uiPath = (0, contexts_1.useMdmUiPath)();
|
|
56
57
|
var generateEntityUrlByUri = function (uri) { return generateEntityUrl({ uiPath: uiPath, uri: uri, screen: screen }); };
|
|
57
58
|
var handleClick = (0, react_1.useCallback)(function (e) {
|
|
58
|
-
|
|
59
|
+
if (!(0, core_1.isControlOrCommandPressed)(e)) {
|
|
60
|
+
openEntity({ uri: value, viewId: viewId, screen: screen });
|
|
61
|
+
e.preventDefault();
|
|
62
|
+
}
|
|
59
63
|
e.stopPropagation();
|
|
60
|
-
e.preventDefault();
|
|
61
64
|
}, [openEntity, screen, value, viewId]);
|
|
62
65
|
return (react_1.default.createElement("a", __assign({ ref: ref, href: generateEntityUrlByUri(value), onClick: shouldOpenInNewTab ? undefined : handleClick, target: shouldOpenInNewTab ? '_blank' : '_self', className: className }, otherProps), children));
|
|
63
66
|
});
|
|
@@ -5,11 +5,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
var react_1 = __importDefault(require("react"));
|
|
7
7
|
var styles_1 = require("./styles");
|
|
8
|
+
var core_1 = require("../../core");
|
|
8
9
|
var Link = function (_a) {
|
|
9
10
|
var to = _a.to, children = _a.children, onClick = _a.onClick;
|
|
10
11
|
var styles = (0, styles_1.useStyles)();
|
|
11
12
|
return (react_1.default.createElement("a", { href: to, onClick: function (e) {
|
|
12
|
-
if (onClick) {
|
|
13
|
+
if ((!(0, core_1.isControlOrCommandPressed)(e) || !to) && onClick) {
|
|
13
14
|
onClick();
|
|
14
15
|
e.stopPropagation();
|
|
15
16
|
e.preventDefault();
|
|
@@ -30,17 +30,21 @@ var react_1 = __importStar(require("react"));
|
|
|
30
30
|
var classnames_1 = __importDefault(require("classnames"));
|
|
31
31
|
var contexts_1 = require("../../contexts");
|
|
32
32
|
var styles_1 = require("./styles");
|
|
33
|
+
var core_1 = require("../../core");
|
|
33
34
|
var PivotingUriLink = (0, react_1.forwardRef)(function (_a, ref) {
|
|
34
35
|
var value = _a.value, attributeType = _a.attributeType, children = _a.children, className = _a.className, onClick = _a.onClick;
|
|
35
36
|
var styles = (0, styles_1.useStyles)();
|
|
36
37
|
var generatePivotingUrl = (0, react_1.useContext)(contexts_1.UrlGeneratorsContext).generatePivotingUrl;
|
|
37
38
|
var uiPath = (0, contexts_1.useMdmUiPath)();
|
|
38
39
|
var url = generatePivotingUrl({ uiPath: uiPath, uri: attributeType.uri, value: JSON.stringify(value) });
|
|
39
|
-
|
|
40
|
+
var handleClick = (0, react_1.useCallback)(function (e) {
|
|
41
|
+
if (!(0, core_1.isControlOrCommandPressed)(e)) {
|
|
40
42
|
onClick();
|
|
41
|
-
e.stopPropagation();
|
|
42
43
|
e.preventDefault();
|
|
43
|
-
}
|
|
44
|
+
}
|
|
45
|
+
e.stopPropagation();
|
|
46
|
+
}, [onClick]);
|
|
47
|
+
return (react_1.default.createElement("a", { ref: ref, href: url, onClick: handleClick, className: (0, classnames_1.default)(styles.link, className) }, children));
|
|
44
48
|
});
|
|
45
49
|
PivotingUriLink.displayName = 'PivotingUriLink';
|
|
46
50
|
exports.default = PivotingUriLink;
|
|
@@ -1,10 +1,15 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { TEntityType } from '@reltio/mdm-sdk';
|
|
3
|
+
type Props = {
|
|
4
|
+
selectProps: {
|
|
5
|
+
currentEntityType: TEntityType;
|
|
6
|
+
menuIsOpen: boolean;
|
|
7
|
+
disableLinkClick: boolean;
|
|
8
|
+
};
|
|
9
|
+
children: string;
|
|
10
|
+
data: {
|
|
11
|
+
entityUri: string;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
declare const SingleValue: ({ selectProps: { currentEntityType, menuIsOpen, disableLinkClick }, children, data }: Props) => JSX.Element;
|
|
1
15
|
export default SingleValue;
|
|
2
|
-
declare function SingleValue(props: any): JSX.Element;
|
|
3
|
-
declare namespace SingleValue {
|
|
4
|
-
namespace propTypes {
|
|
5
|
-
const children: PropTypes.Requireable<string>;
|
|
6
|
-
const data: PropTypes.Validator<object>;
|
|
7
|
-
const selectProps: PropTypes.Validator<object>;
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
import PropTypes from 'prop-types';
|
|
@@ -38,15 +38,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
38
38
|
};
|
|
39
39
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
40
|
var react_1 = __importStar(require("react"));
|
|
41
|
-
var prop_types_1 = __importDefault(require("prop-types"));
|
|
42
41
|
var classnames_1 = __importDefault(require("classnames"));
|
|
43
42
|
var ui_i18n_1 = __importDefault(require("ui-i18n"));
|
|
44
43
|
var mdm_sdk_1 = require("@reltio/mdm-sdk");
|
|
45
44
|
var Typography_1 = __importDefault(require("@mui/material/Typography"));
|
|
46
45
|
var contexts_1 = require("../../../../../contexts");
|
|
47
46
|
var styles_1 = require("./styles");
|
|
48
|
-
var
|
|
49
|
-
|
|
47
|
+
var core_1 = require("../../../../../core");
|
|
48
|
+
var SingleValue = function (_a) {
|
|
49
|
+
var _b = _a.selectProps, currentEntityType = _b.currentEntityType, menuIsOpen = _b.menuIsOpen, disableLinkClick = _b.disableLinkClick, children = _a.children, data = _a.data;
|
|
50
50
|
var styles = (0, styles_1.useSingleValueStyles)();
|
|
51
51
|
var openEntity = (0, contexts_1.useMdmAction)('openEntity');
|
|
52
52
|
var uiPath = (0, contexts_1.useMdmUiPath)();
|
|
@@ -54,8 +54,15 @@ var SingleValue = function (props) {
|
|
|
54
54
|
var generateEntityUrl = (0, react_1.useContext)(contexts_1.UrlGeneratorsContext).generateEntityUrl;
|
|
55
55
|
var handleOnMouseDown = function (event) {
|
|
56
56
|
event.stopPropagation();
|
|
57
|
-
|
|
57
|
+
};
|
|
58
|
+
var handleClick = function (event) {
|
|
59
|
+
event.stopPropagation();
|
|
60
|
+
if (disableLinkClick) {
|
|
61
|
+
event.preventDefault();
|
|
62
|
+
}
|
|
63
|
+
else if (!(0, core_1.isControlOrCommandPressed)(event)) {
|
|
58
64
|
openEntity({ uri: data.entityUri, viewId: viewId });
|
|
65
|
+
event.preventDefault();
|
|
59
66
|
}
|
|
60
67
|
};
|
|
61
68
|
var valueProps = (0, mdm_sdk_1.isTempUri)(data.entityUri)
|
|
@@ -66,7 +73,7 @@ var SingleValue = function (props) {
|
|
|
66
73
|
: {
|
|
67
74
|
className: (0, classnames_1.default)(styles.singleValue, styles.linkValue),
|
|
68
75
|
onMouseDown: handleOnMouseDown,
|
|
69
|
-
onClick:
|
|
76
|
+
onClick: handleClick,
|
|
70
77
|
href: generateEntityUrl({ uiPath: uiPath, uri: data.entityUri }),
|
|
71
78
|
component: 'a'
|
|
72
79
|
};
|
|
@@ -74,9 +81,4 @@ var SingleValue = function (props) {
|
|
|
74
81
|
? ui_i18n_1.default.text("New ".concat(currentEntityType.label, " will be created"))
|
|
75
82
|
: (0, mdm_sdk_1.getLabel)(children))));
|
|
76
83
|
};
|
|
77
|
-
SingleValue.propTypes = {
|
|
78
|
-
children: prop_types_1.default.string,
|
|
79
|
-
data: prop_types_1.default.object.isRequired,
|
|
80
|
-
selectProps: prop_types_1.default.object.isRequired
|
|
81
|
-
};
|
|
82
84
|
exports.default = SingleValue;
|
package/cjs/core/utils.d.ts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
export function getValue(e: any): any;
|
|
2
|
-
export function getChecked(e: any): any;
|
|
3
|
-
export function stopPropagation(e: any): any;
|
|
4
|
-
export function noop(): void;
|
|
5
|
-
export function EmptyStub(): any;
|
|
6
|
-
export function mergeClasses(classes: any, other: any): any;
|
|
7
|
-
export function isIE(): any;
|
|
8
1
|
export function createStandardAction(type: any): (payload: any) => {
|
|
9
2
|
type: any;
|
|
10
3
|
payload: any;
|
|
11
4
|
};
|
|
12
|
-
export function
|
|
5
|
+
export function EmptyStub(): any;
|
|
6
|
+
export function getChecked(e: any): any;
|
|
7
|
+
export function isControlOrCommandPressed(e: any): any;
|
|
8
|
+
export function getValue(e: any): any;
|
|
9
|
+
export function isIE(): any;
|
|
10
|
+
export function mergeClasses(classes: any, other: any): any;
|
|
11
|
+
export function noop(): void;
|
|
13
12
|
export function parseJSON(value: any): any;
|
|
13
|
+
export function stopPropagation(e: any): any;
|
|
14
|
+
export function toggleSortOrder(order: any): "asc" | "desc";
|
package/cjs/core/utils.js
CHANGED
|
@@ -14,7 +14,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
14
14
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.
|
|
17
|
+
exports.toggleSortOrder = exports.stopPropagation = exports.parseJSON = exports.noop = exports.mergeClasses = exports.isIE = exports.getValue = exports.isControlOrCommandPressed = exports.getChecked = exports.EmptyStub = exports.createStandardAction = void 0;
|
|
18
18
|
var ramda_1 = require("ramda");
|
|
19
19
|
var classnames_1 = __importDefault(require("classnames"));
|
|
20
20
|
var getValue = function (e) { return e.target.value; };
|
|
@@ -23,6 +23,8 @@ var getChecked = function (e) { return e.target.checked; };
|
|
|
23
23
|
exports.getChecked = getChecked;
|
|
24
24
|
var stopPropagation = function (e) { return e.stopPropagation(); };
|
|
25
25
|
exports.stopPropagation = stopPropagation;
|
|
26
|
+
var isControlOrCommandPressed = function (e) { return e.ctrlKey || e.metaKey; };
|
|
27
|
+
exports.isControlOrCommandPressed = isControlOrCommandPressed;
|
|
26
28
|
var noop = function () { };
|
|
27
29
|
exports.noop = noop;
|
|
28
30
|
var EmptyStub = function () { return null; };
|
|
@@ -22,6 +22,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
22
22
|
};
|
|
23
23
|
import React, { forwardRef, useCallback, useContext } from 'react';
|
|
24
24
|
import { ViewIdContext, UrlGeneratorsContext, useMdmUiPath, useMdmAction } from '../../contexts';
|
|
25
|
+
import { isControlOrCommandPressed } from '../../core';
|
|
25
26
|
var EntityUriLink = forwardRef(function (_a, ref) {
|
|
26
27
|
var value = _a.value, children = _a.children, screen = _a.screen, className = _a.className, _b = _a.shouldOpenInNewTab, shouldOpenInNewTab = _b === void 0 ? false : _b, otherProps = __rest(_a, ["value", "children", "screen", "className", "shouldOpenInNewTab"]);
|
|
27
28
|
var viewId = useContext(ViewIdContext);
|
|
@@ -30,9 +31,11 @@ var EntityUriLink = forwardRef(function (_a, ref) {
|
|
|
30
31
|
var uiPath = useMdmUiPath();
|
|
31
32
|
var generateEntityUrlByUri = function (uri) { return generateEntityUrl({ uiPath: uiPath, uri: uri, screen: screen }); };
|
|
32
33
|
var handleClick = useCallback(function (e) {
|
|
33
|
-
|
|
34
|
+
if (!isControlOrCommandPressed(e)) {
|
|
35
|
+
openEntity({ uri: value, viewId: viewId, screen: screen });
|
|
36
|
+
e.preventDefault();
|
|
37
|
+
}
|
|
34
38
|
e.stopPropagation();
|
|
35
|
-
e.preventDefault();
|
|
36
39
|
}, [openEntity, screen, value, viewId]);
|
|
37
40
|
return (React.createElement("a", __assign({ ref: ref, href: generateEntityUrlByUri(value), onClick: shouldOpenInNewTab ? undefined : handleClick, target: shouldOpenInNewTab ? '_blank' : '_self', className: className }, otherProps), children));
|
|
38
41
|
});
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useStyles } from './styles';
|
|
3
|
+
import { isControlOrCommandPressed } from '../../core';
|
|
3
4
|
var Link = function (_a) {
|
|
4
5
|
var to = _a.to, children = _a.children, onClick = _a.onClick;
|
|
5
6
|
var styles = useStyles();
|
|
6
7
|
return (React.createElement("a", { href: to, onClick: function (e) {
|
|
7
|
-
if (onClick) {
|
|
8
|
+
if ((!isControlOrCommandPressed(e) || !to) && onClick) {
|
|
8
9
|
onClick();
|
|
9
10
|
e.stopPropagation();
|
|
10
11
|
e.preventDefault();
|
|
@@ -1,18 +1,22 @@
|
|
|
1
|
-
import React, { forwardRef, useContext } from 'react';
|
|
1
|
+
import React, { forwardRef, useCallback, useContext } from 'react';
|
|
2
2
|
import classnames from 'classnames';
|
|
3
3
|
import { UrlGeneratorsContext, useMdmUiPath } from '../../contexts';
|
|
4
4
|
import { useStyles } from './styles';
|
|
5
|
+
import { isControlOrCommandPressed } from '../../core';
|
|
5
6
|
var PivotingUriLink = forwardRef(function (_a, ref) {
|
|
6
7
|
var value = _a.value, attributeType = _a.attributeType, children = _a.children, className = _a.className, onClick = _a.onClick;
|
|
7
8
|
var styles = useStyles();
|
|
8
9
|
var generatePivotingUrl = useContext(UrlGeneratorsContext).generatePivotingUrl;
|
|
9
10
|
var uiPath = useMdmUiPath();
|
|
10
11
|
var url = generatePivotingUrl({ uiPath: uiPath, uri: attributeType.uri, value: JSON.stringify(value) });
|
|
11
|
-
|
|
12
|
+
var handleClick = useCallback(function (e) {
|
|
13
|
+
if (!isControlOrCommandPressed(e)) {
|
|
12
14
|
onClick();
|
|
13
|
-
e.stopPropagation();
|
|
14
15
|
e.preventDefault();
|
|
15
|
-
}
|
|
16
|
+
}
|
|
17
|
+
e.stopPropagation();
|
|
18
|
+
}, [onClick]);
|
|
19
|
+
return (React.createElement("a", { ref: ref, href: url, onClick: handleClick, className: classnames(styles.link, className) }, children));
|
|
16
20
|
});
|
|
17
21
|
PivotingUriLink.displayName = 'PivotingUriLink';
|
|
18
22
|
export default PivotingUriLink;
|
|
@@ -1,10 +1,15 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { TEntityType } from '@reltio/mdm-sdk';
|
|
3
|
+
type Props = {
|
|
4
|
+
selectProps: {
|
|
5
|
+
currentEntityType: TEntityType;
|
|
6
|
+
menuIsOpen: boolean;
|
|
7
|
+
disableLinkClick: boolean;
|
|
8
|
+
};
|
|
9
|
+
children: string;
|
|
10
|
+
data: {
|
|
11
|
+
entityUri: string;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
declare const SingleValue: ({ selectProps: { currentEntityType, menuIsOpen, disableLinkClick }, children, data }: Props) => JSX.Element;
|
|
1
15
|
export default SingleValue;
|
|
2
|
-
declare function SingleValue(props: any): JSX.Element;
|
|
3
|
-
declare namespace SingleValue {
|
|
4
|
-
namespace propTypes {
|
|
5
|
-
const children: PropTypes.Requireable<string>;
|
|
6
|
-
const data: PropTypes.Validator<object>;
|
|
7
|
-
const selectProps: PropTypes.Validator<object>;
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
import PropTypes from 'prop-types';
|
|
@@ -10,15 +10,15 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
12
|
import React, { useContext } from 'react';
|
|
13
|
-
import PropTypes from 'prop-types';
|
|
14
13
|
import classnames from 'classnames';
|
|
15
14
|
import i18n from 'ui-i18n';
|
|
16
15
|
import { getLabel, isTempUri } from '@reltio/mdm-sdk';
|
|
17
16
|
import Typography from '@mui/material/Typography';
|
|
18
17
|
import { ViewIdContext, UrlGeneratorsContext, useMdmUiPath, useMdmAction } from '../../../../../contexts';
|
|
19
18
|
import { useSingleValueStyles } from './styles';
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
import { isControlOrCommandPressed } from '../../../../../core';
|
|
20
|
+
var SingleValue = function (_a) {
|
|
21
|
+
var _b = _a.selectProps, currentEntityType = _b.currentEntityType, menuIsOpen = _b.menuIsOpen, disableLinkClick = _b.disableLinkClick, children = _a.children, data = _a.data;
|
|
22
22
|
var styles = useSingleValueStyles();
|
|
23
23
|
var openEntity = useMdmAction('openEntity');
|
|
24
24
|
var uiPath = useMdmUiPath();
|
|
@@ -26,8 +26,15 @@ var SingleValue = function (props) {
|
|
|
26
26
|
var generateEntityUrl = useContext(UrlGeneratorsContext).generateEntityUrl;
|
|
27
27
|
var handleOnMouseDown = function (event) {
|
|
28
28
|
event.stopPropagation();
|
|
29
|
-
|
|
29
|
+
};
|
|
30
|
+
var handleClick = function (event) {
|
|
31
|
+
event.stopPropagation();
|
|
32
|
+
if (disableLinkClick) {
|
|
33
|
+
event.preventDefault();
|
|
34
|
+
}
|
|
35
|
+
else if (!isControlOrCommandPressed(event)) {
|
|
30
36
|
openEntity({ uri: data.entityUri, viewId: viewId });
|
|
37
|
+
event.preventDefault();
|
|
31
38
|
}
|
|
32
39
|
};
|
|
33
40
|
var valueProps = isTempUri(data.entityUri)
|
|
@@ -38,7 +45,7 @@ var SingleValue = function (props) {
|
|
|
38
45
|
: {
|
|
39
46
|
className: classnames(styles.singleValue, styles.linkValue),
|
|
40
47
|
onMouseDown: handleOnMouseDown,
|
|
41
|
-
onClick:
|
|
48
|
+
onClick: handleClick,
|
|
42
49
|
href: generateEntityUrl({ uiPath: uiPath, uri: data.entityUri }),
|
|
43
50
|
component: 'a'
|
|
44
51
|
};
|
|
@@ -46,9 +53,4 @@ var SingleValue = function (props) {
|
|
|
46
53
|
? i18n.text("New ".concat(currentEntityType.label, " will be created"))
|
|
47
54
|
: getLabel(children))));
|
|
48
55
|
};
|
|
49
|
-
SingleValue.propTypes = {
|
|
50
|
-
children: PropTypes.string,
|
|
51
|
-
data: PropTypes.object.isRequired,
|
|
52
|
-
selectProps: PropTypes.object.isRequired
|
|
53
|
-
};
|
|
54
56
|
export default SingleValue;
|
package/esm/core/utils.d.ts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
export function getValue(e: any): any;
|
|
2
|
-
export function getChecked(e: any): any;
|
|
3
|
-
export function stopPropagation(e: any): any;
|
|
4
|
-
export function noop(): void;
|
|
5
|
-
export function EmptyStub(): any;
|
|
6
|
-
export function mergeClasses(classes: any, other: any): any;
|
|
7
|
-
export function isIE(): any;
|
|
8
1
|
export function createStandardAction(type: any): (payload: any) => {
|
|
9
2
|
type: any;
|
|
10
3
|
payload: any;
|
|
11
4
|
};
|
|
12
|
-
export function
|
|
5
|
+
export function EmptyStub(): any;
|
|
6
|
+
export function getChecked(e: any): any;
|
|
7
|
+
export function isControlOrCommandPressed(e: any): any;
|
|
8
|
+
export function getValue(e: any): any;
|
|
9
|
+
export function isIE(): any;
|
|
10
|
+
export function mergeClasses(classes: any, other: any): any;
|
|
11
|
+
export function noop(): void;
|
|
13
12
|
export function parseJSON(value: any): any;
|
|
13
|
+
export function stopPropagation(e: any): any;
|
|
14
|
+
export function toggleSortOrder(order: any): "asc" | "desc";
|
package/esm/core/utils.js
CHANGED
|
@@ -14,6 +14,7 @@ import classNames from 'classnames';
|
|
|
14
14
|
var getValue = function (e) { return e.target.value; };
|
|
15
15
|
var getChecked = function (e) { return e.target.checked; };
|
|
16
16
|
var stopPropagation = function (e) { return e.stopPropagation(); };
|
|
17
|
+
var isControlOrCommandPressed = function (e) { return e.ctrlKey || e.metaKey; };
|
|
17
18
|
var noop = function () { };
|
|
18
19
|
var EmptyStub = function () { return null; };
|
|
19
20
|
var mergeClasses = function (classes, other) {
|
|
@@ -36,4 +37,4 @@ var parseJSON = function (value) {
|
|
|
36
37
|
return undefined;
|
|
37
38
|
}
|
|
38
39
|
};
|
|
39
|
-
export {
|
|
40
|
+
export { createStandardAction, EmptyStub, getChecked, isControlOrCommandPressed, getValue, isIE, mergeClasses, noop, parseJSON, stopPropagation, toggleSortOrder };
|