@reltio/components 1.4.1745 → 1.4.1747
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/BasicTableView/ColumnFilter/FilterChip/FilterChip.js +2 -2
- package/cjs/components/DataTypeValue/DataTypeValue.js +2 -2
- package/cjs/components/EntityUriLink/EntityUriLink.d.ts +1 -1
- package/cjs/components/EntityUriLink/EntityUriLink.js +2 -3
- package/cjs/components/HierarchyNodeTitle/HierarchyNodeTitle.d.ts +1 -2
- package/cjs/components/HierarchyNodeTitle/HierarchyNodeTitle.js +3 -3
- package/cjs/components/ImageDetailsView/hooks/useEditMetaInfo.js +2 -3
- package/cjs/components/Popper/Popper.d.ts +1 -1
- package/cjs/components/ProfileBandNavigation/hooks/useSearchNavigation.js +4 -5
- package/cjs/components/activityLog/activities/fields/DeltaField.js +2 -2
- package/cjs/components/activityLog/utils/activities.d.ts +2 -2
- package/cjs/components/activityLog/utils/activities.js +3 -3
- package/cjs/components/attributes/BranchDecorator/BranchDecorator.js +1 -1
- package/cjs/components/attributes/OvIcon/OvIcon.js +1 -1
- package/cjs/components/attributes/editMode/AttributesPager/AttributesPager.js +2 -2
- package/cjs/components/attributes/editMode/AttributesView/AttributesView.js +1 -16
- package/cjs/components/attributes/editMode/EntitySelector/components/SingleValue.d.ts +1 -1
- package/cjs/components/attributes/editMode/EntitySelector/components/SingleValue.js +5 -4
- package/cjs/components/attributes/pagersCommon/ShowMore.js +1 -1
- package/cjs/components/attributes/readMode/AttributesPager/AttributesPager.d.ts +1 -1
- package/cjs/components/attributes/readMode/AttributesPager/AttributesPager.js +2 -2
- package/cjs/components/attributes/readMode/AttributesPager/MultiLineRenderer.js +1 -1
- package/cjs/components/attributes/readMode/AttributesPager/OneLineRenderer.js +1 -1
- package/cjs/components/attributes/readMode/AttributesPager/SpecialRenderer.js +1 -1
- package/cjs/components/editors/DataTypeValueEditor/useEditorContext.d.ts +19 -18
- package/cjs/components/editors/DataTypeValueEditor/useEditorContext.js +2 -2
- package/cjs/components/history/HistoryGraph/HistoryCircle.d.ts +1 -1
- package/cjs/components/history/HistoryGraph/HistoryGraph.d.ts +1 -1
- package/cjs/components/workflow/hooks/useWorkflowDefaultActionSuccessHandler.js +2 -3
- package/cjs/contexts/ConfigPermissionsContext/index.d.ts +2 -2
- package/cjs/contexts/MdmModuleContext/context.d.ts +13 -25
- package/cjs/contexts/MdmModuleContext/hooks.d.ts +4 -11
- package/cjs/contexts/MdmModuleContext/hooks.js +7 -7
- package/cjs/contexts/MdmModuleContext/index.d.ts +1 -1
- package/cjs/contexts/MdmModuleContext/index.js +3 -3
- package/cjs/contexts/index.d.ts +0 -1
- package/cjs/contexts/index.js +2 -4
- package/cjs/hooks/useAPI/types.d.ts +2 -2
- package/cjs/hooks/useAPI/useAPI.d.ts +2 -2
- package/cjs/hooks/useReadableSearchState.js +2 -2
- package/esm/components/BasicTableView/ColumnFilter/FilterChip/FilterChip.js +3 -3
- package/esm/components/DataTypeValue/DataTypeValue.js +3 -3
- package/esm/components/EntityUriLink/EntityUriLink.d.ts +1 -1
- package/esm/components/EntityUriLink/EntityUriLink.js +3 -4
- package/esm/components/HierarchyNodeTitle/HierarchyNodeTitle.d.ts +1 -2
- package/esm/components/HierarchyNodeTitle/HierarchyNodeTitle.js +3 -3
- package/esm/components/ImageDetailsView/hooks/useEditMetaInfo.js +4 -5
- package/esm/components/Popper/Popper.d.ts +1 -1
- package/esm/components/ProfileBandNavigation/hooks/useSearchNavigation.js +6 -7
- package/esm/components/activityLog/activities/fields/DeltaField.js +3 -3
- package/esm/components/activityLog/utils/activities.d.ts +2 -2
- package/esm/components/activityLog/utils/activities.js +3 -3
- package/esm/components/attributes/BranchDecorator/BranchDecorator.js +1 -1
- package/esm/components/attributes/OvIcon/OvIcon.js +1 -1
- package/esm/components/attributes/editMode/AttributesPager/AttributesPager.js +3 -3
- package/esm/components/attributes/editMode/AttributesView/AttributesView.js +3 -18
- package/esm/components/attributes/editMode/EntitySelector/components/SingleValue.d.ts +1 -1
- package/esm/components/attributes/editMode/EntitySelector/components/SingleValue.js +6 -5
- package/esm/components/attributes/pagersCommon/ShowMore.js +1 -1
- package/esm/components/attributes/readMode/AttributesPager/AttributesPager.d.ts +1 -1
- package/esm/components/attributes/readMode/AttributesPager/AttributesPager.js +3 -3
- package/esm/components/attributes/readMode/AttributesPager/MultiLineRenderer.js +1 -1
- package/esm/components/attributes/readMode/AttributesPager/OneLineRenderer.js +1 -1
- package/esm/components/attributes/readMode/AttributesPager/SpecialRenderer.js +1 -1
- package/esm/components/editors/DataTypeValueEditor/useEditorContext.d.ts +19 -18
- package/esm/components/editors/DataTypeValueEditor/useEditorContext.js +3 -3
- package/esm/components/history/HistoryGraph/HistoryCircle.d.ts +1 -1
- package/esm/components/history/HistoryGraph/HistoryGraph.d.ts +1 -1
- package/esm/components/workflow/hooks/useWorkflowDefaultActionSuccessHandler.js +3 -4
- package/esm/contexts/ConfigPermissionsContext/index.d.ts +2 -2
- package/esm/contexts/MdmModuleContext/context.d.ts +13 -25
- package/esm/contexts/MdmModuleContext/hooks.d.ts +4 -11
- package/esm/contexts/MdmModuleContext/hooks.js +4 -4
- package/esm/contexts/MdmModuleContext/index.d.ts +1 -1
- package/esm/contexts/MdmModuleContext/index.js +1 -1
- package/esm/contexts/index.d.ts +0 -1
- package/esm/contexts/index.js +0 -1
- package/esm/hooks/useAPI/types.d.ts +2 -2
- package/esm/hooks/useAPI/useAPI.d.ts +2 -2
- package/esm/hooks/useReadableSearchState.js +3 -3
- package/package.json +3 -3
- package/cjs/contexts/ViewIdContext/index.d.ts +0 -2
- package/cjs/contexts/ViewIdContext/index.js +0 -9
- package/esm/contexts/ViewIdContext/index.d.ts +0 -2
- package/esm/contexts/ViewIdContext/index.js +0 -3
|
@@ -12,12 +12,12 @@ var styles_1 = require("./styles");
|
|
|
12
12
|
var FilterChip = function (_a) {
|
|
13
13
|
var filterOption = _a.filterOption, filterValue = _a.filterValue, onDelete = _a.onDelete, dataTypeDefinition = _a.dataTypeDefinition;
|
|
14
14
|
var styles = (0, styles_1.useStyles)();
|
|
15
|
-
var
|
|
15
|
+
var attributesPresentation = (0, contexts_1.useMdmAttributesPresentation)();
|
|
16
16
|
var dateMask = (0, contexts_1.useMdmDateMask)();
|
|
17
17
|
var dateTimeMask = (0, contexts_1.useMdmDateTimeMask)();
|
|
18
18
|
var canFilterAcceptValues = (0, mdm_sdk_1.checkIfOptionHasValues)(filterOption.value);
|
|
19
19
|
var optionLabel = filterOption.label + (canFilterAcceptValues ? ': ' : '');
|
|
20
|
-
var formatValue = (0, mdm_sdk_1.formatDataTypeValue)({
|
|
20
|
+
var formatValue = (0, mdm_sdk_1.formatDataTypeValue)({ attributesPresentation: attributesPresentation, dataTypeDefinition: dataTypeDefinition, dateMask: dateMask, dateTimeMask: dateTimeMask });
|
|
21
21
|
var convertedValue = (0, mdm_sdk_1.mapFilterValue)(formatValue, filterValue);
|
|
22
22
|
var filterLabel = canFilterAcceptValues ? (0, mdm_sdk_1.getFilterValueLabel)(filterOption.value, convertedValue) : '';
|
|
23
23
|
return (react_1.default.createElement(Chip_1.default, { label: react_1.default.createElement(ExpandedValueTooltip_1.default, { value: optionLabel + filterLabel },
|
|
@@ -14,10 +14,10 @@ var DataTypeValue = function (_a) {
|
|
|
14
14
|
var _b = _a.value, value = _b === void 0 ? null : _b, dataTypeDefinition = _a.dataTypeDefinition, _c = _a.rich, rich = _c === void 0 ? true : _c;
|
|
15
15
|
var localeDateFormat = moment_1.default.localeData().longDateFormat('L');
|
|
16
16
|
var localeTimeFormat = moment_1.default.localeData().longDateFormat('LTS');
|
|
17
|
-
var
|
|
17
|
+
var attributesPresentation = (0, contexts_1.useMdmAttributesPresentation)();
|
|
18
18
|
var dateMask = (0, contexts_1.useMdmDateMask)() || localeDateFormat;
|
|
19
19
|
var dateTimeMask = (0, contexts_1.useMdmDateTimeMask)() || localeDateFormat + ' ' + localeTimeFormat;
|
|
20
|
-
var formattedValue = (0, mdm_sdk_1.formatDataTypeValue)({
|
|
20
|
+
var formattedValue = (0, mdm_sdk_1.formatDataTypeValue)({ attributesPresentation: attributesPresentation, dataTypeDefinition: dataTypeDefinition, dateMask: dateMask, dateTimeMask: dateTimeMask }, value);
|
|
21
21
|
return rich && (0, mdm_sdk_1.isAttributeValueLink)(dataTypeDefinition, value) ? (react_1.default.createElement(Link_1.default, { target: "_blank", href: (0, mdm_sdk_1.addProtocolToLink)(formattedValue), underline: "none" },
|
|
22
22
|
react_1.default.createElement(SearchHighlighter_1.default, { text: formattedValue }))) : (react_1.default.createElement(SearchHighlighter_1.default, { text: formattedValue }));
|
|
23
23
|
};
|
|
@@ -3,5 +3,5 @@ declare const EntityUriLink: React.ForwardRefExoticComponent<Pick<Omit<React.HTM
|
|
|
3
3
|
value: string;
|
|
4
4
|
screen?: string;
|
|
5
5
|
shouldOpenInNewTab?: boolean;
|
|
6
|
-
}, "value" | "label" | "id" | "step" | "type" | "name" | "hidden" | "content" | "max" | "open" | "title" | "data" | "list" | "scope" | "key" | "children" | "default" | "defaultValue" | "required" | "size" | "method" | "headers" | "start" | "prefix" | "action" | "width" | "height" | "
|
|
6
|
+
}, "value" | "label" | "id" | "step" | "type" | "name" | "hidden" | "content" | "max" | "open" | "title" | "data" | "list" | "scope" | "key" | "children" | "default" | "defaultValue" | "required" | "size" | "method" | "headers" | "start" | "prefix" | "action" | "width" | "height" | "pattern" | "summary" | "integrity" | "results" | "cite" | "form" | "slot" | "span" | "style" | "color" | "translate" | "screen" | "wrap" | "multiple" | "disabled" | "className" | "lang" | "media" | "min" | "role" | "tabIndex" | "crossOrigin" | "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" | "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" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "classID" | "useMap" | "wmode" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "placeholder" | "spellCheck" | "radioGroup" | "about" | "datatype" | "inlist" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "security" | "unselectable" | "inputMode" | "is" | "htmlFor" | "as" | "hrefLang" | "rel" | "sizes" | "charSet" | "cellPadding" | "cellSpacing" | "selected" | "src" | "srcSet" | "autoComplete" | "autoFocus" | "dateTime" | "manifest" | "download" | "alt" | "coords" | "shape" | "autoPlay" | "controls" | "loop" | "mediaGroup" | "muted" | "playsInline" | "preload" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "acceptCharset" | "encType" | "noValidate" | "allowFullScreen" | "allowTransparency" | "frameBorder" | "marginHeight" | "marginWidth" | "sandbox" | "scrolling" | "seamless" | "srcDoc" | "accept" | "capture" | "checked" | "maxLength" | "minLength" | "readOnly" | "challenge" | "keyType" | "keyParams" | "httpEquiv" | "high" | "low" | "optimum" | "reversed" | "async" | "defer" | "nonce" | "scoped" | "colSpan" | "rowSpan" | "cols" | "rows" | "kind" | "srcLang" | "poster" | "shouldOpenInNewTab"> & React.RefAttributes<HTMLAnchorElement>>;
|
|
7
7
|
export default EntityUriLink;
|
|
@@ -50,18 +50,17 @@ var contexts_1 = require("../../contexts");
|
|
|
50
50
|
var core_1 = require("../../core");
|
|
51
51
|
var EntityUriLink = (0, react_1.forwardRef)(function (_a, ref) {
|
|
52
52
|
var value = _a.value, children = _a.children, screen = _a.screen, className = _a.className, _b = _a.shouldOpenInNewTab, shouldOpenInNewTab = _b === void 0 ? false : _b, otherProps = __rest(_a, ["value", "children", "screen", "className", "shouldOpenInNewTab"]);
|
|
53
|
-
var viewId = (0, react_1.useContext)(contexts_1.ViewIdContext);
|
|
54
53
|
var generateEntityUrl = (0, react_1.useContext)(contexts_1.UrlGeneratorsContext).generateEntityUrl;
|
|
55
54
|
var openEntity = (0, contexts_1.useMdmAction)('openEntity');
|
|
56
55
|
var uiPath = (0, contexts_1.useMdmUiPath)();
|
|
57
56
|
var generateEntityUrlByUri = function (uri) { return generateEntityUrl({ uiPath: uiPath, uri: uri, screen: screen }); };
|
|
58
57
|
var handleClick = (0, react_1.useCallback)(function (e) {
|
|
59
58
|
if (!(0, core_1.isControlOrCommandPressed)(e)) {
|
|
60
|
-
openEntity({ uri: value,
|
|
59
|
+
openEntity({ uri: value, screen: screen });
|
|
61
60
|
e.preventDefault();
|
|
62
61
|
}
|
|
63
62
|
e.stopPropagation();
|
|
64
|
-
}, [openEntity, screen, value
|
|
63
|
+
}, [openEntity, screen, value]);
|
|
65
64
|
return (react_1.default.createElement("a", __assign({ ref: ref, href: generateEntityUrlByUri(value), onClick: shouldOpenInNewTab ? undefined : handleClick, target: shouldOpenInNewTab ? '_blank' : '_self', className: className }, otherProps), children));
|
|
66
65
|
});
|
|
67
66
|
EntityUriLink.displayName = 'EntityUriLink';
|
|
@@ -2,10 +2,9 @@
|
|
|
2
2
|
type NodeTitleProps = {
|
|
3
3
|
title: string;
|
|
4
4
|
entityUri: string;
|
|
5
|
-
viewId: string;
|
|
6
5
|
isSelected?: boolean;
|
|
7
6
|
anchorEl?: HTMLElement;
|
|
8
7
|
withEntityDetails?: boolean;
|
|
9
8
|
};
|
|
10
|
-
export declare const HierarchyNodeTitle: ({ title, isSelected, entityUri,
|
|
9
|
+
export declare const HierarchyNodeTitle: ({ title, isSelected, entityUri, anchorEl, withEntityDetails }: NodeTitleProps) => JSX.Element;
|
|
11
10
|
export {};
|
|
@@ -37,7 +37,7 @@ var useEntityDetails_1 = require("./hooks/useEntityDetails");
|
|
|
37
37
|
var styles_1 = require("./styles");
|
|
38
38
|
var HierarchyNodeTitle = function (_a) {
|
|
39
39
|
var _b;
|
|
40
|
-
var title = _a.title, isSelected = _a.isSelected, entityUri = _a.entityUri,
|
|
40
|
+
var title = _a.title, isSelected = _a.isSelected, entityUri = _a.entityUri, anchorEl = _a.anchorEl, _c = _a.withEntityDetails, withEntityDetails = _c === void 0 ? true : _c;
|
|
41
41
|
var styles = (0, styles_1.useStyles)();
|
|
42
42
|
var generateEntityUrl = (0, react_1.useContext)(contexts_1.UrlGeneratorsContext).generateEntityUrl;
|
|
43
43
|
var openEntity = (0, contexts_1.useMdmAction)('openEntity');
|
|
@@ -46,8 +46,8 @@ var HierarchyNodeTitle = function (_a) {
|
|
|
46
46
|
var link = generateEntityUrl({ uiPath: uiPath, uri: entityUri });
|
|
47
47
|
var showPopper = Boolean(anchorEl) && (Boolean(entityDetails) || isLoading);
|
|
48
48
|
var handleClick = (0, react_1.useCallback)(function () {
|
|
49
|
-
openEntity({ uri: entityUri
|
|
50
|
-
}, [openEntity, entityUri
|
|
49
|
+
openEntity({ uri: entityUri });
|
|
50
|
+
}, [openEntity, entityUri]);
|
|
51
51
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
52
52
|
react_1.default.createElement("span", { "data-reltio-id": "reltio-hierarchy-node-title", className: (0, classnames_1.default)(styles.link, (_b = {}, _b[styles.selected] = isSelected, _b)), onMouseEnter: withEntityDetails ? showEntityDetails : undefined, onMouseLeave: withEntityDetails ? hideEntityDetails : undefined },
|
|
53
53
|
react_1.default.createElement(Link_1.default, { to: link, onClick: handleClick }, title)),
|
|
@@ -7,7 +7,6 @@ var mdm_sdk_1 = require("@reltio/mdm-sdk");
|
|
|
7
7
|
var contexts_1 = require("../../../contexts");
|
|
8
8
|
var useEditMetaInfo = function (_a) {
|
|
9
9
|
var initialAttributeValue = _a.initialAttributeValue, attributeType = _a.attributeType;
|
|
10
|
-
var viewId = (0, react_1.useContext)(contexts_1.ViewIdContext);
|
|
11
10
|
var modifyAttribute = (0, contexts_1.useMdmAction)('modifyAttribute');
|
|
12
11
|
var _b = (0, react_1.useState)(initialAttributeValue), attributeValue = _b[0], setAttributeValue = _b[1];
|
|
13
12
|
(0, react_1.useEffect)(function () {
|
|
@@ -51,8 +50,8 @@ var useEditMetaInfo = function (_a) {
|
|
|
51
50
|
setAttributeValue(initialAttributeValue);
|
|
52
51
|
}, [initialAttributeValue]);
|
|
53
52
|
var applyLocalChanges = (0, react_1.useCallback)(function () {
|
|
54
|
-
modifyAttribute({ value: attributeValue, attributeType: attributeType, uri: attributeValue.uri
|
|
55
|
-
}, [attributeValue, attributeType,
|
|
53
|
+
modifyAttribute({ value: attributeValue, attributeType: attributeType, uri: attributeValue.uri });
|
|
54
|
+
}, [attributeValue, attributeType, modifyAttribute]);
|
|
56
55
|
return {
|
|
57
56
|
addAttributes: addAttributes,
|
|
58
57
|
changeAttribute: changeAttribute,
|
|
@@ -13,5 +13,5 @@ declare const Popper: React.ForwardRefExoticComponent<Pick<Omit<import("@mui/bas
|
|
|
13
13
|
anchorEl?: HTMLElement | null;
|
|
14
14
|
excludeAnchorFromBackdrop?: boolean;
|
|
15
15
|
onClose?: () => void;
|
|
16
|
-
}, "id" | "hidden" | "open" | "title" | "key" | "children" | "defaultValue" | "prefix" | "results" | "slot" | "style" | "color" | "translate" | "container" | "transition" | "className" | "sx" | "lang" | "role" | "tabIndex" | "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" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "placeholder" | "spellCheck" | "radioGroup" | "about" | "datatype" | "inlist" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "security" | "unselectable" | "inputMode" | "is" | "components" | "componentsProps" | "slotProps" | "slots" | "onClose" | "anchorEl" | "disablePortal" | "keepMounted" | "modifiers" | "placement" | "popperOptions" | "popperRef" | "
|
|
16
|
+
}, "id" | "hidden" | "open" | "title" | "key" | "children" | "defaultValue" | "prefix" | "component" | "results" | "slot" | "style" | "color" | "translate" | "container" | "transition" | "className" | "sx" | "lang" | "role" | "tabIndex" | "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" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "defaultChecked" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "placeholder" | "spellCheck" | "radioGroup" | "about" | "datatype" | "inlist" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "security" | "unselectable" | "inputMode" | "is" | "components" | "componentsProps" | "slotProps" | "slots" | "onClose" | "anchorEl" | "disablePortal" | "keepMounted" | "modifiers" | "placement" | "popperOptions" | "popperRef" | "modal" | "excludeAnchorFromBackdrop"> & React.RefAttributes<HTMLDivElement>>;
|
|
17
17
|
export default Popper;
|
|
@@ -24,7 +24,6 @@ var useSearchNavigation = function () {
|
|
|
24
24
|
var safeCheckEntityPromise = (0, hooks_1.useSafePromise)();
|
|
25
25
|
var safeRequestTotalPromise = (0, hooks_1.useSafePromise)();
|
|
26
26
|
var safeRequestEntitiesPromise = (0, hooks_1.useSafePromise)();
|
|
27
|
-
var viewId = (0, react_1.useContext)(contexts_1.ViewIdContext);
|
|
28
27
|
var searchNavigationListener = (0, contexts_1.useMdmListener)('searchNavigationListener');
|
|
29
28
|
var updateSearchNavigationDataFields = (0, contexts_1.useMdmAction)('updateSearchNavigationDataFields');
|
|
30
29
|
var mdmOpenEntity = (0, contexts_1.useMdmAction)('openEntity');
|
|
@@ -43,11 +42,11 @@ var useSearchNavigation = function () {
|
|
|
43
42
|
}, [updateSearchNavigationDataFields]);
|
|
44
43
|
var openEntity = (0, react_1.useCallback)(function (uri) {
|
|
45
44
|
var preparedUri = tenant !== searchTenant ? (0, mdm_sdk_1.getEntityUriForLink)({ uri: uri, dataTenant: searchTenant }) : uri;
|
|
46
|
-
mdmOpenEntity({ uri: preparedUri,
|
|
47
|
-
}, [mdmOpenEntity,
|
|
45
|
+
mdmOpenEntity({ uri: preparedUri, source: 'navigation' });
|
|
46
|
+
}, [mdmOpenEntity, tenant, searchTenant]);
|
|
48
47
|
var onSearchResultsClick = (0, react_1.useCallback)(function () {
|
|
49
|
-
openPerspective(
|
|
50
|
-
}, [openPerspective, type
|
|
48
|
+
openPerspective(type);
|
|
49
|
+
}, [openPerspective, type]);
|
|
51
50
|
(0, react_1.useEffect)(function () {
|
|
52
51
|
if (total !== 0 && index >= total) {
|
|
53
52
|
updateNavigationData({
|
|
@@ -19,14 +19,14 @@ var DeltaField = function (_a) {
|
|
|
19
19
|
var styles = (0, styles_1.useStyles)();
|
|
20
20
|
var commonStyles = (0, commonStyles_1.useCommonStyles)();
|
|
21
21
|
var metadata = (0, contexts_1.useMdmMetadata)();
|
|
22
|
-
var
|
|
22
|
+
var attributesPresentation = (0, contexts_1.useMdmAttributesPresentation)();
|
|
23
23
|
var attribute = (0, mdm_sdk_1.findAttributeTypeByUri)(metadata, delta.attributeType);
|
|
24
24
|
var newValue = (_b = delta.newValue) === null || _b === void 0 ? void 0 : _b.value;
|
|
25
25
|
var oldValue = (_c = delta.oldValue) === null || _c === void 0 ? void 0 : _c.value;
|
|
26
26
|
var value = oldValue || newValue;
|
|
27
27
|
var deltaLabel = types_1.DeltaTypes[delta.type];
|
|
28
28
|
var converter = function (value) {
|
|
29
|
-
return (0, activities_1.stringifyDeltaValue)(value, delta.attributeType, metadata,
|
|
29
|
+
return (0, activities_1.stringifyDeltaValue)(value, delta.attributeType, metadata, attributesPresentation);
|
|
30
30
|
};
|
|
31
31
|
return (react_1.default.createElement("div", { className: commonStyles.field },
|
|
32
32
|
react_1.default.createElement("span", { className: commonStyles.fieldName },
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Metadata,
|
|
1
|
+
import { Metadata, AttributesPresentation } from '@reltio/mdm-sdk';
|
|
2
2
|
import { ActivityData, ActivityTypes, DeltaValue } from '../types';
|
|
3
3
|
export declare const getActivityType: (activity: ActivityData) => any;
|
|
4
4
|
export declare const isValidActivityType: (type: string) => boolean;
|
|
5
5
|
export declare const removeIgnoredItems: (activity: ActivityData) => ActivityData;
|
|
6
6
|
export declare const splitActivityByType: (activity: ActivityData) => any;
|
|
7
|
-
export declare const stringifyDeltaValue: (deltaValue: DeltaValue['value'], attributeTypeUri: string, metadata: Metadata,
|
|
7
|
+
export declare const stringifyDeltaValue: (deltaValue: DeltaValue['value'], attributeTypeUri: string, metadata: Metadata, attributesPresentation?: AttributesPresentation) => any;
|
|
8
8
|
export declare const getActivityLabel: (type: ActivityTypes) => string;
|
|
@@ -45,10 +45,10 @@ var splitActivityByType = function (activity) {
|
|
|
45
45
|
}, (0, ramda_1.map)(function (items) { return (__assign(__assign({}, activity), { items: items, itemsTotal: items.length })); }), function () { return [activity]; }))(activity);
|
|
46
46
|
};
|
|
47
47
|
exports.splitActivityByType = splitActivityByType;
|
|
48
|
-
var stringifyDeltaValue = function (deltaValue, attributeTypeUri, metadata,
|
|
48
|
+
var stringifyDeltaValue = function (deltaValue, attributeTypeUri, metadata, attributesPresentation) {
|
|
49
49
|
var attributeType = (0, mdm_sdk_1.findAttributeTypeByUri)(metadata, attributeTypeUri);
|
|
50
50
|
var dataTypeDefinition = (0, mdm_sdk_1.getAttrDataTypeDefinition)(attributeType);
|
|
51
|
-
var formatValue = (0, mdm_sdk_1.formatDataTypeValue)({
|
|
51
|
+
var formatValue = (0, mdm_sdk_1.formatDataTypeValue)({ attributesPresentation: attributesPresentation, dataTypeDefinition: dataTypeDefinition });
|
|
52
52
|
if ((0, ramda_1.isNil)(deltaValue)) {
|
|
53
53
|
return '';
|
|
54
54
|
}
|
|
@@ -59,7 +59,7 @@ var stringifyDeltaValue = function (deltaValue, attributeTypeUri, metadata, attr
|
|
|
59
59
|
.flatMap(function (_a) {
|
|
60
60
|
var attributeTypeName = _a[0], deltaValues = _a[1];
|
|
61
61
|
return deltaValues.map(function (deltaValue) {
|
|
62
|
-
return (0, exports.stringifyDeltaValue)(deltaValue.value, (0, mdm_sdk_1.makeAttrTypeUri)(attributeTypeUri, attributeTypeName), metadata,
|
|
62
|
+
return (0, exports.stringifyDeltaValue)(deltaValue.value, (0, mdm_sdk_1.makeAttrTypeUri)(attributeTypeUri, attributeTypeName), metadata, attributesPresentation);
|
|
63
63
|
});
|
|
64
64
|
})
|
|
65
65
|
.join(', ');
|
|
@@ -10,7 +10,7 @@ var BranchDecorator = function (_a) {
|
|
|
10
10
|
var _b;
|
|
11
11
|
var className = _a.className, children = _a.children, _c = _a.plain, plain = _c === void 0 ? false : _c, _d = _a.enabled, enabled = _d === void 0 ? false : _d;
|
|
12
12
|
var styles = (0, styles_1.useStyles)();
|
|
13
|
-
return enabled ? (react_1.default.createElement("div", { className: (0, classnames_1.default)(styles.decorator, (_b = {}, _b[styles.plain] = plain, _b), className) },
|
|
13
|
+
return enabled ? (react_1.default.createElement("div", { "data-reltio-id": "branch-decorator", className: (0, classnames_1.default)(styles.decorator, (_b = {}, _b[styles.plain] = plain, _b), className) },
|
|
14
14
|
react_1.default.createElement("div", { className: styles.wrapper }, children))) : (react_1.default.createElement(react_1.default.Fragment, null, children));
|
|
15
15
|
};
|
|
16
16
|
exports.default = BranchDecorator;
|
|
@@ -44,7 +44,7 @@ var OvIcon = function (_a) {
|
|
|
44
44
|
var entity = (0, react_1.useContext)(contexts_1.EntityContext);
|
|
45
45
|
var entityUri = (0, heplers_1.getEntityUri)(entity, nonOvValues);
|
|
46
46
|
var onClick = (0, react_1.useCallback)(function () {
|
|
47
|
-
openEntity({ uri: entityUri,
|
|
47
|
+
openEntity({ uri: entityUri, screen: 'sources' });
|
|
48
48
|
}, [openEntity, entityUri]);
|
|
49
49
|
if (!nonOvTotal) {
|
|
50
50
|
return null;
|
|
@@ -36,9 +36,9 @@ var AttributesPager = function (_a) {
|
|
|
36
36
|
var requestNextPageOfAttributeValues = (0, contexts_1.useMdmAction)('requestNextPageOfAttributeValues');
|
|
37
37
|
var activeErrors = (0, contexts_1.useMdmActiveErrorsForAttributesPager)(parentUri, attributeType);
|
|
38
38
|
var profileErrors = (0, contexts_1.useMdmProfileErrors)();
|
|
39
|
-
var
|
|
39
|
+
var maxValuesInResponse = (0, contexts_1.useMdmMaxValuesInResponse)();
|
|
40
40
|
var errorMessage = (0, mdm_sdk_1.getAttributePagerActiveTypeErrorMessage)(parentUri, attributeType, profileErrors);
|
|
41
|
-
var max = (_b = maxProp !== null && maxProp !== void 0 ? maxProp :
|
|
41
|
+
var max = (_b = maxProp !== null && maxProp !== void 0 ? maxProp : maxValuesInResponse) !== null && _b !== void 0 ? _b : Infinity;
|
|
42
42
|
var partitionByOv = (0, ramda_1.partition)(mdm_sdk_1.isOv);
|
|
43
43
|
var _e = partitionByOv(values), ovValues = _e[0], nonOvValues = _e[1];
|
|
44
44
|
var visibleValues = showNonOv ? values : ovValues;
|
|
@@ -1,15 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
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
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
3
|
if (k2 === undefined) k2 = k;
|
|
15
4
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -52,7 +41,6 @@ var AttributesView = function (_a) {
|
|
|
52
41
|
var _b;
|
|
53
42
|
var className = _a.className, mode = _a.mode, entity = _a.entity, _c = _a.caption, caption = _c === void 0 ? '' : _c, _d = _a.excludeUris, excludeUris = _d === void 0 ? [] : _d, _e = _a.includeUris, includeUris = _e === void 0 ? [] : _e, pinnedAttributes = _a.pinnedAttributes;
|
|
54
43
|
var styles = (0, styles_1.useStyles)();
|
|
55
|
-
var viewId = (0, react_1.useContext)(contexts_1.ViewIdContext);
|
|
56
44
|
var addAttributes = (0, contexts_1.useMdmAction)('addAttributes');
|
|
57
45
|
var modifyAttribute = (0, contexts_1.useMdmAction)('modifyAttribute');
|
|
58
46
|
var removeAttribute = (0, contexts_1.useMdmAction)('removeAttribute');
|
|
@@ -61,13 +49,10 @@ var AttributesView = function (_a) {
|
|
|
61
49
|
var modifiedEntity = (0, contexts_1.useMdmModifiedEntity)(entity.uri) || {};
|
|
62
50
|
var pinnedAttributeUris = (0, react_1.useMemo)(function () { return (0, mdm_sdk_1.getPinnedAttributesForUser)(pinnedAttributes, userRoles); }, [pinnedAttributes, userRoles]);
|
|
63
51
|
var filteredAttrTypes = (0, react_1.useMemo)(function () { return (0, attributesView_1.getFilteredAttrTypes)(metadata, modifiedEntity.type, includeUris, excludeUris); }, [excludeUris, includeUris, metadata, modifiedEntity.type]);
|
|
64
|
-
var onAddAttributes = (0, react_1.useCallback)(function (params) { return addAttributes(params.map(function (param) { return (__assign(__assign({}, param), { viewId: viewId })); })); }, [viewId, addAttributes]);
|
|
65
|
-
var onChangeAttribute = (0, react_1.useCallback)(function (params) { return modifyAttribute(__assign(__assign({}, params), { viewId: viewId })); }, [viewId, modifyAttribute]);
|
|
66
|
-
var onDeleteAttribute = (0, react_1.useCallback)(function (params) { return removeAttribute(__assign(__assign({}, params), { viewId: viewId })); }, [viewId, removeAttribute]);
|
|
67
52
|
return (react_1.default.createElement(BasicView_1.default, { className: className },
|
|
68
53
|
caption && react_1.default.createElement(FacetViewHeader_1.default, { title: caption }),
|
|
69
54
|
react_1.default.createElement(Box_1.default, { className: (0, classnames_1.default)(styles.attributesContainer, (_b = {}, _b[styles.noCaption] = !caption, _b)) },
|
|
70
55
|
react_1.default.createElement(PinnedAttributesContext_1.PinnedAttributesContext.Provider, { value: pinnedAttributeUris },
|
|
71
|
-
react_1.default.createElement(AttributesList_1.default, { entity: modifiedEntity, attrTypes: filteredAttrTypes, parentUri: modifiedEntity.uri, drawLines: false, mode: mode, showEmptyEditors: (0, mdm_sdk_1.isTempUri)(modifiedEntity.uri), crosswalks: modifiedEntity.crosswalks, onAddAttributes:
|
|
56
|
+
react_1.default.createElement(AttributesList_1.default, { entity: modifiedEntity, attrTypes: filteredAttrTypes, parentUri: modifiedEntity.uri, drawLines: false, mode: mode, showEmptyEditors: (0, mdm_sdk_1.isTempUri)(modifiedEntity.uri), crosswalks: modifiedEntity.crosswalks, onAddAttributes: addAttributes, onChangeAttribute: modifyAttribute, onDeleteAttribute: removeAttribute })))));
|
|
72
57
|
};
|
|
73
58
|
exports.default = AttributesView;
|
|
@@ -50,7 +50,6 @@ var SingleValue = function (_a) {
|
|
|
50
50
|
var styles = (0, styles_1.useSingleValueStyles)();
|
|
51
51
|
var openEntity = (0, contexts_1.useMdmAction)('openEntity');
|
|
52
52
|
var uiPath = (0, contexts_1.useMdmUiPath)();
|
|
53
|
-
var viewId = (0, react_1.useContext)(contexts_1.ViewIdContext);
|
|
54
53
|
var generateEntityUrl = (0, react_1.useContext)(contexts_1.UrlGeneratorsContext).generateEntityUrl;
|
|
55
54
|
var handleOnMouseDown = function (event) {
|
|
56
55
|
event.stopPropagation();
|
|
@@ -61,7 +60,7 @@ var SingleValue = function (_a) {
|
|
|
61
60
|
event.preventDefault();
|
|
62
61
|
}
|
|
63
62
|
else if (!(0, core_1.isControlOrCommandPressed)(event)) {
|
|
64
|
-
openEntity({ uri: data.entityUri
|
|
63
|
+
openEntity({ uri: data.entityUri });
|
|
65
64
|
event.preventDefault();
|
|
66
65
|
}
|
|
67
66
|
};
|
|
@@ -77,8 +76,10 @@ var SingleValue = function (_a) {
|
|
|
77
76
|
href: generateEntityUrl({ uiPath: uiPath, uri: data.entityUri }),
|
|
78
77
|
component: 'a'
|
|
79
78
|
};
|
|
80
|
-
|
|
79
|
+
if (menuIsOpen)
|
|
80
|
+
return null;
|
|
81
|
+
return (react_1.default.createElement(Typography_1.default, __assign({}, valueProps), (0, mdm_sdk_1.isTempUri)(data.entityUri)
|
|
81
82
|
? ui_i18n_1.default.text("New ".concat(currentEntityType.label, " will be created"))
|
|
82
|
-
: (0, mdm_sdk_1.getLabel)(children)))
|
|
83
|
+
: (0, mdm_sdk_1.getLabel)(children)));
|
|
83
84
|
};
|
|
84
85
|
exports.default = SingleValue;
|
|
@@ -11,7 +11,7 @@ var styles_1 = require("./styles");
|
|
|
11
11
|
var ShowMore = function (_a) {
|
|
12
12
|
var moreNumber = _a.moreNumber, valueNumber = _a.valueNumber, onClick = _a.onClick;
|
|
13
13
|
var styles = (0, styles_1.useStyles)();
|
|
14
|
-
return (react_1.default.createElement(Link_1.default, { component: "button", variant: "caption", className: styles.link, onClick: onClick, underline: "none" },
|
|
14
|
+
return (react_1.default.createElement(Link_1.default, { "data-reltio-id": "show-more", component: "button", variant: "caption", className: styles.link, onClick: onClick, underline: "none" },
|
|
15
15
|
react_1.default.createElement(KeyboardArrowDown_1.default, { className: styles['svg-icon__root'] }),
|
|
16
16
|
moreNumber && valueNumber
|
|
17
17
|
? ui_i18n_1.default.text('Show ${moreNumber} more of remaining ${valueNumber} value', { moreNumber: moreNumber, valueNumber: valueNumber })
|
|
@@ -49,8 +49,8 @@ var AttributesPager = function (_a) {
|
|
|
49
49
|
var values = _a.values, attributeType = _a.attributeType, drawLines = _a.drawLines, _e = _a.paging, paging = _e === void 0 ? {} : _e, parentUri = _a.parentUri, maxProp = _a.max, titleClassName = _a.titleClassName, contentClassName = _a.contentClassName, showNonOv = _a.showNonOv;
|
|
50
50
|
var styles = (0, styles_1.useStyles)();
|
|
51
51
|
var requestNextPageOfAttributeValues = (0, contexts_1.useMdmAction)('requestNextPageOfAttributeValues');
|
|
52
|
-
var
|
|
53
|
-
var max = (_d = maxProp !== null && maxProp !== void 0 ? maxProp :
|
|
52
|
+
var maxValuesInResponse = (0, contexts_1.useMdmMaxValuesInResponse)();
|
|
53
|
+
var max = (_d = maxProp !== null && maxProp !== void 0 ? maxProp : maxValuesInResponse) !== null && _d !== void 0 ? _d : Infinity;
|
|
54
54
|
var partitionByOv = (0, ramda_1.partition)(mdm_sdk_1.isOv);
|
|
55
55
|
if (!values || !values.length) {
|
|
56
56
|
return null;
|
|
@@ -61,7 +61,7 @@ var MultiLineRenderer = function (_a) {
|
|
|
61
61
|
};
|
|
62
62
|
var shownValues = values.slice(0, visibleValuesCount);
|
|
63
63
|
var hiddenValuesCount = totalVisibleValues - visibleValuesCount;
|
|
64
|
-
return (react_1.default.createElement("div", { className: styles.wrapper },
|
|
64
|
+
return (react_1.default.createElement("div", { "data-reltio-id": "multi-line-renderer", className: styles.wrapper },
|
|
65
65
|
react_1.default.createElement("div", { className: styles.titleRow },
|
|
66
66
|
react_1.default.createElement(Title_1.default, { label: label, className: (0, classnames_1.default)(styles.title, titleClassName), "data-reltio-id": "reltio-attribute-label" }),
|
|
67
67
|
react_1.default.createElement(DescriptionIcon_1.default, { description: description }),
|
|
@@ -20,7 +20,7 @@ var OneLineRenderer = function (_a) {
|
|
|
20
20
|
var objectType = (0, mdm_sdk_1.isRelationAttrType)(attributeType)
|
|
21
21
|
? mdm_sdk_1.CollaborationObjectTypes.RELATION_ATTRIBUTE
|
|
22
22
|
: mdm_sdk_1.CollaborationObjectTypes.ENTITY_ATTRIBUTE;
|
|
23
|
-
return (react_1.default.createElement("div", { className: (0, classnames_1.default)(styles.collaborationWrapper, constants_1.COMMENTS_CONTAINER_VISIBILITY_AREA) },
|
|
23
|
+
return (react_1.default.createElement("div", { "data-reltio-id": "one-line-renderer", className: (0, classnames_1.default)(styles.collaborationWrapper, constants_1.COMMENTS_CONTAINER_VISIBILITY_AREA) },
|
|
24
24
|
react_1.default.createElement("div", { className: (0, classnames_1.default)(styles.titleRow, styles.wrapper) },
|
|
25
25
|
react_1.default.createElement(Title_1.default, { label: label, className: (0, classnames_1.default)(styles.title, titleClassName), "data-reltio-id": "reltio-attribute-label" }),
|
|
26
26
|
react_1.default.createElement(DescriptionIcon_1.default, { description: description, className: styles.descriptionIcon }),
|
|
@@ -32,7 +32,7 @@ var SpecialRenderer = function (_a) {
|
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
};
|
|
35
|
-
return (react_1.default.createElement("div", { className: (0, classnames_1.default)(styles.titleRow, styles.wrapper) },
|
|
35
|
+
return (react_1.default.createElement("div", { "data-reltio-id": "special-renderer", className: (0, classnames_1.default)(styles.titleRow, styles.wrapper) },
|
|
36
36
|
renderIcon(styles.titleIcon),
|
|
37
37
|
react_1.default.createElement(Title_1.default, { label: label, className: styles.title, "data-reltio-id": "reltio-attribute-label" }),
|
|
38
38
|
renderValue(styles.attribute)));
|
|
@@ -1,25 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
declare
|
|
3
|
-
entries: any;
|
|
4
|
-
lookups?: undefined;
|
|
5
|
-
lookupCode?: undefined;
|
|
6
|
-
getLookups?: undefined;
|
|
7
|
-
resolveLookups?: undefined;
|
|
8
|
-
getSuggestions?: undefined;
|
|
9
|
-
format?: undefined;
|
|
10
|
-
tenant?: undefined;
|
|
11
|
-
} | {
|
|
1
|
+
import { DataTypeDefinition } from '@reltio/mdm-sdk';
|
|
2
|
+
declare const useEditorContext: (fieldName: string, dataTypeDefinition: DataTypeDefinition) => {
|
|
12
3
|
lookups: import("@reltio/mdm-sdk").Lookups;
|
|
13
|
-
lookupCode:
|
|
4
|
+
lookupCode: string;
|
|
14
5
|
getLookups: () => any;
|
|
15
|
-
entries?: undefined;
|
|
16
6
|
resolveLookups?: undefined;
|
|
17
7
|
getSuggestions?: undefined;
|
|
18
8
|
format?: undefined;
|
|
19
9
|
tenant?: undefined;
|
|
10
|
+
entries?: undefined;
|
|
20
11
|
} | {
|
|
21
12
|
lookups: import("@reltio/mdm-sdk").Lookups;
|
|
22
|
-
lookupCode:
|
|
13
|
+
lookupCode: string;
|
|
23
14
|
getLookups: ({ type, parents, displayNamePrefix, max, offset }: {
|
|
24
15
|
type: any;
|
|
25
16
|
parents: any;
|
|
@@ -28,39 +19,47 @@ declare function useEditorContext(fieldName: any, dataTypeDefinition: any): {
|
|
|
28
19
|
offset: any;
|
|
29
20
|
}) => Promise<any>;
|
|
30
21
|
resolveLookups: (type: any, codeValues: any) => Promise<void>;
|
|
31
|
-
entries?: undefined;
|
|
32
22
|
getSuggestions?: undefined;
|
|
33
23
|
format?: undefined;
|
|
34
24
|
tenant?: undefined;
|
|
25
|
+
entries?: undefined;
|
|
35
26
|
} | {
|
|
36
27
|
getSuggestions: (searchValue: any, max: any, pageNo: any) => Promise<Record<string, unknown>>;
|
|
37
|
-
entries?: undefined;
|
|
38
28
|
lookups?: undefined;
|
|
39
29
|
lookupCode?: undefined;
|
|
40
30
|
getLookups?: undefined;
|
|
41
31
|
resolveLookups?: undefined;
|
|
42
32
|
format?: undefined;
|
|
43
33
|
tenant?: undefined;
|
|
34
|
+
entries?: undefined;
|
|
44
35
|
} | {
|
|
45
36
|
format: import("@reltio/mdm-sdk").NumberFormat;
|
|
46
|
-
entries?: undefined;
|
|
47
37
|
lookups?: undefined;
|
|
48
38
|
lookupCode?: undefined;
|
|
49
39
|
getLookups?: undefined;
|
|
50
40
|
resolveLookups?: undefined;
|
|
51
41
|
getSuggestions?: undefined;
|
|
52
42
|
tenant?: undefined;
|
|
43
|
+
entries?: undefined;
|
|
53
44
|
} | {
|
|
54
45
|
tenant: string;
|
|
46
|
+
lookups?: undefined;
|
|
47
|
+
lookupCode?: undefined;
|
|
48
|
+
getLookups?: undefined;
|
|
49
|
+
resolveLookups?: undefined;
|
|
50
|
+
getSuggestions?: undefined;
|
|
51
|
+
format?: undefined;
|
|
55
52
|
entries?: undefined;
|
|
53
|
+
} | {
|
|
54
|
+
entries: unknown[];
|
|
56
55
|
lookups?: undefined;
|
|
57
56
|
lookupCode?: undefined;
|
|
58
57
|
getLookups?: undefined;
|
|
59
58
|
resolveLookups?: undefined;
|
|
60
59
|
getSuggestions?: undefined;
|
|
61
60
|
format?: undefined;
|
|
61
|
+
tenant?: undefined;
|
|
62
62
|
} | {
|
|
63
|
-
entries?: undefined;
|
|
64
63
|
lookups?: undefined;
|
|
65
64
|
lookupCode?: undefined;
|
|
66
65
|
getLookups?: undefined;
|
|
@@ -68,4 +67,6 @@ declare function useEditorContext(fieldName: any, dataTypeDefinition: any): {
|
|
|
68
67
|
getSuggestions?: undefined;
|
|
69
68
|
format?: undefined;
|
|
70
69
|
tenant?: undefined;
|
|
70
|
+
entries?: undefined;
|
|
71
71
|
};
|
|
72
|
+
export default useEditorContext;
|
|
@@ -20,7 +20,7 @@ var useEditorContext = function (fieldName, dataTypeDefinition) {
|
|
|
20
20
|
var lookupsForTypeResolved = (0, contexts_1.useMdmAction)('lookupsForTypeResolved');
|
|
21
21
|
var tenant = (0, contexts_1.useMdmTenant)();
|
|
22
22
|
var lookups = (0, contexts_1.useMdmLookups)();
|
|
23
|
-
var
|
|
23
|
+
var attributesPresentation = (0, contexts_1.useMdmAttributesPresentation)();
|
|
24
24
|
var globalSearchRequestOptions = (0, contexts_1.useMdmGlobalSearchRequestOptions)();
|
|
25
25
|
var typeaheadGetSuggestion = (0, react_1.useCallback)(function (searchValue, max, pageNo) {
|
|
26
26
|
return (0, mdm_sdk_1.getFacetedAttributeData)({
|
|
@@ -74,7 +74,7 @@ var useEditorContext = function (fieldName, dataTypeDefinition) {
|
|
|
74
74
|
case mdm_sdk_1.DataTypes.TYPE_LONG:
|
|
75
75
|
case mdm_sdk_1.DataTypes.TYPE_INT:
|
|
76
76
|
return {
|
|
77
|
-
format: (0, mdm_sdk_1.getNumberFormat)(dataTypeDefinition,
|
|
77
|
+
format: (0, mdm_sdk_1.getNumberFormat)(dataTypeDefinition, attributesPresentation, mdm_sdk_1.intl.getLocale())
|
|
78
78
|
};
|
|
79
79
|
case mdm_sdk_1.DataTypes.TYPE_FILE:
|
|
80
80
|
return { tenant: tenant };
|