@reltio/components 1.4.848 → 1.4.852
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/BasicView/BasicView.d.ts +1 -1
- package/components/ErrorWrapper/ErrorMessage.d.ts +2 -1
- package/components/ErrorWrapper/ErrorMessage.js +3 -2
- package/components/ErrorWrapper/ErrorWrapper.d.ts +5 -1
- package/components/ErrorWrapper/ErrorWrapper.js +3 -3
- package/components/ErrorWrapper/styles.js +1 -1
- package/components/ProfileBand/styles.js +1 -1
- package/components/ProfileBandNavigation/ProfileBandNavigationWidget.d.ts +1 -1
- package/components/ReactSelect/styles.d.ts +1 -1
- package/components/ReltioMap/MapControls/TopRightMapControls/TopRightMapControls.d.ts +1 -1
- package/components/SmallIconButton/SmallIconButton.d.ts +1 -1
- package/components/SmallIconButton/index.d.ts +2 -2
- package/components/attributes/editMode/AttributesPager/AttributeRenderer.d.ts +2 -2
- package/components/attributes/editMode/AttributesPager/AttributeRenderer.js +11 -9
- package/components/attributes/editMode/AttributesPager/AttributesPager.js +8 -6
- package/components/attributes/editMode/AttributesPager/styles.d.ts +1 -1
- package/components/attributes/editMode/AttributesPager/styles.js +3 -0
- package/components/attributes/editMode/AttributesView/index.d.ts +4 -4
- package/components/attributes/editMode/ComplexAttribute/ComplexAttribute.d.ts +2 -2
- package/components/attributes/editMode/ComplexAttribute/ComplexAttribute.js +1 -1
- package/components/attributes/editMode/ComplexAttribute/styles.d.ts +1 -1
- package/components/attributes/editMode/ComplexAttribute/styles.js +3 -0
- package/components/attributes/editMode/NestedAttribute/NestedAttribute.d.ts +2 -2
- package/components/attributes/editMode/ReferenceAttribute/ReferenceAttribute.d.ts +2 -2
- package/components/attributes/editMode/ReferenceAttribute/index.d.ts +2 -2
- package/components/attributes/editMode/SimpleAttributeEditor/SimpleAttributeEditor.js +1 -1
- package/components/attributes/inline/AttributesList/AttributesList.d.ts +2 -2
- package/components/attributes/inline/AttributesPager/AttributesPager.d.ts +2 -2
- package/components/attributes/inline/ComplexAttribute/ComplexAttribute.d.ts +3 -3
- package/components/attributes/inline/ComplexAttribute/ComplexAttribute.js +6 -6
- package/components/attributes/inline/ImageAttribute/ImageAttribute.d.ts +2 -2
- package/components/attributes/inline/ImageAttributesBlock/ImageAttributesBlock.d.ts +2 -2
- package/components/attributes/inline/NestedAttribute/NestedAttribute.d.ts +2 -2
- package/components/attributes/inline/NestedAttributesBlock/NestedAttributesBlock.d.ts +3 -3
- package/components/attributes/inline/NestedAttributesBlock/NestedAttributesBlock.js +3 -3
- package/components/attributes/inline/ReferenceAttribute/ReferenceAttribute.d.ts +2 -2
- package/components/attributes/inline/ReferenceAttributesBlock/ReferenceAttributesBlock.d.ts +2 -2
- package/components/attributes/inline/SimpleAttribute/SimpleAttribute.d.ts +3 -3
- package/components/attributes/inline/SimpleAttribute/SimpleAttribute.js +5 -5
- package/components/attributes/inline/SimpleAttributesBlock/SimpleAttributesBlock.d.ts +3 -3
- package/components/attributes/inline/SimpleAttributesBlock/SimpleAttributesBlock.js +3 -3
- package/components/attributes/readMode/AttributesView/index.d.ts +4 -4
- package/components/attributes/readMode/NestedAttribute/NestedAttribute.d.ts +2 -2
- package/components/attributes/readMode/ReferenceAttribute/ReferenceAttribute.d.ts +2 -2
- package/components/attributes/readMode/ReferenceAttribute/index.d.ts +2 -2
- package/components/crosswalks/AttributesTable/AttributesTable.d.ts +8 -7
- package/components/crosswalks/AttributesTable/AttributesTable.js +12 -9
- package/components/crosswalks/AttributesTable/cell-renderers/AttributeValuesRenderer.d.ts +2 -1
- package/components/crosswalks/AttributesTable/cell-renderers/AttributeValuesRenderer.js +3 -3
- package/components/crosswalks/AttributesTable/cell-renderers/AttributesHeadCellRenderer.d.ts +9 -2
- package/components/crosswalks/AttributesTable/cell-renderers/AttributesHeadCellRenderer.js +19 -3
- package/components/crosswalks/AttributesTable/cell-renderers/attribute-renderers/AttributesFactory.d.ts +2 -0
- package/components/history/ProfileBandHistory/ProfileBandHistory.d.ts +3 -0
- package/components/history/ProfileBandHistory/ProfileBandHistory.js +45 -0
- package/components/history/ProfileBandHistory/styles.d.ts +1 -0
- package/components/history/ProfileBandHistory/styles.js +18 -0
- package/components/history/hooks/useHistorySlice.d.ts +4 -0
- package/components/history/hooks/useHistorySlice.js +58 -0
- package/components/history/index.d.ts +2 -2
- package/components/history/index.js +5 -5
- package/package.json +3 -3
|
@@ -10,17 +10,33 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
10
|
};
|
|
11
11
|
return __assign.apply(this, arguments);
|
|
12
12
|
};
|
|
13
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
14
|
+
var t = {};
|
|
15
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
16
|
+
t[p] = s[p];
|
|
17
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
18
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
19
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
20
|
+
t[p[i]] = s[p[i]];
|
|
21
|
+
}
|
|
22
|
+
return t;
|
|
23
|
+
};
|
|
13
24
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
25
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
26
|
};
|
|
16
27
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
+
exports.AttributesHeadCellRenderer = void 0;
|
|
17
29
|
var react_1 = __importDefault(require("react"));
|
|
18
30
|
var HeadCellRenderer_1 = __importDefault(require("./HeadCellRenderer"));
|
|
19
31
|
var AddAttributesButton_1 = __importDefault(require("../AddAttributesButton/AddAttributesButton"));
|
|
20
32
|
var Spacer_1 = __importDefault(require("../../../Spacer/Spacer"));
|
|
21
|
-
var
|
|
22
|
-
|
|
33
|
+
var BasicTableView_1 = require("../../../BasicTableView");
|
|
34
|
+
var ramda_1 = require("ramda");
|
|
35
|
+
var AttributesHeadCellRenderer = function (_a) {
|
|
36
|
+
var readOnly = _a.readOnly, props = __rest(_a, ["readOnly"]);
|
|
37
|
+
return readOnly ? (react_1.default.createElement(HeadCellRenderer_1.default, __assign({}, props))) : (react_1.default.createElement(HeadCellRenderer_1.default, __assign({}, props),
|
|
23
38
|
react_1.default.createElement(Spacer_1.default, null),
|
|
24
39
|
react_1.default.createElement(AddAttributesButton_1.default, null)));
|
|
25
40
|
};
|
|
26
|
-
exports.
|
|
41
|
+
exports.AttributesHeadCellRenderer = AttributesHeadCellRenderer;
|
|
42
|
+
exports.default = BasicTableView_1.withTableContext(ramda_1.pick(['readOnly']))(exports.AttributesHeadCellRenderer);
|
|
@@ -6,6 +6,8 @@ export declare type AttributesRendererProps = {
|
|
|
6
6
|
attributeType: AttributeType;
|
|
7
7
|
crosswalksMap: CrosswalksMap;
|
|
8
8
|
parentUri: string;
|
|
9
|
+
disableDelete?: boolean;
|
|
10
|
+
disableEdit?: boolean;
|
|
9
11
|
onDelete: (event: DeleteInlineAttributeEvent) => void;
|
|
10
12
|
onEdit: (event: EditInlineAttributeEvent) => void;
|
|
11
13
|
onPin: (event: PinInlineAttributeEvent) => void;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
+
}) : function(o, v) {
|
|
12
|
+
o["default"] = v;
|
|
13
|
+
});
|
|
14
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
+
if (mod && mod.__esModule) return mod;
|
|
16
|
+
var result = {};
|
|
17
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
+
__setModuleDefault(result, mod);
|
|
19
|
+
return result;
|
|
20
|
+
};
|
|
21
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
22
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
23
|
+
};
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
var react_1 = __importDefault(require("react"));
|
|
26
|
+
var react_redux_1 = require("react-redux");
|
|
27
|
+
var mdm_module_1 = __importStar(require("@reltio/mdm-module"));
|
|
28
|
+
var Button_1 = __importDefault(require("@material-ui/core/Button"));
|
|
29
|
+
var Typography_1 = __importDefault(require("@material-ui/core/Typography"));
|
|
30
|
+
var ramda_1 = require("ramda");
|
|
31
|
+
var ui_i18n_1 = __importDefault(require("ui-i18n"));
|
|
32
|
+
var styles_1 = require("./styles");
|
|
33
|
+
var ProfileBandHistory = function () {
|
|
34
|
+
var styles = styles_1.useStyles();
|
|
35
|
+
var historyEvent = react_redux_1.useSelector(mdm_module_1.default.selectors.getHistoryEvent);
|
|
36
|
+
var dispatch = react_redux_1.useDispatch();
|
|
37
|
+
var onCancel = ramda_1.pipe(mdm_module_1.profile.history.actions.clearHistoryEvent, dispatch);
|
|
38
|
+
return historyEvent ? (react_1.default.createElement("div", { className: styles.root },
|
|
39
|
+
react_1.default.createElement(Typography_1.default, { component: 'div' },
|
|
40
|
+
ui_i18n_1.default.text('You are viewing a historic slice:'),
|
|
41
|
+
' ',
|
|
42
|
+
react_1.default.createElement("span", { className: styles.slice }, ui_i18n_1.default.date(historyEvent.aStamp, 'llll'))),
|
|
43
|
+
react_1.default.createElement(Button_1.default, { className: styles.cancelButton, variant: "contained", color: "primary", onClick: onCancel }, ui_i18n_1.default.text('Cancel')))) : null;
|
|
44
|
+
};
|
|
45
|
+
exports.default = ProfileBandHistory;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useStyles: (props?: any) => import("@material-ui/core/styles/withStyles").ClassNameMap<"slice" | "root" | "cancelButton">;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useStyles = void 0;
|
|
4
|
+
var styles_1 = require("@material-ui/core/styles");
|
|
5
|
+
exports.useStyles = styles_1.makeStyles({
|
|
6
|
+
root: {
|
|
7
|
+
display: 'flex',
|
|
8
|
+
alignItems: 'flex-start'
|
|
9
|
+
},
|
|
10
|
+
slice: {
|
|
11
|
+
fontWeight: 500
|
|
12
|
+
},
|
|
13
|
+
cancelButton: {
|
|
14
|
+
width: '88px',
|
|
15
|
+
flexShrink: 0,
|
|
16
|
+
marginLeft: '15px'
|
|
17
|
+
}
|
|
18
|
+
});
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
+
}) : function(o, v) {
|
|
12
|
+
o["default"] = v;
|
|
13
|
+
});
|
|
14
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
+
if (mod && mod.__esModule) return mod;
|
|
16
|
+
var result = {};
|
|
17
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
+
__setModuleDefault(result, mod);
|
|
19
|
+
return result;
|
|
20
|
+
};
|
|
21
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
+
exports.useHistorySlice = void 0;
|
|
23
|
+
var react_1 = require("react");
|
|
24
|
+
var react_redux_1 = require("react-redux");
|
|
25
|
+
var mdm_module_1 = __importStar(require("@reltio/mdm-module"));
|
|
26
|
+
var mdm_sdk_1 = require("@reltio/mdm-sdk");
|
|
27
|
+
var hooks_1 = require("../../../hooks");
|
|
28
|
+
var useHistorySlice = function () {
|
|
29
|
+
var _a = react_1.useState(false), isLoading = _a[0], setIsLoading = _a[1];
|
|
30
|
+
var historyEvent = react_redux_1.useSelector(mdm_module_1.default.selectors.getHistoryEvent);
|
|
31
|
+
var historySlice = react_redux_1.useSelector(mdm_module_1.default.selectors.getHistorySlice);
|
|
32
|
+
var entity = react_redux_1.useSelector(mdm_module_1.default.selectors.getEntity);
|
|
33
|
+
var dispatch = react_redux_1.useDispatch();
|
|
34
|
+
var safePromise = hooks_1.useSafePromise();
|
|
35
|
+
var _b = historyEvent || {}, aStamp = _b.aStamp, bStamp = _b.bStamp, overrideUri = _b.overrideUri;
|
|
36
|
+
var entityUri = overrideUri || (entity === null || entity === void 0 ? void 0 : entity.uri);
|
|
37
|
+
react_1.useEffect(function () {
|
|
38
|
+
if (!historySlice && historyEvent && entityUri) {
|
|
39
|
+
setIsLoading(true);
|
|
40
|
+
safePromise(Promise.all([
|
|
41
|
+
mdm_sdk_1.getEntityTimeSlice(entityUri, aStamp),
|
|
42
|
+
bStamp && bStamp !== 1 ? mdm_sdk_1.getEntityTimeSlice(entityUri, bStamp) : Promise.resolve(null)
|
|
43
|
+
]))
|
|
44
|
+
.then(function (_a) {
|
|
45
|
+
var aEntity = _a[0], bEntity = _a[1];
|
|
46
|
+
dispatch(mdm_module_1.profile.history.actions.setHistorySlice({ aEntity: aEntity, bEntity: bEntity }));
|
|
47
|
+
})
|
|
48
|
+
.catch(function (e) {
|
|
49
|
+
console.warn('Failed to load entity slice', e);
|
|
50
|
+
})
|
|
51
|
+
.finally(function () {
|
|
52
|
+
setIsLoading(false);
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
}, [aStamp, bStamp, entityUri]);
|
|
56
|
+
return { isLoading: isLoading, historySlice: historySlice };
|
|
57
|
+
};
|
|
58
|
+
exports.useHistorySlice = useHistorySlice;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { useHistoricUris } from './hooks/useHistoricUris';
|
|
2
2
|
export { useHistoryWithTotal } from './hooks/useHistoryWithTotal';
|
|
3
|
+
export { useHistorySlice } from './hooks/useHistorySlice';
|
|
3
4
|
export { default as HistoryView } from './HistoryView/HistoryView';
|
|
4
5
|
export { default as HistoryHeader } from './HistoryHeader/HistoryHeader';
|
|
5
|
-
export { default as
|
|
6
|
-
export { default as HistoryMenuButton } from './HistoryMenuButton/HistoryMenuButton';
|
|
6
|
+
export { default as ProfileBandHistory } from './ProfileBandHistory/ProfileBandHistory';
|
|
7
7
|
export * from './types';
|
|
@@ -13,17 +13,17 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
13
13
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
14
14
|
};
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.
|
|
16
|
+
exports.ProfileBandHistory = exports.HistoryHeader = exports.HistoryView = exports.useHistorySlice = exports.useHistoryWithTotal = exports.useHistoricUris = void 0;
|
|
17
17
|
var useHistoricUris_1 = require("./hooks/useHistoricUris");
|
|
18
18
|
Object.defineProperty(exports, "useHistoricUris", { enumerable: true, get: function () { return useHistoricUris_1.useHistoricUris; } });
|
|
19
19
|
var useHistoryWithTotal_1 = require("./hooks/useHistoryWithTotal");
|
|
20
20
|
Object.defineProperty(exports, "useHistoryWithTotal", { enumerable: true, get: function () { return useHistoryWithTotal_1.useHistoryWithTotal; } });
|
|
21
|
+
var useHistorySlice_1 = require("./hooks/useHistorySlice");
|
|
22
|
+
Object.defineProperty(exports, "useHistorySlice", { enumerable: true, get: function () { return useHistorySlice_1.useHistorySlice; } });
|
|
21
23
|
var HistoryView_1 = require("./HistoryView/HistoryView");
|
|
22
24
|
Object.defineProperty(exports, "HistoryView", { enumerable: true, get: function () { return __importDefault(HistoryView_1).default; } });
|
|
23
25
|
var HistoryHeader_1 = require("./HistoryHeader/HistoryHeader");
|
|
24
26
|
Object.defineProperty(exports, "HistoryHeader", { enumerable: true, get: function () { return __importDefault(HistoryHeader_1).default; } });
|
|
25
|
-
var
|
|
26
|
-
Object.defineProperty(exports, "
|
|
27
|
-
var HistoryMenuButton_1 = require("./HistoryMenuButton/HistoryMenuButton");
|
|
28
|
-
Object.defineProperty(exports, "HistoryMenuButton", { enumerable: true, get: function () { return __importDefault(HistoryMenuButton_1).default; } });
|
|
27
|
+
var ProfileBandHistory_1 = require("./ProfileBandHistory/ProfileBandHistory");
|
|
28
|
+
Object.defineProperty(exports, "ProfileBandHistory", { enumerable: true, get: function () { return __importDefault(ProfileBandHistory_1).default; } });
|
|
29
29
|
__exportStar(require("./types"), exports);
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reltio/components",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.852",
|
|
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.852",
|
|
10
|
+
"@reltio/mdm-sdk": "^1.4.852",
|
|
11
11
|
"classnames": "^2.2.5",
|
|
12
12
|
"frontend-collective-react-dnd-scrollzone": "^1.0.2",
|
|
13
13
|
"nanoid": "^2.0.0",
|