@reltio/components 1.4.1904 → 1.4.1906
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/ConnectionRelationTypeSelector/ConnectionRelationTypeSelector.d.ts +3 -1
- package/cjs/ExpandableSearchInput/ExpandableSearchInput.js +2 -2
- package/cjs/ReactSortableTree/ReactSortableTree.js +2 -7
- package/cjs/RelationTypeSelector/RelationTypeSelector.d.ts +3 -1
- package/cjs/hooks/useActions/useActions.d.ts +1 -1
- package/cjs/types/index.d.ts +1 -1
- package/esm/ConnectionRelationTypeSelector/ConnectionRelationTypeSelector.d.ts +3 -1
- package/esm/ExpandableSearchInput/ExpandableSearchInput.js +2 -2
- package/esm/ReactSortableTree/ReactSortableTree.js +2 -7
- package/esm/RelationTypeSelector/RelationTypeSelector.d.ts +3 -1
- package/esm/hooks/useActions/useActions.d.ts +1 -1
- package/esm/types/index.d.ts +1 -1
- package/package.json +2 -2
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
1
2
|
import { ConnectionRelation, ConnectionRelationType, Metadata } from '@reltio/mdm-sdk';
|
|
2
|
-
|
|
3
|
+
import { RelationTypeSelector } from '../RelationTypeSelector';
|
|
4
|
+
type Props = Omit<ComponentProps<typeof RelationTypeSelector>, 'value' | 'options' | 'onChange'> & {
|
|
3
5
|
className?: string;
|
|
4
6
|
relation?: ConnectionRelation;
|
|
5
7
|
inRelationTypes?: ConnectionRelationType[];
|
|
@@ -46,9 +46,9 @@ var ExpandableSearchInput = function (_a) {
|
|
|
46
46
|
setValue(query);
|
|
47
47
|
}, [query]);
|
|
48
48
|
var styles = (0, styles_1.useStyles)();
|
|
49
|
-
return isOpen ? (react_1.default.createElement(Input_1.default, { className: styles.input, value: value, autoFocus: true, placeholder: ui_i18n_1.default.text('Search'), disableUnderline: true, onChange: (0, ramda_1.pipe)(events_1.getValue, setValue), startAdornment: react_1.default.createElement(InputAdornment_1.default, { position: "start" },
|
|
49
|
+
return isOpen ? (react_1.default.createElement(Input_1.default, { "data-reltio-id": "expandable-search-input", className: styles.input, value: value, autoFocus: true, placeholder: ui_i18n_1.default.text('Search'), disableUnderline: true, onChange: (0, ramda_1.pipe)(events_1.getValue, setValue), startAdornment: react_1.default.createElement(InputAdornment_1.default, { position: "start" },
|
|
50
50
|
react_1.default.createElement(Search_1.default, { className: styles.startAdornment })), endAdornment: react_1.default.createElement(InputAdornment_1.default, { position: "end" },
|
|
51
|
-
react_1.default.createElement(SmallIconButton_1.SmallIconButton, { size: "S", icon: Close_1.default, className: styles.endAdornment, onClick: (0, ramda_1.pipe)(ramda_1.F, setIsOpen, (0, ramda_1.always)(''), (0, ramda_1.tap)(onChange), setValue) })), onKeyPress: (0, ramda_1.when)((0, ramda_1.propEq)('key', 'Enter'), (0, ramda_1.pipe)((0, ramda_1.always)(value), ramda_1.trim, onChange)) })) : (react_1.default.createElement(IconButton_1.default, { className: styles.searchButton, onClick: (0, ramda_1.pipe)(ramda_1.T, setIsOpen), size: "large" },
|
|
51
|
+
react_1.default.createElement(SmallIconButton_1.SmallIconButton, { size: "S", icon: Close_1.default, className: styles.endAdornment, onClick: (0, ramda_1.pipe)(ramda_1.F, setIsOpen, (0, ramda_1.always)(''), (0, ramda_1.tap)(onChange), setValue) })), onKeyPress: (0, ramda_1.when)((0, ramda_1.propEq)('key', 'Enter'), (0, ramda_1.pipe)((0, ramda_1.always)(value), ramda_1.trim, onChange)) })) : (react_1.default.createElement(IconButton_1.default, { "data-reltio-id": "expandable-search-button", className: styles.searchButton, onClick: (0, ramda_1.pipe)(ramda_1.T, setIsOpen), size: "large" },
|
|
52
52
|
react_1.default.createElement(Search_1.default, null)));
|
|
53
53
|
};
|
|
54
54
|
exports.ExpandableSearchInput = ExpandableSearchInput;
|
|
@@ -338,14 +338,12 @@ var ReactSortableTree = /** @class */ (function (_super) {
|
|
|
338
338
|
// if onlyExpandSearchedNodes collapse the tree and search
|
|
339
339
|
var _a = (0, tree_1.find)({
|
|
340
340
|
getNodeKey: getNodeKey,
|
|
341
|
-
/* eslint-disable indent */
|
|
342
341
|
treeData: onlyExpandSearchedNodes
|
|
343
342
|
? (0, tree_1.toggleExpandedForAll)({
|
|
344
343
|
treeData: instanceProps.treeData,
|
|
345
344
|
expanded: false
|
|
346
345
|
})
|
|
347
346
|
: instanceProps.treeData,
|
|
348
|
-
/* eslint-enable indent */
|
|
349
347
|
searchQuery: searchQuery,
|
|
350
348
|
searchMethod: searchMethod || defaultHandlers_1.defaultSearchMethod,
|
|
351
349
|
searchFocusOffset: searchFocusOffset,
|
|
@@ -524,9 +522,8 @@ var ReactSortableTree = /** @class */ (function (_super) {
|
|
|
524
522
|
// Only replace the old node if it's the one we set off to find children
|
|
525
523
|
// for in the first place
|
|
526
524
|
return oldNode === node
|
|
527
|
-
?
|
|
525
|
+
? __assign(__assign({}, oldNode), { children: childrenArray }) : oldNode;
|
|
528
526
|
},
|
|
529
|
-
/* eslint-enable indent */
|
|
530
527
|
getNodeKey: props.getNodeKey
|
|
531
528
|
}), true);
|
|
532
529
|
}
|
|
@@ -617,9 +614,7 @@ var ReactSortableTree = /** @class */ (function (_super) {
|
|
|
617
614
|
return (react_1.default.createElement(ScrollZoneVirtualList_1, __assign({}, scrollToInfo, { dragDropManager: dragDropManager, verticalStrength: _this.vStrength, horizontalStrength: _this.hStrength, speed: 30, scrollToAlignment: "start", className: _this.props.classes.rst__virtualScrollOverride, width: width, onScroll: function (_a) {
|
|
618
615
|
var scrollTop = _a.scrollTop;
|
|
619
616
|
_this.scrollTop = scrollTop;
|
|
620
|
-
}, height: height, style: innerStyle, rowCount: rows.length, estimatedRowSize: typeof rowHeight !== 'function' ? rowHeight : undefined, rowHeight:
|
|
621
|
-
/* eslint-disable indent */
|
|
622
|
-
typeof rowHeight !== 'function'
|
|
617
|
+
}, height: height, style: innerStyle, rowCount: rows.length, estimatedRowSize: typeof rowHeight !== 'function' ? rowHeight : undefined, rowHeight: typeof rowHeight !== 'function'
|
|
623
618
|
? rowHeight
|
|
624
619
|
: function (_a) {
|
|
625
620
|
var index = _a.index;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
1
2
|
import { TextFieldProps } from '@mui/material/TextField';
|
|
3
|
+
import { DropDownSelector } from '../DropDownSelector';
|
|
2
4
|
import { RelationOption as RelationOptionType } from '../types';
|
|
3
|
-
type Props = {
|
|
5
|
+
type Props = Omit<ComponentProps<typeof DropDownSelector>, 'value' | 'options' | 'onChange' | 'TextFieldProps'> & {
|
|
4
6
|
value?: RelationOptionType;
|
|
5
7
|
options?: RelationOptionType[];
|
|
6
8
|
onChange?: (value: RelationOptionType) => void;
|
|
@@ -10,7 +10,7 @@ type UseActions = ({ actions, dispatch }: {
|
|
|
10
10
|
payload: T;
|
|
11
11
|
}) => void;
|
|
12
12
|
}) => {
|
|
13
|
-
[key in keyof typeof actions]: <T>(payload
|
|
13
|
+
[key in keyof typeof actions]: <T>(payload?: T) => void;
|
|
14
14
|
};
|
|
15
15
|
export declare const useActions: UseActions;
|
|
16
16
|
export {};
|
package/cjs/types/index.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
1
2
|
import { ConnectionRelation, ConnectionRelationType, Metadata } from '@reltio/mdm-sdk';
|
|
2
|
-
|
|
3
|
+
import { RelationTypeSelector } from '../RelationTypeSelector';
|
|
4
|
+
type Props = Omit<ComponentProps<typeof RelationTypeSelector>, 'value' | 'options' | 'onChange'> & {
|
|
3
5
|
className?: string;
|
|
4
6
|
relation?: ConnectionRelation;
|
|
5
7
|
inRelationTypes?: ConnectionRelationType[];
|
|
@@ -17,8 +17,8 @@ export var ExpandableSearchInput = function (_a) {
|
|
|
17
17
|
setValue(query);
|
|
18
18
|
}, [query]);
|
|
19
19
|
var styles = useStyles();
|
|
20
|
-
return isOpen ? (React.createElement(Input, { className: styles.input, value: value, autoFocus: true, placeholder: i18n.text('Search'), disableUnderline: true, onChange: pipe(getValue, setValue), startAdornment: React.createElement(InputAdornment, { position: "start" },
|
|
20
|
+
return isOpen ? (React.createElement(Input, { "data-reltio-id": "expandable-search-input", className: styles.input, value: value, autoFocus: true, placeholder: i18n.text('Search'), disableUnderline: true, onChange: pipe(getValue, setValue), startAdornment: React.createElement(InputAdornment, { position: "start" },
|
|
21
21
|
React.createElement(SearchIcon, { className: styles.startAdornment })), endAdornment: React.createElement(InputAdornment, { position: "end" },
|
|
22
|
-
React.createElement(SmallIconButton, { size: "S", icon: CloseIcon, className: styles.endAdornment, onClick: pipe(F, setIsOpen, always(''), tap(onChange), setValue) })), onKeyPress: when(propEq('key', 'Enter'), pipe(always(value), trim, onChange)) })) : (React.createElement(IconButton, { className: styles.searchButton, onClick: pipe(T, setIsOpen), size: "large" },
|
|
22
|
+
React.createElement(SmallIconButton, { size: "S", icon: CloseIcon, className: styles.endAdornment, onClick: pipe(F, setIsOpen, always(''), tap(onChange), setValue) })), onKeyPress: when(propEq('key', 'Enter'), pipe(always(value), trim, onChange)) })) : (React.createElement(IconButton, { "data-reltio-id": "expandable-search-button", className: styles.searchButton, onClick: pipe(T, setIsOpen), size: "large" },
|
|
23
23
|
React.createElement(SearchIcon, null)));
|
|
24
24
|
};
|
|
@@ -310,14 +310,12 @@ var ReactSortableTree = /** @class */ (function (_super) {
|
|
|
310
310
|
// if onlyExpandSearchedNodes collapse the tree and search
|
|
311
311
|
var _a = find({
|
|
312
312
|
getNodeKey: getNodeKey,
|
|
313
|
-
/* eslint-disable indent */
|
|
314
313
|
treeData: onlyExpandSearchedNodes
|
|
315
314
|
? toggleExpandedForAll({
|
|
316
315
|
treeData: instanceProps.treeData,
|
|
317
316
|
expanded: false
|
|
318
317
|
})
|
|
319
318
|
: instanceProps.treeData,
|
|
320
|
-
/* eslint-enable indent */
|
|
321
319
|
searchQuery: searchQuery,
|
|
322
320
|
searchMethod: searchMethod || defaultSearchMethod,
|
|
323
321
|
searchFocusOffset: searchFocusOffset,
|
|
@@ -496,9 +494,8 @@ var ReactSortableTree = /** @class */ (function (_super) {
|
|
|
496
494
|
// Only replace the old node if it's the one we set off to find children
|
|
497
495
|
// for in the first place
|
|
498
496
|
return oldNode === node
|
|
499
|
-
?
|
|
497
|
+
? __assign(__assign({}, oldNode), { children: childrenArray }) : oldNode;
|
|
500
498
|
},
|
|
501
|
-
/* eslint-enable indent */
|
|
502
499
|
getNodeKey: props.getNodeKey
|
|
503
500
|
}), true);
|
|
504
501
|
}
|
|
@@ -589,9 +586,7 @@ var ReactSortableTree = /** @class */ (function (_super) {
|
|
|
589
586
|
return (React.createElement(ScrollZoneVirtualList_1, __assign({}, scrollToInfo, { dragDropManager: dragDropManager, verticalStrength: _this.vStrength, horizontalStrength: _this.hStrength, speed: 30, scrollToAlignment: "start", className: _this.props.classes.rst__virtualScrollOverride, width: width, onScroll: function (_a) {
|
|
590
587
|
var scrollTop = _a.scrollTop;
|
|
591
588
|
_this.scrollTop = scrollTop;
|
|
592
|
-
}, height: height, style: innerStyle, rowCount: rows.length, estimatedRowSize: typeof rowHeight !== 'function' ? rowHeight : undefined, rowHeight:
|
|
593
|
-
/* eslint-disable indent */
|
|
594
|
-
typeof rowHeight !== 'function'
|
|
589
|
+
}, height: height, style: innerStyle, rowCount: rows.length, estimatedRowSize: typeof rowHeight !== 'function' ? rowHeight : undefined, rowHeight: typeof rowHeight !== 'function'
|
|
595
590
|
? rowHeight
|
|
596
591
|
: function (_a) {
|
|
597
592
|
var index = _a.index;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
1
2
|
import { TextFieldProps } from '@mui/material/TextField';
|
|
3
|
+
import { DropDownSelector } from '../DropDownSelector';
|
|
2
4
|
import { RelationOption as RelationOptionType } from '../types';
|
|
3
|
-
type Props = {
|
|
5
|
+
type Props = Omit<ComponentProps<typeof DropDownSelector>, 'value' | 'options' | 'onChange' | 'TextFieldProps'> & {
|
|
4
6
|
value?: RelationOptionType;
|
|
5
7
|
options?: RelationOptionType[];
|
|
6
8
|
onChange?: (value: RelationOptionType) => void;
|
|
@@ -10,7 +10,7 @@ type UseActions = ({ actions, dispatch }: {
|
|
|
10
10
|
payload: T;
|
|
11
11
|
}) => void;
|
|
12
12
|
}) => {
|
|
13
|
-
[key in keyof typeof actions]: <T>(payload
|
|
13
|
+
[key in keyof typeof actions]: <T>(payload?: T) => void;
|
|
14
14
|
};
|
|
15
15
|
export declare const useActions: UseActions;
|
|
16
16
|
export {};
|
package/esm/types/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reltio/components",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.1906",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE FILE",
|
|
5
5
|
"main": "./cjs/index.js",
|
|
6
6
|
"module": "./esm/index.js",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"@fluentui/react-context-selector": "^9.1.26",
|
|
9
9
|
"@react-google-maps/api": "2.7.0",
|
|
10
10
|
"@react-sigma/core": "3.4.0",
|
|
11
|
-
"@reltio/mdm-sdk": "^1.4.
|
|
11
|
+
"@reltio/mdm-sdk": "^1.4.1836",
|
|
12
12
|
"classnames": "^2.2.5",
|
|
13
13
|
"d3-cloud": "^1.2.5",
|
|
14
14
|
"d3-geo": "^2.0.1",
|