@onehat/ui 0.3.86 → 0.3.88
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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onehat/ui",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.88",
|
|
4
4
|
"description": "Base UI for OneHat apps",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -33,15 +33,15 @@
|
|
|
33
33
|
"@reduxjs/toolkit": "^1.9.5",
|
|
34
34
|
"inflector-js": "^1.0.1",
|
|
35
35
|
"js-cookie": "^3.0.5",
|
|
36
|
-
"locutus": "^2.0.16",
|
|
37
36
|
"native-base": "^3.4.28",
|
|
38
|
-
"react-hook-form": "^7.
|
|
37
|
+
"react-hook-form": "^7.49.2",
|
|
39
38
|
"react-redux": "^8.1.2",
|
|
40
39
|
"yup": "^1.2.0"
|
|
41
40
|
},
|
|
42
41
|
"peerDependencies": {
|
|
43
42
|
"@files-ui/react": "^1.0.8",
|
|
44
43
|
"ckeditor5-custom-build": "file:ckeditor5",
|
|
44
|
+
"locutus": "^2.0.16",
|
|
45
45
|
"react": "*",
|
|
46
46
|
"react-color": "^2.19.3",
|
|
47
47
|
"react-datetime": "^3.2.0",
|
|
@@ -24,6 +24,7 @@ function TagComponent(props) {
|
|
|
24
24
|
isValueAlwaysArray,
|
|
25
25
|
isValueAsStringifiedJson,
|
|
26
26
|
Editor,
|
|
27
|
+
_combo = {},
|
|
27
28
|
|
|
28
29
|
// parent Form
|
|
29
30
|
onChangeValue,
|
|
@@ -144,8 +145,12 @@ function TagComponent(props) {
|
|
|
144
145
|
onView={() => onView(val)}
|
|
145
146
|
onDelete={isEditor ? () => onDelete(val) : null}
|
|
146
147
|
/>;
|
|
147
|
-
})
|
|
148
|
-
|
|
148
|
+
});
|
|
149
|
+
|
|
150
|
+
let WhichCombo = ComboEditor;
|
|
151
|
+
if (!_.isNil(_combo.isEditor) && !_combo.isEditor) {
|
|
152
|
+
WhichCombo = Combo;
|
|
153
|
+
}
|
|
149
154
|
|
|
150
155
|
const sizeProps = {};
|
|
151
156
|
if (!props.flex && !props.w) {
|
|
@@ -184,6 +189,7 @@ function TagComponent(props) {
|
|
|
184
189
|
onChangeValue={onChangeComboValue}
|
|
185
190
|
parent={self}
|
|
186
191
|
reference="combo"
|
|
192
|
+
{..._combo}
|
|
187
193
|
/>}
|
|
188
194
|
</Column>
|
|
189
195
|
{isViewerShown &&
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
|
+
Box,
|
|
2
3
|
Button,
|
|
3
4
|
Icon,
|
|
4
5
|
Modal,
|
|
@@ -6,13 +7,13 @@ import {
|
|
|
6
7
|
} from 'native-base';
|
|
7
8
|
import TriangleExclamation from '../Icons/TriangleExclamation.js';
|
|
8
9
|
|
|
9
|
-
export default function
|
|
10
|
+
export default function ErrorMessage(props) {
|
|
10
11
|
const {
|
|
11
12
|
text = 'Error',
|
|
12
13
|
color = 'red.500',
|
|
13
14
|
onOk,
|
|
14
15
|
} = props;
|
|
15
|
-
|
|
16
|
+
|
|
16
17
|
return <Modal isOpen={true} {...props} _backdrop={{ bg: "#000" }}>
|
|
17
18
|
<Modal.Content>
|
|
18
19
|
<Modal.Header>Alert</Modal.Header>
|
|
@@ -25,7 +26,9 @@ console.log('render ErrorMessage text', text);
|
|
|
25
26
|
borderRadius={5}
|
|
26
27
|
flexDirection="row"
|
|
27
28
|
>
|
|
28
|
-
<
|
|
29
|
+
<Box w="50px" mx={2}>
|
|
30
|
+
<Icon as={TriangleExclamation} color="red.500" size="10" />
|
|
31
|
+
</Box>
|
|
29
32
|
<Text color={color} fontSize="18px">{text}</Text>
|
|
30
33
|
</Modal.Body>
|
|
31
34
|
<Modal.Footer py={2} pr={4}>
|
|
@@ -396,10 +396,9 @@ function TabBar(props) {
|
|
|
396
396
|
renderedCurrentTabContent = renderCurrentTabContent(),
|
|
397
397
|
renderedToggleButton = !disableCollapse ? renderToggleButton() : null;
|
|
398
398
|
|
|
399
|
-
|
|
399
|
+
let tabBar = null;
|
|
400
400
|
if (direction === VERTICAL) {
|
|
401
|
-
|
|
402
|
-
<Column
|
|
401
|
+
tabBar = <Column
|
|
403
402
|
alignItems="center"
|
|
404
403
|
justifyContent="flex-start"
|
|
405
404
|
py={2}
|
|
@@ -411,21 +410,22 @@ function TabBar(props) {
|
|
|
411
410
|
<Column flex={1} w="100%" justifyContent="flex-end">
|
|
412
411
|
{renderedToggleButton}
|
|
413
412
|
</Column>
|
|
414
|
-
</Column
|
|
415
|
-
|
|
413
|
+
</Column>;
|
|
414
|
+
if (renderedCurrentTabContent) {
|
|
415
|
+
tabBar = <Row flex={1} w="100%" {...propsToPass}>
|
|
416
|
+
{tabBar}
|
|
416
417
|
<Column
|
|
417
418
|
alignItems="center"
|
|
418
419
|
justifyContent="flex-start"
|
|
419
420
|
flex={1}
|
|
420
421
|
>
|
|
421
422
|
{renderedCurrentTabContent}
|
|
422
|
-
</Column>
|
|
423
|
-
|
|
423
|
+
</Column>
|
|
424
|
+
</Row>;
|
|
425
|
+
}
|
|
424
426
|
}
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
return <Column flex={1} w="100%" {...propsToPass}>
|
|
428
|
-
<Row
|
|
427
|
+
if (direction === HORIZONTAL) {
|
|
428
|
+
tabBar = <Row
|
|
429
429
|
alignItems="center"
|
|
430
430
|
justifyContent="flex-start"
|
|
431
431
|
p={2}
|
|
@@ -439,16 +439,21 @@ function TabBar(props) {
|
|
|
439
439
|
{renderedToggleButton}
|
|
440
440
|
</Row>
|
|
441
441
|
</Row>
|
|
442
|
-
</Row
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
442
|
+
</Row>;
|
|
443
|
+
if (renderedCurrentTabContent) {
|
|
444
|
+
tabBar = <Column flex={1} w="100%" {...propsToPass}>
|
|
445
|
+
{tabBar}
|
|
446
|
+
<Column
|
|
447
|
+
alignItems="center"
|
|
448
|
+
justifyContent="flex-start"
|
|
449
|
+
flex={1}
|
|
450
|
+
>
|
|
451
|
+
{renderedCurrentTabContent}
|
|
452
|
+
</Column>
|
|
453
|
+
</Column>;
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
return tabBar;
|
|
452
457
|
}
|
|
453
458
|
|
|
454
459
|
export default withComponent(TabBar);
|