@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,20 +1,25 @@
|
|
|
1
|
-
import { useEffect, useRef, useState, } from 'react';
|
|
1
|
+
import { useEffect, useRef, useState, isValidElement, } from 'react';
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
Icon,
|
|
3
|
+
HStack,
|
|
5
4
|
ScrollView,
|
|
6
|
-
Row,
|
|
7
5
|
Text,
|
|
8
|
-
|
|
6
|
+
VStack,
|
|
7
|
+
VStackNative,
|
|
8
|
+
} from '../Gluestack';
|
|
9
9
|
import {
|
|
10
10
|
EDIT,
|
|
11
11
|
} from '../../Constants/Commands.js';
|
|
12
12
|
import {
|
|
13
13
|
EDITOR_TYPE__SIDE,
|
|
14
14
|
} from '../../Constants/Editor.js';
|
|
15
|
+
import {
|
|
16
|
+
extractCssPropertyFromClassName,
|
|
17
|
+
hasHeight,
|
|
18
|
+
hasWidth,
|
|
19
|
+
hasFlex,
|
|
20
|
+
} from '../../Functions/tailwindFunctions.js';
|
|
15
21
|
import UiGlobals from '../../UiGlobals.js';
|
|
16
22
|
import withComponent from '../Hoc/withComponent.js';
|
|
17
|
-
import withPdfButtons from '../Hoc/withPdfButtons.js';
|
|
18
23
|
import inArray from '../../Functions/inArray.js';
|
|
19
24
|
import getComponentFromType from '../../Functions/getComponentFromType.js';
|
|
20
25
|
import buildAdditionalButtons from '../../Functions/buildAdditionalButtons.js';
|
|
@@ -26,8 +31,6 @@ import Pencil from '../Icons/Pencil.js';
|
|
|
26
31
|
import Footer from '../Layout/Footer.js';
|
|
27
32
|
import _ from 'lodash';
|
|
28
33
|
|
|
29
|
-
const CONTAINER_THRESHOLD = 900;
|
|
30
|
-
|
|
31
34
|
function Viewer(props) {
|
|
32
35
|
const {
|
|
33
36
|
viewerCanDelete = false,
|
|
@@ -38,6 +41,7 @@ function Viewer(props) {
|
|
|
38
41
|
additionalViewButtons,
|
|
39
42
|
canRecordBeEdited,
|
|
40
43
|
viewerSetup, // this fn will be executed after the viewer setup is complete
|
|
44
|
+
disableLabels = false,
|
|
41
45
|
|
|
42
46
|
// withComponent
|
|
43
47
|
self,
|
|
@@ -73,19 +77,22 @@ function Viewer(props) {
|
|
|
73
77
|
if (!item) {
|
|
74
78
|
return null;
|
|
75
79
|
}
|
|
80
|
+
if (isValidElement(item)) {
|
|
81
|
+
return item;
|
|
82
|
+
}
|
|
76
83
|
let {
|
|
77
84
|
type,
|
|
78
85
|
title,
|
|
79
86
|
name,
|
|
80
87
|
label,
|
|
81
88
|
items,
|
|
82
|
-
// onChange: onEditorChange,
|
|
83
89
|
useSelectorId = false,
|
|
84
90
|
isHidden = false,
|
|
85
91
|
isHiddenInViewMode = false,
|
|
86
|
-
|
|
92
|
+
getDynamicProps,
|
|
93
|
+
...itemPropsToPass
|
|
87
94
|
} = item,
|
|
88
|
-
|
|
95
|
+
viewerTypeProps = {};
|
|
89
96
|
|
|
90
97
|
if (isHidden) {
|
|
91
98
|
return null;
|
|
@@ -93,6 +100,9 @@ function Viewer(props) {
|
|
|
93
100
|
if (isHiddenInViewMode) {
|
|
94
101
|
return null;
|
|
95
102
|
}
|
|
103
|
+
if (!itemPropsToPass.className) {
|
|
104
|
+
itemPropsToPass.className = '';
|
|
105
|
+
}
|
|
96
106
|
const propertyDef = name && Repository?.getSchema().getPropertyDefinition(name);
|
|
97
107
|
if (!type) {
|
|
98
108
|
if (propertyDef?.viewerType?.type) {
|
|
@@ -101,48 +111,110 @@ function Viewer(props) {
|
|
|
101
111
|
type: t,
|
|
102
112
|
...p
|
|
103
113
|
} = propertyDef.viewerType;
|
|
104
|
-
type = t
|
|
114
|
+
type = t;
|
|
115
|
+
viewerTypeProps = p;
|
|
105
116
|
} else {
|
|
106
117
|
type = 'Text';
|
|
107
118
|
}
|
|
108
119
|
}
|
|
109
|
-
|
|
110
|
-
|
|
120
|
+
const isCombo = type?.match && type.match(/Combo/);
|
|
121
|
+
if (item.hasOwnProperty('autoLoad')) {
|
|
122
|
+
viewerTypeProps.autoLoad = item.autoLoad;
|
|
123
|
+
} else {
|
|
124
|
+
if (isCombo && Repository?.isRemote && !Repository?.isLoaded) {
|
|
125
|
+
viewerTypeProps.autoLoad = true;
|
|
126
|
+
}
|
|
111
127
|
}
|
|
112
128
|
if (type?.match(/(Tag|TagEditor)$/)) {
|
|
113
|
-
|
|
129
|
+
viewerTypeProps.isViewOnly = true;
|
|
114
130
|
}
|
|
115
131
|
const Element = getComponentFromType(type);
|
|
116
|
-
let children;
|
|
117
132
|
|
|
118
|
-
if (inArray(type, ['Column', 'FieldSet'])) {
|
|
133
|
+
if (inArray(type, ['Column', 'Row', 'FieldSet'])) {
|
|
119
134
|
if (_.isEmpty(items)) {
|
|
120
135
|
return null;
|
|
121
136
|
}
|
|
137
|
+
let children;
|
|
138
|
+
const style = {};
|
|
122
139
|
if (type === 'Column') {
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
if (
|
|
126
|
-
|
|
127
|
-
}
|
|
128
|
-
if (propsToPass.hasOwnProperty('width')) {
|
|
129
|
-
delete propsToPass.width;
|
|
140
|
+
const isEverythingInOneColumn = containerWidth < styles.FORM_ONE_COLUMN_THRESHOLD;
|
|
141
|
+
if (itemPropsToPass.hasOwnProperty('flex')) {
|
|
142
|
+
if (!isEverythingInOneColumn) {
|
|
143
|
+
style.flex = itemPropsToPass.flex;
|
|
130
144
|
}
|
|
131
|
-
|
|
132
|
-
|
|
145
|
+
delete itemPropsToPass.flex;
|
|
146
|
+
}
|
|
147
|
+
if (itemPropsToPass.hasOwnProperty('w')) {
|
|
148
|
+
if (!isEverythingInOneColumn) {
|
|
149
|
+
style.width = itemPropsToPass.w;
|
|
133
150
|
}
|
|
134
|
-
|
|
135
|
-
|
|
151
|
+
delete itemPropsToPass.w;
|
|
152
|
+
}
|
|
153
|
+
if (!style.flex && !style.width) {
|
|
154
|
+
style.flex = 1;
|
|
136
155
|
}
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
156
|
+
itemPropsToPass.className += ' Column';
|
|
157
|
+
// if (containerWidth < styles.FORM_ONE_COLUMN_THRESHOLD) {
|
|
158
|
+
// // everything is in one column
|
|
159
|
+
// if (hasFlex(itemPropsToPass)) {
|
|
160
|
+
// itemPropsToPass.className = extractCssPropertyFromClassName(itemPropsToPass.className, 'flex').className;
|
|
161
|
+
// if (itemPropsToPass.style?.flex) {
|
|
162
|
+
// delete itemPropsToPass.style.flex;
|
|
163
|
+
// }
|
|
164
|
+
// }
|
|
165
|
+
// if (hasWidth(itemPropsToPass)) {
|
|
166
|
+
// itemPropsToPass.className = extractCssPropertyFromClassName(itemPropsToPass.className, 'width').className;
|
|
167
|
+
// if (itemPropsToPass.style?.width) {
|
|
168
|
+
// delete itemPropsToPass.style.width;
|
|
169
|
+
// }
|
|
170
|
+
// }
|
|
171
|
+
// itemPropsToPass.className += ' w-full mb-1';
|
|
172
|
+
// }
|
|
173
|
+
}
|
|
174
|
+
if (type === 'Row') {
|
|
175
|
+
itemPropsToPass.className += ' Row w-full';
|
|
176
|
+
}
|
|
177
|
+
if (type === 'FieldSet' && item.showToggleAllCheckbox) {
|
|
178
|
+
itemPropsToPass.showToggleAllCheckbox = false; // don't allow it in view mode
|
|
140
179
|
}
|
|
141
180
|
const itemDefaults = item.defaults || {};
|
|
142
181
|
children = _.map(items, (item, ix) => {
|
|
143
182
|
return buildFromItem(item, ix, {...defaults, ...itemDefaults});
|
|
144
183
|
});
|
|
145
|
-
|
|
184
|
+
|
|
185
|
+
let elementClassName = '';
|
|
186
|
+
const defaultsClassName = defaults.className;
|
|
187
|
+
if (defaultsClassName) {
|
|
188
|
+
elementClassName += ' ' + defaultsClassName;
|
|
189
|
+
}
|
|
190
|
+
const itemDefaultsClassName = itemDefaults.className;
|
|
191
|
+
if (itemDefaultsClassName) {
|
|
192
|
+
elementClassName += ' ' + itemDefaultsClassName;
|
|
193
|
+
}
|
|
194
|
+
const itemPropsToPassClassName = itemPropsToPass.className;
|
|
195
|
+
if (itemPropsToPassClassName) {
|
|
196
|
+
elementClassName += ' ' + itemPropsToPassClassName;
|
|
197
|
+
}
|
|
198
|
+
const editorTypeClassName = viewerTypeProps.className;
|
|
199
|
+
if (editorTypeClassName) {
|
|
200
|
+
elementClassName += ' ' + editorTypeClassName;
|
|
201
|
+
}
|
|
202
|
+
let defaultsToPass = {},
|
|
203
|
+
itemDefaultsToPass = {};
|
|
204
|
+
if (type === 'FieldSet') { // don't pass for Row and Column, as they use regular <div>s for web
|
|
205
|
+
defaultsToPass = defaults;
|
|
206
|
+
itemDefaultsToPass = itemDefaults;
|
|
207
|
+
}
|
|
208
|
+
return <Element
|
|
209
|
+
key={ix}
|
|
210
|
+
title={title}
|
|
211
|
+
{...defaultsToPass}
|
|
212
|
+
{...itemDefaultsToPass}
|
|
213
|
+
{...itemPropsToPass}
|
|
214
|
+
{...viewerTypeProps}
|
|
215
|
+
className={elementClassName}
|
|
216
|
+
style={style}
|
|
217
|
+
>{children}</Element>;
|
|
146
218
|
}
|
|
147
219
|
|
|
148
220
|
if (!label && Repository && propertyDef?.title) {
|
|
@@ -160,6 +232,20 @@ function Viewer(props) {
|
|
|
160
232
|
value = record.properties[fkDisplayField].displayValue;
|
|
161
233
|
}
|
|
162
234
|
}
|
|
235
|
+
|
|
236
|
+
let elementClassName = 'field-' + name;
|
|
237
|
+
const defaultsClassName = defaults.className;
|
|
238
|
+
if (defaultsClassName) {
|
|
239
|
+
elementClassName += ' ' + defaultsClassName;
|
|
240
|
+
}
|
|
241
|
+
const itemPropsToPassClassName = itemPropsToPass.className;
|
|
242
|
+
if (itemPropsToPassClassName) {
|
|
243
|
+
elementClassName += ' ' + itemPropsToPassClassName;
|
|
244
|
+
}
|
|
245
|
+
const viewerTypeClassName = viewerTypeProps.className;
|
|
246
|
+
if (viewerTypeClassName) {
|
|
247
|
+
elementClassName += ' ' + viewerTypeClassName;
|
|
248
|
+
}
|
|
163
249
|
|
|
164
250
|
let element = <Element
|
|
165
251
|
{...testProps('field-' + name)}
|
|
@@ -167,25 +253,39 @@ function Viewer(props) {
|
|
|
167
253
|
isEditable={false}
|
|
168
254
|
parent={self}
|
|
169
255
|
reference={name}
|
|
170
|
-
{...
|
|
171
|
-
{...
|
|
256
|
+
{...itemPropsToPass}
|
|
257
|
+
{...viewerTypeProps}
|
|
258
|
+
className={elementClassName}
|
|
172
259
|
/>;
|
|
173
260
|
|
|
174
261
|
if (item.additionalViewButtons) {
|
|
175
|
-
element = <
|
|
262
|
+
element = <HStack className="flex-wrap">
|
|
176
263
|
{element}
|
|
177
264
|
{buildAdditionalButtons(item.additionalViewButtons, self)}
|
|
178
|
-
</
|
|
265
|
+
</HStack>;
|
|
179
266
|
}
|
|
180
267
|
|
|
181
|
-
if (label) {
|
|
182
|
-
const
|
|
268
|
+
if (!disableLabels && label) {
|
|
269
|
+
const style = {};
|
|
183
270
|
if (defaults?.labelWidth) {
|
|
184
|
-
|
|
271
|
+
style.width = defaults.labelWidth;
|
|
272
|
+
}
|
|
273
|
+
if (!style.width) {
|
|
274
|
+
style.width = '50px';
|
|
275
|
+
}
|
|
276
|
+
if (containerWidth > styles.FORM_STACK_ROW_THRESHOLD) {
|
|
277
|
+
element = <HStack className="HStackA py-1">
|
|
278
|
+
<Label style={style}>{label}</Label>
|
|
279
|
+
{element}
|
|
280
|
+
</HStack>;
|
|
281
|
+
} else {
|
|
282
|
+
element = <VStack className="HStackA w-full py-1 mt-3">
|
|
283
|
+
<Label style={style}>{label}</Label>
|
|
284
|
+
{element}
|
|
285
|
+
</VStack>;
|
|
185
286
|
}
|
|
186
|
-
element = <><Label {...labelProps}>{label}</Label>{element}</>;
|
|
187
287
|
}
|
|
188
|
-
return <
|
|
288
|
+
return <HStack key={ix} className="HStackB px-2 pb-1">{element}</HStack>;
|
|
189
289
|
},
|
|
190
290
|
buildAncillary = () => {
|
|
191
291
|
const components = [];
|
|
@@ -195,39 +295,35 @@ function Viewer(props) {
|
|
|
195
295
|
type,
|
|
196
296
|
title = null,
|
|
197
297
|
selectorId = null,
|
|
198
|
-
...
|
|
298
|
+
...itemPropsToPass
|
|
199
299
|
} = item;
|
|
200
300
|
if (isMultiple && type !== 'Attachments') {
|
|
201
301
|
return;
|
|
202
302
|
}
|
|
203
|
-
if (!
|
|
204
|
-
|
|
303
|
+
if (type.match(/Grid/) && !itemPropsToPass.h) {
|
|
304
|
+
itemPropsToPass.h = 400;
|
|
205
305
|
}
|
|
306
|
+
|
|
206
307
|
const
|
|
207
308
|
Element = getComponentFromType(type),
|
|
208
309
|
element = <Element
|
|
209
310
|
{...testProps('ancillary-' + type)}
|
|
210
311
|
selectorId={selectorId}
|
|
211
312
|
selectorSelected={selectorSelected || record}
|
|
212
|
-
flex={1}
|
|
213
|
-
h={350}
|
|
214
313
|
canEditorViewOnly={true}
|
|
215
314
|
canCrud={false}
|
|
216
315
|
uniqueRepository={true}
|
|
217
316
|
parent={self}
|
|
218
|
-
{...
|
|
317
|
+
{...itemPropsToPass}
|
|
219
318
|
canRowsReorder={false}
|
|
220
319
|
/>;
|
|
221
320
|
if (title) {
|
|
222
321
|
if (record?.displayValue) {
|
|
223
322
|
title += ' for ' + record.displayValue;
|
|
224
323
|
}
|
|
225
|
-
title = <Text
|
|
226
|
-
fontSize={styles.VIEWER_ANCILLARY_FONTSIZE}
|
|
227
|
-
fontWeight="bold"
|
|
228
|
-
>{title}</Text>;
|
|
324
|
+
title = <Text className={`${styles.VIEWER_ANCILLARY_FONTSIZE} font-bold`}>{title}</Text>;
|
|
229
325
|
}
|
|
230
|
-
components.push(<
|
|
326
|
+
components.push(<VStack key={'ancillary-' + ix} className="my-3">{title}{element}</VStack>);
|
|
231
327
|
});
|
|
232
328
|
}
|
|
233
329
|
return components;
|
|
@@ -264,60 +360,87 @@ function Viewer(props) {
|
|
|
264
360
|
canEdit = false;
|
|
265
361
|
}
|
|
266
362
|
|
|
267
|
-
|
|
363
|
+
let className = 'Viewer-VStackNative';
|
|
364
|
+
if (props.className) {
|
|
365
|
+
className += ' ' + props.className;
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
return <VStackNative
|
|
369
|
+
{...testProps(self)}
|
|
370
|
+
{...props}
|
|
371
|
+
className={className}
|
|
372
|
+
onLayout={onLayout}
|
|
373
|
+
>
|
|
268
374
|
{containerWidth && <>
|
|
269
375
|
|
|
270
|
-
<ScrollView
|
|
376
|
+
<ScrollView
|
|
377
|
+
_web={{ height: 1 }}
|
|
378
|
+
ref={scrollViewRef}
|
|
379
|
+
className={`
|
|
380
|
+
ScrollView
|
|
381
|
+
w-full
|
|
382
|
+
pb-1
|
|
383
|
+
`}
|
|
384
|
+
>
|
|
271
385
|
{canEdit && onEditMode &&
|
|
272
|
-
<Toolbar
|
|
273
|
-
<
|
|
274
|
-
<Text
|
|
275
|
-
</
|
|
386
|
+
<Toolbar className="justify-end">
|
|
387
|
+
<HStack className="flex-1 items-center">
|
|
388
|
+
<Text className="text-[20px] ml-1 text-grey-500">View Mode</Text>
|
|
389
|
+
</HStack>
|
|
276
390
|
{(!canUser || canUser(EDIT)) &&
|
|
277
391
|
<Button
|
|
278
392
|
{...testProps('toEditBtn')}
|
|
279
393
|
key="editBtn"
|
|
280
394
|
onPress={onEditMode}
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
395
|
+
icon={Pencil}
|
|
396
|
+
_icon={{
|
|
397
|
+
size: 'sm',
|
|
398
|
+
className: 'text-white'
|
|
399
|
+
}}
|
|
400
|
+
className="text-white"
|
|
401
|
+
text="To Edit"
|
|
402
|
+
tooltip="Switch to Edit Mode"
|
|
403
|
+
/>}
|
|
284
404
|
</Toolbar>}
|
|
405
|
+
|
|
285
406
|
{!_.isEmpty(additionalButtons) &&
|
|
286
|
-
<Toolbar
|
|
407
|
+
<Toolbar className="justify-end flex-wrap">
|
|
287
408
|
{additionalButtons}
|
|
288
409
|
</Toolbar>}
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
</Column>
|
|
410
|
+
|
|
411
|
+
{containerWidth >= styles.FORM_ONE_COLUMN_THRESHOLD ? <HStack className="Viewer-formComponents-HStack p-4 gap-4 justify-center">{viewerComponents}</HStack> : null}
|
|
412
|
+
{containerWidth < styles.FORM_ONE_COLUMN_THRESHOLD ? <VStack className="Viewer-formComponents-VStack p-4">{viewerComponents}</VStack> : null}
|
|
413
|
+
<VStack className="Viewer-AncillaryComponents m-2 pt-4 px-2">{ancillaryComponents}</VStack>
|
|
294
414
|
</ScrollView>
|
|
415
|
+
|
|
295
416
|
{(showDeleteBtn || showCloseBtn) &&
|
|
296
|
-
<Footer
|
|
417
|
+
<Footer className="justify-end">
|
|
297
418
|
{showDeleteBtn &&
|
|
298
|
-
<
|
|
419
|
+
<HStack className="flex-1 justify-start">
|
|
299
420
|
<Button
|
|
300
421
|
{...testProps('deleteBtn')}
|
|
301
422
|
key="deleteBtn"
|
|
302
423
|
onPress={onDelete}
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
bg
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
424
|
+
className={`
|
|
425
|
+
text-white
|
|
426
|
+
bg-warning-500
|
|
427
|
+
hover:bg-warning-600
|
|
428
|
+
`}
|
|
429
|
+
text="Delete"
|
|
430
|
+
/>
|
|
431
|
+
</HStack>}
|
|
310
432
|
{onClose && showCloseBtn &&
|
|
311
433
|
<Button
|
|
312
434
|
{...testProps('closeBtn')}
|
|
313
435
|
key="closeBtn"
|
|
314
436
|
onPress={onClose}
|
|
315
|
-
|
|
316
|
-
|
|
437
|
+
className="text-white"
|
|
438
|
+
text="Close"
|
|
439
|
+
/>}
|
|
317
440
|
</Footer>}
|
|
318
441
|
|
|
319
442
|
</>}
|
|
320
|
-
</
|
|
443
|
+
</VStackNative>;
|
|
321
444
|
}
|
|
322
445
|
|
|
323
|
-
export default withComponent(
|
|
446
|
+
export default withComponent(Viewer);
|
|
@@ -5,9 +5,6 @@
|
|
|
5
5
|
* "LICENSE.txt" file, which is part of this source code package.
|
|
6
6
|
*/
|
|
7
7
|
import { useState, } from 'react';
|
|
8
|
-
import {
|
|
9
|
-
Icon,
|
|
10
|
-
} from 'native-base';
|
|
11
8
|
import Excel from '../Icons/Excel';
|
|
12
9
|
import Panel from '../Panel/Panel.js';
|
|
13
10
|
import Form from '../Form/Form.js';
|
|
@@ -15,6 +12,8 @@ import useAdjustedWindowSize from '../../Hooks/useAdjustedWindowSize.js';
|
|
|
15
12
|
import downloadWithFetch from '../../Functions/downloadWithFetch.js';
|
|
16
13
|
import withAlert from '../Hoc/withAlert.js';
|
|
17
14
|
import withComponent from '../Hoc/withComponent.js';
|
|
15
|
+
import Download from '../Icons/Download';
|
|
16
|
+
import Upload from '../Icons/Upload';
|
|
18
17
|
import Cookies from 'js-cookie';
|
|
19
18
|
import _ from 'lodash';
|
|
20
19
|
|
|
@@ -133,15 +132,21 @@ function UploadsDownloadsWindow(props) {
|
|
|
133
132
|
reference="UploadsDownloadsWindow"
|
|
134
133
|
isCollapsible={false}
|
|
135
134
|
title="Uploads & Downloads"
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
135
|
+
className={`
|
|
136
|
+
flex-none
|
|
137
|
+
bg-white
|
|
138
|
+
shadow-lg
|
|
139
|
+
`}
|
|
140
|
+
style={{
|
|
141
|
+
height,
|
|
142
|
+
width,
|
|
143
|
+
}}
|
|
140
144
|
>
|
|
141
145
|
<Form
|
|
142
146
|
{...props}
|
|
143
147
|
parent={self}
|
|
144
148
|
reference="form"
|
|
149
|
+
hideResetButton={true}
|
|
145
150
|
items={[
|
|
146
151
|
{
|
|
147
152
|
"type": "Column",
|
|
@@ -156,13 +161,16 @@ function UploadsDownloadsWindow(props) {
|
|
|
156
161
|
type: 'Button',
|
|
157
162
|
text: 'Download',
|
|
158
163
|
isEditable: false,
|
|
159
|
-
|
|
164
|
+
icon: Excel,
|
|
165
|
+
_icon: {
|
|
166
|
+
size: 'md',
|
|
167
|
+
},
|
|
160
168
|
onPress: () => onDownload(),
|
|
169
|
+
className: 'mb-5',
|
|
161
170
|
},
|
|
162
171
|
{
|
|
163
172
|
type: 'DisplayField',
|
|
164
173
|
text: 'Upload an Excel file to the current grid.',
|
|
165
|
-
mt: 10,
|
|
166
174
|
},
|
|
167
175
|
{
|
|
168
176
|
type: 'File',
|
|
@@ -171,19 +179,29 @@ function UploadsDownloadsWindow(props) {
|
|
|
171
179
|
accept: '.xlsx',
|
|
172
180
|
},
|
|
173
181
|
{
|
|
174
|
-
type: '
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
182
|
+
type: 'Row',
|
|
183
|
+
className: 'mt-2',
|
|
184
|
+
items: [
|
|
185
|
+
{
|
|
186
|
+
type: 'Button',
|
|
187
|
+
text: 'Upload',
|
|
188
|
+
isEditable: false,
|
|
189
|
+
icon: Upload,
|
|
190
|
+
_icon: {
|
|
191
|
+
size: 'md',
|
|
192
|
+
},
|
|
193
|
+
isDisabled: !importFile,
|
|
194
|
+
onPress: onUpload,
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
type: 'Button',
|
|
198
|
+
text: 'Get Template',
|
|
199
|
+
icon: Download,
|
|
200
|
+
isEditable: false,
|
|
201
|
+
onPress: onDownloadTemplate,
|
|
202
|
+
},
|
|
203
|
+
|
|
204
|
+
],
|
|
187
205
|
},
|
|
188
206
|
]
|
|
189
207
|
},
|
package/src/Components/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
} from '
|
|
2
|
+
HStackNative,
|
|
3
|
+
VStackNative,
|
|
4
|
+
} from './Gluestack';
|
|
5
5
|
import AddressBook from './Icons/AddressBook.js';
|
|
6
6
|
import Alt from './Icons/Alt.js';
|
|
7
7
|
import AngleLeft from './Icons/AngleLeft.js';
|
|
@@ -58,6 +58,7 @@ import Comments from './Icons/Comments.js';
|
|
|
58
58
|
import CommentsRegular from './Icons/CommentsRegular.js';
|
|
59
59
|
import Copyright from './Icons/Copyright.js';
|
|
60
60
|
import Dot from './Icons/Dot.js';
|
|
61
|
+
import Download from './Icons/Download.js';
|
|
61
62
|
import Duplicate from './Icons/Duplicate.js';
|
|
62
63
|
import Edit from './Icons/Edit.js';
|
|
63
64
|
import EllipsisHorizontal from './Icons/EllipsisHorizontal.js';
|
|
@@ -69,7 +70,7 @@ import Exclamation from './Icons/Exclamation.js';
|
|
|
69
70
|
import Expand from './Icons/Expand.js';
|
|
70
71
|
import Eye from './Icons/Eye.js';
|
|
71
72
|
import EyeSlash from './Icons/EyeSlash.js';
|
|
72
|
-
import
|
|
73
|
+
import FileIcon from './Icons/File.js'; // note name change, since we have a File component
|
|
73
74
|
import FloppyDiskRegular from './Icons/FloppyDiskRegular.js';
|
|
74
75
|
import Folder from './Icons/Folder.js';
|
|
75
76
|
import FolderClosed from './Icons/FolderClosed.js';
|
|
@@ -175,6 +176,7 @@ import TrashCan from './Icons/TrashCan.js';
|
|
|
175
176
|
import TriangleExclamation from './Icons/TriangleExclamation.js';
|
|
176
177
|
import Truck from './Icons/Truck.js';
|
|
177
178
|
import TruckFast from './Icons/TruckFast.js';
|
|
179
|
+
import Upload from './Icons/Upload.js';
|
|
178
180
|
import UploadDownload from './Icons/UploadDownload.js';
|
|
179
181
|
import User from './Icons/User.js';
|
|
180
182
|
import UserGroup from './Icons/UserGroup.js';
|
|
@@ -238,6 +240,8 @@ import YearsCombo from './Form/Field/Combo/YearsCombo.js';
|
|
|
238
240
|
import _ from 'lodash';
|
|
239
241
|
|
|
240
242
|
const components = {
|
|
243
|
+
Column: VStackNative,
|
|
244
|
+
Row: HStackNative,
|
|
241
245
|
AddressBook,
|
|
242
246
|
Alt,
|
|
243
247
|
AngleLeft,
|
|
@@ -294,6 +298,7 @@ const components = {
|
|
|
294
298
|
CommentsRegular,
|
|
295
299
|
Copyright,
|
|
296
300
|
Dot,
|
|
301
|
+
Download,
|
|
297
302
|
Duplicate,
|
|
298
303
|
Edit,
|
|
299
304
|
EllipsisHorizontal,
|
|
@@ -305,7 +310,7 @@ const components = {
|
|
|
305
310
|
Expand,
|
|
306
311
|
Eye,
|
|
307
312
|
EyeSlash,
|
|
308
|
-
|
|
313
|
+
FileIcon,
|
|
309
314
|
FloppyDiskRegular,
|
|
310
315
|
Folder,
|
|
311
316
|
FolderClosed,
|
|
@@ -411,6 +416,7 @@ const components = {
|
|
|
411
416
|
TriangleExclamation,
|
|
412
417
|
Truck,
|
|
413
418
|
TruckFast,
|
|
419
|
+
Upload,
|
|
414
420
|
UploadDownload,
|
|
415
421
|
User,
|
|
416
422
|
UserGroup,
|
|
@@ -433,7 +439,6 @@ const components = {
|
|
|
433
439
|
CheckboxGroup,
|
|
434
440
|
// CKEditor,
|
|
435
441
|
Color,
|
|
436
|
-
Column,
|
|
437
442
|
Combo,
|
|
438
443
|
// ComboEditor,
|
|
439
444
|
Container,
|
|
@@ -461,7 +466,6 @@ const components = {
|
|
|
461
466
|
PlusMinusButton,
|
|
462
467
|
RadioGroup,
|
|
463
468
|
Slider,
|
|
464
|
-
Row,
|
|
465
469
|
SquareButton,
|
|
466
470
|
TabPanel,
|
|
467
471
|
Tag,
|
|
@@ -474,5 +478,4 @@ const components = {
|
|
|
474
478
|
TreeNode,
|
|
475
479
|
YearsCombo,
|
|
476
480
|
};
|
|
477
|
-
|
|
478
481
|
export default components;
|
package/src/Constants/Alert.js
CHANGED
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export const BACKGROUND_COLOR__ORDER_STATUS__RECEIVED = '#feffb3';
|
|
2
|
+
export const BACKGROUND_COLOR__ORDER_STATUS__ASSIGNED = '#c0ffb3';
|
|
3
|
+
export const BACKGROUND_COLOR__ORDER_STATUS__IN_PROCESS = '#66ffeb';
|
|
4
|
+
export const BACKGROUND_COLOR__ORDER_STATUS__ON_ITS_WAY = '#6bd5ff';
|
|
5
|
+
export const BACKGROUND_COLOR__ORDER_STATUS__PARTIALLY_COMPLETED = '#0b82de';
|
|
6
|
+
export const BACKGROUND_COLOR__ORDER_STATUS__COMPLETED = '#0cb51f';
|
|
7
|
+
|
|
8
|
+
export const FOREGROUND_COLOR__ORDER_STATUS__RECEIVED = '#c76805';
|
|
9
|
+
export const FOREGROUND_COLOR__ORDER_STATUS__ASSIGNED = '#000';
|
|
10
|
+
export const FOREGROUND_COLOR__ORDER_STATUS__IN_PROCESS = '#000';
|
|
11
|
+
export const FOREGROUND_COLOR__ORDER_STATUS__ON_ITS_WAY = '#000';
|
|
12
|
+
export const FOREGROUND_COLOR__ORDER_STATUS__PARTIALLY_COMPLETED = '#fff';
|
|
13
|
+
export const FOREGROUND_COLOR__ORDER_STATUS__COMPLETED = '#fff';
|
|
File without changes
|
package/src/Constants/Date.js
CHANGED
|
File without changes
|