@beppla/tapas-ui 1.0.67 → 1.0.69
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/commonjs/Alert/Alert.js +1 -2
- package/commonjs/AnimatedNavItem/AnimatedNavItem.js +1 -2
- package/commonjs/AnimatedNavItem/index.js +15 -10
- package/commonjs/BarChart/BarChart.js +90 -113
- package/commonjs/BarChart/index.js +0 -1
- package/commonjs/Button/Button.js +78 -97
- package/commonjs/Button/ButtonGroup.js +1 -2
- package/commonjs/Button/react-native-hoverable.d.js +0 -1
- package/commonjs/Calendar/Calendar.base.js +190 -163
- package/commonjs/Calendar/Calendar.js +102 -87
- package/commonjs/Calendar/ConcreteTimeSelector.js +271 -221
- package/commonjs/Calendar/CustomRange.js +324 -272
- package/commonjs/Calendar/DaySelector.js +0 -1
- package/commonjs/Calendar/MonthSelector.js +0 -1
- package/commonjs/Calendar/TimeSelector.js +274 -224
- package/commonjs/Calendar/WeekDaySelector.js +0 -1
- package/commonjs/Calendar/helper.js +68 -69
- package/commonjs/Calendar/local.js +1 -2
- package/commonjs/Calendar/types.js +10 -11
- package/commonjs/Card/Card.js +150 -160
- package/commonjs/CheckBox/CheckBox.js +1 -2
- package/commonjs/CheckBox/CheckBoxItem.js +1 -2
- package/commonjs/CheckBox/GroupCheckBox.js +80 -68
- package/commonjs/CircularProgress/CircularProgress.js +0 -12
- package/commonjs/Collapsible/Collapsible.js +102 -56
- package/commonjs/DashboardCard/DashboardCard.js +94 -75
- package/commonjs/DataCell/DataCell.js +205 -260
- package/commonjs/DataCell/index.js +0 -1
- package/commonjs/DataTable/DataTable.js +136 -142
- package/commonjs/DataTable/index.js +0 -1
- package/commonjs/DeviceSelectionModal/DeviceSelectionModal.js +244 -243
- package/commonjs/DraggableFlatList/DraggableFlatList.js +9 -12
- package/commonjs/Drawer/Drawer.js +140 -160
- package/commonjs/Dropdown/CustomDropdown.js +0 -1
- package/commonjs/Dropdown/Dropdown.js +1 -2
- package/commonjs/Dropdown/InputDropdown.js +123 -115
- package/commonjs/ExternalLink/ExternalLink.js +50 -59
- package/commonjs/Gantt/Accessories.js +168 -136
- package/commonjs/Gantt/Gantt.js +0 -1
- package/commonjs/Gantt/GanttInnerElementType.js +102 -94
- package/commonjs/Gantt/helper.js +1 -2
- package/commonjs/Gantt/types.js +0 -1
- package/commonjs/Grid/FixedSizeGrid.js +76 -83
- package/commonjs/Grid/Grid.base.js +374 -358
- package/commonjs/Grid/StaticFixedSizeGrid.js +0 -1
- package/commonjs/Grid/VariableSizeGrid.js +113 -121
- package/commonjs/Grid/helper.js +0 -1
- package/commonjs/Grid/timer.js +4 -9
- package/commonjs/Header/Header.js +1 -2
- package/commonjs/HelloWave/HelloWave.js +1 -2
- package/commonjs/Hoverable/Hoverable.js +1 -2
- package/commonjs/IconText/IconText.js +0 -1
- package/commonjs/Icons/.!11492!expoFontLoader.js +205 -0
- package/commonjs/Icons/TapasIcon.js +1 -2
- package/commonjs/Icons/TapasIconExpo.js +94 -102
- package/commonjs/Icons/expoFontLoader.js +1 -2
- package/commonjs/Icons/fontLoader.js +0 -1
- package/commonjs/Icons/index.js +1 -2
- package/commonjs/Icons/smartFontLoader.js +222 -267
- package/commonjs/Image/Image.js +96 -107
- package/commonjs/Image/PreviewImg.js +63 -86
- package/commonjs/Input/Input.js +1 -2
- package/commonjs/Layout/DrawerContext.js +35 -1
- package/commonjs/Layout/Layout.js +1 -2
- package/commonjs/Layout/ToastContext.js +0 -1
- package/commonjs/Layout/index.js +34 -39
- package/commonjs/LineChart/LineChart.js +144 -127
- package/commonjs/LineChart/index.js +0 -1
- package/commonjs/ListItem/ListItem.js +0 -1
- package/commonjs/Loading/Loading.js +1 -2
- package/commonjs/MessageBox/MessageBox.js +126 -128
- package/commonjs/MultiSelector/MultiSelector.js +0 -1
- package/commonjs/MultiSelector/index.js +8 -4
- package/commonjs/Navigation/Navigation.js +0 -1
- package/commonjs/Notification/Notification.js +1 -2
- package/commonjs/Notification/index.js +8 -7
- package/commonjs/NumericInput/NumericInput.js +0 -24
- package/commonjs/Overlay/Overlay.js +30 -30
- package/commonjs/Pagination/Pagination.js +139 -121
- package/commonjs/PieChart/PieChart.js +97 -75
- package/commonjs/PieChart/index.js +3 -3
- package/commonjs/Popover/Popover.js +137 -113
- package/commonjs/Progress/Progress.js +0 -1
- package/commonjs/Quantity/Quantity.js +122 -118
- package/commonjs/Quantity/index.js +3 -1
- package/commonjs/RadioButton/RadioButton.js +46 -95
- package/commonjs/ReasonModal/ReasonModal.js +122 -126
- package/commonjs/ReasonModal/index.js +15 -10
- package/commonjs/ScanButton/ScanButton.js +64 -51
- package/commonjs/SearchInput/SearchInput.js +0 -1
- package/commonjs/SearchInput/index.js +8 -7
- package/commonjs/SheetTitle/SheetTitle.js +1 -2
- package/commonjs/Shell/Shell.js +92 -85
- package/commonjs/Shell/styles.js +0 -1
- package/commonjs/Shell/types.js +0 -1
- package/commonjs/StatisticCard/StatisticCard.js +47 -42
- package/commonjs/StatisticCard/index.js +1 -2
- package/commonjs/Status/Status.js +0 -1
- package/commonjs/Steps/Steps.js +43 -40
- package/commonjs/TabTitle/TabTitle.js +0 -1
- package/commonjs/TabTitle/index.js +1 -2
- package/commonjs/TableColumnHeader/TableColumnHeader.js +140 -135
- package/commonjs/TableColumnHeader/index.js +15 -10
- package/commonjs/Tag/Tag.js +1 -2
- package/commonjs/Task/Task.js +0 -1
- package/commonjs/Task/type.js +0 -1
- package/commonjs/Text/Text.js +1 -2
- package/commonjs/TextArea/TextArea.js +82 -1
- package/commonjs/Theme/ThemeProvider.js +1 -2
- package/commonjs/Theme/defaultTheme.js +18 -11
- package/commonjs/Theme/themed.d.js +0 -1
- package/commonjs/Timeline/Timeline.js +1 -2
- package/commonjs/Toast/Toast.js +41 -95
- package/commonjs/UserSwitcher/UserSwitcher.js +0 -1
- package/commonjs/UserSwitcher/index.js +14 -9
- package/commonjs/common.js +4 -6
- package/commonjs/index.js +426 -337
- package/module/Alert/Alert.js +51 -72
- package/module/AnimatedNavItem/AnimatedNavItem.js +1 -2
- package/module/AnimatedNavItem/index.js +2 -7
- package/module/BarChart/BarChart.js +0 -1
- package/module/BarChart/index.js +1 -2
- package/module/Button/Button.js +80 -72
- package/module/Button/ButtonGroup.js +129 -121
- package/module/Button/react-native-hoverable.d.js +0 -1
- package/module/Calendar/Calendar.base.js +0 -1
- package/module/Calendar/Calendar.js +80 -77
- package/module/Calendar/ConcreteTimeSelector.js +0 -1
- package/module/Calendar/CustomRange.js +258 -358
- package/module/Calendar/DaySelector.js +95 -119
- package/module/Calendar/MonthSelector.js +1 -2
- package/module/Calendar/TimeSelector.js +215 -308
- package/module/Calendar/WeekDaySelector.js +98 -123
- package/module/Calendar/helper.js +74 -75
- package/module/Calendar/local.js +0 -1
- package/module/Calendar/types.js +1 -2
- package/module/Card/Card.js +0 -134
- package/module/CheckBox/CheckBox.js +93 -90
- package/module/CheckBox/CheckBoxItem.js +69 -85
- package/module/CheckBox/GroupCheckBox.js +0 -1
- package/module/CircularProgress/CircularProgress.js +1 -2
- package/module/Collapsible/Collapsible.js +66 -1
- package/module/DashboardCard/DashboardCard.js +80 -89
- package/module/DataCell/DataCell.js +311 -225
- package/module/DataCell/index.js +1 -2
- package/module/DataTable/DataTable.js +0 -101
- package/module/DataTable/index.js +4 -3
- package/module/DeviceSelectionModal/DeviceSelectionModal.js +0 -125
- package/module/DraggableFlatList/DraggableFlatList.js +0 -1
- package/module/Drawer/Drawer.js +0 -1
- package/module/Dropdown/CustomDropdown.js +212 -161
- package/module/Dropdown/Dropdown.js +484 -409
- package/module/Dropdown/InputDropdown.js +116 -135
- package/module/ExternalLink/ExternalLink.js +1 -2
- package/module/Gantt/Accessories.js +176 -150
- package/module/Gantt/Gantt.js +0 -1
- package/module/Gantt/GanttInnerElementType.js +0 -1
- package/module/Gantt/helper.js +0 -1
- package/module/Gantt/types.js +1 -2
- package/module/Grid/FixedSizeGrid.js +80 -87
- package/module/Grid/Grid.base.js +339 -402
- package/module/Grid/StaticFixedSizeGrid.js +1 -2
- package/module/Grid/VariableSizeGrid.js +121 -119
- package/module/Grid/helper.js +0 -1
- package/module/Grid/timer.js +1 -2
- package/module/Header/Header.js +1 -2
- package/module/HelloWave/HelloWave.js +43 -54
- package/module/Hoverable/Hoverable.js +1 -2
- package/module/IconText/IconText.js +1 -2
- package/module/Icons/TapasIcon.js +120 -97
- package/module/Icons/TapasIconExpo.js +0 -1
- package/module/Icons/expoFontLoader.js +1 -2
- package/module/Icons/fontLoader.js +0 -1
- package/module/Icons/index.js +9 -11
- package/module/Icons/smartFontLoader.js +0 -1
- package/module/Image/Image.js +1 -2
- package/module/Image/PreviewImg.js +76 -80
- package/module/Input/Input.js +34 -113
- package/module/Layout/DrawerContext.js +18 -30
- package/module/Layout/Layout.js +0 -1
- package/module/Layout/ToastContext.js +0 -1
- package/module/Layout/index.js +14 -16
- package/module/LineChart/LineChart.js +0 -1
- package/module/LineChart/index.js +1 -2
- package/module/ListItem/ListItem.js +98 -106
- package/module/Loading/Loading.js +67 -66
- package/module/MessageBox/MessageBox.js +137 -99
- package/module/MultiSelector/MultiSelector.js +229 -321
- package/module/MultiSelector/index.js +3 -3
- package/module/Navigation/Navigation.js +1 -2
- package/module/Notification/Notification.js +0 -1
- package/module/Notification/index.js +0 -17
- package/module/NumericInput/NumericInput.js +1 -2
- package/module/Overlay/Overlay.js +0 -30
- package/module/Pagination/Pagination.js +139 -135
- package/module/PieChart/PieChart.js +0 -1
- package/module/PieChart/index.js +1 -2
- package/module/Popover/Popover.js +117 -148
- package/module/Progress/Progress.js +1 -2
- package/module/Quantity/Quantity.js +112 -130
- package/module/Quantity/index.js +16 -1
- package/module/RadioButton/RadioButton.js +1 -2
- package/module/ReasonModal/ReasonModal.js +1 -2
- package/module/ReasonModal/index.js +0 -28
- package/module/ScanButton/ScanButton.js +0 -46
- package/module/SearchInput/SearchInput.js +1 -2
- package/module/SearchInput/index.js +3 -3
- package/module/SheetTitle/SheetTitle.js +35 -41
- package/module/Shell/Shell.js +79 -93
- package/module/Shell/styles.js +8 -9
- package/module/Shell/types.js +0 -1
- package/module/StatisticCard/StatisticCard.js +79 -49
- package/module/StatisticCard/index.js +1 -2
- package/module/Status/Status.js +1 -2
- package/module/Steps/Steps.js +1 -2
- package/module/TabTitle/TabTitle.js +0 -1
- package/module/TabTitle/index.js +1 -2
- package/module/TableColumnHeader/TableColumnHeader.js +0 -1
- package/module/TableColumnHeader/index.js +2 -8
- package/module/Tag/Tag.js +87 -73
- package/module/Task/Task.js +108 -1
- package/module/Task/type.js +0 -1
- package/module/Text/Text.js +70 -81
- package/module/TextArea/TextArea.js +0 -120
- package/module/Theme/ThemeProvider.js +1 -2
- package/module/Theme/defaultTheme.js +0 -21
- package/module/Theme/themed.d.js +0 -1
- package/module/Timeline/Timeline.js +0 -55
- package/module/Toast/Toast.js +1 -2
- package/module/UserSwitcher/UserSwitcher.js +171 -131
- package/module/UserSwitcher/index.js +2 -5
- package/module/common.js +8 -8
- package/module/index.js +131 -121
- package/package.json +2 -2
- package/commonjs/Alert/Alert.js.map +0 -2
- package/commonjs/AnimatedNavItem/AnimatedNavItem.js.map +0 -2
- package/commonjs/AnimatedNavItem/index.js.map +0 -1
- package/commonjs/BarChart/BarChart.js.map +0 -1
- package/commonjs/BarChart/index.js.map +0 -2
- package/commonjs/Button/Button.js.map +0 -2
- package/commonjs/Button/ButtonGroup.js.map +0 -2
- package/commonjs/Button/react-native-hoverable.d.js.map +0 -1
- package/commonjs/Calendar/Calendar.base.js.map +0 -1
- package/commonjs/Calendar/Calendar.js.map +0 -2
- package/commonjs/Calendar/ConcreteTimeSelector.js.map +0 -2
- package/commonjs/Calendar/CustomRange.js.map +0 -1
- package/commonjs/Calendar/DaySelector.js.map +0 -1
- package/commonjs/Calendar/MonthSelector.js.map +0 -1
- package/commonjs/Calendar/TimeSelector.js.map +0 -1
- package/commonjs/Calendar/WeekDaySelector.js.map +0 -1
- package/commonjs/Calendar/helper.js.map +0 -2
- package/commonjs/Calendar/local.js.map +0 -2
- package/commonjs/Calendar/types.js.map +0 -1
- package/commonjs/Card/Card.js.map +0 -2
- package/commonjs/CheckBox/CheckBox.js.map +0 -2
- package/commonjs/CheckBox/CheckBoxItem.js.map +0 -2
- package/commonjs/CheckBox/GroupCheckBox.js.map +0 -2
- package/commonjs/CircularProgress/CircularProgress.js.map +0 -2
- package/commonjs/Collapsible/Collapsible.js.map +0 -2
- package/commonjs/DashboardCard/DashboardCard.js.map +0 -2
- package/commonjs/DataCell/DataCell.js.map +0 -1
- package/commonjs/DataCell/index.js.map +0 -2
- package/commonjs/DataTable/DataTable.js.map +0 -1
- package/commonjs/DataTable/index.js.map +0 -1
- package/commonjs/DeviceSelectionModal/DeviceSelectionModal.js.map +0 -1
- package/commonjs/DraggableFlatList/DraggableFlatList.js.map +0 -1
- package/commonjs/Drawer/Drawer.js.map +0 -2
- package/commonjs/Dropdown/CustomDropdown.js.map +0 -1
- package/commonjs/Dropdown/Dropdown.js.map +0 -2
- package/commonjs/Dropdown/InputDropdown.js.map +0 -2
- package/commonjs/ExternalLink/ExternalLink.js.map +0 -1
- package/commonjs/Gantt/Accessories.js.map +0 -1
- package/commonjs/Gantt/Gantt.js.map +0 -1
- package/commonjs/Gantt/GanttInnerElementType.js.map +0 -2
- package/commonjs/Gantt/helper.js.map +0 -2
- package/commonjs/Gantt/types.js.map +0 -1
- package/commonjs/Grid/FixedSizeGrid.js.map +0 -1
- package/commonjs/Grid/Grid.base.js.map +0 -1
- package/commonjs/Grid/StaticFixedSizeGrid.js.map +0 -2
- package/commonjs/Grid/VariableSizeGrid.js.map +0 -2
- package/commonjs/Grid/helper.js.map +0 -2
- package/commonjs/Grid/timer.js.map +0 -1
- package/commonjs/Header/Header.js.map +0 -2
- package/commonjs/HelloWave/HelloWave.js.map +0 -2
- package/commonjs/Hoverable/Hoverable.js.map +0 -2
- package/commonjs/IconText/IconText.js.map +0 -1
- package/commonjs/Icons/TapasIcon.js.map +0 -2
- package/commonjs/Icons/TapasIconExpo.js.map +0 -1
- package/commonjs/Icons/expoFontLoader.js.map +0 -2
- package/commonjs/Icons/fontLoader.js.map +0 -2
- package/commonjs/Icons/index.js.map +0 -2
- package/commonjs/Icons/smartFontLoader.js.map +0 -2
- package/commonjs/Image/Image.js.map +0 -1
- package/commonjs/Image/PreviewImg.js.map +0 -2
- package/commonjs/Input/Input.js.map +0 -2
- package/commonjs/Layout/DrawerContext.js.map +0 -1
- package/commonjs/Layout/Layout.js.map +0 -2
- package/commonjs/Layout/ToastContext.js.map +0 -2
- package/commonjs/Layout/index.js.map +0 -1
- package/commonjs/LineChart/LineChart.js.map +0 -2
- package/commonjs/LineChart/index.js.map +0 -2
- package/commonjs/ListItem/ListItem.js.map +0 -1
- package/commonjs/Loading/Loading.js.map +0 -2
- package/commonjs/MessageBox/MessageBox.js.map +0 -2
- package/commonjs/MultiSelector/MultiSelector.js.map +0 -1
- package/commonjs/MultiSelector/index.js.map +0 -1
- package/commonjs/Navigation/Navigation.js.map +0 -2
- package/commonjs/Notification/Notification.js.map +0 -2
- package/commonjs/Notification/index.js.map +0 -2
- package/commonjs/NumericInput/NumericInput.js.map +0 -2
- package/commonjs/Overlay/Overlay.js.map +0 -2
- package/commonjs/Pagination/Pagination.js.map +0 -2
- package/commonjs/PieChart/PieChart.js.map +0 -2
- package/commonjs/PieChart/index.js.map +0 -2
- package/commonjs/Popover/Popover.js.map +0 -1
- package/commonjs/Progress/Progress.js.map +0 -1
- package/commonjs/Quantity/Quantity.js.map +0 -2
- package/commonjs/Quantity/index.js.map +0 -1
- package/commonjs/RadioButton/RadioButton.js.map +0 -1
- package/commonjs/ReasonModal/ReasonModal.js.map +0 -2
- package/commonjs/ReasonModal/index.js.map +0 -1
- package/commonjs/ScanButton/ScanButton.js.map +0 -1
- package/commonjs/SearchInput/SearchInput.js.map +0 -2
- package/commonjs/SearchInput/index.js.map +0 -2
- package/commonjs/SheetTitle/SheetTitle.js.map +0 -2
- package/commonjs/Shell/Shell.js.map +0 -2
- package/commonjs/Shell/styles.js.map +0 -2
- package/commonjs/Shell/types.js.map +0 -2
- package/commonjs/StatisticCard/StatisticCard.js.map +0 -1
- package/commonjs/StatisticCard/index.js.map +0 -2
- package/commonjs/Status/Status.js.map +0 -1
- package/commonjs/Steps/Steps.js.map +0 -1
- package/commonjs/TabTitle/TabTitle.js.map +0 -1
- package/commonjs/TabTitle/index.js.map +0 -2
- package/commonjs/TableColumnHeader/TableColumnHeader.js.map +0 -2
- package/commonjs/TableColumnHeader/index.js.map +0 -1
- package/commonjs/Tag/Tag.js.map +0 -2
- package/commonjs/Task/Task.js.map +0 -1
- package/commonjs/Task/type.js.map +0 -2
- package/commonjs/Text/Text.js.map +0 -2
- package/commonjs/TextArea/TextArea.js.map +0 -1
- package/commonjs/Theme/ThemeProvider.js.map +0 -1
- package/commonjs/Theme/defaultTheme.js.map +0 -1
- package/commonjs/Theme/themed.d.js.map +0 -1
- package/commonjs/Timeline/Timeline.js.map +0 -2
- package/commonjs/Toast/Toast.js.map +0 -1
- package/commonjs/UserSwitcher/UserSwitcher.js.map +0 -1
- package/commonjs/UserSwitcher/index.js.map +0 -1
- package/commonjs/common.js.map +0 -2
- package/commonjs/index.js.map +0 -1
- package/module/Alert/Alert.js.map +0 -2
- package/module/AnimatedNavItem/AnimatedNavItem.js.map +0 -2
- package/module/AnimatedNavItem/index.js.map +0 -1
- package/module/BarChart/BarChart.js.map +0 -1
- package/module/BarChart/index.js.map +0 -1
- package/module/Button/Button.js.map +0 -2
- package/module/Button/ButtonGroup.js.map +0 -1
- package/module/Button/react-native-hoverable.d.js.map +0 -1
- package/module/Calendar/Calendar.base.js.map +0 -1
- package/module/Calendar/Calendar.js.map +0 -2
- package/module/Calendar/ConcreteTimeSelector.js.map +0 -2
- package/module/Calendar/CustomRange.js.map +0 -1
- package/module/Calendar/DaySelector.js.map +0 -2
- package/module/Calendar/MonthSelector.js.map +0 -2
- package/module/Calendar/TimeSelector.js.map +0 -2
- package/module/Calendar/WeekDaySelector.js.map +0 -2
- package/module/Calendar/helper.js.map +0 -2
- package/module/Calendar/local.js.map +0 -1
- package/module/Calendar/types.js.map +0 -1
- package/module/Card/Card.js.map +0 -2
- package/module/CheckBox/CheckBox.js.map +0 -2
- package/module/CheckBox/CheckBoxItem.js.map +0 -2
- package/module/CheckBox/GroupCheckBox.js.map +0 -1
- package/module/CircularProgress/CircularProgress.js.map +0 -2
- package/module/Collapsible/Collapsible.js.map +0 -1
- package/module/DashboardCard/DashboardCard.js.map +0 -1
- package/module/DataCell/DataCell.js.map +0 -2
- package/module/DataCell/index.js.map +0 -2
- package/module/DataTable/DataTable.js.map +0 -2
- package/module/DataTable/index.js.map +0 -2
- package/module/DeviceSelectionModal/DeviceSelectionModal.js.map +0 -2
- package/module/DraggableFlatList/DraggableFlatList.js.map +0 -1
- package/module/Drawer/Drawer.js.map +0 -1
- package/module/Dropdown/CustomDropdown.js.map +0 -1
- package/module/Dropdown/Dropdown.js.map +0 -1
- package/module/Dropdown/InputDropdown.js.map +0 -2
- package/module/ExternalLink/ExternalLink.js.map +0 -2
- package/module/Gantt/Accessories.js.map +0 -1
- package/module/Gantt/Gantt.js.map +0 -2
- package/module/Gantt/GanttInnerElementType.js.map +0 -2
- package/module/Gantt/helper.js.map +0 -1
- package/module/Gantt/types.js.map +0 -1
- package/module/Grid/FixedSizeGrid.js.map +0 -2
- package/module/Grid/Grid.base.js.map +0 -2
- package/module/Grid/StaticFixedSizeGrid.js.map +0 -2
- package/module/Grid/VariableSizeGrid.js.map +0 -1
- package/module/Grid/helper.js.map +0 -2
- package/module/Grid/timer.js.map +0 -1
- package/module/Header/Header.js.map +0 -2
- package/module/HelloWave/HelloWave.js.map +0 -2
- package/module/Hoverable/Hoverable.js.map +0 -2
- package/module/IconText/IconText.js.map +0 -2
- package/module/Icons/TapasIcon.js.map +0 -2
- package/module/Icons/TapasIconExpo.js.map +0 -2
- package/module/Icons/expoFontLoader.js.map +0 -2
- package/module/Icons/fontLoader.js.map +0 -1
- package/module/Icons/index.js.map +0 -1
- package/module/Icons/smartFontLoader.js.map +0 -2
- package/module/Image/Image.js.map +0 -2
- package/module/Image/PreviewImg.js.map +0 -1
- package/module/Input/Input.js.map +0 -1
- package/module/Layout/DrawerContext.js.map +0 -2
- package/module/Layout/Layout.js.map +0 -2
- package/module/Layout/ToastContext.js.map +0 -2
- package/module/Layout/index.js.map +0 -2
- package/module/LineChart/LineChart.js.map +0 -2
- package/module/LineChart/index.js.map +0 -2
- package/module/ListItem/ListItem.js.map +0 -1
- package/module/Loading/Loading.js.map +0 -1
- package/module/MessageBox/MessageBox.js.map +0 -1
- package/module/MultiSelector/MultiSelector.js.map +0 -2
- package/module/MultiSelector/index.js.map +0 -2
- package/module/Navigation/Navigation.js.map +0 -1
- package/module/Notification/Notification.js.map +0 -1
- package/module/Notification/index.js.map +0 -2
- package/module/NumericInput/NumericInput.js.map +0 -2
- package/module/Overlay/Overlay.js.map +0 -1
- package/module/Pagination/Pagination.js.map +0 -1
- package/module/PieChart/PieChart.js.map +0 -1
- package/module/PieChart/index.js.map +0 -2
- package/module/Popover/Popover.js.map +0 -2
- package/module/Progress/Progress.js.map +0 -2
- package/module/Quantity/Quantity.js.map +0 -2
- package/module/Quantity/index.js.map +0 -1
- package/module/RadioButton/RadioButton.js.map +0 -2
- package/module/ReasonModal/ReasonModal.js.map +0 -2
- package/module/ReasonModal/index.js.map +0 -2
- package/module/ScanButton/ScanButton.js.map +0 -1
- package/module/SearchInput/SearchInput.js.map +0 -2
- package/module/SearchInput/index.js.map +0 -2
- package/module/SheetTitle/SheetTitle.js.map +0 -2
- package/module/Shell/Shell.js.map +0 -2
- package/module/Shell/styles.js.map +0 -2
- package/module/Shell/types.js.map +0 -2
- package/module/StatisticCard/StatisticCard.js.map +0 -1
- package/module/StatisticCard/index.js.map +0 -2
- package/module/Status/Status.js.map +0 -2
- package/module/Steps/Steps.js.map +0 -2
- package/module/TabTitle/TabTitle.js.map +0 -2
- package/module/TabTitle/index.js.map +0 -2
- package/module/TableColumnHeader/TableColumnHeader.js.map +0 -1
- package/module/TableColumnHeader/index.js.map +0 -2
- package/module/Tag/Tag.js.map +0 -1
- package/module/Task/Task.js.map +0 -2
- package/module/Task/type.js.map +0 -1
- package/module/Text/Text.js.map +0 -1
- package/module/TextArea/TextArea.js.map +0 -2
- package/module/Theme/ThemeProvider.js.map +0 -1
- package/module/Theme/defaultTheme.js.map +0 -2
- package/module/Theme/themed.d.js.map +0 -1
- package/module/Timeline/Timeline.js.map +0 -2
- package/module/Toast/Toast.js.map +0 -2
- package/module/UserSwitcher/UserSwitcher.js.map +0 -1
- package/module/UserSwitcher/index.js.map +0 -1
- package/module/common.js.map +0 -2
- package/module/index.js.map +0 -2
|
@@ -1,19 +1,71 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var __assign = void 0 && (void 0).__assign || function () {
|
|
4
|
+
__assign = Object.assign || function (t) {
|
|
5
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
6
|
+
s = arguments[i];
|
|
7
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __createBinding = void 0 && (void 0).__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 = {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function () {
|
|
20
|
+
return m[k];
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
Object.defineProperty(o, k2, desc);
|
|
25
|
+
} : function (o, m, k, k2) {
|
|
26
|
+
if (k2 === undefined) k2 = k;
|
|
27
|
+
o[k2] = m[k];
|
|
28
|
+
});
|
|
29
|
+
var __setModuleDefault = void 0 && (void 0).__setModuleDefault || (Object.create ? function (o, v) {
|
|
30
|
+
Object.defineProperty(o, "default", {
|
|
31
|
+
enumerable: true,
|
|
32
|
+
value: v
|
|
33
|
+
});
|
|
34
|
+
} : function (o, v) {
|
|
35
|
+
o["default"] = v;
|
|
36
|
+
});
|
|
37
|
+
var __importStar = void 0 && (void 0).__importStar || function () {
|
|
38
|
+
var ownKeys = function (o) {
|
|
39
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
40
|
+
var ar = [];
|
|
41
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
42
|
+
return ar;
|
|
43
|
+
};
|
|
44
|
+
return ownKeys(o);
|
|
45
|
+
};
|
|
46
|
+
return function (mod) {
|
|
47
|
+
if (mod && mod.__esModule) return mod;
|
|
48
|
+
var result = {};
|
|
49
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
50
|
+
__setModuleDefault(result, mod);
|
|
51
|
+
return result;
|
|
52
|
+
};
|
|
53
|
+
}();
|
|
54
|
+
var __importDefault = void 0 && (void 0).__importDefault || function (mod) {
|
|
55
|
+
return mod && mod.__esModule ? mod : {
|
|
56
|
+
"default": mod
|
|
57
|
+
};
|
|
58
|
+
};
|
|
3
59
|
Object.defineProperty(exports, "__esModule", {
|
|
4
60
|
value: true
|
|
5
61
|
});
|
|
6
|
-
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
var
|
|
13
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
15
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
16
|
-
const useStyles = (0, _themed.makeStyles)(theme => {
|
|
62
|
+
var react_1 = __importStar(require("react"));
|
|
63
|
+
var react_native_1 = require("react-native");
|
|
64
|
+
var TapasIcon_1 = __importDefault(require("../Icons/TapasIcon"));
|
|
65
|
+
var Dropdown_1 = __importDefault(require("../Dropdown/Dropdown"));
|
|
66
|
+
var themed_1 = require("@rneui/themed");
|
|
67
|
+
var common_1 = require("../common");
|
|
68
|
+
var useStyles = (0, themed_1.makeStyles)(function (theme) {
|
|
17
69
|
return {
|
|
18
70
|
container: {
|
|
19
71
|
display: 'flex',
|
|
@@ -79,12 +131,14 @@ const useStyles = (0, _themed.makeStyles)(theme => {
|
|
|
79
131
|
}
|
|
80
132
|
};
|
|
81
133
|
});
|
|
82
|
-
|
|
134
|
+
var generateArrayFromNumber = function (start, end) {
|
|
83
135
|
return Array.from({
|
|
84
136
|
length: end - start + 1
|
|
85
|
-
}, (_, i)
|
|
137
|
+
}, function (_, i) {
|
|
138
|
+
return start + i;
|
|
139
|
+
});
|
|
86
140
|
};
|
|
87
|
-
|
|
141
|
+
var DEFAULT_PAGE_SIZE_OPTIONS = [{
|
|
88
142
|
name: '1/Page',
|
|
89
143
|
value: 1
|
|
90
144
|
}, {
|
|
@@ -103,84 +157,92 @@ const DEFAULT_PAGE_SIZE_OPTIONS = [{
|
|
|
103
157
|
name: '100/Page',
|
|
104
158
|
value: 100
|
|
105
159
|
}];
|
|
106
|
-
|
|
107
|
-
|
|
160
|
+
var PAGINATION_STEP = 5;
|
|
161
|
+
var DEFAULT_PAGE_PARAMS = {
|
|
108
162
|
page: 1,
|
|
109
163
|
pageSize: 10,
|
|
110
164
|
totalItems: 0,
|
|
111
165
|
totalPage: 1
|
|
112
166
|
};
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
pageSizeOptions = DEFAULT_PAGE_SIZE_OPTIONS,
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
167
|
+
var Pagination = function (props) {
|
|
168
|
+
var styles = useStyles(props);
|
|
169
|
+
var totalCount = props.totalCount,
|
|
170
|
+
_a = props.pageSizeOptions,
|
|
171
|
+
pageSizeOptions = _a === void 0 ? DEFAULT_PAGE_SIZE_OPTIONS : _a,
|
|
172
|
+
_b = props.visiblePageSizeOptions,
|
|
173
|
+
visiblePageSizeOptions = _b === void 0 ? !common_1.isMobile : _b,
|
|
174
|
+
_c = props.visibleTotalCount,
|
|
175
|
+
visibleTotalCount = _c === void 0 ? !common_1.isMobile : _c,
|
|
176
|
+
onPageSizeChange = props.onPageSizeChange,
|
|
177
|
+
onPageChange = props.onPageChange;
|
|
178
|
+
var _d = react_1.default.useState(false),
|
|
179
|
+
isVisible = _d[0],
|
|
180
|
+
setIsVisible = _d[1];
|
|
181
|
+
var _e = react_1.default.useState({
|
|
182
|
+
totalGroups: 1,
|
|
183
|
+
currentGroup: 1
|
|
184
|
+
}),
|
|
185
|
+
pageGroup = _e[0],
|
|
186
|
+
setPageGroup = _e[1];
|
|
187
|
+
var _f = react_1.default.useState(props.pageParams || DEFAULT_PAGE_PARAMS),
|
|
188
|
+
pageParams = _f[0],
|
|
189
|
+
setPageParams = _f[1];
|
|
190
|
+
var _g = react_1.default.useState(pageSizeOptions.find(function (item) {
|
|
191
|
+
return item.value === pageParams.pageSize;
|
|
192
|
+
})),
|
|
193
|
+
selected = _g[0],
|
|
194
|
+
selectedItem = _g[1];
|
|
195
|
+
(0, react_1.useEffect)(function () {
|
|
131
196
|
if (pageParams.page < pageParams.totalPage && pageParams.page < pageGroup.currentGroup * PAGINATION_STEP) {
|
|
132
|
-
|
|
133
|
-
|
|
197
|
+
var totalPages = Math.ceil(pageParams.totalItems / pageParams.pageSize);
|
|
198
|
+
var currentGroup = Math.floor(pageParams.page / PAGINATION_STEP) + 1;
|
|
134
199
|
setPageGroup({
|
|
135
200
|
currentGroup: currentGroup,
|
|
136
201
|
totalGroups: Math.ceil(totalPages / PAGINATION_STEP)
|
|
137
202
|
});
|
|
138
203
|
}
|
|
139
204
|
}, [pageParams]);
|
|
140
|
-
(0,
|
|
205
|
+
(0, react_1.useEffect)(function () {
|
|
141
206
|
if (props.pageParams) {
|
|
142
207
|
setPageParams(props.pageParams);
|
|
143
|
-
selectedItem(pageSizeOptions.find(
|
|
208
|
+
selectedItem(pageSizeOptions.find(function (item) {
|
|
209
|
+
return item.value === pageParams.pageSize;
|
|
210
|
+
}));
|
|
144
211
|
}
|
|
145
212
|
}, [props.pageParams]);
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
...pageParams,
|
|
213
|
+
var handelDigitPress = function (digit) {
|
|
214
|
+
var newPageParams = __assign(__assign({}, pageParams), {
|
|
149
215
|
page: digit
|
|
150
|
-
};
|
|
216
|
+
});
|
|
151
217
|
setPageParams(newPageParams);
|
|
152
218
|
onPageChange && onPageChange(newPageParams);
|
|
153
219
|
};
|
|
154
|
-
|
|
155
|
-
return numbers.map((digit, index)
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
220
|
+
var renderDigits = function (numbers) {
|
|
221
|
+
return numbers.map(function (digit, index) {
|
|
222
|
+
return react_1.default.createElement(react_native_1.TouchableOpacity, {
|
|
223
|
+
key: index,
|
|
224
|
+
style: [styles.digitContainer, index + ((pageGroup.currentGroup - 1) * PAGINATION_STEP + 1) === pageParams.page && styles.digitSelected],
|
|
225
|
+
onPress: function () {
|
|
226
|
+
handelDigitPress(digit);
|
|
227
|
+
}
|
|
228
|
+
}, react_1.default.createElement(react_native_1.Text, {
|
|
229
|
+
style: styles.digitText
|
|
230
|
+
}, digit));
|
|
231
|
+
});
|
|
164
232
|
};
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
totalGroups
|
|
169
|
-
} = pageGroup;
|
|
233
|
+
var hasNextPage = function () {
|
|
234
|
+
var currentGroup = pageGroup.currentGroup,
|
|
235
|
+
totalGroups = pageGroup.totalGroups;
|
|
170
236
|
return currentGroup < totalGroups;
|
|
171
237
|
};
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
currentGroup
|
|
175
|
-
} = pageGroup;
|
|
238
|
+
var hasPreviousPage = function () {
|
|
239
|
+
var currentGroup = pageGroup.currentGroup;
|
|
176
240
|
return currentGroup > 1;
|
|
177
241
|
};
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
} = pageGroup;
|
|
183
|
-
let newGroup = currentGroup;
|
|
242
|
+
var handleChangeGroup = function (type) {
|
|
243
|
+
var currentGroup = pageGroup.currentGroup,
|
|
244
|
+
totalGroups = pageGroup.totalGroups;
|
|
245
|
+
var newGroup = currentGroup;
|
|
184
246
|
switch (type) {
|
|
185
247
|
case 'next':
|
|
186
248
|
if (currentGroup < totalGroups) {
|
|
@@ -193,71 +255,28 @@ const Pagination = props => {
|
|
|
193
255
|
}
|
|
194
256
|
break;
|
|
195
257
|
}
|
|
196
|
-
setPageGroup({
|
|
197
|
-
...pageGroup,
|
|
258
|
+
setPageGroup(__assign(__assign({}, pageGroup), {
|
|
198
259
|
currentGroup: newGroup
|
|
199
|
-
});
|
|
260
|
+
}));
|
|
200
261
|
};
|
|
201
|
-
return
|
|
262
|
+
return react_1.default.createElement(react_native_1.View, {
|
|
202
263
|
style: [styles.container, props.paginationContainerStyle],
|
|
203
264
|
testID: "pagination"
|
|
204
|
-
}, visibleTotalCount &&
|
|
265
|
+
}, visibleTotalCount && react_1.default.createElement(react_native_1.Text, {
|
|
205
266
|
style: styles.digitText
|
|
206
|
-
}, totalCount),
|
|
267
|
+
}, totalCount), react_1.default.createElement(react_native_1.View, {
|
|
207
268
|
style: styles.digitsContainer
|
|
208
|
-
}, hasPreviousPage() ?
|
|
209
|
-
onPress: ()
|
|
269
|
+
}, hasPreviousPage() ? react_1.default.createElement(react_native_1.TouchableOpacity, {
|
|
270
|
+
onPress: function () {
|
|
210
271
|
handleChangeGroup('previous');
|
|
211
272
|
}
|
|
212
|
-
},
|
|
273
|
+
}, react_1.default.createElement(TapasIcon_1.default, {
|
|
213
274
|
name: "chevron_left",
|
|
214
275
|
style: styles.digitIconActive
|
|
215
|
-
})) :
|
|
276
|
+
})) : react_1.default.createElement(TapasIcon_1.default, {
|
|
216
277
|
name: "chevron_left",
|
|
217
278
|
style: styles.digitIconDisabled
|
|
218
|
-
}), renderDigits(generateArrayFromNumber((pageGroup.currentGroup - 1) * PAGINATION_STEP + 1, pageParams.totalPage > pageGroup.currentGroup * PAGINATION_STEP ? pageGroup.currentGroup * PAGINATION_STEP : pageParams.totalPage)), hasNextPage() ?
|
|
219
|
-
onPress: () => {
|
|
220
|
-
handleChangeGroup('next');
|
|
221
|
-
}
|
|
222
|
-
}, /*#__PURE__*/_react.default.createElement(_TapasIcon.default, {
|
|
223
|
-
name: "chevron_right",
|
|
224
|
-
style: styles.digitIconActive
|
|
225
|
-
})) : /*#__PURE__*/_react.default.createElement(_TapasIcon.default, {
|
|
226
|
-
name: "chevron_right",
|
|
227
|
-
style: styles.digitIconDisabled
|
|
228
|
-
})), visiblePageSizeOptions && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
229
|
-
style: styles.gap
|
|
230
|
-
}, " | "), /*#__PURE__*/_react.default.createElement(_Dropdown.default, {
|
|
231
|
-
options: pageSizeOptions,
|
|
232
|
-
value: selected,
|
|
233
|
-
width: 100
|
|
234
|
-
// @ts-ignore
|
|
235
|
-
,
|
|
236
|
-
subWidth: 100,
|
|
237
|
-
dropdownButtonStyle: styles.dropdownButtonStyle,
|
|
238
|
-
dropdownButtonSelectedStyle: styles.dropdownButtonSelectedStyle
|
|
239
|
-
// @ts-ignore
|
|
240
|
-
,
|
|
241
|
-
textExpandedStyle: styles.textExpandedStyle
|
|
242
|
-
// @ts-ignore
|
|
243
|
-
,
|
|
244
|
-
iconExpandedStyle: styles.textExpandedStyle,
|
|
245
|
-
onChange: item => {
|
|
246
|
-
selectedItem(item);
|
|
247
|
-
onPageSizeChange && onPageSizeChange(item);
|
|
248
|
-
},
|
|
249
|
-
subContainerPosition: props.pageSizePosition,
|
|
250
|
-
isVisible: isVisible,
|
|
251
|
-
onClose: () => {
|
|
252
|
-
setIsVisible(!isVisible);
|
|
253
|
-
},
|
|
254
|
-
onPress: () => {
|
|
255
|
-
setIsVisible(!isVisible);
|
|
256
|
-
}
|
|
257
|
-
})));
|
|
258
|
-
};
|
|
259
|
-
var _default = exports.default = Pagination;
|
|
260
|
-
//# sourceMappingURL=Pagination.js.mapve_1.TouchableOpacity, {
|
|
279
|
+
}), renderDigits(generateArrayFromNumber((pageGroup.currentGroup - 1) * PAGINATION_STEP + 1, pageParams.totalPage > pageGroup.currentGroup * PAGINATION_STEP ? pageGroup.currentGroup * PAGINATION_STEP : pageParams.totalPage)), hasNextPage() ? react_1.default.createElement(react_native_1.TouchableOpacity, {
|
|
261
280
|
onPress: function () {
|
|
262
281
|
handleChangeGroup('next');
|
|
263
282
|
}
|
|
@@ -296,4 +315,3 @@ var _default = exports.default = Pagination;
|
|
|
296
315
|
})));
|
|
297
316
|
};
|
|
298
317
|
exports.default = Pagination;
|
|
299
|
-
//# sourceMappingURL=Pagination.js.map
|
|
@@ -1,72 +1,55 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var __assign = void 0 && (void 0).__assign || function () {
|
|
4
|
-
__assign = Object.assign || function (t) {
|
|
5
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
6
|
-
s = arguments[i];
|
|
7
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var __importDefault = void 0 && (void 0).__importDefault || function (mod) {
|
|
14
|
-
return mod && mod.__esModule ? mod : {
|
|
15
|
-
"default": mod
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
3
|
Object.defineProperty(exports, "__esModule", {
|
|
19
4
|
value: true
|
|
20
5
|
});
|
|
21
6
|
exports.PieChart = void 0;
|
|
22
|
-
var
|
|
23
|
-
var
|
|
24
|
-
var
|
|
25
|
-
var
|
|
26
|
-
var
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
showLegend = _g === void 0 ? true : _g,
|
|
43
|
-
centerText = _a.centerText,
|
|
44
|
-
style = _a.style,
|
|
45
|
-
testID = _a.testID;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _reactNativeSvgCharts = require("react-native-svg-charts");
|
|
10
|
+
var _reactNativeSvg = require("react-native-svg");
|
|
11
|
+
var _Text = _interopRequireDefault(require("../Text/Text"));
|
|
12
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
|
+
const DEFAULT_COLORS = ['#FF6B00', '#0066CC', '#00B894', '#6C5CE7', '#FFB800', '#D63031'];
|
|
14
|
+
const PieChart = ({
|
|
15
|
+
data,
|
|
16
|
+
width,
|
|
17
|
+
height = 300,
|
|
18
|
+
colors = DEFAULT_COLORS,
|
|
19
|
+
innerRadius = 0,
|
|
20
|
+
padAngle = 0.02,
|
|
21
|
+
showLabels = false,
|
|
22
|
+
showLegend = true,
|
|
23
|
+
centerText,
|
|
24
|
+
style,
|
|
25
|
+
testID
|
|
26
|
+
}) => {
|
|
46
27
|
if (data.length === 0) {
|
|
47
|
-
return
|
|
28
|
+
return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
48
29
|
style: [styles.container, {
|
|
49
|
-
height
|
|
30
|
+
height
|
|
50
31
|
}, style]
|
|
51
|
-
},
|
|
32
|
+
}, /*#__PURE__*/_react.default.createElement(_Text.default, {
|
|
52
33
|
style: styles.emptyText
|
|
53
34
|
}, "No data available"));
|
|
54
35
|
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
36
|
+
const pieData = data.map((item, index) => ({
|
|
37
|
+
...item,
|
|
38
|
+
svg: {
|
|
39
|
+
fill: item.color || colors[index % colors.length]
|
|
40
|
+
},
|
|
41
|
+
key: item.key || `pie-slice-${index}`
|
|
42
|
+
}));
|
|
43
|
+
const Labels = ({
|
|
44
|
+
slices
|
|
45
|
+
}) => {
|
|
65
46
|
if (!showLabels) return null;
|
|
66
|
-
return slices.map(
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
47
|
+
return slices.map((slice, index) => {
|
|
48
|
+
const {
|
|
49
|
+
labelCentroid,
|
|
50
|
+
data
|
|
51
|
+
} = slice;
|
|
52
|
+
return /*#__PURE__*/_react.default.createElement(_reactNativeSvg.Text, {
|
|
70
53
|
key: index,
|
|
71
54
|
x: labelCentroid[0],
|
|
72
55
|
y: labelCentroid[1],
|
|
@@ -75,17 +58,18 @@ var PieChart = function (_a) {
|
|
|
75
58
|
alignmentBaseline: 'middle',
|
|
76
59
|
fontSize: 12,
|
|
77
60
|
fontWeight: "bold"
|
|
78
|
-
},
|
|
61
|
+
}, `${data.value.toFixed(0)}`);
|
|
79
62
|
});
|
|
80
63
|
};
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
64
|
+
const CenterLabel = ({
|
|
65
|
+
slices
|
|
66
|
+
}) => {
|
|
84
67
|
if (!centerText) return null;
|
|
68
|
+
|
|
85
69
|
// 计算饼图中心点
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
return
|
|
70
|
+
const centerX = slices[0]?.pieCentroid[0] || 0;
|
|
71
|
+
const centerY = slices[0]?.pieCentroid[1] || 0;
|
|
72
|
+
return /*#__PURE__*/_react.default.createElement(_reactNativeSvg.Text, {
|
|
89
73
|
x: centerX,
|
|
90
74
|
y: centerY,
|
|
91
75
|
fill: '#2C3E50',
|
|
@@ -95,33 +79,72 @@ var PieChart = function (_a) {
|
|
|
95
79
|
fontWeight: "bold"
|
|
96
80
|
}, centerText);
|
|
97
81
|
};
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
}, 0);
|
|
101
|
-
return react_1.default.createElement(react_native_1.View, {
|
|
82
|
+
const total = data.reduce((sum, item) => sum + item.value, 0);
|
|
83
|
+
return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
102
84
|
style: [styles.container, {
|
|
103
|
-
height
|
|
85
|
+
height,
|
|
104
86
|
width: width || '100%'
|
|
105
87
|
}, style],
|
|
106
88
|
testID: testID
|
|
107
|
-
},
|
|
89
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNativeSvgCharts.PieChart, {
|
|
108
90
|
style: {
|
|
109
91
|
height: height - (showLegend ? 80 : 20)
|
|
110
92
|
},
|
|
111
93
|
data: pieData,
|
|
112
94
|
innerRadius: innerRadius,
|
|
113
95
|
padAngle: padAngle
|
|
114
|
-
},
|
|
96
|
+
}, /*#__PURE__*/_react.default.createElement(Labels, null), /*#__PURE__*/_react.default.createElement(CenterLabel, null)), showLegend && /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
115
97
|
style: styles.legend
|
|
116
|
-
}, data.map(
|
|
117
|
-
|
|
118
|
-
return
|
|
98
|
+
}, data.map((item, index) => {
|
|
99
|
+
const percentage = total > 0 ? (item.value / total * 100).toFixed(1) : '0.0';
|
|
100
|
+
return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
119
101
|
key: index,
|
|
120
102
|
style: styles.legendItem
|
|
121
|
-
},
|
|
103
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
122
104
|
style: [styles.legendColor, {
|
|
123
105
|
backgroundColor: item.color || colors[index % colors.length]
|
|
124
106
|
}]
|
|
107
|
+
}), /*#__PURE__*/_react.default.createElement(_Text.default, {
|
|
108
|
+
style: styles.legendLabel
|
|
109
|
+
}, item.label, ": ", item.value.toFixed(0), " (", percentage, "%)"));
|
|
110
|
+
})));
|
|
111
|
+
};
|
|
112
|
+
exports.PieChart = PieChart;
|
|
113
|
+
const styles = _reactNative.StyleSheet.create({
|
|
114
|
+
container: {
|
|
115
|
+
backgroundColor: 'transparent',
|
|
116
|
+
justifyContent: 'center',
|
|
117
|
+
alignItems: 'center'
|
|
118
|
+
},
|
|
119
|
+
legend: {
|
|
120
|
+
flexDirection: 'row',
|
|
121
|
+
flexWrap: 'wrap',
|
|
122
|
+
justifyContent: 'center',
|
|
123
|
+
marginTop: 16,
|
|
124
|
+
paddingHorizontal: 16
|
|
125
|
+
},
|
|
126
|
+
legendItem: {
|
|
127
|
+
flexDirection: 'row',
|
|
128
|
+
alignItems: 'center',
|
|
129
|
+
marginRight: 16,
|
|
130
|
+
marginBottom: 8
|
|
131
|
+
},
|
|
132
|
+
legendColor: {
|
|
133
|
+
width: 12,
|
|
134
|
+
height: 12,
|
|
135
|
+
borderRadius: 2,
|
|
136
|
+
marginRight: 6
|
|
137
|
+
},
|
|
138
|
+
legendLabel: {
|
|
139
|
+
fontSize: 12,
|
|
140
|
+
color: '#2C3E50'
|
|
141
|
+
},
|
|
142
|
+
emptyText: {
|
|
143
|
+
textAlign: 'center',
|
|
144
|
+
color: '#999'
|
|
145
|
+
}
|
|
146
|
+
});
|
|
147
|
+
|
|
125
148
|
}), react_1.default.createElement(Text_1.default, {
|
|
126
149
|
style: styles.legendLabel
|
|
127
150
|
}, item.label, ": ", item.value.toFixed(0), " (", percentage, "%)"));
|
|
@@ -162,4 +185,3 @@ var styles = react_native_1.StyleSheet.create({
|
|
|
162
185
|
color: '#999'
|
|
163
186
|
}
|
|
164
187
|
});
|
|
165
|
-
//# sourceMappingURL=PieChart.js.map
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
exports.PieChart = void 0;
|
|
7
|
+
var PieChart_1 = require("./PieChart");
|
|
6
8
|
Object.defineProperty(exports, "PieChart", {
|
|
7
9
|
enumerable: true,
|
|
8
10
|
get: function () {
|
|
9
|
-
return
|
|
11
|
+
return PieChart_1.PieChart;
|
|
10
12
|
}
|
|
11
13
|
});
|
|
12
|
-
var _PieChart = require("./PieChart");
|
|
13
|
-
//# sourceMappingURL=index.js.mapsourceMappingURL=index.js.map
|