@reltio/components 1.4.825 → 1.4.829
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/components/BasicTableView/viewState/basicTableViewState.js +4 -1
- package/components/Image/ImageActionsOverlay/styles.d.ts +1 -1
- package/components/attributes/editMode/ComplexAttribute/styles.d.ts +1 -1
- package/components/attributes/inline/SimpleAttributeEditor/SimpleAttributeEditor.js +4 -1
- package/components/attributes/inline/SimpleAttributeEditor/styles.d.ts +1 -1
- package/components/attributes/inline/SimpleAttributeEditor/styles.js +6 -1
- package/components/crosswalks/CrosswalkDateEditor/styles.d.ts +1 -1
- package/components/editors/LookupEditor/entriesHelpers.js +6 -2
- package/hooks/useActions.d.ts +16 -4
- package/package.json +3 -3
|
@@ -33,7 +33,10 @@ var changeVisibleColumns = function (state, nextVisibleColumns) {
|
|
|
33
33
|
var isRemovedColumn = function (columnId) { return removedColumns.includes(columnId); };
|
|
34
34
|
return ramda_1.evolve({
|
|
35
35
|
visibleColumns: ramda_1.always(nextVisibleColumns),
|
|
36
|
-
sorting: ramda_1.when(function (sorting) {
|
|
36
|
+
sorting: ramda_1.when(function (sorting) {
|
|
37
|
+
if (sorting === void 0) { sorting = {}; }
|
|
38
|
+
return isRemovedColumn(sorting.field);
|
|
39
|
+
}, function () {
|
|
37
40
|
var nextSortField = nextVisibleColumns[0];
|
|
38
41
|
return { field: nextSortField, order: 'asc' };
|
|
39
42
|
}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const useStyles: (props?: any) => import("@material-ui/core/styles/withStyles").ClassNameMap<"button" | "overlay" | "selected" | "checkedIcon" | "
|
|
1
|
+
export declare const useStyles: (props?: any) => import("@material-ui/core/styles/withStyles").ClassNameMap<"button" | "overlay" | "selected" | "checkedIcon" | "actions" | "selectionMode" | "actionButton" | "dropDownMenuButton">;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const useStyles: (props?: any) => import("@material-ui/core/styles/withStyles").ClassNameMap<"deleted" | "label" | "
|
|
1
|
+
export const useStyles: (props?: any) => import("@material-ui/core/styles/withStyles").ClassNameMap<"deleted" | "label" | "actions" | "expandButton" | "editor" | "editedLabel" | "titleContainer">;
|
|
@@ -86,7 +86,10 @@ var SimpleAttributeEditor = function (_a) {
|
|
|
86
86
|
onClose();
|
|
87
87
|
};
|
|
88
88
|
return (react_1.default.createElement(Popover_1.default, { open: !!containerRef, anchorEl: containerRef.current, anchorOrigin: { vertical: 'top', horizontal: 'left' }, transformOrigin: { vertical: 'top', horizontal: 'left' }, classes: {
|
|
89
|
-
paper: classnames_1.default(styles.paper, (_b = {},
|
|
89
|
+
paper: classnames_1.default(styles.paper, (_b = {},
|
|
90
|
+
_b[styles.booleanEditor] = mdm_sdk_1.isBooleanType(dataTypeDefinition.type),
|
|
91
|
+
_b[styles.timestampEditor] = mdm_sdk_1.isTimestampBasedType(dataTypeDefinition.type),
|
|
92
|
+
_b)),
|
|
90
93
|
root: styles.popoverRoot
|
|
91
94
|
}, onKeyUp: onKeyUp, onBackdropClick: applyChangesAndClose },
|
|
92
95
|
react_1.default.createElement(editors_1.DataTypeValueEditor, { autoFocus: true, dataTypeDefinition: dataTypeDefinition, fieldName: mdm_sdk_1.attributeUriToSearchUri(attributeType.uri), onChange: changeEditorValue, TextFieldProps: TextFieldProps, value: editorValue, fullWidth: true })));
|
|
@@ -2,5 +2,5 @@ declare type StylesProps = {
|
|
|
2
2
|
color: string;
|
|
3
3
|
containerWidth: number;
|
|
4
4
|
};
|
|
5
|
-
export declare const useStyles: (props: StylesProps) => import("@material-ui/core/styles/withStyles").ClassNameMap<"input" | "paper" | "inputMultiline" | "textField" | "popoverRoot" | "
|
|
5
|
+
export declare const useStyles: (props: StylesProps) => import("@material-ui/core/styles/withStyles").ClassNameMap<"input" | "paper" | "inputMultiline" | "textField" | "popoverRoot" | "booleanEditor" | "timestampEditor">;
|
|
6
6
|
export {};
|
|
@@ -15,9 +15,14 @@ exports.useStyles = styles_1.makeStyles(function () { return ({
|
|
|
15
15
|
paddingBottom: 0
|
|
16
16
|
}
|
|
17
17
|
},
|
|
18
|
-
|
|
18
|
+
booleanEditor: {
|
|
19
19
|
paddingLeft: '10px'
|
|
20
20
|
},
|
|
21
|
+
timestampEditor: {
|
|
22
|
+
'&$paper': {
|
|
23
|
+
minWidth: '255px'
|
|
24
|
+
}
|
|
25
|
+
},
|
|
21
26
|
paper: function (_a) {
|
|
22
27
|
var color = _a.color, containerWidth = _a.containerWidth;
|
|
23
28
|
return ({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const useStyles: (props?: any) => import("@material-ui/core/styles/withStyles").ClassNameMap<"
|
|
1
|
+
export declare const useStyles: (props?: any) => import("@material-ui/core/styles/withStyles").ClassNameMap<"timestampEditor" | "timestampEditorInput">;
|
|
@@ -4,8 +4,12 @@ exports.buildLookupEntries = void 0;
|
|
|
4
4
|
var ramda_1 = require("ramda");
|
|
5
5
|
var mdm_sdk_1 = require("@reltio/mdm-sdk");
|
|
6
6
|
var LOOKUP_URI_SEPARATOR = '.';
|
|
7
|
+
var splitOnce = ramda_1.curry(function (separator, string) {
|
|
8
|
+
var _a = string.split(separator), first = _a[0], other = _a.slice(1);
|
|
9
|
+
return [first, other.join(separator)];
|
|
10
|
+
});
|
|
7
11
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
8
|
-
var getLookupByUri = ramda_1.useWith(ramda_1.path, [
|
|
12
|
+
var getLookupByUri = ramda_1.useWith(ramda_1.path, [splitOnce(LOOKUP_URI_SEPARATOR)]);
|
|
9
13
|
var byLabel = ramda_1.ascend(ramda_1.prop('label'));
|
|
10
14
|
var buildLookupEntries = function (lookupTypeCode, lookups) {
|
|
11
15
|
var getLookupPath = function (uri) {
|
|
@@ -15,7 +19,7 @@ var buildLookupEntries = function (lookupTypeCode, lookups) {
|
|
|
15
19
|
var buildEntry = function (_a) {
|
|
16
20
|
var uri = _a[0], value = _a[1];
|
|
17
21
|
var lookup = getLookupByUri(uri, lookups);
|
|
18
|
-
var _b =
|
|
22
|
+
var _b = splitOnce(LOOKUP_URI_SEPARATOR, uri), code = _b[1];
|
|
19
23
|
var label = mdm_sdk_1.getLookupLabel(code, lookup.displayName);
|
|
20
24
|
return lookup === value ? { label: label, value: code } : { label: label, values: buildEntries(value) };
|
|
21
25
|
};
|
package/hooks/useActions.d.ts
CHANGED
|
@@ -1,4 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
actions:
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
declare type UseActions = ({ actions, dispatch }: {
|
|
2
|
+
actions: {
|
|
3
|
+
[key: string]: <T>(payload: T) => {
|
|
4
|
+
type: string;
|
|
5
|
+
payload: T;
|
|
6
|
+
};
|
|
7
|
+
};
|
|
8
|
+
dispatch: <T>({ type, payload }: {
|
|
9
|
+
type: string;
|
|
10
|
+
payload: T;
|
|
11
|
+
}) => void;
|
|
12
|
+
}) => {
|
|
13
|
+
[key in keyof typeof actions]: <T>(payload: T) => void;
|
|
14
|
+
};
|
|
15
|
+
export declare const useActions: UseActions;
|
|
16
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reltio/components",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.829",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE FILE",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"@date-io/moment": "^1.3.5",
|
|
8
8
|
"@react-google-maps/api": "^2.7.0",
|
|
9
|
-
"@reltio/mdm-module": "^1.4.
|
|
10
|
-
"@reltio/mdm-sdk": "^1.4.
|
|
9
|
+
"@reltio/mdm-module": "^1.4.829",
|
|
10
|
+
"@reltio/mdm-sdk": "^1.4.829",
|
|
11
11
|
"classnames": "^2.2.5",
|
|
12
12
|
"frontend-collective-react-dnd-scrollzone": "^1.0.2",
|
|
13
13
|
"nanoid": "^2.0.0",
|