@onehat/ui 0.2.55 → 0.2.56
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/Editor/Editor.js +1 -0
- package/src/Components/Form/Field/Combo/Combo.js +3 -1
- package/src/Components/Form/Form.js +2 -2
- package/src/Components/Form/Label.js +2 -1
- package/src/Components/Grid/Grid.js +2 -2
- package/src/Components/Hoc/withAlert.js +1 -1
- package/src/Components/Icons/EyeSlash.js +14 -0
- package/src/Components/Icons/UserPlus.js +14 -0
- package/src/Components/Layout/CenterBox.js +17 -0
- package/src/Components/Panel/AccordionGridPanel.js +1 -1
- package/src/Components/Toolbar/Toolbar.js +1 -1
- package/src/Data/Hoc/withRedux.js +6 -1
- package/src/Hooks/useWindowSize.js +4 -4
- /package/src/Components/{Panel → Layout}/Footer.js +0 -0
package/package.json
CHANGED
|
@@ -463,7 +463,8 @@ export function Combo(props) {
|
|
|
463
463
|
w={width + 'px'}
|
|
464
464
|
h={height ? height + 'px' : null}
|
|
465
465
|
minWidth={menuMinWidth}
|
|
466
|
-
overflow="
|
|
466
|
+
overflow="auto"
|
|
467
|
+
bg="#fff"
|
|
467
468
|
>
|
|
468
469
|
<Popover.Body
|
|
469
470
|
ref={menuRef}
|
|
@@ -484,6 +485,7 @@ export function Combo(props) {
|
|
|
484
485
|
py: 1,
|
|
485
486
|
pl: 4,
|
|
486
487
|
pr: 2,
|
|
488
|
+
w: '100%',
|
|
487
489
|
};
|
|
488
490
|
}}
|
|
489
491
|
{...props}
|
|
@@ -31,7 +31,7 @@ import AngleLeft from '../Icons/AngleLeft.js';
|
|
|
31
31
|
import Eye from '../Icons/Eye.js';
|
|
32
32
|
import Rotate from '../Icons/Rotate.js';
|
|
33
33
|
import Pencil from '../Icons/Pencil.js';
|
|
34
|
-
import Footer from '../
|
|
34
|
+
import Footer from '../Layout/Footer.js';
|
|
35
35
|
import Label from '../Form/Label.js';
|
|
36
36
|
import _ from 'lodash';
|
|
37
37
|
|
|
@@ -496,7 +496,7 @@ function Form(props) {
|
|
|
496
496
|
onPress={onViewMode}
|
|
497
497
|
leftIcon={<Icon as={Eye} color="#fff" size="sm" />}
|
|
498
498
|
color="#fff"
|
|
499
|
-
>View</Button>}
|
|
499
|
+
>To View</Button>}
|
|
500
500
|
</Row>
|
|
501
501
|
{!_.isEmpty(additionalButtons) &&
|
|
502
502
|
<Row p={2} alignItems="center" justifyContent="flex-end">
|
|
@@ -743,7 +743,7 @@ export function Grid(props) {
|
|
|
743
743
|
if (!Repository) {
|
|
744
744
|
return () => {};
|
|
745
745
|
}
|
|
746
|
-
if (!disableSelectorSelected) {
|
|
746
|
+
if (!disableSelectorSelected && selectorId) {
|
|
747
747
|
let id = selectorSelected?.id;
|
|
748
748
|
if (_.isEmpty(selectorSelected)) {
|
|
749
749
|
id = noSelectorMeansNoResults ? 'NO_MATCHES' : null;
|
|
@@ -797,7 +797,7 @@ export function Grid(props) {
|
|
|
797
797
|
scrollEnabled={true}
|
|
798
798
|
nestedScrollEnabled={true}
|
|
799
799
|
contentContainerStyle={{
|
|
800
|
-
overflow: '
|
|
800
|
+
overflow: 'auto',
|
|
801
801
|
borderWidth: isReorderMode ? 4 : 0,
|
|
802
802
|
borderColor: isReorderMode ? '#23d9ea' : null,
|
|
803
803
|
borderStyle: 'dashed',
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
ALERT_MODE_CUSTOM,
|
|
14
14
|
} from '../../Constants/Alert.js';
|
|
15
15
|
import Panel from '../Panel/Panel.js';
|
|
16
|
-
import Footer from '../
|
|
16
|
+
import Footer from '../Layout/Footer.js';
|
|
17
17
|
import TriangleExclamation from '../Icons/TriangleExclamation.js';
|
|
18
18
|
import _ from 'lodash';
|
|
19
19
|
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// Font Awesome Pro 6.2.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc.
|
|
2
|
+
import * as React from "react"
|
|
3
|
+
import Svg, { Path } from "react-native-svg"
|
|
4
|
+
import { Icon } from 'native-base';
|
|
5
|
+
|
|
6
|
+
function SvgComponent(props) {
|
|
7
|
+
return (
|
|
8
|
+
<Icon xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512" {...props}>
|
|
9
|
+
<Path d="M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2s-6.3 25.5 4.1 33.7l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7l-105.2-82.4c39.6-40.6 66.4-86.1 79.9-118.4 3.3-7.9 3.3-16.7 0-24.6-14.9-35.7-46.2-87.7-93-131.1C465.5 68.8 400.8 32 320 32c-68.2 0-125 26.3-169.3 60.8L38.8 5.1zm184.3 144.4c25.5-23.3 59.6-37.5 96.9-37.5 79.5 0 144 64.5 144 144 0 24.9-6.3 48.3-17.4 68.7L408 294.5c5.2-11.8 8-24.8 8-38.5 0-53-43-96-96-96-2.8 0-5.6.1-8.4.4 5.3 9.3 8.4 20.1 8.4 31.6 0 10.2-2.4 19.8-6.6 28.3l-90.3-70.8zm223.1 298L373 389.9c-16.4 6.5-34.3 10.1-53 10.1-79.5 0-144-64.5-144-144 0-6.9.5-13.6 1.4-20.2l-94.3-74.3c-22.8 29.7-39.1 59.3-48.6 82.2-3.3 7.9-3.3 16.7 0 24.6 14.9 35.7 46.2 87.7 93 131.1 47 43.8 111.7 80.6 192.5 80.6 47.8 0 89.9-12.9 126.2-32.5z" />
|
|
10
|
+
</Icon>
|
|
11
|
+
)
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export default SvgComponent
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// Font Awesome Pro 6.2.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc.
|
|
2
|
+
import * as React from "react"
|
|
3
|
+
import Svg, { Path } from "react-native-svg"
|
|
4
|
+
import { Icon } from 'native-base';
|
|
5
|
+
|
|
6
|
+
function SvgComponent(props) {
|
|
7
|
+
return (
|
|
8
|
+
<Icon xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512" {...props}>
|
|
9
|
+
<Path d="M352 128c0 70.7-57.3 128-128 128S96 198.7 96 128 153.3 0 224 0s128 57.3 128 128zM0 482.3C0 383.8 79.8 304 178.3 304h91.4c98.5 0 178.3 79.8 178.3 178.3 0 16.4-13.3 29.7-29.7 29.7H29.7C13.3 512 0 498.7 0 482.3zM504 312v-64h-64c-13.3 0-24-10.7-24-24s10.7-24 24-24h64v-64c0-13.3 10.7-24 24-24s24 10.7 24 24v64h64c13.3 0 24 10.7 24 24s-10.7 24-24 24h-64v64c0 13.3-10.7 24-24 24s-24-10.7-24-24z" />
|
|
10
|
+
</Icon>
|
|
11
|
+
)
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export default SvgComponent
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Box,
|
|
3
|
+
} from 'native-base';
|
|
4
|
+
|
|
5
|
+
export default function CenterBox(props) {
|
|
6
|
+
return <Box
|
|
7
|
+
alignItems="center"
|
|
8
|
+
justifyContent="center"
|
|
9
|
+
flex={1}
|
|
10
|
+
w="100%"
|
|
11
|
+
p={2}
|
|
12
|
+
safeAreaBottom
|
|
13
|
+
{...props}
|
|
14
|
+
>
|
|
15
|
+
{props.children}
|
|
16
|
+
</Box>;
|
|
17
|
+
}
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
} from 'native-base';
|
|
6
6
|
import Accordion from 'react-native-collapsible/Accordion'; // https://www.npmjs.com/package/react-native-collapsible
|
|
7
7
|
import testProps from '../../Functions/testProps';
|
|
8
|
-
import Footer from '
|
|
8
|
+
import Footer from '../Layout/Footer.js';
|
|
9
9
|
import Toolbar from '../Toolbar/Toolbar.js';
|
|
10
10
|
import PaginationToolbar from '../Toolbar/PaginationToolbar.js';
|
|
11
11
|
import NoRecordsFound from './NoRecordsFound.js';
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import { bindActionCreators } from 'redux';
|
|
2
2
|
import { connect } from 'react-redux';
|
|
3
|
-
import actionCreators from '../../../Models/actions/ActionCreators';
|
|
4
3
|
import _ from 'lodash';
|
|
5
4
|
|
|
5
|
+
let actionCreators = null;
|
|
6
|
+
|
|
7
|
+
export function setActionCreators(ac) {
|
|
8
|
+
actionCreators = ac;
|
|
9
|
+
}
|
|
10
|
+
|
|
6
11
|
// Usage:
|
|
7
12
|
// At top of file:
|
|
8
13
|
// import withRedux from '../../OneHat/Data/hoc/WithData';
|
|
@@ -6,16 +6,16 @@ import _ from 'lodash';
|
|
|
6
6
|
// For web only!
|
|
7
7
|
export default function useWindowSize() {
|
|
8
8
|
const [windowSize, setWindowSize] = useState({
|
|
9
|
-
width: window
|
|
10
|
-
height: window
|
|
9
|
+
width: window?.innerWidth || 0,
|
|
10
|
+
height: window?.innerHeight || 0,
|
|
11
11
|
});
|
|
12
12
|
|
|
13
13
|
const handleSize = () => {
|
|
14
14
|
const
|
|
15
15
|
existingSize = windowSize,
|
|
16
16
|
newSize = {
|
|
17
|
-
width: window
|
|
18
|
-
height: window
|
|
17
|
+
width: window?.innerWidth || 0,
|
|
18
|
+
height: window?.innerHeight || 0,
|
|
19
19
|
};
|
|
20
20
|
if (!_.isEqual(existingSize, newSize)) {
|
|
21
21
|
setWindowSize(newSize);
|
|
File without changes
|