@reltio/components 1.4.990 → 1.4.991
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/history/HistoryGraph/HistoryCircle.d.ts +6 -7
- package/cjs/components/history/HistoryGraph/HistoryCircle.js +45 -7
- package/cjs/components/history/HistoryGraph/HistoryGraph.d.ts +19 -1
- package/cjs/components/history/HistoryGraph/HistoryGraph.js +6 -3
- package/cjs/components/history/HistoryTree/HistoryTree.js +20 -1
- package/cjs/components/history/types/HistoryRowData.d.ts +1 -0
- package/esm/components/history/HistoryGraph/HistoryCircle.d.ts +6 -7
- package/esm/components/history/HistoryGraph/HistoryCircle.js +27 -5
- package/esm/components/history/HistoryGraph/HistoryGraph.d.ts +19 -1
- package/esm/components/history/HistoryGraph/HistoryGraph.js +5 -3
- package/esm/components/history/HistoryTree/HistoryTree.js +22 -3
- package/esm/components/history/types/HistoryRowData.d.ts +1 -0
- package/package.json +3 -3
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
declare
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const BUMP_RADIUS = 3;
|
|
3
|
+
export declare const LINE_MARGIN = 4;
|
|
4
|
+
declare const _default: React.ForwardRefExoticComponent<Pick<{
|
|
3
5
|
x: number;
|
|
4
6
|
y: number;
|
|
5
7
|
color: string;
|
|
@@ -7,8 +9,5 @@ declare type Props = {
|
|
|
7
9
|
isCollapsed?: boolean;
|
|
8
10
|
showCollapseIcon?: boolean;
|
|
9
11
|
showLine?: boolean;
|
|
10
|
-
}
|
|
11
|
-
export
|
|
12
|
-
export declare const LINE_MARGIN = 4;
|
|
13
|
-
declare const HistoryCircle: ({ x, y, color, isDashed, isCollapsed, showCollapseIcon, showLine }: Props) => JSX.Element;
|
|
14
|
-
export default HistoryCircle;
|
|
12
|
+
} & React.SVGProps<SVGGElement>, "string" | "visibility" | "type" | "max" | "filter" | "children" | "values" | "radius" | "operator" | "order" | "offset" | "method" | "id" | "width" | "height" | "in" | "attributeName" | "mode" | "attributeType" | "direction" | "name" | "path" | "from" | "to" | "end" | "clipPath" | "color" | "cursor" | "display" | "fontFamily" | "fontSize" | "fontSizeAdjust" | "fontStretch" | "fontStyle" | "fontVariant" | "fontWeight" | "imageRendering" | "letterSpacing" | "opacity" | "overflow" | "paintOrder" | "pointerEvents" | "rotate" | "scale" | "textRendering" | "transform" | "unicodeBidi" | "wordSpacing" | "writingMode" | "mask" | "textDecoration" | "clip" | "alignmentBaseline" | "baselineShift" | "clipRule" | "colorInterpolation" | "colorRendering" | "dominantBaseline" | "fill" | "fillOpacity" | "fillRule" | "floodColor" | "floodOpacity" | "glyphOrientationVertical" | "lightingColor" | "markerEnd" | "markerMid" | "markerStart" | "shapeRendering" | "stopColor" | "stopOpacity" | "stroke" | "strokeDasharray" | "strokeDashoffset" | "strokeLinecap" | "strokeLinejoin" | "strokeMiterlimit" | "strokeOpacity" | "strokeWidth" | "textAnchor" | "vectorEffect" | "local" | "style" | "alphabetic" | "hanging" | "ideographic" | "mathematical" | "onScroll" | "className" | "y" | "d" | "lang" | "tabIndex" | "role" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "href" | "media" | "target" | "origin" | "min" | "crossOrigin" | "accentHeight" | "accumulate" | "additive" | "allowReorder" | "amplitude" | "arabicForm" | "ascent" | "autoReverse" | "azimuth" | "baseFrequency" | "baseProfile" | "bbox" | "begin" | "bias" | "by" | "calcMode" | "capHeight" | "clipPathUnits" | "colorInterpolationFilters" | "colorProfile" | "contentScriptType" | "contentStyleType" | "cx" | "cy" | "decelerate" | "descent" | "diffuseConstant" | "divisor" | "dur" | "dx" | "dy" | "edgeMode" | "elevation" | "enableBackground" | "exponent" | "externalResourcesRequired" | "filterRes" | "filterUnits" | "focusable" | "format" | "fx" | "fy" | "g1" | "g2" | "glyphName" | "glyphOrientationHorizontal" | "glyphRef" | "gradientTransform" | "gradientUnits" | "horizAdvX" | "horizOriginX" | "in2" | "intercept" | "k1" | "k2" | "k3" | "k4" | "k" | "kernelMatrix" | "kernelUnitLength" | "kerning" | "keyPoints" | "keySplines" | "keyTimes" | "lengthAdjust" | "limitingConeAngle" | "markerHeight" | "markerUnits" | "markerWidth" | "maskContentUnits" | "maskUnits" | "numOctaves" | "orient" | "orientation" | "overlinePosition" | "overlineThickness" | "panose1" | "pathLength" | "patternContentUnits" | "patternTransform" | "patternUnits" | "points" | "pointsAtX" | "pointsAtY" | "pointsAtZ" | "preserveAlpha" | "preserveAspectRatio" | "primitiveUnits" | "r" | "refX" | "refY" | "renderingIntent" | "repeatCount" | "repeatDur" | "requiredExtensions" | "requiredFeatures" | "restart" | "result" | "rx" | "ry" | "seed" | "slope" | "spacing" | "specularConstant" | "specularExponent" | "speed" | "spreadMethod" | "startOffset" | "stdDeviation" | "stemh" | "stemv" | "stitchTiles" | "strikethroughPosition" | "strikethroughThickness" | "surfaceScale" | "systemLanguage" | "tableValues" | "targetX" | "targetY" | "textLength" | "u1" | "u2" | "underlinePosition" | "underlineThickness" | "unicode" | "unicodeRange" | "unitsPerEm" | "vAlphabetic" | "version" | "vertAdvY" | "vertOriginX" | "vertOriginY" | "vHanging" | "vIdeographic" | "viewBox" | "viewTarget" | "vMathematical" | "widths" | "x1" | "x2" | "x" | "xChannelSelector" | "xHeight" | "xlinkActuate" | "xlinkArcrole" | "xlinkHref" | "xlinkRole" | "xlinkShow" | "xlinkTitle" | "xlinkType" | "xmlBase" | "xmlLang" | "xmlns" | "xmlnsXlink" | "xmlSpace" | "y1" | "y2" | "yChannelSelector" | "z" | "zoomAndPan" | "isDashed" | "isCollapsed" | "showCollapseIcon" | "showLine"> & React.RefAttributes<unknown>>;
|
|
13
|
+
export default _default;
|
|
@@ -1,20 +1,58 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
16
|
+
}) : (function(o, m, k, k2) {
|
|
17
|
+
if (k2 === undefined) k2 = k;
|
|
18
|
+
o[k2] = m[k];
|
|
19
|
+
}));
|
|
20
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
21
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
22
|
+
}) : function(o, v) {
|
|
23
|
+
o["default"] = v;
|
|
24
|
+
});
|
|
25
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
26
|
+
if (mod && mod.__esModule) return mod;
|
|
27
|
+
var result = {};
|
|
28
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
29
|
+
__setModuleDefault(result, mod);
|
|
30
|
+
return result;
|
|
31
|
+
};
|
|
32
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
33
|
+
var t = {};
|
|
34
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
35
|
+
t[p] = s[p];
|
|
36
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
37
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
38
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
39
|
+
t[p[i]] = s[p[i]];
|
|
40
|
+
}
|
|
41
|
+
return t;
|
|
4
42
|
};
|
|
5
43
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
44
|
exports.LINE_MARGIN = exports.BUMP_RADIUS = void 0;
|
|
7
|
-
var react_1 =
|
|
45
|
+
var react_1 = __importStar(require("react"));
|
|
8
46
|
exports.BUMP_RADIUS = 3;
|
|
9
47
|
exports.LINE_MARGIN = 4;
|
|
10
|
-
var HistoryCircle = function (_a) {
|
|
11
|
-
var x = _a.x, y = _a.y, color = _a.color, isDashed = _a.isDashed, isCollapsed = _a.isCollapsed, showCollapseIcon = _a.showCollapseIcon, showLine = _a.showLine;
|
|
48
|
+
var HistoryCircle = function (_a, ref) {
|
|
49
|
+
var x = _a.x, y = _a.y, color = _a.color, isDashed = _a.isDashed, isCollapsed = _a.isCollapsed, showCollapseIcon = _a.showCollapseIcon, showLine = _a.showLine, otherProps = __rest(_a, ["x", "y", "color", "isDashed", "isCollapsed", "showCollapseIcon", "showLine"]);
|
|
12
50
|
var radius = showCollapseIcon ? exports.BUMP_RADIUS * 2 : exports.BUMP_RADIUS;
|
|
13
|
-
return (react_1.default.createElement("g",
|
|
51
|
+
return (react_1.default.createElement("g", __assign({}, otherProps, { ref: ref }),
|
|
14
52
|
showLine && (react_1.default.createElement("rect", { id: "line", x: x - radius - exports.LINE_MARGIN, y: y - radius - exports.LINE_MARGIN, width: radius * 2 + exports.LINE_MARGIN * 2, height: 2, fill: color })),
|
|
15
53
|
react_1.default.createElement("circle", { cx: x, cy: y, r: radius, fill: isDashed ? '#fff' : color, stroke: color, strokeDasharray: isDashed ? '1,1' : undefined, strokeWidth: 2 }),
|
|
16
54
|
showCollapseIcon && (react_1.default.createElement("g", { id: "icon" },
|
|
17
55
|
react_1.default.createElement("rect", { x: x - 4, y: y - 1, width: 8, height: 2, fill: "#fff" }),
|
|
18
56
|
isCollapsed && react_1.default.createElement("rect", { x: x - 1, y: y - 4, width: 2, height: 8, fill: "#fff" })))));
|
|
19
57
|
};
|
|
20
|
-
exports.default = HistoryCircle;
|
|
58
|
+
exports.default = react_1.forwardRef(HistoryCircle);
|
|
@@ -1,7 +1,25 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { HistoryData } from '../types';
|
|
3
|
+
export declare const HistoryCircleWithTooltip: React.ForwardRefExoticComponent<import("prop-types").InferPropsInner<Pick<{
|
|
4
|
+
tooltipTitle: import("prop-types").Requireable<import("prop-types").ReactNodeLike>;
|
|
5
|
+
tooltipPlacement: import("prop-types").Requireable<string>;
|
|
6
|
+
showForDisabled: import("prop-types").Requireable<boolean>;
|
|
7
|
+
}, never>> & Partial<import("prop-types").InferPropsInner<Pick<{
|
|
8
|
+
tooltipTitle: import("prop-types").Requireable<import("prop-types").ReactNodeLike>;
|
|
9
|
+
tooltipPlacement: import("prop-types").Requireable<string>;
|
|
10
|
+
showForDisabled: import("prop-types").Requireable<boolean>;
|
|
11
|
+
}, "tooltipTitle" | "tooltipPlacement" | "showForDisabled">>> & Pick<{
|
|
12
|
+
x: number;
|
|
13
|
+
y: number;
|
|
14
|
+
color: string;
|
|
15
|
+
isDashed?: boolean;
|
|
16
|
+
isCollapsed?: boolean;
|
|
17
|
+
showCollapseIcon?: boolean;
|
|
18
|
+
showLine?: boolean;
|
|
19
|
+
} & React.SVGProps<SVGGElement>, "string" | "visibility" | "type" | "max" | "filter" | "children" | "values" | "radius" | "operator" | "order" | "offset" | "method" | "id" | "width" | "height" | "in" | "attributeName" | "mode" | "attributeType" | "direction" | "name" | "path" | "from" | "to" | "end" | "clipPath" | "color" | "cursor" | "display" | "fontFamily" | "fontSize" | "fontSizeAdjust" | "fontStretch" | "fontStyle" | "fontVariant" | "fontWeight" | "imageRendering" | "letterSpacing" | "opacity" | "overflow" | "paintOrder" | "pointerEvents" | "rotate" | "scale" | "textRendering" | "transform" | "unicodeBidi" | "wordSpacing" | "writingMode" | "mask" | "textDecoration" | "clip" | "alignmentBaseline" | "baselineShift" | "clipRule" | "colorInterpolation" | "colorRendering" | "dominantBaseline" | "fill" | "fillOpacity" | "fillRule" | "floodColor" | "floodOpacity" | "glyphOrientationVertical" | "lightingColor" | "markerEnd" | "markerMid" | "markerStart" | "shapeRendering" | "stopColor" | "stopOpacity" | "stroke" | "strokeDasharray" | "strokeDashoffset" | "strokeLinecap" | "strokeLinejoin" | "strokeMiterlimit" | "strokeOpacity" | "strokeWidth" | "textAnchor" | "vectorEffect" | "local" | "style" | "alphabetic" | "hanging" | "ideographic" | "mathematical" | "onScroll" | "className" | "y" | "d" | "lang" | "tabIndex" | "role" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "href" | "media" | "target" | "origin" | "min" | "crossOrigin" | "accentHeight" | "accumulate" | "additive" | "allowReorder" | "amplitude" | "arabicForm" | "ascent" | "autoReverse" | "azimuth" | "baseFrequency" | "baseProfile" | "bbox" | "begin" | "bias" | "by" | "calcMode" | "capHeight" | "clipPathUnits" | "colorInterpolationFilters" | "colorProfile" | "contentScriptType" | "contentStyleType" | "cx" | "cy" | "decelerate" | "descent" | "diffuseConstant" | "divisor" | "dur" | "dx" | "dy" | "edgeMode" | "elevation" | "enableBackground" | "exponent" | "externalResourcesRequired" | "filterRes" | "filterUnits" | "focusable" | "format" | "fx" | "fy" | "g1" | "g2" | "glyphName" | "glyphOrientationHorizontal" | "glyphRef" | "gradientTransform" | "gradientUnits" | "horizAdvX" | "horizOriginX" | "in2" | "intercept" | "k1" | "k2" | "k3" | "k4" | "k" | "kernelMatrix" | "kernelUnitLength" | "kerning" | "keyPoints" | "keySplines" | "keyTimes" | "lengthAdjust" | "limitingConeAngle" | "markerHeight" | "markerUnits" | "markerWidth" | "maskContentUnits" | "maskUnits" | "numOctaves" | "orient" | "orientation" | "overlinePosition" | "overlineThickness" | "panose1" | "pathLength" | "patternContentUnits" | "patternTransform" | "patternUnits" | "points" | "pointsAtX" | "pointsAtY" | "pointsAtZ" | "preserveAlpha" | "preserveAspectRatio" | "primitiveUnits" | "r" | "refX" | "refY" | "renderingIntent" | "repeatCount" | "repeatDur" | "requiredExtensions" | "requiredFeatures" | "restart" | "result" | "rx" | "ry" | "seed" | "slope" | "spacing" | "specularConstant" | "specularExponent" | "speed" | "spreadMethod" | "startOffset" | "stdDeviation" | "stemh" | "stemv" | "stitchTiles" | "strikethroughPosition" | "strikethroughThickness" | "surfaceScale" | "systemLanguage" | "tableValues" | "targetX" | "targetY" | "textLength" | "u1" | "u2" | "underlinePosition" | "underlineThickness" | "unicode" | "unicodeRange" | "unitsPerEm" | "vAlphabetic" | "version" | "vertAdvY" | "vertOriginX" | "vertOriginY" | "vHanging" | "vIdeographic" | "viewBox" | "viewTarget" | "vMathematical" | "widths" | "x1" | "x2" | "x" | "xChannelSelector" | "xHeight" | "xlinkActuate" | "xlinkArcrole" | "xlinkHref" | "xlinkRole" | "xlinkShow" | "xlinkTitle" | "xlinkType" | "xmlBase" | "xmlLang" | "xmlns" | "xmlnsXlink" | "xmlSpace" | "y1" | "y2" | "yChannelSelector" | "z" | "zoomAndPan" | "isDashed" | "isCollapsed" | "showCollapseIcon" | "showLine"> & React.RefAttributes<unknown>>;
|
|
3
20
|
declare type Props = {
|
|
4
21
|
graphData: HistoryData;
|
|
22
|
+
onHistoryCircleMouseOver?: (uri: string, timestamp: number, index: number) => void;
|
|
5
23
|
};
|
|
6
|
-
declare const _default: React.MemoExoticComponent<({ graphData }: Props) => JSX.Element>;
|
|
24
|
+
declare const _default: React.MemoExoticComponent<({ graphData, onHistoryCircleMouseOver }: Props) => JSX.Element>;
|
|
7
25
|
export default _default;
|
|
@@ -22,29 +22,32 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
22
22
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
23
23
|
};
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
exports.HistoryCircleWithTooltip = void 0;
|
|
25
26
|
var react_1 = __importStar(require("react"));
|
|
26
27
|
var mdm_sdk_1 = require("@reltio/mdm-sdk");
|
|
27
28
|
var HistoryLink_1 = __importDefault(require("./HistoryLink"));
|
|
28
29
|
var HistoryCircle_1 = __importDefault(require("./HistoryCircle"));
|
|
29
30
|
var types_1 = require("../types");
|
|
30
31
|
var helpers_1 = require("./helpers");
|
|
32
|
+
var HOCs_1 = require("../../../HOCs");
|
|
31
33
|
var COL_WIDTH = 16;
|
|
32
34
|
var COL_MARGIN = 24;
|
|
33
35
|
var ROW_MARGIN = 16;
|
|
34
36
|
var ROW_HEIGHT = 16;
|
|
37
|
+
exports.HistoryCircleWithTooltip = HOCs_1.withTooltip(HistoryCircle_1.default);
|
|
35
38
|
var HistoryGraph = function (_a) {
|
|
36
|
-
var graphData = _a.graphData;
|
|
39
|
+
var graphData = _a.graphData, onHistoryCircleMouseOver = _a.onHistoryCircleMouseOver;
|
|
37
40
|
var historyLanes = graphData.historyLanes, rows = graphData.rows;
|
|
38
41
|
var rowPositions = [ROW_MARGIN];
|
|
39
42
|
var _b = rows.reduce(function (acc, _a, i) {
|
|
40
|
-
var uri = _a.uri, height = _a.height, uris = _a.uris, type = _a.type, fakeType = _a.fakeType, index = _a.index;
|
|
43
|
+
var uri = _a.uri, height = _a.height, uris = _a.uris, type = _a.type, fakeType = _a.fakeType, index = _a.index, timestamp = _a.timestamp, label = _a.label;
|
|
41
44
|
var x = historyLanes[uri].index * COL_WIDTH + COL_MARGIN;
|
|
42
45
|
var y = rowPositions[i];
|
|
43
46
|
rowPositions.push(y + height);
|
|
44
47
|
var hasFakeType = helpers_1.isFakeHistoryType(fakeType);
|
|
45
48
|
var circleUri = hasFakeType ? uris[0] : uri;
|
|
46
49
|
var isCollapsed = !(uris === null || uris === void 0 ? void 0 : uris.some(function (uri) { return historyLanes[uri]; }));
|
|
47
|
-
acc.circles.push(react_1.default.createElement(
|
|
50
|
+
acc.circles.push(react_1.default.createElement(exports.HistoryCircleWithTooltip, { tooltipTitle: label, tooltipPlacement: "top", onMouseOver: onHistoryCircleMouseOver ? function () { return onHistoryCircleMouseOver(uri, timestamp, index); } : undefined, key: "circle-" + circleUri + "-" + i, x: x, y: y, color: mdm_sdk_1.getContributorColor(circleUri), isDashed: hasFakeType, isCollapsed: isCollapsed, showCollapseIcon: !!uris, showLine: fakeType === types_1.HistoryChangeTypes.FAKE_NAVIGATE_PROFILE }));
|
|
48
51
|
acc.rowLines.push(react_1.default.createElement("rect", { key: circleUri + "-" + index, x: x, y: y - ROW_HEIGHT / 2, width: '100%', height: ROW_HEIGHT, fill: mdm_sdk_1.getContributorColor(circleUri), opacity: 0.06 }));
|
|
49
52
|
var isUpRight = type === types_1.HistoryChangeTypes.ENTITIES_SPLITTED;
|
|
50
53
|
uris === null || uris === void 0 ? void 0 : uris.forEach(function (contributorUri) {
|
|
@@ -52,6 +52,7 @@ var HistoryTree = function (_a) {
|
|
|
52
52
|
var styles = styles_1.useStyles();
|
|
53
53
|
var dispatch = react_redux_1.useDispatch();
|
|
54
54
|
var isEditableMode = react_redux_1.useSelector(mdm_module_1.default.selectors.getIsEditableMode);
|
|
55
|
+
var metadata = react_redux_1.useSelector(mdm_module_1.default.selectors.getMetadata);
|
|
55
56
|
var _c = react_1.useState({ historyLanes: {}, rows: [] }), graphData = _c[0], setGraphData = _c[1];
|
|
56
57
|
var _d = react_1.useState(false), isScrollable = _d[0], setIsScrollable = _d[1];
|
|
57
58
|
var _e = react_1.useState(-1), selectedIndex = _e[0], setSelectedIndex = _e[1];
|
|
@@ -79,6 +80,24 @@ var HistoryTree = function (_a) {
|
|
|
79
80
|
var _a = (graphRef === null || graphRef === void 0 ? void 0 : graphRef.current) || {}, scrollWidth = _a.scrollWidth, clientWidth = _a.clientWidth, scrollLeft = _a.scrollLeft;
|
|
80
81
|
setIsScrollable(scrollLeft < scrollWidth - clientWidth);
|
|
81
82
|
};
|
|
83
|
+
var handleHistoryCircleMouseOver = function (uri, timestamp, index) {
|
|
84
|
+
if (ramda_1.isNil(graphData.rows[index].label)) {
|
|
85
|
+
var options = { time: timestamp, select: 'crosswalks' };
|
|
86
|
+
mdm_sdk_1.getEntity(uri, options).then(function (_a) {
|
|
87
|
+
var crosswalks = _a.crosswalks;
|
|
88
|
+
var label = crosswalks
|
|
89
|
+
? ramda_1.uniqBy(ramda_1.prop('type'), crosswalks)
|
|
90
|
+
.map(function (cw) {
|
|
91
|
+
var crosswalkType = mdm_sdk_1.getCrosswalkType(metadata, cw.type);
|
|
92
|
+
return crosswalkType ? crosswalkType.label : null;
|
|
93
|
+
})
|
|
94
|
+
.filter(ramda_1.identity)
|
|
95
|
+
.join(', ')
|
|
96
|
+
: ui_i18n_1.default.text('No data');
|
|
97
|
+
setGraphData(function (prevGraphData) { return (__assign(__assign({}, prevGraphData), { rows: prevGraphData.rows.map(function (row) { return (row.index === index ? __assign(__assign({}, row), { label: label }) : row); }) })); });
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
};
|
|
82
101
|
var handleHistoryRowClick = function (index, change, isSelected, isCurrent) {
|
|
83
102
|
if (isEditableMode) {
|
|
84
103
|
if (window.confirm(ui_i18n_1.default.text('Are you sure you want to go in history mode? All your changes will be lost.'))) {
|
|
@@ -105,7 +124,7 @@ var HistoryTree = function (_a) {
|
|
|
105
124
|
return (react_1.default.createElement("div", { className: styles.historyTree },
|
|
106
125
|
isLoading && react_1.default.createElement(LinearLoadIndicator_1.default, null),
|
|
107
126
|
react_1.default.createElement("div", { className: classnames_1.default(styles.graph, (_b = {}, _b[styles.shadow] = isScrollable, _b)), onScroll: handleGraphScroll, ref: graphRef },
|
|
108
|
-
react_1.default.createElement(HistoryGraph_1.default, { graphData: graphData }),
|
|
127
|
+
react_1.default.createElement(HistoryGraph_1.default, { onHistoryCircleMouseOver: handleHistoryCircleMouseOver, graphData: graphData }),
|
|
109
128
|
react_1.default.createElement(react_resize_detector_1.default, { handleWidth: true, onResize: handleGraphScroll })),
|
|
110
129
|
react_1.default.createElement("div", { ref: rowsRef, className: styles.history }, historyData.rows.map(function (change, i) {
|
|
111
130
|
var isSelected = i === selectedIndex;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
declare
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const BUMP_RADIUS = 3;
|
|
3
|
+
export declare const LINE_MARGIN = 4;
|
|
4
|
+
declare const _default: React.ForwardRefExoticComponent<Pick<{
|
|
3
5
|
x: number;
|
|
4
6
|
y: number;
|
|
5
7
|
color: string;
|
|
@@ -7,8 +9,5 @@ declare type Props = {
|
|
|
7
9
|
isCollapsed?: boolean;
|
|
8
10
|
showCollapseIcon?: boolean;
|
|
9
11
|
showLine?: boolean;
|
|
10
|
-
}
|
|
11
|
-
export
|
|
12
|
-
export declare const LINE_MARGIN = 4;
|
|
13
|
-
declare const HistoryCircle: ({ x, y, color, isDashed, isCollapsed, showCollapseIcon, showLine }: Props) => JSX.Element;
|
|
14
|
-
export default HistoryCircle;
|
|
12
|
+
} & React.SVGProps<SVGGElement>, "string" | "visibility" | "type" | "max" | "filter" | "children" | "values" | "radius" | "operator" | "order" | "offset" | "method" | "id" | "width" | "height" | "in" | "attributeName" | "mode" | "attributeType" | "direction" | "name" | "path" | "from" | "to" | "end" | "clipPath" | "color" | "cursor" | "display" | "fontFamily" | "fontSize" | "fontSizeAdjust" | "fontStretch" | "fontStyle" | "fontVariant" | "fontWeight" | "imageRendering" | "letterSpacing" | "opacity" | "overflow" | "paintOrder" | "pointerEvents" | "rotate" | "scale" | "textRendering" | "transform" | "unicodeBidi" | "wordSpacing" | "writingMode" | "mask" | "textDecoration" | "clip" | "alignmentBaseline" | "baselineShift" | "clipRule" | "colorInterpolation" | "colorRendering" | "dominantBaseline" | "fill" | "fillOpacity" | "fillRule" | "floodColor" | "floodOpacity" | "glyphOrientationVertical" | "lightingColor" | "markerEnd" | "markerMid" | "markerStart" | "shapeRendering" | "stopColor" | "stopOpacity" | "stroke" | "strokeDasharray" | "strokeDashoffset" | "strokeLinecap" | "strokeLinejoin" | "strokeMiterlimit" | "strokeOpacity" | "strokeWidth" | "textAnchor" | "vectorEffect" | "local" | "style" | "alphabetic" | "hanging" | "ideographic" | "mathematical" | "onScroll" | "className" | "y" | "d" | "lang" | "tabIndex" | "role" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "href" | "media" | "target" | "origin" | "min" | "crossOrigin" | "accentHeight" | "accumulate" | "additive" | "allowReorder" | "amplitude" | "arabicForm" | "ascent" | "autoReverse" | "azimuth" | "baseFrequency" | "baseProfile" | "bbox" | "begin" | "bias" | "by" | "calcMode" | "capHeight" | "clipPathUnits" | "colorInterpolationFilters" | "colorProfile" | "contentScriptType" | "contentStyleType" | "cx" | "cy" | "decelerate" | "descent" | "diffuseConstant" | "divisor" | "dur" | "dx" | "dy" | "edgeMode" | "elevation" | "enableBackground" | "exponent" | "externalResourcesRequired" | "filterRes" | "filterUnits" | "focusable" | "format" | "fx" | "fy" | "g1" | "g2" | "glyphName" | "glyphOrientationHorizontal" | "glyphRef" | "gradientTransform" | "gradientUnits" | "horizAdvX" | "horizOriginX" | "in2" | "intercept" | "k1" | "k2" | "k3" | "k4" | "k" | "kernelMatrix" | "kernelUnitLength" | "kerning" | "keyPoints" | "keySplines" | "keyTimes" | "lengthAdjust" | "limitingConeAngle" | "markerHeight" | "markerUnits" | "markerWidth" | "maskContentUnits" | "maskUnits" | "numOctaves" | "orient" | "orientation" | "overlinePosition" | "overlineThickness" | "panose1" | "pathLength" | "patternContentUnits" | "patternTransform" | "patternUnits" | "points" | "pointsAtX" | "pointsAtY" | "pointsAtZ" | "preserveAlpha" | "preserveAspectRatio" | "primitiveUnits" | "r" | "refX" | "refY" | "renderingIntent" | "repeatCount" | "repeatDur" | "requiredExtensions" | "requiredFeatures" | "restart" | "result" | "rx" | "ry" | "seed" | "slope" | "spacing" | "specularConstant" | "specularExponent" | "speed" | "spreadMethod" | "startOffset" | "stdDeviation" | "stemh" | "stemv" | "stitchTiles" | "strikethroughPosition" | "strikethroughThickness" | "surfaceScale" | "systemLanguage" | "tableValues" | "targetX" | "targetY" | "textLength" | "u1" | "u2" | "underlinePosition" | "underlineThickness" | "unicode" | "unicodeRange" | "unitsPerEm" | "vAlphabetic" | "version" | "vertAdvY" | "vertOriginX" | "vertOriginY" | "vHanging" | "vIdeographic" | "viewBox" | "viewTarget" | "vMathematical" | "widths" | "x1" | "x2" | "x" | "xChannelSelector" | "xHeight" | "xlinkActuate" | "xlinkArcrole" | "xlinkHref" | "xlinkRole" | "xlinkShow" | "xlinkTitle" | "xlinkType" | "xmlBase" | "xmlLang" | "xmlns" | "xmlnsXlink" | "xmlSpace" | "y1" | "y2" | "yChannelSelector" | "z" | "zoomAndPan" | "isDashed" | "isCollapsed" | "showCollapseIcon" | "showLine"> & React.RefAttributes<unknown>>;
|
|
13
|
+
export default _default;
|
|
@@ -1,14 +1,36 @@
|
|
|
1
|
-
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
23
|
+
import React, { forwardRef } from 'react';
|
|
2
24
|
export var BUMP_RADIUS = 3;
|
|
3
25
|
export var LINE_MARGIN = 4;
|
|
4
|
-
var HistoryCircle = function (_a) {
|
|
5
|
-
var x = _a.x, y = _a.y, color = _a.color, isDashed = _a.isDashed, isCollapsed = _a.isCollapsed, showCollapseIcon = _a.showCollapseIcon, showLine = _a.showLine;
|
|
26
|
+
var HistoryCircle = function (_a, ref) {
|
|
27
|
+
var x = _a.x, y = _a.y, color = _a.color, isDashed = _a.isDashed, isCollapsed = _a.isCollapsed, showCollapseIcon = _a.showCollapseIcon, showLine = _a.showLine, otherProps = __rest(_a, ["x", "y", "color", "isDashed", "isCollapsed", "showCollapseIcon", "showLine"]);
|
|
6
28
|
var radius = showCollapseIcon ? BUMP_RADIUS * 2 : BUMP_RADIUS;
|
|
7
|
-
return (React.createElement("g",
|
|
29
|
+
return (React.createElement("g", __assign({}, otherProps, { ref: ref }),
|
|
8
30
|
showLine && (React.createElement("rect", { id: "line", x: x - radius - LINE_MARGIN, y: y - radius - LINE_MARGIN, width: radius * 2 + LINE_MARGIN * 2, height: 2, fill: color })),
|
|
9
31
|
React.createElement("circle", { cx: x, cy: y, r: radius, fill: isDashed ? '#fff' : color, stroke: color, strokeDasharray: isDashed ? '1,1' : undefined, strokeWidth: 2 }),
|
|
10
32
|
showCollapseIcon && (React.createElement("g", { id: "icon" },
|
|
11
33
|
React.createElement("rect", { x: x - 4, y: y - 1, width: 8, height: 2, fill: "#fff" }),
|
|
12
34
|
isCollapsed && React.createElement("rect", { x: x - 1, y: y - 4, width: 2, height: 8, fill: "#fff" })))));
|
|
13
35
|
};
|
|
14
|
-
export default HistoryCircle;
|
|
36
|
+
export default forwardRef(HistoryCircle);
|
|
@@ -1,7 +1,25 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { HistoryData } from '../types';
|
|
3
|
+
export declare const HistoryCircleWithTooltip: React.ForwardRefExoticComponent<import("prop-types").InferPropsInner<Pick<{
|
|
4
|
+
tooltipTitle: import("prop-types").Requireable<import("prop-types").ReactNodeLike>;
|
|
5
|
+
tooltipPlacement: import("prop-types").Requireable<string>;
|
|
6
|
+
showForDisabled: import("prop-types").Requireable<boolean>;
|
|
7
|
+
}, never>> & Partial<import("prop-types").InferPropsInner<Pick<{
|
|
8
|
+
tooltipTitle: import("prop-types").Requireable<import("prop-types").ReactNodeLike>;
|
|
9
|
+
tooltipPlacement: import("prop-types").Requireable<string>;
|
|
10
|
+
showForDisabled: import("prop-types").Requireable<boolean>;
|
|
11
|
+
}, "tooltipTitle" | "tooltipPlacement" | "showForDisabled">>> & Pick<{
|
|
12
|
+
x: number;
|
|
13
|
+
y: number;
|
|
14
|
+
color: string;
|
|
15
|
+
isDashed?: boolean;
|
|
16
|
+
isCollapsed?: boolean;
|
|
17
|
+
showCollapseIcon?: boolean;
|
|
18
|
+
showLine?: boolean;
|
|
19
|
+
} & React.SVGProps<SVGGElement>, "string" | "visibility" | "type" | "max" | "filter" | "children" | "values" | "radius" | "operator" | "order" | "offset" | "method" | "id" | "width" | "height" | "in" | "attributeName" | "mode" | "attributeType" | "direction" | "name" | "path" | "from" | "to" | "end" | "clipPath" | "color" | "cursor" | "display" | "fontFamily" | "fontSize" | "fontSizeAdjust" | "fontStretch" | "fontStyle" | "fontVariant" | "fontWeight" | "imageRendering" | "letterSpacing" | "opacity" | "overflow" | "paintOrder" | "pointerEvents" | "rotate" | "scale" | "textRendering" | "transform" | "unicodeBidi" | "wordSpacing" | "writingMode" | "mask" | "textDecoration" | "clip" | "alignmentBaseline" | "baselineShift" | "clipRule" | "colorInterpolation" | "colorRendering" | "dominantBaseline" | "fill" | "fillOpacity" | "fillRule" | "floodColor" | "floodOpacity" | "glyphOrientationVertical" | "lightingColor" | "markerEnd" | "markerMid" | "markerStart" | "shapeRendering" | "stopColor" | "stopOpacity" | "stroke" | "strokeDasharray" | "strokeDashoffset" | "strokeLinecap" | "strokeLinejoin" | "strokeMiterlimit" | "strokeOpacity" | "strokeWidth" | "textAnchor" | "vectorEffect" | "local" | "style" | "alphabetic" | "hanging" | "ideographic" | "mathematical" | "onScroll" | "className" | "y" | "d" | "lang" | "tabIndex" | "role" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "key" | "href" | "media" | "target" | "origin" | "min" | "crossOrigin" | "accentHeight" | "accumulate" | "additive" | "allowReorder" | "amplitude" | "arabicForm" | "ascent" | "autoReverse" | "azimuth" | "baseFrequency" | "baseProfile" | "bbox" | "begin" | "bias" | "by" | "calcMode" | "capHeight" | "clipPathUnits" | "colorInterpolationFilters" | "colorProfile" | "contentScriptType" | "contentStyleType" | "cx" | "cy" | "decelerate" | "descent" | "diffuseConstant" | "divisor" | "dur" | "dx" | "dy" | "edgeMode" | "elevation" | "enableBackground" | "exponent" | "externalResourcesRequired" | "filterRes" | "filterUnits" | "focusable" | "format" | "fx" | "fy" | "g1" | "g2" | "glyphName" | "glyphOrientationHorizontal" | "glyphRef" | "gradientTransform" | "gradientUnits" | "horizAdvX" | "horizOriginX" | "in2" | "intercept" | "k1" | "k2" | "k3" | "k4" | "k" | "kernelMatrix" | "kernelUnitLength" | "kerning" | "keyPoints" | "keySplines" | "keyTimes" | "lengthAdjust" | "limitingConeAngle" | "markerHeight" | "markerUnits" | "markerWidth" | "maskContentUnits" | "maskUnits" | "numOctaves" | "orient" | "orientation" | "overlinePosition" | "overlineThickness" | "panose1" | "pathLength" | "patternContentUnits" | "patternTransform" | "patternUnits" | "points" | "pointsAtX" | "pointsAtY" | "pointsAtZ" | "preserveAlpha" | "preserveAspectRatio" | "primitiveUnits" | "r" | "refX" | "refY" | "renderingIntent" | "repeatCount" | "repeatDur" | "requiredExtensions" | "requiredFeatures" | "restart" | "result" | "rx" | "ry" | "seed" | "slope" | "spacing" | "specularConstant" | "specularExponent" | "speed" | "spreadMethod" | "startOffset" | "stdDeviation" | "stemh" | "stemv" | "stitchTiles" | "strikethroughPosition" | "strikethroughThickness" | "surfaceScale" | "systemLanguage" | "tableValues" | "targetX" | "targetY" | "textLength" | "u1" | "u2" | "underlinePosition" | "underlineThickness" | "unicode" | "unicodeRange" | "unitsPerEm" | "vAlphabetic" | "version" | "vertAdvY" | "vertOriginX" | "vertOriginY" | "vHanging" | "vIdeographic" | "viewBox" | "viewTarget" | "vMathematical" | "widths" | "x1" | "x2" | "x" | "xChannelSelector" | "xHeight" | "xlinkActuate" | "xlinkArcrole" | "xlinkHref" | "xlinkRole" | "xlinkShow" | "xlinkTitle" | "xlinkType" | "xmlBase" | "xmlLang" | "xmlns" | "xmlnsXlink" | "xmlSpace" | "y1" | "y2" | "yChannelSelector" | "z" | "zoomAndPan" | "isDashed" | "isCollapsed" | "showCollapseIcon" | "showLine"> & React.RefAttributes<unknown>>;
|
|
3
20
|
declare type Props = {
|
|
4
21
|
graphData: HistoryData;
|
|
22
|
+
onHistoryCircleMouseOver?: (uri: string, timestamp: number, index: number) => void;
|
|
5
23
|
};
|
|
6
|
-
declare const _default: React.MemoExoticComponent<({ graphData }: Props) => JSX.Element>;
|
|
24
|
+
declare const _default: React.MemoExoticComponent<({ graphData, onHistoryCircleMouseOver }: Props) => JSX.Element>;
|
|
7
25
|
export default _default;
|
|
@@ -4,23 +4,25 @@ import HistoryLink from './HistoryLink';
|
|
|
4
4
|
import HistoryCircle from './HistoryCircle';
|
|
5
5
|
import { HistoryChangeTypes } from '../types';
|
|
6
6
|
import { isFakeHistoryType } from './helpers';
|
|
7
|
+
import { withTooltip } from '../../../HOCs';
|
|
7
8
|
var COL_WIDTH = 16;
|
|
8
9
|
var COL_MARGIN = 24;
|
|
9
10
|
var ROW_MARGIN = 16;
|
|
10
11
|
var ROW_HEIGHT = 16;
|
|
12
|
+
export var HistoryCircleWithTooltip = withTooltip(HistoryCircle);
|
|
11
13
|
var HistoryGraph = function (_a) {
|
|
12
|
-
var graphData = _a.graphData;
|
|
14
|
+
var graphData = _a.graphData, onHistoryCircleMouseOver = _a.onHistoryCircleMouseOver;
|
|
13
15
|
var historyLanes = graphData.historyLanes, rows = graphData.rows;
|
|
14
16
|
var rowPositions = [ROW_MARGIN];
|
|
15
17
|
var _b = rows.reduce(function (acc, _a, i) {
|
|
16
|
-
var uri = _a.uri, height = _a.height, uris = _a.uris, type = _a.type, fakeType = _a.fakeType, index = _a.index;
|
|
18
|
+
var uri = _a.uri, height = _a.height, uris = _a.uris, type = _a.type, fakeType = _a.fakeType, index = _a.index, timestamp = _a.timestamp, label = _a.label;
|
|
17
19
|
var x = historyLanes[uri].index * COL_WIDTH + COL_MARGIN;
|
|
18
20
|
var y = rowPositions[i];
|
|
19
21
|
rowPositions.push(y + height);
|
|
20
22
|
var hasFakeType = isFakeHistoryType(fakeType);
|
|
21
23
|
var circleUri = hasFakeType ? uris[0] : uri;
|
|
22
24
|
var isCollapsed = !(uris === null || uris === void 0 ? void 0 : uris.some(function (uri) { return historyLanes[uri]; }));
|
|
23
|
-
acc.circles.push(React.createElement(
|
|
25
|
+
acc.circles.push(React.createElement(HistoryCircleWithTooltip, { tooltipTitle: label, tooltipPlacement: "top", onMouseOver: onHistoryCircleMouseOver ? function () { return onHistoryCircleMouseOver(uri, timestamp, index); } : undefined, key: "circle-" + circleUri + "-" + i, x: x, y: y, color: getContributorColor(circleUri), isDashed: hasFakeType, isCollapsed: isCollapsed, showCollapseIcon: !!uris, showLine: fakeType === HistoryChangeTypes.FAKE_NAVIGATE_PROFILE }));
|
|
24
26
|
acc.rowLines.push(React.createElement("rect", { key: circleUri + "-" + index, x: x, y: y - ROW_HEIGHT / 2, width: '100%', height: ROW_HEIGHT, fill: getContributorColor(circleUri), opacity: 0.06 }));
|
|
25
27
|
var isUpRight = type === HistoryChangeTypes.ENTITIES_SPLITTED;
|
|
26
28
|
uris === null || uris === void 0 ? void 0 : uris.forEach(function (contributorUri) {
|
|
@@ -13,9 +13,9 @@ import React, { useCallback, useEffect, useRef, useState } from 'react';
|
|
|
13
13
|
import { useDispatch, useSelector } from 'react-redux';
|
|
14
14
|
import ReactResizeDetector from 'react-resize-detector';
|
|
15
15
|
import i18n from 'ui-i18n';
|
|
16
|
-
import { isNil } from 'ramda';
|
|
16
|
+
import { isNil, uniqBy, prop, identity } from 'ramda';
|
|
17
17
|
import classnames from 'classnames';
|
|
18
|
-
import { Mode } from '@reltio/mdm-sdk';
|
|
18
|
+
import { getEntity, Mode, getCrosswalkType } from '@reltio/mdm-sdk';
|
|
19
19
|
import mdm, { profile } from '@reltio/mdm-module';
|
|
20
20
|
import Button from '@material-ui/core/Button';
|
|
21
21
|
import HistoryRow from '../HistoryRow/HistoryRow';
|
|
@@ -28,6 +28,7 @@ var HistoryTree = function (_a) {
|
|
|
28
28
|
var styles = useStyles();
|
|
29
29
|
var dispatch = useDispatch();
|
|
30
30
|
var isEditableMode = useSelector(mdm.selectors.getIsEditableMode);
|
|
31
|
+
var metadata = useSelector(mdm.selectors.getMetadata);
|
|
31
32
|
var _c = useState({ historyLanes: {}, rows: [] }), graphData = _c[0], setGraphData = _c[1];
|
|
32
33
|
var _d = useState(false), isScrollable = _d[0], setIsScrollable = _d[1];
|
|
33
34
|
var _e = useState(-1), selectedIndex = _e[0], setSelectedIndex = _e[1];
|
|
@@ -55,6 +56,24 @@ var HistoryTree = function (_a) {
|
|
|
55
56
|
var _a = (graphRef === null || graphRef === void 0 ? void 0 : graphRef.current) || {}, scrollWidth = _a.scrollWidth, clientWidth = _a.clientWidth, scrollLeft = _a.scrollLeft;
|
|
56
57
|
setIsScrollable(scrollLeft < scrollWidth - clientWidth);
|
|
57
58
|
};
|
|
59
|
+
var handleHistoryCircleMouseOver = function (uri, timestamp, index) {
|
|
60
|
+
if (isNil(graphData.rows[index].label)) {
|
|
61
|
+
var options = { time: timestamp, select: 'crosswalks' };
|
|
62
|
+
getEntity(uri, options).then(function (_a) {
|
|
63
|
+
var crosswalks = _a.crosswalks;
|
|
64
|
+
var label = crosswalks
|
|
65
|
+
? uniqBy(prop('type'), crosswalks)
|
|
66
|
+
.map(function (cw) {
|
|
67
|
+
var crosswalkType = getCrosswalkType(metadata, cw.type);
|
|
68
|
+
return crosswalkType ? crosswalkType.label : null;
|
|
69
|
+
})
|
|
70
|
+
.filter(identity)
|
|
71
|
+
.join(', ')
|
|
72
|
+
: i18n.text('No data');
|
|
73
|
+
setGraphData(function (prevGraphData) { return (__assign(__assign({}, prevGraphData), { rows: prevGraphData.rows.map(function (row) { return (row.index === index ? __assign(__assign({}, row), { label: label }) : row); }) })); });
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
};
|
|
58
77
|
var handleHistoryRowClick = function (index, change, isSelected, isCurrent) {
|
|
59
78
|
if (isEditableMode) {
|
|
60
79
|
if (window.confirm(i18n.text('Are you sure you want to go in history mode? All your changes will be lost.'))) {
|
|
@@ -81,7 +100,7 @@ var HistoryTree = function (_a) {
|
|
|
81
100
|
return (React.createElement("div", { className: styles.historyTree },
|
|
82
101
|
isLoading && React.createElement(LinearLoadIndicator, null),
|
|
83
102
|
React.createElement("div", { className: classnames(styles.graph, (_b = {}, _b[styles.shadow] = isScrollable, _b)), onScroll: handleGraphScroll, ref: graphRef },
|
|
84
|
-
React.createElement(HistoryGraph, { graphData: graphData }),
|
|
103
|
+
React.createElement(HistoryGraph, { onHistoryCircleMouseOver: handleHistoryCircleMouseOver, graphData: graphData }),
|
|
85
104
|
React.createElement(ReactResizeDetector, { handleWidth: true, onResize: handleGraphScroll })),
|
|
86
105
|
React.createElement("div", { ref: rowsRef, className: styles.history }, historyData.rows.map(function (change, i) {
|
|
87
106
|
var isSelected = i === selectedIndex;
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reltio/components",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.991",
|
|
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.991",
|
|
11
|
+
"@reltio/mdm-sdk": "^1.4.991",
|
|
12
12
|
"classnames": "^2.2.5",
|
|
13
13
|
"d3-cloud": "^1.2.5",
|
|
14
14
|
"d3-geo": "^2.0.1",
|