@onehat/ui 0.3.123 → 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
|
},
|
|
@@ -479,9 +485,10 @@ export function ComboComponent(props) {
|
|
|
479
485
|
_hover={{
|
|
480
486
|
bg: styles.FORM_COMBO_TRIGGER_HOVER_BG,
|
|
481
487
|
}}
|
|
488
|
+
mr={1}
|
|
482
489
|
/>;
|
|
483
490
|
}
|
|
484
|
-
if (showEyeButton && !_.isNil(value)) {
|
|
491
|
+
if (showEyeButton && Editor && !_.isNil(value)) {
|
|
485
492
|
eyeButton = <IconButton
|
|
486
493
|
_icon={{
|
|
487
494
|
as: Eye,
|
|
@@ -495,6 +502,7 @@ export function ComboComponent(props) {
|
|
|
495
502
|
_hover={{
|
|
496
503
|
bg: styles.FORM_COMBO_TRIGGER_HOVER_BG,
|
|
497
504
|
}}
|
|
505
|
+
mr={1}
|
|
498
506
|
/>;
|
|
499
507
|
}
|
|
500
508
|
|
|
@@ -896,10 +904,35 @@ export function ComboComponent(props) {
|
|
|
896
904
|
{dropdownMenu}
|
|
897
905
|
</Row>;
|
|
898
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
|
+
|
|
899
932
|
if (tooltip) {
|
|
900
933
|
assembledComponents = <Tooltip label={tooltip} placement={tooltipPlacement}>
|
|
901
|
-
|
|
902
|
-
|
|
934
|
+
{assembledComponents}
|
|
935
|
+
</Tooltip>;
|
|
903
936
|
}
|
|
904
937
|
|
|
905
938
|
return assembledComponents;
|