@mailstep/design-system 0.6.2-beta.7 → 0.6.2-beta.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +6 -6
- package/ui/Blocks/CommonGrid/CommonGrid.js +38 -33
- package/ui/Blocks/CommonGrid/CommonGridContainer.js +33 -28
- package/ui/Blocks/CommonGrid/HoC/withReduxActions.js +10 -8
- package/ui/Blocks/CommonGrid/StandardButtons.js +20 -11
- package/ui/Blocks/CommonGrid/components/ActionHead/ActionHead.js +26 -21
- package/ui/Blocks/CommonGrid/components/ActionHead/components/ActionDropdownMenu.js +13 -8
- package/ui/Blocks/CommonGrid/components/ActionHead/components/ActionDropdownSelect.js +48 -20
- package/ui/Blocks/CommonGrid/components/ActionHead/index.js +7 -2
- package/ui/Blocks/CommonGrid/components/BooleanSelect/BooleanSelect.js +15 -10
- package/ui/Blocks/CommonGrid/components/BooleanSelect/index.js +7 -2
- package/ui/Blocks/CommonGrid/components/ButtonMore/ButtonMore.js +19 -14
- package/ui/Blocks/CommonGrid/components/ButtonMore/index.js +7 -2
- package/ui/Blocks/CommonGrid/components/ColumnFilterCell.js +22 -17
- package/ui/Blocks/CommonGrid/components/ColumnTitle/ColumnTitle.js +50 -22
- package/ui/Blocks/CommonGrid/components/ColumnTitle/index.js +7 -2
- package/ui/Blocks/CommonGrid/components/ColumnTitle.js +13 -8
- package/ui/Blocks/CommonGrid/components/ControlButtons/ControlButtons.js +38 -9
- package/ui/Blocks/CommonGrid/components/ControlButtons/index.js +7 -2
- package/ui/Blocks/CommonGrid/components/DataCell.js +18 -13
- package/ui/Blocks/CommonGrid/components/DataRow.js +35 -30
- package/ui/Blocks/CommonGrid/components/DatePickerRange/DatePickerRange.js +59 -31
- package/ui/Blocks/CommonGrid/components/DatePickerRange/index.js +7 -2
- package/ui/Blocks/CommonGrid/components/DatePickerRange/utils/sameDate.js +5 -1
- package/ui/Blocks/CommonGrid/components/ExtraControlButtons/ExtraControlButtons.js +41 -12
- package/ui/Blocks/CommonGrid/components/ExtraControlButtons/index.js +7 -2
- package/ui/Blocks/CommonGrid/components/FilterDropdown.js +13 -8
- package/ui/Blocks/CommonGrid/components/FilterRow.js +20 -15
- package/ui/Blocks/CommonGrid/components/FloatingButton/FloatingButton.js +23 -17
- package/ui/Blocks/CommonGrid/components/FloatingButton/index.js +7 -2
- package/ui/Blocks/CommonGrid/components/GridSelect/GridSelect.js +15 -10
- package/ui/Blocks/CommonGrid/components/GridSelect/index.js +7 -2
- package/ui/Blocks/CommonGrid/components/GroupRow.js +15 -10
- package/ui/Blocks/CommonGrid/components/HeadCell.js +19 -14
- package/ui/Blocks/CommonGrid/components/HeadRow.js +45 -17
- package/ui/Blocks/CommonGrid/components/IconList/IconList.js +18 -12
- package/ui/Blocks/CommonGrid/components/IconList/index.js +7 -2
- package/ui/Blocks/CommonGrid/components/ManageColumnForm/ManageColumnForm.js +14 -12
- package/ui/Blocks/CommonGrid/components/ManageColumnForm/components/ActionRow.js +24 -17
- package/ui/Blocks/CommonGrid/components/ManageColumnForm/index.js +7 -2
- package/ui/Blocks/CommonGrid/components/NumberRange/NumberRange.js +28 -23
- package/ui/Blocks/CommonGrid/components/NumberRange/index.js +7 -2
- package/ui/Blocks/CommonGrid/components/NumberRange/types.js +2 -1
- package/ui/Blocks/CommonGrid/components/OversizedScroll.js +39 -11
- package/ui/Blocks/CommonGrid/components/ReadEditButtonCell/ReadEditButtonCell.js +12 -10
- package/ui/Blocks/CommonGrid/components/ReadEditButtonCell/index.js +7 -2
- package/ui/Blocks/CommonGrid/components/Resize.js +12 -7
- package/ui/Blocks/CommonGrid/components/Table.js +37 -9
- package/ui/Blocks/CommonGrid/components/TablePagination/TablePagination.js +40 -12
- package/ui/Blocks/CommonGrid/components/TablePagination/index.js +7 -2
- package/ui/Blocks/CommonGrid/components/TextRange/TextRange.js +36 -30
- package/ui/Blocks/CommonGrid/components/TextRange/index.js +7 -2
- package/ui/Blocks/CommonGrid/components/TextRange/types.js +2 -1
- package/ui/Blocks/CommonGrid/components/gridCells/BoolIcon.js +41 -12
- package/ui/Blocks/CommonGrid/components/gridCells/ButtonInCell.js +11 -4
- package/ui/Blocks/CommonGrid/components/gridCells/Date.js +13 -6
- package/ui/Blocks/CommonGrid/components/gridCells/DateTime.js +13 -6
- package/ui/Blocks/CommonGrid/components/gridCells/EnumInCell.js +16 -9
- package/ui/Blocks/CommonGrid/components/gridCells/HoverBubble.js +15 -8
- package/ui/Blocks/CommonGrid/components/gridCells/IconButtonInCell.js +15 -8
- package/ui/Blocks/CommonGrid/components/gridCells/ImageCell.js +16 -9
- package/ui/Blocks/CommonGrid/components/gridCells/LinkInCell.js +9 -3
- package/ui/Blocks/CommonGrid/components/gridCells/RemoveItem.js +18 -11
- package/ui/Blocks/CommonGrid/components/gridCells/RowActionsCell.js +20 -13
- package/ui/Blocks/CommonGrid/components/gridCells/StringJoin.js +12 -5
- package/ui/Blocks/CommonGrid/components/gridCells/SwitchInCell.js +11 -4
- package/ui/Blocks/CommonGrid/components/gridCells/ToggleCell.js +40 -10
- package/ui/Blocks/CommonGrid/components/gridCells/index.js +31 -14
- package/ui/Blocks/CommonGrid/components/icons/Edit.js +5 -3
- package/ui/Blocks/CommonGrid/components/icons/EyeOpen.js +5 -3
- package/ui/Blocks/CommonGrid/components/icons/Sorting.js +8 -3
- package/ui/Blocks/CommonGrid/components/utils.js +7 -3
- package/ui/Blocks/CommonGrid/hooks/useAddFilter.js +10 -6
- package/ui/Blocks/CommonGrid/hooks/useColumnSizes.js +18 -13
- package/ui/Blocks/CommonGrid/hooks/useEditReadAsColumn.js +12 -7
- package/ui/Blocks/CommonGrid/hooks/useFloatingButton.js +5 -3
- package/ui/Blocks/CommonGrid/hooks/useGetGridHeight.js +11 -9
- package/ui/Blocks/CommonGrid/hooks/useGridActionTrigger.js +14 -7
- package/ui/Blocks/CommonGrid/hooks/useManageColumn.js +8 -6
- package/ui/Blocks/CommonGrid/hooks/useRowsKeyControls.js +8 -3
- package/ui/Blocks/CommonGrid/hooks/useToggleAllCheckbox.js +8 -4
- package/ui/Blocks/CommonGrid/hooks/useUxReset.js +9 -4
- package/ui/Blocks/CommonGrid/index.js +51 -10
- package/ui/Blocks/CommonGrid/store/index.js +86 -77
- package/ui/Blocks/CommonGrid/store/migrateState.js +3 -1
- package/ui/Blocks/CommonGrid/storybook/stories/complexWithPaginationAndRedux.stories.js +24 -17
- package/ui/Blocks/CommonGrid/storybook/stories/default.stories.js +19 -12
- package/ui/Blocks/CommonGrid/storybook/stories/loading.stories.js +15 -8
- package/ui/Blocks/CommonGrid/storybook/stories/manyColumnsNoScrollLayout.stories.js +15 -8
- package/ui/Blocks/CommonGrid/storybook/stories/manyColumnsNormalLayout.stories.js +15 -8
- package/ui/Blocks/CommonGrid/storybook/stories/styledCommonGrid.stories.js +19 -12
- package/ui/Blocks/CommonGrid/storybook/stories/withCustomGridActions.stories.js +17 -10
- package/ui/Blocks/CommonGrid/storybook/stories/withForcedCheckboxes.stories.js +19 -12
- package/ui/Blocks/CommonGrid/storybook/utils/actions.js +11 -4
- package/ui/Blocks/CommonGrid/storybook/utils/columnDefinition.js +17 -11
- package/ui/Blocks/CommonGrid/storybook/utils/linguiContainer.js +10 -6
- package/ui/Blocks/CommonGrid/storybook/utils/utils.js +35 -26
- package/ui/Blocks/CommonGrid/storybook/utils/withRedux.js +17 -10
- package/ui/Blocks/CommonGrid/storybook/utils/withRouter.js +6 -4
- package/ui/Blocks/CommonGrid/storybook/utils/withTheme.js +3 -1
- package/ui/Blocks/CommonGrid/styles.js +39 -10
- package/ui/Blocks/CommonGrid/translations.js +5 -3
- package/ui/Blocks/CommonGrid/types.js +6 -3
- package/ui/Blocks/CommonGrid/utils/index.js +40 -23
- package/ui/Blocks/CornerDialog/CornerDialog.js +15 -11
- package/ui/Blocks/CornerDialog/index.js +4 -2
- package/ui/Blocks/CornerDialog/stories/CornerDialog.stories.js +10 -7
- package/ui/Blocks/CornerDialog/styles.js +35 -9
- package/ui/Blocks/CornerDialog/types.js +2 -1
- package/ui/Blocks/CornerDialog/utils.js +5 -2
- package/ui/Blocks/HidePrint/HidePrint.js +10 -5
- package/ui/Blocks/ImageList/ImageList.js +42 -15
- package/ui/Blocks/ImageList/components/AddPhoto/index.js +11 -7
- package/ui/Blocks/ImageList/components/AddPhoto/styles.js +29 -3
- package/ui/Blocks/ImageList/components/CloseButton/index.js +9 -5
- package/ui/Blocks/ImageList/components/CloseButton/styles.js +29 -3
- package/ui/Blocks/ImageList/components/ImageElement/index.js +11 -7
- package/ui/Blocks/ImageList/components/ImageElement/styles.js +29 -3
- package/ui/Blocks/ImageList/components/ImageTag/index.js +12 -5
- package/ui/Blocks/ImageList/components/ImageTag/styles.js +8 -2
- package/ui/Blocks/ImageList/index.js +4 -2
- package/ui/Blocks/ImageList/stories/ImageList.stories.js +9 -6
- package/ui/Blocks/ImageList/styles.js +8 -2
- package/ui/Blocks/ImageList/types.js +2 -1
- package/ui/Blocks/LightBox/LightBox.js +15 -8
- package/ui/Blocks/LightBox/hooks/useLightBox.js +9 -5
- package/ui/Blocks/LightBox/index.js +7 -3
- package/ui/Blocks/LightBox/stories/LightBox.stories.js +7 -4
- package/ui/Blocks/LightBox/styles.js +11 -5
- package/ui/Blocks/LightBox/types.js +2 -1
- package/ui/Blocks/Modal/Modal.js +20 -17
- package/ui/Blocks/Modal/hooks/useClickOutside.js +10 -6
- package/ui/Blocks/Modal/hooks/useModal.js +10 -6
- package/ui/Blocks/Modal/index.js +9 -4
- package/ui/Blocks/Modal/stories/Modal.stories.js +48 -42
- package/ui/Blocks/Modal/styles.js +46 -20
- package/ui/Blocks/Modal/types.js +2 -1
- package/ui/Blocks/Modal/utils.js +4 -1
- package/ui/Blocks/Popover/index.js +15 -10
- package/ui/Blocks/Tabs/TabContent.js +5 -1
- package/ui/Blocks/Tabs/Tabs.js +14 -10
- package/ui/Blocks/Tabs/hooks/useTabs.js +8 -4
- package/ui/Blocks/Tabs/index.js +9 -4
- package/ui/Blocks/Tabs/stories/Tabs.stories.js +9 -6
- package/ui/Blocks/Tabs/styles.js +34 -8
- package/ui/Blocks/Tabs/types.js +2 -1
- package/ui/Elements/Alert/Alert.js +12 -10
- package/ui/Elements/Alert/index.js +9 -3
- package/ui/Elements/Alert/stories/Alert.stories.js +14 -11
- package/ui/Elements/Alert/styles.js +20 -14
- package/ui/Elements/Alert/types.js +2 -1
- package/ui/Elements/Avatar/Avatar.js +14 -7
- package/ui/Elements/Avatar/index.js +7 -3
- package/ui/Elements/Avatar/stories/Avatar.stories.js +8 -5
- package/ui/Elements/Avatar/types.js +2 -1
- package/ui/Elements/Badge/Badge.js +38 -13
- package/ui/Elements/Badge/index.js +9 -3
- package/ui/Elements/Badge/stories/Badge.stories.js +11 -5
- package/ui/Elements/BorderedBox/BorderedBox.js +30 -5
- package/ui/Elements/BorderedBox/index.js +9 -3
- package/ui/Elements/BorderedBox/stories/BorderedBox.stories.js +7 -4
- package/ui/Elements/BorderedBox/types.js +2 -1
- package/ui/Elements/Button/Button.js +7 -5
- package/ui/Elements/Button/index.js +9 -3
- package/ui/Elements/Button/stories/Button.stories.js +16 -13
- package/ui/Elements/Button/styles.js +14 -8
- package/ui/Elements/Button/types.js +2 -1
- package/ui/Elements/Card/Card.js +20 -14
- package/ui/Elements/Card/index.js +12 -3
- package/ui/Elements/Card/stories/Card.stories.js +11 -8
- package/ui/Elements/Card/stories/CardComponent.stories.js +12 -6
- package/ui/Elements/Card/styles.js +38 -12
- package/ui/Elements/Card/types.js +2 -1
- package/ui/Elements/DatePicker/DatePicker.js +53 -25
- package/ui/Elements/DatePicker/Datetime/DateTime.js +31 -26
- package/ui/Elements/DatePicker/Datetime/components/Timepicker.js +47 -20
- package/ui/Elements/DatePicker/Datetime/components/ViewNavigation.js +6 -3
- package/ui/Elements/DatePicker/Datetime/types.js +2 -1
- package/ui/Elements/DatePicker/Datetime/views/DaysView.js +18 -13
- package/ui/Elements/DatePicker/Datetime/views/MonthsView.js +14 -9
- package/ui/Elements/DatePicker/Datetime/views/YearsView.js +14 -9
- package/ui/Elements/DatePicker/index.js +7 -2
- package/ui/Elements/DatePicker/styles.js +29 -3
- package/ui/Elements/Dropdown/Dropdown.js +15 -10
- package/ui/Elements/Dropdown/index.js +9 -3
- package/ui/Elements/Dropdown/stories/Dropdown.stories.js +10 -4
- package/ui/Elements/Dropdown/types.js +2 -1
- package/ui/Elements/DropdownMenu/DropdownMenu.js +15 -8
- package/ui/Elements/DropdownMenu/components/DefaultItem.js +32 -7
- package/ui/Elements/DropdownMenu/components/MenuItem.js +15 -10
- package/ui/Elements/DropdownMenu/components/MenuList.js +10 -5
- package/ui/Elements/DropdownMenu/index.js +5 -1
- package/ui/Elements/DropdownMenu/types.js +2 -1
- package/ui/Elements/DropdownSelect/DropdownSelect.js +50 -21
- package/ui/Elements/DropdownSelect/index.js +10 -3
- package/ui/Elements/ErrorMessage/ErrorMessage.js +34 -9
- package/ui/Elements/ErrorMessage/index.js +9 -3
- package/ui/Elements/ErrorMessage/stories/ErrorMessage.stories.js +11 -5
- package/ui/Elements/ErrorMessage/types.js +2 -1
- package/ui/Elements/HighlightBox/HighlightBox.js +38 -12
- package/ui/Elements/HighlightBox/index.js +7 -2
- package/ui/Elements/Icon/BadgeIcon.js +17 -10
- package/ui/Elements/Icon/Icon.js +245 -216
- package/ui/Elements/Icon/icons/AddPhoto.js +6 -2
- package/ui/Elements/Icon/icons/BarcodeScan.js +6 -2
- package/ui/Elements/Icon/icons/Box.js +6 -2
- package/ui/Elements/Icon/icons/Calendar.js +6 -2
- package/ui/Elements/Icon/icons/Cancel.js +6 -2
- package/ui/Elements/Icon/icons/CheckedBox.js +6 -2
- package/ui/Elements/Icon/icons/Company.js +6 -2
- package/ui/Elements/Icon/icons/Complaint.js +6 -2
- package/ui/Elements/Icon/icons/Consolidation.js +6 -2
- package/ui/Elements/Icon/icons/Dispatch.js +6 -2
- package/ui/Elements/Icon/icons/EmptyRack.js +6 -2
- package/ui/Elements/Icon/icons/Expeditions.js +6 -2
- package/ui/Elements/Icon/icons/FlagCZ.js +6 -2
- package/ui/Elements/Icon/icons/FlagEL.js +6 -2
- package/ui/Elements/Icon/icons/FlagESP.js +6 -2
- package/ui/Elements/Icon/icons/FlagITA.js +6 -2
- package/ui/Elements/Icon/icons/FlagRUS.js +6 -2
- package/ui/Elements/Icon/icons/FlagSVK.js +6 -2
- package/ui/Elements/Icon/icons/FlagUSA.js +6 -2
- package/ui/Elements/Icon/icons/Gift.js +6 -2
- package/ui/Elements/Icon/icons/Group.js +6 -2
- package/ui/Elements/Icon/icons/HamburgerMenu.js +6 -2
- package/ui/Elements/Icon/icons/HelpCircle1.js +6 -2
- package/ui/Elements/Icon/icons/ImagePlaceholder.js +6 -2
- package/ui/Elements/Icon/icons/Income.js +6 -2
- package/ui/Elements/Icon/icons/Info.js +6 -2
- package/ui/Elements/Icon/icons/Integrations.js +6 -2
- package/ui/Elements/Icon/icons/Inventory.js +6 -2
- package/ui/Elements/Icon/icons/Inventory2.js +6 -2
- package/ui/Elements/Icon/icons/Link.js +6 -2
- package/ui/Elements/Icon/icons/Location.js +6 -2
- package/ui/Elements/Icon/icons/Logout1.js +6 -2
- package/ui/Elements/Icon/icons/MakePhoto.js +6 -2
- package/ui/Elements/Icon/icons/MenuItems.js +6 -2
- package/ui/Elements/Icon/icons/MobileCancel.js +6 -2
- package/ui/Elements/Icon/icons/Notification2.js +6 -2
- package/ui/Elements/Icon/icons/OpenBox.js +6 -2
- package/ui/Elements/Icon/icons/Plus1.js +6 -2
- package/ui/Elements/Icon/icons/Print.js +6 -2
- package/ui/Elements/Icon/icons/Product.js +6 -2
- package/ui/Elements/Icon/icons/Products.js +6 -2
- package/ui/Elements/Icon/icons/Profile.js +6 -2
- package/ui/Elements/Icon/icons/Puzzle1.js +6 -2
- package/ui/Elements/Icon/icons/QRCode.js +6 -2
- package/ui/Elements/Icon/icons/Rack.js +6 -2
- package/ui/Elements/Icon/icons/Return.js +6 -2
- package/ui/Elements/Icon/icons/Rows.js +6 -2
- package/ui/Elements/Icon/icons/Settings2.js +6 -2
- package/ui/Elements/Icon/icons/ShoppingBag.js +6 -2
- package/ui/Elements/Icon/icons/ThreeDots.js +6 -2
- package/ui/Elements/Icon/icons/Transfer.js +6 -2
- package/ui/Elements/Icon/icons/Truck.js +6 -2
- package/ui/Elements/Icon/icons/TwoBoxes.js +6 -2
- package/ui/Elements/Icon/icons/TwoCheckedBoxes.js +6 -2
- package/ui/Elements/Icon/icons/TwoUsers.js +6 -2
- package/ui/Elements/Icon/icons/index.js +114 -55
- package/ui/Elements/Icon/index.js +26 -5
- package/ui/Elements/Icon/stories/BadgeIcon.stories.js +12 -6
- package/ui/Elements/Icon/stories/Icon.stories.js +12 -9
- package/ui/Elements/Icon/types.js +2 -1
- package/ui/Elements/Image/Image.js +6 -4
- package/ui/Elements/Image/index.js +9 -3
- package/ui/Elements/Image/stories/Image.stories.js +15 -9
- package/ui/Elements/Image/types.js +2 -1
- package/ui/Elements/Label/Label.js +35 -9
- package/ui/Elements/Label/index.js +8 -3
- package/ui/Elements/Label/stories/Label.stories.js +8 -5
- package/ui/Elements/Line/Line.js +10 -5
- package/ui/Elements/Line/index.js +9 -3
- package/ui/Elements/Line/stories/Line.stories.js +16 -10
- package/ui/Elements/Line/types.js +2 -1
- package/ui/Elements/Link/Link.js +39 -14
- package/ui/Elements/Link/index.js +9 -3
- package/ui/Elements/Link/stories/Link.stories.js +13 -10
- package/ui/Elements/Logo/Logo.js +30 -25
- package/ui/Elements/Logo/index.js +9 -3
- package/ui/Elements/Logo/stories/Logo.stories.js +24 -18
- package/ui/Elements/Logo/types.js +2 -1
- package/ui/Elements/MultiSelect/MultiSelect.js +9 -4
- package/ui/Elements/MultiSelect/index.js +7 -2
- package/ui/Elements/Pagination/Pagination.js +9 -7
- package/ui/Elements/Pagination/index.js +9 -3
- package/ui/Elements/Pagination/stories/Pagination.stories.js +8 -5
- package/ui/Elements/Pagination/styled.js +41 -12
- package/ui/Elements/Portal/index.js +14 -7
- package/ui/Elements/ProgressBar/ProgressBar.js +6 -4
- package/ui/Elements/ProgressBar/index.js +9 -3
- package/ui/Elements/ProgressBar/stories/ProgressBar.stories.js +12 -6
- package/ui/Elements/ProgressBar/styles.js +38 -12
- package/ui/Elements/Select/Select.js +25 -20
- package/ui/Elements/Select/index.js +7 -2
- package/ui/Elements/Select/styles.js +13 -7
- package/ui/Elements/Select/themes/CustomComponents.js +72 -37
- package/ui/Elements/Select/themes/baseStyles.js +12 -6
- package/ui/Elements/Select/themes/formStyles.js +27 -23
- package/ui/Elements/Select/themes/index.js +20 -16
- package/ui/Elements/Select/types.js +2 -1
- package/ui/Elements/SimpleLink/SimpleLink.js +31 -6
- package/ui/Elements/SimpleLink/index.js +9 -3
- package/ui/Elements/SingleSelect/SingleSelect.js +32 -27
- package/ui/Elements/SingleSelect/index.js +7 -2
- package/ui/Elements/SpaceAround/SpaceAround.js +36 -11
- package/ui/Elements/SpaceAround/index.js +9 -3
- package/ui/Elements/SpaceAround/stories/SpaceAround.stories.js +8 -5
- package/ui/Elements/SpaceAround/types.js +2 -1
- package/ui/Elements/Spinner/Spinner.js +12 -8
- package/ui/Elements/Spinner/index.js +9 -3
- package/ui/Elements/Spinner/stories/Spinner.stories.js +16 -13
- package/ui/Elements/Spinner/styles.js +33 -7
- package/ui/Elements/Spinner/types.js +2 -1
- package/ui/Elements/Tag/Tag.js +31 -6
- package/ui/Elements/Tag/index.js +10 -3
- package/ui/Elements/Tag/palletes.js +4 -1
- package/ui/Elements/Tag/stories/Tag.stories.js +21 -15
- package/ui/Elements/Tag/stories/components/predefinedTags.js +11 -6
- package/ui/Elements/Tag/types.js +2 -1
- package/ui/Elements/Text/Text.js +6 -4
- package/ui/Elements/Text/index.js +8 -2
- package/ui/Elements/Text/stories/Text.stories.js +15 -9
- package/ui/Elements/Text/types.js +2 -1
- package/ui/Elements/Toast/Toast.js +15 -10
- package/ui/Elements/Toast/index.js +9 -3
- package/ui/Elements/Toggle/Toggle.js +38 -13
- package/ui/Elements/Toggle/index.js +9 -3
- package/ui/Elements/Toggle/stories/Toggle.stories.js +13 -7
- package/ui/Elements/Toggle/types.js +2 -1
- package/ui/Elements/Typography/Typography.js +44 -28
- package/ui/Elements/Typography/index.js +19 -3
- package/ui/Elements/Typography/stories/Typography.stories.js +18 -15
- package/ui/Forms/Checkbox/Checkbox.js +11 -9
- package/ui/Forms/Checkbox/index.js +9 -3
- package/ui/Forms/Checkbox/stories/Checkbox.stories.js +13 -7
- package/ui/Forms/Checkbox/styles.js +32 -6
- package/ui/Forms/Checkbox/types.js +2 -1
- package/ui/Forms/Input/Input.js +20 -16
- package/ui/Forms/Input/index.js +6 -3
- package/ui/Forms/Input/stories/Input.stories.js +14 -11
- package/ui/Forms/Input/styles.js +46 -20
- package/ui/Forms/Input/types.js +2 -1
- package/ui/Forms/RadioButton/RadioButton.js +8 -6
- package/ui/Forms/RadioButton/index.js +9 -3
- package/ui/Forms/RadioButton/stories/RadioButton.stories.js +13 -7
- package/ui/Forms/RadioButton/styles.js +13 -7
- package/ui/Forms/RadioButton/types.js +2 -1
- package/ui/Forms/TextArea/TextArea.js +13 -8
- package/ui/Forms/TextArea/index.js +7 -2
- package/ui/Forms/TextArea/styles.js +39 -13
- package/ui/System/Fonts/index.js +14 -9
- package/ui/ThemeProvider/ThemeProvider.js +13 -7
- package/ui/ThemeProvider/index.js +25 -5
- package/ui/ThemeProvider/themes/default.js +3 -1
- package/ui/ThemeProvider/themes/index.js +12 -7
- package/ui/ThemeProvider/themes/light.js +3 -1
- package/ui/ThemeProvider/themes/mailwise.js +3 -1
- package/ui/ThemeProvider/types.js +2 -1
- package/ui/index.es.js +23359 -19683
- package/ui/index.js +146 -85
- package/ui/index.umd.js +510 -484
- package/ui/utils/CreateRgba/createRgba.js +12 -5
- package/ui/utils/CreateRgba/types.js +2 -1
- package/ui/utils/KeyPress/KeyPress.js +6 -4
- package/ui/utils/KeyPress/KeyPress.stories.js +12 -6
- package/ui/utils/KeyPress/index.js +7 -2
- package/ui/utils/KeyPress/types.js +2 -1
- package/ui/utils/index.js +13 -6
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
var __assign = (this && this.__assign) || function () {
|
|
2
3
|
__assign = Object.assign || function(t) {
|
|
3
4
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -9,6 +10,29 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
10
|
};
|
|
10
11
|
return __assign.apply(this, arguments);
|
|
11
12
|
};
|
|
13
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
16
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
17
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
18
|
+
}
|
|
19
|
+
Object.defineProperty(o, k2, desc);
|
|
20
|
+
}) : (function(o, m, k, k2) {
|
|
21
|
+
if (k2 === undefined) k2 = k;
|
|
22
|
+
o[k2] = m[k];
|
|
23
|
+
}));
|
|
24
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
25
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
26
|
+
}) : function(o, v) {
|
|
27
|
+
o["default"] = v;
|
|
28
|
+
});
|
|
29
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
30
|
+
if (mod && mod.__esModule) return mod;
|
|
31
|
+
var result = {};
|
|
32
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
33
|
+
__setModuleDefault(result, mod);
|
|
34
|
+
return result;
|
|
35
|
+
};
|
|
12
36
|
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
37
|
var t = {};
|
|
14
38
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
@@ -20,46 +44,50 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
20
44
|
}
|
|
21
45
|
return t;
|
|
22
46
|
};
|
|
23
|
-
|
|
24
|
-
|
|
47
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
48
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
49
|
+
};
|
|
50
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
51
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
52
|
+
var moment_1 = __importDefault(require("moment"));
|
|
25
53
|
// @TODO each language has 62kb gziped, please replace moment with different lib
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
54
|
+
require("moment/dist/locale/cs");
|
|
55
|
+
require("moment/dist/locale/ru");
|
|
56
|
+
require("moment/dist/locale/sk");
|
|
57
|
+
require("moment/dist/locale/it");
|
|
58
|
+
require("moment/dist/locale/el");
|
|
59
|
+
var react_1 = __importStar(require("react"));
|
|
60
|
+
var DateTime_1 = __importDefault(require("./Datetime/DateTime"));
|
|
61
|
+
var styled_components_1 = require("@xstyled/styled-components");
|
|
62
|
+
var styles_1 = require("./styles");
|
|
63
|
+
var SpaceAround_1 = __importDefault(require("../SpaceAround"));
|
|
64
|
+
var Input_1 = __importDefault(require("../../Forms/Input"));
|
|
65
|
+
var ThemeProvider_1 = require("../../ThemeProvider/ThemeProvider");
|
|
38
66
|
var defaultDateFormat = 'DD.MM.YYYY';
|
|
39
67
|
var DatePicker = function (_a) {
|
|
40
68
|
var name = _a.name, value = _a.value, initialViewDate = _a.initialViewDate, error = _a.error, label = _a.label, disabled = _a.disabled, isValidDate = _a.isValidDate, onChange = _a.onChange, _b = _a.dateFormat, dateFormat = _b === void 0 ? defaultDateFormat : _b, _c = _a.timeFormat, timeFormat = _c === void 0 ? false : _c, open = _a.open, _d = _a.secondValue, secondValue = _d === void 0 ? null : _d, input = _a.input, _e = _a.icon, icon = _e === void 0 ? true : _e, _f = _a.showInputLabel, showInputLabel = _f === void 0 ? false : _f, _g = _a.showCalendarLabel, showCalendarLabel = _g === void 0 ? true : _g, _h = _a.spaceAround, spaceAround = _h === void 0 ? false : _h, className = _a.className, onClear = _a.onClear, passProps = __rest(_a, ["name", "value", "initialViewDate", "error", "label", "disabled", "isValidDate", "onChange", "dateFormat", "timeFormat", "open", "secondValue", "input", "icon", "showInputLabel", "showCalendarLabel", "spaceAround", "className", "onClear"]);
|
|
41
69
|
var format = "".concat(dateFormat).concat(timeFormat ? " ".concat(timeFormat) : "");
|
|
42
|
-
var isValid = !!value &&
|
|
43
|
-
var stringValue = isValid ?
|
|
44
|
-
var locale = useContext(LanguageContext);
|
|
45
|
-
var handleRenderInput = useCallback(function (_, openCalendar) {
|
|
46
|
-
return (
|
|
70
|
+
var isValid = !!value && (0, moment_1.default)(value, format).isValid();
|
|
71
|
+
var stringValue = isValid ? (0, moment_1.default)(value, format).format(format) : value;
|
|
72
|
+
var locale = (0, react_1.useContext)(ThemeProvider_1.LanguageContext);
|
|
73
|
+
var handleRenderInput = (0, react_1.useCallback)(function (_, openCalendar) {
|
|
74
|
+
return ((0, jsx_runtime_1.jsx)(Input_1.default, { type: "text", icon: icon ? 'calendar' : undefined, name: name, error: error, disabled: disabled, isInvalid: !!error, label: showInputLabel ? label : undefined, value: stringValue, onFocus: openCalendar, iconOnClick: openCalendar, onClear: onClear }));
|
|
47
75
|
}, [name, stringValue, error, label, showInputLabel, isValid, disabled]);
|
|
48
|
-
var handleRenderView = useCallback(function (_, renderCalendar) {
|
|
76
|
+
var handleRenderView = (0, react_1.useCallback)(function (_, renderCalendar) {
|
|
49
77
|
if (label && !showInputLabel) {
|
|
50
|
-
return (
|
|
78
|
+
return ((0, jsx_runtime_1.jsx)(styled_components_1.x.div, { display: "flex", flexDirection: "column", children: renderCalendar() }));
|
|
51
79
|
}
|
|
52
80
|
return renderCalendar();
|
|
53
81
|
}, [label, showInputLabel]);
|
|
54
|
-
var handleChange = useCallback(function (value) {
|
|
82
|
+
var handleChange = (0, react_1.useCallback)(function (value) {
|
|
55
83
|
var parsed = typeof value === 'string' ? value : value.toDate();
|
|
56
84
|
onChange === null || onChange === void 0 ? void 0 : onChange(parsed);
|
|
57
85
|
}, [onChange]);
|
|
58
|
-
var handleIsValid = useCallback(function (current, selected) {
|
|
86
|
+
var handleIsValid = (0, react_1.useCallback)(function (current, selected) {
|
|
59
87
|
var _a, _b;
|
|
60
88
|
var parsed = [(_a = current === null || current === void 0 ? void 0 : current.toDate) === null || _a === void 0 ? void 0 : _a.call(current), (_b = selected === null || selected === void 0 ? void 0 : selected.toDate) === null || _b === void 0 ? void 0 : _b.call(selected)];
|
|
61
89
|
return isValidDate ? isValidDate.apply(void 0, parsed) : true;
|
|
62
90
|
}, [isValidDate]);
|
|
63
|
-
return (
|
|
91
|
+
return ((0, jsx_runtime_1.jsx)(SpaceAround_1.default, { spaceAround: spaceAround, children: (0, jsx_runtime_1.jsx)(styles_1.DatePickerBase, { className: className, children: (0, jsx_runtime_1.jsx)(DateTime_1.default, __assign({ value: value, dateFormat: dateFormat, timeFormat: timeFormat, secondValue: secondValue, open: open, input: input, label: showCalendarLabel ? label : undefined, onChange: handleChange, isValidDate: handleIsValid, renderView: handleRenderView, renderInput: handleRenderInput, initialViewDate: initialViewDate, locale: locale }, passProps)) }) }));
|
|
64
92
|
};
|
|
65
|
-
|
|
93
|
+
exports.default = react_1.default.memo(DatePicker);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
var __extends = (this && this.__extends) || (function () {
|
|
2
3
|
var extendStatics = function (d, b) {
|
|
3
4
|
extendStatics = Object.setPrototypeOf ||
|
|
@@ -24,14 +25,18 @@ var __assign = (this && this.__assign) || function () {
|
|
|
24
25
|
};
|
|
25
26
|
return __assign.apply(this, arguments);
|
|
26
27
|
};
|
|
27
|
-
|
|
28
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
29
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
30
|
+
};
|
|
31
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
28
33
|
// @ts-nocheck
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
34
|
+
var moment_1 = __importDefault(require("moment"));
|
|
35
|
+
var react_1 = __importDefault(require("react"));
|
|
36
|
+
var DaysView_1 = __importDefault(require("./views/DaysView"));
|
|
37
|
+
var MonthsView_1 = __importDefault(require("./views/MonthsView"));
|
|
38
|
+
var YearsView_1 = __importDefault(require("./views/YearsView"));
|
|
39
|
+
var react_onclickoutside_1 = __importDefault(require("react-onclickoutside"));
|
|
35
40
|
var viewModes = {
|
|
36
41
|
YEARS: 'years',
|
|
37
42
|
MONTHS: 'months',
|
|
@@ -54,7 +59,7 @@ var Datetime = /** @class */ (function (_super) {
|
|
|
54
59
|
isValidDate: props.isValidDate,
|
|
55
60
|
updateDate: _this._updateDate,
|
|
56
61
|
navigate: _this._viewNavigate,
|
|
57
|
-
moment:
|
|
62
|
+
moment: moment_1.default,
|
|
58
63
|
showView: _this._showView,
|
|
59
64
|
};
|
|
60
65
|
// Probably updateOn, updateSelectedDate and setDate can be merged in the same method
|
|
@@ -64,11 +69,11 @@ var Datetime = /** @class */ (function (_super) {
|
|
|
64
69
|
// Used viewProps
|
|
65
70
|
// { viewDate, selectedDate, renderYear, isValidDate, navigate, showView, updateDate }
|
|
66
71
|
viewProps.renderYear = props.renderYear;
|
|
67
|
-
return
|
|
72
|
+
return (0, jsx_runtime_1.jsx)(YearsView_1.default, __assign({}, viewProps));
|
|
68
73
|
case viewModes.MONTHS:
|
|
69
74
|
// { viewDate, selectedDate, renderMonth, isValidDate, navigate, showView, updateDate }
|
|
70
75
|
viewProps.renderMonth = props.renderMonth;
|
|
71
|
-
return
|
|
76
|
+
return (0, jsx_runtime_1.jsx)(MonthsView_1.default, __assign({}, viewProps));
|
|
72
77
|
case viewModes.DAYS:
|
|
73
78
|
// { viewDate, selectedDate, renderDay, isValidDate, navigate, showView, updateDate, timeFormat
|
|
74
79
|
viewProps.renderDay = props.renderDay;
|
|
@@ -76,13 +81,13 @@ var Datetime = /** @class */ (function (_super) {
|
|
|
76
81
|
viewProps.setTime = _this._setTime;
|
|
77
82
|
viewProps.value = _this.props.value;
|
|
78
83
|
viewProps.disabled = _this.props.disabled;
|
|
79
|
-
return
|
|
84
|
+
return (0, jsx_runtime_1.jsx)(DaysView_1.default, __assign({}, viewProps));
|
|
80
85
|
default:
|
|
81
86
|
viewProps.renderDay = props.renderDay;
|
|
82
87
|
viewProps.timeFormat = _this.getFormat('time');
|
|
83
88
|
viewProps.setTime = _this._setTime;
|
|
84
89
|
viewProps.value = _this.props.value;
|
|
85
|
-
return
|
|
90
|
+
return (0, jsx_runtime_1.jsx)(DaysView_1.default, __assign({}, viewProps));
|
|
86
91
|
}
|
|
87
92
|
};
|
|
88
93
|
_this._showView = function (view, date) {
|
|
@@ -204,16 +209,16 @@ var Datetime = /** @class */ (function (_super) {
|
|
|
204
209
|
return _this;
|
|
205
210
|
}
|
|
206
211
|
Datetime.prototype.render = function () {
|
|
207
|
-
return (
|
|
212
|
+
return ((0, jsx_runtime_1.jsxs)(ClickableWrapper, { className: this.getClassName(), onClickOut: this._handleClickOutside, children: [this.renderInput(), (0, jsx_runtime_1.jsx)("div", { className: "rdtPicker", children: this.renderView() })] }));
|
|
208
213
|
};
|
|
209
214
|
Datetime.prototype.renderInput = function () {
|
|
210
215
|
if (!this.props.input)
|
|
211
216
|
return;
|
|
212
217
|
var finalInputProps = __assign(__assign({ type: 'text', className: 'form-control', value: this.getInputValue() }, this.props.inputProps), { onFocus: this._onInputFocus, onChange: this._onInputChange, onKeyDown: this._onInputKeyDown, onClick: this._onInputClick });
|
|
213
218
|
if (this.props.renderInput) {
|
|
214
|
-
return
|
|
219
|
+
return (0, jsx_runtime_1.jsx)("div", { children: this.props.renderInput(finalInputProps, this._openCalendar, this._closeCalendar) });
|
|
215
220
|
}
|
|
216
|
-
return
|
|
221
|
+
return (0, jsx_runtime_1.jsx)("input", __assign({}, finalInputProps));
|
|
217
222
|
};
|
|
218
223
|
Datetime.prototype.renderView = function () {
|
|
219
224
|
return this.props.renderView(this.state.currentView, this._renderCalendar);
|
|
@@ -345,13 +350,13 @@ var Datetime = /** @class */ (function (_super) {
|
|
|
345
350
|
props = props || this.props;
|
|
346
351
|
var m = null;
|
|
347
352
|
if (props.utc) {
|
|
348
|
-
m =
|
|
353
|
+
m = moment_1.default.utc(date, format, props.strictParsing);
|
|
349
354
|
}
|
|
350
355
|
else if (props.displayTimeZone) {
|
|
351
|
-
m =
|
|
356
|
+
m = moment_1.default.tz(date, format, props.displayTimeZone);
|
|
352
357
|
}
|
|
353
358
|
else {
|
|
354
|
-
m =
|
|
359
|
+
m = (0, moment_1.default)(date, format, props.strictParsing);
|
|
355
360
|
}
|
|
356
361
|
if (props.locale)
|
|
357
362
|
m.locale(props.locale);
|
|
@@ -359,7 +364,7 @@ var Datetime = /** @class */ (function (_super) {
|
|
|
359
364
|
};
|
|
360
365
|
Datetime.prototype.checkTZ = function () {
|
|
361
366
|
var displayTimeZone = this.props.displayTimeZone;
|
|
362
|
-
if (displayTimeZone && !this.tzWarning && !
|
|
367
|
+
if (displayTimeZone && !this.tzWarning && !moment_1.default.tz) {
|
|
363
368
|
this.tzWarning = true;
|
|
364
369
|
}
|
|
365
370
|
};
|
|
@@ -491,19 +496,19 @@ var Datetime = /** @class */ (function (_super) {
|
|
|
491
496
|
renderView: function (_, renderFunc) { return renderFunc(); },
|
|
492
497
|
};
|
|
493
498
|
// Make moment accessible through the Datetime class
|
|
494
|
-
Datetime.moment =
|
|
499
|
+
Datetime.moment = moment_1.default;
|
|
495
500
|
return Datetime;
|
|
496
|
-
}(
|
|
497
|
-
|
|
501
|
+
}(react_1.default.Component));
|
|
502
|
+
exports.default = Datetime;
|
|
498
503
|
var ClickOutBase = /** @class */ (function (_super) {
|
|
499
504
|
__extends(ClickOutBase, _super);
|
|
500
505
|
function ClickOutBase() {
|
|
501
506
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
502
|
-
_this.container =
|
|
507
|
+
_this.container = react_1.default.createRef();
|
|
503
508
|
return _this;
|
|
504
509
|
}
|
|
505
510
|
ClickOutBase.prototype.render = function () {
|
|
506
|
-
return (
|
|
511
|
+
return ((0, jsx_runtime_1.jsx)("div", { className: this.props.className, ref: this.container, children: this.props.children }));
|
|
507
512
|
};
|
|
508
513
|
ClickOutBase.prototype.handleClickOutside = function (e) {
|
|
509
514
|
this.props.onClickOut(e);
|
|
@@ -512,5 +517,5 @@ var ClickOutBase = /** @class */ (function (_super) {
|
|
|
512
517
|
return this.container.current;
|
|
513
518
|
};
|
|
514
519
|
return ClickOutBase;
|
|
515
|
-
}(
|
|
516
|
-
var ClickableWrapper =
|
|
520
|
+
}(react_1.default.Component));
|
|
521
|
+
var ClickableWrapper = (0, react_onclickoutside_1.default)(ClickOutBase);
|
|
@@ -1,36 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
2
3
|
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
3
4
|
return cooked;
|
|
4
5
|
};
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
6
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
7
|
+
if (k2 === undefined) k2 = k;
|
|
8
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
9
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
10
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
11
|
+
}
|
|
12
|
+
Object.defineProperty(o, k2, desc);
|
|
13
|
+
}) : (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
o[k2] = m[k];
|
|
16
|
+
}));
|
|
17
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
18
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
19
|
+
}) : function(o, v) {
|
|
20
|
+
o["default"] = v;
|
|
21
|
+
});
|
|
22
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
23
|
+
if (mod && mod.__esModule) return mod;
|
|
24
|
+
var result = {};
|
|
25
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
26
|
+
__setModuleDefault(result, mod);
|
|
27
|
+
return result;
|
|
28
|
+
};
|
|
29
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
|
+
exports.Timepicker = void 0;
|
|
31
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
32
|
+
var react_1 = require("react");
|
|
33
|
+
var styled_components_1 = __importStar(require("@xstyled/styled-components"));
|
|
34
|
+
var system_1 = require("@xstyled/system");
|
|
35
|
+
var Btn = styled_components_1.default.button(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n transform: rotate(90deg);\n font-size: 24px;\n margin: -4px 0;\n background-color: transparent !important;\n border: none;\n color: ", ";\n &:disabled:hover {\n color: ", ";\n cursor: default;\n }\n &:hover {\n color: ", ";\n background-color: transparent !important;\n }\n"], ["\n transform: rotate(90deg);\n font-size: 24px;\n margin: -4px 0;\n background-color: transparent !important;\n border: none;\n color: ", ";\n &:disabled:hover {\n color: ", ";\n cursor: default;\n }\n &:hover {\n color: ", ";\n background-color: transparent !important;\n }\n"])), (0, system_1.th)('colors.lightGray4'), (0, system_1.th)('colors.lightGray4'), (0, system_1.th)('colors.red2'));
|
|
36
|
+
var TimeWrapper = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n align-items: baseline;\n justify-content: center;\n border: 1px solid ", ";\n border-radius: 0.7rem;\n padding: 4px 10px;\n margin: 0 10px;\n"], ["\n display: flex;\n align-items: baseline;\n justify-content: center;\n border: 1px solid ", ";\n border-radius: 0.7rem;\n padding: 4px 10px;\n margin: 0 10px;\n"])), (0, system_1.th)('colors.lightGray2'));
|
|
37
|
+
var Hours = styled_components_1.default.input(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n font-size: 22px;\n font-weight: 700;\n width: 24px;\n margin: 0;\n padding: 0;\n border: none;\n outline: none;\n &:disabled {\n opacity: 0.5;\n }\n"], ["\n font-size: 22px;\n font-weight: 700;\n width: 24px;\n margin: 0;\n padding: 0;\n border: none;\n outline: none;\n &:disabled {\n opacity: 0.5;\n }\n"])));
|
|
38
|
+
var Minutes = styled_components_1.default.input(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n font-weight: 700;\n font-size: 16px;\n width: 20px;\n margin: 0;\n padding: 0;\n border: none;\n outline: none;\n &:disabled {\n opacity: 0.5;\n }\n"], ["\n font-weight: 700;\n font-size: 16px;\n width: 20px;\n margin: 0;\n padding: 0;\n border: none;\n outline: none;\n &:disabled {\n opacity: 0.5;\n }\n"])));
|
|
39
|
+
var Timepicker = function (_a) {
|
|
14
40
|
var _b, _c, _d, _e;
|
|
15
41
|
var setTime = _a.setTime, value = _a.value, disabled = _a.disabled;
|
|
16
42
|
var initialHours = (_c = (_b = value === null || value === void 0 ? void 0 : value.getHours) === null || _b === void 0 ? void 0 : _b.call(value)) !== null && _c !== void 0 ? _c : 0;
|
|
17
43
|
var initialMinutes = (_e = (_d = value === null || value === void 0 ? void 0 : value.getMinutes) === null || _d === void 0 ? void 0 : _d.call(value)) !== null && _e !== void 0 ? _e : 0;
|
|
18
44
|
var regExp = '^[0-9]*$';
|
|
19
|
-
var _f = useState(initialHours), hours = _f[0], setHours = _f[1];
|
|
20
|
-
var _g = useState(initialMinutes), minutes = _g[0], setMinutes = _g[1];
|
|
21
|
-
var increaseHour = useCallback(function () {
|
|
45
|
+
var _f = (0, react_1.useState)(initialHours), hours = _f[0], setHours = _f[1];
|
|
46
|
+
var _g = (0, react_1.useState)(initialMinutes), minutes = _g[0], setMinutes = _g[1];
|
|
47
|
+
var increaseHour = (0, react_1.useCallback)(function () {
|
|
22
48
|
hours === 23 ? setHours(0) : setHours(hours + 1);
|
|
23
49
|
}, [hours]);
|
|
24
|
-
var decreaseHour = useCallback(function () {
|
|
50
|
+
var decreaseHour = (0, react_1.useCallback)(function () {
|
|
25
51
|
hours === 0 ? setHours(23) : setHours(hours - 1);
|
|
26
52
|
}, [hours]);
|
|
27
|
-
var increaseMinutes = useCallback(function () {
|
|
53
|
+
var increaseMinutes = (0, react_1.useCallback)(function () {
|
|
28
54
|
minutes >= 55 ? setMinutes(minutes - 55) : setMinutes(minutes + 5);
|
|
29
55
|
}, [minutes]);
|
|
30
|
-
var decreaseMinutes = useCallback(function () {
|
|
56
|
+
var decreaseMinutes = (0, react_1.useCallback)(function () {
|
|
31
57
|
minutes <= 5 ? setMinutes(minutes + 55) : setMinutes(minutes - 5);
|
|
32
58
|
}, [minutes]);
|
|
33
|
-
var onHoursChange = useCallback(function (e) {
|
|
59
|
+
var onHoursChange = (0, react_1.useCallback)(function (e) {
|
|
34
60
|
if (e.target.value.match(regExp) && Number(e.target.value) <= 23) {
|
|
35
61
|
setHours(Number(e.target.value));
|
|
36
62
|
}
|
|
@@ -38,7 +64,7 @@ export var Timepicker = function (_a) {
|
|
|
38
64
|
setHours(0);
|
|
39
65
|
}
|
|
40
66
|
}, []);
|
|
41
|
-
var onMinutesChange = useCallback(function (e) {
|
|
67
|
+
var onMinutesChange = (0, react_1.useCallback)(function (e) {
|
|
42
68
|
if (e.target.value.match(regExp) && Number(e.target.value) <= 59) {
|
|
43
69
|
setMinutes(Number(e.target.value));
|
|
44
70
|
}
|
|
@@ -46,12 +72,13 @@ export var Timepicker = function (_a) {
|
|
|
46
72
|
setMinutes(0);
|
|
47
73
|
}
|
|
48
74
|
}, []);
|
|
49
|
-
useEffect(function () {
|
|
75
|
+
(0, react_1.useEffect)(function () {
|
|
50
76
|
!!value && setTime('hours', hours);
|
|
51
77
|
}, [hours]);
|
|
52
|
-
useEffect(function () {
|
|
78
|
+
(0, react_1.useEffect)(function () {
|
|
53
79
|
!!value && setTime('minutes', minutes);
|
|
54
80
|
}, [minutes]);
|
|
55
|
-
return (
|
|
81
|
+
return ((0, jsx_runtime_1.jsx)("td", { colSpan: 7, children: (0, jsx_runtime_1.jsx)(styled_components_1.x.div, { display: "flex", flexDirection: "column", alignItems: "flex-start", pt: "1rem", w: "fit-content", children: (0, jsx_runtime_1.jsxs)(styled_components_1.x.div, { display: "flex", alignItems: "center", children: [(0, jsx_runtime_1.jsxs)(styled_components_1.x.div, { display: "flex", flexDirection: "column", children: [(0, jsx_runtime_1.jsx)(Btn, { disabled: disabled, onClick: increaseHour, children: "\u2039" }), (0, jsx_runtime_1.jsx)(Btn, { disabled: disabled, onClick: decreaseHour, children: "\u203A" })] }), (0, jsx_runtime_1.jsxs)(TimeWrapper, { children: [(0, jsx_runtime_1.jsx)(Hours, { value: hours < 10 ? "0".concat(hours) : hours, disabled: disabled, onChange: onHoursChange }), (0, jsx_runtime_1.jsx)(styled_components_1.x.div, { mx: "7px", color: "lightGray4", children: "|" }), (0, jsx_runtime_1.jsx)(Minutes, { value: minutes < 10 ? "0".concat(minutes) : minutes, disabled: disabled, onChange: onMinutesChange })] }), (0, jsx_runtime_1.jsxs)(styled_components_1.x.div, { display: "flex", flexDirection: "column", children: [(0, jsx_runtime_1.jsx)(Btn, { disabled: disabled, onClick: increaseMinutes, children: "\u2039" }), (0, jsx_runtime_1.jsx)(Btn, { disabled: disabled, onClick: decreaseMinutes, children: "\u203A" })] })] }) }) }));
|
|
56
82
|
};
|
|
83
|
+
exports.Timepicker = Timepicker;
|
|
57
84
|
var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
var __assign = (this && this.__assign) || function () {
|
|
2
3
|
__assign = Object.assign || function(t) {
|
|
3
4
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -9,8 +10,10 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
10
|
};
|
|
10
11
|
return __assign.apply(this, arguments);
|
|
11
12
|
};
|
|
12
|
-
|
|
13
|
-
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
15
|
+
function ViewNavigation(_a) {
|
|
14
16
|
var onClickPrev = _a.onClickPrev, onClickSwitch = _a.onClickSwitch, onClickNext = _a.onClickNext, switchContent = _a.switchContent, switchColSpan = _a.switchColSpan, switchProps = _a.switchProps, label = _a.label;
|
|
15
|
-
return (
|
|
17
|
+
return ((0, jsx_runtime_1.jsxs)("tr", { children: [(0, jsx_runtime_1.jsx)("th", { className: "rdtPrev", onClick: onClickPrev, children: (0, jsx_runtime_1.jsx)("span", { children: "\u2039" }) }), (0, jsx_runtime_1.jsx)("th", __assign({ className: "rdtSwitch", colSpan: switchColSpan, onClick: onClickSwitch }, switchProps, { children: switchContent })), (0, jsx_runtime_1.jsx)("th", { className: "rdtNext", onClick: onClickNext, children: (0, jsx_runtime_1.jsx)("span", { children: "\u203A" }) }), (0, jsx_runtime_1.jsx)("th", { colSpan: 2, className: "rdtLabel", children: label && label })] }));
|
|
16
18
|
}
|
|
19
|
+
exports.default = ViewNavigation;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
// Type definitions for react-datetime
|
|
2
3
|
// Project: https://github.com/arqex/react-datetime
|
|
3
4
|
// Definitions by: Ivan Verevkin <vereva@x-root.org>
|
|
4
5
|
// Updates by: Aaron Spaulding <aaron@sachimp.com>,
|
|
5
6
|
// Karol Janyst <http://github.com/LKay>,
|
|
6
7
|
// Javier Marquez <javi@arqex.com>
|
|
7
|
-
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
var __extends = (this && this.__extends) || (function () {
|
|
2
3
|
var extendStatics = function (d, b) {
|
|
3
4
|
extendStatics = Object.setPrototypeOf ||
|
|
@@ -24,11 +25,15 @@ var __assign = (this && this.__assign) || function () {
|
|
|
24
25
|
};
|
|
25
26
|
return __assign.apply(this, arguments);
|
|
26
27
|
};
|
|
27
|
-
|
|
28
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
29
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
30
|
+
};
|
|
31
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
28
33
|
// @ts-nocheck
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
34
|
+
var react_1 = __importDefault(require("react"));
|
|
35
|
+
var Timepicker_1 = require("../components/Timepicker");
|
|
36
|
+
var ViewNavigation_1 = __importDefault(require("../components/ViewNavigation"));
|
|
32
37
|
var DaysView = /** @class */ (function (_super) {
|
|
33
38
|
__extends(DaysView, _super);
|
|
34
39
|
function DaysView() {
|
|
@@ -39,19 +44,19 @@ var DaysView = /** @class */ (function (_super) {
|
|
|
39
44
|
return _this;
|
|
40
45
|
}
|
|
41
46
|
DaysView.prototype.render = function () {
|
|
42
|
-
return (
|
|
47
|
+
return ((0, jsx_runtime_1.jsx)("div", { className: "rdtDays", children: (0, jsx_runtime_1.jsxs)("table", { children: [(0, jsx_runtime_1.jsxs)("thead", { children: [this.renderNavigation(), this.renderDayHeaders()] }), (0, jsx_runtime_1.jsx)("tbody", { children: this.renderDays() }), this.renderFooter()] }) }));
|
|
43
48
|
};
|
|
44
49
|
DaysView.prototype.renderNavigation = function () {
|
|
45
50
|
var _this = this;
|
|
46
51
|
var date = this.props.viewDate;
|
|
47
52
|
var locale = date.localeData();
|
|
48
53
|
var label = this.props.label;
|
|
49
|
-
return (
|
|
54
|
+
return ((0, jsx_runtime_1.jsx)(ViewNavigation_1.default, { onClickPrev: function () { return _this.props.navigate(-1, 'months'); }, onClickSwitch: function () { return _this.props.showView('months'); }, onClickNext: function () { return _this.props.navigate(1, 'months'); }, switchContent: locale.months(date, 'DD[]MMMM') + ' ' + date.year(), switchColSpan: 3, label: label, switchProps: { 'data-value': this.props.viewDate.month() } }));
|
|
50
55
|
};
|
|
51
56
|
DaysView.prototype.renderDayHeaders = function () {
|
|
52
57
|
var locale = this.props.viewDate.localeData();
|
|
53
|
-
var dayItems = getDaysOfWeek(locale).map(function (day, index) { return (
|
|
54
|
-
return
|
|
58
|
+
var dayItems = getDaysOfWeek(locale).map(function (day, index) { return ((0, jsx_runtime_1.jsx)("th", { className: "dow", children: day }, day + index)); });
|
|
59
|
+
return (0, jsx_runtime_1.jsx)("tr", { children: dayItems });
|
|
55
60
|
};
|
|
56
61
|
DaysView.prototype.renderDays = function () {
|
|
57
62
|
var date = this.props.viewDate;
|
|
@@ -69,7 +74,7 @@ var DaysView = /** @class */ (function (_super) {
|
|
|
69
74
|
row.push(this.renderDay(startDate, startOfMonth, endOfMonth));
|
|
70
75
|
startDate.add(1, 'd');
|
|
71
76
|
}
|
|
72
|
-
return rows.map(function (r, i) { return
|
|
77
|
+
return rows.map(function (r, i) { return (0, jsx_runtime_1.jsx)("tr", { children: r }, "".concat(endDate.month(), "_").concat(i)); });
|
|
73
78
|
};
|
|
74
79
|
DaysView.prototype.renderDay = function (date, startOfMonth, endOfMonth) {
|
|
75
80
|
var selectedDate = this.props.selectedDate;
|
|
@@ -117,15 +122,15 @@ var DaysView = /** @class */ (function (_super) {
|
|
|
117
122
|
var setTime = this.props.setTime;
|
|
118
123
|
var value = this.props.value;
|
|
119
124
|
var disabled = this.props.disabled;
|
|
120
|
-
return (
|
|
125
|
+
return ((0, jsx_runtime_1.jsx)("tfoot", { children: (0, jsx_runtime_1.jsx)("tr", { children: (0, jsx_runtime_1.jsx)(Timepicker_1.Timepicker, { setTime: setTime, value: value, disabled: disabled }) }) }));
|
|
121
126
|
};
|
|
122
127
|
DaysView.defaultProps = {
|
|
123
128
|
isValidDate: function () { return true; },
|
|
124
|
-
renderDay: function (props, date) { return
|
|
129
|
+
renderDay: function (props, date) { return (0, jsx_runtime_1.jsx)("td", __assign({}, props, { children: date.date() })); },
|
|
125
130
|
};
|
|
126
131
|
return DaysView;
|
|
127
|
-
}(
|
|
128
|
-
|
|
132
|
+
}(react_1.default.Component));
|
|
133
|
+
exports.default = DaysView;
|
|
129
134
|
function getRow(rows, day) {
|
|
130
135
|
return rows[Math.floor(day / 7)];
|
|
131
136
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
var __extends = (this && this.__extends) || (function () {
|
|
2
3
|
var extendStatics = function (d, b) {
|
|
3
4
|
extendStatics = Object.setPrototypeOf ||
|
|
@@ -24,10 +25,14 @@ var __assign = (this && this.__assign) || function () {
|
|
|
24
25
|
};
|
|
25
26
|
return __assign.apply(this, arguments);
|
|
26
27
|
};
|
|
27
|
-
|
|
28
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
29
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
30
|
+
};
|
|
31
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
28
33
|
// @ts-nocheck
|
|
29
|
-
|
|
30
|
-
|
|
34
|
+
var react_1 = __importDefault(require("react"));
|
|
35
|
+
var ViewNavigation_1 = __importDefault(require("../components/ViewNavigation"));
|
|
31
36
|
var MonthsView = /** @class */ (function (_super) {
|
|
32
37
|
__extends(MonthsView, _super);
|
|
33
38
|
function MonthsView() {
|
|
@@ -38,12 +43,12 @@ var MonthsView = /** @class */ (function (_super) {
|
|
|
38
43
|
return _this;
|
|
39
44
|
}
|
|
40
45
|
MonthsView.prototype.render = function () {
|
|
41
|
-
return (
|
|
46
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: "rdtMonths", children: [(0, jsx_runtime_1.jsx)("table", { children: (0, jsx_runtime_1.jsx)("thead", { children: this.renderNavigation() }) }), (0, jsx_runtime_1.jsx)("table", { children: (0, jsx_runtime_1.jsx)("tbody", { children: this.renderMonths() }) })] }));
|
|
42
47
|
};
|
|
43
48
|
MonthsView.prototype.renderNavigation = function () {
|
|
44
49
|
var _this = this;
|
|
45
50
|
var year = this.props.viewDate.year();
|
|
46
|
-
return (
|
|
51
|
+
return ((0, jsx_runtime_1.jsx)(ViewNavigation_1.default, { onClickPrev: function () { return _this.props.navigate(-1, 'years'); }, onClickSwitch: function () { return _this.props.showView('years'); }, onClickNext: function () { return _this.props.navigate(1, 'years'); }, switchContent: year, switchColSpan: "2" }));
|
|
47
52
|
};
|
|
48
53
|
MonthsView.prototype.renderMonths = function () {
|
|
49
54
|
// 12 months in 3 rows for every view
|
|
@@ -52,7 +57,7 @@ var MonthsView = /** @class */ (function (_super) {
|
|
|
52
57
|
var row = getRow(rows, month);
|
|
53
58
|
row.push(this.renderMonth(month));
|
|
54
59
|
}
|
|
55
|
-
return rows.map(function (months, i) { return
|
|
60
|
+
return rows.map(function (months, i) { return (0, jsx_runtime_1.jsx)("tr", { children: months }, i); });
|
|
56
61
|
};
|
|
57
62
|
MonthsView.prototype.renderMonth = function (month) {
|
|
58
63
|
var selectedDate = this.props.selectedDate;
|
|
@@ -71,7 +76,7 @@ var MonthsView = /** @class */ (function (_super) {
|
|
|
71
76
|
if (this.props.renderMonth) {
|
|
72
77
|
return this.props.renderMonth(props, month, this.props.viewDate.year(), this.props.selectedDate && this.props.selectedDate.clone());
|
|
73
78
|
}
|
|
74
|
-
return
|
|
79
|
+
return (0, jsx_runtime_1.jsx)("td", __assign({}, props, { children: this.getMonthText(month) }));
|
|
75
80
|
};
|
|
76
81
|
MonthsView.prototype.isDisabledMonth = function (month) {
|
|
77
82
|
var isValidDate = this.props.isValidDate;
|
|
@@ -95,8 +100,8 @@ var MonthsView = /** @class */ (function (_super) {
|
|
|
95
100
|
return capitalize(monthStr.substring(0, 3));
|
|
96
101
|
};
|
|
97
102
|
return MonthsView;
|
|
98
|
-
}(
|
|
99
|
-
|
|
103
|
+
}(react_1.default.Component));
|
|
104
|
+
exports.default = MonthsView;
|
|
100
105
|
function getRow(rows, year) {
|
|
101
106
|
if (year < 4) {
|
|
102
107
|
return rows[0];
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
var __extends = (this && this.__extends) || (function () {
|
|
2
3
|
var extendStatics = function (d, b) {
|
|
3
4
|
extendStatics = Object.setPrototypeOf ||
|
|
@@ -24,10 +25,14 @@ var __assign = (this && this.__assign) || function () {
|
|
|
24
25
|
};
|
|
25
26
|
return __assign.apply(this, arguments);
|
|
26
27
|
};
|
|
27
|
-
|
|
28
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
29
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
30
|
+
};
|
|
31
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
28
33
|
// @ts-nocheck
|
|
29
|
-
|
|
30
|
-
|
|
34
|
+
var react_1 = __importDefault(require("react"));
|
|
35
|
+
var ViewNavigation_1 = __importDefault(require("../components/ViewNavigation"));
|
|
31
36
|
var YearsView = /** @class */ (function (_super) {
|
|
32
37
|
__extends(YearsView, _super);
|
|
33
38
|
function YearsView() {
|
|
@@ -39,12 +44,12 @@ var YearsView = /** @class */ (function (_super) {
|
|
|
39
44
|
return _this;
|
|
40
45
|
}
|
|
41
46
|
YearsView.prototype.render = function () {
|
|
42
|
-
return (
|
|
47
|
+
return ((0, jsx_runtime_1.jsxs)("div", { className: "rdtYears", children: [(0, jsx_runtime_1.jsx)("table", { children: (0, jsx_runtime_1.jsx)("thead", { children: this.renderNavigation() }) }), (0, jsx_runtime_1.jsx)("table", { children: (0, jsx_runtime_1.jsx)("tbody", { children: this.renderYears() }) })] }));
|
|
43
48
|
};
|
|
44
49
|
YearsView.prototype.renderNavigation = function () {
|
|
45
50
|
var _this = this;
|
|
46
51
|
var viewYear = this.getViewYear();
|
|
47
|
-
return (
|
|
52
|
+
return ((0, jsx_runtime_1.jsx)(ViewNavigation_1.default, { onClickPrev: function () { return _this.props.navigate(-10, 'years'); }, onClickSwitch: function () { return _this.props.showView('years'); }, onClickNext: function () { return _this.props.navigate(10, 'years'); }, switchContent: "".concat(viewYear, "-").concat(viewYear + 9) }));
|
|
48
53
|
};
|
|
49
54
|
YearsView.prototype.renderYears = function () {
|
|
50
55
|
var viewYear = this.getViewYear();
|
|
@@ -54,7 +59,7 @@ var YearsView = /** @class */ (function (_super) {
|
|
|
54
59
|
var row = getRow(rows, year - viewYear);
|
|
55
60
|
row.push(this.renderYear(year));
|
|
56
61
|
}
|
|
57
|
-
return rows.map(function (years, i) { return
|
|
62
|
+
return rows.map(function (years, i) { return (0, jsx_runtime_1.jsx)("tr", { children: years }, i); });
|
|
58
63
|
};
|
|
59
64
|
YearsView.prototype.renderYear = function (year) {
|
|
60
65
|
var selectedYear = this.getSelectedYear();
|
|
@@ -101,11 +106,11 @@ var YearsView = /** @class */ (function (_super) {
|
|
|
101
106
|
return true;
|
|
102
107
|
};
|
|
103
108
|
YearsView.defaultProps = {
|
|
104
|
-
renderYear: function (props, year) { return
|
|
109
|
+
renderYear: function (props, year) { return (0, jsx_runtime_1.jsx)("td", __assign({}, props, { children: year })); },
|
|
105
110
|
};
|
|
106
111
|
return YearsView;
|
|
107
|
-
}(
|
|
108
|
-
|
|
112
|
+
}(react_1.default.Component));
|
|
113
|
+
exports.default = YearsView;
|
|
109
114
|
function getRow(rows, year) {
|
|
110
115
|
if (year < 3) {
|
|
111
116
|
return rows[0];
|