@onehat/ui 0.3.124 → 0.3.125
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/package.json
CHANGED
|
@@ -12,6 +12,9 @@ import {
|
|
|
12
12
|
UI_MODE_REACT_NATIVE,
|
|
13
13
|
UI_MODE_WEB,
|
|
14
14
|
} from '../../../../Constants/UiModes.js';
|
|
15
|
+
import {
|
|
16
|
+
EDITOR_TYPE__WINDOWED,
|
|
17
|
+
} from '../../../../Constants/Editor.js';
|
|
15
18
|
import UiGlobals from '../../../../UiGlobals.js';
|
|
16
19
|
import Input from '../Input.js';
|
|
17
20
|
import withAlert from '../../../Hoc/withAlert.js';
|
|
@@ -47,11 +50,13 @@ export function ComboComponent(props) {
|
|
|
47
50
|
placeholder,
|
|
48
51
|
onRowPress,
|
|
49
52
|
icon,
|
|
53
|
+
Editor, // only used for the eyeButton
|
|
50
54
|
|
|
51
55
|
// withComponent
|
|
52
56
|
self,
|
|
53
57
|
|
|
54
58
|
// withAlert
|
|
59
|
+
alert,
|
|
55
60
|
confirm,
|
|
56
61
|
|
|
57
62
|
// withData
|
|
@@ -317,6 +322,7 @@ export function ComboComponent(props) {
|
|
|
317
322
|
setViewerSelection([record]);
|
|
318
323
|
setIsViewerShown(true);
|
|
319
324
|
},
|
|
325
|
+
onViewerClose = () => setIsViewerShown(false),
|
|
320
326
|
onCheckButtonPress = () => {
|
|
321
327
|
hideMenu();
|
|
322
328
|
},
|
|
@@ -482,7 +488,7 @@ export function ComboComponent(props) {
|
|
|
482
488
|
mr={1}
|
|
483
489
|
/>;
|
|
484
490
|
}
|
|
485
|
-
if (showEyeButton && !_.isNil(value)) {
|
|
491
|
+
if (showEyeButton && Editor && !_.isNil(value)) {
|
|
486
492
|
eyeButton = <IconButton
|
|
487
493
|
_icon={{
|
|
488
494
|
as: Eye,
|
|
@@ -898,10 +904,35 @@ export function ComboComponent(props) {
|
|
|
898
904
|
{dropdownMenu}
|
|
899
905
|
</Row>;
|
|
900
906
|
|
|
907
|
+
if (isViewerShown && Editor) {
|
|
908
|
+
assembledComponents =
|
|
909
|
+
<>
|
|
910
|
+
{assembledComponents}
|
|
911
|
+
<Modal
|
|
912
|
+
isOpen={true}
|
|
913
|
+
onClose={onViewerClose}
|
|
914
|
+
>
|
|
915
|
+
<Editor
|
|
916
|
+
{...props}
|
|
917
|
+
editorType={EDITOR_TYPE__WINDOWED}
|
|
918
|
+
px={0}
|
|
919
|
+
py={0}
|
|
920
|
+
w="100%"
|
|
921
|
+
parent={self}
|
|
922
|
+
reference="viewer"
|
|
923
|
+
|
|
924
|
+
isEditorViewOnly={true}
|
|
925
|
+
selection={viewerSelection}
|
|
926
|
+
onEditorClose={onViewerClose}
|
|
927
|
+
/>
|
|
928
|
+
</Modal>
|
|
929
|
+
</>;
|
|
930
|
+
}
|
|
931
|
+
|
|
901
932
|
if (tooltip) {
|
|
902
933
|
assembledComponents = <Tooltip label={tooltip} placement={tooltipPlacement}>
|
|
903
|
-
|
|
904
|
-
|
|
934
|
+
{assembledComponents}
|
|
935
|
+
</Tooltip>;
|
|
905
936
|
}
|
|
906
937
|
|
|
907
938
|
return assembledComponents;
|