@reltio/components 1.4.1873 → 1.4.1874
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/ModeSwitcherSelect/ModeSwitcherSelect.d.ts +2 -1
- package/cjs/components/ModeSwitcherSelect/ModeSwitcherSelect.js +3 -3
- package/cjs/components/ModeSwitcherSelect/styles.d.ts +1 -1
- package/cjs/components/ModeSwitcherSelect/styles.js +14 -3
- package/cjs/components/workflow/components/ReassignButton/ReassignButton.d.ts +2 -1
- package/cjs/components/workflow/components/ReassignButton/ReassignButton.js +2 -2
- package/cjs/constants/index.d.ts +1 -0
- package/cjs/constants/index.js +5 -1
- package/cjs/constants/modeOptions.d.ts +24 -0
- package/cjs/constants/modeOptions.js +29 -0
- package/cjs/icons/Suggest.d.ts +3 -0
- package/cjs/icons/Suggest.js +27 -0
- package/esm/components/ModeSwitcherSelect/ModeSwitcherSelect.d.ts +2 -1
- package/esm/components/ModeSwitcherSelect/ModeSwitcherSelect.js +3 -3
- package/esm/components/ModeSwitcherSelect/styles.d.ts +1 -1
- package/esm/components/ModeSwitcherSelect/styles.js +14 -3
- package/esm/components/workflow/components/ReassignButton/ReassignButton.d.ts +2 -1
- package/esm/components/workflow/components/ReassignButton/ReassignButton.js +2 -2
- package/esm/constants/index.d.ts +1 -0
- package/esm/constants/index.js +1 -0
- package/esm/constants/modeOptions.d.ts +24 -0
- package/esm/constants/modeOptions.js +23 -0
- package/esm/icons/Suggest.d.ts +3 -0
- package/esm/icons/Suggest.js +22 -0
- package/package.json +1 -1
|
@@ -14,6 +14,7 @@ type ModeSwitcherSelectProps = {
|
|
|
14
14
|
value: string;
|
|
15
15
|
onChange?: (value: string) => void;
|
|
16
16
|
disabled?: boolean;
|
|
17
|
+
variant?: 'normal' | 'thin';
|
|
17
18
|
};
|
|
18
|
-
export declare const ModeSwitcherSelect: ({ optionsGroup, buttonsGroup, value, onChange, disabled }: ModeSwitcherSelectProps) => JSX.Element;
|
|
19
|
+
export declare const ModeSwitcherSelect: ({ optionsGroup, buttonsGroup, value, onChange, disabled, variant }: ModeSwitcherSelectProps) => JSX.Element;
|
|
19
20
|
export {};
|
|
@@ -35,7 +35,7 @@ var Tooltip_1 = __importDefault(require("@mui/material/Tooltip"));
|
|
|
35
35
|
var styles_1 = require("./styles");
|
|
36
36
|
var isButton = function (value) { return 'onClick' in value; };
|
|
37
37
|
var ModeSwitcherSelect = function (_a) {
|
|
38
|
-
var _b = _a.optionsGroup, optionsGroup = _b === void 0 ? [] : _b, _c = _a.buttonsGroup, buttonsGroup = _c === void 0 ? [] : _c, value = _a.value, onChange = _a.onChange, _d = _a.disabled, disabled = _d === void 0 ? false : _d;
|
|
38
|
+
var _b = _a.optionsGroup, optionsGroup = _b === void 0 ? [] : _b, _c = _a.buttonsGroup, buttonsGroup = _c === void 0 ? [] : _c, value = _a.value, onChange = _a.onChange, _d = _a.disabled, disabled = _d === void 0 ? false : _d, _e = _a.variant, variant = _e === void 0 ? 'normal' : _e;
|
|
39
39
|
var styles = (0, styles_1.useStyles)();
|
|
40
40
|
var handleChange = function (e) {
|
|
41
41
|
var value = e.target.value;
|
|
@@ -67,8 +67,8 @@ var ModeSwitcherSelect = function (_a) {
|
|
|
67
67
|
});
|
|
68
68
|
};
|
|
69
69
|
return (react_1.default.createElement(Select_1.default, { classes: {
|
|
70
|
-
select: styles.root,
|
|
71
|
-
icon: styles.arrowIcon,
|
|
70
|
+
select: (0, classnames_1.default)(styles.root, styles[variant]),
|
|
71
|
+
icon: (0, classnames_1.default)(styles.arrowIcon, styles[variant]),
|
|
72
72
|
outlined: styles.outlined
|
|
73
73
|
}, value: value, onChange: handleChange, variant: "outlined", renderValue: function (value) {
|
|
74
74
|
var _a = optionsGroup.find((0, ramda_1.propEq)('value', value)) || {}, IconComponent = _a.icon, _b = _a.label, label = _b === void 0 ? value : _b;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"outlined" | "root" | "menuItem" | "arrowIcon" | "currentValue" | "currentValueIcon" | "currentValueText" | "firstMenuItemButton" | "menuItemInner" | "menuItemIcon" | "menuItemLabel" | "menuItemDescription">;
|
|
1
|
+
export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"normal" | "thin" | "outlined" | "root" | "menuItem" | "arrowIcon" | "currentValue" | "currentValueIcon" | "currentValueText" | "firstMenuItemButton" | "menuItemInner" | "menuItemIcon" | "menuItemLabel" | "menuItemDescription">;
|
|
@@ -7,12 +7,20 @@ var SELECT_PADDING_RIGHT = 32;
|
|
|
7
7
|
var SELECT_PADDING_LEFT = 12;
|
|
8
8
|
var CALCULATED_MAX_WIDTH_SELECT = MAX_WIDTH_SELECT - SELECT_PADDING_LEFT - SELECT_PADDING_RIGHT;
|
|
9
9
|
exports.useStyles = (0, styles_1.makeStyles)(function (theme) { return ({
|
|
10
|
+
normal: {},
|
|
11
|
+
thin: {},
|
|
10
12
|
root: {
|
|
11
13
|
maxWidth: CALCULATED_MAX_WIDTH_SELECT,
|
|
12
|
-
paddingTop: '9px',
|
|
13
|
-
paddingBottom: '9px',
|
|
14
14
|
'&$outlined': {
|
|
15
15
|
minHeight: '1.1876em'
|
|
16
|
+
},
|
|
17
|
+
'&$normal': {
|
|
18
|
+
paddingTop: '9px',
|
|
19
|
+
paddingBottom: '9px'
|
|
20
|
+
},
|
|
21
|
+
'&$thin': {
|
|
22
|
+
paddingTop: '6px',
|
|
23
|
+
paddingBottom: '6px'
|
|
16
24
|
}
|
|
17
25
|
},
|
|
18
26
|
outlined: {
|
|
@@ -23,7 +31,10 @@ exports.useStyles = (0, styles_1.makeStyles)(function (theme) { return ({
|
|
|
23
31
|
fontSize: '18px',
|
|
24
32
|
top: 'calc(50% - 9px)',
|
|
25
33
|
right: '12px',
|
|
26
|
-
color: theme.palette.text.secondary
|
|
34
|
+
color: theme.palette.text.secondary,
|
|
35
|
+
'&$thin': {
|
|
36
|
+
right: '8px'
|
|
37
|
+
}
|
|
27
38
|
},
|
|
28
39
|
currentValue: {
|
|
29
40
|
display: 'flex',
|
|
@@ -4,6 +4,7 @@ type Props = {
|
|
|
4
4
|
disabled?: boolean;
|
|
5
5
|
task?: WorkflowTaskData;
|
|
6
6
|
onChangeTask?: (task: WorkflowTaskData) => void;
|
|
7
|
+
className?: string;
|
|
7
8
|
};
|
|
8
|
-
declare const ReassignButton: ({ disabled, changeRequestURI, task, onChangeTask }: Props) => JSX.Element;
|
|
9
|
+
declare const ReassignButton: ({ disabled, changeRequestURI, task, onChangeTask, className }: Props) => JSX.Element;
|
|
9
10
|
export default ReassignButton;
|
|
@@ -32,7 +32,7 @@ var SmallIconButton_1 = require("../../../../SmallIconButton");
|
|
|
32
32
|
var Reassign_1 = __importDefault(require("../../../../icons/Reassign"));
|
|
33
33
|
var ReassignDialog_1 = __importDefault(require("./ReassignDialog"));
|
|
34
34
|
var ReassignButton = function (_a) {
|
|
35
|
-
var disabled = _a.disabled, changeRequestURI = _a.changeRequestURI, task = _a.task, onChangeTask = _a.onChangeTask;
|
|
35
|
+
var disabled = _a.disabled, changeRequestURI = _a.changeRequestURI, task = _a.task, onChangeTask = _a.onChangeTask, className = _a.className;
|
|
36
36
|
var _b = (0, react_1.useState)(false), isDialogOpen = _b[0], setIsDialogOpen = _b[1];
|
|
37
37
|
var handleOpenDialog = function () {
|
|
38
38
|
setIsDialogOpen(true);
|
|
@@ -41,7 +41,7 @@ var ReassignButton = function (_a) {
|
|
|
41
41
|
setIsDialogOpen(false);
|
|
42
42
|
};
|
|
43
43
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
44
|
-
react_1.default.createElement(SmallIconButton_1.SmallIconButtonWithTooltip, { "data-reltio-id": "reltio-reassign-button", showForDisabled: true, tooltipTitle: ui_i18n_1.default.text('Reassign task'), "aria-label": ui_i18n_1.default.text('Reassign task'), icon: Reassign_1.default, onClick: handleOpenDialog, size: "L", disabled: disabled || !changeRequestURI }),
|
|
44
|
+
react_1.default.createElement(SmallIconButton_1.SmallIconButtonWithTooltip, { className: className, "data-reltio-id": "reltio-reassign-button", showForDisabled: true, tooltipTitle: ui_i18n_1.default.text('Reassign task'), "aria-label": ui_i18n_1.default.text('Reassign task'), icon: Reassign_1.default, onClick: handleOpenDialog, size: "L", disabled: disabled || !changeRequestURI }),
|
|
45
45
|
react_1.default.createElement(ReassignDialog_1.default, { isOpen: isDialogOpen, onClose: handleCloseDialog, task: task, onChangeTask: onChangeTask })));
|
|
46
46
|
};
|
|
47
47
|
exports.default = ReassignButton;
|
package/cjs/constants/index.d.ts
CHANGED
|
@@ -4,3 +4,4 @@ export { ALWAYS_VISIBLE_TYPE_URIS } from './attributes';
|
|
|
4
4
|
export { MAP_DRAWING_MODES, DEFAULT_GOOGLE_MAP_OPTIONS, DEFAULT_OVERLAY_OPTIONS, MAP_MINIMUM_SCALE_RADIUS } from './map';
|
|
5
5
|
export { COMMON_TEXT_FIELD_PROPS } from './textField';
|
|
6
6
|
export { POPUP_Z_INDEX } from './common';
|
|
7
|
+
export { editingModeOption, suggestingModeOption, viewingModeOption } from './modeOptions';
|
package/cjs/constants/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.POPUP_Z_INDEX = exports.COMMON_TEXT_FIELD_PROPS = exports.MAP_MINIMUM_SCALE_RADIUS = exports.DEFAULT_OVERLAY_OPTIONS = exports.DEFAULT_GOOGLE_MAP_OPTIONS = exports.MAP_DRAWING_MODES = exports.ALWAYS_VISIBLE_TYPE_URIS = exports.COMMENTS_CONTAINER_VISIBILITY_AREA = exports.QueryBuilderAttributeType = exports.SortingType = void 0;
|
|
3
|
+
exports.viewingModeOption = exports.suggestingModeOption = exports.editingModeOption = exports.POPUP_Z_INDEX = exports.COMMON_TEXT_FIELD_PROPS = exports.MAP_MINIMUM_SCALE_RADIUS = exports.DEFAULT_OVERLAY_OPTIONS = exports.DEFAULT_GOOGLE_MAP_OPTIONS = exports.MAP_DRAWING_MODES = exports.ALWAYS_VISIBLE_TYPE_URIS = exports.COMMENTS_CONTAINER_VISIBILITY_AREA = exports.QueryBuilderAttributeType = exports.SortingType = void 0;
|
|
4
4
|
var prop_types_1 = require("./prop-types");
|
|
5
5
|
Object.defineProperty(exports, "SortingType", { enumerable: true, get: function () { return prop_types_1.SortingType; } });
|
|
6
6
|
Object.defineProperty(exports, "QueryBuilderAttributeType", { enumerable: true, get: function () { return prop_types_1.QueryBuilderAttributeType; } });
|
|
@@ -17,3 +17,7 @@ var textField_1 = require("./textField");
|
|
|
17
17
|
Object.defineProperty(exports, "COMMON_TEXT_FIELD_PROPS", { enumerable: true, get: function () { return textField_1.COMMON_TEXT_FIELD_PROPS; } });
|
|
18
18
|
var common_1 = require("./common");
|
|
19
19
|
Object.defineProperty(exports, "POPUP_Z_INDEX", { enumerable: true, get: function () { return common_1.POPUP_Z_INDEX; } });
|
|
20
|
+
var modeOptions_1 = require("./modeOptions");
|
|
21
|
+
Object.defineProperty(exports, "editingModeOption", { enumerable: true, get: function () { return modeOptions_1.editingModeOption; } });
|
|
22
|
+
Object.defineProperty(exports, "suggestingModeOption", { enumerable: true, get: function () { return modeOptions_1.suggestingModeOption; } });
|
|
23
|
+
Object.defineProperty(exports, "viewingModeOption", { enumerable: true, get: function () { return modeOptions_1.viewingModeOption; } });
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Mode } from '@reltio/mdm-sdk';
|
|
3
|
+
export declare const editingModeOption: {
|
|
4
|
+
label: string;
|
|
5
|
+
value: Mode;
|
|
6
|
+
description: string;
|
|
7
|
+
icon: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").SvgIconTypeMap<{}, "svg">> & {
|
|
8
|
+
muiName: string;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export declare const suggestingModeOption: {
|
|
12
|
+
label: string;
|
|
13
|
+
value: Mode;
|
|
14
|
+
description: string;
|
|
15
|
+
icon: import("react").FC<import("react").SVGProps<SVGSVGElement>>;
|
|
16
|
+
};
|
|
17
|
+
export declare const viewingModeOption: {
|
|
18
|
+
label: string;
|
|
19
|
+
value: Mode;
|
|
20
|
+
description: string;
|
|
21
|
+
icon: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").SvgIconTypeMap<{}, "svg">> & {
|
|
22
|
+
muiName: string;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.viewingModeOption = exports.suggestingModeOption = exports.editingModeOption = void 0;
|
|
7
|
+
var ui_i18n_1 = __importDefault(require("ui-i18n"));
|
|
8
|
+
var mdm_sdk_1 = require("@reltio/mdm-sdk");
|
|
9
|
+
var Create_1 = __importDefault(require("@mui/icons-material/Create"));
|
|
10
|
+
var Visibility_1 = __importDefault(require("@mui/icons-material/Visibility"));
|
|
11
|
+
var Suggest_1 = __importDefault(require("../icons/Suggest"));
|
|
12
|
+
exports.editingModeOption = {
|
|
13
|
+
label: ui_i18n_1.default.text('Editing'),
|
|
14
|
+
value: mdm_sdk_1.Mode.Editing,
|
|
15
|
+
description: ui_i18n_1.default.text('Edit profile directly'),
|
|
16
|
+
icon: Create_1.default
|
|
17
|
+
};
|
|
18
|
+
exports.suggestingModeOption = {
|
|
19
|
+
label: ui_i18n_1.default.text('Suggesting'),
|
|
20
|
+
value: mdm_sdk_1.Mode.Suggesting,
|
|
21
|
+
description: ui_i18n_1.default.text('Suggest changes and initiate a workflow review'),
|
|
22
|
+
icon: Suggest_1.default
|
|
23
|
+
};
|
|
24
|
+
exports.viewingModeOption = {
|
|
25
|
+
label: ui_i18n_1.default.text('Viewing'),
|
|
26
|
+
value: mdm_sdk_1.Mode.Viewing,
|
|
27
|
+
description: ui_i18n_1.default.text('Read or print profile'),
|
|
28
|
+
icon: Visibility_1.default
|
|
29
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
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
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
var react_1 = __importDefault(require("react"));
|
|
18
|
+
var SvgSuggest = function (props) {
|
|
19
|
+
return (react_1.default.createElement("svg", __assign({ width: 19, height: 17, viewBox: "0 0 19 17", xmlns: "http://www.w3.org/2000/svg", xmlnsXlink: "http://www.w3.org/1999/xlink" }, props),
|
|
20
|
+
react_1.default.createElement("defs", null,
|
|
21
|
+
react_1.default.createElement("path", { d: "M14 17v2H4v-2h10zm6-4v2H4v-2l12.884.001H17l.116-.002L20 13zm-8.457-2H4V9h5.82a8.465 8.465 0 001.723 2zM9.139 6.178l-.289.733.035.088L4 7V5l5.713-.002c-.22.375-.412.768-.574 1.18zM17 2.82a6.451 6.451 0 00-6 4.09 6.451 6.451 0 006 4.092 6.451 6.451 0 006-4.091 6.451 6.451 0 00-6-4.091zm0 6.815a2.728 2.728 0 010-5.455 2.728 2.728 0 010 5.455zm0-4.365c-.905 0-1.636.73-1.636 1.636 0 .906.73 1.637 1.636 1.637.905 0 1.636-.731 1.636-1.637 0-.905-.73-1.636-1.636-1.636z", id: "Suggest_svg__a" })),
|
|
22
|
+
react_1.default.createElement("g", { transform: "translate(-4 -2.5)", stroke: "none", strokeWidth: 1, fill: "none", fillRule: "evenodd" },
|
|
23
|
+
react_1.default.createElement("mask", { id: "Suggest_svg__b", fill: "#fff" },
|
|
24
|
+
react_1.default.createElement("use", { xlinkHref: "#Suggest_svg__a" })),
|
|
25
|
+
react_1.default.createElement("path", { fillOpacity: 0.54, fill: "#000", mask: "url(#Suggest_svg__b)", d: "M0 0h24v24H0z" }))));
|
|
26
|
+
};
|
|
27
|
+
exports.default = SvgSuggest;
|
|
@@ -14,6 +14,7 @@ type ModeSwitcherSelectProps = {
|
|
|
14
14
|
value: string;
|
|
15
15
|
onChange?: (value: string) => void;
|
|
16
16
|
disabled?: boolean;
|
|
17
|
+
variant?: 'normal' | 'thin';
|
|
17
18
|
};
|
|
18
|
-
export declare const ModeSwitcherSelect: ({ optionsGroup, buttonsGroup, value, onChange, disabled }: ModeSwitcherSelectProps) => JSX.Element;
|
|
19
|
+
export declare const ModeSwitcherSelect: ({ optionsGroup, buttonsGroup, value, onChange, disabled, variant }: ModeSwitcherSelectProps) => JSX.Element;
|
|
19
20
|
export {};
|
|
@@ -29,7 +29,7 @@ import Tooltip from '@mui/material/Tooltip';
|
|
|
29
29
|
import { useStyles } from './styles';
|
|
30
30
|
var isButton = function (value) { return 'onClick' in value; };
|
|
31
31
|
export var ModeSwitcherSelect = function (_a) {
|
|
32
|
-
var _b = _a.optionsGroup, optionsGroup = _b === void 0 ? [] : _b, _c = _a.buttonsGroup, buttonsGroup = _c === void 0 ? [] : _c, value = _a.value, onChange = _a.onChange, _d = _a.disabled, disabled = _d === void 0 ? false : _d;
|
|
32
|
+
var _b = _a.optionsGroup, optionsGroup = _b === void 0 ? [] : _b, _c = _a.buttonsGroup, buttonsGroup = _c === void 0 ? [] : _c, value = _a.value, onChange = _a.onChange, _d = _a.disabled, disabled = _d === void 0 ? false : _d, _e = _a.variant, variant = _e === void 0 ? 'normal' : _e;
|
|
33
33
|
var styles = useStyles();
|
|
34
34
|
var handleChange = function (e) {
|
|
35
35
|
var value = e.target.value;
|
|
@@ -61,8 +61,8 @@ export var ModeSwitcherSelect = function (_a) {
|
|
|
61
61
|
});
|
|
62
62
|
};
|
|
63
63
|
return (React.createElement(Select, { classes: {
|
|
64
|
-
select: styles.root,
|
|
65
|
-
icon: styles.arrowIcon,
|
|
64
|
+
select: classnames(styles.root, styles[variant]),
|
|
65
|
+
icon: classnames(styles.arrowIcon, styles[variant]),
|
|
66
66
|
outlined: styles.outlined
|
|
67
67
|
}, value: value, onChange: handleChange, variant: "outlined", renderValue: function (value) {
|
|
68
68
|
var _a = optionsGroup.find(propEq('value', value)) || {}, IconComponent = _a.icon, _b = _a.label, label = _b === void 0 ? value : _b;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"outlined" | "root" | "menuItem" | "arrowIcon" | "currentValue" | "currentValueIcon" | "currentValueText" | "firstMenuItemButton" | "menuItemInner" | "menuItemIcon" | "menuItemLabel" | "menuItemDescription">;
|
|
1
|
+
export declare const useStyles: (props?: any) => import("@mui/styles").ClassNameMap<"normal" | "thin" | "outlined" | "root" | "menuItem" | "arrowIcon" | "currentValue" | "currentValueIcon" | "currentValueText" | "firstMenuItemButton" | "menuItemInner" | "menuItemIcon" | "menuItemLabel" | "menuItemDescription">;
|
|
@@ -4,12 +4,20 @@ var SELECT_PADDING_RIGHT = 32;
|
|
|
4
4
|
var SELECT_PADDING_LEFT = 12;
|
|
5
5
|
var CALCULATED_MAX_WIDTH_SELECT = MAX_WIDTH_SELECT - SELECT_PADDING_LEFT - SELECT_PADDING_RIGHT;
|
|
6
6
|
export var useStyles = makeStyles(function (theme) { return ({
|
|
7
|
+
normal: {},
|
|
8
|
+
thin: {},
|
|
7
9
|
root: {
|
|
8
10
|
maxWidth: CALCULATED_MAX_WIDTH_SELECT,
|
|
9
|
-
paddingTop: '9px',
|
|
10
|
-
paddingBottom: '9px',
|
|
11
11
|
'&$outlined': {
|
|
12
12
|
minHeight: '1.1876em'
|
|
13
|
+
},
|
|
14
|
+
'&$normal': {
|
|
15
|
+
paddingTop: '9px',
|
|
16
|
+
paddingBottom: '9px'
|
|
17
|
+
},
|
|
18
|
+
'&$thin': {
|
|
19
|
+
paddingTop: '6px',
|
|
20
|
+
paddingBottom: '6px'
|
|
13
21
|
}
|
|
14
22
|
},
|
|
15
23
|
outlined: {
|
|
@@ -20,7 +28,10 @@ export var useStyles = makeStyles(function (theme) { return ({
|
|
|
20
28
|
fontSize: '18px',
|
|
21
29
|
top: 'calc(50% - 9px)',
|
|
22
30
|
right: '12px',
|
|
23
|
-
color: theme.palette.text.secondary
|
|
31
|
+
color: theme.palette.text.secondary,
|
|
32
|
+
'&$thin': {
|
|
33
|
+
right: '8px'
|
|
34
|
+
}
|
|
24
35
|
},
|
|
25
36
|
currentValue: {
|
|
26
37
|
display: 'flex',
|
|
@@ -4,6 +4,7 @@ type Props = {
|
|
|
4
4
|
disabled?: boolean;
|
|
5
5
|
task?: WorkflowTaskData;
|
|
6
6
|
onChangeTask?: (task: WorkflowTaskData) => void;
|
|
7
|
+
className?: string;
|
|
7
8
|
};
|
|
8
|
-
declare const ReassignButton: ({ disabled, changeRequestURI, task, onChangeTask }: Props) => JSX.Element;
|
|
9
|
+
declare const ReassignButton: ({ disabled, changeRequestURI, task, onChangeTask, className }: Props) => JSX.Element;
|
|
9
10
|
export default ReassignButton;
|
|
@@ -4,7 +4,7 @@ import { SmallIconButtonWithTooltip } from '../../../../SmallIconButton';
|
|
|
4
4
|
import ReassignIcon from '../../../../icons/Reassign';
|
|
5
5
|
import ReassignDialog from './ReassignDialog';
|
|
6
6
|
var ReassignButton = function (_a) {
|
|
7
|
-
var disabled = _a.disabled, changeRequestURI = _a.changeRequestURI, task = _a.task, onChangeTask = _a.onChangeTask;
|
|
7
|
+
var disabled = _a.disabled, changeRequestURI = _a.changeRequestURI, task = _a.task, onChangeTask = _a.onChangeTask, className = _a.className;
|
|
8
8
|
var _b = useState(false), isDialogOpen = _b[0], setIsDialogOpen = _b[1];
|
|
9
9
|
var handleOpenDialog = function () {
|
|
10
10
|
setIsDialogOpen(true);
|
|
@@ -13,7 +13,7 @@ var ReassignButton = function (_a) {
|
|
|
13
13
|
setIsDialogOpen(false);
|
|
14
14
|
};
|
|
15
15
|
return (React.createElement(React.Fragment, null,
|
|
16
|
-
React.createElement(SmallIconButtonWithTooltip, { "data-reltio-id": "reltio-reassign-button", showForDisabled: true, tooltipTitle: i18n.text('Reassign task'), "aria-label": i18n.text('Reassign task'), icon: ReassignIcon, onClick: handleOpenDialog, size: "L", disabled: disabled || !changeRequestURI }),
|
|
16
|
+
React.createElement(SmallIconButtonWithTooltip, { className: className, "data-reltio-id": "reltio-reassign-button", showForDisabled: true, tooltipTitle: i18n.text('Reassign task'), "aria-label": i18n.text('Reassign task'), icon: ReassignIcon, onClick: handleOpenDialog, size: "L", disabled: disabled || !changeRequestURI }),
|
|
17
17
|
React.createElement(ReassignDialog, { isOpen: isDialogOpen, onClose: handleCloseDialog, task: task, onChangeTask: onChangeTask })));
|
|
18
18
|
};
|
|
19
19
|
export default ReassignButton;
|
package/esm/constants/index.d.ts
CHANGED
|
@@ -4,3 +4,4 @@ export { ALWAYS_VISIBLE_TYPE_URIS } from './attributes';
|
|
|
4
4
|
export { MAP_DRAWING_MODES, DEFAULT_GOOGLE_MAP_OPTIONS, DEFAULT_OVERLAY_OPTIONS, MAP_MINIMUM_SCALE_RADIUS } from './map';
|
|
5
5
|
export { COMMON_TEXT_FIELD_PROPS } from './textField';
|
|
6
6
|
export { POPUP_Z_INDEX } from './common';
|
|
7
|
+
export { editingModeOption, suggestingModeOption, viewingModeOption } from './modeOptions';
|
package/esm/constants/index.js
CHANGED
|
@@ -4,3 +4,4 @@ export { ALWAYS_VISIBLE_TYPE_URIS } from './attributes';
|
|
|
4
4
|
export { MAP_DRAWING_MODES, DEFAULT_GOOGLE_MAP_OPTIONS, DEFAULT_OVERLAY_OPTIONS, MAP_MINIMUM_SCALE_RADIUS } from './map';
|
|
5
5
|
export { COMMON_TEXT_FIELD_PROPS } from './textField';
|
|
6
6
|
export { POPUP_Z_INDEX } from './common';
|
|
7
|
+
export { editingModeOption, suggestingModeOption, viewingModeOption } from './modeOptions';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Mode } from '@reltio/mdm-sdk';
|
|
3
|
+
export declare const editingModeOption: {
|
|
4
|
+
label: string;
|
|
5
|
+
value: Mode;
|
|
6
|
+
description: string;
|
|
7
|
+
icon: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").SvgIconTypeMap<{}, "svg">> & {
|
|
8
|
+
muiName: string;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export declare const suggestingModeOption: {
|
|
12
|
+
label: string;
|
|
13
|
+
value: Mode;
|
|
14
|
+
description: string;
|
|
15
|
+
icon: import("react").FC<import("react").SVGProps<SVGSVGElement>>;
|
|
16
|
+
};
|
|
17
|
+
export declare const viewingModeOption: {
|
|
18
|
+
label: string;
|
|
19
|
+
value: Mode;
|
|
20
|
+
description: string;
|
|
21
|
+
icon: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").SvgIconTypeMap<{}, "svg">> & {
|
|
22
|
+
muiName: string;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import i18n from 'ui-i18n';
|
|
2
|
+
import { Mode } from '@reltio/mdm-sdk';
|
|
3
|
+
import CreateIcon from '@mui/icons-material/Create';
|
|
4
|
+
import VisibilityIcon from '@mui/icons-material/Visibility';
|
|
5
|
+
import Suggest from '../icons/Suggest';
|
|
6
|
+
export var editingModeOption = {
|
|
7
|
+
label: i18n.text('Editing'),
|
|
8
|
+
value: Mode.Editing,
|
|
9
|
+
description: i18n.text('Edit profile directly'),
|
|
10
|
+
icon: CreateIcon
|
|
11
|
+
};
|
|
12
|
+
export var suggestingModeOption = {
|
|
13
|
+
label: i18n.text('Suggesting'),
|
|
14
|
+
value: Mode.Suggesting,
|
|
15
|
+
description: i18n.text('Suggest changes and initiate a workflow review'),
|
|
16
|
+
icon: Suggest
|
|
17
|
+
};
|
|
18
|
+
export var viewingModeOption = {
|
|
19
|
+
label: i18n.text('Viewing'),
|
|
20
|
+
value: Mode.Viewing,
|
|
21
|
+
description: i18n.text('Read or print profile'),
|
|
22
|
+
icon: VisibilityIcon
|
|
23
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import React from 'react';
|
|
13
|
+
var SvgSuggest = function (props) {
|
|
14
|
+
return (React.createElement("svg", __assign({ width: 19, height: 17, viewBox: "0 0 19 17", xmlns: "http://www.w3.org/2000/svg", xmlnsXlink: "http://www.w3.org/1999/xlink" }, props),
|
|
15
|
+
React.createElement("defs", null,
|
|
16
|
+
React.createElement("path", { d: "M14 17v2H4v-2h10zm6-4v2H4v-2l12.884.001H17l.116-.002L20 13zm-8.457-2H4V9h5.82a8.465 8.465 0 001.723 2zM9.139 6.178l-.289.733.035.088L4 7V5l5.713-.002c-.22.375-.412.768-.574 1.18zM17 2.82a6.451 6.451 0 00-6 4.09 6.451 6.451 0 006 4.092 6.451 6.451 0 006-4.091 6.451 6.451 0 00-6-4.091zm0 6.815a2.728 2.728 0 010-5.455 2.728 2.728 0 010 5.455zm0-4.365c-.905 0-1.636.73-1.636 1.636 0 .906.73 1.637 1.636 1.637.905 0 1.636-.731 1.636-1.637 0-.905-.73-1.636-1.636-1.636z", id: "Suggest_svg__a" })),
|
|
17
|
+
React.createElement("g", { transform: "translate(-4 -2.5)", stroke: "none", strokeWidth: 1, fill: "none", fillRule: "evenodd" },
|
|
18
|
+
React.createElement("mask", { id: "Suggest_svg__b", fill: "#fff" },
|
|
19
|
+
React.createElement("use", { xlinkHref: "#Suggest_svg__a" })),
|
|
20
|
+
React.createElement("path", { fillOpacity: 0.54, fill: "#000", mask: "url(#Suggest_svg__b)", d: "M0 0h24v24H0z" }))));
|
|
21
|
+
};
|
|
22
|
+
export default SvgSuggest;
|