@reltio/components 1.4.1365 → 1.4.1366
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/crosswalks/AttributesTable/AttributesTable.d.ts +3 -1
- package/cjs/components/crosswalks/AttributesTable/AttributesTable.js +5 -3
- package/cjs/components/crosswalks/AttributesTable/styles.d.ts +1 -1
- package/cjs/components/crosswalks/AttributesTable/styles.js +4 -2
- package/esm/components/crosswalks/AttributesTable/AttributesTable.d.ts +3 -1
- package/esm/components/crosswalks/AttributesTable/AttributesTable.js +5 -3
- package/esm/components/crosswalks/AttributesTable/styles.d.ts +1 -1
- package/esm/components/crosswalks/AttributesTable/styles.js +4 -2
- package/package.json +3 -3
|
@@ -16,6 +16,8 @@ declare type Props = {
|
|
|
16
16
|
onAdd?: (event: AddInlineAttributeEvent) => void;
|
|
17
17
|
selectedAttributeTypes?: AttributeType[];
|
|
18
18
|
onSelectAttributeTypes?: (selected: AttributeType[]) => void;
|
|
19
|
+
additionalHeaderItems?: React.ReactNode;
|
|
20
|
+
className?: string;
|
|
19
21
|
};
|
|
20
|
-
declare const _default: React.MemoExoticComponent<({ entity, isLoading, crosswalksMap, visibleColumns, onChangeVisibleColumns, readOnly, onDelete, onPin, onIgnore, onEdit, onAdd, selectedAttributeTypes, onSelectAttributeTypes }: Props) => JSX.Element>;
|
|
22
|
+
declare const _default: React.MemoExoticComponent<({ entity, isLoading, crosswalksMap, visibleColumns, onChangeVisibleColumns, readOnly, onDelete, onPin, onIgnore, onEdit, onAdd, selectedAttributeTypes, onSelectAttributeTypes, additionalHeaderItems, className }: Props) => JSX.Element>;
|
|
21
23
|
export default _default;
|
|
@@ -39,6 +39,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
39
39
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
40
|
var react_1 = __importStar(require("react"));
|
|
41
41
|
var react_redux_1 = require("react-redux");
|
|
42
|
+
var classnames_1 = __importDefault(require("classnames"));
|
|
42
43
|
var ui_i18n_1 = __importDefault(require("ui-i18n"));
|
|
43
44
|
var mdm_module_1 = __importDefault(require("@reltio/mdm-module"));
|
|
44
45
|
var mdm_sdk_1 = require("@reltio/mdm-sdk");
|
|
@@ -54,7 +55,7 @@ var core_1 = require("../../../core");
|
|
|
54
55
|
var styles_1 = require("./styles");
|
|
55
56
|
var DEFAULT_ROW_HEIGHT = 68;
|
|
56
57
|
var AttributesTable = function (_a) {
|
|
57
|
-
var entity = _a.entity, isLoading = _a.isLoading, crosswalksMap = _a.crosswalksMap, _b = _a.visibleColumns, visibleColumns = _b === void 0 ? helpers_1.DEFAULT_VISIBLE_COLUMNS : _b, onChangeVisibleColumns = _a.onChangeVisibleColumns, readOnly = _a.readOnly, _c = _a.onDelete, onDelete = _c === void 0 ? core_1.noop : _c, _d = _a.onPin, onPin = _d === void 0 ? core_1.noop : _d, _e = _a.onIgnore, onIgnore = _e === void 0 ? core_1.noop : _e, _f = _a.onEdit, onEdit = _f === void 0 ? core_1.noop : _f, _g = _a.onAdd, onAdd = _g === void 0 ? core_1.noop : _g, selectedAttributeTypes = _a.selectedAttributeTypes, _h = _a.onSelectAttributeTypes, onSelectAttributeTypes = _h === void 0 ? core_1.noop : _h;
|
|
58
|
+
var entity = _a.entity, isLoading = _a.isLoading, crosswalksMap = _a.crosswalksMap, _b = _a.visibleColumns, visibleColumns = _b === void 0 ? helpers_1.DEFAULT_VISIBLE_COLUMNS : _b, onChangeVisibleColumns = _a.onChangeVisibleColumns, readOnly = _a.readOnly, _c = _a.onDelete, onDelete = _c === void 0 ? core_1.noop : _c, _d = _a.onPin, onPin = _d === void 0 ? core_1.noop : _d, _e = _a.onIgnore, onIgnore = _e === void 0 ? core_1.noop : _e, _f = _a.onEdit, onEdit = _f === void 0 ? core_1.noop : _f, _g = _a.onAdd, onAdd = _g === void 0 ? core_1.noop : _g, selectedAttributeTypes = _a.selectedAttributeTypes, _h = _a.onSelectAttributeTypes, onSelectAttributeTypes = _h === void 0 ? core_1.noop : _h, additionalHeaderItems = _a.additionalHeaderItems, className = _a.className;
|
|
58
59
|
var styles = (0, styles_1.useStyles)();
|
|
59
60
|
var visibleColumnsData = (0, react_1.useMemo)(function () {
|
|
60
61
|
return (0, ramda_1.pipe)((0, ramda_1.filter)(function (_a) {
|
|
@@ -109,8 +110,9 @@ var AttributesTable = function (_a) {
|
|
|
109
110
|
onSelectAttributeTypes,
|
|
110
111
|
readOnly
|
|
111
112
|
]);
|
|
112
|
-
return (react_1.default.createElement("div", { className: styles.tableContainer },
|
|
113
|
-
react_1.default.createElement(BasicViewHeader_1.default, { classes: { root: styles.tableHeader }, title: ui_i18n_1.default.text('Sources') },
|
|
113
|
+
return (react_1.default.createElement("div", { className: (0, classnames_1.default)(styles.tableContainer, className) },
|
|
114
|
+
react_1.default.createElement(BasicViewHeader_1.default, { classes: { root: styles.tableHeader, title: styles.tableTitle }, title: ui_i18n_1.default.text('Sources') },
|
|
115
|
+
additionalHeaderItems,
|
|
114
116
|
react_1.default.createElement(BasicTableView_1.ColumnsSettings, { columnsData: helpers_1.COLUMNS_DATA, selectedColumns: visibleColumns, onChangeColumns: onChangeVisibleColumns })),
|
|
115
117
|
react_1.default.createElement("div", { className: styles.tableContent },
|
|
116
118
|
isLoading && react_1.default.createElement(LinearLoadIndicator_1.default, null),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const useStyles: (props?: any) => import("@material-ui/core/styles/withStyles").ClassNameMap<"tableContainer" | "tableHeader" | "tableContent">;
|
|
1
|
+
export declare const useStyles: (props?: any) => import("@material-ui/core/styles/withStyles").ClassNameMap<"tableContainer" | "tableHeader" | "tableTitle" | "tableContent">;
|
|
@@ -11,8 +11,10 @@ exports.useStyles = (0, styles_1.makeStyles)({
|
|
|
11
11
|
},
|
|
12
12
|
tableHeader: {
|
|
13
13
|
display: 'flex',
|
|
14
|
-
flexDirection: 'row'
|
|
15
|
-
|
|
14
|
+
flexDirection: 'row'
|
|
15
|
+
},
|
|
16
|
+
tableTitle: {
|
|
17
|
+
marginRight: 'auto'
|
|
16
18
|
},
|
|
17
19
|
tableContent: {
|
|
18
20
|
display: 'flex',
|
|
@@ -16,6 +16,8 @@ declare type Props = {
|
|
|
16
16
|
onAdd?: (event: AddInlineAttributeEvent) => void;
|
|
17
17
|
selectedAttributeTypes?: AttributeType[];
|
|
18
18
|
onSelectAttributeTypes?: (selected: AttributeType[]) => void;
|
|
19
|
+
additionalHeaderItems?: React.ReactNode;
|
|
20
|
+
className?: string;
|
|
19
21
|
};
|
|
20
|
-
declare const _default: React.MemoExoticComponent<({ entity, isLoading, crosswalksMap, visibleColumns, onChangeVisibleColumns, readOnly, onDelete, onPin, onIgnore, onEdit, onAdd, selectedAttributeTypes, onSelectAttributeTypes }: Props) => JSX.Element>;
|
|
22
|
+
declare const _default: React.MemoExoticComponent<({ entity, isLoading, crosswalksMap, visibleColumns, onChangeVisibleColumns, readOnly, onDelete, onPin, onIgnore, onEdit, onAdd, selectedAttributeTypes, onSelectAttributeTypes, additionalHeaderItems, className }: Props) => JSX.Element>;
|
|
21
23
|
export default _default;
|
|
@@ -11,6 +11,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
11
11
|
};
|
|
12
12
|
import React, { memo, useCallback, useEffect, useMemo, useState } from 'react';
|
|
13
13
|
import { useSelector } from 'react-redux';
|
|
14
|
+
import classnames from 'classnames';
|
|
14
15
|
import i18n from 'ui-i18n';
|
|
15
16
|
import mdmModule from '@reltio/mdm-module';
|
|
16
17
|
import { findAttributeTypeByUri, isReadableAttribute, makeAttrTypeUri } from '@reltio/mdm-sdk';
|
|
@@ -26,7 +27,7 @@ import { noop } from '../../../core';
|
|
|
26
27
|
import { useStyles } from './styles';
|
|
27
28
|
var DEFAULT_ROW_HEIGHT = 68;
|
|
28
29
|
var AttributesTable = function (_a) {
|
|
29
|
-
var entity = _a.entity, isLoading = _a.isLoading, crosswalksMap = _a.crosswalksMap, _b = _a.visibleColumns, visibleColumns = _b === void 0 ? DEFAULT_VISIBLE_COLUMNS : _b, onChangeVisibleColumns = _a.onChangeVisibleColumns, readOnly = _a.readOnly, _c = _a.onDelete, onDelete = _c === void 0 ? noop : _c, _d = _a.onPin, onPin = _d === void 0 ? noop : _d, _e = _a.onIgnore, onIgnore = _e === void 0 ? noop : _e, _f = _a.onEdit, onEdit = _f === void 0 ? noop : _f, _g = _a.onAdd, onAdd = _g === void 0 ? noop : _g, selectedAttributeTypes = _a.selectedAttributeTypes, _h = _a.onSelectAttributeTypes, onSelectAttributeTypes = _h === void 0 ? noop : _h;
|
|
30
|
+
var entity = _a.entity, isLoading = _a.isLoading, crosswalksMap = _a.crosswalksMap, _b = _a.visibleColumns, visibleColumns = _b === void 0 ? DEFAULT_VISIBLE_COLUMNS : _b, onChangeVisibleColumns = _a.onChangeVisibleColumns, readOnly = _a.readOnly, _c = _a.onDelete, onDelete = _c === void 0 ? noop : _c, _d = _a.onPin, onPin = _d === void 0 ? noop : _d, _e = _a.onIgnore, onIgnore = _e === void 0 ? noop : _e, _f = _a.onEdit, onEdit = _f === void 0 ? noop : _f, _g = _a.onAdd, onAdd = _g === void 0 ? noop : _g, selectedAttributeTypes = _a.selectedAttributeTypes, _h = _a.onSelectAttributeTypes, onSelectAttributeTypes = _h === void 0 ? noop : _h, additionalHeaderItems = _a.additionalHeaderItems, className = _a.className;
|
|
30
31
|
var styles = useStyles();
|
|
31
32
|
var visibleColumnsData = useMemo(function () {
|
|
32
33
|
return pipe(filter(function (_a) {
|
|
@@ -81,8 +82,9 @@ var AttributesTable = function (_a) {
|
|
|
81
82
|
onSelectAttributeTypes,
|
|
82
83
|
readOnly
|
|
83
84
|
]);
|
|
84
|
-
return (React.createElement("div", { className: styles.tableContainer },
|
|
85
|
-
React.createElement(BasicViewHeader, { classes: { root: styles.tableHeader }, title: i18n.text('Sources') },
|
|
85
|
+
return (React.createElement("div", { className: classnames(styles.tableContainer, className) },
|
|
86
|
+
React.createElement(BasicViewHeader, { classes: { root: styles.tableHeader, title: styles.tableTitle }, title: i18n.text('Sources') },
|
|
87
|
+
additionalHeaderItems,
|
|
86
88
|
React.createElement(ColumnsSettings, { columnsData: COLUMNS_DATA, selectedColumns: visibleColumns, onChangeColumns: onChangeVisibleColumns })),
|
|
87
89
|
React.createElement("div", { className: styles.tableContent },
|
|
88
90
|
isLoading && React.createElement(LinearLoadIndicator, null),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const useStyles: (props?: any) => import("@material-ui/core/styles/withStyles").ClassNameMap<"tableContainer" | "tableHeader" | "tableContent">;
|
|
1
|
+
export declare const useStyles: (props?: any) => import("@material-ui/core/styles/withStyles").ClassNameMap<"tableContainer" | "tableHeader" | "tableTitle" | "tableContent">;
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reltio/components",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.1366",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE FILE",
|
|
5
5
|
"main": "./cjs/index.js",
|
|
6
6
|
"module": "./esm/index.js",
|
|
7
7
|
"dependencies": {
|
|
8
8
|
"@date-io/moment": "^1.3.5",
|
|
9
9
|
"@react-google-maps/api": "2.7.0",
|
|
10
|
-
"@reltio/mdm-module": "^1.4.
|
|
11
|
-
"@reltio/mdm-sdk": "^1.4.
|
|
10
|
+
"@reltio/mdm-module": "^1.4.1366",
|
|
11
|
+
"@reltio/mdm-sdk": "^1.4.1366",
|
|
12
12
|
"classnames": "^2.2.5",
|
|
13
13
|
"d3-cloud": "^1.2.5",
|
|
14
14
|
"d3-geo": "^2.0.1",
|