@onehat/ui 0.4.70 → 0.4.72
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 +2 -1
- package/src/Components/Accordion/Accordion.js +1 -0
- package/src/Components/Blank.js +1 -0
- package/src/Components/Buttons/BackButton.js +1 -0
- package/src/Components/Buttons/Button.js +18 -10
- package/src/Components/Buttons/CartButtonWithBadge.js +1 -0
- package/src/Components/Buttons/IconButton.js +9 -8
- package/src/Components/Buttons/PlusMinusButton.js +5 -4
- package/src/Components/Buttons/SquareButton.js +19 -18
- package/src/Components/Container/Container.js +1 -0
- package/src/Components/Container/ContainerColumn.js +4 -3
- package/src/Components/Container/ScreenContainer.js +14 -13
- package/src/Components/Container/Splitter.js +33 -28
- package/src/Components/Editor/InlineEditor.js +32 -30
- package/src/Components/Fab/DynamicFab.js +14 -13
- package/src/Components/Fab/FabWithTooltip.js +1 -0
- package/src/Components/Filter/DateRange.js +8 -7
- package/src/Components/Filter/NumberRange.js +8 -7
- package/src/Components/Form/Field/CKEditor/CKEditor.js +1 -0
- package/src/Components/Form/Field/Checkbox/CheckboxGroup.js +1 -0
- package/src/Components/Form/Field/Color.js +41 -40
- package/src/Components/Form/Field/Combo/Combo.js +173 -172
- package/src/Components/Form/Field/Combo/MeterTypesCombo.js +4 -2
- package/src/Components/Form/Field/Combo/PageSizeCombo.js +1 -0
- package/src/Components/Form/Field/Date.js +117 -116
- package/src/Components/Form/Field/DisplayField.js +6 -5
- package/src/Components/Form/Field/File.js +1 -0
- package/src/Components/Form/Field/FormikForm.js +1 -0
- package/src/Components/Form/Field/Input.js +20 -18
- package/src/Components/Form/Field/Json.js +7 -6
- package/src/Components/Form/Field/Number.js +31 -30
- package/src/Components/Form/Field/RadioGroup/RadioGroup.js +1 -0
- package/src/Components/Form/Field/Select/PageSizeSelect.js +1 -0
- package/src/Components/Form/Field/Select/Select.js +9 -8
- package/src/Components/Form/Field/Slider.js +15 -14
- package/src/Components/Form/Field/Tag/Tag.js +25 -24
- package/src/Components/Form/Field/Tag/ValueBox.js +32 -31
- package/src/Components/Form/Field/Text.js +9 -8
- package/src/Components/Form/Field/TextArea.js +9 -8
- package/src/Components/Form/Field/Toggle.js +16 -15
- package/src/Components/Form/FieldSet.js +27 -26
- package/src/Components/Form/Form.js +104 -103
- package/src/Components/Form/Label.js +15 -14
- package/src/Components/Grid/Grid.js +62 -52
- package/src/Components/Grid/GridHeaderRow.js +42 -40
- package/src/Components/Grid/GridRow.js +92 -90
- package/src/Components/Grid/HeaderColumnSelectorHandle.js +9 -8
- package/src/Components/Grid/HeaderReorderHandle.js +9 -8
- package/src/Components/Grid/HeaderResizeHandle.js +9 -8
- package/src/Components/Grid/NoRecordsFound.js +4 -3
- package/src/Components/Grid/RowDragHandle.js +26 -10
- package/src/Components/Grid/RowHandle.js +55 -0
- package/src/Components/Grid/RowSelectHandle.js +1 -0
- package/src/{Hooks → Components/Grid}/useAsyncRenderers.js +1 -1
- package/src/Components/Hoc/Secondary/withSecondaryData.js +2 -1
- package/src/Components/Hoc/Secondary/withSecondaryEditor.js +4 -3
- package/src/Components/Hoc/Secondary/withSecondarySelection.js +3 -2
- package/src/Components/Hoc/Secondary/withSecondaryValue.js +2 -1
- package/src/Components/Hoc/Secondary/withSecondaryWindowedEditor.js +6 -5
- package/src/Components/Hoc/withAlert.js +38 -35
- package/src/Components/Hoc/withCollapsible.js +9 -4
- package/src/Components/Hoc/withComponent.js +6 -0
- package/src/Components/Hoc/withContextMenu.js +33 -26
- package/src/Components/Hoc/withData.js +3 -2
- package/src/Components/Hoc/withDnd.js +17 -8
- package/src/Components/Hoc/withDraggable.js +21 -5
- package/src/Components/Hoc/withEditor.js +3 -2
- package/src/Components/Hoc/withEvents.js +11 -1
- package/src/Components/Hoc/withFilters.js +26 -20
- package/src/Components/Hoc/withModal.js +10 -8
- package/src/Components/Hoc/withPdfButtons.js +3 -2
- package/src/Components/Hoc/withPermissions.js +3 -2
- package/src/Components/Hoc/withPresetButtons.js +3 -2
- package/src/Components/Hoc/withSelection.js +2 -8
- package/src/Components/Hoc/withToast.js +5 -2
- package/src/Components/Hoc/withTooltip.js +10 -1
- package/src/Components/Hoc/withValue.js +3 -9
- package/src/Components/Hoc/withWindowedEditor.js +6 -5
- package/src/Components/Layout/AsyncOperation.js +1 -0
- package/src/Components/Layout/CenterBox.js +9 -8
- package/src/Components/Layout/Footer.js +11 -10
- package/src/Components/Layout/ScreenHeader.js +5 -4
- package/src/Components/Layout/TextWithTooltip.js +1 -0
- package/src/Components/Messages/ConfirmationMessage.js +6 -5
- package/src/Components/Messages/ErrorMessage.js +40 -39
- package/src/Components/Messages/GlobalModals.js +47 -0
- package/src/Components/Messages/Loading.js +1 -0
- package/src/Components/Messages/OkMessage.js +11 -10
- package/src/Components/Messages/Unauthorized.js +1 -0
- package/src/Components/Messages/WaitMessage.js +16 -15
- package/src/Components/Panel/AccordionGridPanel.js +1 -0
- package/src/Components/Panel/FormPanel.js +1 -0
- package/src/Components/Panel/Header.js +59 -58
- package/src/Components/Panel/Mask.js +1 -0
- package/src/Components/Panel/Panel.js +7 -6
- package/src/Components/Picker/Picker.js +1 -0
- package/src/Components/Report/Report.js +35 -34
- package/src/Components/Screens/Manager.js +1 -0
- package/src/Components/Screens/ReportsManager.js +1 -0
- package/src/Components/Tab/Tab.js +1 -0
- package/src/Components/Tab/TabBar.js +67 -66
- package/src/Components/Toolbar/FilterToolbar.js +14 -11
- package/src/Components/Toolbar/Pagination.js +26 -25
- package/src/Components/Toolbar/PaginationToolbar.js +13 -12
- package/src/Components/Toolbar/Toolbar.js +13 -12
- package/src/Components/Tooltip/Tooltip.js +1 -0
- package/src/Components/Tree/Tree.js +34 -17
- package/src/Components/Tree/TreeNode.js +30 -29
- package/src/Components/Tree/TreeNodeDragHandle.js +18 -13
- package/src/Components/Viewer/MeterTypeText.js +29 -8
- package/src/Components/Viewer/TextWithLinks.js +16 -15
- package/src/Components/Viewer/Viewer.js +23 -22
- package/src/Components/Window/UploadsDownloadsWindow.js +6 -5
- package/src/Components/index.js +1 -0
- package/src/Constants/MeterTypes.js +2 -0
- package/src/Functions/addIconProps.js +46 -0
- package/src/Functions/testProps.js +1 -1
- package/src/Hooks/useWhyDidYouUpdate.js +33 -0
- package/src/PlatformImports/Web/Attachments.js +1 -1
- package/src/Components/Hoc/withBlank.js +0 -10
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
Modal, ModalBackdrop, ModalHeader, ModalContent, ModalCloseButton, ModalBody, ModalFooter,
|
|
6
6
|
Text,
|
|
7
7
|
} from '@project-components/Gluestack';
|
|
8
|
+
import clsx from 'clsx';
|
|
8
9
|
import useAdjustedWindowSize from '../../Hooks/useAdjustedWindowSize.js';
|
|
9
10
|
import Button from '../Buttons/Button.js';
|
|
10
11
|
import Panel from '../Panel/Panel.js';
|
|
@@ -33,12 +34,12 @@ export default function ErrorMessage(props) {
|
|
|
33
34
|
disableAutoFlex={true}
|
|
34
35
|
onClose={onOk}
|
|
35
36
|
footer={<Footer
|
|
36
|
-
className={
|
|
37
|
-
justify-end
|
|
38
|
-
py-2
|
|
39
|
-
px-4
|
|
40
|
-
bg-grey-100
|
|
41
|
-
|
|
37
|
+
className={clsx(
|
|
38
|
+
'justify-end',
|
|
39
|
+
'py-2',
|
|
40
|
+
'px-4',
|
|
41
|
+
'bg-grey-100',
|
|
42
|
+
)}
|
|
42
43
|
>
|
|
43
44
|
<Button
|
|
44
45
|
{...testProps('okBtn')}
|
|
@@ -50,40 +51,40 @@ export default function ErrorMessage(props) {
|
|
|
50
51
|
</Footer>}
|
|
51
52
|
>
|
|
52
53
|
<HStack className="ErrorMessage-HStack flex-1 w-full p-4">
|
|
53
|
-
<Box className={
|
|
54
|
-
ErrorMessage-Box1
|
|
55
|
-
h-full
|
|
56
|
-
w-[100px]
|
|
57
|
-
flex
|
|
58
|
-
items-center
|
|
59
|
-
justify-center
|
|
60
|
-
pr-3
|
|
61
|
-
|
|
62
|
-
<Icon as={TriangleExclamation} className={
|
|
63
|
-
ErrorMessage-Icon
|
|
64
|
-
h-[40px]
|
|
65
|
-
w-[40px]
|
|
66
|
-
text-${color}
|
|
67
|
-
|
|
54
|
+
<Box className={clsx(
|
|
55
|
+
'ErrorMessage-Box1',
|
|
56
|
+
'h-full',
|
|
57
|
+
'w-[100px]',
|
|
58
|
+
'flex',
|
|
59
|
+
'items-center',
|
|
60
|
+
'justify-center',
|
|
61
|
+
'pr-3',
|
|
62
|
+
)}>
|
|
63
|
+
<Icon as={TriangleExclamation} className={clsx(
|
|
64
|
+
'ErrorMessage-Icon',
|
|
65
|
+
'h-[40px]',
|
|
66
|
+
'w-[40px]',
|
|
67
|
+
`text-${color}`,
|
|
68
|
+
)} />
|
|
68
69
|
</Box>
|
|
69
|
-
<Box className={
|
|
70
|
-
ErrorMessage-Box2
|
|
71
|
-
h-full
|
|
72
|
-
flex
|
|
73
|
-
flex-1
|
|
74
|
-
items-start
|
|
75
|
-
justify-center
|
|
76
|
-
overflow-hidden
|
|
77
|
-
|
|
78
|
-
<Text className={
|
|
79
|
-
ErrorMessage-Text
|
|
80
|
-
text-${color}
|
|
81
|
-
text-[18px]
|
|
82
|
-
break-words
|
|
83
|
-
whitespace-normal
|
|
84
|
-
w-full
|
|
85
|
-
overflow-auto
|
|
86
|
-
|
|
70
|
+
<Box className={clsx(
|
|
71
|
+
'ErrorMessage-Box2',
|
|
72
|
+
'h-full',
|
|
73
|
+
'flex',
|
|
74
|
+
'flex-1',
|
|
75
|
+
'items-start',
|
|
76
|
+
'justify-center',
|
|
77
|
+
'overflow-hidden',
|
|
78
|
+
)}>
|
|
79
|
+
<Text className={clsx(
|
|
80
|
+
'ErrorMessage-Text',
|
|
81
|
+
`text-${color}`,
|
|
82
|
+
'text-[18px]',
|
|
83
|
+
'break-words',
|
|
84
|
+
'whitespace-normal',
|
|
85
|
+
'w-full',
|
|
86
|
+
'overflow-auto',
|
|
87
|
+
)}>{text}</Text>
|
|
87
88
|
</Box>
|
|
88
89
|
</HStack>
|
|
89
90
|
</Panel>
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
|
|
2
|
+
import { useSelector, useDispatch, } from 'react-redux';
|
|
3
|
+
import {
|
|
4
|
+
selectIsWaitModalShown,
|
|
5
|
+
selectAlertMessage,
|
|
6
|
+
selectDebugMessage,
|
|
7
|
+
selectInfoMessage,
|
|
8
|
+
selectWaitMessage,
|
|
9
|
+
setAlertMessage,
|
|
10
|
+
setDebugMessage,
|
|
11
|
+
setInfoMessage,
|
|
12
|
+
} from '@src/models/Slices/DebugSlice';
|
|
13
|
+
import WaitMessage from './WaitMessage';
|
|
14
|
+
import ErrorMessage from './ErrorMessage';
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
export default function GlobalModals() {
|
|
19
|
+
const
|
|
20
|
+
dispatch = useDispatch(),
|
|
21
|
+
isWaitModalShown = useSelector(selectIsWaitModalShown),
|
|
22
|
+
alertMessage = useSelector(selectAlertMessage),
|
|
23
|
+
debugMessage = useSelector(selectDebugMessage),
|
|
24
|
+
infoMessage = useSelector(selectInfoMessage),
|
|
25
|
+
waitMessage = useSelector(selectWaitMessage);
|
|
26
|
+
|
|
27
|
+
return <>
|
|
28
|
+
{isWaitModalShown && <WaitMessage text={waitMessage} />}
|
|
29
|
+
{!isWaitModalShown && alertMessage &&
|
|
30
|
+
<ErrorMessage
|
|
31
|
+
text={alertMessage}
|
|
32
|
+
onOk={() => dispatch(setAlertMessage(null))}
|
|
33
|
+
/>}
|
|
34
|
+
{!isWaitModalShown && debugMessage &&
|
|
35
|
+
<ErrorMessage
|
|
36
|
+
text={debugMessage}
|
|
37
|
+
color="green"
|
|
38
|
+
onOk={() => dispatch(setDebugMessage(null))}
|
|
39
|
+
/>}
|
|
40
|
+
{!isWaitModalShown && infoMessage &&
|
|
41
|
+
<ErrorMessage
|
|
42
|
+
text={infoMessage}
|
|
43
|
+
color="#000"
|
|
44
|
+
onOk={() => dispatch(setInfoMessage(null))}
|
|
45
|
+
/>}
|
|
46
|
+
</>;
|
|
47
|
+
}
|
|
@@ -2,6 +2,7 @@ import {
|
|
|
2
2
|
Modal, ModalBackdrop, ModalHeader, ModalContent, ModalCloseButton, ModalBody, ModalFooter,
|
|
3
3
|
Text,
|
|
4
4
|
} from '@project-components/Gluestack';
|
|
5
|
+
import clsx from 'clsx';
|
|
5
6
|
import Button from '../Buttons/Button';
|
|
6
7
|
|
|
7
8
|
export default function OkMessage(props) {
|
|
@@ -14,20 +15,20 @@ export default function OkMessage(props) {
|
|
|
14
15
|
<ModalBackdrop />
|
|
15
16
|
<ModalContent maxWidth="400px">
|
|
16
17
|
<ModalBody
|
|
17
|
-
className={
|
|
18
|
-
p-5
|
|
19
|
-
pb-0
|
|
20
|
-
border-t-0
|
|
21
|
-
|
|
18
|
+
className={clsx(
|
|
19
|
+
'p-5',
|
|
20
|
+
'pb-0',
|
|
21
|
+
'border-t-0',
|
|
22
|
+
)}
|
|
22
23
|
>
|
|
23
24
|
<Text className="text-black">{textMessage}</Text>
|
|
24
25
|
</ModalBody>
|
|
25
26
|
<ModalFooter
|
|
26
|
-
className={
|
|
27
|
-
p-0
|
|
28
|
-
pr-4
|
|
29
|
-
border-t-0
|
|
30
|
-
|
|
27
|
+
className={clsx(
|
|
28
|
+
'p-0',
|
|
29
|
+
'pr-4',
|
|
30
|
+
'border-t-0',
|
|
31
|
+
)}
|
|
31
32
|
>
|
|
32
33
|
<Button
|
|
33
34
|
variant="outline"
|
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
Spinner,
|
|
5
5
|
Text,
|
|
6
6
|
} from '@project-components/Gluestack';
|
|
7
|
+
import clsx from 'clsx';
|
|
7
8
|
import testProps from '../../Functions/testProps.js';
|
|
8
9
|
|
|
9
10
|
export default function WaitMessage(props) {
|
|
@@ -22,25 +23,25 @@ export default function WaitMessage(props) {
|
|
|
22
23
|
>
|
|
23
24
|
<ModalBackdrop />
|
|
24
25
|
<ModalContent
|
|
25
|
-
className={
|
|
26
|
-
ModalContent
|
|
27
|
-
w-[200px]
|
|
28
|
-
h-[50px]
|
|
29
|
-
shadow-lg
|
|
30
|
-
|
|
26
|
+
className={clsx(
|
|
27
|
+
'ModalContent',
|
|
28
|
+
'w-[200px]',
|
|
29
|
+
'h-[50px]',
|
|
30
|
+
'shadow-lg',
|
|
31
|
+
)}
|
|
31
32
|
>
|
|
32
33
|
<HStack
|
|
33
|
-
className={
|
|
34
|
-
HStack
|
|
35
|
-
items-center
|
|
36
|
-
justify-center
|
|
37
|
-
|
|
34
|
+
className={clsx(
|
|
35
|
+
'HStack',
|
|
36
|
+
'items-center',
|
|
37
|
+
'justify-center',
|
|
38
|
+
)}
|
|
38
39
|
>
|
|
39
40
|
<Spinner
|
|
40
|
-
className={
|
|
41
|
-
mr-2
|
|
42
|
-
focus:outline-none
|
|
43
|
-
|
|
41
|
+
className={clsx(
|
|
42
|
+
'mr-2',
|
|
43
|
+
'focus:outline-none',
|
|
44
|
+
)}
|
|
44
45
|
/>
|
|
45
46
|
<Text className="text-black">{text}</Text>
|
|
46
47
|
</HStack>
|
|
@@ -3,6 +3,7 @@ import {
|
|
|
3
3
|
ScrollView,
|
|
4
4
|
VStack,
|
|
5
5
|
} from '@project-components/Gluestack';
|
|
6
|
+
import clsx from 'clsx';
|
|
6
7
|
import Accordion from 'react-native-collapsible/Accordion'; // https://www.npmjs.com/package/react-native-collapsible
|
|
7
8
|
import testProps from '../../Functions/testProps';
|
|
8
9
|
import Footer from '../Layout/Footer.js';
|
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
TextNative,
|
|
6
6
|
VStack,
|
|
7
7
|
} from '@project-components/Gluestack';
|
|
8
|
+
import clsx from 'clsx';
|
|
8
9
|
import {
|
|
9
10
|
HORIZONTAL,
|
|
10
11
|
VERTICAL,
|
|
@@ -41,17 +42,17 @@ export default function Header(props) {
|
|
|
41
42
|
let closeBtn = null,
|
|
42
43
|
collapseBtn = null;
|
|
43
44
|
if (onClose) {
|
|
44
|
-
let closeClassName =
|
|
45
|
-
Header-closeBtn
|
|
46
|
-
self-center
|
|
47
|
-
border
|
|
48
|
-
border-grey-400
|
|
49
|
-
h-[20px]
|
|
50
|
-
w-[20px]
|
|
51
|
-
px-[2px]
|
|
52
|
-
py-[2px]
|
|
53
|
-
|
|
54
|
-
|
|
45
|
+
let closeClassName = clsx(
|
|
46
|
+
'Header-closeBtn',
|
|
47
|
+
'self-center',
|
|
48
|
+
'border',
|
|
49
|
+
'border-grey-400',
|
|
50
|
+
'h-[20px]',
|
|
51
|
+
'w-[20px]',
|
|
52
|
+
'px-[2px]',
|
|
53
|
+
'py-[2px]',
|
|
54
|
+
styles.PANEL_HEADER_BG,
|
|
55
|
+
);
|
|
55
56
|
if (collapseDirection === HORIZONTAL && isCollapsed) {
|
|
56
57
|
closeClassName += ' mb-1';
|
|
57
58
|
}
|
|
@@ -67,17 +68,17 @@ export default function Header(props) {
|
|
|
67
68
|
/>;
|
|
68
69
|
}
|
|
69
70
|
if (isCollapsible) {
|
|
70
|
-
let collapseClassName =
|
|
71
|
-
Header-collapseBtn
|
|
72
|
-
self-center
|
|
73
|
-
border
|
|
74
|
-
border-grey-400
|
|
75
|
-
h-[20px]
|
|
76
|
-
w-[20px]
|
|
77
|
-
px-[2px]
|
|
78
|
-
py-[2px]
|
|
79
|
-
|
|
80
|
-
|
|
71
|
+
let collapseClassName = clsx(
|
|
72
|
+
'Header-collapseBtn',
|
|
73
|
+
'self-center',
|
|
74
|
+
'border',
|
|
75
|
+
'border-grey-400',
|
|
76
|
+
'h-[20px]',
|
|
77
|
+
'w-[20px]',
|
|
78
|
+
'px-[2px]',
|
|
79
|
+
'py-[2px]',
|
|
80
|
+
styles.PANEL_HEADER_BG,
|
|
81
|
+
);
|
|
81
82
|
if (collapseDirection === HORIZONTAL && isCollapsed) {
|
|
82
83
|
collapseClassName += ' mb-1';
|
|
83
84
|
}
|
|
@@ -97,17 +98,17 @@ export default function Header(props) {
|
|
|
97
98
|
doubleClickStyle.cursor = 'pointer';
|
|
98
99
|
}
|
|
99
100
|
|
|
100
|
-
let panelClassName =
|
|
101
|
-
Header
|
|
102
|
-
bg-grey-300
|
|
103
|
-
items-center
|
|
104
|
-
justify-start
|
|
105
|
-
py-1
|
|
106
|
-
border-b-grey-400
|
|
107
|
-
border-b-1
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
101
|
+
let panelClassName = clsx(
|
|
102
|
+
'Header',
|
|
103
|
+
'bg-grey-300',
|
|
104
|
+
'items-center',
|
|
105
|
+
'justify-start',
|
|
106
|
+
'py-1',
|
|
107
|
+
'border-b-grey-400',
|
|
108
|
+
'border-b-1',
|
|
109
|
+
isWindow ? 'rounded-t-lg' : '',
|
|
110
|
+
styles.PANEL_HEADER_BG,
|
|
111
|
+
);
|
|
111
112
|
if (CURRENT_MODE === UI_MODE_WEB) {
|
|
112
113
|
|
|
113
114
|
if (isCollapsed) {
|
|
@@ -137,12 +138,12 @@ export default function Header(props) {
|
|
|
137
138
|
<TextNative
|
|
138
139
|
numberOfLines={1}
|
|
139
140
|
ellipsizeMode="head"
|
|
140
|
-
className={
|
|
141
|
-
Header-TextNative1
|
|
142
|
-
flex-1
|
|
143
|
-
font-bold
|
|
144
|
-
|
|
145
|
-
|
|
141
|
+
className={clsx(
|
|
142
|
+
'Header-TextNative1',
|
|
143
|
+
'flex-1',
|
|
144
|
+
'font-bold',
|
|
145
|
+
styles.PANEL_HEADER_TEXT_CLASSNAME,
|
|
146
|
+
)}>{title}</TextNative>
|
|
146
147
|
</div>
|
|
147
148
|
</VStack>
|
|
148
149
|
</div>;
|
|
@@ -175,12 +176,12 @@ export default function Header(props) {
|
|
|
175
176
|
<TextNative
|
|
176
177
|
numberOfLines={1}
|
|
177
178
|
ellipsizeMode="head"
|
|
178
|
-
className={
|
|
179
|
-
Header-TextNative2
|
|
180
|
-
flex-1
|
|
181
|
-
font-bold
|
|
182
|
-
|
|
183
|
-
|
|
179
|
+
className={clsx(
|
|
180
|
+
'Header-TextNative2',
|
|
181
|
+
'flex-1',
|
|
182
|
+
'font-bold',
|
|
183
|
+
styles.PANEL_HEADER_TEXT_CLASSNAME,
|
|
184
|
+
)}
|
|
184
185
|
>{title}</TextNative>
|
|
185
186
|
{collapseBtn}
|
|
186
187
|
</HStack>
|
|
@@ -215,13 +216,13 @@ export default function Header(props) {
|
|
|
215
216
|
numberOfLines={1}
|
|
216
217
|
ellipsizeMode="head"
|
|
217
218
|
style={{ transform: [{ rotate: '-90deg'}] }}
|
|
218
|
-
className={
|
|
219
|
-
Header-TextNative3
|
|
220
|
-
font-bold
|
|
221
|
-
w-[200px]
|
|
222
|
-
text-right
|
|
223
|
-
|
|
224
|
-
|
|
219
|
+
className={clsx(
|
|
220
|
+
'Header-TextNative3',
|
|
221
|
+
'font-bold',
|
|
222
|
+
'w-[200px]',
|
|
223
|
+
'text-right',
|
|
224
|
+
styles.PANEL_HEADER_TEXT_CLASSNAME,
|
|
225
|
+
)}
|
|
225
226
|
>{title}</TextNative>
|
|
226
227
|
</VStack>
|
|
227
228
|
</VStack>
|
|
@@ -251,12 +252,12 @@ export default function Header(props) {
|
|
|
251
252
|
<TextNative
|
|
252
253
|
numberOfLines={1}
|
|
253
254
|
ellipsizeMode="head"
|
|
254
|
-
className={
|
|
255
|
-
Header-TextNative4
|
|
256
|
-
font-bold
|
|
257
|
-
flex-1
|
|
258
|
-
|
|
259
|
-
|
|
255
|
+
className={clsx(
|
|
256
|
+
'Header-TextNative4',
|
|
257
|
+
'font-bold',
|
|
258
|
+
'flex-1',
|
|
259
|
+
styles.PANEL_HEADER_TEXT_CLASSNAME,
|
|
260
|
+
)}>{title}</TextNative>
|
|
260
261
|
{collapseBtn}
|
|
261
262
|
</HStack>
|
|
262
263
|
</Pressable>;
|
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
VStack,
|
|
5
5
|
VStackNative,
|
|
6
6
|
} from '@project-components/Gluestack';
|
|
7
|
+
import clsx from 'clsx';
|
|
7
8
|
import {
|
|
8
9
|
HORIZONTAL,
|
|
9
10
|
VERTICAL,
|
|
@@ -136,12 +137,12 @@ function Panel(props) {
|
|
|
136
137
|
{!isCollapsed && <>
|
|
137
138
|
{topToolbar}
|
|
138
139
|
<VStack
|
|
139
|
-
className={
|
|
140
|
-
Panel-VSstack
|
|
141
|
-
flex-1
|
|
142
|
-
w-full
|
|
143
|
-
overflow-hidden
|
|
144
|
-
|
|
140
|
+
className={clsx(
|
|
141
|
+
'Panel-VSstack',
|
|
142
|
+
'flex-1',
|
|
143
|
+
'w-full',
|
|
144
|
+
'overflow-hidden',
|
|
145
|
+
)}
|
|
145
146
|
>
|
|
146
147
|
{isScrollable ?
|
|
147
148
|
<ScrollView
|
|
@@ -8,6 +8,7 @@ import {
|
|
|
8
8
|
VStack,
|
|
9
9
|
VStackNative,
|
|
10
10
|
} from '@project-components/Gluestack';
|
|
11
|
+
import clsx from 'clsx';
|
|
11
12
|
import { EDITOR_TYPE__PLAIN } from '../../Constants/Editor';
|
|
12
13
|
import {
|
|
13
14
|
UI_MODE_WEB,
|
|
@@ -72,11 +73,11 @@ function Report(props) {
|
|
|
72
73
|
}
|
|
73
74
|
|
|
74
75
|
if (isQuickReport) {
|
|
75
|
-
let className =
|
|
76
|
-
Report
|
|
77
|
-
max-w-[100px]
|
|
78
|
-
m-2
|
|
79
|
-
|
|
76
|
+
let className = clsx(
|
|
77
|
+
'Report',
|
|
78
|
+
'max-w-[100px]',
|
|
79
|
+
'm-2',
|
|
80
|
+
);
|
|
80
81
|
if (props.className) {
|
|
81
82
|
className += ' ' + props.className;
|
|
82
83
|
}
|
|
@@ -86,28 +87,28 @@ function Report(props) {
|
|
|
86
87
|
>
|
|
87
88
|
<Pressable
|
|
88
89
|
onPress={onPressQuickReport}
|
|
89
|
-
className={
|
|
90
|
-
flex-1
|
|
91
|
-
items-center
|
|
92
|
-
justify-center
|
|
93
|
-
flex-col
|
|
94
|
-
bg-white
|
|
95
|
-
p-3
|
|
96
|
-
rounded-lg
|
|
97
|
-
border
|
|
98
|
-
border-primary-300
|
|
99
|
-
hover:bg-primary-300
|
|
100
|
-
|
|
90
|
+
className={clsx(
|
|
91
|
+
'flex-1',
|
|
92
|
+
'items-center',
|
|
93
|
+
'justify-center',
|
|
94
|
+
'flex-col',
|
|
95
|
+
'bg-white',
|
|
96
|
+
'p-3',
|
|
97
|
+
'rounded-lg',
|
|
98
|
+
'border',
|
|
99
|
+
'border-primary-300',
|
|
100
|
+
'hover:bg-primary-300',
|
|
101
|
+
)}
|
|
101
102
|
>
|
|
102
103
|
{icon}
|
|
103
104
|
<Text
|
|
104
|
-
className={
|
|
105
|
-
text-black
|
|
106
|
-
text-center
|
|
107
|
-
text-[17px]
|
|
108
|
-
leading-tight
|
|
109
|
-
mt-2
|
|
110
|
-
|
|
105
|
+
className={clsx(
|
|
106
|
+
'text-black',
|
|
107
|
+
'text-center',
|
|
108
|
+
'text-[17px]',
|
|
109
|
+
'leading-tight',
|
|
110
|
+
'mt-2',
|
|
111
|
+
)}
|
|
111
112
|
>{title}</Text>
|
|
112
113
|
</Pressable>
|
|
113
114
|
</VStackNative>;
|
|
@@ -145,16 +146,16 @@ function Report(props) {
|
|
|
145
146
|
}
|
|
146
147
|
return <VStackNative
|
|
147
148
|
{...testProps('Report-' + reportId)}
|
|
148
|
-
className={
|
|
149
|
-
w-full
|
|
150
|
-
border
|
|
151
|
-
border-primary-300
|
|
152
|
-
p-4
|
|
153
|
-
mb-3
|
|
154
|
-
bg-white
|
|
155
|
-
rounded-lg
|
|
156
|
-
shadow-sm
|
|
157
|
-
|
|
149
|
+
className={clsx(
|
|
150
|
+
'w-full',
|
|
151
|
+
'border',
|
|
152
|
+
'border-primary-300',
|
|
153
|
+
'p-4',
|
|
154
|
+
'mb-3',
|
|
155
|
+
'bg-white',
|
|
156
|
+
'rounded-lg',
|
|
157
|
+
'shadow-sm',
|
|
158
|
+
)}
|
|
158
159
|
>
|
|
159
160
|
<HStack>
|
|
160
161
|
<Box className="w-[50px] mr-4">
|