@onehat/ui 0.3.262 → 0.3.263
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 +1 -1
- package/src/Components/Accordion/Accordion.js +14 -14
- package/src/Components/Blank.js +1 -1
- package/src/Components/Buttons/BackButton.js +1 -1
- package/src/Components/Buttons/Button.js +1 -1
- package/src/Components/Buttons/CartButtonWithBadge.js +1 -1
- package/src/Components/Buttons/IconButton.js +2 -5
- package/src/Components/Buttons/PlusMinusButton.js +6 -6
- package/src/Components/Buttons/SquareButton.js +1 -1
- package/src/Components/Container/Container.js +9 -9
- package/src/Components/Container/ScreenContainer.js +4 -4
- package/src/Components/Container/Splitter.js +10 -9
- package/src/Components/Filter/DateRange.js +4 -4
- package/src/Components/Filter/NumberRange.js +4 -4
- package/src/Components/Form/Field/CKEditor/CKEditor.js +4 -4
- package/src/Components/Form/Field/Checkbox/CheckboxGroup.js +3 -1
- package/src/Components/Form/Field/Color.js +85 -91
- package/src/Components/Form/Field/Combo/Combo.js +13 -13
- package/src/Components/Form/Field/Combo/PageSizeCombo.js +4 -4
- package/src/Components/Form/Field/Date.js +11 -10
- package/src/Components/Form/Field/DisplayField.js +1 -1
- package/src/Components/Form/Field/File.js +4 -4
- package/src/Components/Form/Field/Input.js +4 -4
- package/src/Components/Form/Field/Number.js +4 -4
- package/src/Components/Form/Field/RadioGroup/RadioGroup.js +3 -1
- package/src/Components/Form/Field/Tag/Tag.js +7 -7
- package/src/Components/Form/Field/Tag/ValueBox.js +4 -4
- package/src/Components/Form/Field/Text.js +1 -1
- package/src/Components/Form/Field/TextArea.js +3 -3
- package/src/Components/Form/Field/Toggle.js +4 -4
- package/src/Components/Form/FieldSet.js +7 -6
- package/src/Components/Form/FiltersForm.js +9 -0
- package/src/Components/Form/Form.js +48 -62
- package/src/Components/Form/Label.js +4 -4
- package/src/Components/Grid/Grid.js +11 -9
- package/src/Components/Grid/GridHeaderRow.js +4 -4
- package/src/Components/Grid/GridRow.js +7 -7
- package/src/Components/Grid/HeaderColumnSelectorHandle.js +1 -1
- package/src/Components/Grid/HeaderReorderHandle.js +6 -4
- package/src/Components/Grid/HeaderResizeHandle.js +6 -4
- package/src/Components/Grid/NoRecordsFound.js +7 -7
- package/src/Components/Grid/RowDragHandle.js +6 -4
- package/src/Components/Hoc/Secondary/withSecondaryEditor.js +1 -2
- package/src/Components/Hoc/Secondary/withSecondaryWindowedEditor.js +3 -1
- package/src/Components/Hoc/withAlert.js +14 -24
- package/src/Components/Hoc/withBlank.js +2 -0
- package/src/Components/Hoc/withContextMenu.js +9 -4
- package/src/Components/Hoc/withEditor.js +1 -2
- package/src/Components/Hoc/withEvents.js +2 -0
- package/src/Components/Hoc/withFilters.js +11 -11
- package/src/Components/Hoc/withInlineEditor.js +8 -5
- package/src/Components/Hoc/withPdfButton.js +5 -4
- package/src/Components/Hoc/withPresetButtons.js +1 -1
- package/src/Components/Hoc/withTooltip.js +3 -3
- package/src/Components/Hoc/withWindowedEditor.js +3 -1
- package/src/Components/Icons/AddressBook.js +10 -6
- package/src/Components/Icons/Alt.js +15 -7
- package/src/Components/Icons/AngleLeft.js +14 -6
- package/src/Components/Icons/AngleRight.js +14 -6
- package/src/Components/Icons/AnglesLeft.js +14 -6
- package/src/Components/Icons/AnglesRight.js +14 -6
- package/src/Components/Icons/Asterisk.js +10 -6
- package/src/Components/Icons/Ban.js +14 -8
- package/src/Components/Icons/Bars.js +10 -6
- package/src/Components/Icons/BarsStaggered.js +10 -6
- package/src/Components/Icons/Bell.js +19 -6
- package/src/Components/Icons/BigCircle.js +14 -6
- package/src/Components/Icons/Book.js +10 -6
- package/src/Components/Icons/BookOpen.js +10 -6
- package/src/Components/Icons/Bookmark.js +17 -7
- package/src/Components/Icons/Bug.js +10 -6
- package/src/Components/Icons/Building.js +10 -6
- package/src/Components/Icons/Calendar.js +14 -6
- package/src/Components/Icons/Calendar2.js +14 -6
- package/src/Components/Icons/CalendarDays.js +14 -6
- package/src/Components/Icons/Camera.js +14 -6
- package/src/Components/Icons/CaretDown.js +14 -6
- package/src/Components/Icons/CaretUp.js +14 -6
- package/src/Components/Icons/CartPlus.js +10 -6
- package/src/Components/Icons/CartShopping.js +10 -6
- package/src/Components/Icons/CashRegister.js +10 -6
- package/src/Components/Icons/Certificate.js +10 -6
- package/src/Components/Icons/ChartLine.js +10 -6
- package/src/Components/Icons/ChartPie.js +10 -6
- package/src/Components/Icons/Check.js +10 -6
- package/src/Components/Icons/CheckDouble.js +10 -6
- package/src/Components/Icons/ChevronDown.js +10 -6
- package/src/Components/Icons/ChevronLeft.js +10 -6
- package/src/Components/Icons/ChevronRight.js +10 -6
- package/src/Components/Icons/ChevronUp.js +10 -6
- package/src/Components/Icons/Circle.js +10 -6
- package/src/Components/Icons/CircleArrowRight.js +10 -6
- package/src/Components/Icons/CircleExclamation.js +14 -6
- package/src/Components/Icons/CircleInfo.js +10 -6
- package/src/Components/Icons/CircleQuestion.js +10 -6
- package/src/Components/Icons/CircleXmark.js +10 -6
- package/src/Components/Icons/CircleXmarkRegular.js +10 -6
- package/src/Components/Icons/Clipboard.js +14 -6
- package/src/Components/Icons/ClipboardCheck.js +17 -6
- package/src/Components/Icons/ClipboardList.js +16 -6
- package/src/Components/Icons/Clock.js +10 -6
- package/src/Components/Icons/ClockRegular.js +10 -6
- package/src/Components/Icons/ClockRotateLeft.js +10 -6
- package/src/Components/Icons/Clone.js +10 -6
- package/src/Components/Icons/Collapse.js +14 -6
- package/src/Components/Icons/Comment.js +10 -6
- package/src/Components/Icons/CommentDots.js +10 -6
- package/src/Components/Icons/CommentRegular.js +10 -6
- package/src/Components/Icons/Comments.js +10 -6
- package/src/Components/Icons/CommentsRegular.js +10 -6
- package/src/Components/Icons/Copyright.js +10 -6
- package/src/Components/Icons/Dot.js +15 -9
- package/src/Components/Icons/Duplicate.js +14 -6
- package/src/Components/Icons/Edit.js +14 -6
- package/src/Components/Icons/EllipsisHorizontal.js +16 -6
- package/src/Components/Icons/EllipsisVertical.js +14 -6
- package/src/Components/Icons/Envelope.js +10 -6
- package/src/Components/Icons/EnvelopeRegular.js +10 -6
- package/src/Components/Icons/Excel.js +10 -6
- package/src/Components/Icons/Exclamation.js +10 -6
- package/src/Components/Icons/Expand.js +10 -6
- package/src/Components/Icons/Eye.js +14 -6
- package/src/Components/Icons/EyeSlash.js +10 -6
- package/src/Components/Icons/File.js +14 -6
- package/src/Components/Icons/FloppyDiskRegular.js +10 -6
- package/src/Components/Icons/Folder.js +10 -6
- package/src/Components/Icons/FolderClosed.js +10 -6
- package/src/Components/Icons/FolderOpen.js +10 -6
- package/src/Components/Icons/FolderTree.js +10 -6
- package/src/Components/Icons/FullWidth.js +25 -9
- package/src/Components/Icons/Gauge.js +17 -6
- package/src/Components/Icons/Gear.js +14 -6
- package/src/Components/Icons/Gears.js +10 -6
- package/src/Components/Icons/Gift.js +10 -6
- package/src/Components/Icons/Grip.js +14 -6
- package/src/Components/Icons/GripLines.js +14 -6
- package/src/Components/Icons/GripLinesVertical.js +14 -6
- package/src/Components/Icons/GripVertical.js +14 -6
- package/src/Components/Icons/Hammer.js +10 -6
- package/src/Components/Icons/Hand.js +10 -6
- package/src/Components/Icons/HighPriority.js +17 -6
- package/src/Components/Icons/House.js +10 -6
- package/src/Components/Icons/Images.js +10 -6
- package/src/Components/Icons/Info.js +10 -6
- package/src/Components/Icons/ItunesNote.js +10 -6
- package/src/Components/Icons/Js.js +16 -6
- package/src/Components/Icons/Leaf.js +10 -6
- package/src/Components/Icons/Link.js +9 -6
- package/src/Components/Icons/List.js +10 -6
- package/src/Components/Icons/ListCheck.js +10 -6
- package/src/Components/Icons/LocationDot.js +10 -6
- package/src/Components/Icons/Loop.js +14 -6
- package/src/Components/Icons/Loop1.js +13 -7
- package/src/Components/Icons/LoopAll.js +13 -7
- package/src/Components/Icons/LowPriority.js +17 -6
- package/src/Components/Icons/MagnifyingGlass.js +10 -6
- package/src/Components/Icons/Maximize.js +10 -6
- package/src/Components/Icons/MedPriority.js +17 -6
- package/src/Components/Icons/Microphone.js +10 -6
- package/src/Components/Icons/Minimize.js +10 -6
- package/src/Components/Icons/Minus.js +14 -6
- package/src/Components/Icons/MobileScreenButton.js +10 -6
- package/src/Components/Icons/MoneyBill.js +10 -6
- package/src/Components/Icons/MoneyBillWave.js +10 -6
- package/src/Components/Icons/Mouth.js +21 -9
- package/src/Components/Icons/Music.js +10 -6
- package/src/Components/Icons/Na.js +14 -6
- package/src/Components/Icons/NoLoop.js +13 -10
- package/src/Components/Icons/NoReorderRows.js +22 -16
- package/src/Components/Icons/ObjectGroupRegular.js +10 -6
- package/src/Components/Icons/Pause.js +10 -6
- package/src/Components/Icons/Pdf.js +10 -6
- package/src/Components/Icons/Pencil.js +14 -6
- package/src/Components/Icons/Phone.js +10 -6
- package/src/Components/Icons/Play.js +10 -6
- package/src/Components/Icons/Plus.js +14 -6
- package/src/Components/Icons/Presentation.js +16 -6
- package/src/Components/Icons/Print.js +14 -6
- package/src/Components/Icons/Question.js +10 -6
- package/src/Components/Icons/Rate-.25x.js +17 -11
- package/src/Components/Icons/Rate-.5x.js +16 -10
- package/src/Components/Icons/Rate-.75x.js +13 -7
- package/src/Components/Icons/Rate-1.25x.js +13 -7
- package/src/Components/Icons/Rate-1.5x.js +13 -7
- package/src/Components/Icons/Rate-1.75x.js +13 -7
- package/src/Components/Icons/Rate-1x.js +16 -10
- package/src/Components/Icons/Rate-2x.js +13 -7
- package/src/Components/Icons/RateIcon-.25x.js +13 -7
- package/src/Components/Icons/RateIcon-.5x.js +16 -10
- package/src/Components/Icons/RateIcon-.75x.js +13 -7
- package/src/Components/Icons/RateIcon-1.25x.js +13 -7
- package/src/Components/Icons/RateIcon-1.5x.js +13 -7
- package/src/Components/Icons/RateIcon-1.75x.js +13 -7
- package/src/Components/Icons/RateIcon-1x.js +13 -7
- package/src/Components/Icons/RateIcon-2x.js +13 -7
- package/src/Components/Icons/RectangleXmark.js +10 -6
- package/src/Components/Icons/RectangleXmarkRegular.js +10 -6
- package/src/Components/Icons/ReorderRows.js +13 -7
- package/src/Components/Icons/RightFromBracket.js +10 -6
- package/src/Components/Icons/RightLeft.js +10 -6
- package/src/Components/Icons/RightToBracket.js +10 -6
- package/src/Components/Icons/Rotate.js +14 -6
- package/src/Components/Icons/RotateLeft.js +10 -6
- package/src/Components/Icons/RotateRight.js +14 -6
- package/src/Components/Icons/ScrewdriverWrench.js +10 -6
- package/src/Components/Icons/Scroll.js +10 -6
- package/src/Components/Icons/Share.js +10 -6
- package/src/Components/Icons/Shop.js +10 -6
- package/src/Components/Icons/SideBySide.js +20 -6
- package/src/Components/Icons/SortDown.js +10 -6
- package/src/Components/Icons/SortDownAlt.js +10 -6
- package/src/Components/Icons/SortUp.js +10 -6
- package/src/Components/Icons/SortUpAlt.js +14 -6
- package/src/Components/Icons/Square.js +10 -6
- package/src/Components/Icons/SquareCheck.js +10 -6
- package/src/Components/Icons/SquareCheckRegular.js +10 -6
- package/src/Components/Icons/SquareMinus.js +14 -6
- package/src/Components/Icons/SquareRegular.js +10 -6
- package/src/Components/Icons/Store.js +10 -6
- package/src/Components/Icons/Table.js +16 -6
- package/src/Components/Icons/ThumbsDown.js +10 -6
- package/src/Components/Icons/ThumbsDownRegular.js +10 -6
- package/src/Components/Icons/ThumbsUp.js +10 -6
- package/src/Components/Icons/ThumbsUpRegular.js +10 -6
- package/src/Components/Icons/Trash.js +14 -6
- package/src/Components/Icons/TrashCan.js +14 -6
- package/src/Components/Icons/TriangleExclamation.js +14 -6
- package/src/Components/Icons/Truck.js +10 -6
- package/src/Components/Icons/TruckFast.js +10 -6
- package/src/Components/Icons/UploadDownload.js +9 -7
- package/src/Components/Icons/User.js +10 -6
- package/src/Components/Icons/UserGroup.js +10 -6
- package/src/Components/Icons/UserPlus.js +10 -6
- package/src/Components/Icons/UserSecret.js +10 -6
- package/src/Components/Icons/Video.js +16 -6
- package/src/Components/Icons/X.js +10 -6
- package/src/Components/Icons/Xmark.js +10 -6
- package/src/Components/Layout/CenterBox.js +1 -1
- package/src/Components/Layout/Footer.js +4 -4
- package/src/Components/Messages/ConfirmationMessage.js +3 -8
- package/src/Components/Messages/ErrorMessage.js +2 -5
- package/src/Components/Messages/Loading.js +6 -6
- package/src/Components/Messages/OkMessage.js +3 -4
- package/src/Components/Messages/WaitMessage.js +1 -1
- package/src/Components/Panel/AccordionGridPanel.js +1 -1
- package/src/Components/Panel/FormPanel.js +1 -1
- package/src/Components/Panel/Header.js +13 -13
- package/src/Components/Panel/Mask.js +1 -1
- package/src/Components/Panel/Panel.js +12 -10
- package/src/Components/Picker/Picker.js +5 -5
- package/src/Components/Report/Report.js +10 -10
- package/src/Components/Screens/Manager.js +7 -7
- package/src/Components/Tab/TabBar.js +23 -23
- package/src/Components/Toolbar/FilterToolbar.js +3 -3
- package/src/Components/Toolbar/Pagination.js +8 -12
- package/src/Components/Toolbar/PaginationToolbar.js +3 -3
- package/src/Components/Toolbar/Toolbar.js +4 -4
- package/src/Components/Tree/Tree.js +13 -10
- package/src/Components/Tree/TreeNode.js +4 -4
- package/src/Components/Viewer/Viewer.js +23 -29
- package/src/Components/WaitModal.js +4 -4
- package/src/Components/Window/Editor.js +1 -1
- package/src/Components/Window/UploadsDownloadsWindow.js +1 -1
- package/src/Components/index.js +5 -5
- package/src/Functions/buildAdditionalButtons.js +3 -7
- package/src/PlatformImports/Web/Attachments.js +8 -11
- package/src/PlatformImports/Web/File.js +5 -4
package/package.json
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { useState, useEffect, useRef, } from 'react';
|
|
2
2
|
import {
|
|
3
|
-
|
|
3
|
+
Box,
|
|
4
|
+
Column,
|
|
4
5
|
Pressable,
|
|
6
|
+
Row,
|
|
5
7
|
ScrollView,
|
|
6
|
-
|
|
7
|
-
} from '
|
|
8
|
+
Text,
|
|
9
|
+
} from 'native-base';
|
|
8
10
|
import inArray from '../../Functions/inArray.js';
|
|
9
11
|
import emptyFn from '../../Functions/emptyFn.js';
|
|
10
12
|
import _ from 'lodash';
|
|
@@ -71,7 +73,7 @@ export default function Accordion(props) {
|
|
|
71
73
|
rowProps.overflow = 'hidden'; // otherwise some elements mistakenly show
|
|
72
74
|
}
|
|
73
75
|
|
|
74
|
-
return <
|
|
76
|
+
return <Column key={ix}>
|
|
75
77
|
<Pressable
|
|
76
78
|
onPress={(e) => {
|
|
77
79
|
let newActiveSections = [];
|
|
@@ -92,10 +94,10 @@ export default function Accordion(props) {
|
|
|
92
94
|
>
|
|
93
95
|
{header}
|
|
94
96
|
</Pressable>
|
|
95
|
-
<
|
|
97
|
+
<Row {...rowProps} bg="#f00">
|
|
96
98
|
{content}
|
|
97
|
-
</
|
|
98
|
-
</
|
|
99
|
+
</Row>
|
|
100
|
+
</Column>;
|
|
99
101
|
});
|
|
100
102
|
|
|
101
103
|
useEffect(() => {
|
|
@@ -114,16 +116,14 @@ export default function Accordion(props) {
|
|
|
114
116
|
if (activeSections?.length && sections?.length) {
|
|
115
117
|
scrollTo = sectionHeight * activeIx;
|
|
116
118
|
}
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
}, 10); // delay so render can finish
|
|
121
|
-
}
|
|
119
|
+
setTimeout(()=> {
|
|
120
|
+
scrollView.scrollTo({ x: 0, y: scrollTo, animated: true });
|
|
121
|
+
}, 10); // delay so render can finish
|
|
122
122
|
|
|
123
123
|
}, [activeSections, isRendered]);
|
|
124
124
|
|
|
125
125
|
return <ScrollView ref={scrollViewRef} keyboardShouldPersistTaps="always" flex={1} w="100%">
|
|
126
|
-
<
|
|
126
|
+
<Column
|
|
127
127
|
{...propsToPass}
|
|
128
128
|
pb={(onlyOne ? calculateExtraPadding() : 0) + 'px'}
|
|
129
129
|
onLayout={(e) => {
|
|
@@ -138,6 +138,6 @@ export default function Accordion(props) {
|
|
|
138
138
|
}}
|
|
139
139
|
>
|
|
140
140
|
{items}
|
|
141
|
-
</
|
|
141
|
+
</Column>
|
|
142
142
|
</ScrollView>;
|
|
143
143
|
}
|
package/src/Components/Blank.js
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
import React, { useRef, } from 'react';
|
|
2
2
|
import {
|
|
3
|
-
Button,
|
|
4
|
-
ButtonText,
|
|
5
|
-
ButtonIcon,
|
|
6
3
|
Icon,
|
|
7
4
|
Pressable,
|
|
8
5
|
Spinner,
|
|
9
6
|
Tooltip,
|
|
10
|
-
} from '
|
|
7
|
+
} from 'native-base';
|
|
11
8
|
import withComponent from '../Hoc/withComponent.js';
|
|
12
9
|
import UiGlobals from '../../UiGlobals.js';
|
|
13
10
|
import _ from 'lodash';
|
|
@@ -72,7 +69,7 @@ const
|
|
|
72
69
|
</Pressable>;
|
|
73
70
|
ret = pressable;
|
|
74
71
|
if (tooltip) {
|
|
75
|
-
|
|
72
|
+
ret = <Tooltip label={tooltip} placement={tooltipPlacement}>{ret}</Tooltip>;
|
|
76
73
|
}
|
|
77
74
|
return ret;
|
|
78
75
|
},
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import {
|
|
3
|
-
|
|
3
|
+
Row,
|
|
4
4
|
Text,
|
|
5
|
-
} from '
|
|
5
|
+
} from 'native-base';
|
|
6
6
|
import IconButton from './IconButton.js';
|
|
7
7
|
import Plus from '../Icons/Plus.js';
|
|
8
8
|
import Minus from '../Icons/Minus.js';
|
|
@@ -17,8 +17,8 @@ const PlusMinusButton = React.forwardRef((props, ref) => {
|
|
|
17
17
|
minusHandler = () => {},
|
|
18
18
|
} = props;
|
|
19
19
|
|
|
20
|
-
return <
|
|
21
|
-
<
|
|
20
|
+
return <Row {...props}>
|
|
21
|
+
<Row alignItems="center">
|
|
22
22
|
<IconButton
|
|
23
23
|
icon={<Minus color="#fff" />}
|
|
24
24
|
onPress={minusHandler}
|
|
@@ -32,8 +32,8 @@ const PlusMinusButton = React.forwardRef((props, ref) => {
|
|
|
32
32
|
isDisabled={isPlusDisabled}
|
|
33
33
|
ml={1}
|
|
34
34
|
/>
|
|
35
|
-
</
|
|
36
|
-
</
|
|
35
|
+
</Row>
|
|
36
|
+
</Row>;
|
|
37
37
|
|
|
38
38
|
});
|
|
39
39
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React, { useState, useEffect, } from 'react';
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
} from '
|
|
3
|
+
Column,
|
|
4
|
+
Row,
|
|
5
|
+
} from 'native-base';
|
|
6
6
|
import {
|
|
7
7
|
HORIZONTAL,
|
|
8
8
|
VERTICAL,
|
|
@@ -286,21 +286,21 @@ function Container(props) {
|
|
|
286
286
|
componentProps = {};
|
|
287
287
|
}
|
|
288
288
|
|
|
289
|
-
return <
|
|
289
|
+
return <Column w="100%" flex={1}>
|
|
290
290
|
{northComponent}
|
|
291
291
|
{(!isNorthCollapsed && !localIsNorthCollapsed) && northSplitter}
|
|
292
|
-
<
|
|
292
|
+
<Row w="100%" flex={100}>
|
|
293
293
|
{westComponent}
|
|
294
294
|
{(!isWestCollapsed && !localIsWestCollapsed) && westSplitter}
|
|
295
|
-
<
|
|
295
|
+
<Column h="100%" flex={100}>
|
|
296
296
|
{centerComponent}
|
|
297
|
-
</
|
|
297
|
+
</Column>
|
|
298
298
|
{(!isEastCollapsed && !localIsEastCollapsed) && eastSplitter}
|
|
299
299
|
{eastComponent}
|
|
300
|
-
</
|
|
300
|
+
</Row>
|
|
301
301
|
{(!isSouthCollapsed && !localIsSouthCollapsed) && southSplitter}
|
|
302
302
|
{southComponent}
|
|
303
|
-
</
|
|
303
|
+
</Column>;
|
|
304
304
|
}
|
|
305
305
|
|
|
306
306
|
export default withComponent(Container);
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
useWindowDimensions,
|
|
5
5
|
} from 'react-native';
|
|
6
6
|
import {
|
|
7
|
-
|
|
7
|
+
Column,
|
|
8
8
|
ScrollView,
|
|
9
9
|
KeyboardAvoidingView,
|
|
10
|
-
} from '
|
|
10
|
+
} from 'native-base';
|
|
11
11
|
import withComponent from '../Hoc/withComponent.js';
|
|
12
12
|
// import { useHeaderHeight } from '@react-navigation/elements';
|
|
13
13
|
// import testProps from '../OneHat/functions/testProps';
|
|
@@ -35,7 +35,7 @@ function ScreenContainer(props) {
|
|
|
35
35
|
safeAreaProps.safeArea = true;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
const column = <
|
|
38
|
+
const column = <Column
|
|
39
39
|
// {...testProps(screenName)}
|
|
40
40
|
alignItems="center"
|
|
41
41
|
justifyContent="flex-start"
|
|
@@ -48,7 +48,7 @@ function ScreenContainer(props) {
|
|
|
48
48
|
{...safeAreaProps}
|
|
49
49
|
>
|
|
50
50
|
{props.children}
|
|
51
|
-
</
|
|
51
|
+
</Column>;
|
|
52
52
|
|
|
53
53
|
if (scrollEnabled) {
|
|
54
54
|
const scrollViewProps = {};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
Column,
|
|
3
|
+
Row,
|
|
4
|
+
Text,
|
|
5
|
+
} from 'native-base';
|
|
5
6
|
import {
|
|
6
7
|
HORIZONTAL,
|
|
7
8
|
VERTICAL,
|
|
@@ -20,7 +21,7 @@ function Splitter(props) {
|
|
|
20
21
|
} = props;
|
|
21
22
|
|
|
22
23
|
if (mode === VERTICAL) {
|
|
23
|
-
return <
|
|
24
|
+
return <Row
|
|
24
25
|
testID="Splitter"
|
|
25
26
|
bg={isDragging ? 'secondary.600' : 'primary.600'}
|
|
26
27
|
h="3px"
|
|
@@ -28,10 +29,10 @@ function Splitter(props) {
|
|
|
28
29
|
alignItems="center"
|
|
29
30
|
justifyContent="center"
|
|
30
31
|
>
|
|
31
|
-
<
|
|
32
|
-
</
|
|
32
|
+
<Row testID="handle" h="2px" w="10%" bg="#ccc"></Row>
|
|
33
|
+
</Row>;
|
|
33
34
|
}
|
|
34
|
-
return <
|
|
35
|
+
return <Column
|
|
35
36
|
testID="Splitter"
|
|
36
37
|
bg={isDragging ? 'secondary.600' : 'primary.600'}
|
|
37
38
|
h="100%"
|
|
@@ -40,8 +41,8 @@ function Splitter(props) {
|
|
|
40
41
|
justifyContent="center"
|
|
41
42
|
style={styles.ewResize}
|
|
42
43
|
>
|
|
43
|
-
<
|
|
44
|
-
</
|
|
44
|
+
<Column testID="handle" w="2px" h="10%" bg="#ccc"></Column>
|
|
45
|
+
</Column>;
|
|
45
46
|
}
|
|
46
47
|
|
|
47
48
|
function withAdditionalProps(WrappedComponent) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useState, useEffect } from 'react';
|
|
2
2
|
import {
|
|
3
|
-
|
|
3
|
+
Row,
|
|
4
4
|
Text,
|
|
5
|
-
} from '
|
|
5
|
+
} from 'native-base';
|
|
6
6
|
import Date from '../Form/Field/Date.js';
|
|
7
7
|
import withTooltip from '../Hoc/withTooltip.js';
|
|
8
8
|
import withValue from '../Hoc/withValue.js';
|
|
@@ -70,7 +70,7 @@ const
|
|
|
70
70
|
return null;
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
-
return <
|
|
73
|
+
return <Row
|
|
74
74
|
justifyContent="center"
|
|
75
75
|
alignItems="center"
|
|
76
76
|
flex={1}
|
|
@@ -93,7 +93,7 @@ const
|
|
|
93
93
|
// maxValue={maxValue}
|
|
94
94
|
tooltip={(tooltip ? tooltip + ' ' : '') + 'High'}
|
|
95
95
|
/>
|
|
96
|
-
</
|
|
96
|
+
</Row>;
|
|
97
97
|
},
|
|
98
98
|
DateRangeField = withValue(DateRange);
|
|
99
99
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React, { useState, useEffect, } from 'react';
|
|
2
2
|
import {
|
|
3
|
-
|
|
3
|
+
Row,
|
|
4
4
|
Text,
|
|
5
|
-
} from '
|
|
5
|
+
} from 'native-base';
|
|
6
6
|
import Number from '../Form/Field/Number.js';
|
|
7
7
|
import withTooltip from '../Hoc/withTooltip.js';
|
|
8
8
|
import withValue from '../Hoc/withValue.js';
|
|
@@ -61,7 +61,7 @@ import _ from 'lodash';
|
|
|
61
61
|
|
|
62
62
|
}, [value]);
|
|
63
63
|
|
|
64
|
-
return <
|
|
64
|
+
return <Row
|
|
65
65
|
justifyContent="center"
|
|
66
66
|
alignItems="center"
|
|
67
67
|
flex={1}
|
|
@@ -86,7 +86,7 @@ import _ from 'lodash';
|
|
|
86
86
|
tooltip={(tooltip ? tooltip + ' ' : '') + 'High'}
|
|
87
87
|
maxWidth={120}
|
|
88
88
|
/>
|
|
89
|
-
</
|
|
89
|
+
</Row>;
|
|
90
90
|
},
|
|
91
91
|
NumberRangeField = withValue(NumberRange);
|
|
92
92
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useState, useEffect, useRef, } from 'react';
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
} from '
|
|
3
|
+
Row,
|
|
4
|
+
} from 'native-base';
|
|
5
5
|
import UiGlobals from '../../../../UiGlobals.js';
|
|
6
6
|
import { CKEditor } from '@ckeditor/ckeditor5-react'; // https://ckeditor.com/docs/ckeditor5/latest/installation/frameworks/react.html
|
|
7
7
|
import './ckeditor.css';
|
|
@@ -32,7 +32,7 @@ const
|
|
|
32
32
|
debouncedSetValueRef.current = _.debounce(setValue, autoSubmitDelay);
|
|
33
33
|
}, [setValue]);
|
|
34
34
|
|
|
35
|
-
return <
|
|
35
|
+
return <Row h={h} flex={1} ref={props.outerRef} {...props}>
|
|
36
36
|
<CKEditor
|
|
37
37
|
editor={Editor}
|
|
38
38
|
config={config}
|
|
@@ -45,7 +45,7 @@ const
|
|
|
45
45
|
debouncedSetValueRef.current(value);
|
|
46
46
|
}}
|
|
47
47
|
/>
|
|
48
|
-
</
|
|
48
|
+
</Row>;
|
|
49
49
|
},
|
|
50
50
|
CKEditorField = withComponent(withValue(CKEditorElement));
|
|
51
51
|
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import React, { useState, useEffect, } from 'react';
|
|
2
2
|
import {
|
|
3
|
+
Column,
|
|
3
4
|
Checkbox,
|
|
4
|
-
|
|
5
|
+
Row,
|
|
6
|
+
} from 'native-base';
|
|
5
7
|
import withData from '../../../Hoc/withData.js';
|
|
6
8
|
import withValue from '../../../Hoc/withValue.js';
|
|
7
9
|
import withTooltip from '../../../Hoc/withTooltip.js';
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import React, { useState, useRef, } from 'react';
|
|
1
|
+
import React, { useState, useEffect, useRef, } from 'react';
|
|
2
2
|
import {
|
|
3
3
|
Popover,
|
|
4
4
|
Pressable,
|
|
5
|
-
|
|
5
|
+
Row,
|
|
6
|
+
Text,
|
|
6
7
|
Tooltip,
|
|
7
|
-
} from '
|
|
8
|
+
} from 'native-base';
|
|
8
9
|
import { SketchPicker } from 'react-color';
|
|
9
10
|
import {
|
|
10
11
|
UI_MODE_WEB,
|
|
@@ -133,101 +134,94 @@ export function ColorElement(props) {
|
|
|
133
134
|
|
|
134
135
|
|
|
135
136
|
// Web version
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
{...props}
|
|
195
|
-
>
|
|
196
|
-
<Popover.Content
|
|
197
|
-
position="absolute"
|
|
198
|
-
top={top + 'px'}
|
|
199
|
-
left={left + 'px'}
|
|
200
|
-
w={220}
|
|
201
|
-
h={287}
|
|
202
|
-
{...translateProps}
|
|
203
|
-
>
|
|
204
|
-
<Popover.Body
|
|
205
|
-
ref={pickerRef}
|
|
206
|
-
p={0}
|
|
137
|
+
return <Tooltip label={tooltip} placement={tooltipPlacement}>
|
|
138
|
+
<Row flex={1} h="100%" alignItems="center" onLayout={() => setIsRendered(true)}>
|
|
139
|
+
<Pressable
|
|
140
|
+
ref={triggerRef}
|
|
141
|
+
onPress={onTriggerPress}
|
|
142
|
+
onBlur={onTriggerBlur}
|
|
143
|
+
h={10}
|
|
144
|
+
w={10}
|
|
145
|
+
bg={value}
|
|
146
|
+
borderTopLeftRadius={6}
|
|
147
|
+
borderBottomLeftRadius={6}
|
|
148
|
+
borderTopRightRadius={0}
|
|
149
|
+
borderBottomRightRadius={0}
|
|
150
|
+
borderWidth={1}
|
|
151
|
+
borderColor="trueGray.300"
|
|
152
|
+
/>
|
|
153
|
+
<Input
|
|
154
|
+
ref={inputRef}
|
|
155
|
+
value={value}
|
|
156
|
+
setValue={setValue}
|
|
157
|
+
maxLength={7}
|
|
158
|
+
onBlur={onInputBlur}
|
|
159
|
+
onClick={onInputClick}
|
|
160
|
+
flex={1}
|
|
161
|
+
h="100%"
|
|
162
|
+
p={2}
|
|
163
|
+
borderWidth={1}
|
|
164
|
+
borderColor="trueGray.300"
|
|
165
|
+
borderLeftWidth={0}
|
|
166
|
+
borderTopLeftRadius={0}
|
|
167
|
+
borderBottomLeftRadius={0}
|
|
168
|
+
borderTopRightRadius={6}
|
|
169
|
+
borderBottomRightRadius={6}
|
|
170
|
+
fontSize={styles.FORM_COLOR_READOUT_FONTSIZE}
|
|
171
|
+
bg={styles.FORM_COLOR_INPUT_BG}
|
|
172
|
+
_focus={{
|
|
173
|
+
bg: styles.FORM_COLOR_INPUT_FOCUS_BG,
|
|
174
|
+
}}
|
|
175
|
+
onLayout={(e) => {
|
|
176
|
+
// On web, this is not needed, but on RN it might be, so leave it in for now
|
|
177
|
+
const {
|
|
178
|
+
height,
|
|
179
|
+
top,
|
|
180
|
+
left,
|
|
181
|
+
} = e.nativeEvent.layout;
|
|
182
|
+
setTop(top + height);
|
|
183
|
+
setLeft(left);
|
|
184
|
+
}}
|
|
185
|
+
/>
|
|
186
|
+
<Popover
|
|
187
|
+
isOpen={isPickerShown}
|
|
188
|
+
onClose={() => {
|
|
189
|
+
hidePicker();
|
|
190
|
+
}}
|
|
191
|
+
trigger={emptyFn}
|
|
192
|
+
trapFocus={true}
|
|
193
|
+
placement={'auto'}
|
|
194
|
+
{...props}
|
|
207
195
|
>
|
|
208
|
-
<
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
{
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
196
|
+
<Popover.Content
|
|
197
|
+
position="absolute"
|
|
198
|
+
top={top + 'px'}
|
|
199
|
+
left={left + 'px'}
|
|
200
|
+
w={220}
|
|
201
|
+
h={287}
|
|
202
|
+
{...translateProps}
|
|
203
|
+
>
|
|
204
|
+
<Popover.Body
|
|
205
|
+
ref={pickerRef}
|
|
206
|
+
p={0}
|
|
207
|
+
>
|
|
208
|
+
<SketchPicker
|
|
209
|
+
disableAlpha={true}
|
|
210
|
+
color={value}
|
|
211
|
+
onChange={(color) => setValue(color.hex)}
|
|
212
|
+
{...props}
|
|
213
|
+
/>
|
|
214
|
+
</Popover.Body>
|
|
215
|
+
</Popover.Content>
|
|
216
|
+
</Popover>
|
|
217
|
+
</Row>
|
|
218
|
+
</Tooltip>;
|
|
219
219
|
|
|
220
220
|
// React Native v1
|
|
221
221
|
|
|
222
222
|
|
|
223
223
|
// React Native v2
|
|
224
224
|
|
|
225
|
-
if (tooltip) {
|
|
226
|
-
// assembledComponents = <Tooltip label={tooltip} placement={tooltipPlacement}>
|
|
227
|
-
// {assembledComponents}
|
|
228
|
-
// </Tooltip>;
|
|
229
|
-
}
|
|
230
|
-
return assembledComponents;
|
|
231
225
|
}
|
|
232
226
|
|
|
233
227
|
export default withComponent(withValue(ColorElement));
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
Modal,
|
|
5
5
|
Popover,
|
|
6
6
|
Pressable,
|
|
7
|
-
|
|
7
|
+
Row,
|
|
8
8
|
Text,
|
|
9
9
|
Tooltip,
|
|
10
|
-
} from '
|
|
10
|
+
} from 'native-base';
|
|
11
11
|
import {
|
|
12
12
|
UI_MODE_REACT_NATIVE,
|
|
13
13
|
UI_MODE_WEB,
|
|
@@ -104,7 +104,7 @@ export function ComboComponent(props) {
|
|
|
104
104
|
if (isMenuShown) {
|
|
105
105
|
return;
|
|
106
106
|
}
|
|
107
|
-
if (UiGlobals.mode === UI_MODE_WEB && inputRef.current
|
|
107
|
+
if (UiGlobals.mode === UI_MODE_WEB && inputRef.current.getBoundingClientRect) {
|
|
108
108
|
// For web, ensure it's in the proper place
|
|
109
109
|
const
|
|
110
110
|
rect = inputRef.current.getBoundingClientRect(),
|
|
@@ -855,7 +855,7 @@ export function ComboComponent(props) {
|
|
|
855
855
|
/>;
|
|
856
856
|
}
|
|
857
857
|
const inputAndTriggerClone = // for RN, this is the actual input and trigger, as we need them to appear up above in the modal
|
|
858
|
-
<
|
|
858
|
+
<Row h={10}>
|
|
859
859
|
{xButton}
|
|
860
860
|
{eyeButton}
|
|
861
861
|
{disableDirectEntry ?
|
|
@@ -922,7 +922,7 @@ export function ComboComponent(props) {
|
|
|
922
922
|
}}
|
|
923
923
|
/>
|
|
924
924
|
{checkButton}
|
|
925
|
-
</
|
|
925
|
+
</Row>;
|
|
926
926
|
dropdownMenu = <Modal
|
|
927
927
|
isOpen={true}
|
|
928
928
|
safeAreaTop={true}
|
|
@@ -947,26 +947,26 @@ export function ComboComponent(props) {
|
|
|
947
947
|
if (isRendered && additionalButtons?.length && containerWidth < 500) {
|
|
948
948
|
// be responsive for small screen sizes and bump additionalButtons to the next line
|
|
949
949
|
assembledComponents =
|
|
950
|
-
<
|
|
951
|
-
<
|
|
950
|
+
<Column>
|
|
951
|
+
<Row {...refProps} justifyContent="center" alignItems="center" flex={1} h="100%">
|
|
952
952
|
{xButton}
|
|
953
953
|
{eyeButton}
|
|
954
954
|
{inputAndTrigger}
|
|
955
955
|
{dropdownMenu}
|
|
956
|
-
</
|
|
957
|
-
<
|
|
956
|
+
</Row>
|
|
957
|
+
<Row mt={2}>
|
|
958
958
|
{additionalButtons}
|
|
959
|
-
</
|
|
960
|
-
</
|
|
959
|
+
</Row>
|
|
960
|
+
</Column>;
|
|
961
961
|
} else {
|
|
962
962
|
assembledComponents =
|
|
963
|
-
<
|
|
963
|
+
<Row {...refProps} justifyContent="center" alignItems="center" flex={1} h="100%" onLayout={onLayout}>
|
|
964
964
|
{xButton}
|
|
965
965
|
{eyeButton}
|
|
966
966
|
{inputAndTrigger}
|
|
967
967
|
{additionalButtons}
|
|
968
968
|
{dropdownMenu}
|
|
969
|
-
</
|
|
969
|
+
</Row>;
|
|
970
970
|
}
|
|
971
971
|
|
|
972
972
|
if (isViewerShown && Editor) {
|