@reltio/components 1.4.1487 → 1.4.1489
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/ModeSwitcher/styles.js +3 -1
- package/cjs/components/ReltioGridLayout/ReltioGridLayout.js +7 -3
- package/cjs/components/attributes/editMode/EntitySelector/EntitySelector.js +1 -4
- package/cjs/contexts/EntityLoadingIndicationContext/index.d.ts +2 -0
- package/cjs/contexts/EntityLoadingIndicationContext/index.js +10 -0
- package/cjs/contexts/index.d.ts +1 -0
- package/cjs/contexts/index.js +3 -1
- package/esm/components/ModeSwitcher/styles.js +3 -1
- package/esm/components/ReltioGridLayout/ReltioGridLayout.js +7 -3
- package/esm/components/attributes/editMode/EntitySelector/EntitySelector.js +2 -5
- package/esm/contexts/EntityLoadingIndicationContext/index.d.ts +2 -0
- package/esm/contexts/EntityLoadingIndicationContext/index.js +4 -0
- package/esm/contexts/index.d.ts +1 -0
- package/esm/contexts/index.js +1 -0
- package/package.json +3 -3
|
@@ -85,12 +85,16 @@ var ReltioGridLayout = function (_a) {
|
|
|
85
85
|
};
|
|
86
86
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
87
87
|
react_1.default.createElement(react_resize_detector_1.default, { refreshMode: "debounce", refreshRate: 50, handleWidth: true, onResize: function (width) { return setWidth(width); } }),
|
|
88
|
-
react_1.default.createElement(react_grid_layout_1.default, { innerRef: ref, layout: processedLayout, cols: cols, draggableHandle: draggableHandle, autoSize: true, rowHeight: rowHeight, width: width, margin: margin, onLayoutChange: onReltioLayoutChanged, isResizable: !isFullscreenEnabled, isDraggable: !isFullscreenEnabled, className: (0, classnames_1.default)(classes.root, styles.gridLayout, (_b = {},
|
|
88
|
+
!!width && (react_1.default.createElement(react_grid_layout_1.default, { innerRef: ref, layout: processedLayout, cols: cols, draggableHandle: draggableHandle, autoSize: true, rowHeight: rowHeight, width: width, margin: margin, onLayoutChange: onReltioLayoutChanged, isResizable: !isFullscreenEnabled, isDraggable: !isFullscreenEnabled, className: (0, classnames_1.default)(classes.root, styles.gridLayout, (_b = {},
|
|
89
|
+
_b[styles.gridFullscreen] = isFullscreenEnabled,
|
|
90
|
+
_b)), onDrop: handleDrop, droppingItem: droppingItem, isDroppable: isDroppable }, processedLayout.map(function (layoutItem) {
|
|
89
91
|
var isItemFullscreen = fullscreenItemId === layoutItem.i;
|
|
90
92
|
var isAutosize = ((0, helpers_1.getReltioLayoutItemById)(layout, layoutItem.i) || {}).autosizing;
|
|
91
|
-
var autosizeComponent = isAutosize
|
|
93
|
+
var autosizeComponent = isAutosize
|
|
94
|
+
? { AutosizeComponent: getAutosizeComponent(layoutItem.i) }
|
|
95
|
+
: {};
|
|
92
96
|
return (react_1.default.createElement(LayoutItem, __assign({ key: layoutItem.i, layoutItemConfig: layoutItem, views: views, onToggleFullscreen: onToggleFullscreen, onRemove: onRemove, className: (0, classnames_1.default)({ fullscreen: isItemFullscreen }, classes.item), isFullscreen: isItemFullscreen }, autosizeComponent)));
|
|
93
|
-
}))));
|
|
97
|
+
})))));
|
|
94
98
|
};
|
|
95
99
|
ReltioGridLayout.defaultProps = {
|
|
96
100
|
layoutOptions: {
|
|
@@ -96,10 +96,7 @@ var EntitySelector = function (_a) {
|
|
|
96
96
|
var _b = _a.entity, entity = _b === void 0 ? {} : _b, _c = _a.entityTypesUris, entityTypesUris = _c === void 0 ? [] : _c, mode = _a.mode, max = _a.max, onChange = _a.onChange, onCreate = _a.onCreate, metadata = _a.metadata, globalSearchRequestOptions = _a.globalSearchRequestOptions, attributeTypesSelectionStrategy = _a.attributeTypesSelectionStrategy, _d = _a.disableLinkClick, disableLinkClick = _d === void 0 ? false : _d, otherProps = __rest(_a, ["entity", "entityTypesUris", "mode", "max", "onChange", "onCreate", "metadata", "globalSearchRequestOptions", "attributeTypesSelectionStrategy", "disableLinkClick"]);
|
|
97
97
|
var styles = (0, styles_1.useStyles)();
|
|
98
98
|
var _e = (0, react_1.useState)(''), inputValue = _e[0], setInputValue = _e[1];
|
|
99
|
-
var entityTypes = (0, react_1.useMemo)(function () { return entityTypesUris.map(function (type) { return (0, mdm_sdk_1.getEntityType)(metadata, type); }); }, [
|
|
100
|
-
entityTypesUris,
|
|
101
|
-
metadata
|
|
102
|
-
]);
|
|
99
|
+
var entityTypes = (0, react_1.useMemo)(function () { return entityTypesUris.map(function (type) { return (0, mdm_sdk_1.getEntityType)(metadata, type); }).filter(mdm_sdk_1.isAvailableEntityType); }, [entityTypesUris, metadata]);
|
|
103
100
|
var options = __assign(__assign({}, globalSearchRequestOptions), { max: max });
|
|
104
101
|
var handleCreate = onCreate
|
|
105
102
|
? function (value, entityTypeUri) {
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.EntityLoadingIndicationContext = void 0;
|
|
7
|
+
var react_1 = __importDefault(require("react"));
|
|
8
|
+
var utils_1 = require("../../core/utils");
|
|
9
|
+
exports.EntityLoadingIndicationContext = react_1.default.createContext(utils_1.noop);
|
|
10
|
+
exports.EntityLoadingIndicationContext.displayName = 'EntityLoadingIndicationContext';
|
package/cjs/contexts/index.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ export { EntitiesMapContext } from './EntitiesMapContext';
|
|
|
12
12
|
export { CrosswalksDisplayProvider, useCrosswalkColor, useCrosswalkFocus, useCrosswalkHighlight, useHighlightedCrosswalks } from './CrosswalksDisplayContext';
|
|
13
13
|
export { ExpandedAttributesProvider, useAttributeExpanded } from './ExpandedAttributesContext';
|
|
14
14
|
export { EntityMarkerContext } from './EntityMarkerContext';
|
|
15
|
+
export { EntityLoadingIndicationContext } from './EntityLoadingIndicationContext';
|
|
15
16
|
export { WorkflowTasksContext } from './WorkflowTasksContext';
|
|
16
17
|
export { RelatedObjectUrisContext } from './RelatedObjectUrisContext';
|
|
17
18
|
export { EntityContext } from './EntityContext';
|
package/cjs/contexts/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PageRequestsAbortingContext = exports.DependentLookupAutopopulationContext = exports.FeaturesContext = exports.LabelsContext = exports.UrlGeneratorsContext = exports.ScrollToErrorProvider = exports.ScrollToErrorContext = exports.SearchValueContext = exports.InterceptHandlersContext = exports.HighlightedValuesContext = exports.SnackbarContext = exports.SearchFiltersContext = exports.useReloadFacet = exports.ReloadFacetProvider = exports.useReloadAllFacets = exports.SandboxAPIContext = exports.EntityContext = exports.RelatedObjectUrisContext = exports.WorkflowTasksContext = exports.EntityMarkerContext = exports.useAttributeExpanded = exports.ExpandedAttributesProvider = exports.useHighlightedCrosswalks = exports.useCrosswalkHighlight = exports.useCrosswalkFocus = exports.useCrosswalkColor = exports.CrosswalksDisplayProvider = exports.EntitiesMapContext = exports.IdContext = exports.ProfilePerspectiveViewContext = exports.PivotingAttributeContext = exports.UsersContext = exports.CollaborationContextProvider = exports.CollaborationContext = exports.BlockImageGalleryDialogContext = exports.ViewIdContext = exports.PopupBoundariesContext = exports.HistoryDiffContext = exports.AsyncMountContext = void 0;
|
|
3
|
+
exports.PageRequestsAbortingContext = exports.DependentLookupAutopopulationContext = exports.FeaturesContext = exports.LabelsContext = exports.UrlGeneratorsContext = exports.ScrollToErrorProvider = exports.ScrollToErrorContext = exports.SearchValueContext = exports.InterceptHandlersContext = exports.HighlightedValuesContext = exports.SnackbarContext = exports.SearchFiltersContext = exports.useReloadFacet = exports.ReloadFacetProvider = exports.useReloadAllFacets = exports.SandboxAPIContext = exports.EntityContext = exports.RelatedObjectUrisContext = exports.WorkflowTasksContext = exports.EntityLoadingIndicationContext = exports.EntityMarkerContext = exports.useAttributeExpanded = exports.ExpandedAttributesProvider = exports.useHighlightedCrosswalks = exports.useCrosswalkHighlight = exports.useCrosswalkFocus = exports.useCrosswalkColor = exports.CrosswalksDisplayProvider = exports.EntitiesMapContext = exports.IdContext = exports.ProfilePerspectiveViewContext = exports.PivotingAttributeContext = exports.UsersContext = exports.CollaborationContextProvider = exports.CollaborationContext = exports.BlockImageGalleryDialogContext = exports.ViewIdContext = exports.PopupBoundariesContext = exports.HistoryDiffContext = exports.AsyncMountContext = void 0;
|
|
4
4
|
var AsyncMountContext_1 = require("./AsyncMountContext");
|
|
5
5
|
Object.defineProperty(exports, "AsyncMountContext", { enumerable: true, get: function () { return AsyncMountContext_1.AsyncMountContext; } });
|
|
6
6
|
var HistoryAppearanceContext_1 = require("./HistoryAppearanceContext");
|
|
@@ -35,6 +35,8 @@ Object.defineProperty(exports, "ExpandedAttributesProvider", { enumerable: true,
|
|
|
35
35
|
Object.defineProperty(exports, "useAttributeExpanded", { enumerable: true, get: function () { return ExpandedAttributesContext_1.useAttributeExpanded; } });
|
|
36
36
|
var EntityMarkerContext_1 = require("./EntityMarkerContext");
|
|
37
37
|
Object.defineProperty(exports, "EntityMarkerContext", { enumerable: true, get: function () { return EntityMarkerContext_1.EntityMarkerContext; } });
|
|
38
|
+
var EntityLoadingIndicationContext_1 = require("./EntityLoadingIndicationContext");
|
|
39
|
+
Object.defineProperty(exports, "EntityLoadingIndicationContext", { enumerable: true, get: function () { return EntityLoadingIndicationContext_1.EntityLoadingIndicationContext; } });
|
|
38
40
|
var WorkflowTasksContext_1 = require("./WorkflowTasksContext");
|
|
39
41
|
Object.defineProperty(exports, "WorkflowTasksContext", { enumerable: true, get: function () { return WorkflowTasksContext_1.WorkflowTasksContext; } });
|
|
40
42
|
var RelatedObjectUrisContext_1 = require("./RelatedObjectUrisContext");
|
|
@@ -57,12 +57,16 @@ var ReltioGridLayout = function (_a) {
|
|
|
57
57
|
};
|
|
58
58
|
return (React.createElement(React.Fragment, null,
|
|
59
59
|
React.createElement(ReactResizeDetector, { refreshMode: "debounce", refreshRate: 50, handleWidth: true, onResize: function (width) { return setWidth(width); } }),
|
|
60
|
-
React.createElement(GridLayout, { innerRef: ref, layout: processedLayout, cols: cols, draggableHandle: draggableHandle, autoSize: true, rowHeight: rowHeight, width: width, margin: margin, onLayoutChange: onReltioLayoutChanged, isResizable: !isFullscreenEnabled, isDraggable: !isFullscreenEnabled, className: classnames(classes.root, styles.gridLayout, (_b = {},
|
|
60
|
+
!!width && (React.createElement(GridLayout, { innerRef: ref, layout: processedLayout, cols: cols, draggableHandle: draggableHandle, autoSize: true, rowHeight: rowHeight, width: width, margin: margin, onLayoutChange: onReltioLayoutChanged, isResizable: !isFullscreenEnabled, isDraggable: !isFullscreenEnabled, className: classnames(classes.root, styles.gridLayout, (_b = {},
|
|
61
|
+
_b[styles.gridFullscreen] = isFullscreenEnabled,
|
|
62
|
+
_b)), onDrop: handleDrop, droppingItem: droppingItem, isDroppable: isDroppable }, processedLayout.map(function (layoutItem) {
|
|
61
63
|
var isItemFullscreen = fullscreenItemId === layoutItem.i;
|
|
62
64
|
var isAutosize = (getReltioLayoutItemById(layout, layoutItem.i) || {}).autosizing;
|
|
63
|
-
var autosizeComponent = isAutosize
|
|
65
|
+
var autosizeComponent = isAutosize
|
|
66
|
+
? { AutosizeComponent: getAutosizeComponent(layoutItem.i) }
|
|
67
|
+
: {};
|
|
64
68
|
return (React.createElement(LayoutItem, __assign({ key: layoutItem.i, layoutItemConfig: layoutItem, views: views, onToggleFullscreen: onToggleFullscreen, onRemove: onRemove, className: classnames({ fullscreen: isItemFullscreen }, classes.item), isFullscreen: isItemFullscreen }, autosizeComponent)));
|
|
65
|
-
}))));
|
|
69
|
+
})))));
|
|
66
70
|
};
|
|
67
71
|
ReltioGridLayout.defaultProps = {
|
|
68
72
|
layoutOptions: {
|
|
@@ -24,7 +24,7 @@ import React, { useState, useMemo } from 'react';
|
|
|
24
24
|
import PropTypes from 'prop-types';
|
|
25
25
|
import i18n from 'ui-i18n';
|
|
26
26
|
import { isEmpty, prop } from 'ramda';
|
|
27
|
-
import { typeAheadSearch, getEntityType, MetadataType, ConnectionEntityType, ModeType, isTempUri, getLabel } from '@reltio/mdm-sdk';
|
|
27
|
+
import { typeAheadSearch, getEntityType, MetadataType, ConnectionEntityType, ModeType, isTempUri, isAvailableEntityType, getLabel } from '@reltio/mdm-sdk';
|
|
28
28
|
import DropDownSelector from '../../../DropDownSelector/DropDownSelector';
|
|
29
29
|
import EntityOption from './components/EntityOption';
|
|
30
30
|
import SingleValue from './components/SingleValue';
|
|
@@ -68,10 +68,7 @@ var EntitySelector = function (_a) {
|
|
|
68
68
|
var _b = _a.entity, entity = _b === void 0 ? {} : _b, _c = _a.entityTypesUris, entityTypesUris = _c === void 0 ? [] : _c, mode = _a.mode, max = _a.max, onChange = _a.onChange, onCreate = _a.onCreate, metadata = _a.metadata, globalSearchRequestOptions = _a.globalSearchRequestOptions, attributeTypesSelectionStrategy = _a.attributeTypesSelectionStrategy, _d = _a.disableLinkClick, disableLinkClick = _d === void 0 ? false : _d, otherProps = __rest(_a, ["entity", "entityTypesUris", "mode", "max", "onChange", "onCreate", "metadata", "globalSearchRequestOptions", "attributeTypesSelectionStrategy", "disableLinkClick"]);
|
|
69
69
|
var styles = useStyles();
|
|
70
70
|
var _e = useState(''), inputValue = _e[0], setInputValue = _e[1];
|
|
71
|
-
var entityTypes = useMemo(function () { return entityTypesUris.map(function (type) { return getEntityType(metadata, type); }); }, [
|
|
72
|
-
entityTypesUris,
|
|
73
|
-
metadata
|
|
74
|
-
]);
|
|
71
|
+
var entityTypes = useMemo(function () { return entityTypesUris.map(function (type) { return getEntityType(metadata, type); }).filter(isAvailableEntityType); }, [entityTypesUris, metadata]);
|
|
75
72
|
var options = __assign(__assign({}, globalSearchRequestOptions), { max: max });
|
|
76
73
|
var handleCreate = onCreate
|
|
77
74
|
? function (value, entityTypeUri) {
|
package/esm/contexts/index.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ export { EntitiesMapContext } from './EntitiesMapContext';
|
|
|
12
12
|
export { CrosswalksDisplayProvider, useCrosswalkColor, useCrosswalkFocus, useCrosswalkHighlight, useHighlightedCrosswalks } from './CrosswalksDisplayContext';
|
|
13
13
|
export { ExpandedAttributesProvider, useAttributeExpanded } from './ExpandedAttributesContext';
|
|
14
14
|
export { EntityMarkerContext } from './EntityMarkerContext';
|
|
15
|
+
export { EntityLoadingIndicationContext } from './EntityLoadingIndicationContext';
|
|
15
16
|
export { WorkflowTasksContext } from './WorkflowTasksContext';
|
|
16
17
|
export { RelatedObjectUrisContext } from './RelatedObjectUrisContext';
|
|
17
18
|
export { EntityContext } from './EntityContext';
|
package/esm/contexts/index.js
CHANGED
|
@@ -12,6 +12,7 @@ export { EntitiesMapContext } from './EntitiesMapContext';
|
|
|
12
12
|
export { CrosswalksDisplayProvider, useCrosswalkColor, useCrosswalkFocus, useCrosswalkHighlight, useHighlightedCrosswalks } from './CrosswalksDisplayContext';
|
|
13
13
|
export { ExpandedAttributesProvider, useAttributeExpanded } from './ExpandedAttributesContext';
|
|
14
14
|
export { EntityMarkerContext } from './EntityMarkerContext';
|
|
15
|
+
export { EntityLoadingIndicationContext } from './EntityLoadingIndicationContext';
|
|
15
16
|
export { WorkflowTasksContext } from './WorkflowTasksContext';
|
|
16
17
|
export { RelatedObjectUrisContext } from './RelatedObjectUrisContext';
|
|
17
18
|
export { EntityContext } from './EntityContext';
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reltio/components",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.1489",
|
|
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.1489",
|
|
11
|
+
"@reltio/mdm-sdk": "^1.4.1489",
|
|
12
12
|
"classnames": "^2.2.5",
|
|
13
13
|
"d3-cloud": "^1.2.5",
|
|
14
14
|
"d3-geo": "^2.0.1",
|