From e13e630cd6e4fc0b1ff92098a28a770794c7bb9a Mon Sep 17 00:00:00 2001 From: gabrhr <73925454+gabrhr@users.noreply.github.com> Date: Wed, 20 Apr 2022 10:19:29 -0500 Subject: =?UTF-8?q?A=C3=B1adir=20plantilla?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Base para front --- front/odiparpack/app/containers/.DS_Store | Bin 0 -> 10244 bytes front/odiparpack/app/containers/App/Application.js | 131 +++++++ front/odiparpack/app/containers/App/Auth.js | 28 ++ .../odiparpack/app/containers/App/ThemeWrapper.js | 111 ++++++ front/odiparpack/app/containers/App/index.js | 23 ++ .../odiparpack/app/containers/Charts/AreaCharts.js | 63 ++++ .../odiparpack/app/containers/Charts/BarCharts.js | 77 ++++ .../app/containers/Charts/CompossedCharts.js | 56 +++ .../odiparpack/app/containers/Charts/LineCharts.js | 70 ++++ .../odiparpack/app/containers/Charts/PieCharts.js | 49 +++ .../app/containers/Charts/RadarCharts.js | 42 +++ .../app/containers/Charts/ResponsiveCharts.js | 63 ++++ .../app/containers/Charts/ScatterCharts.js | 63 ++++ .../Charts/demos/AreaNegativePositive.js | 62 +++ .../app/containers/Charts/demos/AreaPercent.js | 79 ++++ .../app/containers/Charts/demos/AreaResponsive.js | 67 ++++ .../app/containers/Charts/demos/AreaSimple.js | 42 +++ .../app/containers/Charts/demos/AreaStacked.js | 49 +++ .../app/containers/Charts/demos/BarCustom.js | 80 ++++ .../app/containers/Charts/demos/BarCustomLabel.js | 84 +++++ .../app/containers/Charts/demos/BarMix.js | 48 +++ .../containers/Charts/demos/BarPositiveNegative.js | 47 +++ .../app/containers/Charts/demos/BarResponsive.js | 64 ++++ .../app/containers/Charts/demos/BarSimple.js | 45 +++ .../app/containers/Charts/demos/BarStacked.js | 45 +++ .../Charts/demos/CompossedLineBarArea.js | 51 +++ .../containers/Charts/demos/CompossedResponsive.js | 69 ++++ .../containers/Charts/demos/CompossedSameData.js | 46 +++ .../containers/Charts/demos/CompossedVertical.js | 52 +++ .../app/containers/Charts/demos/DoubleRadar.js | 35 ++ .../app/containers/Charts/demos/LineCustomDot.js | 78 ++++ .../app/containers/Charts/demos/LineCustomLabel.js | 74 ++++ .../app/containers/Charts/demos/LineResponsive.js | 56 +++ .../app/containers/Charts/demos/LineSimple.js | 37 ++ .../app/containers/Charts/demos/LineVertical.js | 46 +++ .../app/containers/Charts/demos/PieCustomLabel.js | 83 ++++ .../app/containers/Charts/demos/PieCustomShape.js | 143 +++++++ .../app/containers/Charts/demos/PieSimple.js | 36 ++ .../app/containers/Charts/demos/RadarSimple.js | 30 ++ .../app/containers/Charts/demos/ScatterCustom.js | 46 +++ .../app/containers/Charts/demos/ScatterJoinLine.js | 46 +++ .../app/containers/Charts/demos/ScatterMultiple.js | 46 +++ .../containers/Charts/demos/ScatterResponsive.js | 64 ++++ .../app/containers/Charts/demos/ScatterSimple.js | 40 ++ .../app/containers/Charts/demos/index.js | 31 ++ .../app/containers/Charts/demos/sampleData.js | 262 +++++++++++++ .../app/containers/Dashboard/Dashboard.js | 99 +++++ .../app/containers/Dashboard/DashboardV2.js | 79 ++++ .../app/containers/Dashboard/dashboard-jss.js | 30 ++ .../app/containers/Forms/Autocomplete.js | 91 +++++ front/odiparpack/app/containers/Forms/Buttons.js | 58 +++ .../app/containers/Forms/CheckboxRadio.js | 46 +++ .../app/containers/Forms/DateTimePicker.js | 52 +++ front/odiparpack/app/containers/Forms/Rating.js | 46 +++ front/odiparpack/app/containers/Forms/ReduxForm.js | 51 +++ front/odiparpack/app/containers/Forms/Selectbox.js | 58 +++ .../odiparpack/app/containers/Forms/SliderRange.js | 46 +++ front/odiparpack/app/containers/Forms/Switches.js | 40 ++ .../odiparpack/app/containers/Forms/TextEditor.js | 40 ++ front/odiparpack/app/containers/Forms/Textbox.js | 58 +++ front/odiparpack/app/containers/Forms/Upload.js | 52 +++ .../app/containers/Forms/demos/AutoSuggest.js | 184 +++++++++ .../app/containers/Forms/demos/Checkboxes.js | 242 ++++++++++++ .../app/containers/Forms/demos/ComplexButtons.js | 154 ++++++++ .../containers/Forms/demos/ControlledSelectbox.js | 200 ++++++++++ .../app/containers/Forms/demos/CustomButtons.js | 257 +++++++++++++ .../app/containers/Forms/demos/DateInput.js | 193 ++++++++++ .../app/containers/Forms/demos/DateTimeInput.js | 123 ++++++ .../app/containers/Forms/demos/FloatingButtons.js | 185 +++++++++ .../app/containers/Forms/demos/FormattedInputs.js | 109 ++++++ .../app/containers/Forms/demos/HighlightSuggest.js | 198 ++++++++++ .../app/containers/Forms/demos/InputAdornments.js | 221 +++++++++++ .../containers/Forms/demos/MultipleSelectbox.js | 165 ++++++++ .../app/containers/Forms/demos/NativeSelectbox.js | 153 ++++++++ .../app/containers/Forms/demos/RadioButton.js | 212 +++++++++++ .../app/containers/Forms/demos/RangeInput.js | 92 +++++ .../app/containers/Forms/demos/RatingCustom.js | 176 +++++++++ .../app/containers/Forms/demos/RatingNormal.js | 92 +++++ .../app/containers/Forms/demos/ReduxFormDemo.js | 229 +++++++++++ .../containers/Forms/demos/SelectSuggestionTags.js | 379 +++++++++++++++++++ .../containers/Forms/demos/SelectSuggestions.js | 378 +++++++++++++++++++ .../app/containers/Forms/demos/SimpleSelectbox.js | 180 +++++++++ .../app/containers/Forms/demos/SliderInput.js | 104 +++++ .../app/containers/Forms/demos/StandardButtons.js | 223 +++++++++++ .../app/containers/Forms/demos/SwitchesInput.js | 210 +++++++++++ .../app/containers/Forms/demos/TagSuggestions.js | 249 ++++++++++++ .../app/containers/Forms/demos/TextFields.js | 124 ++++++ .../app/containers/Forms/demos/TextFieldsLayout.js | 174 +++++++++ .../app/containers/Forms/demos/TimeInput.js | 124 ++++++ .../app/containers/Forms/demos/UploadInputAll.js | 31 ++ .../app/containers/Forms/demos/UploadInputBtn.js | 32 ++ .../app/containers/Forms/demos/UploadInputImg.js | 32 ++ .../app/containers/Forms/demos/Wysiwyg.js | 91 +++++ .../odiparpack/app/containers/Forms/demos/index.js | 44 +++ .../app/containers/LanguageProvider/actions.js | 14 + .../app/containers/LanguageProvider/constants.js | 8 + .../app/containers/LanguageProvider/index.js | 51 +++ .../app/containers/LanguageProvider/reducer.js | 25 ++ .../app/containers/LanguageProvider/selectors.js | 16 + .../odiparpack/app/containers/Layouts/AppLayout.js | 45 +++ front/odiparpack/app/containers/Layouts/Grid.js | 96 +++++ .../app/containers/Layouts/Responsive.js | 54 +++ .../app/containers/Layouts/demos/AutoLayout.js | 85 +++++ .../app/containers/Layouts/demos/Breakpoint.js | 115 ++++++ .../app/containers/Layouts/demos/BreakpointGrid.js | 60 +++ .../app/containers/Layouts/demos/Centered.js | 54 +++ .../app/containers/Layouts/demos/FullHeader.js | 153 ++++++++ .../app/containers/Layouts/demos/FullWidth.js | 54 +++ .../app/containers/Layouts/demos/GridLayout.js | 78 ++++ .../app/containers/Layouts/demos/Interactive.js | 138 +++++++ .../app/containers/Layouts/demos/Limitation.js | 68 ++++ .../app/containers/Layouts/demos/MediaQueries.js | 41 ++ .../app/containers/Layouts/demos/SidebarLayout.js | 169 +++++++++ .../containers/Layouts/demos/SidebarLayoutRight.js | 175 +++++++++ .../app/containers/Layouts/demos/WIthWIdth.js | 26 ++ .../app/containers/Layouts/demos/breakpoint.md | 6 + .../app/containers/Layouts/demos/index.js | 13 + .../app/containers/Layouts/demos/menuData.js | 64 ++++ front/odiparpack/app/containers/Maps/Info.js | 18 + .../odiparpack/app/containers/Maps/MapDirection.js | 33 ++ front/odiparpack/app/containers/Maps/MapMarker.js | 38 ++ front/odiparpack/app/containers/Maps/SearchMap.js | 33 ++ .../app/containers/Maps/StreetViewMap.js | 33 ++ .../app/containers/Maps/TrafficIndicator.js | 33 ++ .../app/containers/Maps/demos/BasicMarker.js | 38 ++ .../app/containers/Maps/demos/Direction.js | 56 +++ .../app/containers/Maps/demos/PopoverMarker.js | 55 +++ .../app/containers/Maps/demos/SearchLocation.js | 116 ++++++ .../app/containers/Maps/demos/StreetView.js | 62 +++ .../app/containers/Maps/demos/Traffic.js | 37 ++ .../odiparpack/app/containers/Maps/demos/index.js | 6 + .../odiparpack/app/containers/NotFound/NotFound.js | 33 ++ front/odiparpack/app/containers/Pages/.DS_Store | Bin 0 -> 6148 bytes .../app/containers/Pages/BlankPage/index.js | 28 ++ .../app/containers/Pages/Calendar/index.js | 137 +++++++ .../odiparpack/app/containers/Pages/Chat/index.js | 123 ++++++ .../app/containers/Pages/Contact/index.js | 166 ++++++++ .../app/containers/Pages/Ecommerce/index.js | 117 ++++++ .../odiparpack/app/containers/Pages/Email/index.js | 210 +++++++++++ .../odiparpack/app/containers/Pages/Error/index.js | 33 ++ .../containers/Pages/HelpSupport/ContactForm.js | 115 ++++++ .../app/containers/Pages/HelpSupport/Qna.js | 141 +++++++ .../Pages/HelpSupport/helpSupport-jss.js | 49 +++ .../app/containers/Pages/HelpSupport/index.js | 58 +++ .../app/containers/Pages/Maintenance/index.js | 88 +++++ .../app/containers/Pages/Photos/index.js | 27 ++ .../containers/Pages/Settings/DetailSettings.js | 203 ++++++++++ .../app/containers/Pages/Settings/index.js | 117 ++++++ .../app/containers/Pages/Settings/settings-jss.js | 87 +++++ .../app/containers/Pages/SocialMedia/index.js | 110 ++++++ .../containers/Pages/Standalone/LoginDedicated.js | 33 ++ .../Pages/Standalone/NotFoundDedicated.js | 24 ++ .../app/containers/Pages/UserProfile/index.js | 131 +++++++ .../app/containers/Pages/Users/LockScreen.js | 55 +++ .../odiparpack/app/containers/Pages/Users/Login.js | 85 +++++ .../app/containers/Pages/Users/Register.js | 78 ++++ .../app/containers/Pages/Users/ResetPassword.js | 54 +++ front/odiparpack/app/containers/Parent/index.js | 72 ++++ .../app/containers/Tables/AdvancedTable.js | 46 +++ .../odiparpack/app/containers/Tables/BasicTable.js | 110 ++++++ .../odiparpack/app/containers/Tables/CrudTable.js | 57 +++ .../app/containers/Tables/TablePlayground.js | 419 +++++++++++++++++++++ .../odiparpack/app/containers/Tables/TreeTable.js | 60 +++ .../app/containers/Tables/demos/AdvFilter.js | 64 ++++ .../app/containers/Tables/demos/AdvTableDemo.js | 101 +++++ .../app/containers/Tables/demos/BorderedTable.js | 91 +++++ .../app/containers/Tables/demos/CrudTableDemo.js | 220 +++++++++++ .../app/containers/Tables/demos/CrudTbFormDemo.js | 230 +++++++++++ .../app/containers/Tables/demos/EmptyTable.js | 48 +++ .../app/containers/Tables/demos/HoverTable.js | 91 +++++ .../app/containers/Tables/demos/SimpleTable.js | 88 +++++ .../app/containers/Tables/demos/StatusColorRow.js | 121 ++++++ .../app/containers/Tables/demos/StatusLabel.js | 112 ++++++ .../app/containers/Tables/demos/StrippedTable.js | 91 +++++ .../app/containers/Tables/demos/TrackingTable.js | 124 ++++++ .../app/containers/Tables/demos/TreeTableDemo.js | 68 ++++ .../containers/Tables/demos/TreeTableDemoIcon.js | 68 ++++ .../app/containers/Tables/demos/dataTreeTable.js | 128 +++++++ .../app/containers/Tables/demos/index.js | 14 + .../app/containers/Tables/demos/sampleData.js | 124 ++++++ .../app/containers/Templates/Dashboard.js | 114 ++++++ front/odiparpack/app/containers/Templates/Outer.js | 34 ++ .../app/containers/Templates/appStyles-jss.js | 144 +++++++ .../app/containers/UiElements/Accordion.js | 45 +++ .../app/containers/UiElements/Avatars.js | 39 ++ .../odiparpack/app/containers/UiElements/Badges.js | 39 ++ .../app/containers/UiElements/Breadcrumbs.js | 39 ++ .../odiparpack/app/containers/UiElements/Cards.js | 63 ++++ .../app/containers/UiElements/DialogModal.js | 97 +++++ .../app/containers/UiElements/Dividers.js | 39 ++ .../app/containers/UiElements/DrawerMenu.js | 104 +++++ .../UiElements/IconGallery/DetailIcon.js | 149 ++++++++ .../UiElements/IconGallery/SearchIcons.js | 54 +++ .../odiparpack/app/containers/UiElements/Icons.js | 158 ++++++++ .../app/containers/UiElements/ImageGrid.js | 51 +++ front/odiparpack/app/containers/UiElements/List.js | 63 ++++ .../app/containers/UiElements/Notification.js | 56 +++ .../app/containers/UiElements/Paginations.js | 45 +++ .../app/containers/UiElements/PopoverTooltip.js | 95 +++++ .../app/containers/UiElements/Progress.js | 126 +++++++ .../app/containers/UiElements/SliderCarousel.js | 77 ++++ .../app/containers/UiElements/Steppers.js | 70 ++++ front/odiparpack/app/containers/UiElements/Tabs.js | 120 ++++++ front/odiparpack/app/containers/UiElements/Tags.js | 39 ++ .../app/containers/UiElements/Typography.js | 92 +++++ .../demos/Accordion/AdvancedAccordion.js | 97 +++++ .../demos/Accordion/ControlledAccordion.js | 100 +++++ .../UiElements/demos/Accordion/SimpleAccordion.js | 57 +++ .../UiElements/demos/Avatars/AvatarsDemo.js | 112 ++++++ .../UiElements/demos/Avatars/AvatarsPractice.js | 212 +++++++++++ .../UiElements/demos/Badges/CommonBadges.js | 121 ++++++ .../UiElements/demos/Badges/VariantBadges.js | 117 ++++++ .../demos/Breadcrumbs/ClassicBreadcrumbs.js | 83 ++++ .../demos/Breadcrumbs/PaperBreadcrumbs.js | 97 +++++ .../UiElements/demos/Cards/ControlCards.js | 204 ++++++++++ .../UiElements/demos/Cards/EcommerceCards.js | 92 +++++ .../UiElements/demos/Cards/PaperSheet.js | 34 ++ .../UiElements/demos/Cards/SocialCards.js | 75 ++++ .../UiElements/demos/Cards/StandardCards.js | 120 ++++++ .../UiElements/demos/DialogModal/AlertDialog.js | 127 +++++++ .../demos/DialogModal/ConfirmationDialog.js | 111 ++++++ .../UiElements/demos/DialogModal/FormDialog.js | 65 ++++ .../demos/DialogModal/FullScreenDialog.js | 134 +++++++ .../UiElements/demos/DialogModal/ImagePopup.js | 51 +++ .../UiElements/demos/DialogModal/ModalDemo.js | 73 ++++ .../UiElements/demos/DialogModal/ScrollDialog.js | 93 +++++ .../UiElements/demos/DialogModal/SelectDialog.js | 120 ++++++ .../demos/DialogModal/SelectRadioDialog.js | 68 ++++ .../UiElements/demos/Dividers/CommonDividers.js | 29 ++ .../UiElements/demos/Dividers/SpecialDividers.js | 23 ++ .../UiElements/demos/DrawerMenu/BasicMenu.js | 74 ++++ .../UiElements/demos/DrawerMenu/DropdownMenu.js | 148 ++++++++ .../UiElements/demos/DrawerMenu/MenuTransition.js | 108 ++++++ .../UiElements/demos/DrawerMenu/MiniDrawer.js | 235 ++++++++++++ .../UiElements/demos/DrawerMenu/PermanentDrawer.js | 126 +++++++ .../demos/DrawerMenu/PersistentDrawer.js | 228 +++++++++++ .../UiElements/demos/DrawerMenu/StyledMenu.js | 60 +++ .../UiElements/demos/DrawerMenu/SwipeDrawer.js | 124 ++++++ .../UiElements/demos/DrawerMenu/TemporaryDrawer.js | 109 ++++++ .../UiElements/demos/DrawerMenu/menuData.js | 64 ++++ .../UiElements/demos/ImageGrid/AdvancedGridList.js | 85 +++++ .../UiElements/demos/ImageGrid/ImageGridList.js | 66 ++++ .../demos/ImageGrid/SingleLineGridList.js | 83 ++++ .../UiElements/demos/ImageGrid/TitlebarGridList.js | 89 +++++ .../containers/UiElements/demos/List/ListBasic.js | 116 ++++++ .../UiElements/demos/List/ListControl.js | 159 ++++++++ .../UiElements/demos/List/ListInteractive.js | 183 +++++++++ .../containers/UiElements/demos/List/ListMenu.js | 204 ++++++++++ .../containers/UiElements/demos/List/PinnedList.js | 62 +++ .../UiElements/demos/Notification/MobileNotif.js | 116 ++++++ .../UiElements/demos/Notification/SimpleNotif.js | 132 +++++++ .../UiElements/demos/Notification/StyledNotif.js | 198 ++++++++++ .../demos/Notification/TransitionNotif.js | 203 ++++++++++ .../demos/Pagination/GeneralPagination.js | 136 +++++++ .../UiElements/demos/Pagination/TbPagination.js | 110 ++++++ .../demos/Pagination/TbPaginationActions.js | 93 +++++ .../demos/Pagination/TbPaginationCustom.js | 115 ++++++ .../demos/PopoverTooltip/CustomizedTooltips.js | 125 ++++++ .../demos/PopoverTooltip/DelayTooltips.js | 12 + .../demos/PopoverTooltip/PopoverPlayground.js | 340 +++++++++++++++++ .../demos/PopoverTooltip/PositionedTooltips.js | 83 ++++ .../demos/PopoverTooltip/SimplePopover.js | 79 ++++ .../demos/PopoverTooltip/SimpleTooltips.js | 116 ++++++ .../demos/PopoverTooltip/TransitionsTooltips.js | 20 + .../demos/PopoverTooltip/TriggersTooltips.js | 61 +++ .../demos/Progress/CircularDeterminate.js | 69 ++++ .../demos/Progress/CircularIndeterminate.js | 29 ++ .../demos/Progress/CircularIntegration.js | 114 ++++++ .../UiElements/demos/Progress/CircularStatic.js | 29 ++ .../UiElements/demos/Progress/LinearBuffer.js | 56 +++ .../UiElements/demos/Progress/LinearDeterminate.js | 53 +++ .../demos/Progress/LinearIndeterminate.js | 27 ++ .../UiElements/demos/Progress/LinearQuery.js | 27 ++ .../UiElements/demos/Progress/LinearStatic.js | 27 ++ .../UiElements/demos/Progress/ProgressDelay.js | 105 ++++++ .../demos/SliderCaraousel/AnimatedSlider.js | 72 ++++ .../demos/SliderCaraousel/AutoplayCarousel.js | 52 +++ .../demos/SliderCaraousel/CustomCarousel.js | 93 +++++ .../demos/SliderCaraousel/MultipleCarousel.js | 48 +++ .../demos/SliderCaraousel/SingleCarousel.js | 80 ++++ .../demos/SliderCaraousel/ThumbnailCarousel.js | 90 +++++ .../demos/SliderCaraousel/VerticalCarousel.js | 48 +++ .../UiElements/demos/Steppers/HorizontalLinear.js | 196 ++++++++++ .../demos/Steppers/HorizontalNonLinear.js | 213 +++++++++++ .../UiElements/demos/Steppers/MobileSteppers.js | 116 ++++++ .../UiElements/demos/Steppers/StepperCarousel.js | 187 +++++++++ .../UiElements/demos/Steppers/StepperError.js | 178 +++++++++ .../UiElements/demos/Steppers/VerticalStepper.js | 120 ++++++ .../containers/UiElements/demos/Tabs/BottomNav.js | 82 ++++ .../UiElements/demos/Tabs/CenteredTabs.js | 46 +++ .../containers/UiElements/demos/Tabs/CustomTabs.js | 101 +++++ .../UiElements/demos/Tabs/DisabledTab.js | 31 ++ .../containers/UiElements/demos/Tabs/FixedTabs.js | 80 ++++ .../containers/UiElements/demos/Tabs/IconTabs.js | 61 +++ .../UiElements/demos/Tabs/LongTextTabs.js | 59 +++ .../UiElements/demos/Tabs/ScrollIconTabs.js | 82 ++++ .../containers/UiElements/demos/Tabs/ScrollTabs.js | 75 ++++ .../containers/UiElements/demos/Tabs/SimpleTabs.js | 59 +++ .../containers/UiElements/demos/Tags/ArrayTags.js | 78 ++++ .../containers/UiElements/demos/Tags/BasicTags.js | 72 ++++ .../UiElements/demos/Typography/AlignTypo.js | 46 +++ .../UiElements/demos/Typography/ColouredTypo.js | 35 ++ .../UiElements/demos/Typography/GeneralTypo.js | 139 +++++++ .../UiElements/demos/Typography/Heading.js | 56 +++ .../UiElements/demos/Typography/ListTypo.js | 71 ++++ .../UiElements/demos/Typography/QuotesDemo.js | 33 ++ .../app/containers/UiElements/demos/index.js | 117 ++++++ front/odiparpack/app/containers/pageListAsync.js | 324 ++++++++++++++++ 308 files changed, 28585 insertions(+) create mode 100644 front/odiparpack/app/containers/.DS_Store create mode 100644 front/odiparpack/app/containers/App/Application.js create mode 100644 front/odiparpack/app/containers/App/Auth.js create mode 100644 front/odiparpack/app/containers/App/ThemeWrapper.js create mode 100644 front/odiparpack/app/containers/App/index.js create mode 100644 front/odiparpack/app/containers/Charts/AreaCharts.js create mode 100644 front/odiparpack/app/containers/Charts/BarCharts.js create mode 100644 front/odiparpack/app/containers/Charts/CompossedCharts.js create mode 100644 front/odiparpack/app/containers/Charts/LineCharts.js create mode 100644 front/odiparpack/app/containers/Charts/PieCharts.js create mode 100644 front/odiparpack/app/containers/Charts/RadarCharts.js create mode 100644 front/odiparpack/app/containers/Charts/ResponsiveCharts.js create mode 100644 front/odiparpack/app/containers/Charts/ScatterCharts.js create mode 100644 front/odiparpack/app/containers/Charts/demos/AreaNegativePositive.js create mode 100644 front/odiparpack/app/containers/Charts/demos/AreaPercent.js create mode 100644 front/odiparpack/app/containers/Charts/demos/AreaResponsive.js create mode 100644 front/odiparpack/app/containers/Charts/demos/AreaSimple.js create mode 100644 front/odiparpack/app/containers/Charts/demos/AreaStacked.js create mode 100644 front/odiparpack/app/containers/Charts/demos/BarCustom.js create mode 100644 front/odiparpack/app/containers/Charts/demos/BarCustomLabel.js create mode 100644 front/odiparpack/app/containers/Charts/demos/BarMix.js create mode 100644 front/odiparpack/app/containers/Charts/demos/BarPositiveNegative.js create mode 100644 front/odiparpack/app/containers/Charts/demos/BarResponsive.js create mode 100644 front/odiparpack/app/containers/Charts/demos/BarSimple.js create mode 100644 front/odiparpack/app/containers/Charts/demos/BarStacked.js create mode 100644 front/odiparpack/app/containers/Charts/demos/CompossedLineBarArea.js create mode 100644 front/odiparpack/app/containers/Charts/demos/CompossedResponsive.js create mode 100644 front/odiparpack/app/containers/Charts/demos/CompossedSameData.js create mode 100644 front/odiparpack/app/containers/Charts/demos/CompossedVertical.js create mode 100644 front/odiparpack/app/containers/Charts/demos/DoubleRadar.js create mode 100644 front/odiparpack/app/containers/Charts/demos/LineCustomDot.js create mode 100644 front/odiparpack/app/containers/Charts/demos/LineCustomLabel.js create mode 100644 front/odiparpack/app/containers/Charts/demos/LineResponsive.js create mode 100644 front/odiparpack/app/containers/Charts/demos/LineSimple.js create mode 100644 front/odiparpack/app/containers/Charts/demos/LineVertical.js create mode 100644 front/odiparpack/app/containers/Charts/demos/PieCustomLabel.js create mode 100644 front/odiparpack/app/containers/Charts/demos/PieCustomShape.js create mode 100644 front/odiparpack/app/containers/Charts/demos/PieSimple.js create mode 100644 front/odiparpack/app/containers/Charts/demos/RadarSimple.js create mode 100644 front/odiparpack/app/containers/Charts/demos/ScatterCustom.js create mode 100644 front/odiparpack/app/containers/Charts/demos/ScatterJoinLine.js create mode 100644 front/odiparpack/app/containers/Charts/demos/ScatterMultiple.js create mode 100644 front/odiparpack/app/containers/Charts/demos/ScatterResponsive.js create mode 100644 front/odiparpack/app/containers/Charts/demos/ScatterSimple.js create mode 100644 front/odiparpack/app/containers/Charts/demos/index.js create mode 100644 front/odiparpack/app/containers/Charts/demos/sampleData.js create mode 100644 front/odiparpack/app/containers/Dashboard/Dashboard.js create mode 100644 front/odiparpack/app/containers/Dashboard/DashboardV2.js create mode 100644 front/odiparpack/app/containers/Dashboard/dashboard-jss.js create mode 100644 front/odiparpack/app/containers/Forms/Autocomplete.js create mode 100644 front/odiparpack/app/containers/Forms/Buttons.js create mode 100644 front/odiparpack/app/containers/Forms/CheckboxRadio.js create mode 100644 front/odiparpack/app/containers/Forms/DateTimePicker.js create mode 100644 front/odiparpack/app/containers/Forms/Rating.js create mode 100644 front/odiparpack/app/containers/Forms/ReduxForm.js create mode 100644 front/odiparpack/app/containers/Forms/Selectbox.js create mode 100644 front/odiparpack/app/containers/Forms/SliderRange.js create mode 100644 front/odiparpack/app/containers/Forms/Switches.js create mode 100644 front/odiparpack/app/containers/Forms/TextEditor.js create mode 100644 front/odiparpack/app/containers/Forms/Textbox.js create mode 100644 front/odiparpack/app/containers/Forms/Upload.js create mode 100644 front/odiparpack/app/containers/Forms/demos/AutoSuggest.js create mode 100644 front/odiparpack/app/containers/Forms/demos/Checkboxes.js create mode 100644 front/odiparpack/app/containers/Forms/demos/ComplexButtons.js create mode 100644 front/odiparpack/app/containers/Forms/demos/ControlledSelectbox.js create mode 100644 front/odiparpack/app/containers/Forms/demos/CustomButtons.js create mode 100644 front/odiparpack/app/containers/Forms/demos/DateInput.js create mode 100644 front/odiparpack/app/containers/Forms/demos/DateTimeInput.js create mode 100644 front/odiparpack/app/containers/Forms/demos/FloatingButtons.js create mode 100644 front/odiparpack/app/containers/Forms/demos/FormattedInputs.js create mode 100644 front/odiparpack/app/containers/Forms/demos/HighlightSuggest.js create mode 100644 front/odiparpack/app/containers/Forms/demos/InputAdornments.js create mode 100644 front/odiparpack/app/containers/Forms/demos/MultipleSelectbox.js create mode 100644 front/odiparpack/app/containers/Forms/demos/NativeSelectbox.js create mode 100644 front/odiparpack/app/containers/Forms/demos/RadioButton.js create mode 100644 front/odiparpack/app/containers/Forms/demos/RangeInput.js create mode 100644 front/odiparpack/app/containers/Forms/demos/RatingCustom.js create mode 100644 front/odiparpack/app/containers/Forms/demos/RatingNormal.js create mode 100644 front/odiparpack/app/containers/Forms/demos/ReduxFormDemo.js create mode 100644 front/odiparpack/app/containers/Forms/demos/SelectSuggestionTags.js create mode 100644 front/odiparpack/app/containers/Forms/demos/SelectSuggestions.js create mode 100644 front/odiparpack/app/containers/Forms/demos/SimpleSelectbox.js create mode 100644 front/odiparpack/app/containers/Forms/demos/SliderInput.js create mode 100644 front/odiparpack/app/containers/Forms/demos/StandardButtons.js create mode 100644 front/odiparpack/app/containers/Forms/demos/SwitchesInput.js create mode 100644 front/odiparpack/app/containers/Forms/demos/TagSuggestions.js create mode 100644 front/odiparpack/app/containers/Forms/demos/TextFields.js create mode 100644 front/odiparpack/app/containers/Forms/demos/TextFieldsLayout.js create mode 100644 front/odiparpack/app/containers/Forms/demos/TimeInput.js create mode 100644 front/odiparpack/app/containers/Forms/demos/UploadInputAll.js create mode 100644 front/odiparpack/app/containers/Forms/demos/UploadInputBtn.js create mode 100644 front/odiparpack/app/containers/Forms/demos/UploadInputImg.js create mode 100644 front/odiparpack/app/containers/Forms/demos/Wysiwyg.js create mode 100644 front/odiparpack/app/containers/Forms/demos/index.js create mode 100644 front/odiparpack/app/containers/LanguageProvider/actions.js create mode 100644 front/odiparpack/app/containers/LanguageProvider/constants.js create mode 100644 front/odiparpack/app/containers/LanguageProvider/index.js create mode 100644 front/odiparpack/app/containers/LanguageProvider/reducer.js create mode 100644 front/odiparpack/app/containers/LanguageProvider/selectors.js create mode 100644 front/odiparpack/app/containers/Layouts/AppLayout.js create mode 100644 front/odiparpack/app/containers/Layouts/Grid.js create mode 100644 front/odiparpack/app/containers/Layouts/Responsive.js create mode 100644 front/odiparpack/app/containers/Layouts/demos/AutoLayout.js create mode 100644 front/odiparpack/app/containers/Layouts/demos/Breakpoint.js create mode 100644 front/odiparpack/app/containers/Layouts/demos/BreakpointGrid.js create mode 100644 front/odiparpack/app/containers/Layouts/demos/Centered.js create mode 100644 front/odiparpack/app/containers/Layouts/demos/FullHeader.js create mode 100644 front/odiparpack/app/containers/Layouts/demos/FullWidth.js create mode 100644 front/odiparpack/app/containers/Layouts/demos/GridLayout.js create mode 100644 front/odiparpack/app/containers/Layouts/demos/Interactive.js create mode 100644 front/odiparpack/app/containers/Layouts/demos/Limitation.js create mode 100644 front/odiparpack/app/containers/Layouts/demos/MediaQueries.js create mode 100644 front/odiparpack/app/containers/Layouts/demos/SidebarLayout.js create mode 100644 front/odiparpack/app/containers/Layouts/demos/SidebarLayoutRight.js create mode 100644 front/odiparpack/app/containers/Layouts/demos/WIthWIdth.js create mode 100644 front/odiparpack/app/containers/Layouts/demos/breakpoint.md create mode 100644 front/odiparpack/app/containers/Layouts/demos/index.js create mode 100644 front/odiparpack/app/containers/Layouts/demos/menuData.js create mode 100644 front/odiparpack/app/containers/Maps/Info.js create mode 100644 front/odiparpack/app/containers/Maps/MapDirection.js create mode 100644 front/odiparpack/app/containers/Maps/MapMarker.js create mode 100644 front/odiparpack/app/containers/Maps/SearchMap.js create mode 100644 front/odiparpack/app/containers/Maps/StreetViewMap.js create mode 100644 front/odiparpack/app/containers/Maps/TrafficIndicator.js create mode 100644 front/odiparpack/app/containers/Maps/demos/BasicMarker.js create mode 100644 front/odiparpack/app/containers/Maps/demos/Direction.js create mode 100644 front/odiparpack/app/containers/Maps/demos/PopoverMarker.js create mode 100644 front/odiparpack/app/containers/Maps/demos/SearchLocation.js create mode 100644 front/odiparpack/app/containers/Maps/demos/StreetView.js create mode 100644 front/odiparpack/app/containers/Maps/demos/Traffic.js create mode 100644 front/odiparpack/app/containers/Maps/demos/index.js create mode 100644 front/odiparpack/app/containers/NotFound/NotFound.js create mode 100644 front/odiparpack/app/containers/Pages/.DS_Store create mode 100644 front/odiparpack/app/containers/Pages/BlankPage/index.js create mode 100644 front/odiparpack/app/containers/Pages/Calendar/index.js create mode 100644 front/odiparpack/app/containers/Pages/Chat/index.js create mode 100644 front/odiparpack/app/containers/Pages/Contact/index.js create mode 100644 front/odiparpack/app/containers/Pages/Ecommerce/index.js create mode 100644 front/odiparpack/app/containers/Pages/Email/index.js create mode 100644 front/odiparpack/app/containers/Pages/Error/index.js create mode 100644 front/odiparpack/app/containers/Pages/HelpSupport/ContactForm.js create mode 100644 front/odiparpack/app/containers/Pages/HelpSupport/Qna.js create mode 100644 front/odiparpack/app/containers/Pages/HelpSupport/helpSupport-jss.js create mode 100644 front/odiparpack/app/containers/Pages/HelpSupport/index.js create mode 100644 front/odiparpack/app/containers/Pages/Maintenance/index.js create mode 100644 front/odiparpack/app/containers/Pages/Photos/index.js create mode 100644 front/odiparpack/app/containers/Pages/Settings/DetailSettings.js create mode 100644 front/odiparpack/app/containers/Pages/Settings/index.js create mode 100644 front/odiparpack/app/containers/Pages/Settings/settings-jss.js create mode 100644 front/odiparpack/app/containers/Pages/SocialMedia/index.js create mode 100644 front/odiparpack/app/containers/Pages/Standalone/LoginDedicated.js create mode 100644 front/odiparpack/app/containers/Pages/Standalone/NotFoundDedicated.js create mode 100644 front/odiparpack/app/containers/Pages/UserProfile/index.js create mode 100644 front/odiparpack/app/containers/Pages/Users/LockScreen.js create mode 100644 front/odiparpack/app/containers/Pages/Users/Login.js create mode 100644 front/odiparpack/app/containers/Pages/Users/Register.js create mode 100644 front/odiparpack/app/containers/Pages/Users/ResetPassword.js create mode 100644 front/odiparpack/app/containers/Parent/index.js create mode 100644 front/odiparpack/app/containers/Tables/AdvancedTable.js create mode 100644 front/odiparpack/app/containers/Tables/BasicTable.js create mode 100644 front/odiparpack/app/containers/Tables/CrudTable.js create mode 100644 front/odiparpack/app/containers/Tables/TablePlayground.js create mode 100644 front/odiparpack/app/containers/Tables/TreeTable.js create mode 100644 front/odiparpack/app/containers/Tables/demos/AdvFilter.js create mode 100644 front/odiparpack/app/containers/Tables/demos/AdvTableDemo.js create mode 100644 front/odiparpack/app/containers/Tables/demos/BorderedTable.js create mode 100644 front/odiparpack/app/containers/Tables/demos/CrudTableDemo.js create mode 100644 front/odiparpack/app/containers/Tables/demos/CrudTbFormDemo.js create mode 100644 front/odiparpack/app/containers/Tables/demos/EmptyTable.js create mode 100644 front/odiparpack/app/containers/Tables/demos/HoverTable.js create mode 100644 front/odiparpack/app/containers/Tables/demos/SimpleTable.js create mode 100644 front/odiparpack/app/containers/Tables/demos/StatusColorRow.js create mode 100644 front/odiparpack/app/containers/Tables/demos/StatusLabel.js create mode 100644 front/odiparpack/app/containers/Tables/demos/StrippedTable.js create mode 100644 front/odiparpack/app/containers/Tables/demos/TrackingTable.js create mode 100644 front/odiparpack/app/containers/Tables/demos/TreeTableDemo.js create mode 100644 front/odiparpack/app/containers/Tables/demos/TreeTableDemoIcon.js create mode 100644 front/odiparpack/app/containers/Tables/demos/dataTreeTable.js create mode 100644 front/odiparpack/app/containers/Tables/demos/index.js create mode 100644 front/odiparpack/app/containers/Tables/demos/sampleData.js create mode 100644 front/odiparpack/app/containers/Templates/Dashboard.js create mode 100644 front/odiparpack/app/containers/Templates/Outer.js create mode 100644 front/odiparpack/app/containers/Templates/appStyles-jss.js create mode 100644 front/odiparpack/app/containers/UiElements/Accordion.js create mode 100644 front/odiparpack/app/containers/UiElements/Avatars.js create mode 100644 front/odiparpack/app/containers/UiElements/Badges.js create mode 100644 front/odiparpack/app/containers/UiElements/Breadcrumbs.js create mode 100644 front/odiparpack/app/containers/UiElements/Cards.js create mode 100644 front/odiparpack/app/containers/UiElements/DialogModal.js create mode 100644 front/odiparpack/app/containers/UiElements/Dividers.js create mode 100644 front/odiparpack/app/containers/UiElements/DrawerMenu.js create mode 100644 front/odiparpack/app/containers/UiElements/IconGallery/DetailIcon.js create mode 100644 front/odiparpack/app/containers/UiElements/IconGallery/SearchIcons.js create mode 100644 front/odiparpack/app/containers/UiElements/Icons.js create mode 100644 front/odiparpack/app/containers/UiElements/ImageGrid.js create mode 100644 front/odiparpack/app/containers/UiElements/List.js create mode 100644 front/odiparpack/app/containers/UiElements/Notification.js create mode 100644 front/odiparpack/app/containers/UiElements/Paginations.js create mode 100644 front/odiparpack/app/containers/UiElements/PopoverTooltip.js create mode 100644 front/odiparpack/app/containers/UiElements/Progress.js create mode 100644 front/odiparpack/app/containers/UiElements/SliderCarousel.js create mode 100644 front/odiparpack/app/containers/UiElements/Steppers.js create mode 100644 front/odiparpack/app/containers/UiElements/Tabs.js create mode 100644 front/odiparpack/app/containers/UiElements/Tags.js create mode 100644 front/odiparpack/app/containers/UiElements/Typography.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/Accordion/AdvancedAccordion.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/Accordion/ControlledAccordion.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/Accordion/SimpleAccordion.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/Avatars/AvatarsDemo.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/Avatars/AvatarsPractice.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/Badges/CommonBadges.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/Badges/VariantBadges.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/Breadcrumbs/ClassicBreadcrumbs.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/Breadcrumbs/PaperBreadcrumbs.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/Cards/ControlCards.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/Cards/EcommerceCards.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/Cards/PaperSheet.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/Cards/SocialCards.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/Cards/StandardCards.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/DialogModal/AlertDialog.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/DialogModal/ConfirmationDialog.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/DialogModal/FormDialog.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/DialogModal/FullScreenDialog.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/DialogModal/ImagePopup.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/DialogModal/ModalDemo.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/DialogModal/ScrollDialog.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/DialogModal/SelectDialog.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/DialogModal/SelectRadioDialog.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/Dividers/CommonDividers.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/Dividers/SpecialDividers.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/DrawerMenu/BasicMenu.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/DrawerMenu/DropdownMenu.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/DrawerMenu/MenuTransition.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/DrawerMenu/MiniDrawer.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/DrawerMenu/PermanentDrawer.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/DrawerMenu/PersistentDrawer.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/DrawerMenu/StyledMenu.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/DrawerMenu/SwipeDrawer.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/DrawerMenu/TemporaryDrawer.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/DrawerMenu/menuData.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/ImageGrid/AdvancedGridList.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/ImageGrid/ImageGridList.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/ImageGrid/SingleLineGridList.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/ImageGrid/TitlebarGridList.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/List/ListBasic.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/List/ListControl.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/List/ListInteractive.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/List/ListMenu.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/List/PinnedList.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/Notification/MobileNotif.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/Notification/SimpleNotif.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/Notification/StyledNotif.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/Notification/TransitionNotif.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/Pagination/GeneralPagination.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/Pagination/TbPagination.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/Pagination/TbPaginationActions.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/Pagination/TbPaginationCustom.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/PopoverTooltip/CustomizedTooltips.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/PopoverTooltip/DelayTooltips.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/PopoverTooltip/PopoverPlayground.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/PopoverTooltip/PositionedTooltips.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/PopoverTooltip/SimplePopover.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/PopoverTooltip/SimpleTooltips.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/PopoverTooltip/TransitionsTooltips.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/PopoverTooltip/TriggersTooltips.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/Progress/CircularDeterminate.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/Progress/CircularIndeterminate.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/Progress/CircularIntegration.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/Progress/CircularStatic.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/Progress/LinearBuffer.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/Progress/LinearDeterminate.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/Progress/LinearIndeterminate.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/Progress/LinearQuery.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/Progress/LinearStatic.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/Progress/ProgressDelay.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/SliderCaraousel/AnimatedSlider.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/SliderCaraousel/AutoplayCarousel.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/SliderCaraousel/CustomCarousel.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/SliderCaraousel/MultipleCarousel.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/SliderCaraousel/SingleCarousel.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/SliderCaraousel/ThumbnailCarousel.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/SliderCaraousel/VerticalCarousel.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/Steppers/HorizontalLinear.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/Steppers/HorizontalNonLinear.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/Steppers/MobileSteppers.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/Steppers/StepperCarousel.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/Steppers/StepperError.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/Steppers/VerticalStepper.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/Tabs/BottomNav.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/Tabs/CenteredTabs.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/Tabs/CustomTabs.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/Tabs/DisabledTab.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/Tabs/FixedTabs.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/Tabs/IconTabs.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/Tabs/LongTextTabs.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/Tabs/ScrollIconTabs.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/Tabs/ScrollTabs.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/Tabs/SimpleTabs.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/Tags/ArrayTags.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/Tags/BasicTags.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/Typography/AlignTypo.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/Typography/ColouredTypo.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/Typography/GeneralTypo.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/Typography/Heading.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/Typography/ListTypo.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/Typography/QuotesDemo.js create mode 100644 front/odiparpack/app/containers/UiElements/demos/index.js create mode 100644 front/odiparpack/app/containers/pageListAsync.js (limited to 'front/odiparpack/app/containers') diff --git a/front/odiparpack/app/containers/.DS_Store b/front/odiparpack/app/containers/.DS_Store new file mode 100644 index 0000000..71c8885 Binary files /dev/null and b/front/odiparpack/app/containers/.DS_Store differ diff --git a/front/odiparpack/app/containers/App/Application.js b/front/odiparpack/app/containers/App/Application.js new file mode 100644 index 0000000..0a3ffc2 --- /dev/null +++ b/front/odiparpack/app/containers/App/Application.js @@ -0,0 +1,131 @@ +import React from 'react'; +import { PropTypes } from 'prop-types'; +import { Switch, Route } from 'react-router-dom'; +import Dashboard from '../Templates/Dashboard'; +import { + DashboardV1, DashboardV2, + Parent, AppLayout, Responsive, Grid, + SimpleTable, AdvancedTable, TablePlayground, + TreeTable, CrudTable, + ReduxForm, DateTimePicker, CheckboxRadio, + Switches, Selectbox, Rating, + SliderRange, Buttons, Textbox, + Autocomplete, Upload, TextEditor, + Avatars, Accordion, Badges, + List, PopoverTooltip, Notification, + Typography, Tabs, Cards, + ImageGrid, Progress, DialogModal, + Steppers, Paginations, DrawerMenu, + Breadcrumbs, Icons, + SliderCarousel, Tags, Dividers, + LineCharts, BarCharts, AreaCharts, PieCharts, + RadarCharts, ScatterCharts, CompossedCharts, ResponsiveCharts, + Contact, Chat, Email, + Ecommerce, SocialMedia, Calendar, + Profile, BlankPage, + Photos, Error, Settings, + HelpSupport, MapMarker, MapDirection, SearchMap, + TrafficIndicator, StreetViewMap, NotFound +} from '../pageListAsync'; + +function Application(props) { + const { history } = props; + + return ( + + + + + { /* Layout */ } + + + + + { /* Table */ } + + + + + + + { /* Form & Button */ } + + + + + + + + + + + + + + { /* Ui Components */} + + + + + + + + + + + + + + + + + + + + + + { /* Chart */ } + + + + + + + + + + { /* Sample Apps */ } + + + + + + + { /* Pages */ } + + + + + + + + + { /* Map */ } + + + + + + + { /* Default */ } + + + + ); +} + +Application.propTypes = { + history: PropTypes.object.isRequired, +}; + +export default Application; diff --git a/front/odiparpack/app/containers/App/Auth.js b/front/odiparpack/app/containers/App/Auth.js new file mode 100644 index 0000000..740f7f3 --- /dev/null +++ b/front/odiparpack/app/containers/App/Auth.js @@ -0,0 +1,28 @@ +import React from 'react'; +import { Switch, Route } from 'react-router-dom'; +import Outer from '../Templates/Outer'; +import { + Login, + Register, + ResetPassword, + NotFound, + Maintenance, + LockScreen +} from '../pageListAsync'; + +function Auth() { + return ( + + + + + + + + + + + ); +} + +export default Auth; diff --git a/front/odiparpack/app/containers/App/ThemeWrapper.js b/front/odiparpack/app/containers/App/ThemeWrapper.js new file mode 100644 index 0000000..f39945f --- /dev/null +++ b/front/odiparpack/app/containers/App/ThemeWrapper.js @@ -0,0 +1,111 @@ +import React, { useState, useEffect } from 'react'; +import { PropTypes } from 'prop-types'; +import { connect } from 'react-redux'; +import Loading from 'react-loading-bar'; +import { bindActionCreators } from 'redux'; +import { + withStyles, + createMuiTheme, + MuiThemeProvider +} from '@material-ui/core/styles'; +import 'ba-styles/vendors/react-loading-bar/index.css'; +import { changeThemeAction } from 'ba-actions/UiActions'; +import themePallete from 'ba-api/themePalette'; +import TemplateSettings from 'ba-components/TemplateSettings'; +//import { Button, Icon } from '@material-ui/core'; +import styles from '../Templates/appStyles-jss'; +import { esES } from '@material-ui/core/locale'; + +function ThemeWrapper(props) { + const { + classes, + children, + palette, + color, + changeTheme + } = props; + + const [pageLoaded, setPageLoaded] = useState(true); + const [open, setOpen] = useState(false); + const [newPalette, setNewPalette] = useState(undefined); + const [theme, setTheme] = useState( + createMuiTheme(themePallete(color),esES) + ); + + useEffect(() => { + setNewPalette(palette); + setPageLoaded(true); + setTimeout(() => { + setPageLoaded(false); + }, 500); + return () => { + setPageLoaded(true); + }; + }, []); + + const handleOpenPallete = () => { + setOpen(true); + }; + + const handleClose = () => { + setOpen(false); + }; + + const handleChangeTheme = event => { + setTheme(createMuiTheme(themePallete(event.target.value),esES)); + changeTheme(event.target.value); + }; + + return ( + + +
+ + {/* */} + + {children} +
+
+ ); +} + +ThemeWrapper.propTypes = { + classes: PropTypes.object.isRequired, + children: PropTypes.node.isRequired, + color: PropTypes.string.isRequired, + changeTheme: PropTypes.func.isRequired, + palette: PropTypes.object.isRequired, +}; + +const reducer = 'ui'; +const mapStateToProps = state => ({ + ...state, + color: state.getIn([reducer, 'theme']), + palette: state.getIn([reducer, 'palette']), +}); + +const dispatchToProps = dispatch => ({ + changeTheme: bindActionCreators(changeThemeAction, dispatch), +}); + +const ThemeWrapperMapped = connect( + mapStateToProps, + dispatchToProps +)(ThemeWrapper); + +export default withStyles(styles)(ThemeWrapperMapped); diff --git a/front/odiparpack/app/containers/App/index.js b/front/odiparpack/app/containers/App/index.js new file mode 100644 index 0000000..a7313fe --- /dev/null +++ b/front/odiparpack/app/containers/App/index.js @@ -0,0 +1,23 @@ +import React from 'react'; +import { Switch, Route } from 'react-router-dom'; +import NotFound from 'containers/Pages/Standalone/NotFoundDedicated'; +import Auth from './Auth'; +import Application from './Application'; +import LoginDedicated from '../Pages/Standalone/LoginDedicated'; +import ThemeWrapper from './ThemeWrapper'; +window.__MUI_USE_NEXT_TYPOGRAPHY_VARIANTS__ = true; + +function App() { + return ( + + + + + + + + + ); +} + +export default App; diff --git a/front/odiparpack/app/containers/Charts/AreaCharts.js b/front/odiparpack/app/containers/Charts/AreaCharts.js new file mode 100644 index 0000000..0468c22 --- /dev/null +++ b/front/odiparpack/app/containers/Charts/AreaCharts.js @@ -0,0 +1,63 @@ +import React from 'react'; +import { Helmet } from 'react-helmet'; +import brand from 'ba-api/brand'; +import { SourceReader, PapperBlock } from 'ba-components'; +import { + AreaSimple, + AreaStacked, + AreaPercent, + AreaNegativePositive, + AreaResponsive +} from './demos'; + +class AreaCharts extends React.Component { + render() { + const title = brand.name + ' - Chart'; + const description = brand.desc; + const docSrc = 'containers/Charts/demos/'; + return ( +
+ + {title} + + + + + + + +
+ + +
+
+ +
+ + +
+
+ +
+ + +
+
+ +
+ + +
+
+ +
+ + +
+
+
+ ); + } +} + +export default AreaCharts; diff --git a/front/odiparpack/app/containers/Charts/BarCharts.js b/front/odiparpack/app/containers/Charts/BarCharts.js new file mode 100644 index 0000000..4d24f78 --- /dev/null +++ b/front/odiparpack/app/containers/Charts/BarCharts.js @@ -0,0 +1,77 @@ +import React from 'react'; +import { Helmet } from 'react-helmet'; +import brand from 'ba-api/brand'; +import { SourceReader, PapperBlock } from 'ba-components'; +import { + BarSimple, + BarStacked, + BarMix, + BarCustom, + BarPositiveNegative, + BarCustomLabel, + BarResponsive +} from './demos'; + +class BarCharts extends React.Component { + render() { + const title = brand.name + ' - Chart'; + const description = brand.desc; + const docSrc = 'containers/Charts/demos/'; + return ( +
+ + {title} + + + + + + + +
+ + +
+
+ +
+ + +
+
+ +
+ + +
+
+ +
+ + +
+
+ +
+ + +
+
+ +
+ + +
+
+ +
+ + +
+
+
+ ); + } +} + +export default BarCharts; diff --git a/front/odiparpack/app/containers/Charts/CompossedCharts.js b/front/odiparpack/app/containers/Charts/CompossedCharts.js new file mode 100644 index 0000000..08937c7 --- /dev/null +++ b/front/odiparpack/app/containers/Charts/CompossedCharts.js @@ -0,0 +1,56 @@ +import React from 'react'; +import { Helmet } from 'react-helmet'; +import brand from 'ba-api/brand'; +import { SourceReader, PapperBlock } from 'ba-components'; +import { + CompossedLineBarArea, + CompossedSameData, + CompossedVertical, + CompossedResponsive +} from './demos'; + +class CompossedCharts extends React.Component { + render() { + const title = brand.name + ' - Chart'; + const description = brand.desc; + const docSrc = 'containers/Charts/demos/'; + return ( +
+ + {title} + + + + + + + +
+ + +
+
+ +
+ + +
+
+ +
+ + +
+
+ +
+ + +
+
+
+ ); + } +} + +export default CompossedCharts; diff --git a/front/odiparpack/app/containers/Charts/LineCharts.js b/front/odiparpack/app/containers/Charts/LineCharts.js new file mode 100644 index 0000000..9f34f91 --- /dev/null +++ b/front/odiparpack/app/containers/Charts/LineCharts.js @@ -0,0 +1,70 @@ +import React from 'react'; +import { Helmet } from 'react-helmet'; +import brand from 'ba-api/brand'; +import { withStyles } from '@material-ui/core/styles'; +import { SourceReader, PapperBlock } from 'ba-components'; +import { + LineSimple, + LineVertical, + LineCustomDot, + LineCustomLabel, + LineResponsive +} from './demos'; + +const styles = ({ + root: { + flexGrow: 1, + } +}); + +class DateTime extends React.Component { + render() { + const title = brand.name + ' - Chart'; + const description = brand.desc; + const docSrc = 'containers/Charts/demos/'; + return ( +
+ + {title} + + + + + + + +
+ + +
+
+ +
+ + +
+
+ +
+ + +
+
+ +
+ + +
+
+ +
+ + +
+
+
+ ); + } +} + +export default withStyles(styles)(DateTime); diff --git a/front/odiparpack/app/containers/Charts/PieCharts.js b/front/odiparpack/app/containers/Charts/PieCharts.js new file mode 100644 index 0000000..b5609e2 --- /dev/null +++ b/front/odiparpack/app/containers/Charts/PieCharts.js @@ -0,0 +1,49 @@ +import React from 'react'; +import { Helmet } from 'react-helmet'; +import brand from 'ba-api/brand'; +import { SourceReader, PapperBlock } from 'ba-components'; +import { + PieSimple, + PieCustomShape, + PieCustomLabel, +} from './demos'; + +class PieCharts extends React.Component { + render() { + const title = brand.name + ' - Chart'; + const description = brand.desc; + const docSrc = 'containers/Charts/demos/'; + return ( +
+ + {title} + + + + + + + +
+ + +
+
+ +
+ + +
+
+ +
+ + +
+
+
+ ); + } +} + +export default PieCharts; diff --git a/front/odiparpack/app/containers/Charts/RadarCharts.js b/front/odiparpack/app/containers/Charts/RadarCharts.js new file mode 100644 index 0000000..23fff3e --- /dev/null +++ b/front/odiparpack/app/containers/Charts/RadarCharts.js @@ -0,0 +1,42 @@ +import React from 'react'; +import { Helmet } from 'react-helmet'; +import brand from 'ba-api/brand'; +import { SourceReader, PapperBlock } from 'ba-components'; +import { + RadarSimple, + DoubleRadar +} from './demos'; + +class RadarCharts extends React.Component { + render() { + const title = brand.name + ' - Chart'; + const description = brand.desc; + const docSrc = 'containers/Charts/demos/'; + return ( +
+ + {title} + + + + + + + +
+ + +
+
+ +
+ + +
+
+
+ ); + } +} + +export default RadarCharts; diff --git a/front/odiparpack/app/containers/Charts/ResponsiveCharts.js b/front/odiparpack/app/containers/Charts/ResponsiveCharts.js new file mode 100644 index 0000000..ab8bb17 --- /dev/null +++ b/front/odiparpack/app/containers/Charts/ResponsiveCharts.js @@ -0,0 +1,63 @@ +import React from 'react'; +import { Helmet } from 'react-helmet'; +import brand from 'ba-api/brand'; +import { SourceReader, PapperBlock } from 'ba-components'; +import { + AreaResponsive, + BarResponsive, + LineResponsive, + ScatterResponsive, + CompossedResponsive +} from './demos'; + +class ScatterCharts extends React.Component { + render() { + const title = brand.name + ' - Chart'; + const description = brand.desc; + const docSrc = 'containers/Charts/demos/'; + return ( +
+ + {title} + + + + + + + +
+ + +
+
+ +
+ + +
+
+ +
+ + +
+
+ +
+ + +
+
+ +
+ + +
+
+
+ ); + } +} + +export default ScatterCharts; diff --git a/front/odiparpack/app/containers/Charts/ScatterCharts.js b/front/odiparpack/app/containers/Charts/ScatterCharts.js new file mode 100644 index 0000000..b680738 --- /dev/null +++ b/front/odiparpack/app/containers/Charts/ScatterCharts.js @@ -0,0 +1,63 @@ +import React from 'react'; +import { Helmet } from 'react-helmet'; +import brand from 'ba-api/brand'; +import { SourceReader, PapperBlock } from 'ba-components'; +import { + ScatterSimple, + ScatterJoinLine, + ScatterMultiple, + ScatterCustom, + ScatterResponsive +} from './demos'; + +class ScatterCharts extends React.Component { + render() { + const title = brand.name + ' - Chart'; + const description = brand.desc; + const docSrc = 'containers/Charts/demos/'; + return ( +
+ + {title} + + + + + + + +
+ + +
+
+ +
+ + +
+
+ +
+ + +
+
+ +
+ + +
+
+ +
+ + +
+
+
+ ); + } +} + +export default ScatterCharts; diff --git a/front/odiparpack/app/containers/Charts/demos/AreaNegativePositive.js b/front/odiparpack/app/containers/Charts/demos/AreaNegativePositive.js new file mode 100644 index 0000000..dd5793a --- /dev/null +++ b/front/odiparpack/app/containers/Charts/demos/AreaNegativePositive.js @@ -0,0 +1,62 @@ +import React from 'react'; +import { createMuiTheme } from '@material-ui/core/styles'; +import ThemePallete from 'ba-api/themePalette'; +import { + AreaChart, + Area, + XAxis, + YAxis, + CartesianGrid, + Tooltip +} from 'recharts'; +import { data3 } from './sampleData'; + +const theme = createMuiTheme(ThemePallete.redTheme); +const color = ({ + primary: theme.palette.primary.main, + secondary: theme.palette.secondary.main, +}); + +const gradientOffset = () => { + const dataMax = Math.max(...data3.map((i) => i.uv)); + const dataMin = Math.min(...data3.map((i) => i.uv)); + + if (dataMax <= 0) { + return 0; + } else if (dataMin >= 0) { + return 1; + } + return dataMax / (dataMax - dataMin); +}; + +const off = gradientOffset(); + +function AreaNegativePositive() { + return ( + + + + + + + + + + + + + + ); +} + +export default AreaNegativePositive; diff --git a/front/odiparpack/app/containers/Charts/demos/AreaPercent.js b/front/odiparpack/app/containers/Charts/demos/AreaPercent.js new file mode 100644 index 0000000..32902e1 --- /dev/null +++ b/front/odiparpack/app/containers/Charts/demos/AreaPercent.js @@ -0,0 +1,79 @@ +import React from 'react'; +import { createMuiTheme } from '@material-ui/core/styles'; +import ThemePallete from 'ba-api/themePalette'; +import { + AreaChart, + Area, + XAxis, + YAxis, + CartesianGrid, + Tooltip +} from 'recharts'; +import { red } from '@material-ui/core/colors'; +import { data1 } from './sampleData'; + +const theme = createMuiTheme(ThemePallete.greenNatureTheme); +const color = ({ + primary: theme.palette.primary.main, + primarydark: theme.palette.primary.dark, + secondary: theme.palette.secondary.main, + secondarydark: theme.palette.secondary.dark, + third: red[500], + thirddark: red[900], +}); + +const toPercent = (decimal, fixed = 0) => ( + `${(decimal * 100).toFixed(fixed)}%` +); + +const getPercent = (value, total) => { + const ratio = total > 0 ? value / total : 0; + return toPercent(ratio, 2); +}; + +const renderTooltipContent = (o) => { + const { payload, label } = o; + const total = payload.reduce((result, entry) => (result + entry.value), 0); + + return ( +
+

{`${label} (Total: ${total})`}

+ +
+ ); +}; + +function AreaPercent() { + return ( + + + + + + + + + + ); +} + +export default AreaPercent; diff --git a/front/odiparpack/app/containers/Charts/demos/AreaResponsive.js b/front/odiparpack/app/containers/Charts/demos/AreaResponsive.js new file mode 100644 index 0000000..a1bc4c0 --- /dev/null +++ b/front/odiparpack/app/containers/Charts/demos/AreaResponsive.js @@ -0,0 +1,67 @@ +import React from 'react'; +import PropTypes from 'prop-types'; +import { createMuiTheme, withStyles } from '@material-ui/core/styles'; +import ThemePallete from 'ba-api/themePalette'; +import { + AreaChart, + Area, + XAxis, + YAxis, + CartesianGrid, + Tooltip, + ResponsiveContainer +} from 'recharts'; +import { green } from '@material-ui/core/colors'; +import { data1 } from './sampleData'; + +const theme = createMuiTheme(ThemePallete.purpleTheme); +const color = ({ + primary: theme.palette.primary.main, + primarydark: theme.palette.primary.dark, + secondary: theme.palette.secondary.main, + secondarydark: theme.palette.secondary.dark, + third: green[500], + thirddark: green[900], +}); + +const styles = { + chartFluid: { + width: '100%', + height: 450 + } +}; + +function AreaResponsive(props) { + const { classes } = props; + return ( +
+ + + + + + + + + + + +
+ ); +} + +AreaResponsive.propTypes = { + classes: PropTypes.object.isRequired, +}; + +export default withStyles(styles)(AreaResponsive); diff --git a/front/odiparpack/app/containers/Charts/demos/AreaSimple.js b/front/odiparpack/app/containers/Charts/demos/AreaSimple.js new file mode 100644 index 0000000..590d19c --- /dev/null +++ b/front/odiparpack/app/containers/Charts/demos/AreaSimple.js @@ -0,0 +1,42 @@ +import React from 'react'; +import { createMuiTheme } from '@material-ui/core/styles'; +import ThemePallete from 'ba-api/themePalette'; +import { + AreaChart, + Area, + XAxis, + YAxis, + CartesianGrid, + Tooltip +} from 'recharts'; +import { data2 } from './sampleData'; + +const theme = createMuiTheme(ThemePallete.greenTheme); +const color = ({ + main: theme.palette.primary.main, + dark: theme.palette.primary.dark, +}); + +function AreaSimple() { + return ( + + + + + + + + ); +} + +export default AreaSimple; diff --git a/front/odiparpack/app/containers/Charts/demos/AreaStacked.js b/front/odiparpack/app/containers/Charts/demos/AreaStacked.js new file mode 100644 index 0000000..82abd40 --- /dev/null +++ b/front/odiparpack/app/containers/Charts/demos/AreaStacked.js @@ -0,0 +1,49 @@ +import React from 'react'; +import { createMuiTheme } from '@material-ui/core/styles'; +import ThemePallete from 'ba-api/themePalette'; +import { + AreaChart, + Area, + XAxis, + YAxis, + CartesianGrid, + Tooltip +} from 'recharts'; +import { green } from '@material-ui/core/colors'; +import { data1 } from './sampleData'; + +const theme = createMuiTheme(ThemePallete.blueTheme); +const color = ({ + primary: theme.palette.primary.main, + primarydark: theme.palette.primary.dark, + secondary: theme.palette.secondary.main, + secondarydark: theme.palette.secondary.dark, + third: green[500], + thirddark: green[900], +}); + +function AreaStacked() { + return ( + + + + + + + + + + ); +} + +export default AreaStacked; diff --git a/front/odiparpack/app/containers/Charts/demos/BarCustom.js b/front/odiparpack/app/containers/Charts/demos/BarCustom.js new file mode 100644 index 0000000..d9a572d --- /dev/null +++ b/front/odiparpack/app/containers/Charts/demos/BarCustom.js @@ -0,0 +1,80 @@ +import React from 'react'; +import { + BarChart, + Bar, + XAxis, + YAxis, + CartesianGrid, + Tooltip, + Cell +} from 'recharts'; +import PropTypes from 'prop-types'; +import { purple, red, pink, indigo, blue, cyan, teal } from '@material-ui/core/colors'; +import { data2 } from './sampleData'; + + +const colors = [red[500], pink[500], purple[500], indigo[500], blue[500], cyan[500], teal[500]]; + +const getPath = (x, y, width, height) => ( + `M${x},${y + height} + C${x + (width / 3)},${y + height} ${x + (width / 2)},${y + (height / 3)} ${x + (width / 2)}, ${y} + C${x + (width / 2)},${y + (height / 3)} ${x + (2 * (width / 3))},${y + height} ${x + width}, ${y + height} + Z` +); + +const TriangleBar = props => { + const { + fill, + x, + y, + width, + height + } = props; + return ; +}; + +TriangleBar.propTypes = { + x: PropTypes.number, + y: PropTypes.number, + fill: PropTypes.string, + width: PropTypes.number, + height: PropTypes.number, +}; + +TriangleBar.defaultProps = { + x: 0, + y: 0, + fill: '#9f9f9f', + width: 0, + height: 0, +}; + +function BarCustom() { + return ( + + + + + + } label={{ position: 'top' }}> + { + data2.map((entry, index) => ( + + )) + } + + + ); +} + +export default BarCustom; diff --git a/front/odiparpack/app/containers/Charts/demos/BarCustomLabel.js b/front/odiparpack/app/containers/Charts/demos/BarCustomLabel.js new file mode 100644 index 0000000..79968d5 --- /dev/null +++ b/front/odiparpack/app/containers/Charts/demos/BarCustomLabel.js @@ -0,0 +1,84 @@ +import React from 'react'; +import PropTypes from 'prop-types'; +import { createMuiTheme } from '@material-ui/core/styles'; +import ThemePallete from 'ba-api/themePalette'; +import { + BarChart, + Bar, + XAxis, + YAxis, + CartesianGrid, + Tooltip, + Legend, + LabelList +} from 'recharts'; +import { data1 } from './sampleData'; + +const theme = createMuiTheme(ThemePallete.purpleTheme); +const color = ({ + primary: theme.palette.primary.main, + secondary: theme.palette.secondary.main, +}); + +const renderCustomizedLabel = props => { + const { + x, + y, + width, + value, + } = props; + const radius = 10; + + return ( + + + + {value.split(' ')[1]} + + + ); +}; + +renderCustomizedLabel.propTypes = { + x: PropTypes.number, + y: PropTypes.number, + width: PropTypes.number, + value: PropTypes.number, +}; + +renderCustomizedLabel.defaultProps = { + x: 0, + y: 0, + width: 0, + value: 0, +}; + +function BarCustomLabel() { + return ( + + + + + + + + + + + + + + ); +} + +export default BarCustomLabel; diff --git a/front/odiparpack/app/containers/Charts/demos/BarMix.js b/front/odiparpack/app/containers/Charts/demos/BarMix.js new file mode 100644 index 0000000..e2e0e4e --- /dev/null +++ b/front/odiparpack/app/containers/Charts/demos/BarMix.js @@ -0,0 +1,48 @@ +import React from 'react'; +import { createMuiTheme } from '@material-ui/core/styles'; +import ThemePallete from 'ba-api/themePalette'; +import { + BarChart, + Bar, + XAxis, + YAxis, + CartesianGrid, + Tooltip, + Legend +} from 'recharts'; +import { green } from '@material-ui/core/colors'; +import { data2 } from './sampleData'; + +const theme = createMuiTheme(ThemePallete.blueTheme); +const color = ({ + primary: theme.palette.primary.main, + secondary: theme.palette.secondary.main, + third: green[500] +}); + +function BarMix() { + return ( + + + + + + + + + + + ); +} + +export default BarMix; diff --git a/front/odiparpack/app/containers/Charts/demos/BarPositiveNegative.js b/front/odiparpack/app/containers/Charts/demos/BarPositiveNegative.js new file mode 100644 index 0000000..c3d6fcf --- /dev/null +++ b/front/odiparpack/app/containers/Charts/demos/BarPositiveNegative.js @@ -0,0 +1,47 @@ +import React from 'react'; +import { createMuiTheme } from '@material-ui/core/styles'; +import ThemePallete from 'ba-api/themePalette'; +import { + BarChart, + Bar, + XAxis, + YAxis, + CartesianGrid, + Tooltip, + Legend, + ReferenceLine +} from 'recharts'; +import { data3 } from './sampleData'; + +const theme = createMuiTheme(ThemePallete.greenTheme); +const color = ({ + primary: theme.palette.primary.main, + secondary: theme.palette.secondary.main, +}); + +function BarPositiveNegative() { + return ( + + + + + + + + + + + ); +} + +export default BarPositiveNegative; diff --git a/front/odiparpack/app/containers/Charts/demos/BarResponsive.js b/front/odiparpack/app/containers/Charts/demos/BarResponsive.js new file mode 100644 index 0000000..a2d3a48 --- /dev/null +++ b/front/odiparpack/app/containers/Charts/demos/BarResponsive.js @@ -0,0 +1,64 @@ +import React from 'react'; +import PropTypes from 'prop-types'; +import { createMuiTheme, withStyles } from '@material-ui/core/styles'; +import ThemePallete from 'ba-api/themePalette'; +import { + BarChart, + Bar, + XAxis, + YAxis, + CartesianGrid, + Tooltip, + Legend, + ResponsiveContainer +} from 'recharts'; +import { data1 } from './sampleData'; + +const theme = createMuiTheme(ThemePallete.greenNatureTheme); +const color = ({ + primary: theme.palette.primary.main, + secondary: theme.palette.secondary.main, +}); + +const styles = { + chartFluid: { + width: '100%', + height: 450 + } +}; + +function BarResponsive(props) { + const { classes } = props; + return ( +
+ + + + + + + + + + + +
+ ); +} + +BarResponsive.propTypes = { + classes: PropTypes.object.isRequired, +}; + +export default withStyles(styles)(BarResponsive); + diff --git a/front/odiparpack/app/containers/Charts/demos/BarSimple.js b/front/odiparpack/app/containers/Charts/demos/BarSimple.js new file mode 100644 index 0000000..eb06ee6 --- /dev/null +++ b/front/odiparpack/app/containers/Charts/demos/BarSimple.js @@ -0,0 +1,45 @@ +import React from 'react'; +import { createMuiTheme } from '@material-ui/core/styles'; +import ThemePallete from 'ba-api/themePalette'; +import { + BarChart, + Bar, + XAxis, + YAxis, + CartesianGrid, + Tooltip, + Legend +} from 'recharts'; +import { data1 } from './sampleData'; + +const theme = createMuiTheme(ThemePallete.redTheme); +const color = ({ + primary: theme.palette.primary.main, + secondary: theme.palette.secondary.main, +}); + +function BarSimple() { + return ( + + + + + + + + + + ); +} + +export default BarSimple; diff --git a/front/odiparpack/app/containers/Charts/demos/BarStacked.js b/front/odiparpack/app/containers/Charts/demos/BarStacked.js new file mode 100644 index 0000000..e5dfb0a --- /dev/null +++ b/front/odiparpack/app/containers/Charts/demos/BarStacked.js @@ -0,0 +1,45 @@ +import React from 'react'; +import { createMuiTheme } from '@material-ui/core/styles'; +import ThemePallete from 'ba-api/themePalette'; +import { + BarChart, + Bar, + XAxis, + YAxis, + CartesianGrid, + Tooltip, + Legend +} from 'recharts'; +import { data1 } from './sampleData'; + +const theme = createMuiTheme(ThemePallete.orangeTheme); +const color = ({ + primary: theme.palette.primary.main, + secondary: theme.palette.secondary.main, +}); + +function BarStacked() { + return ( + + + + + + + + + + ); +} + +export default BarStacked; diff --git a/front/odiparpack/app/containers/Charts/demos/CompossedLineBarArea.js b/front/odiparpack/app/containers/Charts/demos/CompossedLineBarArea.js new file mode 100644 index 0000000..9063062 --- /dev/null +++ b/front/odiparpack/app/containers/Charts/demos/CompossedLineBarArea.js @@ -0,0 +1,51 @@ +import React from 'react'; +import { createMuiTheme } from '@material-ui/core/styles'; +import ThemePallete from 'ba-api/themePalette'; +import { + ComposedChart, + Line, + Area, + Bar, + XAxis, + YAxis, + CartesianGrid, + Tooltip, + Legend +} from 'recharts'; +import { green } from '@material-ui/core/colors'; +import { data1 } from './sampleData'; + +const theme = createMuiTheme(ThemePallete.orangeTheme); +const color = ({ + main: theme.palette.primary.main, + maindark: theme.palette.primary.dark, + secondary: theme.palette.secondary.main, + third: green[500], +}); + +function CompossedLineBarArea() { + return ( + + + + + + + + + + + ); +} + +export default CompossedLineBarArea; diff --git a/front/odiparpack/app/containers/Charts/demos/CompossedResponsive.js b/front/odiparpack/app/containers/Charts/demos/CompossedResponsive.js new file mode 100644 index 0000000..ff06fb4 --- /dev/null +++ b/front/odiparpack/app/containers/Charts/demos/CompossedResponsive.js @@ -0,0 +1,69 @@ +import React from 'react'; +import PropTypes from 'prop-types'; +import { createMuiTheme, withStyles } from '@material-ui/core/styles'; +import ThemePallete from 'ba-api/themePalette'; +import { + ComposedChart, + Line, + Area, + Bar, + XAxis, + YAxis, + CartesianGrid, + Tooltip, + Legend, + ResponsiveContainer +} from 'recharts'; +import { green } from '@material-ui/core/colors'; +import { data1 } from './sampleData'; + +const theme = createMuiTheme(ThemePallete.magentaTheme); +const color = ({ + main: theme.palette.primary.main, + maindark: theme.palette.primary.dark, + secondary: theme.palette.secondary.main, + third: green[500], +}); + +const styles = { + chartFluid: { + width: '100%', + height: 450 + } +}; + +function CompossedResponsive(props) { + const { classes } = props; + return ( +
+ + + + + + + + + + + + +
+ ); +} + +CompossedResponsive.propTypes = { + classes: PropTypes.object.isRequired, +}; + +export default withStyles(styles)(CompossedResponsive); diff --git a/front/odiparpack/app/containers/Charts/demos/CompossedSameData.js b/front/odiparpack/app/containers/Charts/demos/CompossedSameData.js new file mode 100644 index 0000000..ca81de1 --- /dev/null +++ b/front/odiparpack/app/containers/Charts/demos/CompossedSameData.js @@ -0,0 +1,46 @@ +import React from 'react'; +import { createMuiTheme } from '@material-ui/core/styles'; +import ThemePallete from 'ba-api/themePalette'; +import { + ComposedChart, + Line, + Bar, + XAxis, + YAxis, + CartesianGrid, + Tooltip, + Legend +} from 'recharts'; +import { data1 } from './sampleData'; + +const theme = createMuiTheme(ThemePallete.blueTheme); +const color = ({ + main: theme.palette.primary.main, + secondary: theme.palette.secondary.main, +}); + +function CompossedSameData() { + return ( + + + + + + + + + + ); +} + +export default CompossedSameData; diff --git a/front/odiparpack/app/containers/Charts/demos/CompossedVertical.js b/front/odiparpack/app/containers/Charts/demos/CompossedVertical.js new file mode 100644 index 0000000..8e6d382 --- /dev/null +++ b/front/odiparpack/app/containers/Charts/demos/CompossedVertical.js @@ -0,0 +1,52 @@ +import React from 'react'; +import { createMuiTheme } from '@material-ui/core/styles'; +import ThemePallete from 'ba-api/themePalette'; +import { + ComposedChart, + Line, + Area, + Bar, + XAxis, + YAxis, + CartesianGrid, + Tooltip, + Legend +} from 'recharts'; +import { green } from '@material-ui/core/colors'; +import { data1 } from './sampleData'; + +const theme = createMuiTheme(ThemePallete.blueTheme); +const color = ({ + main: theme.palette.primary.main, + maindark: theme.palette.primary.dark, + secondary: theme.palette.secondary.main, + third: green[500], +}); + +function CompossedVertical() { + return ( + + + + + + + + + + + ); +} + +export default CompossedVertical; diff --git a/front/odiparpack/app/containers/Charts/demos/DoubleRadar.js b/front/odiparpack/app/containers/Charts/demos/DoubleRadar.js new file mode 100644 index 0000000..ba6774c --- /dev/null +++ b/front/odiparpack/app/containers/Charts/demos/DoubleRadar.js @@ -0,0 +1,35 @@ +import React from 'react'; +import { createMuiTheme } from '@material-ui/core/styles'; +import ThemePallete from 'ba-api/themePalette'; +import { + Radar, + RadarChart, + PolarGrid, + PolarAngleAxis, + PolarRadiusAxis, + Legend +} from 'recharts'; +import { data7 } from './sampleData'; + +const theme = createMuiTheme(ThemePallete.redTheme); +const color = ({ + main: theme.palette.primary.main, + maindark: theme.palette.primary.dark, + secondary: theme.palette.secondary.main, + secondarydark: theme.palette.secondary.dark, +}); + +function DoubleRadar() { + return ( + + + + + + + + + ); +} + +export default DoubleRadar; diff --git a/front/odiparpack/app/containers/Charts/demos/LineCustomDot.js b/front/odiparpack/app/containers/Charts/demos/LineCustomDot.js new file mode 100644 index 0000000..0b36702 --- /dev/null +++ b/front/odiparpack/app/containers/Charts/demos/LineCustomDot.js @@ -0,0 +1,78 @@ +import React from 'react'; +import PropTypes from 'prop-types'; +import { createMuiTheme } from '@material-ui/core/styles'; +import ThemePallete from 'ba-api/themePalette'; +import { + LineChart, + Line, + XAxis, + YAxis, + CartesianGrid, + Tooltip, + Legend +} from 'recharts'; +import { data1 } from './sampleData'; + +const theme = createMuiTheme(ThemePallete.orangeTheme); +const color = ({ + primary: theme.palette.primary.main, + secondary: theme.palette.secondary.main, +}); + +const CustomizedDot = props => { + const { + cx, + cy, + value + } = props; + if (value > 2500) { + return ( + + + + ); + } + return ( + + + + ); +}; + +CustomizedDot.propTypes = { + cx: PropTypes.number, + cy: PropTypes.number, + value: PropTypes.number, +}; + +CustomizedDot.defaultProps = { + cx: 0, + cy: 0, + value: 0, +}; + +function LineCustomDot() { + return ( + + + + + + + } /> + + + ); +} + +export default LineCustomDot; diff --git a/front/odiparpack/app/containers/Charts/demos/LineCustomLabel.js b/front/odiparpack/app/containers/Charts/demos/LineCustomLabel.js new file mode 100644 index 0000000..32f4288 --- /dev/null +++ b/front/odiparpack/app/containers/Charts/demos/LineCustomLabel.js @@ -0,0 +1,74 @@ +import React from 'react'; +import PropTypes from 'prop-types'; +import { createMuiTheme } from '@material-ui/core/styles'; +import ThemePallete from 'ba-api/themePalette'; +import { + LineChart, + Line, + XAxis, + YAxis, + CartesianGrid, + Tooltip, + Legend +} from 'recharts'; +import { data1 } from './sampleData'; + +const theme = createMuiTheme(ThemePallete.redTheme); +const color = ({ + primary: theme.palette.primary.main, + secondary: theme.palette.secondary.main, +}); + +const CustomizedLabel = props => { + const { + x, + y, + stroke, + value + } = props; + return ( + + { value } + + ); +}; + +CustomizedLabel.propTypes = { + x: PropTypes.number, + y: PropTypes.number, + value: PropTypes.number, + stroke: PropTypes.string, +}; + +CustomizedLabel.defaultProps = { + x: 0, + y: 0, + value: 0, + stroke: '#000' +}; + +function LineCustomLabel() { + return ( + + + + + + + } /> + } /> + + ); +} + +export default LineCustomLabel; diff --git a/front/odiparpack/app/containers/Charts/demos/LineResponsive.js b/front/odiparpack/app/containers/Charts/demos/LineResponsive.js new file mode 100644 index 0000000..b27223f --- /dev/null +++ b/front/odiparpack/app/containers/Charts/demos/LineResponsive.js @@ -0,0 +1,56 @@ +import React from 'react'; +import PropTypes from 'prop-types'; +import { withStyles } from '@material-ui/core/styles'; +import { + LineChart, + Line, + XAxis, + YAxis, + CartesianGrid, + Tooltip, + Legend, + ResponsiveContainer +} from 'recharts'; +import { data1 } from './sampleData'; + +const styles = { + chartFluid: { + width: '100%', + height: 450 + } +}; + +function LineResponsive(props) { + const { classes } = props; + return ( +
+ + + + + + + + + + + +
+ ); +} + +LineResponsive.propTypes = { + classes: PropTypes.object.isRequired, +}; + +export default withStyles(styles)(LineResponsive); diff --git a/front/odiparpack/app/containers/Charts/demos/LineSimple.js b/front/odiparpack/app/containers/Charts/demos/LineSimple.js new file mode 100644 index 0000000..54c1be5 --- /dev/null +++ b/front/odiparpack/app/containers/Charts/demos/LineSimple.js @@ -0,0 +1,37 @@ +import React from 'react'; +import { + LineChart, + Line, + XAxis, + YAxis, + CartesianGrid, + Tooltip, + Legend +} from 'recharts'; +import { data1 } from './sampleData'; + +function LineSimple() { + return ( + + + + + + + + + + ); +} + +export default LineSimple; diff --git a/front/odiparpack/app/containers/Charts/demos/LineVertical.js b/front/odiparpack/app/containers/Charts/demos/LineVertical.js new file mode 100644 index 0000000..28ffc07 --- /dev/null +++ b/front/odiparpack/app/containers/Charts/demos/LineVertical.js @@ -0,0 +1,46 @@ +import React from 'react'; +import { createMuiTheme } from '@material-ui/core/styles'; +import ThemePallete from 'ba-api/themePalette'; +import { + LineChart, + Line, + XAxis, + YAxis, + CartesianGrid, + Tooltip, + Legend +} from 'recharts'; +import { data1 } from './sampleData'; + +const theme = createMuiTheme(ThemePallete.cyanTheme); +const color = ({ + primary: theme.palette.primary.main, + secondary: theme.palette.secondary.main, +}); + +function LineVertical() { + return ( + + + + + + + + + + ); +} + +export default LineVertical; diff --git a/front/odiparpack/app/containers/Charts/demos/PieCustomLabel.js b/front/odiparpack/app/containers/Charts/demos/PieCustomLabel.js new file mode 100644 index 0000000..1787ef3 --- /dev/null +++ b/front/odiparpack/app/containers/Charts/demos/PieCustomLabel.js @@ -0,0 +1,83 @@ +import React from 'react'; +import PropTypes from 'prop-types'; +import { + PieChart, + Pie, + Cell +} from 'recharts'; + +import { purple, red, pink, indigo, blue, cyan, teal } from '@material-ui/core/colors'; +import { data6 } from './sampleData'; +const colors = [red[500], pink[500], purple[500], indigo[500], blue[500], cyan[500], teal[500]]; + +const RADIAN = Math.PI / 180; +const renderCustomizedLabel = ({ + cx, + cy, + midAngle, + innerRadius, + outerRadius, + percent, +}) => { + const radius = innerRadius + ((outerRadius - innerRadius) * 0.5); + const x = cx + (radius * Math.cos(-midAngle * RADIAN)); + const y = cy + (radius * Math.sin(-midAngle * RADIAN)); + + return ( + cx ? 'start' : 'end'} dominantBaseline="central"> + {`${(percent * 100).toFixed(0)}%`} + + ); +}; + +renderCustomizedLabel.propTypes = { + cx: PropTypes.number, + cy: PropTypes.number, + midAngle: PropTypes.number, + innerRadius: PropTypes.number, + outerRadius: PropTypes.number, + percent: PropTypes.number, +}; + +renderCustomizedLabel.defaultProps = { + cx: 0, + cy: 0, + midAngle: 0, + innerRadius: 0, + outerRadius: 0, + percent: 0, +}; + +class PieCustomLabel extends React.Component { + render() { + return ( + + + { + data6.map((entry, index) => ) + } + + + ); + } +} + +export default PieCustomLabel; diff --git a/front/odiparpack/app/containers/Charts/demos/PieCustomShape.js b/front/odiparpack/app/containers/Charts/demos/PieCustomShape.js new file mode 100644 index 0000000..ae58dba --- /dev/null +++ b/front/odiparpack/app/containers/Charts/demos/PieCustomShape.js @@ -0,0 +1,143 @@ +import React from 'react'; +import PropTypes from 'prop-types'; +import { createMuiTheme } from '@material-ui/core/styles'; +import ThemePallete from 'ba-api/themePalette'; +import { + PieChart, + Pie, + Sector +} from 'recharts'; +import { data6 } from './sampleData'; + +const theme = createMuiTheme(ThemePallete.greenTheme); +const color = ({ + primary: theme.palette.primary.main, + secondary: theme.palette.secondary.main, +}); + +const renderActiveShape = props => { + const RADIAN = Math.PI / 180; + const { + cx, + cy, + midAngle, + innerRadius, + outerRadius, + startAngle, + endAngle, + fill, + payload, + percent, + value + } = props; + const sin = Math.sin(-RADIAN * midAngle); + const cos = Math.cos(-RADIAN * midAngle); + const sx = cx + ((outerRadius + 10) * cos); + const sy = cy + ((outerRadius + 10) * sin); + const mx = cx + ((outerRadius + 30) * cos); + const my = cy + ((outerRadius + 30) * sin); + const ex = mx + ((cos >= 0 ? 1 : -1) * 22); + const ey = my; + const textAnchor = cos >= 0 ? 'start' : 'end'; + return ( + + {payload.name} + + + + + = 0 ? 1 : -1) * 12)} y={ey} textAnchor={textAnchor} fill="#333">{`PV ${value}`} + = 0 ? 1 : -1) * 12)} y={ey} dy={18} textAnchor={textAnchor} fill="#999"> + {`(Rate ${(percent * 100).toFixed(2)}%)`} + + + ); +}; + +renderActiveShape.propTypes = { + cx: PropTypes.number, + cy: PropTypes.number, + midAngle: PropTypes.number, + innerRadius: PropTypes.number, + outerRadius: PropTypes.number, + startAngle: PropTypes.number, + endAngle: PropTypes.number, + fill: PropTypes.string, + payload: PropTypes.string, + percent: PropTypes.number, + value: PropTypes.number, +}; + +renderActiveShape.defaultProps = { + cx: 0, + cy: 0, + midAngle: 0, + innerRadius: 0, + outerRadius: 0, + startAngle: 0, + endAngle: 0, + fill: '#eee', + payload: '', + percent: 0, + value: 0, +}; + +class PieCustomShape extends React.Component { + state = { + activeIndex: 0 + }; + + onPieEnter(evt) { + const index = data6.findIndex(p => p.name === evt.name); + this.setState({ + activeIndex: index, + }); + } + + render() { + return ( + + this.onPieEnter(event)} + /> + + ); + } +} + +export default PieCustomShape; diff --git a/front/odiparpack/app/containers/Charts/demos/PieSimple.js b/front/odiparpack/app/containers/Charts/demos/PieSimple.js new file mode 100644 index 0000000..f0a4f6e --- /dev/null +++ b/front/odiparpack/app/containers/Charts/demos/PieSimple.js @@ -0,0 +1,36 @@ +import React from 'react'; +import { createMuiTheme } from '@material-ui/core/styles'; +import ThemePallete from 'ba-api/themePalette'; +import { + PieChart, + Pie, + Tooltip +} from 'recharts'; +import { data4, data5 } from './sampleData'; + +const theme = createMuiTheme(ThemePallete.purpleTheme); +const color = ({ + primary: theme.palette.primary.main, + secondary: theme.palette.secondary.main, +}); + +function PieSimple() { + return ( + + + + + + ); +} + +export default PieSimple; diff --git a/front/odiparpack/app/containers/Charts/demos/RadarSimple.js b/front/odiparpack/app/containers/Charts/demos/RadarSimple.js new file mode 100644 index 0000000..f0e86cd --- /dev/null +++ b/front/odiparpack/app/containers/Charts/demos/RadarSimple.js @@ -0,0 +1,30 @@ +import React from 'react'; +import { createMuiTheme } from '@material-ui/core/styles'; +import ThemePallete from 'ba-api/themePalette'; +import { + Radar, + RadarChart, + PolarGrid, + PolarAngleAxis, + PolarRadiusAxis +} from 'recharts'; +import { data7 } from './sampleData'; + +const theme = createMuiTheme(ThemePallete.purpleTheme); +const color = ({ + main: theme.palette.primary.main, + dark: theme.palette.primary.dark, +}); + +function RadarSimple() { + return ( + + + + + + + ); +} + +export default RadarSimple; diff --git a/front/odiparpack/app/containers/Charts/demos/ScatterCustom.js b/front/odiparpack/app/containers/Charts/demos/ScatterCustom.js new file mode 100644 index 0000000..9e61b27 --- /dev/null +++ b/front/odiparpack/app/containers/Charts/demos/ScatterCustom.js @@ -0,0 +1,46 @@ +import React from 'react'; +import { createMuiTheme } from '@material-ui/core/styles'; +import ThemePallete from 'ba-api/themePalette'; +import { + ScatterChart, + Scatter, + XAxis, + YAxis, + ZAxis, + CartesianGrid, + Tooltip, + Legend +} from 'recharts'; +import { data8, data9 } from './sampleData'; + +const theme = createMuiTheme(ThemePallete.orangeTheme); +const color = ({ + primary: theme.palette.primary.main, + secondary: theme.palette.secondary.main, +}); + +function ScatterCustom() { + return ( + + + + + + + + + + + ); +} + +export default ScatterCustom; diff --git a/front/odiparpack/app/containers/Charts/demos/ScatterJoinLine.js b/front/odiparpack/app/containers/Charts/demos/ScatterJoinLine.js new file mode 100644 index 0000000..74c238e --- /dev/null +++ b/front/odiparpack/app/containers/Charts/demos/ScatterJoinLine.js @@ -0,0 +1,46 @@ +import React from 'react'; +import { createMuiTheme } from '@material-ui/core/styles'; +import ThemePallete from 'ba-api/themePalette'; +import { + ScatterChart, + Scatter, + XAxis, + YAxis, + ZAxis, + CartesianGrid, + Tooltip, + Legend +} from 'recharts'; +import { data8, data9 } from './sampleData'; + +const theme = createMuiTheme(ThemePallete.blueTheme); +const color = ({ + primary: theme.palette.primary.main, + secondary: theme.palette.secondary.main, +}); + +function ScatterJoinLine() { + return ( + + + + + + + + + + + ); +} + +export default ScatterJoinLine; diff --git a/front/odiparpack/app/containers/Charts/demos/ScatterMultiple.js b/front/odiparpack/app/containers/Charts/demos/ScatterMultiple.js new file mode 100644 index 0000000..a870692 --- /dev/null +++ b/front/odiparpack/app/containers/Charts/demos/ScatterMultiple.js @@ -0,0 +1,46 @@ +import React from 'react'; +import { createMuiTheme } from '@material-ui/core/styles'; +import ThemePallete from 'ba-api/themePalette'; +import { + ScatterChart, + Scatter, + XAxis, + YAxis, + ZAxis, + CartesianGrid, + Tooltip, + Legend +} from 'recharts'; +import { data8, data9 } from './sampleData'; + +const theme = createMuiTheme(ThemePallete.greenTheme); +const color = ({ + primary: theme.palette.primary.main, + secondary: theme.palette.secondary.main, +}); + +function ScatterMultiple() { + return ( + + + + + + + + + + + ); +} + +export default ScatterMultiple; diff --git a/front/odiparpack/app/containers/Charts/demos/ScatterResponsive.js b/front/odiparpack/app/containers/Charts/demos/ScatterResponsive.js new file mode 100644 index 0000000..791117d --- /dev/null +++ b/front/odiparpack/app/containers/Charts/demos/ScatterResponsive.js @@ -0,0 +1,64 @@ +import React from 'react'; +import PropTypes from 'prop-types'; +import { createMuiTheme, withStyles } from '@material-ui/core/styles'; +import ThemePallete from 'ba-api/themePalette'; +import { + ScatterChart, + Scatter, + XAxis, + YAxis, + ZAxis, + CartesianGrid, + Tooltip, + Legend, + ResponsiveContainer +} from 'recharts'; +import { data8, data9 } from './sampleData'; + +const theme = createMuiTheme(ThemePallete.skyBlueTheme); +const color = ({ + primary: theme.palette.primary.main, + secondary: theme.palette.secondary.main, +}); + +const styles = { + chartFluid: { + width: '100%', + height: 450 + } +}; + +function ScatterResponsive(props) { + const { classes } = props; + return ( +
+ + + + + + + + + + + + +
+ ); +} + +ScatterResponsive.propTypes = { + classes: PropTypes.object.isRequired, +}; + +export default withStyles(styles)(ScatterResponsive); diff --git a/front/odiparpack/app/containers/Charts/demos/ScatterSimple.js b/front/odiparpack/app/containers/Charts/demos/ScatterSimple.js new file mode 100644 index 0000000..4b8717a --- /dev/null +++ b/front/odiparpack/app/containers/Charts/demos/ScatterSimple.js @@ -0,0 +1,40 @@ +import React from 'react'; +import { createMuiTheme } from '@material-ui/core/styles'; +import ThemePallete from 'ba-api/themePalette'; +import { + ScatterChart, + Scatter, + XAxis, + YAxis, + CartesianGrid, + Tooltip, +} from 'recharts'; +import { data8 } from './sampleData'; + +const theme = createMuiTheme(ThemePallete.cyanTheme); +const color = ({ + primary: theme.palette.primary.main, +}); + +function ScatterSimple() { + return ( + + + + + + + + ); +} + +export default ScatterSimple; diff --git a/front/odiparpack/app/containers/Charts/demos/index.js b/front/odiparpack/app/containers/Charts/demos/index.js new file mode 100644 index 0000000..da6ac01 --- /dev/null +++ b/front/odiparpack/app/containers/Charts/demos/index.js @@ -0,0 +1,31 @@ +export LineSimple from './LineSimple'; +export LineVertical from './LineVertical'; +export LineCustomDot from './LineCustomDot'; +export LineCustomLabel from './LineCustomLabel'; +export LineResponsive from './LineResponsive'; +export BarSimple from './BarSimple'; +export BarMix from './BarMix'; +export BarStacked from './BarStacked'; +export BarCustom from './BarCustom'; +export BarPositiveNegative from './BarPositiveNegative'; +export BarCustomLabel from './BarCustomLabel'; +export BarResponsive from './BarResponsive'; +export AreaSimple from './AreaSimple'; +export AreaStacked from './AreaStacked'; +export AreaPercent from './AreaPercent'; +export AreaNegativePositive from './AreaNegativePositive'; +export AreaResponsive from './AreaResponsive'; +export PieSimple from './PieSimple'; +export PieCustomShape from './PieCustomShape'; +export PieCustomLabel from './PieCustomLabel'; +export RadarSimple from './RadarSimple'; +export DoubleRadar from './DoubleRadar'; +export ScatterSimple from './ScatterSimple'; +export ScatterJoinLine from './ScatterJoinLine'; +export ScatterMultiple from './ScatterMultiple'; +export ScatterCustom from './ScatterCustom'; +export ScatterResponsive from './ScatterResponsive'; +export CompossedLineBarArea from './CompossedLineBarArea'; +export CompossedSameData from './CompossedSameData'; +export CompossedVertical from './CompossedVertical'; +export CompossedResponsive from './CompossedResponsive'; diff --git a/front/odiparpack/app/containers/Charts/demos/sampleData.js b/front/odiparpack/app/containers/Charts/demos/sampleData.js new file mode 100644 index 0000000..4c6e524 --- /dev/null +++ b/front/odiparpack/app/containers/Charts/demos/sampleData.js @@ -0,0 +1,262 @@ +export const data1 = [ + { + name: 'Page A', + uv: 4000, + pv: 2400, + amt: 2400 + }, + { + name: 'Page B', + uv: 3000, + pv: 1398, + amt: 2210 + }, + { + name: 'Page C', + uv: 2000, + pv: 9800, + amt: 2290 + }, + { + name: 'Page D', + uv: 2780, + pv: 3908, + amt: 2000 + }, + { + name: 'Page E', + uv: 1890, + pv: 4800, + amt: 2181 + }, + { + name: 'Page F', + uv: 2390, + pv: 3800, + amt: 2500 + }, + { + name: 'Page G', + uv: 3490, + pv: 4300, + amt: 2100 + }, +]; + +export const data2 = [ + { + name: 'Page A', + uv: 4000, + female: 2400, + male: 2400 + }, { + name: 'Page B', + uv: 3000, + female: 1398, + male: 2210 + }, { + name: 'Page C', + uv: 2000, + female: 9800, + male: 2290 + }, { + name: 'Page D', + uv: 2780, + female: 3908, + male: 2000 + }, { + name: 'Page E', + uv: 1890, + female: 4800, + male: 2181 + }, { + name: 'Page F', + uv: 2390, + female: 3800, + male: 2500 + }, { + name: 'Page G', + uv: 3490, + female: 4300, + male: 2100 + }, +]; + +export const data3 = [ + { + name: 'Page A', + uv: 4000, + pv: 2400, + amt: 2400 + }, { + name: 'Page B', + uv: -3000, + pv: 1398, + amt: 2210 + }, { + name: 'Page C', + uv: -2000, + pv: -9800, + amt: 2290 + }, { + name: 'Page D', + uv: 2780, + pv: 3908, + amt: 2000 + }, { + name: 'Page E', + uv: -1890, + pv: 4800, + amt: 2181 + }, { + name: 'Page F', + uv: 2390, + pv: -3800, + amt: 2500 + }, { + name: 'Page G', + uv: 3490, + pv: 4300, + amt: 2100 + }, +]; + +export const data4 = [ + { + name: 'Group A', + value: 400 + }, { + name: 'Group B', + value: 300 + }, + { + name: 'Group C', + value: 300 + }, { + name: 'Group D', + value: 200 + }, + { + name: 'Group E', + value: 278 + }, { + name: 'Group F', + value: 189 + } +]; + +export const data5 = [ + { + name: 'Group A', + value: 2400 + }, { + name: 'Group B', + value: 4567 + }, + { + name: 'Group C', + value: 1398 + }, { + name: 'Group D', + value: 9800 + }, + { + name: 'Group E', + value: 3908 + }, { + name: 'Group F', + value: 4800 + } +]; + +export const data6 = [ + { + name: 'Group A', + value: 400 + }, { + name: 'Group B', + value: 300 + }, + { + name: 'Group C', + value: 300 + }, { + name: 'Group D', + value: 200 + } +]; + +export const data7 = [ + { + subject: 'Math', + A: 120, + B: 110, + fullMark: 150 + }, { + subject: 'Chinese', + A: 98, + B: 130, + fullMark: 150 + }, { + subject: 'English', + A: 86, + B: 130, + fullMark: 150 + }, { + subject: 'Geography', + A: 99, + B: 100, + fullMark: 150 + }, { + subject: 'Physics', + A: 85, + B: 90, + fullMark: 150 + }, { + subject: 'History', + A: 65, + B: 85, + fullMark: 150 + }, +]; + +export const data8 = [ + { + x: 10, + y: 30 + }, { + x: 30, + y: 200 + }, { + x: 45, + y: 100 + }, { + x: 50, + y: 400 + }, { + x: 70, + y: 150 + }, { + x: 100, + y: 250 + } +]; + +export const data9 = [ + { + x: 30, + y: 20 + }, { + x: 50, + y: 180 + }, { + x: 75, + y: 240 + }, { + x: 100, + y: 100 + }, { + x: 120, + y: 190 + } +]; diff --git a/front/odiparpack/app/containers/Dashboard/Dashboard.js b/front/odiparpack/app/containers/Dashboard/Dashboard.js new file mode 100644 index 0000000..94d3eb4 --- /dev/null +++ b/front/odiparpack/app/containers/Dashboard/Dashboard.js @@ -0,0 +1,99 @@ +import React, { PureComponent } from 'react'; +import PropTypes from 'prop-types'; +import brand from 'ba-api/brand'; +import { Helmet } from 'react-helmet'; +import { withStyles } from '@material-ui/core/styles'; +import imgApi from 'ba-api/images'; +import avatarApi from 'ba-api/avatars'; +import { + SliderWidget, + CounterGroupWidget, + BigChartWidget, + TableWidget, + TaskWidget, + ProfileCard, + ProfileWidget, + ProgressWidget, + GeneralCard, + Quote, + PlayerCard +} from 'ba-components'; +import { Grid, Divider } from '@material-ui/core'; +import styles from './dashboard-jss'; + + +class Dashboard extends PureComponent { + render() { + const title = brand.name + ' - Dashboard'; + const description = brand.desc; + const { classes } = this.props; + return ( +
+ + {title} + + + + + + + + +
+ +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ ); + } +} + +Dashboard.propTypes = { + classes: PropTypes.object.isRequired, +}; + +export default withStyles(styles)(Dashboard); diff --git a/front/odiparpack/app/containers/Dashboard/DashboardV2.js b/front/odiparpack/app/containers/Dashboard/DashboardV2.js new file mode 100644 index 0000000..027dad8 --- /dev/null +++ b/front/odiparpack/app/containers/Dashboard/DashboardV2.js @@ -0,0 +1,79 @@ +import React, { PureComponent } from 'react'; +import PropTypes from 'prop-types'; +import brand from 'ba-api/brand'; +import { Helmet } from 'react-helmet'; +import { withStyles } from '@material-ui/core/styles'; +import imgApi from 'ba-api/images'; +import avatarApi from 'ba-api/avatars'; +import { + CounterIconsWidget, + AreaChartWidget, + CarouselWidget, + PostCard, + AlbumWidget, + MapWidget +} from 'ba-components'; +import { Grid, Divider } from '@material-ui/core'; +import styles from './dashboard-jss'; + + +class DashboardV2 extends PureComponent { + render() { + const title = brand.name + ' - Dashboard Version 2'; + const description = brand.desc; + const { classes } = this.props; + return ( +
+ + {title} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ ); + } +} + +DashboardV2.propTypes = { + classes: PropTypes.object.isRequired, +}; + +export default withStyles(styles)(DashboardV2); diff --git a/front/odiparpack/app/containers/Dashboard/dashboard-jss.js b/front/odiparpack/app/containers/Dashboard/dashboard-jss.js new file mode 100644 index 0000000..adb9bc0 --- /dev/null +++ b/front/odiparpack/app/containers/Dashboard/dashboard-jss.js @@ -0,0 +1,30 @@ +const styles = theme => ({ + root: { + flexGrow: 1, + }, + divider: { + display: 'block', + margin: `${theme.spacing(2)}px 0`, + background: 'none' + }, + sliderWrap: { + position: 'relative', + display: 'block', + boxShadow: theme.shadows[1], + width: '100%', + borderRadius: 4 + }, + dividerMini: { + margin: `${theme.spacing(1.5)}px 0`, + background: 'none' + }, + noPadding: { + paddingTop: '0 !important', + paddingBottom: '0 !important', + [theme.breakpoints.up('sm')]: { + padding: '0 !important' + } + } +}); + +export default styles; diff --git a/front/odiparpack/app/containers/Forms/Autocomplete.js b/front/odiparpack/app/containers/Forms/Autocomplete.js new file mode 100644 index 0000000..23c6a13 --- /dev/null +++ b/front/odiparpack/app/containers/Forms/Autocomplete.js @@ -0,0 +1,91 @@ +import React from 'react'; +import { Helmet } from 'react-helmet'; +import brand from 'ba-api/brand'; +import PropTypes from 'prop-types'; +import { withStyles } from '@material-ui/core/styles'; +import { SourceReader, PapperBlock } from 'ba-components'; +import { Grid } from '@material-ui/core'; +import { + AutoSuggest, + TagSuggestions, + SelectSuggestions, + SelectSuggestionTags, + HighlightSuggest +} from './demos'; + +const styles = ({ + root: { + flexGrow: 1, + } +}); + +class Textbox extends React.Component { + render() { + const { classes } = this.props; + const title = brand.name + ' - Form'; + const description = brand.desc; + const docSrc = 'containers/Forms/demos/'; + return ( +
+ + {title} + + + + + + +
+ + + +
+ + +
+
+
+ + +
+ + +
+
+
+ + +
+ + +
+
+
+ + +
+ + +
+
+
+ + +
+ + +
+
+
+
+
+
+ ); + } +} + +Textbox.propTypes = { + classes: PropTypes.object.isRequired, +}; + +export default withStyles(styles)(Textbox); diff --git a/front/odiparpack/app/containers/Forms/Buttons.js b/front/odiparpack/app/containers/Forms/Buttons.js new file mode 100644 index 0000000..0935ac2 --- /dev/null +++ b/front/odiparpack/app/containers/Forms/Buttons.js @@ -0,0 +1,58 @@ +import React from 'react'; +import { Helmet } from 'react-helmet'; +import brand from 'ba-api/brand'; +import { withStyles } from '@material-ui/core/styles'; +import { SourceReader, PapperBlock } from 'ba-components'; +import { StandardButtons, FloatingButtons, CustomButtons, ComplexButtons } from './demos'; + +const styles = ({ + root: { + flexGrow: 1, + } +}); + +class Buttons extends React.Component { + render() { + const title = brand.name + ' - Form'; + const description = brand.desc; + const docSrc = 'containers/Forms/demos/'; + return ( +
+ + {title} + + + + + + + +
+ + +
+
+ +
+ + +
+
+ +
+ + +
+
+ +
+ + +
+
+
+ ); + } +} + +export default withStyles(styles)(Buttons); diff --git a/front/odiparpack/app/containers/Forms/CheckboxRadio.js b/front/odiparpack/app/containers/Forms/CheckboxRadio.js new file mode 100644 index 0000000..9833964 --- /dev/null +++ b/front/odiparpack/app/containers/Forms/CheckboxRadio.js @@ -0,0 +1,46 @@ +import React from 'react'; +import { Helmet } from 'react-helmet'; +import brand from 'ba-api/brand'; +import { withStyles } from '@material-ui/core/styles'; +import { SourceReader, PapperBlock } from 'ba-components'; +import { Checkboxes, RadioButton } from './demos'; + +const styles = ({ + root: { + flexGrow: 1, + } +}); + +class DateTime extends React.Component { + render() { + const title = brand.name + ' - Form'; + const description = brand.desc; + const docSrc = 'containers/Forms/demos/'; + return ( +
+ + {title} + + + + + + + +
+ + +
+
+ +
+ + +
+
+
+ ); + } +} + +export default withStyles(styles)(DateTime); diff --git a/front/odiparpack/app/containers/Forms/DateTimePicker.js b/front/odiparpack/app/containers/Forms/DateTimePicker.js new file mode 100644 index 0000000..b079d2e --- /dev/null +++ b/front/odiparpack/app/containers/Forms/DateTimePicker.js @@ -0,0 +1,52 @@ +import React from 'react'; +import { Helmet } from 'react-helmet'; +import brand from 'ba-api/brand'; +import { withStyles } from '@material-ui/core/styles'; +import { SourceReader, PapperBlock } from 'ba-components'; +import { DateInput, TimeInput, DateTimeInput } from './demos'; + +const styles = ({ + root: { + flexGrow: 1, + } +}); + +class DateTime extends React.Component { + render() { + const title = brand.name + ' - Form'; + const description = brand.desc; + const docSrc = 'containers/Forms/demos/'; + return ( +
+ + {title} + + + + + + + +
+ + +
+
+ +
+ + +
+
+ +
+ + +
+
+
+ ); + } +} + +export default withStyles(styles)(DateTime); diff --git a/front/odiparpack/app/containers/Forms/Rating.js b/front/odiparpack/app/containers/Forms/Rating.js new file mode 100644 index 0000000..5d28bca --- /dev/null +++ b/front/odiparpack/app/containers/Forms/Rating.js @@ -0,0 +1,46 @@ +import React from 'react'; +import { Helmet } from 'react-helmet'; +import brand from 'ba-api/brand'; +import { withStyles } from '@material-ui/core/styles'; +import { SourceReader, PapperBlock } from 'ba-components'; +import { RatingNormal, RatingCustom } from './demos'; + +const styles = ({ + root: { + flexGrow: 1, + } +}); + +class DateTime extends React.Component { + render() { + const title = brand.name + ' - Form'; + const description = brand.desc; + const docSrc = 'containers/Forms/demos/'; + return ( +
+ + {title} + + + + + + + +
+ + +
+
+ +
+ + +
+
+
+ ); + } +} + +export default withStyles(styles)(DateTime); diff --git a/front/odiparpack/app/containers/Forms/ReduxForm.js b/front/odiparpack/app/containers/Forms/ReduxForm.js new file mode 100644 index 0000000..d8ef3a7 --- /dev/null +++ b/front/odiparpack/app/containers/Forms/ReduxForm.js @@ -0,0 +1,51 @@ +import React from 'react'; +import { Helmet } from 'react-helmet'; +import brand from 'ba-api/brand'; +import { withStyles } from '@material-ui/core/styles'; +import { SourceReader, PapperBlock } from 'ba-components'; +import { ReduxFormDemo } from './demos'; + +const styles = ({ + root: { + flexGrow: 1, + } +}); + +class ReduxForm extends React.Component { + state = { + valueForm: [] + } + + showResult(values) { + setTimeout(() => { + this.setState({ valueForm: values }); + window.alert(`You submitted:\n\n${this.state.valueForm}`); + }, 500); // simulate server latency + } + + render() { + const title = brand.name + ' - Form'; + const description = brand.desc; + const docSrc = 'containers/Forms/demos/'; + return ( +
+ + {title} + + + + + + + +
+ this.showResult(values)} /> + +
+
+
+ ); + } +} + +export default withStyles(styles)(ReduxForm); diff --git a/front/odiparpack/app/containers/Forms/Selectbox.js b/front/odiparpack/app/containers/Forms/Selectbox.js new file mode 100644 index 0000000..4f0c090 --- /dev/null +++ b/front/odiparpack/app/containers/Forms/Selectbox.js @@ -0,0 +1,58 @@ +import React from 'react'; +import { Helmet } from 'react-helmet'; +import brand from 'ba-api/brand'; +import { withStyles } from '@material-ui/core/styles'; +import { SourceReader, PapperBlock } from 'ba-components'; +import { SimpleSelectbox, NativeSelectbox, MultipleSelectbox, ControlledSelectbox } from './demos'; + +const styles = ({ + root: { + flexGrow: 1, + } +}); + +class Selectbox extends React.Component { + render() { + const title = brand.name + ' - Form'; + const description = brand.desc; + const docSrc = 'containers/Forms/demos/'; + return ( +
+ + {title} + + + + + + + +
+ + +
+
+ +
+ + +
+
+ +
+ + +
+
+ +
+ + +
+
+
+ ); + } +} + +export default withStyles(styles)(Selectbox); diff --git a/front/odiparpack/app/containers/Forms/SliderRange.js b/front/odiparpack/app/containers/Forms/SliderRange.js new file mode 100644 index 0000000..779e251 --- /dev/null +++ b/front/odiparpack/app/containers/Forms/SliderRange.js @@ -0,0 +1,46 @@ +import React from 'react'; +import { Helmet } from 'react-helmet'; +import brand from 'ba-api/brand'; +import { withStyles } from '@material-ui/core/styles'; +import { SourceReader, PapperBlock } from 'ba-components'; +import { SliderInput, RangeInput } from './demos'; + +const styles = ({ + root: { + flexGrow: 1, + } +}); + +class DateTime extends React.Component { + render() { + const title = brand.name + ' - Form'; + const description = brand.desc; + const docSrc = 'containers/Forms/demos/'; + return ( +
+ + {title} + + + + + + + +
+ + +
+
+ +
+ + +
+
+
+ ); + } +} + +export default withStyles(styles)(DateTime); diff --git a/front/odiparpack/app/containers/Forms/Switches.js b/front/odiparpack/app/containers/Forms/Switches.js new file mode 100644 index 0000000..988e0a3 --- /dev/null +++ b/front/odiparpack/app/containers/Forms/Switches.js @@ -0,0 +1,40 @@ +import React from 'react'; +import { Helmet } from 'react-helmet'; +import brand from 'ba-api/brand'; +import { withStyles } from '@material-ui/core/styles'; +import { SourceReader, PapperBlock } from 'ba-components'; +import { SwitchesInput } from './demos'; + +const styles = ({ + root: { + flexGrow: 1, + } +}); + +class DateTime extends React.Component { + render() { + const title = brand.name + ' - Form'; + const description = brand.desc; + const docSrc = 'containers/Forms/demos/'; + return ( +
+ + {title} + + + + + + + +
+ + +
+
+
+ ); + } +} + +export default withStyles(styles)(DateTime); diff --git a/front/odiparpack/app/containers/Forms/TextEditor.js b/front/odiparpack/app/containers/Forms/TextEditor.js new file mode 100644 index 0000000..84a1a82 --- /dev/null +++ b/front/odiparpack/app/containers/Forms/TextEditor.js @@ -0,0 +1,40 @@ +import React from 'react'; +import { Helmet } from 'react-helmet'; +import brand from 'ba-api/brand'; +import { withStyles } from '@material-ui/core/styles'; +import { SourceReader, PapperBlock } from 'ba-components'; +import { Wysiwyg } from './demos'; + +const styles = ({ + root: { + flexGrow: 1, + } +}); + +class DateTime extends React.Component { + render() { + const title = brand.name + ' - Form'; + const description = brand.desc; + const docSrc = 'containers/Forms/demos/'; + return ( +
+ + {title} + + + + + + + +
+ + +
+
+
+ ); + } +} + +export default withStyles(styles)(DateTime); diff --git a/front/odiparpack/app/containers/Forms/Textbox.js b/front/odiparpack/app/containers/Forms/Textbox.js new file mode 100644 index 0000000..3eff0ba --- /dev/null +++ b/front/odiparpack/app/containers/Forms/Textbox.js @@ -0,0 +1,58 @@ +import React from 'react'; +import { Helmet } from 'react-helmet'; +import brand from 'ba-api/brand'; +import { withStyles } from '@material-ui/core/styles'; +import { SourceReader, PapperBlock } from 'ba-components'; +import { TextFields, TextFieldsLayout, InputAdornments, FormattedInputs } from './demos'; + +const styles = ({ + root: { + flexGrow: 1, + } +}); + +class Textbox extends React.Component { + render() { + const title = brand.name + ' - Form'; + const description = brand.desc; + const docSrc = 'containers/Forms/demos/'; + return ( +
+ + {title} + + + + + + + +
+ + +
+
+ +
+ + +
+
+ +
+ + +
+
+ +
+ + +
+
+
+ ); + } +} + +export default withStyles(styles)(Textbox); diff --git a/front/odiparpack/app/containers/Forms/Upload.js b/front/odiparpack/app/containers/Forms/Upload.js new file mode 100644 index 0000000..99ef3bf --- /dev/null +++ b/front/odiparpack/app/containers/Forms/Upload.js @@ -0,0 +1,52 @@ +import React from 'react'; +import { Helmet } from 'react-helmet'; +import brand from 'ba-api/brand'; +import { withStyles } from '@material-ui/core/styles'; +import { SourceReader, PapperBlock } from 'ba-components'; +import { UploadInputAll, UploadInputImg, UploadInputBtn } from './demos'; + +const styles = ({ + root: { + flexGrow: 1, + } +}); + +class DateTime extends React.Component { + render() { + const title = brand.name + ' - Form'; + const description = brand.desc; + const docSrc = 'containers/Forms/demos/'; + return ( +
+ + {title} + + + + + + + +
+ + +
+
+ +
+ + +
+
+ +
+ + +
+
+
+ ); + } +} + +export default withStyles(styles)(DateTime); diff --git a/front/odiparpack/app/containers/Forms/demos/AutoSuggest.js b/front/odiparpack/app/containers/Forms/demos/AutoSuggest.js new file mode 100644 index 0000000..6d90ed3 --- /dev/null +++ b/front/odiparpack/app/containers/Forms/demos/AutoSuggest.js @@ -0,0 +1,184 @@ +import React from 'react'; +import PropTypes from 'prop-types'; +import Downshift from 'downshift'; +import { withStyles } from '@material-ui/core/styles'; +import { TextField, Paper, MenuItem } from '@material-ui/core'; + +const suggestions = [ + { label: 'Afghanistan' }, + { label: 'Aland Islands' }, + { label: 'Albania' }, + { label: 'Algeria' }, + { label: 'American Samoa' }, + { label: 'Andorra' }, + { label: 'Angola' }, + { label: 'Anguilla' }, + { label: 'Antarctica' }, + { label: 'Antigua and Barbuda' }, + { label: 'Argentina' }, + { label: 'Armenia' }, + { label: 'Aruba' }, + { label: 'Australia' }, + { label: 'Austria' }, + { label: 'Azerbaijan' }, + { label: 'Bahamas' }, + { label: 'Bahrain' }, + { label: 'Bangladesh' }, + { label: 'Barbados' }, + { label: 'Belarus' }, + { label: 'Belgium' }, + { label: 'Belize' }, + { label: 'Benin' }, + { label: 'Bermuda' }, + { label: 'Bhutan' }, + { label: 'Bolivia, Plurinational State of' }, + { label: 'Bonaire, Sint Eustatius and Saba' }, + { label: 'Bosnia and Herzegovina' }, + { label: 'Botswana' }, + { label: 'Bouvet Island' }, + { label: 'Brazil' }, + { label: 'British Indian Ocean Territory' }, + { label: 'Brunei Darussalam' }, +]; + +function renderInput(inputProps) { + const { + InputProps, + classes, + ref, + ...other + } = inputProps; + + return ( + + ); +} + +function renderSuggestion({ + suggestion, + index, + itemProps, + highlightedIndex, + selectedItem +}) { + const isHighlighted = highlightedIndex === index; + const isSelected = (selectedItem || '').indexOf(suggestion.label) > -1; + + return ( + + {suggestion.label} + + ); +} + +renderSuggestion.propTypes = { + highlightedIndex: PropTypes.number.isRequired, + index: PropTypes.number.isRequired, + itemProps: PropTypes.object.isRequired, + selectedItem: PropTypes.string.isRequired, + suggestion: PropTypes.shape({ label: PropTypes.string }).isRequired, +}; + +function getSuggestions(inputValue) { + let count = 0; + + return suggestions.filter(suggestion => { + const keep = (!inputValue || suggestion.label.toLowerCase().indexOf(inputValue.toLowerCase()) !== -1) + && count < 5; + + if (keep) { + count += 1; + } + + return keep; + }); +} + +const styles = theme => ({ + root: { + flexGrow: 1, + height: 100, + }, + container: { + flexGrow: 1, + position: 'relative', + }, + paper: { + position: 'absolute', + zIndex: 1, + marginTop: theme.spacing(1), + left: 0, + right: 0, + }, + chip: { + margin: `${theme.spacing(0.5)}px ${theme.spacing(0.25)}px`, + }, + inputRoot: { + flexWrap: 'wrap', + }, +}); + +function AutoSuggest(props) { + const { classes } = props; + + return ( +
+ + {({ + getInputProps, + getItemProps, + isOpen, + inputValue, + selectedItem, + highlightedIndex + }) => ( +
+ {renderInput({ + fullWidth: true, + classes, + InputProps: getInputProps({ + placeholder: 'Search a country (start with a)', + id: 'integration-downshift-simple', + }), + })} + {isOpen ? ( + + {getSuggestions(inputValue).map((suggestion, index) => renderSuggestion({ + suggestion, + index, + itemProps: getItemProps({ item: suggestion.label }), + highlightedIndex, + selectedItem, + }), + )} + + ) : null} +
+ )} +
+
+ ); +} + +AutoSuggest.propTypes = { + classes: PropTypes.object.isRequired, +}; + +export default withStyles(styles)(AutoSuggest); diff --git a/front/odiparpack/app/containers/Forms/demos/Checkboxes.js b/front/odiparpack/app/containers/Forms/demos/Checkboxes.js new file mode 100644 index 0000000..4979e60 --- /dev/null +++ b/front/odiparpack/app/containers/Forms/demos/Checkboxes.js @@ -0,0 +1,242 @@ +import React, { Fragment, PureComponent } from 'react'; +import PropTypes from 'prop-types'; +import { withStyles } from '@material-ui/core/styles'; +import CheckBoxOutlineBlankIcon from '@material-ui/icons/CheckBoxOutlineBlank'; +import CheckBoxIcon from '@material-ui/icons/CheckBox'; +import Favorite from '@material-ui/icons/Favorite'; +import FavoriteBorder from '@material-ui/icons/FavoriteBorder'; +import { green } from '@material-ui/core/colors'; + +import { + Checkbox, + Typography, + Grid, + FormControl, + FormLabel, + FormControlLabel, + FormHelperText, + FormGroup, +} from '@material-ui/core'; + +const styles = theme => ({ + demo: { + height: 'auto', + }, + divider: { + display: 'block', + margin: `${theme.spacing(3)}px 0`, + }, + field: { + margin: `${theme.spacing(3)}px 5px`, + }, + root: { + color: green[600], + '&$checked': { + color: green[500], + }, + }, + checked: {}, + size: { + width: 40, + height: 40, + }, + sizeIcon: { + fontSize: 20, + }, +}); + +class Checkboxes extends PureComponent { + state = { + checkedA: true, + checkedB: true, + checkedF: true, + checkedG: true, + gilad: true, + jason: false, + antoine: true, + }; + + handleChange = name => event => { + this.setState({ [name]: event.target.checked }); + }; + + render() { + const { classes } = this.props; + return ( + + + + Basic usage +
+ + + + + + + +
+
+ + Checkbox with label + Checkbox can also be used with a label description thanks to the FormControlLabel component. +
+ + + )} + label="Secondary" + /> + + )} + label="Primary" + /> + } label="Uncontrolled" /> + } label="Disabled" /> + } + label="Disabled" + /> + + )} + label="Indeterminate" + /> + + )} + label="Custom color" + /> + } checkedIcon={} value="checkedH" /> + } + label="Custom icon" + /> + } + checkedIcon={} + value="checkedI" + /> + )} + label="Custom size" + /> + +
+
+ + Checkbox in Form Group + FormGroup is a helpful wrapper used to group selection controls components that provides an easier API. +
+ + Assign responsibility + + + )} + label="Gilad Gray" + /> + + )} + label="Jason Killian" + /> + + )} + label="Antoine Llorca" + /> + + Be careful + +
+
+
+
+ ); + } +} + +Checkboxes.propTypes = { + classes: PropTypes.object.isRequired, +}; + +export default withStyles(styles)(Checkboxes); diff --git a/front/odiparpack/app/containers/Forms/demos/ComplexButtons.js b/front/odiparpack/app/containers/Forms/demos/ComplexButtons.js new file mode 100644 index 0000000..dbeab99 --- /dev/null +++ b/front/odiparpack/app/containers/Forms/demos/ComplexButtons.js @@ -0,0 +1,154 @@ +import React, { Fragment, PureComponent } from 'react'; +import PropTypes from 'prop-types'; +import { withStyles } from '@material-ui/core/styles'; +import imgApi from 'ba-api/images'; + +import { Typography, ButtonBase } from '@material-ui/core'; + +const styles = theme => ({ + demo: { + height: 'auto', + }, + divider: { + margin: `${theme.spacing(3)}px 0`, + }, + root: { + display: 'flex', + flexWrap: 'wrap', + minWidth: 300, + width: '100%', + }, + image: { + position: 'relative', + height: 200, + [theme.breakpoints.down('xs')]: { + width: '100% !important', // Overrides inline-style + height: 100, + }, + '&:hover, &$focusVisible': { + zIndex: 1, + '& $imageBackdrop': { + opacity: 0.15, + }, + '& $imageMarked': { + opacity: 0, + }, + '& $imageTitle': { + border: '4px solid currentColor', + }, + }, + }, + focusVisible: {}, + imageButton: { + position: 'absolute', + left: 0, + right: 0, + top: 0, + bottom: 0, + display: 'flex', + alignItems: 'center', + justifyContent: 'center', + color: theme.palette.common.white, + }, + imageSrc: { + position: 'absolute', + left: 0, + right: 0, + top: 0, + bottom: 0, + backgroundSize: 'cover', + backgroundPosition: 'center 40%', + }, + imageBackdrop: { + position: 'absolute', + left: 0, + right: 0, + top: 0, + bottom: 0, + backgroundColor: theme.palette.common.black, + opacity: 0.4, + transition: theme.transitions.create('opacity'), + }, + imageTitle: { + position: 'relative', + padding: `${theme.spacing(2)}px ${theme.spacing(4)}px ${theme.spacing(1) + 6}px`, + }, + imageMarked: { + height: 3, + width: 18, + backgroundColor: theme.palette.common.white, + position: 'absolute', + bottom: -2, + left: 'calc(50% - 9px)', + transition: theme.transitions.create('opacity'), + }, +}); + +const images = [ + { + url: imgApi[0], + title: '330x200', + width: '40%', + id: '0' + }, + { + url: imgApi[3], + title: '250x200', + width: '30%', + id: '1' + }, + { + url: imgApi[5], + title: '250x200', + width: '30%', + id: '2' + }, +]; + +class ComplexButtons extends PureComponent { + render() { + const { classes } = this.props; + return ( + +
+ {images.map(image => ( + + + + + + {image.title} + + + + + ))} +
+
+ ); + } +} + +ComplexButtons.propTypes = { + classes: PropTypes.object.isRequired, +}; + +export default withStyles(styles)(ComplexButtons); diff --git a/front/odiparpack/app/containers/Forms/demos/ControlledSelectbox.js b/front/odiparpack/app/containers/Forms/demos/ControlledSelectbox.js new file mode 100644 index 0000000..8ba1163 --- /dev/null +++ b/front/odiparpack/app/containers/Forms/demos/ControlledSelectbox.js @@ -0,0 +1,200 @@ +import React, { Fragment, PureComponent } from 'react'; +import PropTypes from 'prop-types'; +import { withStyles } from '@material-ui/core/styles'; + +import { + Button, + Typography, + Dialog, + DialogActions, + DialogContent, + DialogTitle, + Input, + InputLabel, + MenuItem, + FormControl, + Select, + Grid, +} from '@material-ui/core'; + +const styles = theme => ({ + demo: { + height: 'auto', + }, + divider: { + display: 'block', + margin: `${theme.spacing(3)}px 0`, + }, + field: { + margin: `${theme.spacing(3)}px 5px`, + }, + container: { + display: 'flex', + flexWrap: 'wrap', + }, + formControl: { + margin: theme.spacing(1), + minWidth: 120, + }, + button: { + display: 'block', + marginTop: theme.spacing(2), + }, +}); + +class ControlledSelectbox extends PureComponent { + state = { + open: false, + openRemotely: false, + age: '', + }; + + handleChange = name => event => { + this.setState({ [name]: Number(event.target.value) }); + }; + + handleChangeControll = event => { + this.setState({ [event.target.name]: event.target.value }); + }; + + handleClickOpen = () => { + this.setState({ open: true }); + }; + + handleClickOpenRemot = () => { + this.setState({ openRemotely: true }); + }; + + handleClose = () => { + this.setState({ open: false }); + }; + + handleOpen = () => { + this.setState({ open: true }); + }; + + handleCloseRemot = () => { + this.setState({ openRemotely: false }); + }; + + handleOpenRemot = () => { + this.setState({ openRemotely: true }); + }; + + render() { + const { classes } = this.props; + return ( + + + + With a Dialog + While its not encouraged by the Material Design specification, you can use a select inside a dialog. +
+ + + Fill the form + +
+ + Age + + + + Age + + +
+
+ + + + +
+
+
+ + Controlled open Select +
+
+ + + Age + + +
+
+
+
+
+ ); + } +} + +ControlledSelectbox.propTypes = { + classes: PropTypes.object.isRequired, +}; + +export default withStyles(styles)(ControlledSelectbox); diff --git a/front/odiparpack/app/containers/Forms/demos/CustomButtons.js b/front/odiparpack/app/containers/Forms/demos/CustomButtons.js new file mode 100644 index 0000000..f1600a0 --- /dev/null +++ b/front/odiparpack/app/containers/Forms/demos/CustomButtons.js @@ -0,0 +1,257 @@ +import React, { Fragment, PureComponent } from 'react'; +import PropTypes from 'prop-types'; +import classNames from 'classnames'; +import { withStyles, MuiThemeProvider, createMuiTheme } from '@material-ui/core/styles'; +import AddIcon from '@material-ui/icons/Add'; +import FileUpload from '@material-ui/icons/CloudUpload'; +import { Link } from 'react-router-dom'; + +import { purple, green } from '@material-ui/core/colors'; + +import { Typography, Grid, Button, Fab, IconButton } from '@material-ui/core'; + +const styles = theme => ({ + demo: { + height: 'auto', + }, + divider: { + margin: `${theme.spacing(3)}px 0`, + }, + field: { + margin: `${theme.spacing(3)}px 0`, + }, + button: { + margin: theme.spacing(1), + }, + container: { + display: 'flex', + flexWrap: 'wrap', + }, + margin: { + margin: theme.spacing(1), + }, + cssRoot: { + color: theme.palette.getContrastText(purple[500]), + backgroundColor: purple[500], + '&:hover': { + backgroundColor: purple[700], + }, + }, + bootstrapRoot: { + boxShadow: 'none', + textTransform: 'none', + borderRadius: 4, + fontSize: 16, + padding: '6px 12px', + border: '1px solid', + backgroundColor: '#007bff', + borderColor: '#007bff', + '&:hover': { + backgroundColor: '#0069d9', + borderColor: '#0062cc', + }, + '&:active': { + boxShadow: 'none', + backgroundColor: '#0062cc', + borderColor: '#005cbf', + }, + '&:focus': { + boxShadow: '0 0 0 0.2rem rgba(0,123,255,.5)', + }, + }, + gradientBtn: { + background: 'linear-gradient(45deg, #FE6B8B 30%, #FF8E53 90%)', + borderRadius: 3, + border: 0, + color: 'white', + height: 48, + padding: '0 30px', + boxShadow: '0 3px 5px 2px rgba(255, 105, 135, .30)', + }, + label: { + textTransform: 'capitalize', + }, + inputUpload: { + display: 'none', + }, +}); + +const theme = createMuiTheme({ + palette: { + primary: green, + }, +}); + +const LinkBtn = React.forwardRef(function LinkBtn(props, ref) { // eslint-disable-line + return ; // eslint-disable-line +}); + +class CustomButtons extends PureComponent { + render() { + const { classes } = this.props; + const MyLink = React.forwardRef((props, ref) => ); // eslint-disable-line + return ( + + + + Sizes + + Fancy larger or smaller buttons? Use the size or the mini property. + +
+
+ + + +
+
+ + + +
+
+ + + +
+
+ + + + + + +
+
+
+ + Style + + Here is an example of how you can change the main color of a Button. + +
+ + + + + + +
+
+ + Linked Button + + One common use case is to use the button to trigger a navigation to a new page. + +
+ + +
+
+ + Upload Button + + This a sample to trigger input files from button + +
+ + + + +
+
+
+
+ ); + } +} + +CustomButtons.propTypes = { + classes: PropTypes.object.isRequired, +}; + +export default withStyles(styles)(CustomButtons); diff --git a/front/odiparpack/app/containers/Forms/demos/DateInput.js b/front/odiparpack/app/containers/Forms/demos/DateInput.js new file mode 100644 index 0000000..fc3397c --- /dev/null +++ b/front/odiparpack/app/containers/Forms/demos/DateInput.js @@ -0,0 +1,193 @@ +import React, { Fragment, PureComponent } from 'react'; +import PropTypes from 'prop-types'; +import { DatePicker, KeyboardDatePicker, MuiPickersUtilsProvider } from '@material-ui/pickers'; +import MomentUtils from '@date-io/moment'; +import DateFnsUtils from '@date-io/date-fns'; +import { withStyles } from '@material-ui/core/styles'; + +import frLocale from 'date-fns/locale/fr'; +import ruLocale from 'date-fns/locale/ru'; +import enLocale from 'date-fns/locale/en-US'; + +import { MenuItem, Menu, Icon, IconButton, Typography, Grid } from '@material-ui/core'; + +const localeMap = { + en: enLocale, + fr: frLocale, + ru: ruLocale, +}; + +const styles = theme => ({ + demo: { + height: 240, + }, + divider: { + display: 'block', + margin: `${theme.spacing(3)}px 0`, + }, + picker: { + margin: `${theme.spacing(3)}px 5px`, + } +}); + +class DateInput extends PureComponent { + state = { + selectedDate: new Date(), + anchorEl: null, + currentLocale: 'fr', + } + + handleDateChange = (date) => { + this.setState({ selectedDate: date }); + } + + handleMenuOpen = (event) => { + event.stopPropagation(); + this.setState({ anchorEl: event.currentTarget }); + } + + handleMenuClose = () => { + this.setState({ anchorEl: null }); + }; + + selectLocale = (selectedLocale) => { + this.setState({ + currentLocale: selectedLocale, + anchorEl: null, + }); + } + + render() { + const { selectedDate, currentLocale, anchorEl } = this.state; + const { classes } = this.props; + const locale = localeMap[currentLocale]; + return ( + + + + Basic usage +
+ + + +
+ +
+ + + +
+
+ + Keyboard Input +
+ + + +
+ +
+ + + +
+
+ + Localization +
+
+ + + more_vert + + ), + }} + /> + +
+ + + { + Object.keys(localeMap).map(localeItem => ( + this.selectLocale(localeItem)} + > + {localeItem} + + )) + } + +
+
+
+
+ ); + } +} + + +DateInput.propTypes = { + classes: PropTypes.object.isRequired, +}; + +export default withStyles(styles)(DateInput); diff --git a/front/odiparpack/app/containers/Forms/demos/DateTimeInput.js b/front/odiparpack/app/containers/Forms/demos/DateTimeInput.js new file mode 100644 index 0000000..e594013 --- /dev/null +++ b/front/odiparpack/app/containers/Forms/demos/DateTimeInput.js @@ -0,0 +1,123 @@ +import React, { Fragment, PureComponent } from 'react'; +import { DateTimePicker, KeyboardDateTimePicker, MuiPickersUtilsProvider } from '@material-ui/pickers'; +import MomentUtils from '@date-io/moment'; +import PropTypes from 'prop-types'; +import { withStyles } from '@material-ui/core/styles'; +import { IconButton, Icon, InputAdornment, Typography, Grid } from '@material-ui/core'; + +const styles = theme => ({ + demo: { + height: 'auto', + }, + divider: { + margin: `${theme.spacing(3)}px 0`, + }, + picker: { + margin: `${theme.spacing(3)}px 5px`, + } +}); + +class DateTimeInput extends PureComponent { + state = { + selectedDate: new Date(), + } + + handleDateChange = (date) => { + this.setState({ selectedDate: date }); + } + + render() { + const { selectedDate } = this.state; + const { classes } = this.props; + return ( + + + + Basic usage +
+ + + +
+ +
+ + + +
+
+ + Customization +
+ + add_alarm } + rightArrowIcon={ snooze } + InputProps={{ + endAdornment: ( + + + add_alarm + + + ), + }} + /> + +
+
+ + + +
+
+
+
+ ); + } +} + +DateTimeInput.propTypes = { + classes: PropTypes.object.isRequired, +}; + +export default withStyles(styles)(DateTimeInput); diff --git a/front/odiparpack/app/containers/Forms/demos/FloatingButtons.js b/front/odiparpack/app/containers/Forms/demos/FloatingButtons.js new file mode 100644 index 0000000..5fbfa1c --- /dev/null +++ b/front/odiparpack/app/containers/Forms/demos/FloatingButtons.js @@ -0,0 +1,185 @@ +import React, { Fragment, PureComponent } from 'react'; +import PropTypes from 'prop-types'; +import { withStyles } from '@material-ui/core/styles'; +import classNames from 'classnames'; +import SwipeableViews from 'react-swipeable-views'; +import AddIcon from '@material-ui/icons/Add'; +import EditIcon from '@material-ui/icons/Create'; +import NavigationIcon from '@material-ui/icons/Navigation'; +import UpIcon from '@material-ui/icons/KeyboardArrowUp'; +import DeleteIcon from '@material-ui/icons/Delete'; +import { green } from '@material-ui/core/colors'; + +import { Typography, Grid, Fab, AppBar, Tabs, Tab, Zoom, Icon } from '@material-ui/core'; + +const styles = theme => ({ + demo: { + height: 'auto', + }, + divider: { + display: 'block', + margin: `${theme.spacing(3)}px 0`, + }, + button: { + margin: theme.spacing(1), + }, + root: { + backgroundColor: theme.palette.background.paper, + [theme.breakpoints.up('sm')]: { + width: 500, + }, + margin: '0 auto', + position: 'relative', + minHeight: 200, + }, + fab: { + position: 'absolute', + bottom: theme.spacing(2), + right: theme.spacing(2), + }, + fabGreen: { + color: theme.palette.common.white, + backgroundColor: green[500], + }, + extendedIcon: { + marginRight: theme.spacing(1), + }, +}); + +function TabContainer(props) { + const { children, dir } = props; + + return ( + + {children} + + ); +} + +TabContainer.propTypes = { + children: PropTypes.node.isRequired, + dir: PropTypes.string.isRequired, +}; + +class FloatingButtons extends PureComponent { + state = { + value: 0, + }; + + handleChange = (event, value) => { + this.setState({ value }); + }; + + handleChangeIndex = index => { + this.setState({ value: index }); + }; + + render() { + const { classes, theme } = this.props; + const transitionDuration = { + enter: theme.transitions.duration.enteringScreen, + exit: theme.transitions.duration.leavingScreen, + }; + const fabs = [ + { + color: 'primary', + className: classes.fab, + icon: , + }, + { + color: 'secondary', + className: classes.fab, + icon: , + }, + { + color: 'inherit', + className: classNames(classes.fab, classes.fabGreen), + icon: , + }, + ]; + + return ( + + + + Floating Action Buttons + + A floating action button represents the primary action in an application. + + + + + + edit_icon + + + + Extended + + + + + + + Floating BUtton in Tab + + A floating action button that spans multiple lateral screens (such as tabbed screens) should briefly disappear, then reappear if its action changes. + +
+ + + + + + + + + Item One + Item Two + Item Three + + {fabs.map((fab, index) => ( + + + {fab.icon} + + + ))} +
+
+
+
+ ); + } +} + +FloatingButtons.propTypes = { + classes: PropTypes.object.isRequired, + theme: PropTypes.object.isRequired, +}; + +export default withStyles(styles, { withTheme: true })(FloatingButtons); diff --git a/front/odiparpack/app/containers/Forms/demos/FormattedInputs.js b/front/odiparpack/app/containers/Forms/demos/FormattedInputs.js new file mode 100644 index 0000000..9fbe9cd --- /dev/null +++ b/front/odiparpack/app/containers/Forms/demos/FormattedInputs.js @@ -0,0 +1,109 @@ +import React from 'react'; +import MaskedInput from 'react-text-mask'; +import NumberFormat from 'react-number-format'; +import PropTypes from 'prop-types'; +import { withStyles } from '@material-ui/core/styles'; +import { Input, InputLabel, TextField, FormControl } from '@material-ui/core'; + +const styles = theme => ({ + container: { + display: 'flex', + flexWrap: 'wrap', + }, + formControl: { + margin: theme.spacing(3), + }, +}); + +function TextMaskCustom(props) { + const { inputRef, ...other } = props; + + return ( + { + inputRef(ref ? ref.inputElement : null); + }} + mask={['(', /[1-9]/, /\d/, /\d/, ')', ' ', /\d/, /\d/, /\d/, '-', /\d/, /\d/, /\d/, /\d/]} + placeholderChar={'\u2000'} + showMask + /> + ); +} + +TextMaskCustom.propTypes = { + inputRef: PropTypes.func.isRequired, +}; + +function NumberFormatCustom(props) { + const { inputRef, onChange, ...other } = props; + + return ( + { + onChange({ + target: { + value: values.value, + }, + }); + }} + thousandSeparator + prefix="$" + /> + ); +} + +NumberFormatCustom.propTypes = { + inputRef: PropTypes.func.isRequired, + onChange: PropTypes.func.isRequired, +}; + +class FormattedInputs extends React.Component { + state = { + textmask: '(1  )    -    ', + numberformat: '1320', + }; + + handleChange = name => event => { + this.setState({ + [name]: event.target.value, + }); + }; + + render() { + const { classes } = this.props; + const { textmask, numberformat } = this.state; + + return ( +
+ + react-text-mask + + + +
+ ); + } +} + +FormattedInputs.propTypes = { + classes: PropTypes.object.isRequired, +}; + +export default withStyles(styles)(FormattedInputs); diff --git a/front/odiparpack/app/containers/Forms/demos/HighlightSuggest.js b/front/odiparpack/app/containers/Forms/demos/HighlightSuggest.js new file mode 100644 index 0000000..ee13fd7 --- /dev/null +++ b/front/odiparpack/app/containers/Forms/demos/HighlightSuggest.js @@ -0,0 +1,198 @@ +import React from 'react'; +import PropTypes from 'prop-types'; +import Autosuggest from 'react-autosuggest'; +import match from 'autosuggest-highlight/match'; +import parse from 'autosuggest-highlight/parse'; +import { withStyles } from '@material-ui/core/styles'; + +import { TextField, Paper, MenuItem } from '@material-ui/core'; + +const suggestions = [ + { label: 'Afghanistan' }, + { label: 'Aland Islands' }, + { label: 'Albania' }, + { label: 'Algeria' }, + { label: 'American Samoa' }, + { label: 'Andorra' }, + { label: 'Angola' }, + { label: 'Anguilla' }, + { label: 'Antarctica' }, + { label: 'Antigua and Barbuda' }, + { label: 'Argentina' }, + { label: 'Armenia' }, + { label: 'Aruba' }, + { label: 'Australia' }, + { label: 'Austria' }, + { label: 'Azerbaijan' }, + { label: 'Bahamas' }, + { label: 'Bahrain' }, + { label: 'Bangladesh' }, + { label: 'Barbados' }, + { label: 'Belarus' }, + { label: 'Belgium' }, + { label: 'Belize' }, + { label: 'Benin' }, + { label: 'Bermuda' }, + { label: 'Bhutan' }, + { label: 'Bolivia, Plurinational State of' }, + { label: 'Bonaire, Sint Eustatius and Saba' }, + { label: 'Bosnia and Herzegovina' }, + { label: 'Botswana' }, + { label: 'Bouvet Island' }, + { label: 'Brazil' }, + { label: 'British Indian Ocean Territory' }, + { label: 'Brunei Darussalam' }, +]; + +function renderInput(inputProps) { + const { classes, ref, ...other } = inputProps; + + return ( + + ); +} + +function renderSuggestion(suggestion, { query, isHighlighted }) { + const matches = match(suggestion.label, query); + const parts = parse(suggestion.label, matches); + + return ( + +
+ {parts.map((part, index) => ( + part.highlight ? ( + + {part.text} + + ) : ( + + {part.text} + + ) + ))} +
+
+ ); +} + +function renderSuggestionsContainer(options) { + const { containerProps, children } = options; + + return ( + + {children} + + ); +} + +function getSuggestionValue(suggestion) { + return suggestion.label; +} + +function getSuggestions(value) { + const inputValue = value.trim().toLowerCase(); + const inputLength = inputValue.length; + let count = 0; + + return inputLength === 0 + ? [] : suggestions.filter(suggestion => { + const keep = count < 5 && suggestion.label.toLowerCase().slice(0, inputLength) === inputValue; + + if (keep) { + count += 1; + } + + return keep; + }); +} + +const styles = theme => ({ + container: { + flexGrow: 1, + position: 'relative', + height: 250, + }, + suggestionsContainerOpen: { + position: 'absolute', + zIndex: 1, + marginTop: theme.spacing(1), + left: 0, + right: 0, + }, + suggestion: { + display: 'block', + }, + suggestionsList: { + margin: 0, + padding: 0, + listStyleType: 'none', + }, +}); + +class HighlightSuggest extends React.Component { + state = { + value: '', + suggestions: [], + }; + + handleSuggestionsFetchRequested = ({ value }) => { + this.setState({ + suggestions: getSuggestions(value), + }); + }; + + handleSuggestionsClearRequested = () => { + this.setState({ + suggestions: [], + }); + }; + + handleChange = (event, { newValue }) => { + this.setState({ + value: newValue, + }); + }; + + render() { + const { classes } = this.props; + + return ( + + ); + } +} + +HighlightSuggest.propTypes = { + classes: PropTypes.object.isRequired, +}; + +export default withStyles(styles)(HighlightSuggest); diff --git a/front/odiparpack/app/containers/Forms/demos/InputAdornments.js b/front/odiparpack/app/containers/Forms/demos/InputAdornments.js new file mode 100644 index 0000000..1d6307e --- /dev/null +++ b/front/odiparpack/app/containers/Forms/demos/InputAdornments.js @@ -0,0 +1,221 @@ +import React, { Fragment, PureComponent } from 'react'; +import PropTypes from 'prop-types'; +import classNames from 'classnames'; +import { withStyles } from '@material-ui/core/styles'; +import Visibility from '@material-ui/icons/Visibility'; +import VisibilityOff from '@material-ui/icons/VisibilityOff'; +import AccountCircle from '@material-ui/icons/AccountCircle'; + +import { + Typography, + Grid, + IconButton, + Input, + InputLabel, + InputAdornment, + FormControl, + FormHelperText, + TextField, + MenuItem, +} from '@material-ui/core'; + +const styles = theme => ({ + demo: { + height: 'auto', + }, + divider: { + display: 'block', + margin: `${theme.spacing(3)}px 0`, + }, + root: { + display: 'flex', + flexWrap: 'wrap', + }, + margin: { + margin: theme.spacing(3), + }, + withoutLabel: { + marginTop: theme.spacing(3), + }, + textField: { + flexBasis: 200, + }, +}); + +const ranges = [ + { + value: '0-20', + label: '0 to 20', + }, + { + value: '21-50', + label: '21 to 50', + }, + { + value: '51-100', + label: '51 to 100', + }, +]; + +class InputAdornments extends PureComponent { + state = { + amount: '', + password: '', + weight: '', + weightRange: '', + showPassword: false, + }; + + handleChange = prop => event => { + this.setState({ [prop]: event.target.value }); + }; + + handleMouseDownPassword = event => { + event.preventDefault(); + }; + + handleClickShowPassword = () => { + this.setState({ showPassword: !this.state.showPassword }); + }; + + render() { + const { classes } = this.props; + return ( + + + + Input Adornments + TextField is composed of smaller components that you can leverage directly to significantly customize your form inputs. +
+ Kg, + }} + /> + Kg, + }} + > + {ranges.map(option => ( + + {option.label} + + ))} + + + Amount + $} + /> + + + Kg} + inputProps={{ + 'aria-label': 'Weight', + }} + /> + Weight + + + Password + + + {this.state.showPassword ? : } + + + )} + /> + +
+
+ + With icon + Icons can be specified as prepended or appended. + + With a start adornment + + + + )} + /> + + + + + ), + }} + /> +
+ + + + + + + + +
+
+
+
+ ); + } +} + +InputAdornments.propTypes = { + classes: PropTypes.object.isRequired, +}; + +export default withStyles(styles)(InputAdornments); diff --git a/front/odiparpack/app/containers/Forms/demos/MultipleSelectbox.js b/front/odiparpack/app/containers/Forms/demos/MultipleSelectbox.js new file mode 100644 index 0000000..6609147 --- /dev/null +++ b/front/odiparpack/app/containers/Forms/demos/MultipleSelectbox.js @@ -0,0 +1,165 @@ +import React, { Fragment, PureComponent } from 'react'; +import PropTypes from 'prop-types'; + +import { withStyles } from '@material-ui/core/styles'; + +import { + Input, + InputLabel, + MenuItem, + FormControl, + ListItemText, + Select, + Checkbox, + Chip, +} from '@material-ui/core'; + +const styles = theme => ({ + demo: { + height: 'auto', + }, + divider: { + margin: `${theme.spacing(3)}px 0`, + }, + field: { + margin: `${theme.spacing(3)}px 0`, + }, + root: { + display: 'flex', + flexWrap: 'wrap', + }, + formControl: { + margin: theme.spacing(1), + minWidth: 120, + maxWidth: 300, + }, + chips: { + display: 'flex', + flexWrap: 'wrap', + }, + chip: { + margin: theme.spacing(0.25), + }, +}); + +const ITEM_HEIGHT = 48; +const ITEM_PADDING_TOP = 8; +const MenuProps = { + PaperProps: { + style: { + maxHeight: (ITEM_HEIGHT * 4.5) + ITEM_PADDING_TOP, + width: 250, + }, + }, +}; + +const names = [ + 'Oliver Hansen', + 'Van Henry', + 'April Tucker', + 'Ralph Hubbard', + 'Omar Alexander', + 'Carlos Abbott', + 'Miriam Wagner', + 'Bradley Wilkerson', + 'Virginia Andrews', + 'Kelly Snyder', +]; + +class MultipleSelectbox extends PureComponent { + state = { + name: [], + }; + + handleChange = event => { + this.setState({ name: event.target.value }); + }; + + render() { + const { classes, theme } = this.props; + return ( + + + Name + + + + Tag + + + + Chip + + + + ); + } +} + +MultipleSelectbox.propTypes = { + classes: PropTypes.object.isRequired, + theme: PropTypes.object.isRequired, +}; + +export default withStyles(styles, { withTheme: true })(MultipleSelectbox); diff --git a/front/odiparpack/app/containers/Forms/demos/NativeSelectbox.js b/front/odiparpack/app/containers/Forms/demos/NativeSelectbox.js new file mode 100644 index 0000000..a0e3c4d --- /dev/null +++ b/front/odiparpack/app/containers/Forms/demos/NativeSelectbox.js @@ -0,0 +1,153 @@ +import React, { Fragment, PureComponent } from 'react'; +import PropTypes from 'prop-types'; + +import { withStyles } from '@material-ui/core/styles'; + +import { Input, InputLabel, FormControl, FormHelperText, Select } from '@material-ui/core'; + +const styles = theme => ({ + demo: { + height: 'auto', + }, + divider: { + display: 'block', + margin: `${theme.spacing(3)}px 0`, + }, + field: { + margin: `${theme.spacing(3)}px 5px`, + }, + root: { + display: 'flex', + flexWrap: 'wrap', + }, + formControl: { + margin: theme.spacing(1), + minWidth: 120, + }, + selectEmpty: { + marginTop: theme.spacing(2), + }, +}); + +class NativeSelectbox extends PureComponent { + state = { + age: '', + name: 'hai', + }; + + handleChange = name => event => { + this.setState({ [name]: event.target.value }); + }; + + render() { + const { classes } = this.props; + return ( + + + Age + + + + Age + + Some important helper text + + + + Without label + + + Name + + Disabled + + + Name + + Error + + + Name + + Alignment with an input + + + Name + + Uncontrolled + + + ); + } +} + +NativeSelectbox.propTypes = { + classes: PropTypes.object.isRequired, +}; + +export default withStyles(styles)(NativeSelectbox); diff --git a/front/odiparpack/app/containers/Forms/demos/RadioButton.js b/front/odiparpack/app/containers/Forms/demos/RadioButton.js new file mode 100644 index 0000000..c378d96 --- /dev/null +++ b/front/odiparpack/app/containers/Forms/demos/RadioButton.js @@ -0,0 +1,212 @@ +import React, { Fragment, PureComponent } from 'react'; +import PropTypes from 'prop-types'; +import { withStyles } from '@material-ui/core/styles'; +import RadioButtonUncheckedIcon from '@material-ui/icons/RadioButtonUnchecked'; +import RadioButtonCheckedIcon from '@material-ui/icons/RadioButtonChecked'; +import { green } from '@material-ui/core/colors'; + +import { + Radio, + RadioGroup, + Typography, + Grid, + FormControl, + FormLabel, + FormControlLabel, + FormHelperText, +} from '@material-ui/core'; + +const styles = theme => ({ + demo: { + height: 'auto', + }, + divider: { + display: 'block', + margin: `${theme.spacing(3)}px 0`, + }, + field: { + margin: `${theme.spacing(3)}px 5px`, + }, + root: { + color: green[600], + '&$checked': { + color: green[500], + }, + }, + formControl: { + margin: theme.spacing(3), + }, + group: { + margin: `${theme.spacing(1)}px 0`, + }, + checked: {}, + size: { + width: 40, + height: 40, + }, + sizeIcon: { + fontSize: 20, + }, +}); + +class RadioButton extends PureComponent { + state = { + value: 'female', + selectedValue: 'a', + }; + + handleChange = event => { + this.setState({ value: event.target.value }); + }; + + handleChangeOther = event => { + this.setState({ selectedValue: event.target.value }); + }; + + render() { + const { classes } = this.props; + return ( + + + + Basic usage + Radio buttons should have the most commonly used option selected by default. +
+ + + + Gender + + } label="Female" /> + } label="Male" /> + } label="Other" /> + } + label="(Disabled option)" + /> + + + + + + Gender + + } label="Male" /> + } label="Female" /> + } label="Other" /> + } + label="(Disabled option)" + /> + + You can display an error + + + +
+
+ +
+ Radio without label + Radio can also be used standalone, without the wrapper. + + + + + } + checkedIcon={} + /> +
+
+
+
+ ); + } +} + +RadioButton.propTypes = { + classes: PropTypes.object.isRequired, +}; + +export default withStyles(styles)(RadioButton); diff --git a/front/odiparpack/app/containers/Forms/demos/RangeInput.js b/front/odiparpack/app/containers/Forms/demos/RangeInput.js new file mode 100644 index 0000000..247050e --- /dev/null +++ b/front/odiparpack/app/containers/Forms/demos/RangeInput.js @@ -0,0 +1,92 @@ +import React, { Fragment, PureComponent } from 'react'; +import PropTypes from 'prop-types'; +import InputRange from 'react-input-range'; +import { withStyles } from '@material-ui/core/styles'; +import 'ba-styles/vendors/react-input-range/react-input-range.css'; + +import { FormControl, Typography, Grid } from '@material-ui/core'; + +const styles = theme => ({ + demo: { + height: 'auto', + }, + divider: { + display: 'block', + margin: `${theme.spacing(3)}px 0`, + }, + inputRange: { + width: 300, + margin: `${theme.spacing(3)}px 5px`, + } +}); + +class RangeInput extends PureComponent { + state = { + valueRange: { + min: 3, + max: 7, + }, + valueRangeLabel: { + min: 5, + max: 10, + }, + } + + render() { + const { classes } = this.props; + return ( + + + + Range Input Basic + +
+ this.setState({ valueRange: value })} + value={this.state.valueRange} + /> +
+
+
+ + Range with Label + +
+ `${value} kg`} + value={this.state.valueRangeLabel} + onChange={value => this.setState({ valueRangeLabel: value })} + /> +
+
+
+
+
+ ); + } +} + +RangeInput.propTypes = { + classes: PropTypes.object.isRequired, +}; + +export default withStyles(styles)(RangeInput); diff --git a/front/odiparpack/app/containers/Forms/demos/RatingCustom.js b/front/odiparpack/app/containers/Forms/demos/RatingCustom.js new file mode 100644 index 0000000..002548b --- /dev/null +++ b/front/odiparpack/app/containers/Forms/demos/RatingCustom.js @@ -0,0 +1,176 @@ +import React, { Fragment, PureComponent } from 'react'; +import PropTypes from 'prop-types'; +import { withStyles } from '@material-ui/core/styles'; +import { AddCircle, AddCircleOutline, Remove, ThumbUp } from '@material-ui/icons'; +import { Rating } from 'ba-components'; + +import { green, red, indigo as blue } from '@material-ui/core/colors'; + +import { FormControl, Typography, Grid, Chip } from '@material-ui/core'; + +const styles = theme => ({ + demo: { + height: 'auto', + }, + divider: { + display: 'block', + margin: `${theme.spacing(3)}px 0`, + }, + field: { + margin: `${theme.spacing(3)}px 0`, + }, + chip: { + margin: theme.spacing(1), + fontWeight: 'bold', + color: '#FFF', + background: red[300] + }, + blue: { + color: blue[300] + }, + green: { + color: green[500] + }, + red: { + color: red[300] + }, + small: { + '& button': { + width: 72, + height: 72, + padding: 16 + }, + '& svg': { + width: 36, + height: 36 + } + }, + medium: { + '& button': { + width: 96, + height: 96, + padding: 24 + }, + '& svg': { + width: 48, + height: 48 + } + }, + large: { + '& button': { + width: 120, + height: 120, + padding: 30 + }, + '& svg': { + width: 60, + height: 60 + } + } +}); + +class RatingCustom extends PureComponent { + state = { + rating: 3 + } + + handleChange = value => { + this.setState({ rating: value }); + } + + render() { + const { classes } = this.props; + return ( + + + + Ratting Custom Icon + + this.handleChange(value)} + iconFilled={} + iconHovered={} + iconNormal={} + /> + + + + Show Counter + + + this.handleChange(value)} + iconFilled={} + iconHovered={} + iconNormal={} + tooltipRenderer={(index) => { index }} + tooltipPosition="bottom-center" + /> + + + + + + Ratting Custom Size + +
+ this.handleChange(value)} + /> +
+
+ this.handleChange(value)} + /> +
+
+ this.handleChange(value)} + /> +
+
+
+
+
+ ); + } +} + +RatingCustom.propTypes = { + classes: PropTypes.object.isRequired, +}; + +export default withStyles(styles)(RatingCustom); diff --git a/front/odiparpack/app/containers/Forms/demos/RatingNormal.js b/front/odiparpack/app/containers/Forms/demos/RatingNormal.js new file mode 100644 index 0000000..acfb50d --- /dev/null +++ b/front/odiparpack/app/containers/Forms/demos/RatingNormal.js @@ -0,0 +1,92 @@ +import React, { Fragment, PureComponent } from 'react'; +import PropTypes from 'prop-types'; +import { withStyles } from '@material-ui/core/styles'; +import { Rating } from 'ba-components'; + +import { FormControl, Typography, Grid } from '@material-ui/core'; + +const styles = theme => ({ + demo: { + height: 'auto', + }, + divider: { + margin: `${theme.spacing(3)}px 0`, + }, + field: { + margin: `${theme.spacing(3)}px 5px`, + }, +}); + +class RatingCustom extends PureComponent { + state = { + rating: 3 + } + + handleChange = value => { + this.setState({ rating: value }); + } + + render() { + const { classes } = this.props; + return ( + + + + Ratting Normal + + this.handleChange(value)} + /> + + + + Read Only + + + + + + Disabled + + + + + + + ); + } +} + +RatingCustom.propTypes = { + classes: PropTypes.object.isRequired, +}; + +export default withStyles(styles)(RatingCustom); diff --git a/front/odiparpack/app/containers/Forms/demos/ReduxFormDemo.js b/front/odiparpack/app/containers/Forms/demos/ReduxFormDemo.js new file mode 100644 index 0000000..32b5d3d --- /dev/null +++ b/front/odiparpack/app/containers/Forms/demos/ReduxFormDemo.js @@ -0,0 +1,229 @@ +import React, { Component } from 'react'; +import PropTypes from 'prop-types'; +import { withStyles } from '@material-ui/core/styles'; +import { Field, reduxForm } from 'redux-form/immutable'; +import { bindActionCreators } from 'redux'; +import { connect } from 'react-redux'; +import { + CheckboxRedux, + SelectRedux, + TextFieldRedux, + SwitchRedux +} from 'ba-components/Forms/ReduxFormMUI'; +import { initAction, clearAction } from 'ba-actions/ReduxFormActions'; + +import { + Paper, + MenuItem, + InputLabel, + Grid, + Radio, + RadioGroup, + FormControl, + FormLabel, + FormControlLabel, + Typography, + Button, +} from '@material-ui/core'; + +const renderRadioGroup = ({ input, ...rest }) => ( + input.onChange(value)} + /> +); + +// validation functions +const required = value => (value == null ? 'Required' : undefined); +const email = value => ( + value && !/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$/i.test(value) + ? 'Invalid email' + : undefined +); + +const styles = theme => ({ + root: { + flexGrow: 1, + padding: 30 + }, + field: { + width: '100%', + marginBottom: 20 + }, + fieldBasic: { + width: '100%', + marginBottom: 20, + marginTop: 10 + }, + inlineWrap: { + display: 'flex', + flexDirection: 'row' + }, + buttonInit: { + margin: theme.spacing(4), + textAlign: 'center' + }, +}); + +const initData = { + text: 'Sample Text', + email: 'sample@mail.com', + radio: 'option1', + selection: 'option1', + onof: true, + checkbox: true, + textarea: 'This is default text' +}; + +class ReduxFormDemo extends Component { + render() { + const trueBool = true; + const { + classes, + handleSubmit, + pristine, + reset, + submitting, + init, + clear + } = this.props; + return ( +
+ + + + + Simple Form Example + + + The delay between when you click (Submit) and when the alert dialog pops up is intentional, to simulate server latency. + +
+ + +
+
+
+ +
+
+ +
+
+ Choose One Option + + } label="Option 1" /> + } label="Option 2" /> + +
+
+ + Selection + + Option One + Option Two + Option Three + + +
+
+ Toggle Input +
+ } label="On/OF Switch" /> + } label="Checkbox" /> +
+
+
+ +
+
+ + +
+
+
+
+
+
+ ); + } +} + +renderRadioGroup.propTypes = { + input: PropTypes.object.isRequired, +}; + +ReduxFormDemo.propTypes = { + classes: PropTypes.object.isRequired, + handleSubmit: PropTypes.func.isRequired, + reset: PropTypes.func.isRequired, + pristine: PropTypes.bool.isRequired, + submitting: PropTypes.bool.isRequired, + init: PropTypes.func.isRequired, + clear: PropTypes.func.isRequired, +}; + +const mapDispatchToProps = dispatch => ({ + init: bindActionCreators(initAction, dispatch), + clear: () => dispatch(clearAction), +}); + +const ReduxFormMapped = reduxForm({ + form: 'immutableExample', + enableReinitialize: true, +})(ReduxFormDemo); + +const reducer = 'initval'; +const FormInit = connect( + state => ({ + force: state, + initialValues: state.getIn([reducer, 'formValues']) + }), + mapDispatchToProps, +)(ReduxFormMapped); + +export default withStyles(styles)(FormInit); diff --git a/front/odiparpack/app/containers/Forms/demos/SelectSuggestionTags.js b/front/odiparpack/app/containers/Forms/demos/SelectSuggestionTags.js new file mode 100644 index 0000000..125fd23 --- /dev/null +++ b/front/odiparpack/app/containers/Forms/demos/SelectSuggestionTags.js @@ -0,0 +1,379 @@ +import React from 'react'; +import PropTypes from 'prop-types'; +import classNames from 'classnames'; +import Select from 'react-select'; +import { emphasize, makeStyles, useTheme } from '@material-ui/core/styles'; +import Typography from '@material-ui/core/Typography'; +import NoSsr from '@material-ui/core/NoSsr'; +import TextField from '@material-ui/core/TextField'; +import Paper from '@material-ui/core/Paper'; +import Chip from '@material-ui/core/Chip'; +import MenuItem from '@material-ui/core/MenuItem'; +import CancelIcon from '@material-ui/icons/Cancel'; + +const suggestions = [ + { label: 'Afghanistan' }, + { label: 'Aland Islands' }, + { label: 'Albania' }, + { label: 'Algeria' }, + { label: 'American Samoa' }, + { label: 'Andorra' }, + { label: 'Angola' }, + { label: 'Anguilla' }, + { label: 'Antarctica' }, + { label: 'Antigua and Barbuda' }, + { label: 'Argentina' }, + { label: 'Armenia' }, + { label: 'Aruba' }, + { label: 'Australia' }, + { label: 'Austria' }, + { label: 'Azerbaijan' }, + { label: 'Bahamas' }, + { label: 'Bahrain' }, + { label: 'Bangladesh' }, + { label: 'Barbados' }, + { label: 'Belarus' }, + { label: 'Belgium' }, + { label: 'Belize' }, + { label: 'Benin' }, + { label: 'Bermuda' }, + { label: 'Bhutan' }, + { label: 'Bolivia, Plurinational State of' }, + { label: 'Bonaire, Sint Eustatius and Saba' }, + { label: 'Bosnia and Herzegovina' }, + { label: 'Botswana' }, + { label: 'Bouvet Island' }, + { label: 'Brazil' }, + { label: 'British Indian Ocean Territory' }, + { label: 'Brunei Darussalam' }, +].map(suggestion => ({ + value: suggestion.label, + label: suggestion.label, +})); + +const useStyles = makeStyles(theme => ({ + root: { + flexGrow: 1, + height: 250, + }, + input: { + display: 'flex', + padding: 0, + height: 'auto', + }, + valueContainer: { + display: 'flex', + flexWrap: 'wrap', + flex: 1, + alignItems: 'center', + overflow: 'hidden', + }, + chip: { + margin: theme.spacing(0.5, 0.25), + }, + chipFocused: { + backgroundColor: emphasize( + theme.palette.type === 'light' ? theme.palette.grey[300] : theme.palette.grey[700], + 0.08, + ), + }, + noOptionsMessage: { + padding: theme.spacing(1, 2), + }, + singleValue: { + fontSize: 16, + }, + placeholder: { + position: 'absolute', + left: 8, + bottom: 6, + fontSize: 16, + }, + paper: { + position: 'absolute', + zIndex: 1, + marginTop: theme.spacing(1), + left: 0, + right: 0, + }, +})); + +function NoOptionsMessage(props) { + const { selectProps, innerProps, children } = props; + return ( + + {children} + + ); +} + +NoOptionsMessage.propTypes = { + children: PropTypes.node, + innerProps: PropTypes.object, + selectProps: PropTypes.object.isRequired, +}; + +NoOptionsMessage.defaultProps = { + children: null, + innerProps: null +}; + +function inputComponent({ inputRef, ...props }) { + return
; +} + +inputComponent.propTypes = { + inputRef: PropTypes.oneOfType([PropTypes.func, PropTypes.object]), +}; + +inputComponent.defaultProps = { + inputRef: undefined +}; + +function Control(props) { + const { + children, + innerProps, + innerRef, + selectProps: { classes, TextFieldProps }, + } = props; + + return ( + + ); +} + +Control.propTypes = { + children: PropTypes.node, + innerProps: PropTypes.object, + innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.object]), + selectProps: PropTypes.object.isRequired, +}; + +Control.defaultProps = { + children: null, + innerProps: null, + innerRef: undefined +}; + +function Option(props) { + const { + innerRef, + isFocused, + isSelected, + innerProps, + children + } = props; + return ( + + {children} + + ); +} + +Option.propTypes = { + children: PropTypes.node, + innerProps: PropTypes.object, + innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.object]), + isFocused: PropTypes.bool, + isSelected: PropTypes.bool, +}; + +Option.defaultProps = { + children: null, + innerProps: null, + innerRef: undefined, + isFocused: false, + isSelected: false +}; + +function Placeholder(props) { + const { selectProps, innerProps, children } = props; + return ( + + {children} + + ); +} + +Placeholder.propTypes = { + children: PropTypes.node, + innerProps: PropTypes.object, + selectProps: PropTypes.object.isRequired, +}; + +Placeholder.defaultProps = { + children: null, + innerProps: null, +}; + +function SingleValue(props) { + const { selectProps, children, innerProps } = props; + return ( + + {children} + + ); +} + +SingleValue.propTypes = { + children: PropTypes.node, + innerProps: PropTypes.object, + selectProps: PropTypes.object.isRequired, +}; + +SingleValue.defaultProps = { + children: null, + innerProps: null, +}; + +function ValueContainer(props) { + const { selectProps, children } = props; + return
{children}
; +} + +ValueContainer.propTypes = { + children: PropTypes.node, + selectProps: PropTypes.object.isRequired, +}; + +ValueContainer.defaultProps = { + children: null, +}; + +function MultiValue(props) { + const { + children, + selectProps, + removeProps, + isFocused + } = props; + return ( + } + /> + ); +} + +MultiValue.propTypes = { + children: PropTypes.node, + isFocused: PropTypes.bool, + removeProps: PropTypes.object.isRequired, + selectProps: PropTypes.object.isRequired, +}; + +MultiValue.defaultProps = { + children: null, + isFocused: false, +}; + +function Menu(props) { + const { selectProps, innerProps, children } = props; + return ( + + {children} + + ); +} + +Menu.propTypes = { + children: PropTypes.node, + innerProps: PropTypes.object, + selectProps: PropTypes.object, +}; + +Menu.defaultProps = { + children: null, + innerProps: null, + selectProps: null, +}; + +const components = { + Control, + Menu, + MultiValue, + NoOptionsMessage, + Option, + Placeholder, + SingleValue, + ValueContainer, +}; + +export default function SelectSuggestions() { + const classes = useStyles(); + const theme = useTheme(); + const [multi, setMulti] = React.useState(null); + + function handleChangeMulti(value) { + setMulti(value); + } + + const selectStyles = { + input: base => ({ + ...base, + color: theme.palette.text.primary, + '& input': { + font: 'inherit', + }, + }), + }; + + return ( +
+ + + +
+ ); +} diff --git a/front/odiparpack/app/containers/Forms/demos/SimpleSelectbox.js b/front/odiparpack/app/containers/Forms/demos/SimpleSelectbox.js new file mode 100644 index 0000000..eb7bd0a --- /dev/null +++ b/front/odiparpack/app/containers/Forms/demos/SimpleSelectbox.js @@ -0,0 +1,180 @@ +import React, { Fragment, PureComponent } from 'react'; +import PropTypes from 'prop-types'; + +import { withStyles } from '@material-ui/core/styles'; + +import { Input, InputLabel, MenuItem, FormControl, FormHelperText, Select } from '@material-ui/core'; + +const styles = theme => ({ + demo: { + height: 'auto', + }, + divider: { + display: 'block', + margin: `${theme.spacing(3)}px 0`, + }, + field: { + margin: `${theme.spacing(3)}px 5px`, + }, + root: { + display: 'flex', + flexWrap: 'wrap', + }, + formControl: { + margin: theme.spacing(1), + minWidth: 120, + }, + selectEmpty: { + marginTop: theme.spacing(2), + }, +}); + +class SimpleSelectbox extends PureComponent { + state = { + age: '', + name: 'hai', + }; + + handleChange = event => { + this.setState({ [event.target.name]: event.target.value }); + }; + + render() { + const { classes } = this.props; + return ( + +
+ + Age + + + + Age + + Some important helper text + + + + Without label + + + Name + + Disabled + + + Name + } + > + + None + + Hai + Olivier + Kevin + + Error + + + Name + + Alignment with an input + + + Name + + Read only + + + Age + + Auto width + +
+
+ ); + } +} + +SimpleSelectbox.propTypes = { + classes: PropTypes.object.isRequired, +}; + +export default withStyles(styles)(SimpleSelectbox); diff --git a/front/odiparpack/app/containers/Forms/demos/SliderInput.js b/front/odiparpack/app/containers/Forms/demos/SliderInput.js new file mode 100644 index 0000000..d0513ed --- /dev/null +++ b/front/odiparpack/app/containers/Forms/demos/SliderInput.js @@ -0,0 +1,104 @@ +import React, { Fragment, PureComponent } from 'react'; +import PropTypes from 'prop-types'; +import InputRange from 'react-input-range'; +import { withStyles } from '@material-ui/core/styles'; +import 'ba-styles/vendors/react-input-range/react-input-range.css'; + +import { FormControl, Typography, Grid } from '@material-ui/core'; + +const styles = theme => ({ + demo: { + height: 'auto', + }, + divider: { + display: 'block', + margin: `${theme.spacing(3)}px 0`, + }, + inputRange: { + width: 200, + margin: `${theme.spacing(3)}px 5px`, + } +}); + +class SliderInput extends PureComponent { + state = { + value: 10, + valueDisabled: 5, + valueDecimal: 16, + } + + render() { + const { classes } = this.props; + return ( + + + + Slider Input Basic + +
+ this.setState({ value })} + /> +
+
+
+ + Slider Input Disabled + +
+ this.setState({ valueDisabled: value })} + /> +
+
+
+ + Formated Value + +
+ value.toFixed(2)} + value={this.state.valueDecimal} + onChange={value => this.setState({ valueDecimal: value })} + /> +
+
+
+
+
+ ); + } +} + +SliderInput.propTypes = { + classes: PropTypes.object.isRequired, +}; + +export default withStyles(styles)(SliderInput); diff --git a/front/odiparpack/app/containers/Forms/demos/StandardButtons.js b/front/odiparpack/app/containers/Forms/demos/StandardButtons.js new file mode 100644 index 0000000..d88c004 --- /dev/null +++ b/front/odiparpack/app/containers/Forms/demos/StandardButtons.js @@ -0,0 +1,223 @@ +import React, { Fragment, PureComponent } from 'react'; +import PropTypes from 'prop-types'; +import classNames from 'classnames'; +import { withStyles } from '@material-ui/core/styles'; +import DeleteIcon from '@material-ui/icons/Delete'; +import AddShoppingCartIcon from '@material-ui/icons/AddShoppingCart'; +import PhotoCamera from '@material-ui/icons/PhotoCamera'; +import FileUpload from '@material-ui/icons/CloudUpload'; +import KeyboardVoice from '@material-ui/icons/KeyboardVoice'; +import Save from '@material-ui/icons/Save'; + +import { Button, Typography, Grid, Icon, IconButton } from '@material-ui/core'; + +const styles = theme => ({ + demo: { + height: 'auto', + }, + divider: { + display: 'block', + margin: `${theme.spacing(3)}px 0`, + }, + field: { + margin: `${theme.spacing(3)}px 5px`, + }, + button: { + margin: theme.spacing(1), + }, + inputUpload: { + display: 'none', + }, + leftIcon: { + marginRight: theme.spacing(1), + }, + rightIcon: { + marginLeft: theme.spacing(1), + }, + iconSmall: { + fontSize: 20, + }, +}); + +function doSomething(event) { + alert(event.currentTarget.getAttribute('data-something')); +} + +class StandardButtons extends PureComponent { + render() { + const { classes } = this.props; + return ( + + + + Flat Button + + Flat buttons are text-only buttons. They may be used in dialogs, toolbars, or inline. They do not lift, but fill with color on press. + + + + + + + + + + + Raised Button + + Raised buttons are rectangular-shaped buttons. They may be used inline. They lift and display ink reactions on press. + + + + + + + + + + Outline Button + + + + + + + + + + Icon Button + + Icon buttons are commonly found in app bars and toolbars. + + + + + + + + + alarm + + + + + + + + + Icon Raised Button + + Icon buttons are commonly found in app bars and toolbars. + + + + + + + + + + ); + } +} + +StandardButtons.propTypes = { + classes: PropTypes.object.isRequired, +}; + +export default withStyles(styles)(StandardButtons); diff --git a/front/odiparpack/app/containers/Forms/demos/SwitchesInput.js b/front/odiparpack/app/containers/Forms/demos/SwitchesInput.js new file mode 100644 index 0000000..3c10803 --- /dev/null +++ b/front/odiparpack/app/containers/Forms/demos/SwitchesInput.js @@ -0,0 +1,210 @@ +import React, { Fragment, PureComponent } from 'react'; +import PropTypes from 'prop-types'; +import { withStyles } from '@material-ui/core/styles'; +import { green } from '@material-ui/core/colors'; + +import { + Switch, + Typography, + Grid, + FormControl, + FormLabel, + FormControlLabel, + FormGroup, + FormHelperText, +} from '@material-ui/core'; + +const styles = theme => ({ + demo: { + height: 'auto', + }, + divider: { + display: 'block', + margin: `${theme.spacing(3)}px 0`, + }, + field: { + margin: `${theme.spacing(3)}px 5px`, + }, + formControl: { + margin: theme.spacing(3), + }, + group: { + margin: `${theme.spacing(1)}px 0`, + }, + switchBase: { + color: green[50], + '&$checked': { + color: green[500], + '& + $bar': { + backgroundColor: green[500], + }, + }, + }, + bar: {}, + checked: {}, + size: { + width: 40, + height: 40, + }, + sizeIcon: { + fontSize: 20, + }, +}); + +class RadioButton extends PureComponent { + state = { + checkedA: true, + checkedB: true, + checkedF: true, + gilad: true, + jason: false, + antoine: true, + }; + + handleChange = name => event => { + this.setState({ [name]: event.target.checked }); + }; + + render() { + const { classes } = this.props; + return ( + + + + Basic usage +
+ + + + + + +
+
+ + Switch with label + Switch can also be used with a label description thanks to the FormControlLabel component. +
+ + + )} + label="Secondary" + /> + + )} + label="Primary" + /> + } label="Uncontrolled" /> + } label="Disabled" /> + } label="Disabled" /> + + )} + label="Custom color" + /> + +
+
+ + Switch in Form Group + FormGroup is a helpful wrapper used to group selection controls components that provides an easier API. However, we encourage you to use a Checkbox instead. +
+ + Assign responsibility + + + )} + label="Gilad Gray" + /> + + )} + label="Jason Killian" + /> + + )} + label="Antoine Llorca" + /> + + Be careful + +
+
+
+
+ ); + } +} + +RadioButton.propTypes = { + classes: PropTypes.object.isRequired, +}; + +export default withStyles(styles)(RadioButton); diff --git a/front/odiparpack/app/containers/Forms/demos/TagSuggestions.js b/front/odiparpack/app/containers/Forms/demos/TagSuggestions.js new file mode 100644 index 0000000..1648fc3 --- /dev/null +++ b/front/odiparpack/app/containers/Forms/demos/TagSuggestions.js @@ -0,0 +1,249 @@ +import React from 'react'; +import PropTypes from 'prop-types'; +import keycode from 'keycode'; +import Downshift from 'downshift'; +import { withStyles } from '@material-ui/core/styles'; +import { TextField, Paper, MenuItem, Chip } from '@material-ui/core'; + +const suggestions = [ + { label: 'Afghanistan' }, + { label: 'Aland Islands' }, + { label: 'Albania' }, + { label: 'Algeria' }, + { label: 'American Samoa' }, + { label: 'Andorra' }, + { label: 'Angola' }, + { label: 'Anguilla' }, + { label: 'Antarctica' }, + { label: 'Antigua and Barbuda' }, + { label: 'Argentina' }, + { label: 'Armenia' }, + { label: 'Aruba' }, + { label: 'Australia' }, + { label: 'Austria' }, + { label: 'Azerbaijan' }, + { label: 'Bahamas' }, + { label: 'Bahrain' }, + { label: 'Bangladesh' }, + { label: 'Barbados' }, + { label: 'Belarus' }, + { label: 'Belgium' }, + { label: 'Belize' }, + { label: 'Benin' }, + { label: 'Bermuda' }, + { label: 'Bhutan' }, + { label: 'Bolivia, Plurinational State of' }, + { label: 'Bonaire, Sint Eustatius and Saba' }, + { label: 'Bosnia and Herzegovina' }, + { label: 'Botswana' }, + { label: 'Bouvet Island' }, + { label: 'Brazil' }, + { label: 'British Indian Ocean Territory' }, + { label: 'Brunei Darussalam' }, +]; + +function renderInput(inputProps) { + const { + InputProps, + classes, + ref, + ...other + } = inputProps; + + return ( + + ); +} + +function renderSuggestion({ + suggestion, + index, + itemProps, + highlightedIndex, + selectedItem +}) { + const isHighlighted = highlightedIndex === index; + const isSelected = (selectedItem || '').indexOf(suggestion.label) > -1; + + return ( + + {suggestion.label} + + ); +} + +renderSuggestion.propTypes = { + highlightedIndex: PropTypes.number.isRequired, + index: PropTypes.number.isRequired, + itemProps: PropTypes.object.isRequired, + selectedItem: PropTypes.string.isRequired, + suggestion: PropTypes.shape({ label: PropTypes.string }).isRequired, +}; + +function getSuggestions(inputValue) { + let count = 0; + + return suggestions.filter(suggestion => { + const keep = (!inputValue || suggestion.label.toLowerCase().indexOf(inputValue.toLowerCase()) !== -1) + && count < 5; + + if (keep) { + count += 1; + } + + return keep; + }); +} + +class DownshiftMultiple extends React.Component { + state = { + inputValue: '', + selectedItem: [], + }; + + handleKeyDown = event => { + const { inputValue, selectedItem } = this.state; + if (selectedItem.length && !inputValue.length && keycode(event) === 'backspace') { + this.setState({ + selectedItem: selectedItem.slice(0, selectedItem.length - 1), + }); + } + }; + + handleInputChange = event => { + this.setState({ inputValue: event.target.value }); + }; + + handleChange = item => { + let { selectedItem } = this.state; + + if (selectedItem.indexOf(item) === -1) { + selectedItem = [...selectedItem, item]; + } + + this.setState({ + inputValue: '', + selectedItem, + }); + }; + + handleDelete = item => () => { + const selectedItem = [...this.state.selectedItem]; + selectedItem.splice(selectedItem.indexOf(item), 1); + + this.setState({ selectedItem }); + }; + + render() { + const { classes } = this.props; + const { inputValue, selectedItem } = this.state; + + return ( + + {({ + getInputProps, + getItemProps, + isOpen, + inputValue: inputValue2, + selectedItem: selectedItem2, + highlightedIndex, + }) => ( +
+ {renderInput({ + fullWidth: true, + classes, + InputProps: getInputProps({ + startAdornment: selectedItem.map(item => ( + + )), + onChange: this.handleInputChange, + onKeyDown: this.handleKeyDown, + placeholder: 'Select multiple countries', + id: 'integration-downshift-multiple', + }), + })} + {isOpen ? ( + + {getSuggestions(inputValue2).map((suggestion, index) => renderSuggestion({ + suggestion, + index, + itemProps: getItemProps({ item: suggestion.label }), + highlightedIndex, + selectedItem: selectedItem2, + }), + )} + + ) : null} +
+ )} +
+ ); + } +} + +DownshiftMultiple.propTypes = { + classes: PropTypes.object.isRequired, +}; + +const styles = theme => ({ + root: { + flexGrow: 1, + height: 100, + }, + container: { + flexGrow: 1, + position: 'relative', + }, + paper: { + position: 'absolute', + zIndex: 1, + marginTop: theme.spacing(1), + left: 0, + right: 0, + }, + chip: { + margin: `${theme.spacing(0.5)}px ${theme.spacing(0.25)}px`, + }, + inputRoot: { + flexWrap: 'wrap', + }, +}); + +function TagSuggestions(props) { + const { classes } = props; + + return ( +
+ +
+ ); +} + +TagSuggestions.propTypes = { + classes: PropTypes.object.isRequired, +}; + +export default withStyles(styles)(TagSuggestions); diff --git a/front/odiparpack/app/containers/Forms/demos/TextFields.js b/front/odiparpack/app/containers/Forms/demos/TextFields.js new file mode 100644 index 0000000..b408284 --- /dev/null +++ b/front/odiparpack/app/containers/Forms/demos/TextFields.js @@ -0,0 +1,124 @@ +import React, { Fragment, PureComponent } from 'react'; +import PropTypes from 'prop-types'; +import { withStyles } from '@material-ui/core/styles'; +import { Typography, Grid, Input, InputLabel, FormControl, FormHelperText } from '@material-ui/core'; + +const styles = theme => ({ + demo: { + height: 'auto', + }, + divider: { + display: 'block', + margin: `${theme.spacing(3)}px 0`, + }, + input: { + margin: theme.spacing(3), + }, + container: { + display: 'flex', + flexWrap: 'wrap', + }, + formControl: { + margin: theme.spacing(3), + }, +}); + +class TextFields extends PureComponent { + state = { + name: 'Composed TextField', + }; + + handleChange = event => { + this.setState({ name: event.target.value }); + }; + + render() { + const { classes } = this.props; + return ( + + + + Textfield Components + TextField is composed of smaller components that you can leverage directly to significantly customize your form inputs. +
+ + Name + + + + Name + + Some important helper text + + + Name + + Disabled + + + Name + + Error + +
+
+ + Input State +
+ + + + +
+
+
+
+ ); + } +} + +TextFields.propTypes = { + classes: PropTypes.object.isRequired, +}; + +export default withStyles(styles)(TextFields); diff --git a/front/odiparpack/app/containers/Forms/demos/TextFieldsLayout.js b/front/odiparpack/app/containers/Forms/demos/TextFieldsLayout.js new file mode 100644 index 0000000..27809f4 --- /dev/null +++ b/front/odiparpack/app/containers/Forms/demos/TextFieldsLayout.js @@ -0,0 +1,174 @@ +import React, { Fragment, PureComponent } from 'react'; +import PropTypes from 'prop-types'; +import { withStyles, MuiThemeProvider, createMuiTheme } from '@material-ui/core/styles'; +import { purple, green } from '@material-ui/core/colors'; + +import { Typography, Grid, Input, InputLabel, TextField, FormControl } from '@material-ui/core'; + +const styles = theme => ({ + demo: { + height: 'auto', + }, + divider: { + display: 'block', + margin: `${theme.spacing(3)}px 0`, + lineHeight: '24px' + }, + input: { + margin: theme.spacing(3), + }, + margin: { + margin: theme.spacing(1), + }, + container: { + display: 'flex', + flexWrap: 'wrap', + }, + textField: { + margin: `${theme.spacing(2)}px ${theme.spacing(1)}px`, + width: 200, + }, + cssLabel: { + '&$cssFocused': { + color: purple[500], + }, + }, + cssFocused: {}, + cssUnderline: { + '&:after': { + backgroundColor: purple[500], + }, + }, + bootstrapRoot: { + padding: 0, + 'label + &': { + marginTop: theme.spacing(3), + }, + }, + bootstrapInput: { + borderRadius: 4, + backgroundColor: theme.palette.common.white, + border: '1px solid #ced4da', + fontSize: 16, + padding: '10px 12px', + width: 'calc(100% - 24px)', + transition: theme.transitions.create(['border-color', 'box-shadow']), + '&:focus': { + borderColor: '#80bdff', + boxShadow: '0 0 0 0.2rem rgba(0,123,255,.25)', + }, + }, + bootstrapFormLabel: { + fontSize: 18, + }, +}); + +const theme = createMuiTheme({ + palette: { + primary: green, + }, +}); + +class TextFields extends PureComponent { + render() { + const { classes } = this.props; + return ( + + + + Layout + TextField, FormControl allow the specification of margin to alter the vertical spacing of inputs. Using none (default) will not apply margins to the FormControl, whereas dense and normal will as well as alter other styles to meet the specification. +
+ + + +
+
+ + Customized Designs + Here is an example of how you can change the main color of an Input. +
+ + + Custom CSS + + + + + + + +
+
+
+
+ ); + } +} + +TextFields.propTypes = { + classes: PropTypes.object.isRequired, +}; + +export default withStyles(styles)(TextFields); diff --git a/front/odiparpack/app/containers/Forms/demos/TimeInput.js b/front/odiparpack/app/containers/Forms/demos/TimeInput.js new file mode 100644 index 0000000..d8ed35b --- /dev/null +++ b/front/odiparpack/app/containers/Forms/demos/TimeInput.js @@ -0,0 +1,124 @@ +import React, { Fragment, PureComponent } from 'react'; +import { TimePicker, KeyboardDatePicker, MuiPickersUtilsProvider } from '@material-ui/pickers'; +import MomentUtils from '@date-io/moment'; +import PropTypes from 'prop-types'; +import { withStyles } from '@material-ui/core/styles'; +import { Typography, Grid, InputAdornment, Icon, IconButton } from '@material-ui/core'; + +const styles = theme => ({ + demo: { + height: 'auto', + }, + divider: { + display: 'block', + margin: `${theme.spacing(3)}px 0`, + }, + picker: { + margin: `${theme.spacing(3)}px 5px`, + } +}); + +class TimeInput extends PureComponent { + state = { + selectedDate: new Date(), + } + + handleDateChange = (date) => { + this.setState({ selectedDate: date }); + } + + render() { + const { selectedDate } = this.state; + const { classes } = this.props; + return ( + + + + Basic usage + + A time picker should adjusts to a user’s preferred time setting, i.e. the 12-hour or 24-hour format. + +
+ +
+ +
+
+
+ +
+ + + +
+
+ + Keyboard Input +
+ + + +
+ Custom Icon +
+ + + + access_time + + + ), + }} + /> + +
+
+
+
+ ); + } +} + +TimeInput.propTypes = { + classes: PropTypes.object.isRequired, +}; + +export default withStyles(styles)(TimeInput); diff --git a/front/odiparpack/app/containers/Forms/demos/UploadInputAll.js b/front/odiparpack/app/containers/Forms/demos/UploadInputAll.js new file mode 100644 index 0000000..22ae742 --- /dev/null +++ b/front/odiparpack/app/containers/Forms/demos/UploadInputAll.js @@ -0,0 +1,31 @@ +import React, { Fragment } from 'react'; +import { MaterialDropZone } from 'ba-components'; + +class UploadInputAll extends React.Component { + constructor(props) { + super(props); + + this.state = { + files: [], + }; + } + + render() { + const { files } = this.state; + return ( + +
+ +
+
+ ); + } +} + +export default UploadInputAll; diff --git a/front/odiparpack/app/containers/Forms/demos/UploadInputBtn.js b/front/odiparpack/app/containers/Forms/demos/UploadInputBtn.js new file mode 100644 index 0000000..959ee85 --- /dev/null +++ b/front/odiparpack/app/containers/Forms/demos/UploadInputBtn.js @@ -0,0 +1,32 @@ +import React, { Fragment } from 'react'; +import { MaterialDropZone } from 'ba-components'; + +class UploadInputBtn extends React.Component { + constructor(props) { + super(props); + + this.state = { + files: [], + }; + } + + render() { + const { files } = this.state; + return ( + +
+ +
+
+ ); + } +} + +export default UploadInputBtn; diff --git a/front/odiparpack/app/containers/Forms/demos/UploadInputImg.js b/front/odiparpack/app/containers/Forms/demos/UploadInputImg.js new file mode 100644 index 0000000..3600f37 --- /dev/null +++ b/front/odiparpack/app/containers/Forms/demos/UploadInputImg.js @@ -0,0 +1,32 @@ +import React, { Fragment } from 'react'; +import { MaterialDropZone } from 'ba-components'; + +class UploadInputImg extends React.Component { + constructor(props) { + super(props); + + this.state = { + files: [], + }; + } + + render() { + const { files } = this.state; + return ( + +
+ +
+
+ ); + } +} + +export default UploadInputImg; diff --git a/front/odiparpack/app/containers/Forms/demos/Wysiwyg.js b/front/odiparpack/app/containers/Forms/demos/Wysiwyg.js new file mode 100644 index 0000000..61c64a8 --- /dev/null +++ b/front/odiparpack/app/containers/Forms/demos/Wysiwyg.js @@ -0,0 +1,91 @@ +import React, { Fragment, PureComponent } from 'react'; +import { convertFromRaw, EditorState, convertToRaw } from 'draft-js'; +import { Editor } from 'react-draft-wysiwyg'; +import draftToHtml from 'draftjs-to-html'; +import draftToMarkdown from 'draftjs-to-markdown'; +import EditorStyle from 'ba-styles/TextEditor.scss'; +import 'ba-styles/vendors/react-draft-wysiwyg/react-draft-wysiwyg.css'; + +import { Grid, Typography } from '@material-ui/core'; + +const content = { + blocks: [{ + key: '637gr', + text: 'Lorem ipsum dolor sit amet 😀', + type: 'unstyled', + depth: 0, + inlineStyleRanges: [], + entityRanges: [], + data: {} + }], + entityMap: {} +}; + +class Wysiwyg extends PureComponent { + constructor(props) { + super(props); + const contentBlock = convertFromRaw(content); + if (contentBlock) { + const editorState = EditorState.createWithContent(contentBlock); + this.state = { + editorState, + }; + } + } + + onEditorStateChange = editorState => { + this.setState({ + editorState, + }); + }; + + render() { + const { editorState } = this.state; + return ( + + + + + + + JSON Result : +