@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,16 @@
|
|
|
1
1
|
import React, { useState, useEffect, useRef, useMemo, useCallback, } from 'react';
|
|
2
2
|
import {
|
|
3
3
|
Box,
|
|
4
|
-
Column,
|
|
5
4
|
FlatList,
|
|
6
|
-
|
|
5
|
+
HStack,
|
|
7
6
|
Pressable,
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
// ScrollView,
|
|
8
|
+
VStack,
|
|
9
|
+
VStackNative,
|
|
10
|
+
} from '../Gluestack';
|
|
11
|
+
import {
|
|
10
12
|
ScrollView,
|
|
11
|
-
|
|
12
|
-
} from 'native-base';
|
|
13
|
+
} from 'react-native';
|
|
13
14
|
import {
|
|
14
15
|
SELECTION_MODE_SINGLE,
|
|
15
16
|
SELECTION_MODE_MULTI,
|
|
@@ -24,10 +25,17 @@ import {
|
|
|
24
25
|
} from '../../Constants/Grid.js';
|
|
25
26
|
import {
|
|
26
27
|
UI_MODE_WEB,
|
|
27
|
-
|
|
28
|
+
UI_MODE_NATIVE,
|
|
28
29
|
CURRENT_MODE,
|
|
29
30
|
} from '../../Constants/UiModes.js';
|
|
30
|
-
import
|
|
31
|
+
import {
|
|
32
|
+
hasHeight,
|
|
33
|
+
hasWidth,
|
|
34
|
+
hasFlex,
|
|
35
|
+
} from '../../Functions/tailwindFunctions.js';
|
|
36
|
+
import * as yup from 'yup'; // https://github.com/jquense/yup#string
|
|
37
|
+
import Inflector from 'inflector-js';
|
|
38
|
+
import { EDITOR_TYPE__PLAIN } from '../../Constants/Editor.js';
|
|
31
39
|
import UiGlobals from '../../UiGlobals.js';
|
|
32
40
|
import useForceUpdate from '../../Hooks/useForceUpdate.js';
|
|
33
41
|
import withContextMenu from '../Hoc/withContextMenu.js';
|
|
@@ -44,52 +52,59 @@ import withMultiSelection from '../Hoc/withMultiSelection.js';
|
|
|
44
52
|
import withSelection from '../Hoc/withSelection.js';
|
|
45
53
|
import withSideEditor from '../Hoc/withSideEditor.js';
|
|
46
54
|
import withWindowedEditor from '../Hoc/withWindowedEditor.js';
|
|
55
|
+
import Form from '../Form/Form.js';
|
|
47
56
|
import getSaved from '../../Functions/getSaved.js';
|
|
48
57
|
import setSaved from '../../Functions/setSaved.js';
|
|
49
58
|
import getIconButtonFromConfig from '../../Functions/getIconButtonFromConfig.js';
|
|
50
59
|
import testProps from '../../Functions/testProps.js';
|
|
51
|
-
import
|
|
60
|
+
import gsToHex from '../../Functions/gsToHex.js';
|
|
52
61
|
import Loading from '../Messages/Loading.js';
|
|
53
62
|
import isSerializable from '../../Functions/isSerializable.js';
|
|
54
63
|
import inArray from '../../Functions/inArray.js';
|
|
55
|
-
import
|
|
64
|
+
import ReloadButton from '../Buttons/ReloadButton.js';
|
|
65
|
+
import CheckboxButton from '../Buttons/CheckboxButton.js';
|
|
56
66
|
import GridHeaderRow from './GridHeaderRow.js';
|
|
57
67
|
import GridRow, { DragSourceDropTargetGridRow, DragSourceGridRow, DropTargetGridRow } from './GridRow.js';
|
|
58
|
-
import
|
|
68
|
+
import Button from '../Buttons/Button.js';
|
|
59
69
|
import ExpandButton from '../Buttons/ExpandButton.js';
|
|
70
|
+
import IconButton from '../Buttons/IconButton.js';
|
|
60
71
|
import PaginationToolbar from '../Toolbar/PaginationToolbar.js';
|
|
61
72
|
import NoRecordsFound from './NoRecordsFound.js';
|
|
62
73
|
import Toolbar from '../Toolbar/Toolbar.js';
|
|
63
74
|
import NoReorderRows from '../Icons/NoReorderRows.js';
|
|
64
75
|
import ReorderRows from '../Icons/ReorderRows.js';
|
|
65
|
-
import ColumnSelectorWindow from './ColumnSelectorWindow.js';
|
|
66
76
|
import Unauthorized from '../Messages/Unauthorized.js';
|
|
67
77
|
import _ from 'lodash';
|
|
68
78
|
|
|
69
79
|
|
|
70
80
|
// This fn gets called many times per component
|
|
71
81
|
// First call
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
82
|
+
// !isInited
|
|
83
|
+
// render a placeholder, to get container dimensions
|
|
84
|
+
// onInitialLayout()
|
|
85
|
+
// set initial pageSize
|
|
86
|
+
// setIsInited(true)
|
|
77
87
|
// Second call
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
88
|
+
// !isReady
|
|
89
|
+
// set selectorSelected
|
|
90
|
+
// load Repo
|
|
81
91
|
// Third call
|
|
82
|
-
|
|
83
|
-
|
|
92
|
+
// isReady
|
|
93
|
+
// render Grid,
|
|
84
94
|
// subsequent calls due to changes of selectorSelected
|
|
85
|
-
|
|
95
|
+
// re-apply selectorSelected
|
|
86
96
|
// subsequent calls due to changes changes in onLayout
|
|
87
|
-
|
|
97
|
+
// adjust pageSize if needed
|
|
88
98
|
|
|
89
99
|
// TODO: account for various environments (mainly for optimization):
|
|
90
100
|
// RN vs web
|
|
91
101
|
// Repository vs data
|
|
92
102
|
|
|
103
|
+
const
|
|
104
|
+
SINGLE_CLICK = 1,
|
|
105
|
+
DOUBLE_CLICK = 2,
|
|
106
|
+
TRIPLE_CLICK = 3;
|
|
107
|
+
|
|
93
108
|
function GridComponent(props) {
|
|
94
109
|
const {
|
|
95
110
|
|
|
@@ -98,8 +113,10 @@ function GridComponent(props) {
|
|
|
98
113
|
defaultHiddenColumns = [],
|
|
99
114
|
getRowProps = (item) => {
|
|
100
115
|
return {
|
|
101
|
-
|
|
102
|
-
|
|
116
|
+
className: `
|
|
117
|
+
border-bottom-1
|
|
118
|
+
border-bottom-grey-500
|
|
119
|
+
`,
|
|
103
120
|
};
|
|
104
121
|
},
|
|
105
122
|
flatListProps = {},
|
|
@@ -132,8 +149,6 @@ function GridComponent(props) {
|
|
|
132
149
|
bottomToolbar = 'pagination',
|
|
133
150
|
topToolbar = null,
|
|
134
151
|
additionalToolbarButtons = [],
|
|
135
|
-
h,
|
|
136
|
-
flex,
|
|
137
152
|
bg = '#fff',
|
|
138
153
|
canRecordBeEdited,
|
|
139
154
|
alternateRowBackgrounds = true,
|
|
@@ -143,6 +158,10 @@ function GridComponent(props) {
|
|
|
143
158
|
// withComponent
|
|
144
159
|
self,
|
|
145
160
|
|
|
161
|
+
// withModal
|
|
162
|
+
showModal,
|
|
163
|
+
hideModal,
|
|
164
|
+
|
|
146
165
|
// withEditor
|
|
147
166
|
onAdd,
|
|
148
167
|
onEdit,
|
|
@@ -217,7 +236,6 @@ function GridComponent(props) {
|
|
|
217
236
|
[isLoading, setIsLoading] = useState(false),
|
|
218
237
|
[localColumnsConfig, setLocalColumnsConfigRaw] = useState([]),
|
|
219
238
|
[isReorderMode, setIsReorderMode] = useState(false),
|
|
220
|
-
[isColumnSelectorShown, setIsColumnSelectorShown] = useState(false),
|
|
221
239
|
getIsExpanded = (index) => {
|
|
222
240
|
return !!expandedRowsRef.current[index];
|
|
223
241
|
},
|
|
@@ -334,7 +352,10 @@ function GridComponent(props) {
|
|
|
334
352
|
parent={self}
|
|
335
353
|
reference="reorderBtn"
|
|
336
354
|
onPress={() => setIsReorderMode(!isReorderMode)}
|
|
337
|
-
icon={
|
|
355
|
+
icon={isReorderMode ? NoReorderRows : ReorderRows}
|
|
356
|
+
_icon={{
|
|
357
|
+
className: styles.GRID_TOOLBAR_ITEMS_COLOR,
|
|
358
|
+
}}
|
|
338
359
|
tooltip="Reorder Rows"
|
|
339
360
|
/>);
|
|
340
361
|
}
|
|
@@ -368,13 +389,13 @@ function GridComponent(props) {
|
|
|
368
389
|
}
|
|
369
390
|
if (CURRENT_MODE === UI_MODE_WEB) {
|
|
370
391
|
switch (e.detail) {
|
|
371
|
-
case
|
|
392
|
+
case SINGLE_CLICK:
|
|
372
393
|
onRowClick(item, e); // sets selection
|
|
373
394
|
if (onEditorRowClick) {
|
|
374
395
|
onEditorRowClick(item, index, e);
|
|
375
396
|
}
|
|
376
397
|
break;
|
|
377
|
-
case
|
|
398
|
+
case DOUBLE_CLICK:
|
|
378
399
|
if (!isSelected) { // If a row was already selected when double-clicked, the first click will deselect it,
|
|
379
400
|
onRowClick(item, e); // so reselect it
|
|
380
401
|
}
|
|
@@ -403,11 +424,11 @@ function GridComponent(props) {
|
|
|
403
424
|
}
|
|
404
425
|
}
|
|
405
426
|
break;
|
|
406
|
-
case
|
|
427
|
+
case TRIPLE_CLICK:
|
|
407
428
|
break;
|
|
408
429
|
default:
|
|
409
430
|
}
|
|
410
|
-
} else if (CURRENT_MODE ===
|
|
431
|
+
} else if (CURRENT_MODE === UI_MODE_NATIVE) {
|
|
411
432
|
onRowClick(item, e); // sets selection
|
|
412
433
|
if (onEditorRowClick) {
|
|
413
434
|
onEditorRowClick(item, index, e);
|
|
@@ -431,16 +452,14 @@ function GridComponent(props) {
|
|
|
431
452
|
onEditorRowClick(item, index, e);
|
|
432
453
|
}
|
|
433
454
|
if (onContextMenu) {
|
|
434
|
-
onContextMenu(item, e, selection
|
|
455
|
+
onContextMenu(item, e, selection);
|
|
435
456
|
}
|
|
436
457
|
}}
|
|
437
|
-
|
|
438
|
-
flexGrow={1}
|
|
439
|
-
>
|
|
458
|
+
className="flex-row grow-1">
|
|
440
459
|
{({
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
460
|
+
hovered,
|
|
461
|
+
focused,
|
|
462
|
+
pressed,
|
|
444
463
|
}) => {
|
|
445
464
|
if (isHeaderRow) {
|
|
446
465
|
return <GridHeaderRow
|
|
@@ -453,32 +472,13 @@ function GridComponent(props) {
|
|
|
453
472
|
canColumnsResize={canColumnsResize}
|
|
454
473
|
setSelection={setSelection}
|
|
455
474
|
gridRef={gridRef}
|
|
456
|
-
isHovered={
|
|
475
|
+
isHovered={hovered}
|
|
457
476
|
isInlineEditorShown={isInlineEditorShown}
|
|
458
477
|
areRowsDragSource={areRowsDragSource}
|
|
459
|
-
showColumnsSelector={
|
|
478
|
+
showColumnsSelector={showColumnsSelector}
|
|
460
479
|
/>;
|
|
461
480
|
}
|
|
462
481
|
|
|
463
|
-
let bg = rowProps.bg || styles.GRID_ROW_BG,
|
|
464
|
-
mixWith;
|
|
465
|
-
if (isSelected) {
|
|
466
|
-
if (showHovers && isHovered) {
|
|
467
|
-
mixWith = styles.GRID_ROW_SELECTED_HOVER_BG;
|
|
468
|
-
} else {
|
|
469
|
-
mixWith = styles.GRID_ROW_SELECTED_BG;
|
|
470
|
-
}
|
|
471
|
-
} else if (showHovers && isHovered) {
|
|
472
|
-
mixWith = styles.GRID_ROW_HOVER_BG;
|
|
473
|
-
} else if (alternateRowBackgrounds && index % alternatingInterval === 0) { // i.e. every second line, or every third line
|
|
474
|
-
mixWith = styles.GRID_ROW_ALTERNATE_BG;
|
|
475
|
-
}
|
|
476
|
-
if (mixWith) {
|
|
477
|
-
const
|
|
478
|
-
mixWithObj = nbToRgb(mixWith),
|
|
479
|
-
ratio = mixWithObj.alpha ? 1 - mixWithObj.alpha : 0.5;
|
|
480
|
-
bg = colourMixer.blend(bg, ratio, mixWithObj.color);
|
|
481
|
-
}
|
|
482
482
|
const
|
|
483
483
|
rowReorderProps = {},
|
|
484
484
|
rowDragProps = {};
|
|
@@ -543,6 +543,11 @@ function GridComponent(props) {
|
|
|
543
543
|
rowProps={rowProps}
|
|
544
544
|
hideNavColumn={hideNavColumn}
|
|
545
545
|
isSelected={isSelected}
|
|
546
|
+
isHovered={hovered}
|
|
547
|
+
showHovers={showHovers}
|
|
548
|
+
index={index}
|
|
549
|
+
alternatingInterval={alternatingInterval}
|
|
550
|
+
alternateRowBackgrounds={alternateRowBackgrounds}
|
|
546
551
|
bg={bg}
|
|
547
552
|
item={item}
|
|
548
553
|
isInlineEditorShown={isInlineEditorShown}
|
|
@@ -556,21 +561,21 @@ function GridComponent(props) {
|
|
|
556
561
|
|
|
557
562
|
if (showRowExpander && !isHeaderRow) {
|
|
558
563
|
const isExpanded = getIsExpanded(index);
|
|
559
|
-
rowComponent = <
|
|
560
|
-
<
|
|
564
|
+
rowComponent = <VStack>
|
|
565
|
+
<HStack>
|
|
561
566
|
<ExpandButton
|
|
562
567
|
isExpanded={isExpanded}
|
|
563
568
|
onToggle={() => setIsExpanded(index, !isExpanded)}
|
|
564
569
|
_icon={{
|
|
565
570
|
size: 'sm',
|
|
566
571
|
}}
|
|
567
|
-
py
|
|
572
|
+
className="py-0"
|
|
568
573
|
tooltip="Expand/Contract Row"
|
|
569
574
|
/>
|
|
570
575
|
{rowComponent}
|
|
571
|
-
</
|
|
576
|
+
</HStack>
|
|
572
577
|
{isExpanded ? getExpandedRowContent(row) : null}
|
|
573
|
-
</
|
|
578
|
+
</VStack>
|
|
574
579
|
}
|
|
575
580
|
return rowComponent;
|
|
576
581
|
},
|
|
@@ -805,6 +810,68 @@ function GridComponent(props) {
|
|
|
805
810
|
break;
|
|
806
811
|
}
|
|
807
812
|
}
|
|
813
|
+
},
|
|
814
|
+
showColumnsSelector = () => {
|
|
815
|
+
const
|
|
816
|
+
modalItems = _.map(localColumnsConfig, (config, ix) => {
|
|
817
|
+
return {
|
|
818
|
+
name: config.id,
|
|
819
|
+
label: config.header,
|
|
820
|
+
type: config.isHidable ? 'Checkbox' : 'Text',
|
|
821
|
+
isEditable: config.isHidable ?? false,
|
|
822
|
+
};
|
|
823
|
+
}),
|
|
824
|
+
startingValues = (() => {
|
|
825
|
+
const startingValues = {};
|
|
826
|
+
_.each(localColumnsConfig, (config) => {
|
|
827
|
+
const value = !config.isHidden; // checkbox implies to show it, so flip the polarity
|
|
828
|
+
startingValues[config.id] = config.isHidable ? value : 'Always shown';
|
|
829
|
+
});
|
|
830
|
+
return startingValues;
|
|
831
|
+
})();
|
|
832
|
+
|
|
833
|
+
showModal({
|
|
834
|
+
title: 'Column Selector',
|
|
835
|
+
includeReset: true,
|
|
836
|
+
includeCancel: true,
|
|
837
|
+
h: 800,
|
|
838
|
+
w: styles.FORM_STACK_ROW_THRESHOLD + 10,
|
|
839
|
+
body: <Form
|
|
840
|
+
editorType={EDITOR_TYPE__PLAIN}
|
|
841
|
+
columnDefaults={{
|
|
842
|
+
labelWidth: '250px',
|
|
843
|
+
}}
|
|
844
|
+
items={[
|
|
845
|
+
{
|
|
846
|
+
name: 'instructions',
|
|
847
|
+
type: 'DisplayField',
|
|
848
|
+
text: 'Please select which columns to show in the grid.',
|
|
849
|
+
className: 'mb-3',
|
|
850
|
+
},
|
|
851
|
+
{
|
|
852
|
+
type: 'FieldSet',
|
|
853
|
+
title: 'Columns',
|
|
854
|
+
reference: 'columns',
|
|
855
|
+
showToggleAllCheckbox: true,
|
|
856
|
+
items: [
|
|
857
|
+
...modalItems,
|
|
858
|
+
],
|
|
859
|
+
}
|
|
860
|
+
]}
|
|
861
|
+
startingValues={startingValues}
|
|
862
|
+
onSave={(values)=> {
|
|
863
|
+
hideModal();
|
|
864
|
+
|
|
865
|
+
const newColumnsConfig = _.cloneDeep(localColumnsConfig);
|
|
866
|
+
_.each(newColumnsConfig, (config, ix) => {
|
|
867
|
+
if (config.isHidable) {
|
|
868
|
+
newColumnsConfig[ix].isHidden = !values[config.id]; // checkbox implies to show it, so flip the polarity
|
|
869
|
+
}
|
|
870
|
+
});
|
|
871
|
+
setLocalColumnsConfig(newColumnsConfig);
|
|
872
|
+
}}
|
|
873
|
+
/>,
|
|
874
|
+
});
|
|
808
875
|
};
|
|
809
876
|
|
|
810
877
|
if (forceLoadOnRender && disableLoadOnRender) {
|
|
@@ -985,13 +1052,12 @@ function GridComponent(props) {
|
|
|
985
1052
|
|
|
986
1053
|
if (!isInited) {
|
|
987
1054
|
// first time through, render a placeholder so we can get container dimensions
|
|
988
|
-
return <
|
|
989
|
-
flex={1}
|
|
990
|
-
w="100%"
|
|
1055
|
+
return <VStackNative
|
|
991
1056
|
onLayout={(e) => {
|
|
992
1057
|
adjustPageSizeToHeight(e);
|
|
993
1058
|
setIsInited(true);
|
|
994
1059
|
}}
|
|
1060
|
+
className="w-full flex-1"
|
|
995
1061
|
/>;
|
|
996
1062
|
}
|
|
997
1063
|
if (!isReady) {
|
|
@@ -1031,7 +1097,7 @@ function GridComponent(props) {
|
|
|
1031
1097
|
/>;
|
|
1032
1098
|
} else if (footerToolbarItemComponents.length) {
|
|
1033
1099
|
listFooterComponent = <Toolbar>
|
|
1034
|
-
<
|
|
1100
|
+
<ReloadButton Repository={Repository} self={self} />
|
|
1035
1101
|
{footerToolbarItemComponents}
|
|
1036
1102
|
</Toolbar>;
|
|
1037
1103
|
}
|
|
@@ -1062,15 +1128,21 @@ function GridComponent(props) {
|
|
|
1062
1128
|
initialNumToRender={initialNumToRender}
|
|
1063
1129
|
initialScrollIndex={0}
|
|
1064
1130
|
renderItem={renderRow}
|
|
1065
|
-
|
|
1131
|
+
className="FlatList bg-grey-100"
|
|
1066
1132
|
{...flatListProps}
|
|
1067
|
-
|
|
1133
|
+
/>;
|
|
1068
1134
|
|
|
1069
1135
|
if (CURRENT_MODE === UI_MODE_WEB) {
|
|
1070
|
-
grid = <ScrollView
|
|
1136
|
+
grid = <ScrollView
|
|
1137
|
+
horizontal={false}
|
|
1138
|
+
className="ScrollView"
|
|
1139
|
+
contentContainerStyle={{
|
|
1140
|
+
height: '100%',
|
|
1141
|
+
}}
|
|
1142
|
+
>{grid}</ScrollView>; // fix scrolling bug on nested FlatLists
|
|
1071
1143
|
} else
|
|
1072
|
-
if (CURRENT_MODE ===
|
|
1073
|
-
grid = <ScrollView flex
|
|
1144
|
+
if (CURRENT_MODE === UI_MODE_NATIVE) {
|
|
1145
|
+
grid = <ScrollView className="flex-1 w-full">{grid}</ScrollView>
|
|
1074
1146
|
}
|
|
1075
1147
|
|
|
1076
1148
|
// placeholders in case no entities yet
|
|
@@ -1078,103 +1150,88 @@ function GridComponent(props) {
|
|
|
1078
1150
|
if (Repository?.isLoading) {
|
|
1079
1151
|
grid = <Loading isScreen={true} />;
|
|
1080
1152
|
} else {
|
|
1081
|
-
grid = <NoRecordsFound
|
|
1153
|
+
grid = <NoRecordsFound
|
|
1154
|
+
text={noneFoundText}
|
|
1155
|
+
onRefresh={onRefresh}
|
|
1156
|
+
/>;
|
|
1082
1157
|
}
|
|
1083
1158
|
}
|
|
1084
1159
|
|
|
1085
|
-
|
|
1160
|
+
let gridContainerBorderClassName = '';
|
|
1086
1161
|
if (isReorderMode) {
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
gridContainerBorderProps.borderTopWidth = null;
|
|
1091
|
-
if (isLoading) {
|
|
1092
|
-
gridContainerBorderProps.borderTopColor = '#f00';
|
|
1093
|
-
} else {
|
|
1094
|
-
gridContainerBorderProps.borderTopColor = null;
|
|
1095
|
-
}
|
|
1162
|
+
gridContainerBorderClassName += ' ' + styles.GRID_REORDER_BORDER_WIDTH;
|
|
1163
|
+
gridContainerBorderClassName += ' ' + styles.GRID_REORDER_BORDER_COLOR;
|
|
1164
|
+
gridContainerBorderClassName += ' ' + styles.GRID_REORDER_BORDER_STYLE;
|
|
1096
1165
|
} else if (isLoading) {
|
|
1097
|
-
|
|
1098
|
-
|
|
1166
|
+
gridContainerBorderClassName += ' border-t-4';
|
|
1167
|
+
gridContainerBorderClassName += ' border-t-[#f00]';
|
|
1099
1168
|
} else {
|
|
1100
|
-
|
|
1101
|
-
gridContainerBorderProps.borderTopColor = 'trueGray.300';
|
|
1102
|
-
}
|
|
1103
|
-
|
|
1104
|
-
let columnSelector = null;
|
|
1105
|
-
if (isColumnSelectorShown) {
|
|
1106
|
-
const onCloseColumnSelector = () => {
|
|
1107
|
-
setIsColumnSelectorShown(false);
|
|
1108
|
-
};
|
|
1109
|
-
columnSelector = <Modal
|
|
1110
|
-
isOpen={true}
|
|
1111
|
-
onClose={onCloseColumnSelector}
|
|
1112
|
-
>
|
|
1113
|
-
<ColumnSelectorWindow
|
|
1114
|
-
onClose={onCloseColumnSelector}
|
|
1115
|
-
columnsConfig={localColumnsConfig}
|
|
1116
|
-
setColumnsConfig={setLocalColumnsConfig}
|
|
1117
|
-
/>
|
|
1118
|
-
</Modal>;
|
|
1169
|
+
gridContainerBorderClassName += ' border-t-0';
|
|
1119
1170
|
}
|
|
1120
1171
|
|
|
1121
|
-
const
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1172
|
+
const style = props.style || {};
|
|
1173
|
+
style.backgroundColor = bg;
|
|
1174
|
+
if (!hasHeight(props) && !hasWidth(props) && !hasFlex(props)) {
|
|
1175
|
+
style.flex = 1;
|
|
1176
|
+
}
|
|
1177
|
+
let className = `
|
|
1178
|
+
Grid-VStackNative
|
|
1179
|
+
w-full
|
|
1180
|
+
border
|
|
1181
|
+
border-grey-300
|
|
1182
|
+
`;
|
|
1183
|
+
if (props.className) {
|
|
1184
|
+
className += props.className;
|
|
1126
1185
|
}
|
|
1127
1186
|
|
|
1128
|
-
grid = <
|
|
1187
|
+
grid = <VStackNative
|
|
1129
1188
|
{...testProps(self)}
|
|
1130
1189
|
ref={containerRef}
|
|
1131
1190
|
tabIndex={0}
|
|
1132
1191
|
onKeyDown={onGridKeyDown}
|
|
1133
|
-
w="100%"
|
|
1134
|
-
bg={bg}
|
|
1135
|
-
borderWidth={styles.GRID_BORDER_WIDTH}
|
|
1136
|
-
borderColor={styles.GRID_BORDER_COLOR}
|
|
1137
1192
|
onLayout={(e) => debouncedAdjustPageSizeToHeight(e)}
|
|
1138
|
-
{
|
|
1193
|
+
className={className}
|
|
1194
|
+
style={style}
|
|
1139
1195
|
>
|
|
1140
1196
|
{topToolbar}
|
|
1141
1197
|
|
|
1142
|
-
<
|
|
1143
|
-
testID="gridContainer"
|
|
1198
|
+
<VStack
|
|
1144
1199
|
ref={gridContainerRef}
|
|
1145
|
-
w="100%"
|
|
1146
|
-
flex={1}
|
|
1147
|
-
minHeight={40}
|
|
1148
|
-
{...gridContainerBorderProps}
|
|
1149
1200
|
onClick={() => {
|
|
1150
1201
|
if (!isReorderMode && !isInlineEditorShown && deselectAll) {
|
|
1151
1202
|
deselectAll();
|
|
1152
1203
|
}
|
|
1153
1204
|
}}
|
|
1205
|
+
className={`
|
|
1206
|
+
gridContainer
|
|
1207
|
+
w-full
|
|
1208
|
+
flex-1
|
|
1209
|
+
min-h-[40px]
|
|
1210
|
+
${gridContainerBorderClassName}
|
|
1211
|
+
`}
|
|
1154
1212
|
>
|
|
1155
1213
|
{grid}
|
|
1156
|
-
</
|
|
1214
|
+
</VStack>
|
|
1157
1215
|
|
|
1158
1216
|
{listFooterComponent}
|
|
1159
1217
|
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
</Column>
|
|
1218
|
+
</VStackNative>
|
|
1163
1219
|
|
|
1164
1220
|
if (isDropTarget) {
|
|
1165
1221
|
grid = <Box
|
|
1166
|
-
{...testProps('dropTarget')}
|
|
1167
1222
|
ref={dropTargetRef}
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1223
|
+
className={`
|
|
1224
|
+
dropTarget
|
|
1225
|
+
w-full
|
|
1226
|
+
border-[#0ff]
|
|
1227
|
+
${canDrop && isOver ? "border-[4px]" : "border-[0px]"}
|
|
1228
|
+
`}
|
|
1172
1229
|
>{grid}</Box>
|
|
1173
1230
|
}
|
|
1174
1231
|
return grid;
|
|
1175
|
-
|
|
1176
1232
|
}
|
|
1177
1233
|
|
|
1234
|
+
|
|
1178
1235
|
export const Grid = withComponent(
|
|
1179
1236
|
withAlert(
|
|
1180
1237
|
withEvents(
|