@onehat/ui 0.3.380 → 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 +144 -147
- 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,11 +1,11 @@
|
|
|
1
1
|
import { useState, useEffect, useMemo, } from 'react';
|
|
2
2
|
import {
|
|
3
3
|
Box,
|
|
4
|
+
HStack,
|
|
4
5
|
Icon,
|
|
5
6
|
Pressable,
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
} from 'native-base';
|
|
7
|
+
TextNative,
|
|
8
|
+
} from '../Gluestack';
|
|
9
9
|
import {
|
|
10
10
|
SORT_ASCENDING,
|
|
11
11
|
SORT_DESCENDING,
|
|
@@ -307,40 +307,38 @@ export default function GridHeaderRow(props) {
|
|
|
307
307
|
isSorter = isSortable && canColumnsSort && sortField === fieldName,
|
|
308
308
|
isReorderable = canColumnsReorder && configIsReorderable,
|
|
309
309
|
isResizable = canColumnsResize && configIsResizable,
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
310
|
+
rowClassName = `
|
|
311
|
+
border-r-2
|
|
312
|
+
border-r-white
|
|
313
|
+
`;
|
|
314
314
|
if (isHidden) {
|
|
315
315
|
return null;
|
|
316
316
|
}
|
|
317
317
|
|
|
318
|
+
const rowStyle = {};
|
|
318
319
|
if (all.length === 1) {
|
|
319
|
-
|
|
320
|
+
rowClassName += ' w-full';
|
|
320
321
|
isReorderable = false;
|
|
321
322
|
isResizable = false;
|
|
322
323
|
} else {
|
|
323
324
|
if (w) {
|
|
324
|
-
|
|
325
|
+
rowStyle.width = w;
|
|
325
326
|
} else if (flex) {
|
|
326
|
-
|
|
327
|
-
|
|
327
|
+
rowStyle.flex = flex;
|
|
328
|
+
rowClassName += ' min-w-[100px]';
|
|
328
329
|
} else if (localColumnsConfig.length === 1) {
|
|
329
330
|
// Only one column and flex is not set
|
|
330
|
-
|
|
331
|
+
rowClassName += ' flex-1';
|
|
331
332
|
if (!header) {
|
|
332
333
|
}
|
|
333
334
|
}
|
|
334
335
|
}
|
|
336
|
+
rowStyle.userSelect = 'none';
|
|
335
337
|
|
|
336
338
|
if (isInlineEditorShown) {
|
|
337
|
-
|
|
339
|
+
rowClassName = ' ' + styles.INLINE_EDITOR_MIN_WIDTH;
|
|
338
340
|
}
|
|
339
341
|
|
|
340
|
-
const textProps = {};
|
|
341
|
-
if (UiGlobals.mode === UI_MODE_WEB) {
|
|
342
|
-
textProps.textOverflow = 'ellipsis';
|
|
343
|
-
}
|
|
344
342
|
return <Pressable
|
|
345
343
|
{...testProps('Header-' + fieldName)}
|
|
346
344
|
key={ix}
|
|
@@ -355,17 +353,17 @@ export default function GridHeaderRow(props) {
|
|
|
355
353
|
onSort(config, e);
|
|
356
354
|
}
|
|
357
355
|
}}
|
|
358
|
-
flexDirection="row"
|
|
359
|
-
h="100%"
|
|
360
|
-
bg={styles.GRID_HEADER_BG}
|
|
361
|
-
_hover={{
|
|
362
|
-
bg: styles.GRID_HEADER_HOVER_BG,
|
|
363
|
-
}}
|
|
364
|
-
p={0}
|
|
365
|
-
style={{ userSelect: 'none', }}
|
|
366
356
|
onMouseEnter={(e) => onHeaderMouseEnter(e, ix)}
|
|
367
357
|
onMouseLeave={(e) => onHeaderMouseLeave(e, ix)}
|
|
368
|
-
{
|
|
358
|
+
className={`
|
|
359
|
+
h-full
|
|
360
|
+
flex-row
|
|
361
|
+
p-0
|
|
362
|
+
${rowClassName}
|
|
363
|
+
${styles.GRID_HEADER_BG}
|
|
364
|
+
${styles.GRID_HEADER_BG_HOVER}
|
|
365
|
+
`}
|
|
366
|
+
style={rowStyle}
|
|
369
367
|
>
|
|
370
368
|
{isReorderable && isOver &&
|
|
371
369
|
<HeaderReorderHandle
|
|
@@ -390,31 +388,33 @@ export default function GridHeaderRow(props) {
|
|
|
390
388
|
return proxy;
|
|
391
389
|
}}
|
|
392
390
|
/>}
|
|
393
|
-
<
|
|
391
|
+
<TextNative
|
|
394
392
|
key="Text"
|
|
395
|
-
fontSize={styles.GRID_HEADER_FONTSIZE}
|
|
396
|
-
overflow="hidden"
|
|
397
|
-
flex={1}
|
|
398
|
-
h="100%"
|
|
399
|
-
px={styles.GRID_HEADER_CELL_PX}
|
|
400
|
-
py={styles.GRID_HEADER_CELL_PY}
|
|
401
|
-
alignItems="center"
|
|
402
|
-
justifyContent="center"
|
|
403
393
|
numberOfLines={1}
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
394
|
+
className={`
|
|
395
|
+
h-full
|
|
396
|
+
flex-1
|
|
397
|
+
items-center
|
|
398
|
+
justify-center
|
|
399
|
+
overflow-hidden
|
|
400
|
+
text-ellipsis
|
|
401
|
+
${styles.GRID_HEADER_FONTSIZE}
|
|
402
|
+
${styles.GRID_HEADER_CELL_PX}
|
|
403
|
+
${styles.GRID_HEADER_CELL_PY}
|
|
404
|
+
`}
|
|
405
|
+
>{header}</TextNative>
|
|
407
406
|
|
|
408
407
|
{isSorter &&
|
|
409
|
-
<Icon
|
|
410
|
-
key="Icon"
|
|
411
|
-
as={isSortDirectionAsc ? SortUp : SortDown}
|
|
412
|
-
textAlign="center"
|
|
408
|
+
<Icon
|
|
409
|
+
key="Icon"
|
|
410
|
+
as={isSortDirectionAsc ? SortUp : SortDown}
|
|
413
411
|
size={styles.GRID_HEADER_ICON_SIZE}
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
412
|
+
className={`
|
|
413
|
+
text-center
|
|
414
|
+
text-grey-500
|
|
415
|
+
${styles.GRID_HEADER_ICON_MT}
|
|
416
|
+
${styles.GRID_HEADER_ICON_MR}
|
|
417
|
+
`} />}
|
|
418
418
|
|
|
419
419
|
{isOver && UiGlobals.mode === UI_MODE_WEB && // only works for web for now
|
|
420
420
|
<HeaderColumnSelectorHandle
|
|
@@ -460,31 +460,23 @@ export default function GridHeaderRow(props) {
|
|
|
460
460
|
if (areRowsDragSource) {
|
|
461
461
|
headerColumns.unshift(<Box
|
|
462
462
|
key="spacer"
|
|
463
|
-
w
|
|
463
|
+
className="w-[3px]"
|
|
464
464
|
/>);
|
|
465
465
|
}
|
|
466
466
|
if (!hideNavColumn) {
|
|
467
|
-
headerColumns.push(<AngleRight
|
|
468
|
-
key="AngleRight"
|
|
469
|
-
color="#aaa"
|
|
470
|
-
variant="ghost"
|
|
471
|
-
w={30}
|
|
472
|
-
alignSelf="center"
|
|
473
|
-
ml={3}
|
|
474
|
-
/>);
|
|
467
|
+
headerColumns.push(<Icon as={AngleRight} className={`AngleRight text-[#aaa] w-[30px] self-center ml-3`} />);
|
|
475
468
|
}
|
|
476
469
|
return headerColumns;
|
|
477
470
|
};
|
|
478
471
|
|
|
479
|
-
return <
|
|
480
|
-
w="100%"
|
|
481
|
-
bg="trueGray.200"
|
|
472
|
+
return <HStack
|
|
482
473
|
style={{
|
|
483
474
|
scrollbarWidth: 'none',
|
|
484
475
|
}}
|
|
476
|
+
className="w-full bg-grey-200"
|
|
485
477
|
>
|
|
486
478
|
{renderHeaders()}
|
|
487
|
-
</
|
|
479
|
+
</HStack>;
|
|
488
480
|
|
|
489
481
|
}, [
|
|
490
482
|
Repository,
|
|
@@ -1,16 +1,19 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useMemo, } from 'react';
|
|
2
2
|
import {
|
|
3
3
|
Box,
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
HStack,
|
|
5
|
+
HStackNative,
|
|
6
|
+
Icon,
|
|
7
|
+
TextNative,
|
|
8
|
+
} from '../Gluestack';
|
|
7
9
|
import {
|
|
8
10
|
UI_MODE_WEB,
|
|
9
11
|
} from '../../Constants/UiModes.js';
|
|
12
|
+
import * as colourMixer from '@k-renwick/colour-mixer';
|
|
10
13
|
import getComponentFromType from '../../Functions/getComponentFromType.js';
|
|
11
14
|
import UiGlobals from '../../UiGlobals.js';
|
|
12
15
|
import { withDragSource, withDropTarget } from '../Hoc/withDnd.js';
|
|
13
|
-
import testProps from '
|
|
16
|
+
import testProps from '../..Ffunctions/testProps.js';
|
|
14
17
|
import AngleRight from '../Icons/AngleRight.js';
|
|
15
18
|
import RowDragHandle from './RowDragHandle.js';
|
|
16
19
|
import _ from 'lodash';
|
|
@@ -25,12 +28,17 @@ function GridRow(props) {
|
|
|
25
28
|
rowProps,
|
|
26
29
|
hideNavColumn,
|
|
27
30
|
isSelected,
|
|
31
|
+
isHovered,
|
|
28
32
|
bg,
|
|
33
|
+
showHovers,
|
|
34
|
+
index,
|
|
35
|
+
alternatingInterval,
|
|
36
|
+
alternateRowBackgrounds,
|
|
29
37
|
item,
|
|
30
38
|
isInlineEditorShown,
|
|
31
39
|
isDraggable = false, // withDraggable
|
|
32
40
|
isDragSource = false, // withDnd
|
|
33
|
-
isOver = false,
|
|
41
|
+
isOver = false, // drop target
|
|
34
42
|
dragSourceRef,
|
|
35
43
|
dropTargetRef,
|
|
36
44
|
} = props,
|
|
@@ -43,8 +51,32 @@ function GridRow(props) {
|
|
|
43
51
|
const
|
|
44
52
|
isPhantom = item.isPhantom,
|
|
45
53
|
hash = item?.hash || item;
|
|
46
|
-
|
|
47
54
|
return useMemo(() => {
|
|
55
|
+
|
|
56
|
+
let bg = props.bg || styles.GRID_ROW_BG,
|
|
57
|
+
mixWith;
|
|
58
|
+
if (isSelected) {
|
|
59
|
+
if (showHovers && isHovered) {
|
|
60
|
+
mixWith = styles.GRID_ROW_SELECTED_BG_HOVER;
|
|
61
|
+
} else {
|
|
62
|
+
mixWith = styles.GRID_ROW_SELECTED_BG;
|
|
63
|
+
}
|
|
64
|
+
} else if (showHovers && isHovered) {
|
|
65
|
+
mixWith = styles.GRID_ROW_BG_HOVER;
|
|
66
|
+
} else if (alternateRowBackgrounds && index % alternatingInterval === 0) { // i.e. every second line, or every third line
|
|
67
|
+
mixWith = styles.GRID_ROW_ALTERNATE_BG;
|
|
68
|
+
}
|
|
69
|
+
if (mixWith) {
|
|
70
|
+
// const
|
|
71
|
+
// mixWithObj = gsToHex(mixWith),
|
|
72
|
+
// ratio = mixWithObj.alpha ? 1 - mixWithObj.alpha : 0.5;
|
|
73
|
+
// bg = colourMixer.blend(bg, ratio, mixWithObj.color);
|
|
74
|
+
bg = colourMixer.blend(bg, 0.5, mixWith);
|
|
75
|
+
}
|
|
76
|
+
const
|
|
77
|
+
visibleColumns = _.filter(columnsConfig, (config) => !config.isHidden),
|
|
78
|
+
isOnlyOneVisibleColumn = visibleColumns.length === 1;
|
|
79
|
+
|
|
48
80
|
const renderColumns = (item) => {
|
|
49
81
|
if (_.isArray(columnsConfig)) {
|
|
50
82
|
return _.map(columnsConfig, (config, key, all) => {
|
|
@@ -52,23 +84,29 @@ function GridRow(props) {
|
|
|
52
84
|
return null;
|
|
53
85
|
}
|
|
54
86
|
const propsToPass = columnProps[key] || {};
|
|
55
|
-
|
|
56
|
-
|
|
87
|
+
const colStyle = {};
|
|
88
|
+
let colClassName = `
|
|
89
|
+
GridRow-column
|
|
90
|
+
p-1
|
|
91
|
+
justify-center
|
|
92
|
+
border-r-black-100
|
|
93
|
+
mr-1
|
|
94
|
+
`;
|
|
95
|
+
if (isOnlyOneVisibleColumn) {
|
|
96
|
+
colClassName = ' w-full';
|
|
57
97
|
} else {
|
|
58
98
|
if (config.w) {
|
|
59
|
-
|
|
99
|
+
colStyle.width = config.w;
|
|
60
100
|
} else if (config.flex) {
|
|
61
|
-
|
|
62
|
-
|
|
101
|
+
colStyle.flex = config.flex;
|
|
102
|
+
colClassName = ' min-w-[100px]';
|
|
63
103
|
} else {
|
|
64
|
-
|
|
104
|
+
colClassName = ' flex-1';
|
|
65
105
|
}
|
|
66
106
|
}
|
|
67
|
-
propsToPass.p = 1;
|
|
68
|
-
propsToPass.justifyContent = 'center';
|
|
69
107
|
|
|
70
108
|
if (isInlineEditorShown) {
|
|
71
|
-
|
|
109
|
+
colClassName += ' ' + styles.INLINE_EDITOR_MIN_WIDTH;
|
|
72
110
|
}
|
|
73
111
|
|
|
74
112
|
let value;
|
|
@@ -103,14 +141,17 @@ function GridRow(props) {
|
|
|
103
141
|
userSelect: 'none',
|
|
104
142
|
};
|
|
105
143
|
|
|
106
|
-
return <
|
|
144
|
+
return <HStackNative
|
|
107
145
|
key={key}
|
|
108
146
|
{...testProps('rendererCol-' + key)}
|
|
147
|
+
className={colClassName}
|
|
109
148
|
{...propsToPass}
|
|
110
149
|
{...extraProps}
|
|
111
|
-
|
|
150
|
+
style={colStyle}
|
|
151
|
+
>{config.renderer(item)}</HStackNative>;
|
|
112
152
|
}
|
|
113
153
|
if (config.fieldName) {
|
|
154
|
+
|
|
114
155
|
if (item?.properties && item.properties[config.fieldName]) {
|
|
115
156
|
const property = item.properties[config.fieldName];
|
|
116
157
|
value = property.displayValue;
|
|
@@ -119,9 +160,6 @@ function GridRow(props) {
|
|
|
119
160
|
if (type) {
|
|
120
161
|
const Element = getComponentFromType(type);
|
|
121
162
|
const elementProps = {};
|
|
122
|
-
if (UiGlobals.mode === UI_MODE_WEB) {
|
|
123
|
-
elementProps.textOverflow = 'ellipsis';
|
|
124
|
-
}
|
|
125
163
|
if (type.match(/(Tag|TagEditor|Json)$/)) {
|
|
126
164
|
elementProps.isViewOnly = true; // TODO: this won't work for InlineGridEditor, bc that Grid can't use isViewOnly when actually editing
|
|
127
165
|
}
|
|
@@ -133,13 +171,20 @@ function GridRow(props) {
|
|
|
133
171
|
value={value}
|
|
134
172
|
key={key}
|
|
135
173
|
overflow="hidden"
|
|
136
|
-
alignSelf="center"
|
|
137
174
|
style={{
|
|
138
175
|
userSelect: 'none',
|
|
176
|
+
...colStyle,
|
|
139
177
|
}}
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
178
|
+
minimizeForRow={true}
|
|
179
|
+
className={`
|
|
180
|
+
GridRow-Element
|
|
181
|
+
self-center
|
|
182
|
+
text-ellipsis
|
|
183
|
+
${colClassName}
|
|
184
|
+
${styles.GRID_CELL_FONTSIZE}
|
|
185
|
+
${styles.GRID_CELL_PX}
|
|
186
|
+
${styles.GRID_CELL_PY}
|
|
187
|
+
`}
|
|
143
188
|
numberOfLines={1}
|
|
144
189
|
ellipsizeMode="head"
|
|
145
190
|
{...propsToPass}
|
|
@@ -166,72 +211,119 @@ function GridRow(props) {
|
|
|
166
211
|
return value(key);
|
|
167
212
|
}
|
|
168
213
|
const elementProps = {};
|
|
169
|
-
if (UiGlobals.mode === UI_MODE_WEB) {
|
|
170
|
-
elementProps.textOverflow = 'ellipsis';
|
|
171
|
-
}
|
|
172
214
|
if (config.getCellProps) {
|
|
173
215
|
_.assign(elementProps, config.getCellProps(item));
|
|
174
216
|
}
|
|
175
|
-
return <
|
|
217
|
+
return <TextNative
|
|
176
218
|
{...testProps('cell-' + config.fieldName)}
|
|
177
219
|
key={key}
|
|
178
|
-
overflow="hidden"
|
|
179
|
-
alignSelf="center"
|
|
180
220
|
style={{
|
|
181
221
|
userSelect: 'none',
|
|
222
|
+
...colStyle,
|
|
182
223
|
}}
|
|
183
|
-
fontSize={styles.GRID_CELL_FONTSIZE}
|
|
184
|
-
px={styles.GRID_CELL_PX}
|
|
185
|
-
py={styles.GRID_CELL_PY}
|
|
186
224
|
numberOfLines={1}
|
|
187
225
|
ellipsizeMode="head"
|
|
226
|
+
className={`
|
|
227
|
+
GridRow-TextNative
|
|
228
|
+
self-center
|
|
229
|
+
overflow-hidden
|
|
230
|
+
text-ellipsis
|
|
231
|
+
${colClassName}
|
|
232
|
+
${styles.GRID_CELL_FONTSIZE}
|
|
233
|
+
${styles.GRID_CELL_PX}
|
|
234
|
+
${styles.GRID_CELL_PY}
|
|
235
|
+
`}
|
|
188
236
|
{...elementProps}
|
|
189
237
|
{...propsToPass}
|
|
190
|
-
>{value}</
|
|
238
|
+
>{value}</TextNative>;
|
|
191
239
|
});
|
|
192
240
|
} else {
|
|
193
241
|
// TODO: if 'columnsConfig' is an object, parse its contents
|
|
194
242
|
throw new Error('Non-array columnsConfig not yet supported');
|
|
195
243
|
}
|
|
196
244
|
};
|
|
197
|
-
if (isOver) {
|
|
198
|
-
rowProps.borderWidth = 4;
|
|
199
|
-
rowProps.borderColor = '#0ff';
|
|
200
|
-
} else {
|
|
201
|
-
rowProps.borderWidth = 0;
|
|
202
|
-
rowProps.borderColor = null;
|
|
203
|
-
}
|
|
204
245
|
|
|
205
246
|
let rowContents = <>
|
|
206
247
|
{(isDragSource || isDraggable) && <RowDragHandle />}
|
|
207
|
-
{isPhantom &&
|
|
248
|
+
{isPhantom &&
|
|
249
|
+
<Box
|
|
250
|
+
className={`
|
|
251
|
+
GridRow-phantom
|
|
252
|
+
absolute
|
|
253
|
+
h-[2px]
|
|
254
|
+
w-[2px]
|
|
255
|
+
top-0
|
|
256
|
+
left-0
|
|
257
|
+
bg-[#f00]
|
|
258
|
+
`}
|
|
259
|
+
/>}
|
|
208
260
|
|
|
209
261
|
{renderColumns(item)}
|
|
210
262
|
|
|
211
|
-
{!hideNavColumn &&
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
263
|
+
{!hideNavColumn &&
|
|
264
|
+
<Icon
|
|
265
|
+
as={AngleRight}
|
|
266
|
+
variant="outline"
|
|
267
|
+
className={`
|
|
268
|
+
GridRow-Icon
|
|
269
|
+
w-30
|
|
270
|
+
self-center
|
|
271
|
+
mx-3
|
|
272
|
+
${styles.GRID_NAV_COLUMN_COLOR}
|
|
273
|
+
`}
|
|
274
|
+
/>}
|
|
218
275
|
</>;
|
|
219
276
|
|
|
220
277
|
if (dragSourceRef) {
|
|
221
|
-
rowContents = <
|
|
278
|
+
rowContents = <HStack
|
|
279
|
+
ref={dragSourceRef}
|
|
280
|
+
className={`
|
|
281
|
+
dragSourceRef
|
|
282
|
+
w-full
|
|
283
|
+
flex-1
|
|
284
|
+
grow-1
|
|
285
|
+
`}
|
|
286
|
+
style={{
|
|
287
|
+
backgroundColor: bg,
|
|
288
|
+
}}
|
|
289
|
+
>{rowContents}</HStack>;
|
|
222
290
|
}
|
|
223
291
|
if (dropTargetRef) {
|
|
224
|
-
rowContents = <
|
|
292
|
+
rowContents = <HStack
|
|
293
|
+
ref={dropTargetRef}
|
|
294
|
+
className={`
|
|
295
|
+
dropTargetRef
|
|
296
|
+
w-full
|
|
297
|
+
flex-1
|
|
298
|
+
grow-1
|
|
299
|
+
`}
|
|
300
|
+
style={{
|
|
301
|
+
backgroundColor: bg,
|
|
302
|
+
}}
|
|
303
|
+
>{rowContents}</HStack>;
|
|
225
304
|
}
|
|
226
305
|
|
|
227
|
-
|
|
306
|
+
let rowClassName = `
|
|
307
|
+
GridRow-HStackNative
|
|
308
|
+
items-center
|
|
309
|
+
`;
|
|
310
|
+
if (isOnlyOneVisibleColumn) {
|
|
311
|
+
rowClassName += ' w-full';
|
|
312
|
+
}
|
|
313
|
+
if (isOver) {
|
|
314
|
+
rowClassName += ' border-4 border-[#0ff]';
|
|
315
|
+
} else {
|
|
316
|
+
rowClassName += ' border-b border-b-grey-100';
|
|
317
|
+
}
|
|
318
|
+
return <HStackNative
|
|
228
319
|
{...testProps('row' + (isSelected ? '-selected' : ''))}
|
|
229
|
-
alignItems="center"
|
|
230
|
-
flexGrow={1}
|
|
231
320
|
{...rowProps}
|
|
232
|
-
bg={bg}
|
|
233
321
|
key={hash}
|
|
234
|
-
|
|
322
|
+
className={rowClassName}
|
|
323
|
+
style={{
|
|
324
|
+
backgroundColor: bg,
|
|
325
|
+
}}
|
|
326
|
+
>{rowContents}</HStackNative>;
|
|
235
327
|
}, [
|
|
236
328
|
columnsConfig,
|
|
237
329
|
columnProps,
|
|
@@ -243,7 +335,9 @@ function GridRow(props) {
|
|
|
243
335
|
isPhantom,
|
|
244
336
|
hash, // this is an easy way to determine if the data has changed and the item needs to be rerendered
|
|
245
337
|
isInlineEditorShown,
|
|
246
|
-
|
|
338
|
+
isSelected,
|
|
339
|
+
isHovered,
|
|
340
|
+
index,
|
|
247
341
|
dragSourceRef,
|
|
248
342
|
dropTargetRef,
|
|
249
343
|
]);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Icon,
|
|
3
3
|
Pressable,
|
|
4
|
-
} from '
|
|
4
|
+
} from '../Gluestack';
|
|
5
5
|
import Gear from '../Icons/Gear.js';
|
|
6
6
|
import _ from 'lodash';
|
|
7
7
|
|
|
@@ -10,16 +10,22 @@ export default function HeaderColumnSelectorHandle(props) {
|
|
|
10
10
|
showColumnsSelector,
|
|
11
11
|
} = props;
|
|
12
12
|
return <Pressable
|
|
13
|
-
|
|
14
|
-
bg
|
|
15
|
-
_hover={{ bg: 'trueGray.200' }}
|
|
16
|
-
_pressed={{ bg: 'trueGray.300' }}
|
|
17
|
-
h="100%"
|
|
18
|
-
w={3}
|
|
19
|
-
alignItems="center"
|
|
20
|
-
justifyContent="center"
|
|
13
|
+
_hover={{ bg: 'grey-200' }}
|
|
14
|
+
_pressed={{ bg: 'grey-300' }}
|
|
21
15
|
onPress={showColumnsSelector}
|
|
16
|
+
className={`
|
|
17
|
+
HeaderColumnSelectorHandle
|
|
18
|
+
bg-grey-100
|
|
19
|
+
h-full
|
|
20
|
+
w-3
|
|
21
|
+
items-center
|
|
22
|
+
justify-center
|
|
23
|
+
`}
|
|
22
24
|
>
|
|
23
|
-
<Icon
|
|
25
|
+
<Icon
|
|
26
|
+
as={Gear}
|
|
27
|
+
size="xs"
|
|
28
|
+
className="handle w-full h-full text-[#ccc]"
|
|
29
|
+
/>
|
|
24
30
|
</Pressable>;
|
|
25
31
|
}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
|
-
Column,
|
|
3
2
|
Icon,
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
} from 'native-base';
|
|
3
|
+
VStack,
|
|
4
|
+
} from '../Gluestack';
|
|
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,17 +11,23 @@ function HeaderReorderHandle(props) {
|
|
|
13
11
|
isDragging,
|
|
14
12
|
} = props;
|
|
15
13
|
|
|
16
|
-
return <
|
|
17
|
-
testID="HeaderReorderHandle"
|
|
18
|
-
bg={isDragging ? 'trueGray.300' : 'trueGray.100'}
|
|
19
|
-
h="100%"
|
|
20
|
-
w={3}
|
|
21
|
-
alignItems="center"
|
|
22
|
-
justifyContent="center"
|
|
14
|
+
return <VStack
|
|
23
15
|
style={styles.ewResize}
|
|
16
|
+
className={`
|
|
17
|
+
HeaderReorderHandle
|
|
18
|
+
h-full
|
|
19
|
+
w-3
|
|
20
|
+
items-center
|
|
21
|
+
justify-center
|
|
22
|
+
${isDragging ? 'bg-grey-300' : 'bg-grey-100'}
|
|
23
|
+
`}
|
|
24
24
|
>
|
|
25
|
-
<Icon
|
|
26
|
-
|
|
25
|
+
<Icon
|
|
26
|
+
as={GripVertical}
|
|
27
|
+
size="xs"
|
|
28
|
+
className="reorderHandle w-full h-full text-grey-300"
|
|
29
|
+
/>
|
|
30
|
+
</VStack>;
|
|
27
31
|
}
|
|
28
32
|
|
|
29
33
|
function withAdditionalProps(WrappedComponent) {
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
|
-
Column,
|
|
3
2
|
Icon,
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
} from 'native-base';
|
|
3
|
+
VStack,
|
|
4
|
+
} from '../Gluestack';
|
|
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,17 +11,23 @@ function HeaderResizeHandle(props) {
|
|
|
13
11
|
isDragging,
|
|
14
12
|
} = props;
|
|
15
13
|
|
|
16
|
-
return <
|
|
17
|
-
testID="HeaderResizeHandle"
|
|
18
|
-
bg={isDragging ? 'trueGray.300' : 'trueGray.100'}
|
|
19
|
-
h="100%"
|
|
20
|
-
w={3}
|
|
21
|
-
alignItems="center"
|
|
22
|
-
justifyContent="center"
|
|
14
|
+
return <VStack
|
|
23
15
|
style={styles.ewResize}
|
|
16
|
+
className={`
|
|
17
|
+
HeaderResizeHandle
|
|
18
|
+
h-full
|
|
19
|
+
w-3
|
|
20
|
+
items-center
|
|
21
|
+
justify-center
|
|
22
|
+
${isDragging ? 'bg-grey-300' : 'bg-grey-100'}
|
|
23
|
+
`}
|
|
24
24
|
>
|
|
25
|
-
<Icon
|
|
26
|
-
|
|
25
|
+
<Icon
|
|
26
|
+
as={GripLinesVertical}
|
|
27
|
+
size="sm"
|
|
28
|
+
className="resizeHandle text-grey-300"
|
|
29
|
+
/>
|
|
30
|
+
</VStack>;
|
|
27
31
|
}
|
|
28
32
|
|
|
29
33
|
function withAdditionalProps(WrappedComponent) {
|