@reltio/components 1.4.1806-hf → 1.4.1824-hf-2
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/AttributesFiltersBuilder/helpers.d.ts +1 -1
- package/cjs/components/BasicTableView/BasicTablePagination/BasicTablePagination.d.ts +1 -1
- package/cjs/components/ProfileBandNavigation/ProfileBandNavigationWidget.d.ts +1 -1
- package/cjs/components/RelationEditor/RelationEditor.js +24 -6
- package/cjs/components/attributes/PivotingAttributes/PivotingTooltip.js +4 -3
- package/cjs/components/attributes/PivotingAttributes/PivotingTooltipContent.d.ts +2 -4
- package/cjs/components/attributes/PivotingAttributes/PivotingTooltipContent.js +3 -3
- package/cjs/components/charts/BarChart/BarChart.d.ts +1 -4
- package/cjs/components/charts/BarChart/getBarChartSettings.d.ts +1 -1
- package/cjs/components/charts/BubbleChart/BubbleChart.d.ts +5 -19
- package/cjs/components/charts/ChartsFactory.d.ts +3 -1
- package/cjs/components/charts/ChartsFactory.js +12 -13
- package/cjs/components/charts/CloudChart/CloudChart.d.ts +5 -11
- package/cjs/components/charts/LineChart/LineChart.d.ts +1 -4
- package/cjs/components/charts/LineChart/getLineChartSettings.d.ts +1 -1
- package/cjs/components/charts/MapChart/MapChart.d.ts +5 -17
- package/cjs/components/charts/MapChart/MapChart.js +2 -2
- package/cjs/components/charts/PieChart/PieChart.d.ts +6 -18
- package/cjs/components/charts/TableWithBars/TableWithBars.d.ts +2 -6
- package/cjs/components/charts/TreeChart/TreeChart.d.ts +2 -2
- package/cjs/components/charts/types/charts.d.ts +51 -0
- package/cjs/components/charts/types/index.d.ts +1 -5
- package/cjs/components/crosswalks/hooks/useAttributeActions.js +7 -8
- package/cjs/components/history/HistoryTree/styles.d.ts +1 -1
- package/cjs/components/history/hooks/useHistoryDiff.js +4 -0
- package/cjs/components/history/hooks/useHistorySlice.js +8 -0
- package/cjs/contexts/ConfigPermissionsContext/index.d.ts +2 -2
- package/cjs/contexts/MdmModuleContext/context.d.ts +7 -5
- package/cjs/contexts/MdmModuleContext/hooks.d.ts +2 -1
- package/cjs/hooks/usePivotingDataLoader/usePivotingDataLoader.d.ts +2 -4
- package/cjs/hooks/usePivotingDataLoader/usePivotingDataLoader.js +5 -5
- package/cjs/hooks/useRelationsLoader.d.ts +1 -1
- package/esm/components/AttributesFiltersBuilder/helpers.d.ts +1 -1
- package/esm/components/BasicTableView/BasicTablePagination/BasicTablePagination.d.ts +1 -1
- package/esm/components/ProfileBandNavigation/ProfileBandNavigationWidget.d.ts +1 -1
- package/esm/components/RelationEditor/RelationEditor.js +27 -9
- package/esm/components/attributes/PivotingAttributes/PivotingTooltip.js +4 -3
- package/esm/components/attributes/PivotingAttributes/PivotingTooltipContent.d.ts +2 -4
- package/esm/components/attributes/PivotingAttributes/PivotingTooltipContent.js +3 -3
- package/esm/components/charts/BarChart/BarChart.d.ts +1 -4
- package/esm/components/charts/BarChart/getBarChartSettings.d.ts +1 -1
- package/esm/components/charts/BubbleChart/BubbleChart.d.ts +5 -19
- package/esm/components/charts/ChartsFactory.d.ts +3 -1
- package/esm/components/charts/ChartsFactory.js +13 -14
- package/esm/components/charts/CloudChart/CloudChart.d.ts +5 -11
- package/esm/components/charts/LineChart/LineChart.d.ts +1 -4
- package/esm/components/charts/LineChart/getLineChartSettings.d.ts +1 -1
- package/esm/components/charts/MapChart/MapChart.d.ts +5 -17
- package/esm/components/charts/MapChart/MapChart.js +2 -2
- package/esm/components/charts/PieChart/PieChart.d.ts +6 -18
- package/esm/components/charts/TableWithBars/TableWithBars.d.ts +2 -6
- package/esm/components/charts/TreeChart/TreeChart.d.ts +2 -2
- package/esm/components/charts/types/charts.d.ts +51 -0
- package/esm/components/charts/types/index.d.ts +1 -5
- package/esm/components/crosswalks/hooks/useAttributeActions.js +9 -10
- package/esm/components/history/HistoryTree/styles.d.ts +1 -1
- package/esm/components/history/hooks/useHistoryDiff.js +4 -0
- package/esm/components/history/hooks/useHistorySlice.js +10 -2
- package/esm/contexts/ConfigPermissionsContext/index.d.ts +2 -2
- package/esm/contexts/MdmModuleContext/context.d.ts +7 -5
- package/esm/contexts/MdmModuleContext/hooks.d.ts +2 -1
- package/esm/hooks/usePivotingDataLoader/usePivotingDataLoader.d.ts +2 -4
- package/esm/hooks/usePivotingDataLoader/usePivotingDataLoader.js +5 -5
- package/esm/hooks/useRelationsLoader.d.ts +1 -1
- package/package.json +2 -2
- package/cjs/components/charts/types/BarChartOptions.d.ts +0 -7
- package/cjs/components/charts/types/ChartData.d.ts +0 -7
- package/cjs/components/charts/types/ChartData.js +0 -2
- package/cjs/components/charts/types/ChartProps.d.ts +0 -7
- package/cjs/components/charts/types/ChartProps.js +0 -2
- package/cjs/components/charts/types/LineChartOptions.d.ts +0 -6
- package/cjs/components/charts/types/LineChartOptions.js +0 -2
- package/cjs/components/charts/types/TableWithBarsOptions.d.ts +0 -4
- package/cjs/components/charts/types/TableWithBarsOptions.js +0 -2
- package/esm/components/charts/types/BarChartOptions.d.ts +0 -7
- package/esm/components/charts/types/ChartData.d.ts +0 -7
- package/esm/components/charts/types/ChartData.js +0 -1
- package/esm/components/charts/types/ChartProps.d.ts +0 -7
- package/esm/components/charts/types/ChartProps.js +0 -1
- package/esm/components/charts/types/LineChartOptions.d.ts +0 -6
- package/esm/components/charts/types/LineChartOptions.js +0 -1
- package/esm/components/charts/types/TableWithBarsOptions.d.ts +0 -4
- package/esm/components/charts/types/TableWithBarsOptions.js +0 -1
- /package/cjs/components/charts/types/{BarChartOptions.js → charts.js} +0 -0
- /package/esm/components/charts/types/{BarChartOptions.js → charts.js} +0 -0
|
@@ -70,7 +70,7 @@ export declare const useMdmDependentLookupEditorContext: (attributeValue: Simple
|
|
|
70
70
|
};
|
|
71
71
|
export declare const useMdmGlobalSearchRequestOptions: (omittingFields?: string[]) => import("@reltio/mdm-sdk").GlobalSearchRequestOptions;
|
|
72
72
|
export declare const useMdmAuthoringItemsByEntityType: (entityTypeUri: string) => import("@reltio/mdm-sdk").AuthoringItem[];
|
|
73
|
-
export declare const useMdmAction: <T extends "openSearch" | "openHistoryEvent" | "openConsoleApp" | "addAttributes" | "modifyAttribute" | "removeAttribute" | "entityDeleted" | "entityCreated" | "errorDeactivated" | "requestNextPageOfAttributeValues" | "openEntity" | "setDefaultProfilePicForModifiedEntity" | "setDefaultProfilePicForEntity" | "dependentLookupsEditorTouched" | "openPivotingPerspective" | "lookupsLoaded" | "lookupsForTypeResolved" | "errorSet" | "setHistoryMode" | "modeUpdated" | "setHistoryEvent" | "clearHistoryEvent" | "setHistoryDiff" | "setHistorySlice" | "updateSearchNavigationDataFields" | "openPerspective" | "entityDeletionFinished" | "loadEntity" | "updateSearchNavigationDataOnMerge" | "lookupsListResolved" | "relationsLoaded" | "setInitialInfo" | "setRelationType" | "closeRelationEditor" | "openRelationEditor" | "setRelationEntity" | "errorsSet" | "addRelation" | "editRelation">(action: T) => Partial<{
|
|
73
|
+
export declare const useMdmAction: <T extends "openSearch" | "openHistoryEvent" | "openConsoleApp" | "addAttributes" | "modifyAttribute" | "removeAttribute" | "entityDeleted" | "entityCreated" | "errorDeactivated" | "requestNextPageOfAttributeValues" | "openEntity" | "setDefaultProfilePicForModifiedEntity" | "setDefaultProfilePicForEntity" | "dependentLookupsEditorTouched" | "openPivotingPerspective" | "lookupsLoaded" | "lookupsForTypeResolved" | "errorSet" | "setHistoryMode" | "modeUpdated" | "setHistoryEvent" | "clearHistoryEvent" | "clearHistoryDiff" | "setHistoryDiff" | "setHistorySlice" | "updateSearchNavigationDataFields" | "openPerspective" | "entityDeletionFinished" | "loadEntity" | "updateSearchNavigationDataOnMerge" | "lookupsListResolved" | "relationsLoaded" | "setInitialInfo" | "setRelationType" | "closeRelationEditor" | "openRelationEditor" | "setRelationEntity" | "errorsSet" | "addRelation" | "editRelation">(action: T) => Partial<{
|
|
74
74
|
openSearch: (payload: import("@reltio/mdm-sdk").SearchState) => void;
|
|
75
75
|
openHistoryEvent: (payload: {
|
|
76
76
|
entityUri: string;
|
|
@@ -109,6 +109,7 @@ export declare const useMdmAction: <T extends "openSearch" | "openHistoryEvent"
|
|
|
109
109
|
modeUpdated: (payload: import("@reltio/mdm-sdk").Mode) => void;
|
|
110
110
|
setHistoryEvent: (payload: import("@reltio/mdm-sdk").HistoryEvent) => void;
|
|
111
111
|
clearHistoryEvent: () => void;
|
|
112
|
+
clearHistoryDiff: () => void;
|
|
112
113
|
setHistoryDiff: (payload: import("@reltio/mdm-sdk").HistoryDiff) => void;
|
|
113
114
|
setHistorySlice: (payload: import("@reltio/mdm-sdk").HistorySlice) => void;
|
|
114
115
|
updateSearchNavigationDataFields: (payload: Partial<import("@reltio/mdm-sdk").SearchNavigationData>) => void;
|
|
@@ -3,11 +3,9 @@ export declare const MAX_ENTITIES_PIVOTING_TOOLTIP = 6;
|
|
|
3
3
|
export type Props = {
|
|
4
4
|
value: PivotingValue[] | PrimitiveValue;
|
|
5
5
|
attributeType: AttributeType;
|
|
6
|
-
|
|
7
|
-
entityType?: string;
|
|
8
|
-
};
|
|
6
|
+
entityType?: string;
|
|
9
7
|
};
|
|
10
|
-
export declare const usePivotingDataLoader: ({ value, attributeType,
|
|
8
|
+
export declare const usePivotingDataLoader: ({ value, attributeType, entityType: configEntityType }: Props) => {
|
|
11
9
|
entities: Entity[];
|
|
12
10
|
total: number;
|
|
13
11
|
loadPivotingData: () => void;
|
|
@@ -18,13 +18,13 @@ var contexts_1 = require("../../contexts");
|
|
|
18
18
|
var useSafePromise_1 = require("../useSafePromise");
|
|
19
19
|
exports.MAX_ENTITIES_PIVOTING_TOOLTIP = 6;
|
|
20
20
|
var usePivotingDataLoader = function (_a) {
|
|
21
|
-
var value = _a.value, attributeType = _a.attributeType,
|
|
22
|
-
var
|
|
23
|
-
var
|
|
21
|
+
var value = _a.value, attributeType = _a.attributeType, configEntityType = _a.entityType;
|
|
22
|
+
var _b = (0, react_1.useState)([]), entities = _b[0], setEntities = _b[1];
|
|
23
|
+
var _c = (0, react_1.useState)(0), total = _c[0], setTotal = _c[1];
|
|
24
24
|
var safePromise = (0, useSafePromise_1.useSafePromise)();
|
|
25
|
-
var entity = (0, contexts_1.useMdmEntity)()
|
|
25
|
+
var entity = (0, contexts_1.useMdmEntity)();
|
|
26
26
|
var globalSearchRequestOptions = (0, contexts_1.useMdmGlobalSearchRequestOptions)();
|
|
27
|
-
var entityType =
|
|
27
|
+
var entityType = configEntityType || (entity === null || entity === void 0 ? void 0 : entity.type);
|
|
28
28
|
var filters = (0, react_1.useMemo)(function () { return (0, mdm_sdk_1.convertPivotingValueToSearchFilters)({ value: value, attributeType: attributeType, entityType: entityType }); }, [attributeType, entityType, value]);
|
|
29
29
|
var options = (0, react_1.useMemo)(function () { return (__assign({ max: exports.MAX_ENTITIES_PIVOTING_TOOLTIP, sort: 'label' }, (globalSearchRequestOptions || {}))); }, [globalSearchRequestOptions]);
|
|
30
30
|
var loadPivotingData = (0, react_1.useCallback)(function () {
|
|
@@ -7,7 +7,7 @@ type Props = {
|
|
|
7
7
|
filter?: string;
|
|
8
8
|
page: number;
|
|
9
9
|
rowsPerPage: number;
|
|
10
|
-
config: Pick<RelationsViewConfig |
|
|
10
|
+
config: Pick<RelationsViewConfig, 'suggested' | 'content' | 'id'> | Pick<RelationsTableViewConfig, 'content' | 'id'>;
|
|
11
11
|
entity: Entity;
|
|
12
12
|
relationActivityFilter?: ActivityFilter;
|
|
13
13
|
mode: Mode;
|
|
@@ -8,6 +8,6 @@ export declare const getRowsDataFromFilters: (filters: SearchFilter[], attribute
|
|
|
8
8
|
filter: string;
|
|
9
9
|
operator: import("@reltio/mdm-sdk").SearchOperator;
|
|
10
10
|
id: number;
|
|
11
|
-
values:
|
|
11
|
+
values: import("@reltio/mdm-sdk").SearchValue[];
|
|
12
12
|
}[];
|
|
13
13
|
export declare const getEntityTypeFromAttrTypes: (attributeTypes: AttributeType[]) => any;
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { TablePaginationProps } from '@mui/material/TablePagination';
|
|
3
3
|
type BasicTablePaginationProps = {
|
|
4
4
|
classes?: TablePaginationProps['classes'];
|
|
5
|
-
basicTableRef?: React.
|
|
5
|
+
basicTableRef?: React.RefObject<HTMLElement>;
|
|
6
6
|
count?: number;
|
|
7
7
|
page?: number;
|
|
8
8
|
rowsPerPage?: number;
|
|
@@ -17,7 +17,7 @@ declare const LinkWithTooltip: React.ForwardRefExoticComponent<import("prop-type
|
|
|
17
17
|
variant?: import("@mui/types").OverridableStringUnion<"inherit" | import("@mui/material").TypographyVariant, import("@mui/material").TypographyPropsVariantOverrides>;
|
|
18
18
|
} & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "key" | keyof React.AnchorHTMLAttributes<HTMLAnchorElement>> & {
|
|
19
19
|
ref?: React.Ref<HTMLAnchorElement>;
|
|
20
|
-
}, "m" | "id" | "type" | "hidden" | "visibility" | "title" | "key" | "children" | "defaultValue" | "prefix" | "order" | "width" | "minHeight" | "maxHeight" | "height" | "flex" | "minWidth" | "maxWidth" | "top" | "right" | "left" | "position" | "referrerPolicy" | "results" | "p" | "slot" | "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxShadow" | "boxSizing" | "color" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "justifyContent" | "justifyItems" | "justifySelf" | "letterSpacing" | "lineHeight" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "translate" | "whiteSpace" | "zIndex" | "border" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "
|
|
20
|
+
}, "m" | "id" | "type" | "hidden" | "visibility" | "title" | "key" | "children" | "defaultValue" | "prefix" | "order" | "width" | "minHeight" | "maxHeight" | "height" | "flex" | "minWidth" | "maxWidth" | "top" | "right" | "left" | "margin" | "position" | "referrerPolicy" | "results" | "p" | "slot" | "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxShadow" | "boxSizing" | "color" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "justifyContent" | "justifyItems" | "justifySelf" | "letterSpacing" | "lineHeight" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "translate" | "whiteSpace" | "zIndex" | "border" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "overflow" | "padding" | "underline" | keyof import("@mui/material/OverridableComponent").CommonProps | "sx" | "lang" | "media" | "target" | "role" | "tabIndex" | "href" | "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" | "hrefLang" | "rel" | "download" | "ping" | "align" | "variant" | "bgcolor" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint" | "noWrap" | "gutterBottom" | "paragraph" | "variantMapping" | "TypographyClasses"> & {
|
|
21
21
|
component: string;
|
|
22
22
|
}>;
|
|
23
23
|
type Props = {
|
|
@@ -12,16 +12,16 @@ var __assign = (this && this.__assign) || function () {
|
|
|
12
12
|
import React, { useCallback, useEffect, useMemo, useRef } from 'react';
|
|
13
13
|
import i18n from 'ui-i18n';
|
|
14
14
|
import classnames from 'classnames';
|
|
15
|
-
import { always, concat, differenceWith, equals, forEach, path, pick, pipe, prop, when, uniq, curry } from 'ramda';
|
|
15
|
+
import { always, assoc, concat, differenceWith, equals, forEach, map, path, pick, pipe, prop, propEq, when, uniq, curry } from 'ramda';
|
|
16
16
|
import Button from '@mui/material/Button';
|
|
17
17
|
import Typography from '@mui/material/Typography';
|
|
18
|
-
import { createTemporaryEntity, findRelatedTemporaryEntities, getActivenessAttributes, getCreatableAttributeTypes, getEntityType, getErrorMessage, getErrorId, omitMarks, relationEditorAttributeTypesSelectionStrategy, validateConnection, updateConnectionEntityLabel, isTempUri, isEmptyValue, getRelationAttributesList, getDefaultRelationTypeObject, getInOutRelations, isSuggestMode, isAttributeTypeError, getRelationUriFromConnection, getRelationEditorActiveError, getRelationAttributesFromConnection, getEntityUriFromConnection } from '@reltio/mdm-sdk';
|
|
18
|
+
import { createTemporaryEntity, findRelatedTemporaryEntities, getActivenessAttributes, getCreatableAttributeTypes, getEntityType, getErrorMessage, getErrorId, omitMarks, relationEditorAttributeTypesSelectionStrategy, validateConnection, updateConnectionEntityLabel, isTempUri, isEmptyValue, getRelationAttributesList, getDefaultRelationTypeObject, getInOutRelations, isSuggestMode, isAttributeTypeError, getRelationUriFromConnection, getRelationEditorActiveError, getRelationAttributesFromConnection, getEntityUriFromConnection, evaluateErrorPath, AttributeValuePathItemType, getAllRelationEditorActiveErrors } from '@reltio/mdm-sdk';
|
|
19
19
|
import ConnectionRelationTypeSelector from '../ConnectionRelationTypeSelector/ConnectionRelationTypeSelector';
|
|
20
20
|
import ErrorWrapper from '../ErrorWrapper/ErrorWrapper';
|
|
21
21
|
import EntitySelector from '../attributes/editMode/EntitySelector/EntitySelector';
|
|
22
22
|
import AttributesList from '../attributes/editMode/AttributesList';
|
|
23
23
|
import { withContext } from '../../HOCs';
|
|
24
|
-
import { ConfigPermissionsContextProvider, isHighlightedErrorType, ScrollToElementContext, useMdmAction, useMdmAuthoringItemsByEntityType, useMdmEntity, useMdmGlobalSearchRequestOptions, useMdmInitialConnection, useMdmInitialConnectionTempEntity, useMdmModifiedEntities, useMdmModifiedEntity, useMdmProfileErrors } from '../../contexts';
|
|
24
|
+
import { ConfigPermissionsContextProvider, isHighlightedErrorType, ScrollToElementContext, useMdmAction, useMdmAuthoringItemsByEntityType, useMdmEntity, useMdmGlobalSearchRequestOptions, useMdmInitialConnection, useMdmInitialConnectionTempEntity, useMdmModifiedEntities, useMdmModifiedEntity, useMdmProfileErrors, useMdmEntityUri } from '../../contexts';
|
|
25
25
|
import { useScrollToAttributeError } from '../../hooks';
|
|
26
26
|
import { useStyles } from './styles';
|
|
27
27
|
var areRelatedEntitiesChanged = function (initial, actual) {
|
|
@@ -57,13 +57,17 @@ var RelationEditor = function (_a) {
|
|
|
57
57
|
var globalSearchRequestOptions = useMdmGlobalSearchRequestOptions(['ovOnly']);
|
|
58
58
|
var profileErrors = useMdmProfileErrors();
|
|
59
59
|
var authoringItems = useMdmAuthoringItemsByEntityType(mainEntity === null || mainEntity === void 0 ? void 0 : mainEntity.type);
|
|
60
|
+
var mainEntityUri = useMdmEntityUri();
|
|
60
61
|
var error = getRelationEditorActiveError(connection, profileErrors);
|
|
62
|
+
var allRelationEditorErrors = getAllRelationEditorActiveErrors(connection, profileErrors);
|
|
61
63
|
var modifiedEntity = isTempEntity ? mdmModifiedEntity : null;
|
|
62
64
|
var allModifiedEntities = isTempEntity ? mdmAllModifiedEntities : null;
|
|
63
65
|
var _d = useScrollToAttributeError({ highlightedError: highlightedError, isSimple: true }), ref = _d.ref, errorClassName = _d.errorClassName;
|
|
64
66
|
var _e = useMemo(function () {
|
|
65
67
|
return getInOutRelations({
|
|
66
|
-
content: connection.parentEntityUri
|
|
68
|
+
content: connection.parentEntityUri
|
|
69
|
+
? config.contentSecondLevel
|
|
70
|
+
: config.content,
|
|
67
71
|
direction: direction,
|
|
68
72
|
relationType: relationType,
|
|
69
73
|
mode: mode,
|
|
@@ -116,11 +120,15 @@ var RelationEditor = function (_a) {
|
|
|
116
120
|
}
|
|
117
121
|
}, [config.id, relationUri, setRelationEntity, errorDeactivated, modifiedEntity, deleteModifiedEntity, error]);
|
|
118
122
|
var validate = useCallback(function () {
|
|
119
|
-
var errors = validateConnection(metadata, allModifiedEntities, connection)
|
|
123
|
+
var errors = validateConnection(metadata, allModifiedEntities, connection).map(function (error) { return (__assign(__assign({}, error), { path: pipe(evaluateErrorPath, map(when(propEq('type', AttributeValuePathItemType.relationConnection), assoc('viewId', config.id))))({
|
|
124
|
+
entityUri: mainEntityUri,
|
|
125
|
+
metadata: metadata,
|
|
126
|
+
connections: [connection],
|
|
127
|
+
entitiesMap: allModifiedEntities || {}
|
|
128
|
+
}, error.uri || error.parentUri) })); });
|
|
120
129
|
errorsSet(errors);
|
|
121
130
|
return errors.length === 0;
|
|
122
|
-
}, [connection, metadata, allModifiedEntities, errorsSet]);
|
|
123
|
-
var resetErrors = useCallback(function () { return errorsSet([]); }, [errorsSet]);
|
|
131
|
+
}, [connection, metadata, allModifiedEntities, errorsSet, mainEntityUri, config]);
|
|
124
132
|
var onApply = useCallback(pipe(always(connection), when(validate, pipe(omitMarks, updateModifiedEntityLabel, applyAction(config.id), always(differenceWith(equals, relatedTempEntitiesUrisHistory.current, relatedTempEntities.map(prop('uri')))), forEach(deleteModifiedEntity), handleClose))), [connection, config, updateModifiedEntityLabel, validate, relatedTempEntities]);
|
|
125
133
|
var onCancel = useCallback(function () {
|
|
126
134
|
if (modifiedEntity !== initialModifiedEntity) {
|
|
@@ -138,9 +146,19 @@ var RelationEditor = function (_a) {
|
|
|
138
146
|
var entitiesUrisToDelete = differenceWith(equals, relatedTempEntitiesUrisHistory.current, initialTempEntities.map(prop('uri')));
|
|
139
147
|
entitiesUrisToDelete.forEach(deleteModifiedEntity);
|
|
140
148
|
initialTempEntities.forEach(setModifiedEntity);
|
|
141
|
-
|
|
149
|
+
var filteredErrors = profileErrors.filter(function (profileError) { return !allRelationEditorErrors.some(function (error) { return getErrorId(error) === getErrorId(profileError); }); });
|
|
150
|
+
errorsSet(filteredErrors);
|
|
142
151
|
handleClose();
|
|
143
|
-
}, [
|
|
152
|
+
}, [
|
|
153
|
+
handleClose,
|
|
154
|
+
setModifiedEntity,
|
|
155
|
+
deleteModifiedEntity,
|
|
156
|
+
modifiedEntity,
|
|
157
|
+
initialModifiedEntity,
|
|
158
|
+
allRelationEditorErrors,
|
|
159
|
+
errorsSet,
|
|
160
|
+
profileErrors
|
|
161
|
+
]);
|
|
144
162
|
var onAddAttributes = useCallback(function (params) { return addAttributes(params.map(function (param) { return (__assign(__assign({}, param), { viewId: config.id })); })); }, [config.id, addAttributes]);
|
|
145
163
|
var onChangeAttribute = useCallback(function (params) { return modifyAttribute(__assign(__assign({}, params), { viewId: config.id })); }, [config.id, modifyAttribute]);
|
|
146
164
|
var onDeleteAttribute = useCallback(function (params) { return removeAttribute(__assign(__assign({}, params), { viewId: config.id })); }, [config.id, removeAttribute]);
|
|
@@ -30,6 +30,7 @@ export var PivotingTooltip = function (_a) {
|
|
|
30
30
|
var uri = _a.uri;
|
|
31
31
|
return uri === attributeType.uri;
|
|
32
32
|
});
|
|
33
|
+
var popupConfiguration = pivotingAttribute === null || pivotingAttribute === void 0 ? void 0 : pivotingAttribute.popup;
|
|
33
34
|
var convertPivotingValue = function () {
|
|
34
35
|
return Array.isArray(pivotingValue)
|
|
35
36
|
? convertNestedAttributePivotingValue(pivotingValue)
|
|
@@ -40,11 +41,11 @@ export var PivotingTooltip = function (_a) {
|
|
|
40
41
|
openPivotingPerspective({ value: generatedValue, attributeType: attributeType });
|
|
41
42
|
};
|
|
42
43
|
var _b = usePivotingDataLoader({
|
|
43
|
-
value: pivotingValue,
|
|
44
44
|
attributeType: attributeType,
|
|
45
|
-
|
|
45
|
+
value: pivotingValue,
|
|
46
|
+
entityType: popupConfiguration === null || popupConfiguration === void 0 ? void 0 : popupConfiguration.entityType
|
|
46
47
|
}), entities = _b.entities, total = _b.total, loadPivotingData = _b.loadPivotingData;
|
|
47
|
-
return isPivotingAttribute ? (React.createElement(Tooltip, { arrow: true, placement: "right-start", classes: styles, disableInteractive: false, onOpen: loadPivotingData, title: React.createElement(PivotingTooltipContent, { generatedValue: generatedValue, attributeType: attributeType,
|
|
48
|
+
return isPivotingAttribute ? (React.createElement(Tooltip, { arrow: true, placement: "right-start", classes: styles, disableInteractive: false, onOpen: loadPivotingData, title: React.createElement(PivotingTooltipContent, { generatedValue: generatedValue, attributeType: attributeType, label: popupConfiguration === null || popupConfiguration === void 0 ? void 0 : popupConfiguration.label, onSeeAllClick: handleSeeAllClick, entities: entities, total: total }) },
|
|
48
49
|
React.createElement("span", { className: className },
|
|
49
50
|
React.createElement(PivotingIcon, { className: contentStyles.icon }),
|
|
50
51
|
React.createElement(PivotingUriLink, { onClick: handleSeeAllClick, className: contentStyles.content, value: generatedValue, attributeType: attributeType }, children)))) : (React.createElement(React.Fragment, null, children));
|
|
@@ -2,12 +2,10 @@
|
|
|
2
2
|
import { AttributeType, Entity, PivotingValue } from '@reltio/mdm-sdk';
|
|
3
3
|
export type Props = {
|
|
4
4
|
attributeType: AttributeType;
|
|
5
|
-
|
|
6
|
-
label?: string;
|
|
7
|
-
};
|
|
5
|
+
label?: string;
|
|
8
6
|
entities: Entity[];
|
|
9
7
|
generatedValue: PivotingValue[];
|
|
10
8
|
onSeeAllClick: () => void;
|
|
11
9
|
total: number;
|
|
12
10
|
};
|
|
13
|
-
export declare const PivotingTooltipContent: ({ attributeType,
|
|
11
|
+
export declare const PivotingTooltipContent: ({ attributeType, label, entities, generatedValue, onSeeAllClick, total }: Props) => JSX.Element;
|
|
@@ -7,16 +7,16 @@ import PivotingUriLink from '../../PivotingUriLink/PivotingUriLink';
|
|
|
7
7
|
import { MAX_ENTITIES_PIVOTING_TOOLTIP } from '../../../hooks/usePivotingDataLoader/usePivotingDataLoader';
|
|
8
8
|
import { useStyles } from './styles';
|
|
9
9
|
export var PivotingTooltipContent = function (_a) {
|
|
10
|
-
var attributeType = _a.attributeType,
|
|
10
|
+
var attributeType = _a.attributeType, label = _a.label, entities = _a.entities, generatedValue = _a.generatedValue, onSeeAllClick = _a.onSeeAllClick, total = _a.total;
|
|
11
11
|
var styles = useStyles();
|
|
12
12
|
var shouldShowSeeAllButton = total > MAX_ENTITIES_PIVOTING_TOOLTIP;
|
|
13
|
-
var hasEntityTypeLabel = Boolean(
|
|
13
|
+
var hasEntityTypeLabel = Boolean(label);
|
|
14
14
|
return (React.createElement("div", { className: styles.container },
|
|
15
15
|
React.createElement("div", { className: styles.header },
|
|
16
16
|
React.createElement("div", { className: styles.title }, i18n.text('Pivot profiles')),
|
|
17
17
|
React.createElement("div", { className: styles.divider }),
|
|
18
18
|
React.createElement("div", { className: styles.headerCount }, i18n.number(total, '0,0') + ' ' + (total === 1 ? i18n.text('item') : i18n.text('items')))),
|
|
19
|
-
hasEntityTypeLabel && React.createElement("div", { className: styles.entityTypeLabel },
|
|
19
|
+
hasEntityTypeLabel && React.createElement("div", { className: styles.entityTypeLabel }, label),
|
|
20
20
|
React.createElement("div", { className: styles.body }, entities.map(function (visibleEntity) { return (React.createElement("div", { key: visibleEntity.uri, className: styles.entityContainer },
|
|
21
21
|
React.createElement(EntityAvatar, { entity: visibleEntity, avatarClassName: styles.profileIcon }),
|
|
22
22
|
React.createElement(EntityUriLink, { className: styles.entityLabel, value: getEntityUriForLink(visibleEntity) }, getLabel(visibleEntity.label)))); })),
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
3
|
-
type BarChartProps = ChartProps & {
|
|
4
|
-
options?: BarChartOptions;
|
|
5
|
-
};
|
|
2
|
+
import { BarChartProps } from '../types';
|
|
6
3
|
declare const BarChart: ({ width, height, data, options, onItemClick }: BarChartProps) => JSX.Element;
|
|
7
4
|
export default BarChart;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { BarChart, BarProps, CartesianGridProps, TooltipProps, XAxisProps, YAxisProps } from 'recharts';
|
|
3
|
-
import { BarChartOptions } from '
|
|
3
|
+
import { BarChartOptions } from '@reltio/mdm-sdk';
|
|
4
4
|
type BarChartSettings = {
|
|
5
5
|
barChart: React.ComponentProps<typeof BarChart>;
|
|
6
6
|
bar: Omit<BarProps, 'ref'>;
|
|
@@ -1,24 +1,10 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
type Props = ChartProps & {
|
|
5
|
-
options?: {
|
|
6
|
-
showLegend?: boolean;
|
|
7
|
-
margin?: LegendProps['margin'];
|
|
8
|
-
};
|
|
9
|
-
};
|
|
10
|
-
export declare const BubbleChart: ({ width, height, data, options, onItemClick }: Props) => JSX.Element;
|
|
2
|
+
import { BubbleChartProps } from '../types';
|
|
3
|
+
export declare const BubbleChart: ({ width, height, data, options, onItemClick }: BubbleChartProps) => JSX.Element;
|
|
11
4
|
declare const _default: {
|
|
12
|
-
({ data, ...otherProps }:
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
margin?: {
|
|
16
|
-
top?: number;
|
|
17
|
-
left?: number;
|
|
18
|
-
bottom?: number;
|
|
19
|
-
right?: number;
|
|
20
|
-
};
|
|
21
|
-
};
|
|
5
|
+
({ data, ...otherProps }: import("../types/charts").BaseChartProps & {
|
|
6
|
+
chartType?: import("@reltio/mdm-sdk").ChartType.BUBBLE;
|
|
7
|
+
options?: import("@reltio/mdm-sdk").BubbleChartOptions;
|
|
22
8
|
}): JSX.Element;
|
|
23
9
|
displayName: string;
|
|
24
10
|
};
|
|
@@ -18,30 +18,29 @@ import BubbleChart from './BubbleChart/BubbleChart';
|
|
|
18
18
|
import LineChart from './LineChart/LineChart';
|
|
19
19
|
import MapChart from './MapChart/MapChart';
|
|
20
20
|
import CloudChart from './CloudChart/CloudChart';
|
|
21
|
-
import {
|
|
21
|
+
import { ChartType } from '@reltio/mdm-sdk';
|
|
22
22
|
var ChartsFactory = /** @class */ (function () {
|
|
23
23
|
function ChartsFactory() {
|
|
24
24
|
}
|
|
25
|
-
ChartsFactory.build = function (
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
case ChartTypes.BAR:
|
|
25
|
+
ChartsFactory.build = function (props) {
|
|
26
|
+
switch (props.chartType) {
|
|
27
|
+
case ChartType.BAR:
|
|
29
28
|
return React.createElement(BarChart, __assign({}, props));
|
|
30
|
-
case
|
|
31
|
-
return React.createElement(PieChart, __assign({
|
|
32
|
-
case
|
|
29
|
+
case ChartType.DONUT:
|
|
30
|
+
return React.createElement(PieChart, __assign({ isDonut: true }, props));
|
|
31
|
+
case ChartType.PIE:
|
|
33
32
|
return React.createElement(PieChart, __assign({}, props));
|
|
34
|
-
case
|
|
33
|
+
case ChartType.TREE:
|
|
35
34
|
return React.createElement(TreeChart, __assign({}, props));
|
|
36
|
-
case
|
|
35
|
+
case ChartType.TABLE:
|
|
37
36
|
return React.createElement(TableWithBars, __assign({}, props));
|
|
38
|
-
case
|
|
37
|
+
case ChartType.BUBBLE:
|
|
39
38
|
return React.createElement(BubbleChart, __assign({}, props));
|
|
40
|
-
case
|
|
39
|
+
case ChartType.LINE:
|
|
41
40
|
return React.createElement(LineChart, __assign({}, props));
|
|
42
|
-
case
|
|
41
|
+
case ChartType.MAP:
|
|
43
42
|
return React.createElement(MapChart, __assign({}, props));
|
|
44
|
-
case
|
|
43
|
+
case ChartType.CLOUD:
|
|
45
44
|
return React.createElement(CloudChart, __assign({}, props));
|
|
46
45
|
default:
|
|
47
46
|
return React.createElement("div", null);
|
|
@@ -1,16 +1,10 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
options?: {
|
|
5
|
-
maxFontSize?: number;
|
|
6
|
-
};
|
|
7
|
-
};
|
|
8
|
-
export declare const CloudChart: ({ width, height, data, options, onItemClick }: Props) => JSX.Element;
|
|
2
|
+
import { CloudChartProps } from '../types';
|
|
3
|
+
export declare const CloudChart: ({ width, height, data, options, onItemClick }: CloudChartProps) => JSX.Element;
|
|
9
4
|
declare const _default: {
|
|
10
|
-
({ data, ...otherProps }:
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
};
|
|
5
|
+
({ data, ...otherProps }: import("../types/charts").BaseChartProps & {
|
|
6
|
+
chartType?: import("@reltio/mdm-sdk").ChartType.CLOUD;
|
|
7
|
+
options?: import("@reltio/mdm-sdk").CloudChartOptions;
|
|
14
8
|
}): JSX.Element;
|
|
15
9
|
displayName: string;
|
|
16
10
|
};
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
3
|
-
type LineChartProps = ChartProps & {
|
|
4
|
-
options?: LineChartOptions;
|
|
5
|
-
};
|
|
2
|
+
import { LineChartProps } from '../types';
|
|
6
3
|
declare const LineChart: ({ width, height, data, options, onItemClick }: LineChartProps) => JSX.Element;
|
|
7
4
|
export default LineChart;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { LineChartOptions } from '@reltio/mdm-sdk';
|
|
2
3
|
import { CartesianGridProps, LineChart, LineProps, TooltipProps, XAxisProps, YAxisProps } from 'recharts';
|
|
3
|
-
import { LineChartOptions } from '../types/LineChartOptions';
|
|
4
4
|
type LineChartSettings = {
|
|
5
5
|
lineChart: React.ComponentProps<typeof LineChart>;
|
|
6
6
|
xAxis: XAxisProps;
|
|
@@ -1,23 +1,11 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
3
|
-
type Props = ChartProps & {
|
|
4
|
-
options?: {
|
|
5
|
-
geoUrl?: string;
|
|
6
|
-
projection?: string;
|
|
7
|
-
geoIdName?: string;
|
|
8
|
-
showLegend?: boolean;
|
|
9
|
-
};
|
|
10
|
-
};
|
|
2
|
+
import { MapChartProps } from '../types';
|
|
11
3
|
export declare const LEGEND_WIDTH = 75;
|
|
12
|
-
export declare const MapChart: ({ data, width, height, options, onItemClick }:
|
|
4
|
+
export declare const MapChart: ({ data, width, height, options, onItemClick }: MapChartProps) => JSX.Element;
|
|
13
5
|
declare const _default: {
|
|
14
|
-
({ data, ...otherProps }:
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
projection?: string;
|
|
18
|
-
geoIdName?: string;
|
|
19
|
-
showLegend?: boolean;
|
|
20
|
-
};
|
|
6
|
+
({ data, ...otherProps }: import("../types/charts").BaseChartProps & {
|
|
7
|
+
chartType?: import("@reltio/mdm-sdk").ChartType.MAP;
|
|
8
|
+
options?: import("@reltio/mdm-sdk").MapChartOptions;
|
|
21
9
|
}): JSX.Element;
|
|
22
10
|
displayName: string;
|
|
23
11
|
};
|
|
@@ -30,9 +30,9 @@ var USA_MAP = 'https://s3.amazonaws.com/reltio-ui-files/map_resources/us-albers.
|
|
|
30
30
|
var MAP_COLORS = ['#CDE0FE', '#0160AD'];
|
|
31
31
|
export var LEGEND_WIDTH = 75;
|
|
32
32
|
export var MapChart = function (_a) {
|
|
33
|
-
var data = _a.data, width = _a.width, height = _a.height,
|
|
33
|
+
var data = _a.data, width = _a.width, height = _a.height, _b = _a.options, options = _b === void 0 ? {} : _b, onItemClick = _a.onItemClick;
|
|
34
34
|
var styles = useStyles();
|
|
35
|
-
var
|
|
35
|
+
var geoUrl = options.geoUrl, geoIdName = options.geoIdName, _c = options.showLegend, showLegend = _c === void 0 ? true : _c;
|
|
36
36
|
var values = pluck('value', data);
|
|
37
37
|
var minValue = Math.min.apply(Math, values);
|
|
38
38
|
var maxValue = Math.max.apply(Math, values);
|
|
@@ -1,23 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
type Props = ChartProps & {
|
|
5
|
-
options?: {
|
|
6
|
-
margin?: React.ComponentProps<typeof PieChartWidget>['margin'];
|
|
7
|
-
showLegend?: boolean;
|
|
8
|
-
showActiveShape?: boolean;
|
|
9
|
-
};
|
|
10
|
-
isDonut?: boolean;
|
|
11
|
-
};
|
|
12
|
-
export declare const PieChart: ({ width, height, data, options, isDonut, onItemClick }: Props) => JSX.Element;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { PieChartProps } from '../types';
|
|
3
|
+
export declare const PieChart: ({ width, height, data, options, isDonut, onItemClick }: PieChartProps) => JSX.Element;
|
|
13
4
|
declare const _default: {
|
|
14
|
-
({ data, ...otherProps }:
|
|
15
|
-
|
|
16
|
-
margin?: import("recharts/types/util/types").Margin;
|
|
17
|
-
showLegend?: boolean;
|
|
18
|
-
showActiveShape?: boolean;
|
|
19
|
-
};
|
|
5
|
+
({ data, ...otherProps }: import("../types/charts").BaseChartProps & {
|
|
6
|
+
chartType?: import("@reltio/mdm-sdk").ChartType.DONUT | import("@reltio/mdm-sdk").ChartType.PIE;
|
|
20
7
|
isDonut?: boolean;
|
|
8
|
+
options?: import("@reltio/mdm-sdk").PieChartOptions;
|
|
21
9
|
}): JSX.Element;
|
|
22
10
|
displayName: string;
|
|
23
11
|
};
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
type TableWithBarsProps = ChartProps & {
|
|
4
|
-
options?: TableWithBarsOptions;
|
|
5
|
-
basicTableRef?: React.MutableRefObject<any> | null;
|
|
6
|
-
};
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { TableWithBarsProps } from '../types';
|
|
7
3
|
declare const TableWithBars: ({ width, height, data, options, basicTableRef, onItemClick }: TableWithBarsProps) => JSX.Element;
|
|
8
4
|
export default TableWithBars;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
3
|
-
declare const TreeChart: ({ data, width, height, onItemClick }:
|
|
2
|
+
import { TreeChartProps } from '../types';
|
|
3
|
+
declare const TreeChart: ({ data, width, height, onItemClick }: TreeChartProps) => JSX.Element;
|
|
4
4
|
export default TreeChart;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
import { ChartType, BarChartOptions, BubbleChartOptions, ChartOptions, CloudChartOptions, LineChartOptions, MapChartOptions, PieChartOptions, TableWithBarsOptions } from '@reltio/mdm-sdk';
|
|
3
|
+
export type ChartData = {
|
|
4
|
+
value: number;
|
|
5
|
+
label: string;
|
|
6
|
+
group: string;
|
|
7
|
+
localizedValue?: string;
|
|
8
|
+
percent?: number;
|
|
9
|
+
};
|
|
10
|
+
export type BaseChartProps = {
|
|
11
|
+
data: ChartData[];
|
|
12
|
+
width: number;
|
|
13
|
+
height: number;
|
|
14
|
+
onItemClick?: (group: string) => void;
|
|
15
|
+
chartType?: ChartType;
|
|
16
|
+
options?: ChartOptions;
|
|
17
|
+
};
|
|
18
|
+
export type BarChartProps = BaseChartProps & {
|
|
19
|
+
chartType?: ChartType.BAR;
|
|
20
|
+
options?: BarChartOptions;
|
|
21
|
+
};
|
|
22
|
+
export type PieChartProps = BaseChartProps & {
|
|
23
|
+
chartType?: ChartType.PIE | ChartType.DONUT;
|
|
24
|
+
isDonut?: boolean;
|
|
25
|
+
options?: PieChartOptions;
|
|
26
|
+
};
|
|
27
|
+
export type TreeChartProps = BaseChartProps & {
|
|
28
|
+
chartType?: ChartType.TREE;
|
|
29
|
+
};
|
|
30
|
+
export type TableWithBarsProps = BaseChartProps & {
|
|
31
|
+
chartType?: ChartType.TABLE;
|
|
32
|
+
basicTableRef?: RefObject<HTMLDivElement>;
|
|
33
|
+
options?: TableWithBarsOptions;
|
|
34
|
+
};
|
|
35
|
+
export type BubbleChartProps = BaseChartProps & {
|
|
36
|
+
chartType?: ChartType.BUBBLE;
|
|
37
|
+
options?: BubbleChartOptions;
|
|
38
|
+
};
|
|
39
|
+
export type LineChartProps = BaseChartProps & {
|
|
40
|
+
chartType?: ChartType.LINE;
|
|
41
|
+
options?: LineChartOptions;
|
|
42
|
+
};
|
|
43
|
+
export type MapChartProps = BaseChartProps & {
|
|
44
|
+
chartType?: ChartType.MAP;
|
|
45
|
+
options?: MapChartOptions;
|
|
46
|
+
};
|
|
47
|
+
export type CloudChartProps = BaseChartProps & {
|
|
48
|
+
chartType?: ChartType.CLOUD;
|
|
49
|
+
options?: CloudChartOptions;
|
|
50
|
+
};
|
|
51
|
+
export type ChartProps = BarChartProps | PieChartProps | TreeChartProps | TableWithBarsProps | BubbleChartProps | LineChartProps | MapChartProps | CloudChartProps;
|
|
@@ -1,5 +1 @@
|
|
|
1
|
-
export type { ChartData } from './
|
|
2
|
-
export type { BarChartOptions } from './BarChartOptions';
|
|
3
|
-
export type { ChartProps } from './ChartProps';
|
|
4
|
-
export type { TableWithBarsOptions } from './TableWithBarsOptions';
|
|
5
|
-
export type { LineChartOptions } from './LineChartOptions';
|
|
1
|
+
export type { ChartData, ChartProps, BarChartProps, BubbleChartProps, PieChartProps, TableWithBarsProps, TreeChartProps, LineChartProps, MapChartProps, CloudChartProps } from './charts';
|