@onehat/ui 0.3.381 → 0.4.0
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 +37 -9
- package/src/Components/Accordion/Accordion.js +22 -17
- package/src/Components/Blank.js +1 -3
- package/src/Components/Buttons/BackButton.js +21 -12
- package/src/Components/Buttons/Button.js +65 -13
- package/src/Components/Buttons/CartButtonWithBadge.js +14 -6
- package/src/Components/Buttons/IconButton.js +31 -74
- package/src/Components/Buttons/PlusMinusButton.js +34 -21
- package/src/Components/Buttons/ReloadButton.js +7 -8
- package/src/Components/Buttons/SquareButton.js +41 -55
- package/src/Components/Container/Container.js +55 -16
- package/src/Components/Container/ScreenContainer.js +26 -16
- package/src/Components/Container/Splitter.js +38 -25
- package/src/Components/Editor/Editor.js +3 -2
- package/src/Components/Editor/InlineEditor.js +38 -32
- package/src/Components/Filter/DateRange.js +37 -18
- package/src/Components/Filter/NumberRange.js +87 -83
- package/src/Components/Form/Field/CKEditor/CKEditor.js +4 -4
- package/src/Components/Form/Field/Checkbox/CheckboxGroup.js +9 -6
- package/src/Components/Form/Field/Color.js +95 -86
- package/src/Components/Form/Field/Combo/Combo.js +347 -284
- package/src/Components/Form/Field/Combo/PageSizeCombo.js +4 -7
- package/src/Components/Form/Field/Date.js +276 -312
- package/src/Components/Form/Field/DisplayField.js +11 -5
- package/src/Components/Form/Field/File.js +26 -32
- package/src/Components/Form/Field/FormikForm.js +1018 -0
- package/src/Components/Form/Field/Input.js +91 -41
- package/src/Components/Form/Field/Json.js +25 -21
- package/src/Components/Form/Field/Number.js +70 -51
- package/src/Components/Form/Field/RadioGroup/RadioGroup.js +4 -6
- package/src/Components/Form/Field/Select/PageSizeSelect.js +33 -0
- package/src/Components/Form/Field/Select/Select.js +109 -0
- package/src/Components/Form/Field/Slider.js +38 -30
- package/src/Components/Form/Field/Tag/Tag.js +88 -72
- package/src/Components/Form/Field/Tag/ValueBox.js +25 -20
- package/src/Components/Form/Field/Text.js +21 -12
- package/src/Components/Form/Field/TextArea.js +32 -15
- package/src/Components/Form/Field/Toggle.js +42 -24
- package/src/Components/Form/FieldSet.js +77 -54
- package/src/Components/Form/Form.js +491 -268
- package/src/Components/Form/Label.js +28 -17
- package/src/Components/Gluestack/accordion/index.tsx +394 -0
- package/src/Components/Gluestack/actionsheet/index.tsx +619 -0
- package/src/Components/Gluestack/alert/index.tsx +310 -0
- package/src/Components/Gluestack/alert-dialog/index.tsx +295 -0
- package/src/Components/Gluestack/avatar/index.tsx +190 -0
- package/src/Components/Gluestack/badge/index.tsx +272 -0
- package/src/Components/Gluestack/bottomsheet/index.tsx +294 -0
- package/src/Components/Gluestack/box/index.tsx +19 -0
- package/src/Components/Gluestack/box/index.web.tsx +18 -0
- package/src/Components/Gluestack/box/styles.tsx +10 -0
- package/src/Components/Gluestack/button/index.tsx +494 -0
- package/src/Components/Gluestack/card/index.tsx +23 -0
- package/src/Components/Gluestack/card/index.web.tsx +22 -0
- package/src/Components/Gluestack/card/styles.tsx +20 -0
- package/src/Components/Gluestack/center/index.tsx +22 -0
- package/src/Components/Gluestack/center/index.web.tsx +19 -0
- package/src/Components/Gluestack/center/styles.tsx +8 -0
- package/src/Components/Gluestack/checkbox/index.tsx +305 -0
- package/src/Components/Gluestack/divider/index.tsx +44 -0
- package/src/Components/Gluestack/drawer/index.tsx +354 -0
- package/src/Components/Gluestack/fab/index.tsx +286 -0
- package/src/Components/Gluestack/flat-list/index.tsx +2 -0
- package/src/Components/Gluestack/form-control/index.tsx +527 -0
- package/src/Components/Gluestack/gluestack-ui-provider/config.ts +332 -0
- package/src/Components/Gluestack/gluestack-ui-provider/index.tsx +47 -0
- package/src/Components/Gluestack/gluestack-ui-provider/index.web.tsx +94 -0
- package/src/Components/Gluestack/gluestack-ui-provider/script.ts +19 -0
- package/src/Components/Gluestack/grid/index.tsx +341 -0
- package/src/Components/Gluestack/grid/index.web.tsx +65 -0
- package/src/Components/Gluestack/grid/styles.tsx +15 -0
- package/src/Components/Gluestack/heading/index.tsx +212 -0
- package/src/Components/Gluestack/heading/index.web.tsx +203 -0
- package/src/Components/Gluestack/heading/styles.tsx +43 -0
- package/src/Components/Gluestack/hstack/index.tsx +23 -0
- package/src/Components/Gluestack/hstack/index.web.tsx +22 -0
- package/src/Components/Gluestack/hstack/styles.tsx +25 -0
- package/src/Components/Gluestack/image/index.tsx +52 -0
- package/src/Components/Gluestack/image-background/index.tsx +21 -0
- package/src/Components/Gluestack/index.js +116 -0
- package/src/Components/Gluestack/input/index.tsx +287 -0
- package/src/Components/Gluestack/input-accessory-view/index.tsx +2 -0
- package/src/Components/Gluestack/keyboard-avoiding-view/index.tsx +2 -0
- package/src/Components/Gluestack/link/index.tsx +107 -0
- package/src/Components/Gluestack/menu/index.tsx +210 -0
- package/src/Components/Gluestack/modal/index.tsx +279 -0
- package/src/Components/Gluestack/popover/index.tsx +352 -0
- package/src/Components/Gluestack/portal/index.tsx +13 -0
- package/src/Components/Gluestack/pressable/index.tsx +46 -0
- package/src/Components/Gluestack/progress/index.tsx +164 -0
- package/src/Components/Gluestack/radio/index.tsx +304 -0
- package/src/Components/Gluestack/refresh-control/index.tsx +2 -0
- package/src/Components/Gluestack/safe-area-view/index.tsx +2 -0
- package/src/Components/Gluestack/scroll-view/index.tsx +2 -0
- package/src/Components/Gluestack/section-list/index.tsx +2 -0
- package/src/Components/Gluestack/select/index.tsx +335 -0
- package/src/Components/Gluestack/select/select-actionsheet.tsx +584 -0
- package/src/Components/Gluestack/skeleton/index.tsx +138 -0
- package/src/Components/Gluestack/skeleton/index.web.tsx +103 -0
- package/src/Components/Gluestack/skeleton/styles.tsx +35 -0
- package/src/Components/Gluestack/slider/index.tsx +283 -0
- package/src/Components/Gluestack/spinner/index.tsx +34 -0
- package/src/Components/Gluestack/status-bar/index.tsx +2 -0
- package/src/Components/Gluestack/switch/index.tsx +55 -0
- package/src/Components/Gluestack/table/index.tsx +200 -0
- package/src/Components/Gluestack/table/index.web.tsx +142 -0
- package/src/Components/Gluestack/table/styles.tsx +44 -0
- package/src/Components/Gluestack/text/index.tsx +48 -0
- package/src/Components/Gluestack/text/index.web.tsx +45 -0
- package/src/Components/Gluestack/text/styles.tsx +47 -0
- package/src/Components/Gluestack/textarea/index.tsx +108 -0
- package/src/Components/Gluestack/toast/index.tsx +225 -0
- package/src/Components/Gluestack/tooltip/index.tsx +125 -0
- package/src/Components/Gluestack/utils/use-break-point-value.ts +101 -0
- package/src/Components/Gluestack/view/index.tsx +2 -0
- package/src/Components/Gluestack/virtualized-list/index.tsx +2 -0
- package/src/Components/Gluestack/vstack/index.tsx +24 -0
- package/src/Components/Gluestack/vstack/index.web.tsx +23 -0
- package/src/Components/Gluestack/vstack/styles.tsx +25 -0
- package/src/Components/Grid/Grid.js +192 -135
- package/src/Components/Grid/GridHeaderRow.js +51 -59
- package/src/Components/Grid/GridRow.js +152 -58
- package/src/Components/Grid/HeaderColumnSelectorHandle.js +16 -10
- package/src/Components/Grid/HeaderReorderHandle.js +17 -13
- package/src/Components/Grid/HeaderResizeHandle.js +17 -13
- package/src/Components/Grid/NoRecordsFound.js +15 -18
- package/src/Components/Grid/RowDragHandle.js +9 -13
- package/src/Components/Hoc/Secondary/withSecondaryEditor.js +14 -9
- package/src/Components/Hoc/Secondary/withSecondaryWindowedEditor.js +14 -11
- package/src/Components/Hoc/withAlert.js +150 -200
- package/src/Components/Hoc/withBlank.js +4 -6
- package/src/Components/Hoc/withCollapsible.js +4 -3
- package/src/Components/Hoc/withComponent.js +33 -6
- package/src/Components/Hoc/withContextMenu.js +133 -141
- package/src/Components/Hoc/withData.js +5 -4
- package/src/Components/Hoc/withDnd.js +11 -9
- package/src/Components/Hoc/withDraggable.js +10 -10
- package/src/Components/Hoc/withEditor.js +18 -13
- package/src/Components/Hoc/withEvents.js +4 -6
- package/src/Components/Hoc/withFilters.js +524 -498
- package/src/Components/Hoc/withInlineEditor.js +7 -5
- package/src/Components/Hoc/withModal.js +79 -137
- package/src/Components/Hoc/withMultiSelection.js +4 -2
- package/src/Components/Hoc/withPdfButtons.js +109 -111
- package/src/Components/Hoc/withPresetButtons.js +49 -53
- package/src/Components/Hoc/withSelection.js +6 -5
- package/src/Components/Hoc/withSideEditor.js +12 -6
- package/src/Components/Hoc/withTooltip.js +18 -12
- package/src/Components/Hoc/withValue.js +6 -5
- package/src/Components/Hoc/withWindowedEditor.js +13 -11
- package/src/Components/Icons/AddressBook.js +7 -10
- package/src/Components/Icons/Alt.js +8 -15
- package/src/Components/Icons/AngleLeft.js +7 -14
- package/src/Components/Icons/AngleRight.js +7 -14
- package/src/Components/Icons/AnglesLeft.js +7 -14
- package/src/Components/Icons/AnglesRight.js +7 -14
- package/src/Components/Icons/Asterisk.js +7 -10
- package/src/Components/Icons/Ban.js +9 -14
- package/src/Components/Icons/Bars.js +7 -10
- package/src/Components/Icons/BarsStaggered.js +7 -10
- package/src/Components/Icons/Bell.js +7 -19
- package/src/Components/Icons/BigCircle.js +7 -14
- package/src/Components/Icons/Book.js +7 -10
- package/src/Components/Icons/BookOpen.js +7 -10
- package/src/Components/Icons/Bookmark.js +8 -17
- package/src/Components/Icons/Bug.js +7 -10
- package/src/Components/Icons/Building.js +7 -10
- package/src/Components/Icons/Calendar.js +7 -14
- package/src/Components/Icons/Calendar2.js +7 -14
- package/src/Components/Icons/CalendarDays.js +7 -14
- package/src/Components/Icons/Camera.js +7 -14
- package/src/Components/Icons/CaretDown.js +7 -14
- package/src/Components/Icons/CaretUp.js +7 -14
- package/src/Components/Icons/CartPlus.js +7 -10
- package/src/Components/Icons/CartShopping.js +7 -10
- package/src/Components/Icons/CashRegister.js +7 -10
- package/src/Components/Icons/Certificate.js +7 -10
- package/src/Components/Icons/ChartLine.js +7 -10
- package/src/Components/Icons/ChartPie.js +7 -10
- package/src/Components/Icons/Check.js +7 -10
- package/src/Components/Icons/CheckDouble.js +7 -10
- package/src/Components/Icons/ChevronDown.js +7 -10
- package/src/Components/Icons/ChevronLeft.js +7 -10
- package/src/Components/Icons/ChevronRight.js +7 -10
- package/src/Components/Icons/ChevronUp.js +7 -10
- package/src/Components/Icons/Circle.js +7 -10
- package/src/Components/Icons/CircleArrowRight.js +7 -10
- package/src/Components/Icons/CircleExclamation.js +7 -14
- package/src/Components/Icons/CircleInfo.js +7 -10
- package/src/Components/Icons/CircleQuestion.js +7 -10
- package/src/Components/Icons/CircleXmark.js +7 -10
- package/src/Components/Icons/CircleXmarkRegular.js +7 -10
- package/src/Components/Icons/Clipboard.js +7 -14
- package/src/Components/Icons/ClipboardCheck.js +7 -17
- package/src/Components/Icons/ClipboardList.js +7 -16
- package/src/Components/Icons/Clock.js +7 -10
- package/src/Components/Icons/ClockRegular.js +7 -10
- package/src/Components/Icons/ClockRotateLeft.js +7 -10
- package/src/Components/Icons/Clone.js +7 -10
- package/src/Components/Icons/Collapse.js +7 -14
- package/src/Components/Icons/Comment.js +7 -10
- package/src/Components/Icons/CommentDots.js +7 -10
- package/src/Components/Icons/CommentRegular.js +7 -10
- package/src/Components/Icons/Comments.js +7 -10
- package/src/Components/Icons/CommentsRegular.js +7 -10
- package/src/Components/Icons/Copyright.js +7 -10
- package/src/Components/Icons/Dot.js +10 -15
- package/src/Components/Icons/Download.js +11 -0
- package/src/Components/Icons/Duplicate.js +7 -14
- package/src/Components/Icons/Edit.js +7 -14
- package/src/Components/Icons/EllipsisHorizontal.js +7 -16
- package/src/Components/Icons/EllipsisVertical.js +7 -14
- package/src/Components/Icons/Envelope.js +7 -10
- package/src/Components/Icons/EnvelopeRegular.js +7 -10
- package/src/Components/Icons/Excel.js +7 -10
- package/src/Components/Icons/Exclamation.js +7 -10
- package/src/Components/Icons/Expand.js +7 -10
- package/src/Components/Icons/Eye.js +7 -14
- package/src/Components/Icons/EyeSlash.js +7 -10
- package/src/Components/Icons/File.js +7 -14
- package/src/Components/Icons/FloppyDiskRegular.js +7 -10
- package/src/Components/Icons/Folder.js +7 -10
- package/src/Components/Icons/FolderClosed.js +7 -10
- package/src/Components/Icons/FolderOpen.js +7 -10
- package/src/Components/Icons/FolderTree.js +7 -10
- package/src/Components/Icons/FullWidth.js +10 -25
- package/src/Components/Icons/Gauge.js +7 -17
- package/src/Components/Icons/Gear.js +7 -14
- package/src/Components/Icons/Gears.js +7 -10
- package/src/Components/Icons/Gift.js +7 -10
- package/src/Components/Icons/Grip.js +7 -14
- package/src/Components/Icons/GripLines.js +7 -14
- package/src/Components/Icons/GripLinesVertical.js +7 -14
- package/src/Components/Icons/GripVertical.js +7 -14
- package/src/Components/Icons/Hammer.js +7 -10
- package/src/Components/Icons/Hand.js +7 -10
- package/src/Components/Icons/HighPriority.js +7 -17
- package/src/Components/Icons/House.js +7 -10
- package/src/Components/Icons/Images.js +7 -10
- package/src/Components/Icons/Info.js +7 -10
- package/src/Components/Icons/ItunesNote.js +7 -10
- package/src/Components/Icons/Js.js +7 -16
- package/src/Components/Icons/Leaf.js +7 -10
- package/src/Components/Icons/Link.js +7 -9
- package/src/Components/Icons/List.js +7 -10
- package/src/Components/Icons/ListCheck.js +7 -10
- package/src/Components/Icons/LocationDot.js +7 -10
- package/src/Components/Icons/Loop.js +7 -14
- package/src/Components/Icons/Loop1.js +8 -13
- package/src/Components/Icons/LoopAll.js +8 -13
- package/src/Components/Icons/LowPriority.js +7 -17
- package/src/Components/Icons/MagnifyingGlass.js +7 -10
- package/src/Components/Icons/Maximize.js +7 -10
- package/src/Components/Icons/MedPriority.js +7 -17
- package/src/Components/Icons/Microphone.js +7 -10
- package/src/Components/Icons/Minimize.js +7 -10
- package/src/Components/Icons/Minus.js +7 -14
- package/src/Components/Icons/MobileScreenButton.js +7 -10
- package/src/Components/Icons/MoneyBill.js +7 -10
- package/src/Components/Icons/MoneyBillWave.js +7 -10
- package/src/Components/Icons/Mouth.js +10 -21
- package/src/Components/Icons/Music.js +7 -10
- package/src/Components/Icons/Na.js +7 -14
- package/src/Components/Icons/NoLoop.js +11 -13
- package/src/Components/Icons/NoReorderRows.js +17 -22
- package/src/Components/Icons/ObjectGroupRegular.js +7 -10
- package/src/Components/Icons/Pause.js +7 -10
- package/src/Components/Icons/Pdf.js +7 -10
- package/src/Components/Icons/Pencil.js +7 -14
- package/src/Components/Icons/Phone.js +7 -10
- package/src/Components/Icons/Play.js +7 -10
- package/src/Components/Icons/Plus.js +7 -14
- package/src/Components/Icons/Presentation.js +7 -16
- package/src/Components/Icons/Print.js +7 -14
- package/src/Components/Icons/Question.js +7 -10
- package/src/Components/Icons/Rate-.25x.js +12 -17
- package/src/Components/Icons/Rate-.5x.js +11 -16
- package/src/Components/Icons/Rate-.75x.js +8 -13
- package/src/Components/Icons/Rate-1.25x.js +8 -13
- package/src/Components/Icons/Rate-1.5x.js +8 -13
- package/src/Components/Icons/Rate-1.75x.js +8 -13
- package/src/Components/Icons/Rate-1x.js +11 -16
- package/src/Components/Icons/Rate-2x.js +8 -13
- package/src/Components/Icons/RateIcon-.25x.js +8 -13
- package/src/Components/Icons/RateIcon-.5x.js +11 -16
- package/src/Components/Icons/RateIcon-.75x.js +8 -13
- package/src/Components/Icons/RateIcon-1.25x.js +8 -13
- package/src/Components/Icons/RateIcon-1.5x.js +8 -13
- package/src/Components/Icons/RateIcon-1.75x.js +8 -13
- package/src/Components/Icons/RateIcon-1x.js +8 -13
- package/src/Components/Icons/RateIcon-2x.js +8 -13
- package/src/Components/Icons/RectangleXmark.js +7 -10
- package/src/Components/Icons/RectangleXmarkRegular.js +7 -10
- package/src/Components/Icons/ReorderRows.js +8 -13
- package/src/Components/Icons/RightFromBracket.js +7 -10
- package/src/Components/Icons/RightLeft.js +7 -10
- package/src/Components/Icons/RightToBracket.js +7 -10
- package/src/Components/Icons/Rotate.js +7 -14
- package/src/Components/Icons/RotateLeft.js +7 -10
- package/src/Components/Icons/RotateRight.js +7 -14
- package/src/Components/Icons/ScrewdriverWrench.js +7 -10
- package/src/Components/Icons/Scroll.js +7 -10
- package/src/Components/Icons/Share.js +7 -10
- package/src/Components/Icons/Shop.js +7 -10
- package/src/Components/Icons/SideBySide.js +7 -20
- package/src/Components/Icons/SortDown.js +7 -10
- package/src/Components/Icons/SortDownAlt.js +7 -10
- package/src/Components/Icons/SortUp.js +7 -10
- package/src/Components/Icons/SortUpAlt.js +7 -14
- package/src/Components/Icons/Square.js +7 -10
- package/src/Components/Icons/SquareCheck.js +7 -10
- package/src/Components/Icons/SquareCheckRegular.js +7 -10
- package/src/Components/Icons/SquareMinus.js +7 -14
- package/src/Components/Icons/SquareRegular.js +7 -10
- package/src/Components/Icons/Store.js +7 -10
- package/src/Components/Icons/Table.js +7 -16
- package/src/Components/Icons/ThumbsDown.js +7 -10
- package/src/Components/Icons/ThumbsDownRegular.js +7 -10
- package/src/Components/Icons/ThumbsUp.js +7 -10
- package/src/Components/Icons/ThumbsUpRegular.js +7 -10
- package/src/Components/Icons/Trash.js +7 -14
- package/src/Components/Icons/TrashCan.js +7 -14
- package/src/Components/Icons/TriangleExclamation.js +7 -14
- package/src/Components/Icons/Truck.js +7 -10
- package/src/Components/Icons/TruckFast.js +7 -10
- package/src/Components/Icons/Upload.js +11 -0
- package/src/Components/Icons/UploadDownload.js +11 -11
- package/src/Components/Icons/User.js +7 -10
- package/src/Components/Icons/UserGroup.js +7 -10
- package/src/Components/Icons/UserPlus.js +7 -10
- package/src/Components/Icons/UserSecret.js +7 -10
- package/src/Components/Icons/Video.js +7 -16
- package/src/Components/Icons/X.js +7 -10
- package/src/Components/Icons/Xmark.js +7 -10
- package/src/Components/Layout/CenterBox.js +13 -9
- package/src/Components/Layout/Footer.js +20 -13
- package/src/Components/Messages/ConfirmationMessage.js +30 -13
- package/src/Components/Messages/ErrorMessage.js +29 -23
- package/src/Components/Messages/Loading.js +10 -8
- package/src/Components/Messages/OkMessage.js +30 -13
- package/src/Components/Messages/Unauthorized.js +5 -8
- package/src/Components/Messages/WaitMessage.js +37 -73
- package/src/Components/Panel/AccordionGridPanel.js +6 -6
- package/src/Components/Panel/FormPanel.js +7 -3
- package/src/Components/Panel/Header.js +132 -94
- package/src/Components/Panel/Mask.js +4 -4
- package/src/Components/Panel/Panel.js +55 -72
- package/src/Components/Panel/TabPanel.js +1 -1
- package/src/Components/Picker/Picker.js +10 -9
- package/src/Components/Report/Report.js +17 -14
- package/src/Components/Screens/Manager.js +22 -22
- package/src/Components/Tab/TabBar.js +293 -225
- package/src/Components/Toolbar/FilterToolbar.js +15 -11
- package/src/Components/Toolbar/Pagination.js +51 -46
- package/src/Components/Toolbar/PaginationToolbar.js +25 -19
- package/src/Components/Toolbar/Toolbar.js +26 -13
- package/src/Components/Tooltip/Tooltip.js +35 -0
- package/src/Components/Tree/Tree.js +134 -140
- package/src/Components/Tree/TreeNode.js +75 -36
- package/src/Components/Viewer/Viewer.js +203 -80
- package/src/Components/Window/Editor.js +0 -5
- package/src/Components/Window/UploadsDownloadsWindow.js +40 -22
- package/src/Components/index.js +11 -8
- package/src/Constants/Alert.js +0 -0
- package/src/Constants/AppStates.js +0 -0
- package/src/Constants/Colors.js +13 -0
- package/src/Constants/Commands.js +0 -0
- package/src/Constants/Date.js +0 -0
- package/src/Constants/Dates.js +16 -0
- package/src/Constants/Directions.js +0 -0
- package/src/Constants/Editor.js +0 -0
- package/src/Constants/EditorModes.js +2 -0
- package/src/Constants/File.js +0 -0
- package/src/Constants/Filters.js +0 -0
- package/src/Constants/Grid.js +0 -0
- package/src/Constants/Input.js +1 -0
- package/src/Constants/MimeTypes.js +0 -0
- package/src/Constants/Selection.js +0 -0
- package/src/Constants/Styles.js +119 -108
- package/src/Constants/Tasks.js +3 -0
- package/src/Constants/Tree.js +0 -0
- package/src/Constants/UiModes.js +4 -3
- package/src/Functions/BankersRound.js +0 -0
- package/src/Functions/Cypress/button_functions.js +0 -0
- package/src/Functions/Cypress/crud_functions.js +0 -0
- package/src/Functions/Cypress/dom_functions.js +0 -0
- package/src/Functions/Cypress/grid_functions.js +0 -0
- package/src/Functions/Cypress/navigation_functions.js +0 -0
- package/src/Functions/Cypress/tree_functions.js +0 -0
- package/src/Functions/Cypress/utilities.js +0 -0
- package/src/Functions/PlatformDetector.js +0 -0
- package/src/Functions/Timer.js +0 -0
- package/src/Functions/buildAdditionalButtons.js +5 -5
- package/src/Functions/chunkArray.js +0 -0
- package/src/Functions/colorConversions.js +74 -0
- package/src/Functions/delay.js +0 -0
- package/src/Functions/delayUntil.js +0 -0
- package/src/Functions/deleteSaved.js +0 -0
- package/src/Functions/deleteSecure.js +0 -0
- package/src/Functions/downloadInBackground.js +0 -0
- package/src/Functions/downloadWithFetch.js +0 -0
- package/src/Functions/emptyFn.js +0 -0
- package/src/Functions/getComponentFromType.js +0 -0
- package/src/Functions/getIconButtonFromConfig.js +5 -9
- package/src/Functions/getIsMobile.js +0 -0
- package/src/Functions/getNodeIcon.js +28 -0
- package/src/Functions/getPref.js +0 -0
- package/src/Functions/getSaved.js +0 -0
- package/src/Functions/getSecure.js +0 -0
- package/src/Functions/getTokenHeaders.js +0 -0
- package/src/Functions/gsToHex.js +205 -0
- package/src/Functions/ignoreWanings.js +46 -0
- package/src/Functions/inArray.js +0 -0
- package/src/Functions/isJson.js +0 -0
- package/src/Functions/isSerializable.js +0 -0
- package/src/Functions/isVideo.js +0 -0
- package/src/Functions/jsonValidator.js +0 -0
- package/src/Functions/nbToRgb.js +1 -1
- package/src/Functions/objectToClassName.js +72 -0
- package/src/Functions/parseNotification.js +0 -0
- package/src/Functions/processImage.js +0 -0
- package/src/Functions/registerReactNativeComponents.js +0 -0
- package/src/Functions/registerWebComponents.js +0 -0
- package/src/Functions/setCustomInflector.js +0 -0
- package/src/Functions/setPref.js +0 -0
- package/src/Functions/setProgress.js +0 -0
- package/src/Functions/setSaved.js +0 -0
- package/src/Functions/setSecure.js +0 -0
- package/src/Functions/setThemeOverrides.js +0 -0
- package/src/Functions/setUiSavesRepo.js +0 -0
- package/src/Functions/sleep.js +0 -0
- package/src/Functions/tailwindFunctions.js +384 -0
- package/src/Functions/testProps.js +0 -0
- package/src/Functions/trackEngagementHit.js +0 -0
- package/src/Functions/verifyCompleted.js +0 -0
- package/src/Functions/waitFor.js +2 -2
- package/src/PlatformImports/Web/Attachments.js +32 -38
- package/src/PlatformImports/Web/File.js +38 -31
- package/src/UiGlobals.js +8 -1
- package/src/Components/Grid/ColumnSelectorWindow.js +0 -125
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { cloneElement, useState, useEffect, } from 'react';
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
} from '
|
|
3
|
+
HStack,
|
|
4
|
+
VStack,
|
|
5
|
+
} from '../Gluestack';
|
|
6
6
|
import {
|
|
7
7
|
HORIZONTAL,
|
|
8
8
|
VERTICAL,
|
|
9
9
|
} from '../../Constants/Directions.js';
|
|
10
10
|
import {
|
|
11
11
|
UI_MODE_WEB,
|
|
12
|
-
|
|
12
|
+
UI_MODE_NATIVE,
|
|
13
13
|
CURRENT_MODE,
|
|
14
14
|
} from '../../Constants/UiModes.js';
|
|
15
15
|
import withComponent from '../Hoc/withComponent.js';
|
|
@@ -18,6 +18,45 @@ import setSaved from '../../Functions/setSaved.js';
|
|
|
18
18
|
import Splitter from './Splitter.js';
|
|
19
19
|
import _ from 'lodash';
|
|
20
20
|
|
|
21
|
+
// function extractTokenFromClassName(token, className) {
|
|
22
|
+
// const
|
|
23
|
+
// regex = new RegExp(
|
|
24
|
+
// '(?:^|\s)' + // match the beginning of the string or a space.
|
|
25
|
+
// token + '-' +
|
|
26
|
+
// '(\d+%?|full)' + // match a number, percentage, or 'full'
|
|
27
|
+
// '(?=\s|$)' // match the end of the string or a space
|
|
28
|
+
// ),
|
|
29
|
+
// match = className.match(regex);
|
|
30
|
+
// let value = match ? match[1] : null;
|
|
31
|
+
// if (value === 'full') {
|
|
32
|
+
// value = '100%';
|
|
33
|
+
// }
|
|
34
|
+
// return value;
|
|
35
|
+
// }
|
|
36
|
+
// function extractTokenFromStyle(token, style) {
|
|
37
|
+
// return style[token] || null;
|
|
38
|
+
// }
|
|
39
|
+
// function extractHeight(props) {
|
|
40
|
+
// let height = null;
|
|
41
|
+
// if (props.style) {
|
|
42
|
+
// height = extractTokenFromStyle('height', props.style);
|
|
43
|
+
// }
|
|
44
|
+
// if (height === null && props.className) {
|
|
45
|
+
// height = extractTokenFromClassName('h', props.className);
|
|
46
|
+
// }
|
|
47
|
+
// return height;
|
|
48
|
+
// }
|
|
49
|
+
// function extractWidth(props) {
|
|
50
|
+
// let width = null;
|
|
51
|
+
// if (props.style) {
|
|
52
|
+
// width = extractTokenFromStyle('width', props.style);
|
|
53
|
+
// }
|
|
54
|
+
// if (width === null && props.className) {
|
|
55
|
+
// width = extractTokenFromClassName('w', props.className);
|
|
56
|
+
// }
|
|
57
|
+
// return width;
|
|
58
|
+
// }
|
|
59
|
+
|
|
21
60
|
function Container(props) {
|
|
22
61
|
const {
|
|
23
62
|
center,
|
|
@@ -188,7 +227,7 @@ function Container(props) {
|
|
|
188
227
|
westComponent = null,
|
|
189
228
|
westSplitter = null;
|
|
190
229
|
|
|
191
|
-
centerComponent =
|
|
230
|
+
centerComponent = cloneElement(center, { isCollapsible: false, });
|
|
192
231
|
if (north) {
|
|
193
232
|
componentProps.collapseDirection = VERTICAL;
|
|
194
233
|
if (!north.props.h && !north.props.flex) {
|
|
@@ -210,7 +249,7 @@ function Container(props) {
|
|
|
210
249
|
};
|
|
211
250
|
northSplitter = <Splitter mode={VERTICAL} onDragStop={onNorthResize} />;
|
|
212
251
|
}
|
|
213
|
-
northComponent =
|
|
252
|
+
northComponent = cloneElement(north, { ...componentProps, w: '100%', });
|
|
214
253
|
componentProps = {};
|
|
215
254
|
}
|
|
216
255
|
if (south) {
|
|
@@ -234,7 +273,7 @@ function Container(props) {
|
|
|
234
273
|
};
|
|
235
274
|
southSplitter = <Splitter mode={VERTICAL} onDragStop={onSouthResize} />;
|
|
236
275
|
}
|
|
237
|
-
southComponent =
|
|
276
|
+
southComponent = cloneElement(south, { ...componentProps, w: '100%', });
|
|
238
277
|
componentProps = {};
|
|
239
278
|
}
|
|
240
279
|
if (east) {
|
|
@@ -258,7 +297,7 @@ function Container(props) {
|
|
|
258
297
|
};
|
|
259
298
|
eastSplitter = <Splitter mode={HORIZONTAL} onDragStop={onEastResize} />;
|
|
260
299
|
}
|
|
261
|
-
eastComponent =
|
|
300
|
+
eastComponent = cloneElement(east, { ...componentProps, h: '100%', });
|
|
262
301
|
componentProps = {};
|
|
263
302
|
}
|
|
264
303
|
if (west) {
|
|
@@ -282,25 +321,25 @@ function Container(props) {
|
|
|
282
321
|
};
|
|
283
322
|
westSplitter = <Splitter mode={HORIZONTAL} onDragStop={onWestResize} />;
|
|
284
323
|
}
|
|
285
|
-
westComponent =
|
|
324
|
+
westComponent = cloneElement(west, { ...componentProps, h: '100%', });
|
|
286
325
|
componentProps = {};
|
|
287
326
|
}
|
|
288
327
|
|
|
289
|
-
return <
|
|
328
|
+
return <VStack className="w-full flex-1">
|
|
290
329
|
{northComponent}
|
|
291
330
|
{(!isNorthCollapsed && !localIsNorthCollapsed) && northSplitter}
|
|
292
|
-
<
|
|
331
|
+
<HStack className="w-full" style={{ flex: 100 }}>
|
|
293
332
|
{westComponent}
|
|
294
333
|
{(!isWestCollapsed && !localIsWestCollapsed) && westSplitter}
|
|
295
|
-
<
|
|
334
|
+
<VStack className="h-full overflow-auto" style={{ flex: 100 }}>
|
|
296
335
|
{centerComponent}
|
|
297
|
-
</
|
|
336
|
+
</VStack>
|
|
298
337
|
{(!isEastCollapsed && !localIsEastCollapsed) && eastSplitter}
|
|
299
338
|
{eastComponent}
|
|
300
|
-
</
|
|
339
|
+
</HStack>
|
|
301
340
|
{(!isSouthCollapsed && !localIsSouthCollapsed) && southSplitter}
|
|
302
341
|
{southComponent}
|
|
303
|
-
</
|
|
342
|
+
</VStack>;
|
|
304
343
|
}
|
|
305
344
|
|
|
306
345
|
export default withComponent(Container);
|
|
@@ -4,10 +4,11 @@ import {
|
|
|
4
4
|
useWindowDimensions,
|
|
5
5
|
} from 'react-native';
|
|
6
6
|
import {
|
|
7
|
-
Column,
|
|
8
|
-
ScrollView,
|
|
9
7
|
KeyboardAvoidingView,
|
|
10
|
-
|
|
8
|
+
ScrollView,
|
|
9
|
+
VStack,
|
|
10
|
+
VStackNative,
|
|
11
|
+
} from '../Gluestack';
|
|
11
12
|
import withComponent from '../Hoc/withComponent.js';
|
|
12
13
|
// import { useHeaderHeight } from '@react-navigation/elements';
|
|
13
14
|
// import testProps from '../OneHat/functions/testProps';
|
|
@@ -35,20 +36,23 @@ function ScreenContainer(props) {
|
|
|
35
36
|
safeAreaProps.safeArea = true;
|
|
36
37
|
}
|
|
37
38
|
|
|
38
|
-
const column = <
|
|
39
|
-
// {...testProps(screenName)}
|
|
40
|
-
alignItems="center"
|
|
41
|
-
justifyContent="flex-start"
|
|
42
|
-
flex={1}
|
|
43
|
-
w="100%"
|
|
44
|
-
p={p}
|
|
45
|
-
bg={bg}
|
|
46
|
-
overflow="visible"
|
|
39
|
+
const column = <VStackNative
|
|
47
40
|
onLayout={onLayout}
|
|
48
41
|
{...safeAreaProps}
|
|
42
|
+
className={`
|
|
43
|
+
items-center
|
|
44
|
+
justify-start
|
|
45
|
+
flex-1
|
|
46
|
+
w-full
|
|
47
|
+
overflow-visible
|
|
48
|
+
`}
|
|
49
|
+
style={{
|
|
50
|
+
padding: p,
|
|
51
|
+
backgroundColor: bg,
|
|
52
|
+
}}
|
|
49
53
|
>
|
|
50
54
|
{props.children}
|
|
51
|
-
</
|
|
55
|
+
</VStackNative>;
|
|
52
56
|
|
|
53
57
|
if (scrollEnabled) {
|
|
54
58
|
const scrollViewProps = {};
|
|
@@ -66,15 +70,21 @@ function ScreenContainer(props) {
|
|
|
66
70
|
{...scrollViewProps}
|
|
67
71
|
>{column}</ScrollView>;
|
|
68
72
|
if (keyboardAvoiding) {
|
|
69
|
-
return <KeyboardAvoidingView
|
|
73
|
+
return <KeyboardAvoidingView
|
|
74
|
+
behavior={Platform.OS === 'ios' ? 'padding' : 'height'}
|
|
75
|
+
className="flex-1 w-full"
|
|
76
|
+
>
|
|
70
77
|
{scrollView}
|
|
71
|
-
</KeyboardAvoidingView
|
|
78
|
+
</KeyboardAvoidingView>;
|
|
72
79
|
} else {
|
|
73
80
|
return scrollView;
|
|
74
81
|
}
|
|
75
82
|
}
|
|
76
83
|
if (keyboardAvoiding) {
|
|
77
|
-
return <KeyboardAvoidingView
|
|
84
|
+
return <KeyboardAvoidingView
|
|
85
|
+
behavior={Platform.OS === 'ios' ? 'padding' : 'height'}
|
|
86
|
+
className="flex-1 w-full"
|
|
87
|
+
>
|
|
78
88
|
{column}
|
|
79
89
|
</KeyboardAvoidingView>;
|
|
80
90
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
} from 'native-base';
|
|
2
|
+
HStack,
|
|
3
|
+
VStack,
|
|
4
|
+
} from '../Gluestack';
|
|
6
5
|
import {
|
|
7
6
|
HORIZONTAL,
|
|
8
7
|
VERTICAL,
|
|
@@ -21,28 +20,42 @@ function Splitter(props) {
|
|
|
21
20
|
} = props;
|
|
22
21
|
|
|
23
22
|
if (mode === VERTICAL) {
|
|
24
|
-
return <
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
23
|
+
return <HStack
|
|
24
|
+
className={`
|
|
25
|
+
Splitter
|
|
26
|
+
h-[3px]
|
|
27
|
+
w-full
|
|
28
|
+
items-center
|
|
29
|
+
justify-center
|
|
30
|
+
${isDragging ? "bg-secondary-600" : "bg-primary-600"}
|
|
31
|
+
`}
|
|
31
32
|
>
|
|
32
|
-
<
|
|
33
|
-
|
|
33
|
+
<HStack className={`
|
|
34
|
+
handle
|
|
35
|
+
h-[2px]
|
|
36
|
+
w-[10%]
|
|
37
|
+
bg-[#ccc]
|
|
38
|
+
`}></HStack>
|
|
39
|
+
</HStack>;
|
|
34
40
|
}
|
|
35
|
-
return <
|
|
36
|
-
testID="Splitter"
|
|
37
|
-
bg={isDragging ? 'secondary.600' : 'primary.600'}
|
|
38
|
-
h="100%"
|
|
39
|
-
w="3px"
|
|
40
|
-
alignItems="center"
|
|
41
|
-
justifyContent="center"
|
|
41
|
+
return <VStack
|
|
42
42
|
style={styles.ewResize}
|
|
43
|
+
className={`
|
|
44
|
+
Splitter
|
|
45
|
+
h-full
|
|
46
|
+
w-[3px]
|
|
47
|
+
items-center
|
|
48
|
+
justify-center
|
|
49
|
+
${isDragging ? "bg-secondary-600" : "bg-primary-600"}
|
|
50
|
+
`}
|
|
43
51
|
>
|
|
44
|
-
<
|
|
45
|
-
|
|
52
|
+
<VStack className={`
|
|
53
|
+
handle
|
|
54
|
+
w-[2px]
|
|
55
|
+
h-[10%]
|
|
56
|
+
bg-[#ccc]
|
|
57
|
+
`}></VStack>
|
|
58
|
+
</VStack>;
|
|
46
59
|
}
|
|
47
60
|
|
|
48
61
|
function withAdditionalProps(WrappedComponent) {
|
|
@@ -61,9 +74,9 @@ function withParentNode(WrappedComponent) {
|
|
|
61
74
|
getParentNode = (node) => node.parentElement.parentElement,
|
|
62
75
|
} = props;
|
|
63
76
|
return <WrappedComponent
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
77
|
+
getParentNode={getParentNode}
|
|
78
|
+
{...props}
|
|
79
|
+
/>;
|
|
67
80
|
};
|
|
68
81
|
}
|
|
69
82
|
|
|
@@ -2,6 +2,7 @@ import {
|
|
|
2
2
|
EDITOR_MODE__VIEW,
|
|
3
3
|
} from '../../Constants/Editor.js';
|
|
4
4
|
import withComponent from '../Hoc/withComponent.js';
|
|
5
|
+
import withPdfButtons from '../Hoc/withPdfButtons.js';
|
|
5
6
|
import Form from '../Form/Form.js';
|
|
6
7
|
import Viewer from '../Viewer/Viewer.js';
|
|
7
8
|
import _ from 'lodash';
|
|
@@ -39,7 +40,7 @@ function Editor(props) {
|
|
|
39
40
|
if (canRecordBeEdited && !canRecordBeEdited(selection)) {
|
|
40
41
|
canEdit = false;
|
|
41
42
|
}
|
|
42
|
-
|
|
43
|
+
|
|
43
44
|
// Repository?.isRemotePhantomMode && selection.length === 1 &&
|
|
44
45
|
if (editorMode === EDITOR_MODE__VIEW || isEditorViewOnly || !canEdit) {
|
|
45
46
|
const record = selection[0];
|
|
@@ -71,4 +72,4 @@ function Editor(props) {
|
|
|
71
72
|
/>;
|
|
72
73
|
}
|
|
73
74
|
|
|
74
|
-
export default withComponent(Editor);
|
|
75
|
+
export default withComponent(withPdfButtons(Editor));
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import { useState, useEffect, useRef, } from 'react';
|
|
2
2
|
import {
|
|
3
3
|
Box,
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
Text,
|
|
7
|
-
} from 'native-base';
|
|
4
|
+
VStack,
|
|
5
|
+
} from '../Gluestack';
|
|
8
6
|
import withComponent from '../Hoc/withComponent.js';
|
|
9
7
|
import {
|
|
10
8
|
UI_MODE_WEB,
|
|
11
|
-
|
|
9
|
+
UI_MODE_NATIVE,
|
|
12
10
|
} from '../../Constants/UiModes.js';
|
|
13
11
|
import {
|
|
14
12
|
EDITOR_TYPE__INLINE,
|
|
@@ -20,7 +18,7 @@ import _ from 'lodash';
|
|
|
20
18
|
|
|
21
19
|
function InlineEditor(props) {
|
|
22
20
|
|
|
23
|
-
if (UiGlobals.mode ===
|
|
21
|
+
if (UiGlobals.mode === UI_MODE_NATIVE) {
|
|
24
22
|
throw new Error('Not yet implemented for RN.');
|
|
25
23
|
}
|
|
26
24
|
|
|
@@ -46,6 +44,7 @@ function InlineEditor(props) {
|
|
|
46
44
|
styles = UiGlobals.styles,
|
|
47
45
|
maskRef = useRef(),
|
|
48
46
|
inlineEditorRef = useRef(),
|
|
47
|
+
footerRef = useRef(),
|
|
49
48
|
[currentRow, setCurrentRow] = useState(),
|
|
50
49
|
onScreenResize = () => {
|
|
51
50
|
// TODO: Attach a div with zIndex 0 to body to monitor resize events. THis is handler
|
|
@@ -65,7 +64,7 @@ function InlineEditor(props) {
|
|
|
65
64
|
onEditorShown = () => {
|
|
66
65
|
// determine which row to move the editor to
|
|
67
66
|
const
|
|
68
|
-
data = self.parent.gridRef.current.props.data, // This is okay, because (for now) the inlineEditor is only for use with
|
|
67
|
+
data = self.parent.gridRef.current.props.data, // This is okay, because (for now) the inlineEditor is only for use with Grids
|
|
69
68
|
ix = data.indexOf(selection[0]),
|
|
70
69
|
gridRowsContainer = self.parent.gridRef.current._listRef._scrollRef.childNodes[0],
|
|
71
70
|
currentRow = gridRowsContainer.childNodes[ix];
|
|
@@ -102,14 +101,6 @@ function InlineEditor(props) {
|
|
|
102
101
|
return <>
|
|
103
102
|
<Box
|
|
104
103
|
ref={maskRef}
|
|
105
|
-
position="fixed"
|
|
106
|
-
w="100vw"
|
|
107
|
-
h="100vh"
|
|
108
|
-
top="0"
|
|
109
|
-
left="0"
|
|
110
|
-
bg="#000"
|
|
111
|
-
opacity={0.3}
|
|
112
|
-
zIndex={0}
|
|
113
104
|
onClick={(e) => {
|
|
114
105
|
e.preventDefault();
|
|
115
106
|
e.stopPropagation();
|
|
@@ -121,41 +112,56 @@ function InlineEditor(props) {
|
|
|
121
112
|
onEditorCancel();
|
|
122
113
|
}
|
|
123
114
|
}}
|
|
115
|
+
className={`
|
|
116
|
+
InlineEditor-mask
|
|
117
|
+
fixed
|
|
118
|
+
w-screen
|
|
119
|
+
h-screen
|
|
120
|
+
top-0
|
|
121
|
+
left-0
|
|
122
|
+
bg-black
|
|
123
|
+
opacity-30 z-0
|
|
124
|
+
`}
|
|
124
125
|
/>
|
|
125
|
-
<
|
|
126
|
+
<VStack
|
|
126
127
|
ref={inlineEditorRef}
|
|
127
|
-
position="absolute"
|
|
128
|
-
zIndex={10}
|
|
129
128
|
{...testProps('inlineEditor')}
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
129
|
+
className={`
|
|
130
|
+
InlineEditor-VStack
|
|
131
|
+
absolute
|
|
132
|
+
z-10
|
|
133
|
+
min-w-full
|
|
134
|
+
inline-block
|
|
135
|
+
max-h-[100px]
|
|
136
|
+
${isEditorShown ? "h-[100px]" : "h-[0px]"}
|
|
137
|
+
`}
|
|
134
138
|
>
|
|
135
139
|
<Form
|
|
136
140
|
editorType={EDITOR_TYPE__INLINE}
|
|
137
141
|
editorStateRef={editorStateRef}
|
|
138
|
-
|
|
139
142
|
Repository={Repository}
|
|
140
143
|
isMultiple={selection.length > 1}
|
|
141
144
|
isEditorViewOnly={isEditorViewOnly}
|
|
142
145
|
columnsConfig={columnsConfig}
|
|
143
|
-
bg="#fff"
|
|
144
|
-
borderTopWidth={4}
|
|
145
|
-
borderTopColor={styles.GRID_INLINE_EDITOR_BORDER_COLOR}
|
|
146
|
-
borderBottomWidth={4}
|
|
147
|
-
borderBottomColor={styles.GRID_INLINE_EDITOR_BORDER_COLOR}
|
|
148
|
-
py={1}
|
|
149
|
-
px={0}
|
|
150
|
-
|
|
151
146
|
record={selection[0]}
|
|
152
147
|
onCancel={onEditorCancel}
|
|
153
148
|
onSave={onEditorSave}
|
|
154
149
|
onClose={onEditorClose}
|
|
155
150
|
parent={self}
|
|
156
151
|
reference="form"
|
|
152
|
+
className={`
|
|
153
|
+
InlineEditor-Form
|
|
154
|
+
flex-1
|
|
155
|
+
bg-white
|
|
156
|
+
px-0
|
|
157
|
+
py-1
|
|
158
|
+
border-t-4
|
|
159
|
+
border-b-4
|
|
160
|
+
${styles.GRID_INLINE_EDITOR_BORDER_TOP_COLOR}
|
|
161
|
+
${styles.GRID_INLINE_EDITOR_BORDER_BOTTOM_COLOR}
|
|
162
|
+
`}
|
|
157
163
|
/>
|
|
158
|
-
</
|
|
164
|
+
</VStack>
|
|
159
165
|
</>;
|
|
160
166
|
|
|
161
167
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { useState, useEffect } from 'react';
|
|
2
2
|
import {
|
|
3
|
-
|
|
3
|
+
HStack,
|
|
4
|
+
HStackNative,
|
|
4
5
|
Text,
|
|
5
|
-
} from '
|
|
6
|
+
} from '../Gluestack';
|
|
6
7
|
import Date from '../Form/Field/Date.js';
|
|
7
8
|
import testProps from '../../Functions/testProps.js';
|
|
8
9
|
import withTooltip from '../Hoc/withTooltip.js';
|
|
@@ -18,10 +19,17 @@ const
|
|
|
18
19
|
},
|
|
19
20
|
setValue,
|
|
20
21
|
mode,
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
minValue = 0,
|
|
22
|
+
minValue,
|
|
24
23
|
maxValue,
|
|
24
|
+
tooltip,
|
|
25
|
+
|
|
26
|
+
// withComponent
|
|
27
|
+
self,
|
|
28
|
+
|
|
29
|
+
// prevent passthru of these props
|
|
30
|
+
onChangeValue,
|
|
31
|
+
onChangeSelection,
|
|
32
|
+
|
|
25
33
|
...propsToPass
|
|
26
34
|
} = props,
|
|
27
35
|
[low, setLow] = useState(''),
|
|
@@ -71,34 +79,45 @@ const
|
|
|
71
79
|
if (!isReady) {
|
|
72
80
|
return null;
|
|
73
81
|
}
|
|
82
|
+
|
|
83
|
+
let className = `
|
|
84
|
+
flex-1
|
|
85
|
+
justify-center
|
|
86
|
+
items-center
|
|
87
|
+
px-1
|
|
88
|
+
py-[2px]
|
|
89
|
+
`;
|
|
90
|
+
if (props.className) {
|
|
91
|
+
className += ' ' + props.className;
|
|
92
|
+
}
|
|
74
93
|
|
|
75
|
-
return <
|
|
76
|
-
justifyContent="center"
|
|
77
|
-
alignItems="center"
|
|
78
|
-
flex={1}
|
|
79
|
-
px={1}
|
|
80
|
-
{...propsToPass}
|
|
81
|
-
>
|
|
94
|
+
return <HStack className={className} style={props.style}>
|
|
82
95
|
<Date
|
|
83
96
|
{...testProps('low')}
|
|
84
97
|
value={low}
|
|
85
98
|
onChangeValue={onChangeLow}
|
|
86
99
|
mode={mode}
|
|
87
|
-
|
|
88
|
-
|
|
100
|
+
minValue={minValue}
|
|
101
|
+
maxValue={maxValue}
|
|
89
102
|
tooltip={(tooltip ? tooltip + ' ' : '') + 'Low'}
|
|
103
|
+
limitWidth={true}
|
|
104
|
+
parent={self}
|
|
105
|
+
reference="low"
|
|
90
106
|
/>
|
|
91
|
-
<Text px
|
|
107
|
+
<Text className="px-2 select-none">to</Text>
|
|
92
108
|
<Date
|
|
93
109
|
{...testProps('high')}
|
|
94
110
|
value={high}
|
|
95
111
|
onChangeValue={onChangeHigh}
|
|
96
112
|
mode={mode}
|
|
97
|
-
|
|
98
|
-
|
|
113
|
+
minValue={minValue}
|
|
114
|
+
maxValue={maxValue}
|
|
99
115
|
tooltip={(tooltip ? tooltip + ' ' : '') + 'High'}
|
|
116
|
+
limitWidth={true}
|
|
117
|
+
parent={self}
|
|
118
|
+
reference="high"
|
|
100
119
|
/>
|
|
101
|
-
</
|
|
120
|
+
</HStack>;
|
|
102
121
|
},
|
|
103
122
|
DateRangeField = withValue(DateRange);
|
|
104
123
|
|