@onehat/ui 0.3.260 → 0.3.262
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 +4 -3
- 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 +5 -2
- 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 +9 -10
- 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 +1 -3
- package/src/Components/Form/Field/Color.js +91 -85
- 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 +10 -11
- 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 +1 -3
- 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 +6 -7
- package/src/Components/Form/FiltersForm.js +0 -9
- package/src/Components/Form/Form.js +62 -45
- package/src/Components/Form/Label.js +4 -4
- package/src/Components/Grid/Grid.js +9 -11
- 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 +4 -6
- package/src/Components/Grid/HeaderResizeHandle.js +4 -6
- package/src/Components/Grid/NoRecordsFound.js +7 -7
- package/src/Components/Grid/RowDragHandle.js +4 -6
- package/src/Components/Hoc/Secondary/withSecondaryEditor.js +2 -1
- package/src/Components/Hoc/Secondary/withSecondaryWindowedEditor.js +1 -3
- package/src/Components/Hoc/withAlert.js +24 -14
- package/src/Components/Hoc/withBlank.js +0 -2
- package/src/Components/Hoc/withContextMenu.js +4 -9
- package/src/Components/Hoc/withEditor.js +2 -1
- package/src/Components/Hoc/withEvents.js +0 -2
- package/src/Components/Hoc/withFilters.js +11 -11
- package/src/Components/Hoc/withInlineEditor.js +5 -8
- package/src/Components/Hoc/withPdfButton.js +4 -5
- package/src/Components/Hoc/withPresetButtons.js +1 -1
- package/src/Components/Hoc/withTooltip.js +3 -3
- package/src/Components/Hoc/withWindowedEditor.js +1 -3
- package/src/Components/Icons/AddressBook.js +6 -10
- package/src/Components/Icons/Alt.js +7 -15
- package/src/Components/Icons/AngleLeft.js +6 -14
- package/src/Components/Icons/AngleRight.js +6 -14
- package/src/Components/Icons/AnglesLeft.js +6 -14
- package/src/Components/Icons/AnglesRight.js +6 -14
- package/src/Components/Icons/Asterisk.js +6 -10
- package/src/Components/Icons/Ban.js +8 -14
- package/src/Components/Icons/Bars.js +6 -10
- package/src/Components/Icons/BarsStaggered.js +6 -10
- package/src/Components/Icons/Bell.js +6 -19
- package/src/Components/Icons/BigCircle.js +6 -14
- package/src/Components/Icons/Book.js +6 -10
- package/src/Components/Icons/BookOpen.js +6 -10
- package/src/Components/Icons/Bookmark.js +7 -17
- package/src/Components/Icons/Bug.js +6 -10
- package/src/Components/Icons/Building.js +6 -10
- package/src/Components/Icons/Calendar.js +6 -14
- package/src/Components/Icons/Calendar2.js +6 -14
- package/src/Components/Icons/CalendarDays.js +6 -14
- package/src/Components/Icons/Camera.js +6 -14
- package/src/Components/Icons/CaretDown.js +6 -14
- package/src/Components/Icons/CaretUp.js +6 -14
- package/src/Components/Icons/CartPlus.js +6 -10
- package/src/Components/Icons/CartShopping.js +6 -10
- package/src/Components/Icons/CashRegister.js +6 -10
- package/src/Components/Icons/Certificate.js +6 -10
- package/src/Components/Icons/ChartLine.js +6 -10
- package/src/Components/Icons/ChartPie.js +6 -10
- package/src/Components/Icons/Check.js +6 -10
- package/src/Components/Icons/CheckDouble.js +6 -10
- package/src/Components/Icons/ChevronDown.js +6 -10
- package/src/Components/Icons/ChevronLeft.js +6 -10
- package/src/Components/Icons/ChevronRight.js +6 -10
- package/src/Components/Icons/ChevronUp.js +6 -10
- package/src/Components/Icons/Circle.js +6 -10
- package/src/Components/Icons/CircleArrowRight.js +6 -10
- package/src/Components/Icons/CircleExclamation.js +6 -14
- package/src/Components/Icons/CircleInfo.js +6 -10
- package/src/Components/Icons/CircleQuestion.js +6 -10
- package/src/Components/Icons/CircleXmark.js +6 -10
- package/src/Components/Icons/CircleXmarkRegular.js +6 -10
- package/src/Components/Icons/Clipboard.js +6 -14
- package/src/Components/Icons/ClipboardCheck.js +6 -17
- package/src/Components/Icons/ClipboardList.js +6 -16
- package/src/Components/Icons/Clock.js +6 -10
- package/src/Components/Icons/ClockRegular.js +6 -10
- package/src/Components/Icons/ClockRotateLeft.js +6 -10
- package/src/Components/Icons/Clone.js +6 -10
- package/src/Components/Icons/Collapse.js +6 -14
- package/src/Components/Icons/Comment.js +6 -10
- package/src/Components/Icons/CommentDots.js +6 -10
- package/src/Components/Icons/CommentRegular.js +6 -10
- package/src/Components/Icons/Comments.js +6 -10
- package/src/Components/Icons/CommentsRegular.js +6 -10
- package/src/Components/Icons/Copyright.js +6 -10
- package/src/Components/Icons/Dot.js +9 -15
- package/src/Components/Icons/Duplicate.js +6 -14
- package/src/Components/Icons/Edit.js +6 -14
- package/src/Components/Icons/EllipsisHorizontal.js +6 -16
- package/src/Components/Icons/EllipsisVertical.js +6 -14
- package/src/Components/Icons/Envelope.js +6 -10
- package/src/Components/Icons/EnvelopeRegular.js +6 -10
- package/src/Components/Icons/Excel.js +6 -10
- package/src/Components/Icons/Exclamation.js +6 -10
- package/src/Components/Icons/Expand.js +6 -10
- package/src/Components/Icons/Eye.js +6 -14
- package/src/Components/Icons/EyeSlash.js +6 -10
- package/src/Components/Icons/File.js +6 -14
- package/src/Components/Icons/FloppyDiskRegular.js +6 -10
- package/src/Components/Icons/Folder.js +6 -10
- package/src/Components/Icons/FolderClosed.js +6 -10
- package/src/Components/Icons/FolderOpen.js +6 -10
- package/src/Components/Icons/FolderTree.js +6 -10
- package/src/Components/Icons/FullWidth.js +9 -25
- package/src/Components/Icons/Gauge.js +6 -17
- package/src/Components/Icons/Gear.js +6 -14
- package/src/Components/Icons/Gears.js +6 -10
- package/src/Components/Icons/Gift.js +6 -10
- package/src/Components/Icons/Grip.js +6 -14
- package/src/Components/Icons/GripLines.js +6 -14
- package/src/Components/Icons/GripLinesVertical.js +6 -14
- package/src/Components/Icons/GripVertical.js +6 -14
- package/src/Components/Icons/Hammer.js +6 -10
- package/src/Components/Icons/Hand.js +6 -10
- package/src/Components/Icons/HighPriority.js +6 -17
- package/src/Components/Icons/House.js +6 -10
- package/src/Components/Icons/Images.js +6 -10
- package/src/Components/Icons/Info.js +6 -10
- package/src/Components/Icons/ItunesNote.js +6 -10
- package/src/Components/Icons/Js.js +6 -16
- package/src/Components/Icons/Leaf.js +6 -10
- package/src/Components/Icons/Link.js +6 -9
- package/src/Components/Icons/List.js +6 -10
- package/src/Components/Icons/ListCheck.js +6 -10
- package/src/Components/Icons/LocationDot.js +6 -10
- package/src/Components/Icons/Loop.js +6 -14
- package/src/Components/Icons/Loop1.js +7 -13
- package/src/Components/Icons/LoopAll.js +7 -13
- package/src/Components/Icons/LowPriority.js +6 -17
- package/src/Components/Icons/MagnifyingGlass.js +6 -10
- package/src/Components/Icons/Maximize.js +6 -10
- package/src/Components/Icons/MedPriority.js +6 -17
- package/src/Components/Icons/Microphone.js +6 -10
- package/src/Components/Icons/Minimize.js +6 -10
- package/src/Components/Icons/Minus.js +6 -14
- package/src/Components/Icons/MobileScreenButton.js +6 -10
- package/src/Components/Icons/MoneyBill.js +6 -10
- package/src/Components/Icons/MoneyBillWave.js +6 -10
- package/src/Components/Icons/Mouth.js +9 -21
- package/src/Components/Icons/Music.js +6 -10
- package/src/Components/Icons/Na.js +6 -14
- package/src/Components/Icons/NoLoop.js +10 -13
- package/src/Components/Icons/NoReorderRows.js +16 -22
- package/src/Components/Icons/ObjectGroupRegular.js +6 -10
- package/src/Components/Icons/Pause.js +6 -10
- package/src/Components/Icons/Pdf.js +6 -10
- package/src/Components/Icons/Pencil.js +6 -14
- package/src/Components/Icons/Phone.js +6 -10
- package/src/Components/Icons/Play.js +6 -10
- package/src/Components/Icons/Plus.js +6 -14
- package/src/Components/Icons/Presentation.js +6 -16
- package/src/Components/Icons/Print.js +6 -14
- package/src/Components/Icons/Question.js +6 -10
- package/src/Components/Icons/Rate-.25x.js +11 -17
- package/src/Components/Icons/Rate-.5x.js +10 -16
- package/src/Components/Icons/Rate-.75x.js +7 -13
- package/src/Components/Icons/Rate-1.25x.js +7 -13
- package/src/Components/Icons/Rate-1.5x.js +7 -13
- package/src/Components/Icons/Rate-1.75x.js +7 -13
- package/src/Components/Icons/Rate-1x.js +10 -16
- package/src/Components/Icons/Rate-2x.js +7 -13
- package/src/Components/Icons/RateIcon-.25x.js +7 -13
- package/src/Components/Icons/RateIcon-.5x.js +10 -16
- package/src/Components/Icons/RateIcon-.75x.js +7 -13
- package/src/Components/Icons/RateIcon-1.25x.js +7 -13
- package/src/Components/Icons/RateIcon-1.5x.js +7 -13
- package/src/Components/Icons/RateIcon-1.75x.js +7 -13
- package/src/Components/Icons/RateIcon-1x.js +7 -13
- package/src/Components/Icons/RateIcon-2x.js +7 -13
- package/src/Components/Icons/RectangleXmark.js +6 -10
- package/src/Components/Icons/RectangleXmarkRegular.js +6 -10
- package/src/Components/Icons/ReorderRows.js +7 -13
- package/src/Components/Icons/RightFromBracket.js +6 -10
- package/src/Components/Icons/RightLeft.js +6 -10
- package/src/Components/Icons/RightToBracket.js +6 -10
- package/src/Components/Icons/Rotate.js +6 -14
- package/src/Components/Icons/RotateLeft.js +6 -10
- package/src/Components/Icons/RotateRight.js +6 -14
- package/src/Components/Icons/ScrewdriverWrench.js +6 -10
- package/src/Components/Icons/Scroll.js +6 -10
- package/src/Components/Icons/Share.js +6 -10
- package/src/Components/Icons/Shop.js +6 -10
- package/src/Components/Icons/SideBySide.js +6 -20
- package/src/Components/Icons/SortDown.js +6 -10
- package/src/Components/Icons/SortDownAlt.js +6 -10
- package/src/Components/Icons/SortUp.js +6 -10
- package/src/Components/Icons/SortUpAlt.js +6 -14
- package/src/Components/Icons/Square.js +6 -10
- package/src/Components/Icons/SquareCheck.js +6 -10
- package/src/Components/Icons/SquareCheckRegular.js +6 -10
- package/src/Components/Icons/SquareMinus.js +6 -14
- package/src/Components/Icons/SquareRegular.js +6 -10
- package/src/Components/Icons/Store.js +6 -10
- package/src/Components/Icons/Table.js +6 -16
- package/src/Components/Icons/ThumbsDown.js +6 -10
- package/src/Components/Icons/ThumbsDownRegular.js +6 -10
- package/src/Components/Icons/ThumbsUp.js +6 -10
- package/src/Components/Icons/ThumbsUpRegular.js +6 -10
- package/src/Components/Icons/Trash.js +6 -14
- package/src/Components/Icons/TrashCan.js +6 -14
- package/src/Components/Icons/TriangleExclamation.js +6 -14
- package/src/Components/Icons/Truck.js +6 -10
- package/src/Components/Icons/TruckFast.js +6 -10
- package/src/Components/Icons/UploadDownload.js +7 -9
- package/src/Components/Icons/User.js +6 -10
- package/src/Components/Icons/UserGroup.js +6 -10
- package/src/Components/Icons/UserPlus.js +6 -10
- package/src/Components/Icons/UserSecret.js +6 -10
- package/src/Components/Icons/Video.js +6 -16
- package/src/Components/Icons/X.js +6 -10
- package/src/Components/Icons/Xmark.js +6 -10
- package/src/Components/Layout/CenterBox.js +1 -1
- package/src/Components/Layout/Footer.js +4 -4
- package/src/Components/Messages/ConfirmationMessage.js +8 -3
- package/src/Components/Messages/ErrorMessage.js +5 -2
- package/src/Components/Messages/Loading.js +6 -6
- package/src/Components/Messages/OkMessage.js +4 -3
- 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 +10 -12
- 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 +12 -8
- package/src/Components/Toolbar/PaginationToolbar.js +3 -3
- package/src/Components/Toolbar/Toolbar.js +4 -4
- package/src/Components/Tree/Tree.js +10 -13
- package/src/Components/Tree/TreeNode.js +4 -4
- package/src/Components/Viewer/Viewer.js +37 -24
- 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 +7 -3
- package/src/PlatformImports/Web/Attachments.js +11 -8
- package/src/PlatformImports/Web/File.js +4 -5
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import React, { useEffect, useState, useRef, isValidElement, } from 'react';
|
|
2
|
-
import { View, } from 'react-native';
|
|
3
2
|
import {
|
|
4
3
|
Box,
|
|
5
|
-
|
|
4
|
+
Button,
|
|
5
|
+
ButtonText,
|
|
6
|
+
VStack,
|
|
7
|
+
HStack,
|
|
6
8
|
Icon,
|
|
7
|
-
Row,
|
|
8
9
|
ScrollView,
|
|
9
10
|
Text,
|
|
10
|
-
} from '
|
|
11
|
+
} from '@gluestack-ui/themed';
|
|
11
12
|
import {
|
|
12
13
|
EDITOR_TYPE__INLINE,
|
|
13
14
|
EDITOR_TYPE__WINDOWED,
|
|
@@ -30,7 +31,7 @@ import withPdfButton from '../Hoc/withPdfButton.js';
|
|
|
30
31
|
import inArray from '../../Functions/inArray.js';
|
|
31
32
|
import getComponentFromType from '../../Functions/getComponentFromType.js';
|
|
32
33
|
import buildAdditionalButtons from '../../Functions/buildAdditionalButtons.js';
|
|
33
|
-
import Button from '../Buttons/Button.js';
|
|
34
|
+
// import Button from '../Buttons/Button.js';
|
|
34
35
|
import IconButton from '../Buttons/IconButton.js';
|
|
35
36
|
import AngleLeft from '../Icons/AngleLeft.js';
|
|
36
37
|
import Eye from '../Icons/Eye.js';
|
|
@@ -369,7 +370,7 @@ function Form(props) {
|
|
|
369
370
|
/>);
|
|
370
371
|
|
|
371
372
|
});
|
|
372
|
-
return <
|
|
373
|
+
return <HStack>{elements}</HStack>;
|
|
373
374
|
},
|
|
374
375
|
buildFromItems = () => {
|
|
375
376
|
return _.map(items, (item, ix) => buildFromItem(item, ix, columnDefaults));
|
|
@@ -511,10 +512,10 @@ function Form(props) {
|
|
|
511
512
|
if (containerWidth > STACK_ROW_THRESHOLD) {
|
|
512
513
|
element = <><Label {...labelProps}>{label}</Label>{element}</>;
|
|
513
514
|
} else {
|
|
514
|
-
element = <
|
|
515
|
+
element = <VStack><Label {...labelProps}>{label}</Label>{element}</VStack>;
|
|
515
516
|
}
|
|
516
517
|
}
|
|
517
|
-
return <
|
|
518
|
+
return <HStack key={ix} px={2} pb={1}>{element}</HStack>;
|
|
518
519
|
}
|
|
519
520
|
|
|
520
521
|
|
|
@@ -610,25 +611,25 @@ function Form(props) {
|
|
|
610
611
|
if (message) {
|
|
611
612
|
message = <Text color="#f00">{message}</Text>;
|
|
612
613
|
}
|
|
613
|
-
element = <
|
|
614
|
+
element = <VStack pt={1} flex={1}>
|
|
614
615
|
{element}
|
|
615
616
|
{message}
|
|
616
|
-
</
|
|
617
|
+
</VStack>;
|
|
617
618
|
|
|
618
619
|
if (item.additionalEditButtons) {
|
|
619
620
|
const buttons = buildAdditionalButtons(item.additionalEditButtons, self, { fieldState, formSetValue, formGetValues, formState });
|
|
620
621
|
if (containerWidth > STACK_ROW_THRESHOLD) {
|
|
621
|
-
element = <
|
|
622
|
+
element = <HStack flex={1} flexWrap="wrap">
|
|
622
623
|
{element}
|
|
623
624
|
{buttons}
|
|
624
|
-
</
|
|
625
|
+
</HStack>;
|
|
625
626
|
} else {
|
|
626
|
-
element = <
|
|
627
|
+
element = <VStack flex={1} w="100%">
|
|
627
628
|
{element}
|
|
628
|
-
<
|
|
629
|
+
<HStack flex={1} w="100%" mt={2} flexWrap="wrap">
|
|
629
630
|
{buttons}
|
|
630
|
-
</
|
|
631
|
-
</
|
|
631
|
+
</HStack>
|
|
632
|
+
</VStack>;
|
|
632
633
|
}
|
|
633
634
|
}
|
|
634
635
|
|
|
@@ -656,25 +657,25 @@ function Form(props) {
|
|
|
656
657
|
labelProps.w = defaults.labelWidth;
|
|
657
658
|
}
|
|
658
659
|
if (containerWidth > STACK_ROW_THRESHOLD) {
|
|
659
|
-
element = <
|
|
660
|
+
element = <HStack w="100%" py={1}>
|
|
660
661
|
<Label {...labelProps}>{requiredIndicator}{label}</Label>
|
|
661
662
|
{element}
|
|
662
|
-
</
|
|
663
|
+
</HStack>;
|
|
663
664
|
} else {
|
|
664
|
-
element = <
|
|
665
|
+
element = <VStack w="100%" py={1} mt={3}>
|
|
665
666
|
<Label {...labelProps}>{requiredIndicator}{label}</Label>
|
|
666
667
|
{element}
|
|
667
|
-
</
|
|
668
|
+
</VStack>;
|
|
668
669
|
}
|
|
669
670
|
} else if (disableLabels && requiredIndicator) {
|
|
670
|
-
element = <
|
|
671
|
+
element = <HStack w="100%" py={1}>
|
|
671
672
|
{requiredIndicator}
|
|
672
673
|
{element}
|
|
673
|
-
</
|
|
674
|
+
</HStack>;
|
|
674
675
|
}
|
|
675
676
|
|
|
676
677
|
const dirtyIcon = isDirty && !disableDirtyIcon ? <Icon as={Pencil} size="2xs" color="trueGray.300" position="absolute" top="2px" left="2px" /> : null;
|
|
677
|
-
return <
|
|
678
|
+
return <HStack key={ix} px={2} pb={1} bg={error ? '#fdd' : null}>{dirtyIcon}{element}</HStack>;
|
|
678
679
|
}}
|
|
679
680
|
/>;
|
|
680
681
|
},
|
|
@@ -720,7 +721,7 @@ function Form(props) {
|
|
|
720
721
|
fontStyle="italic"
|
|
721
722
|
>{description}</Text>;
|
|
722
723
|
}
|
|
723
|
-
components.push(<
|
|
724
|
+
components.push(<VStack key={'ancillary-' + ix} mx={2} my={5}>{title}{description}{element}</VStack>);
|
|
724
725
|
});
|
|
725
726
|
}
|
|
726
727
|
return components;
|
|
@@ -866,40 +867,44 @@ function Form(props) {
|
|
|
866
867
|
// formComponents = buildFromItems();
|
|
867
868
|
// const formAncillaryComponents = buildAncillary();
|
|
868
869
|
// editor = <>
|
|
869
|
-
// <
|
|
870
|
-
// <
|
|
870
|
+
// <VStack p={4}>{formComponents}</VStack>
|
|
871
|
+
// <VStack pt={4}>{formAncillaryComponents}</VStack>
|
|
871
872
|
// </>;
|
|
872
873
|
} else {
|
|
873
874
|
formComponents = buildFromItems();
|
|
874
875
|
const formAncillaryComponents = buildAncillary();
|
|
875
876
|
editor = <>
|
|
876
|
-
{containerWidth >= ONE_COLUMN_THRESHOLD ? <
|
|
877
|
-
{containerWidth < ONE_COLUMN_THRESHOLD ? <
|
|
878
|
-
<
|
|
877
|
+
{containerWidth >= ONE_COLUMN_THRESHOLD ? <HStack p={4} pl={0}>{formComponents}</HStack> : null}
|
|
878
|
+
{containerWidth < ONE_COLUMN_THRESHOLD ? <VStack p={4}>{formComponents}</VStack> : null}
|
|
879
|
+
<VStack m={2} pt={4} px={2}>{formAncillaryComponents}</VStack>
|
|
879
880
|
</>;
|
|
880
881
|
|
|
881
882
|
additionalButtons = buildAdditionalButtons(additionalEditButtons);
|
|
882
883
|
|
|
883
|
-
formButtons.push(<
|
|
884
|
+
formButtons.push(<HStack key="buttonsRow" px={4} pt={4} alignItems="center" justifyContent="flex-end">
|
|
884
885
|
{isSingle && editorMode === EDITOR_MODE__EDIT && onBack &&
|
|
885
886
|
<Button
|
|
886
887
|
key="backBtn"
|
|
887
888
|
onPress={onBack}
|
|
888
889
|
leftIcon={<Icon as={AngleLeft} color="#fff" size="sm" />}
|
|
889
890
|
color="#fff"
|
|
890
|
-
>
|
|
891
|
+
>
|
|
892
|
+
<ButtonText>Back</ButtonText>
|
|
893
|
+
</Button>}
|
|
891
894
|
{isSingle && editorMode === EDITOR_MODE__EDIT && onViewMode && !disableView &&
|
|
892
895
|
<Button
|
|
893
896
|
key="viewBtn"
|
|
894
897
|
onPress={onViewMode}
|
|
895
898
|
leftIcon={<Icon as={Eye} color="#fff" size="sm" />}
|
|
896
899
|
color="#fff"
|
|
897
|
-
>
|
|
898
|
-
|
|
900
|
+
>
|
|
901
|
+
<ButtonText>To View</ButtonText>
|
|
902
|
+
</Button>}
|
|
903
|
+
</HStack>);
|
|
899
904
|
if (editorMode === EDITOR_MODE__EDIT && !_.isEmpty(additionalButtons)) {
|
|
900
|
-
formButtons.push(<
|
|
905
|
+
formButtons.push(<HStack key="additionalButtonsRow" p={4} alignItems="center" justifyContent="flex-end" flexWrap="wrap">
|
|
901
906
|
{additionalButtons}
|
|
902
|
-
</
|
|
907
|
+
</HStack>)
|
|
903
908
|
}
|
|
904
909
|
}
|
|
905
910
|
|
|
@@ -958,7 +963,7 @@ function Form(props) {
|
|
|
958
963
|
}
|
|
959
964
|
}
|
|
960
965
|
|
|
961
|
-
return <
|
|
966
|
+
return <VStack {...sizeProps} onLayout={onLayoutDecorated} ref={formRef} testID="form">
|
|
962
967
|
{!!containerWidth && <>
|
|
963
968
|
{editorType === EDITOR_TYPE__INLINE &&
|
|
964
969
|
<Row
|
|
@@ -980,7 +985,7 @@ function Form(props) {
|
|
|
980
985
|
<Footer justifyContent="flex-end" {...footerProps} {...savingProps}>
|
|
981
986
|
{onDelete && editorMode === EDITOR_MODE__EDIT && isSingle &&
|
|
982
987
|
|
|
983
|
-
<
|
|
988
|
+
<HStack flex={1} justifyContent="flex-start">
|
|
984
989
|
<Button
|
|
985
990
|
key="deleteBtn"
|
|
986
991
|
onPress={onDelete}
|
|
@@ -989,8 +994,10 @@ function Form(props) {
|
|
|
989
994
|
bg: 'warningHover',
|
|
990
995
|
}}
|
|
991
996
|
color="#fff"
|
|
992
|
-
>
|
|
993
|
-
|
|
997
|
+
>
|
|
998
|
+
<ButtonText>Delete</ButtonText>
|
|
999
|
+
</Button>
|
|
1000
|
+
</HStack>}
|
|
994
1001
|
|
|
995
1002
|
{showResetBtn &&
|
|
996
1003
|
<IconButton
|
|
@@ -1010,7 +1017,9 @@ function Form(props) {
|
|
|
1010
1017
|
variant="ghost"
|
|
1011
1018
|
onPress={onCancel}
|
|
1012
1019
|
color="#fff"
|
|
1013
|
-
>
|
|
1020
|
+
>
|
|
1021
|
+
<ButtonText>Cancel</ButtonText>
|
|
1022
|
+
</Button>}
|
|
1014
1023
|
|
|
1015
1024
|
{showCloseBtn &&
|
|
1016
1025
|
<Button
|
|
@@ -1018,7 +1027,9 @@ function Form(props) {
|
|
|
1018
1027
|
variant="ghost"
|
|
1019
1028
|
onPress={onClose}
|
|
1020
1029
|
color="#fff"
|
|
1021
|
-
>
|
|
1030
|
+
>
|
|
1031
|
+
<ButtonText>Close</ButtonText>
|
|
1032
|
+
</Button>}
|
|
1022
1033
|
|
|
1023
1034
|
{showSaveBtn &&
|
|
1024
1035
|
<Button
|
|
@@ -1026,7 +1037,9 @@ function Form(props) {
|
|
|
1026
1037
|
onPress={(e) => handleSubmit(onSaveDecorated, onSubmitError)(e)}
|
|
1027
1038
|
isDisabled={isSaveDisabled}
|
|
1028
1039
|
color="#fff"
|
|
1029
|
-
>
|
|
1040
|
+
>
|
|
1041
|
+
<ButtonText>{editorMode === EDITOR_MODE__ADD ? 'Add' : 'Save'}</ButtonText>
|
|
1042
|
+
</Button>}
|
|
1030
1043
|
|
|
1031
1044
|
{showSubmitBtn &&
|
|
1032
1045
|
<Button
|
|
@@ -1034,17 +1047,21 @@ function Form(props) {
|
|
|
1034
1047
|
onPress={(e) => handleSubmit(onSubmitDecorated, onSubmitError)(e)}
|
|
1035
1048
|
isDisabled={isSubmitDisabled}
|
|
1036
1049
|
color="#fff"
|
|
1037
|
-
>
|
|
1050
|
+
>
|
|
1051
|
+
<ButtonText>{submitBtnLabel || 'Submit'}</ButtonText>
|
|
1052
|
+
</Button>}
|
|
1038
1053
|
|
|
1039
1054
|
{additionalFooterButtons && _.map(additionalFooterButtons, (props) => {
|
|
1040
1055
|
return <Button
|
|
1041
1056
|
{...props}
|
|
1042
1057
|
onPress={(e) => handleSubmit(props.onPress, onSubmitError)(e)}
|
|
1043
|
-
>
|
|
1058
|
+
>
|
|
1059
|
+
<ButtonText>{props.text}</ButtonText>
|
|
1060
|
+
</Button>;
|
|
1044
1061
|
})}
|
|
1045
1062
|
</Footer>
|
|
1046
1063
|
</>}
|
|
1047
|
-
</
|
|
1064
|
+
</VStack>;
|
|
1048
1065
|
}
|
|
1049
1066
|
|
|
1050
1067
|
// helper fns
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
2
|
+
HStack,
|
|
3
3
|
Text,
|
|
4
|
-
} from '
|
|
4
|
+
} from '@gluestack-ui/themed';
|
|
5
5
|
import styles from '../../Constants/Styles.js';
|
|
6
6
|
|
|
7
7
|
export default function Label(props) {
|
|
8
8
|
const {
|
|
9
9
|
w = styles.FORM_LABEL_WIDTH,
|
|
10
10
|
} = props;
|
|
11
|
-
return <
|
|
11
|
+
return <HStack
|
|
12
12
|
w={w}
|
|
13
13
|
minWidth="120px"
|
|
14
14
|
// maxWidth="50%"
|
|
@@ -21,5 +21,5 @@ export default function Label(props) {
|
|
|
21
21
|
numberOfLines={1}
|
|
22
22
|
ellipsizeMode="head"
|
|
23
23
|
>{props.children}</Text>
|
|
24
|
-
</
|
|
24
|
+
</HStack>;
|
|
25
25
|
}
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import React, { useState, useEffect, useRef, useMemo, useCallback, } from 'react';
|
|
2
2
|
import {
|
|
3
3
|
Box,
|
|
4
|
-
Column,
|
|
5
4
|
FlatList,
|
|
6
5
|
Modal,
|
|
7
6
|
Pressable,
|
|
8
7
|
Icon,
|
|
9
|
-
Row,
|
|
10
8
|
ScrollView,
|
|
11
|
-
|
|
12
|
-
} from '
|
|
9
|
+
VStack,
|
|
10
|
+
} from '@gluestack-ui/themed';
|
|
13
11
|
import {
|
|
14
12
|
SELECTION_MODE_SINGLE,
|
|
15
13
|
SELECTION_MODE_MULTI,
|
|
@@ -518,7 +516,7 @@ function GridComponent(props) {
|
|
|
518
516
|
|
|
519
517
|
if (showRowExpander && !isHeaderRow) {
|
|
520
518
|
const isExpanded = getIsExpanded(index);
|
|
521
|
-
rowComponent = <
|
|
519
|
+
rowComponent = <VStack>
|
|
522
520
|
<Row>
|
|
523
521
|
<ExpandButton
|
|
524
522
|
isExpanded={isExpanded}
|
|
@@ -532,7 +530,7 @@ function GridComponent(props) {
|
|
|
532
530
|
{rowComponent}
|
|
533
531
|
</Row>
|
|
534
532
|
{isExpanded ? getExpandedRowContent(row) : null}
|
|
535
|
-
</
|
|
533
|
+
</VStack>
|
|
536
534
|
}
|
|
537
535
|
return rowComponent;
|
|
538
536
|
},
|
|
@@ -922,7 +920,7 @@ function GridComponent(props) {
|
|
|
922
920
|
|
|
923
921
|
if (!isInited) {
|
|
924
922
|
// first time through, render a placeholder so we can get container dimensions
|
|
925
|
-
return <
|
|
923
|
+
return <VStack
|
|
926
924
|
flex={1}
|
|
927
925
|
w="100%"
|
|
928
926
|
onLayout={(e) => {
|
|
@@ -1059,7 +1057,7 @@ function GridComponent(props) {
|
|
|
1059
1057
|
</Modal>;
|
|
1060
1058
|
}
|
|
1061
1059
|
|
|
1062
|
-
grid = <
|
|
1060
|
+
grid = <VStack
|
|
1063
1061
|
{...testProps('Grid')}
|
|
1064
1062
|
testID="outerContainer"
|
|
1065
1063
|
ref={containerRef}
|
|
@@ -1074,7 +1072,7 @@ function GridComponent(props) {
|
|
|
1074
1072
|
>
|
|
1075
1073
|
{topToolbar}
|
|
1076
1074
|
|
|
1077
|
-
<
|
|
1075
|
+
<VStack
|
|
1078
1076
|
testID="gridContainer"
|
|
1079
1077
|
ref={gridContainerRef}
|
|
1080
1078
|
w="100%"
|
|
@@ -1088,13 +1086,13 @@ function GridComponent(props) {
|
|
|
1088
1086
|
}}
|
|
1089
1087
|
>
|
|
1090
1088
|
{grid}
|
|
1091
|
-
</
|
|
1089
|
+
</VStack>
|
|
1092
1090
|
|
|
1093
1091
|
{listFooterComponent}
|
|
1094
1092
|
|
|
1095
1093
|
{columnSelector}
|
|
1096
1094
|
|
|
1097
|
-
</
|
|
1095
|
+
</VStack>
|
|
1098
1096
|
|
|
1099
1097
|
if (isDropTarget) {
|
|
1100
1098
|
grid = <Box
|
|
@@ -3,9 +3,9 @@ import {
|
|
|
3
3
|
Box,
|
|
4
4
|
Icon,
|
|
5
5
|
Pressable,
|
|
6
|
-
|
|
6
|
+
HStack,
|
|
7
7
|
Text,
|
|
8
|
-
} from '
|
|
8
|
+
} from '@gluestack-ui/themed';
|
|
9
9
|
import {
|
|
10
10
|
SORT_ASCENDING,
|
|
11
11
|
SORT_DESCENDING,
|
|
@@ -475,7 +475,7 @@ export default function GridHeaderRow(props) {
|
|
|
475
475
|
return headerColumns;
|
|
476
476
|
};
|
|
477
477
|
|
|
478
|
-
return <
|
|
478
|
+
return <HStack
|
|
479
479
|
w="100%"
|
|
480
480
|
bg="trueGray.200"
|
|
481
481
|
style={{
|
|
@@ -483,7 +483,7 @@ export default function GridHeaderRow(props) {
|
|
|
483
483
|
}}
|
|
484
484
|
>
|
|
485
485
|
{renderHeaders()}
|
|
486
|
-
</
|
|
486
|
+
</HStack>;
|
|
487
487
|
|
|
488
488
|
}, [
|
|
489
489
|
Repository,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { useEffect, useMemo, useRef, } from 'react';
|
|
2
2
|
import {
|
|
3
3
|
Box,
|
|
4
|
-
|
|
4
|
+
HStack,
|
|
5
5
|
Text,
|
|
6
|
-
} from '
|
|
6
|
+
} from '@gluestack-ui/themed';
|
|
7
7
|
import {
|
|
8
8
|
UI_MODE_WEB,
|
|
9
9
|
} from '../../Constants/UiModes.js';
|
|
@@ -102,7 +102,7 @@ function GridRow(props) {
|
|
|
102
102
|
userSelect: 'none',
|
|
103
103
|
};
|
|
104
104
|
|
|
105
|
-
return <
|
|
105
|
+
return <HStack key={key} {...propsToPass} {...extraProps}>{config.renderer(item)}</HStack>;
|
|
106
106
|
}
|
|
107
107
|
if (config.fieldName) {
|
|
108
108
|
if (item?.properties && item.properties[config.fieldName]) {
|
|
@@ -204,19 +204,19 @@ function GridRow(props) {
|
|
|
204
204
|
</>;
|
|
205
205
|
|
|
206
206
|
if (dragSourceRef) {
|
|
207
|
-
rowContents = <
|
|
207
|
+
rowContents = <HStack flexGrow={1} flex={1} w="100%" bg={bg} ref={dragSourceRef}>{rowContents}</HStack>;
|
|
208
208
|
}
|
|
209
209
|
if (dropTargetRef) {
|
|
210
|
-
rowContents = <
|
|
210
|
+
rowContents = <HStack flexGrow={1} flex={1} w="100%" bg={bg} ref={dropTargetRef}>{rowContents}</HStack>;
|
|
211
211
|
}
|
|
212
212
|
|
|
213
|
-
return <
|
|
213
|
+
return <HStack
|
|
214
214
|
alignItems="center"
|
|
215
215
|
flexGrow={1}
|
|
216
216
|
{...rowProps}
|
|
217
217
|
bg={bg}
|
|
218
218
|
key={hash}
|
|
219
|
-
>{rowContents}</
|
|
219
|
+
>{rowContents}</HStack>;
|
|
220
220
|
}, [
|
|
221
221
|
columnsConfig,
|
|
222
222
|
columnProps,
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
2
|
+
VStack,
|
|
3
3
|
Icon,
|
|
4
|
-
|
|
5
|
-
Text,
|
|
6
|
-
} from 'native-base';
|
|
4
|
+
} from '@gluestack-ui/themed';
|
|
7
5
|
import styles from '../../Styles/StyleSheets.js';
|
|
8
6
|
import withDraggable from '../Hoc/withDraggable.js';
|
|
9
7
|
import GripVertical from '../Icons/GripVertical.js';
|
|
@@ -13,7 +11,7 @@ function HeaderReorderHandle(props) {
|
|
|
13
11
|
isDragging,
|
|
14
12
|
} = props;
|
|
15
13
|
|
|
16
|
-
return <
|
|
14
|
+
return <VStack
|
|
17
15
|
testID="HeaderReorderHandle"
|
|
18
16
|
bg={isDragging ? 'trueGray.300' : 'trueGray.100'}
|
|
19
17
|
h="100%"
|
|
@@ -23,7 +21,7 @@ function HeaderReorderHandle(props) {
|
|
|
23
21
|
style={styles.ewResize}
|
|
24
22
|
>
|
|
25
23
|
<Icon as={GripVertical} testID="handle" size="xs" w="100%" h="100%" color="#ccc" />
|
|
26
|
-
</
|
|
24
|
+
</VStack>;
|
|
27
25
|
}
|
|
28
26
|
|
|
29
27
|
function withAdditionalProps(WrappedComponent) {
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
2
|
+
VStack,
|
|
3
3
|
Icon,
|
|
4
|
-
|
|
5
|
-
Text,
|
|
6
|
-
} from 'native-base';
|
|
4
|
+
} from '@gluestack-ui/themed';
|
|
7
5
|
import styles from '../../Styles/StyleSheets.js';
|
|
8
6
|
import withDraggable from '../Hoc/withDraggable.js';
|
|
9
7
|
import GripLinesVertical from '../Icons/GripLinesVertical.js';
|
|
@@ -13,7 +11,7 @@ function HeaderResizeHandle(props) {
|
|
|
13
11
|
isDragging,
|
|
14
12
|
} = props;
|
|
15
13
|
|
|
16
|
-
return <
|
|
14
|
+
return <VStack
|
|
17
15
|
testID="HeaderResizeHandle"
|
|
18
16
|
bg={isDragging ? 'trueGray.300' : 'trueGray.100'}
|
|
19
17
|
h="100%"
|
|
@@ -23,7 +21,7 @@ function HeaderResizeHandle(props) {
|
|
|
23
21
|
style={styles.ewResize}
|
|
24
22
|
>
|
|
25
23
|
<Icon as={GripLinesVertical} testID="handle" size="sm" color="#ccc" />
|
|
26
|
-
</
|
|
24
|
+
</VStack>;
|
|
27
25
|
}
|
|
28
26
|
|
|
29
27
|
function withAdditionalProps(WrappedComponent) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
VStack,
|
|
3
|
+
HStack,
|
|
4
4
|
Text,
|
|
5
|
-
} from '
|
|
5
|
+
} from '@gluestack-ui/themed';
|
|
6
6
|
import IconButton from '../Buttons/IconButton.js';
|
|
7
7
|
import Rotate from '../Icons/Rotate.js';
|
|
8
8
|
|
|
@@ -18,7 +18,7 @@ export default function NoRecordsFound(props) {
|
|
|
18
18
|
|
|
19
19
|
let component = textComponent;
|
|
20
20
|
if (onRefresh) {
|
|
21
|
-
component = <
|
|
21
|
+
component = <HStack justifyContent="center" alignItems="center" w="100%" flex={1}>
|
|
22
22
|
<IconButton
|
|
23
23
|
_icon={{
|
|
24
24
|
as: Rotate,
|
|
@@ -35,11 +35,11 @@ export default function NoRecordsFound(props) {
|
|
|
35
35
|
ml={-4}
|
|
36
36
|
/>
|
|
37
37
|
{textComponent}
|
|
38
|
-
</
|
|
38
|
+
</HStack>;
|
|
39
39
|
} else {
|
|
40
|
-
component = <
|
|
40
|
+
component = <VStack justifyContent="center" alignItems="center" w="100%" flex={1}>
|
|
41
41
|
{textComponent}
|
|
42
|
-
</
|
|
42
|
+
</VStack>;
|
|
43
43
|
}
|
|
44
44
|
return component;
|
|
45
45
|
}
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
2
|
+
VStack,
|
|
3
3
|
Icon,
|
|
4
|
-
|
|
5
|
-
Text,
|
|
6
|
-
} from 'native-base';
|
|
4
|
+
} from '@gluestack-ui/themed';
|
|
7
5
|
import styles from '../../Styles/StyleSheets.js';
|
|
8
6
|
import GripVertical from '../Icons/GripVertical.js';
|
|
9
7
|
|
|
10
8
|
function RowDragHandle(props) {
|
|
11
|
-
return <
|
|
9
|
+
return <VStack
|
|
12
10
|
testID="HeaderReorderHandle"
|
|
13
11
|
bg="trueGray.100"
|
|
14
12
|
// h="100%"
|
|
@@ -18,7 +16,7 @@ function RowDragHandle(props) {
|
|
|
18
16
|
style={styles.ewResize}
|
|
19
17
|
>
|
|
20
18
|
<Icon as={GripVertical} testID="handle" size="xs" w="100%" h="100%" color="#ccc" />
|
|
21
|
-
</
|
|
19
|
+
</VStack>;
|
|
22
20
|
}
|
|
23
21
|
|
|
24
22
|
export default RowDragHandle;
|