@axelor/aos-mobile-ui 9.1.11 → 9.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/atoms/BorderBar/BorderBar.d.ts +9 -0
- package/lib/components/atoms/BorderBar/BorderBar.js +30 -0
- package/lib/components/atoms/BorderBar/BorderBar.js.map +1 -0
- package/lib/components/atoms/Card/Card.d.ts +2 -1
- package/lib/components/atoms/Card/Card.js +2 -2
- package/lib/components/atoms/Card/Card.js.map +1 -1
- package/lib/components/atoms/HorizontalRule/HorizontalRule.d.ts +3 -1
- package/lib/components/atoms/HorizontalRule/HorizontalRule.js +5 -7
- package/lib/components/atoms/HorizontalRule/HorizontalRule.js.map +1 -1
- package/lib/components/atoms/HtmlInput/HtmlInput.d.ts +3 -1
- package/lib/components/atoms/HtmlInput/HtmlInput.js +13 -8
- package/lib/components/atoms/HtmlInput/HtmlInput.js.map +1 -1
- package/lib/components/atoms/HtmlViewer/HtmlViewer.d.ts +10 -0
- package/lib/components/atoms/HtmlViewer/HtmlViewer.js +93 -0
- package/lib/components/atoms/HtmlViewer/HtmlViewer.js.map +1 -0
- package/lib/components/atoms/Icon/Icon.d.ts +2 -1
- package/lib/components/atoms/Icon/Icon.js +4 -5
- package/lib/components/atoms/Icon/Icon.js.map +1 -1
- package/lib/components/atoms/Input/Input.d.ts +5 -5
- package/lib/components/atoms/Input/Input.js +6 -5
- package/lib/components/atoms/Input/Input.js.map +1 -1
- package/lib/components/atoms/ProgressCircle/ProgressCircle.js +11 -7
- package/lib/components/atoms/ProgressCircle/ProgressCircle.js.map +1 -1
- package/lib/components/atoms/RadioButton/RadioButton.js +25 -21
- package/lib/components/atoms/RadioButton/RadioButton.js.map +1 -1
- package/lib/components/atoms/Screen/Screen.d.ts +1 -2
- package/lib/components/atoms/Screen/Screen.js +2 -9
- package/lib/components/atoms/Screen/Screen.js.map +1 -1
- package/lib/components/atoms/Switch/Switch.d.ts +1 -1
- package/lib/components/atoms/Switch/Switch.js +5 -5
- package/lib/components/atoms/Switch/Switch.js.map +1 -1
- package/lib/components/atoms/Text/Text.d.ts +2 -1
- package/lib/components/atoms/Text/Text.js +1 -1
- package/lib/components/atoms/Text/Text.js.map +1 -1
- package/lib/components/atoms/VerticalRule/VerticalRule.d.ts +8 -0
- package/lib/components/atoms/VerticalRule/VerticalRule.js +33 -0
- package/lib/components/atoms/VerticalRule/VerticalRule.js.map +1 -0
- package/lib/components/atoms/index.d.ts +3 -0
- package/lib/components/atoms/index.js +3 -0
- package/lib/components/atoms/index.js.map +1 -1
- package/lib/components/molecules/Alert/Alert.js +18 -30
- package/lib/components/molecules/Alert/Alert.js.map +1 -1
- package/lib/components/molecules/Badge/Badge.d.ts +2 -1
- package/lib/components/molecules/Badge/Badge.js +15 -12
- package/lib/components/molecules/Badge/Badge.js.map +1 -1
- package/lib/components/molecules/BottomSheet/BottomSheet.js +1 -1
- package/lib/components/molecules/BottomSheet/BottomSheet.js.map +1 -1
- package/lib/components/molecules/Breadcrumb/Breadcrumb.js +1 -1
- package/lib/components/molecules/Button/Button.d.ts +2 -1
- package/lib/components/molecules/Button/Button.js +6 -12
- package/lib/components/molecules/Button/Button.js.map +1 -1
- package/lib/components/molecules/CalendarLegend/CalendarLegend.d.ts +13 -0
- package/lib/components/molecules/CalendarLegend/CalendarLegend.js +89 -0
- package/lib/components/molecules/CalendarLegend/CalendarLegend.js.map +1 -0
- package/lib/components/molecules/CalendarLegend/index.d.ts +2 -0
- package/lib/components/molecules/CalendarLegend/index.js +19 -0
- package/lib/components/molecules/CalendarLegend/index.js.map +1 -0
- package/lib/components/molecules/CalendarLegend/types.d.ts +6 -0
- package/lib/components/molecules/CalendarLegend/types.js +19 -0
- package/lib/components/molecules/CalendarLegend/types.js.map +1 -0
- package/lib/components/molecules/CalendarMonthGrid/CalendarMonthGrid.d.ts +15 -0
- package/lib/components/molecules/CalendarMonthGrid/CalendarMonthGrid.js +49 -0
- package/lib/components/molecules/CalendarMonthGrid/CalendarMonthGrid.js.map +1 -0
- package/lib/components/molecules/CalendarMonthGrid/CalendarMonthTitle.d.ts +8 -0
- package/lib/components/molecules/CalendarMonthGrid/CalendarMonthTitle.js +35 -0
- package/lib/components/molecules/CalendarMonthGrid/CalendarMonthTitle.js.map +1 -0
- package/lib/components/molecules/CalendarMonthGrid/CalendarWeekDays.d.ts +7 -0
- package/lib/components/molecules/CalendarMonthGrid/CalendarWeekDays.js +44 -0
- package/lib/components/molecules/CalendarMonthGrid/CalendarWeekDays.js.map +1 -0
- package/lib/components/molecules/CalendarMonthGrid/index.d.ts +3 -0
- package/lib/components/molecules/CalendarMonthGrid/index.js +21 -0
- package/lib/components/molecules/CalendarMonthGrid/index.js.map +1 -0
- package/lib/components/molecules/CardIconButton/CardIconButton.js +1 -1
- package/lib/components/molecules/Checkbox/Checkbox.d.ts +1 -1
- package/lib/components/molecules/Checkbox/Checkbox.js +11 -27
- package/lib/components/molecules/Checkbox/Checkbox.js.map +1 -1
- package/lib/components/molecules/Chip/Chip.d.ts +1 -1
- package/lib/components/molecules/Chip/Chip.js +23 -19
- package/lib/components/molecules/Chip/Chip.js.map +1 -1
- package/lib/components/molecules/CircleButton/CircleButton.js +1 -1
- package/lib/components/molecules/CircleButton/CircleButton.js.map +1 -1
- package/lib/components/molecules/ClearableCard/ClearableCard.js +2 -7
- package/lib/components/molecules/ClearableCard/ClearableCard.js.map +1 -1
- package/lib/components/molecules/DoubleIcon/DoubleIcon.js +1 -1
- package/lib/components/molecules/DoubleIcon/DoubleIcon.js.map +1 -1
- package/lib/components/molecules/DropdownCard/DropdownCard.d.ts +4 -3
- package/lib/components/molecules/DropdownCard/DropdownCard.js +36 -55
- package/lib/components/molecules/DropdownCard/DropdownCard.js.map +1 -1
- package/lib/components/molecules/DropdownMenu/DropdownMenu.d.ts +4 -2
- package/lib/components/molecules/DropdownMenu/DropdownMenu.js +52 -26
- package/lib/components/molecules/DropdownMenu/DropdownMenu.js.map +1 -1
- package/lib/components/molecules/EditableHtmlInput/EditableHtmlInput.js +2 -3
- package/lib/components/molecules/EditableHtmlInput/EditableHtmlInput.js.map +1 -1
- package/lib/components/molecules/EditableInput/EditableInput.js +4 -17
- package/lib/components/molecules/EditableInput/EditableInput.js.map +1 -1
- package/lib/components/molecules/FormHtmlInput/FormHtmlInput.d.ts +2 -2
- package/lib/components/molecules/FormHtmlInput/FormHtmlInput.js +13 -23
- package/lib/components/molecules/FormHtmlInput/FormHtmlInput.js.map +1 -1
- package/lib/components/molecules/FormIncrementInput/FormIncrementInput.js +6 -17
- package/lib/components/molecules/FormIncrementInput/FormIncrementInput.js.map +1 -1
- package/lib/components/molecules/FormInput/FormInput.d.ts +1 -1
- package/lib/components/molecules/FormInput/FormInput.js +2 -9
- package/lib/components/molecules/FormInput/FormInput.js.map +1 -1
- package/lib/components/molecules/FormSlider/FormSlider.js +3 -13
- package/lib/components/molecules/FormSlider/FormSlider.js.map +1 -1
- package/lib/components/molecules/GroupedCard/GroupedCard.d.ts +13 -0
- package/lib/components/molecules/GroupedCard/GroupedCard.js +60 -0
- package/lib/components/molecules/GroupedCard/GroupedCard.js.map +1 -0
- package/lib/components/molecules/HorizontalRuleText/HorizontalRuleText.js +5 -6
- package/lib/components/molecules/HorizontalRuleText/HorizontalRuleText.js.map +1 -1
- package/lib/components/molecules/IconInput/IconInput.d.ts +4 -4
- package/lib/components/molecules/IconInput/IconInput.js +15 -23
- package/lib/components/molecules/IconInput/IconInput.js.map +1 -1
- package/lib/components/molecules/IconTile/IconTile.d.ts +19 -0
- package/lib/components/molecules/IconTile/IconTile.js +43 -0
- package/lib/components/molecules/IconTile/IconTile.js.map +1 -0
- package/lib/components/molecules/Increment/Increment.d.ts +1 -1
- package/lib/components/molecules/Increment/Increment.js +3 -5
- package/lib/components/molecules/Increment/Increment.js.map +1 -1
- package/lib/components/molecules/Increment/IncrementButton.js +7 -14
- package/lib/components/molecules/Increment/IncrementButton.js.map +1 -1
- package/lib/components/molecules/Label/Label.d.ts +1 -1
- package/lib/components/molecules/Label/Label.js +11 -15
- package/lib/components/molecules/Label/Label.js.map +1 -1
- package/lib/components/molecules/LabelText/LabelText.js +6 -4
- package/lib/components/molecules/LabelText/LabelText.js.map +1 -1
- package/lib/components/molecules/MovementIndicationCard/MovementIndicationCard.d.ts +6 -7
- package/lib/components/molecules/MovementIndicationCard/MovementIndicationCard.js +91 -33
- package/lib/components/molecules/MovementIndicationCard/MovementIndicationCard.js.map +1 -1
- package/lib/components/molecules/MultiValuePickerButton/MultiValuePickerButton.js +21 -33
- package/lib/components/molecules/MultiValuePickerButton/MultiValuePickerButton.js.map +1 -1
- package/lib/components/molecules/NotesCard/NotesCard.d.ts +2 -1
- package/lib/components/molecules/NotesCard/NotesCard.js +11 -15
- package/lib/components/molecules/NotesCard/NotesCard.js.map +1 -1
- package/lib/components/molecules/NumberBubble/NumberBubble.js +2 -2
- package/lib/components/molecules/NumberBubble/NumberBubble.js.map +1 -1
- package/lib/components/molecules/NumberChevronInput/NumberChevronInput.d.ts +5 -3
- package/lib/components/molecules/NumberChevronInput/NumberChevronInput.js +35 -28
- package/lib/components/molecules/NumberChevronInput/NumberChevronInput.js.map +1 -1
- package/lib/components/molecules/PanelTabs/PanelTabs.js +1 -1
- package/lib/components/molecules/PeriodNavigation/PeriodNavigation.d.ts +14 -0
- package/lib/components/molecules/PeriodNavigation/PeriodNavigation.js +45 -0
- package/lib/components/molecules/PeriodNavigation/PeriodNavigation.js.map +1 -0
- package/lib/components/molecules/RadioSelect/RadioSelect.js +8 -8
- package/lib/components/molecules/RadioSelect/RadioSelect.js.map +1 -1
- package/lib/components/molecules/RightIconButton/RightIconButton.d.ts +4 -1
- package/lib/components/molecules/RightIconButton/RightIconButton.js +8 -7
- package/lib/components/molecules/RightIconButton/RightIconButton.js.map +1 -1
- package/lib/components/molecules/SelectionContainer/SelectionContainer.d.ts +2 -1
- package/lib/components/molecules/SelectionContainer/SelectionContainer.js +46 -58
- package/lib/components/molecules/SelectionContainer/SelectionContainer.js.map +1 -1
- package/lib/components/molecules/StarScore/StarScore.d.ts +1 -1
- package/lib/components/molecules/StarScore/StarScore.js +7 -10
- package/lib/components/molecules/StarScore/StarScore.js.map +1 -1
- package/lib/components/molecules/Stepper/StepList.d.ts +2 -1
- package/lib/components/molecules/Stepper/StepList.js +14 -12
- package/lib/components/molecules/Stepper/StepList.js.map +1 -1
- package/lib/components/molecules/Stepper/Stepper.d.ts +1 -2
- package/lib/components/molecules/Stepper/Stepper.js +17 -28
- package/lib/components/molecules/Stepper/Stepper.js.map +1 -1
- package/lib/components/molecules/SwitchCard/SwitchCard.d.ts +6 -2
- package/lib/components/molecules/SwitchCard/SwitchCard.js +6 -13
- package/lib/components/molecules/SwitchCard/SwitchCard.js.map +1 -1
- package/lib/components/molecules/TextUnit/TextUnit.js +3 -3
- package/lib/components/molecules/TextUnit/TextUnit.js.map +1 -1
- package/lib/components/molecules/ToggleSwitch/ToggleSwitch.js +34 -34
- package/lib/components/molecules/ToggleSwitch/ToggleSwitch.js.map +1 -1
- package/lib/components/molecules/ViewAllContainer/ViewAllContainer.d.ts +2 -1
- package/lib/components/molecules/ViewAllContainer/ViewAllContainer.js +24 -33
- package/lib/components/molecules/ViewAllContainer/ViewAllContainer.js.map +1 -1
- package/lib/components/molecules/index.d.ts +5 -0
- package/lib/components/molecules/index.js +5 -0
- package/lib/components/molecules/index.js.map +1 -1
- package/lib/components/organisms/ActionCard/ActionCard.js +4 -5
- package/lib/components/organisms/ActionCard/ActionCard.js.map +1 -1
- package/lib/components/organisms/ActionSheet/ActionSheet.d.ts +2 -1
- package/lib/components/organisms/ActionSheet/ActionSheet.js +18 -8
- package/lib/components/organisms/ActionSheet/ActionSheet.js.map +1 -1
- package/lib/components/organisms/AgendaView/AgendaDayCell.d.ts +13 -0
- package/lib/components/organisms/AgendaView/AgendaDayCell.js +71 -0
- package/lib/components/organisms/AgendaView/AgendaDayCell.js.map +1 -0
- package/lib/components/organisms/AgendaView/AgendaDayRow.d.ts +14 -0
- package/lib/components/organisms/AgendaView/AgendaDayRow.js +65 -0
- package/lib/components/organisms/AgendaView/AgendaDayRow.js.map +1 -0
- package/lib/components/organisms/AgendaView/AgendaHeader.d.ts +12 -0
- package/lib/components/organisms/AgendaView/AgendaHeader.js +44 -0
- package/lib/components/organisms/AgendaView/AgendaHeader.js.map +1 -0
- package/lib/components/organisms/AgendaView/AgendaItemRow.d.ts +8 -0
- package/lib/components/organisms/AgendaView/AgendaItemRow.js +58 -0
- package/lib/components/organisms/AgendaView/AgendaItemRow.js.map +1 -0
- package/lib/components/organisms/AgendaView/AgendaMonth.d.ts +16 -0
- package/lib/components/organisms/AgendaView/AgendaMonth.js +26 -0
- package/lib/components/organisms/AgendaView/AgendaMonth.js.map +1 -0
- package/lib/components/organisms/AgendaView/AgendaMonthSeparator.d.ts +7 -0
- package/lib/components/organisms/AgendaView/AgendaMonthSeparator.js +41 -0
- package/lib/components/organisms/AgendaView/AgendaMonthSeparator.js.map +1 -0
- package/lib/components/organisms/AgendaView/AgendaView.d.ts +24 -0
- package/lib/components/organisms/AgendaView/AgendaView.js +134 -0
- package/lib/components/organisms/AgendaView/AgendaView.js.map +1 -0
- package/lib/components/organisms/AgendaView/MonthList.d.ts +16 -0
- package/lib/components/organisms/AgendaView/MonthList.js +64 -0
- package/lib/components/organisms/AgendaView/MonthList.js.map +1 -0
- package/lib/components/organisms/AgendaView/MonthPanel.d.ts +17 -0
- package/lib/components/organisms/AgendaView/MonthPanel.js +108 -0
- package/lib/components/organisms/AgendaView/MonthPanel.js.map +1 -0
- package/lib/components/organisms/AgendaView/agenda-view.helpers.d.ts +6 -0
- package/lib/components/organisms/AgendaView/agenda-view.helpers.js +53 -0
- package/lib/components/organisms/AgendaView/agenda-view.helpers.js.map +1 -0
- package/lib/components/organisms/AgendaView/index.d.ts +3 -0
- package/lib/components/organisms/AgendaView/index.js +20 -0
- package/lib/components/organisms/AgendaView/index.js.map +1 -0
- package/lib/components/organisms/AgendaView/types.d.ts +12 -0
- package/lib/components/organisms/AgendaView/types.js +19 -0
- package/lib/components/organisms/AgendaView/types.js.map +1 -0
- package/lib/components/organisms/AgendaView/use-month-panel-drag.d.ts +13 -0
- package/lib/components/organisms/AgendaView/use-month-panel-drag.js +77 -0
- package/lib/components/organisms/AgendaView/use-month-panel-drag.js.map +1 -0
- package/lib/components/organisms/AutoCompleteSearch/AutoCompleteSearch.js +5 -5
- package/lib/components/organisms/AutoCompleteSearch/AutoCompleteSearch.js.map +1 -1
- package/lib/components/organisms/AutoCompleteSearch/ItemCard.d.ts +2 -2
- package/lib/components/organisms/AutoCompleteSearch/ItemCard.js +13 -20
- package/lib/components/organisms/AutoCompleteSearch/ItemCard.js.map +1 -1
- package/lib/components/organisms/AutoCompleteSearch/SearchDetailsPopUp.js +8 -9
- package/lib/components/organisms/AutoCompleteSearch/SearchDetailsPopUp.js.map +1 -1
- package/lib/components/organisms/CalendarRangePicker/CalendarDaySheet.d.ts +12 -0
- package/lib/components/organisms/CalendarRangePicker/CalendarDaySheet.js +60 -0
- package/lib/components/organisms/CalendarRangePicker/CalendarDaySheet.js.map +1 -0
- package/lib/components/organisms/CalendarRangePicker/CalendarRangePicker.d.ts +28 -0
- package/lib/components/organisms/CalendarRangePicker/CalendarRangePicker.js +140 -0
- package/lib/components/organisms/CalendarRangePicker/CalendarRangePicker.js.map +1 -0
- package/lib/components/organisms/CalendarRangePicker/DayCell.d.ts +17 -0
- package/lib/components/organisms/CalendarRangePicker/DayCell.js +131 -0
- package/lib/components/organisms/CalendarRangePicker/DayCell.js.map +1 -0
- package/lib/components/organisms/CalendarRangePicker/RangeMonth.d.ts +18 -0
- package/lib/components/organisms/CalendarRangePicker/RangeMonth.js +35 -0
- package/lib/components/organisms/CalendarRangePicker/RangeMonth.js.map +1 -0
- package/lib/components/organisms/CalendarRangePicker/calendar-range.helpers.d.ts +12 -0
- package/lib/components/organisms/CalendarRangePicker/calendar-range.helpers.js +68 -0
- package/lib/components/organisms/CalendarRangePicker/calendar-range.helpers.js.map +1 -0
- package/lib/components/organisms/CalendarRangePicker/index.d.ts +2 -0
- package/lib/components/organisms/CalendarRangePicker/index.js +19 -0
- package/lib/components/organisms/CalendarRangePicker/index.js.map +1 -0
- package/lib/components/organisms/CalendarRangePicker/types.d.ts +11 -0
- package/lib/components/organisms/CalendarRangePicker/types.js +19 -0
- package/lib/components/organisms/CalendarRangePicker/types.js.map +1 -0
- package/lib/components/organisms/ChipSelect/ChipSelect.js +24 -21
- package/lib/components/organisms/ChipSelect/ChipSelect.js.map +1 -1
- package/lib/components/organisms/DropdownCardSwitch/DropdownCardSwitch.d.ts +2 -0
- package/lib/components/organisms/DropdownCardSwitch/DropdownCardSwitch.js +2 -2
- package/lib/components/organisms/DropdownCardSwitch/DropdownCardSwitch.js.map +1 -1
- package/lib/components/organisms/DropdownMenuItem/DropdownMenuItem.d.ts +3 -2
- package/lib/components/organisms/DropdownMenuItem/DropdownMenuItem.js +36 -34
- package/lib/components/organisms/DropdownMenuItem/DropdownMenuItem.js.map +1 -1
- package/lib/components/organisms/FloatingButton/FloatingActionButton.d.ts +2 -2
- package/lib/components/organisms/FloatingButton/FloatingActionButton.js +2 -1
- package/lib/components/organisms/FloatingButton/FloatingActionButton.js.map +1 -1
- package/lib/components/organisms/GanttView/GanttView.d.ts +36 -0
- package/lib/components/organisms/GanttView/GanttView.js +267 -0
- package/lib/components/organisms/GanttView/GanttView.js.map +1 -0
- package/lib/components/organisms/GanttView/body/GanttBar.d.ts +12 -0
- package/lib/components/organisms/GanttView/body/GanttBar.js +52 -0
- package/lib/components/organisms/GanttView/body/GanttBar.js.map +1 -0
- package/lib/components/organisms/GanttView/body/GanttCellStrip.d.ts +10 -0
- package/lib/components/organisms/GanttView/body/GanttCellStrip.js +55 -0
- package/lib/components/organisms/GanttView/body/GanttCellStrip.js.map +1 -0
- package/lib/components/organisms/GanttView/body/GanttGridLines.d.ts +9 -0
- package/lib/components/organisms/GanttView/body/GanttGridLines.js +45 -0
- package/lib/components/organisms/GanttView/body/GanttGridLines.js.map +1 -0
- package/lib/components/organisms/GanttView/body/GanttGroupHeader.d.ts +9 -0
- package/lib/components/organisms/GanttView/body/GanttGroupHeader.js +61 -0
- package/lib/components/organisms/GanttView/body/GanttGroupHeader.js.map +1 -0
- package/lib/components/organisms/GanttView/body/GanttGroupLane.d.ts +10 -0
- package/lib/components/organisms/GanttView/body/GanttGroupLane.js +43 -0
- package/lib/components/organisms/GanttView/body/GanttGroupLane.js.map +1 -0
- package/lib/components/organisms/GanttView/body/GanttRowLane.d.ts +13 -0
- package/lib/components/organisms/GanttView/body/GanttRowLane.js +53 -0
- package/lib/components/organisms/GanttView/body/GanttRowLane.js.map +1 -0
- package/lib/components/organisms/GanttView/body/GanttRowName.d.ts +9 -0
- package/lib/components/organisms/GanttView/body/GanttRowName.js +51 -0
- package/lib/components/organisms/GanttView/body/GanttRowName.js.map +1 -0
- package/lib/components/organisms/GanttView/body/index.d.ts +6 -0
- package/lib/components/organisms/GanttView/body/index.js +24 -0
- package/lib/components/organisms/GanttView/body/index.js.map +1 -0
- package/lib/components/organisms/GanttView/gantt-view.helpers.d.ts +19 -0
- package/lib/components/organisms/GanttView/gantt-view.helpers.js +219 -0
- package/lib/components/organisms/GanttView/gantt-view.helpers.js.map +1 -0
- package/lib/components/organisms/GanttView/gantt-view.styles.d.ts +124 -0
- package/lib/components/organisms/GanttView/gantt-view.styles.js +148 -0
- package/lib/components/organisms/GanttView/gantt-view.styles.js.map +1 -0
- package/lib/components/organisms/GanttView/header/GanttControls.d.ts +13 -0
- package/lib/components/organisms/GanttView/header/GanttControls.js +53 -0
- package/lib/components/organisms/GanttView/header/GanttControls.js.map +1 -0
- package/lib/components/organisms/GanttView/header/GanttHeader.d.ts +24 -0
- package/lib/components/organisms/GanttView/header/GanttHeader.js +75 -0
- package/lib/components/organisms/GanttView/header/GanttHeader.js.map +1 -0
- package/lib/components/organisms/GanttView/header/index.d.ts +1 -0
- package/lib/components/organisms/GanttView/header/index.js +19 -0
- package/lib/components/organisms/GanttView/header/index.js.map +1 -0
- package/lib/components/organisms/GanttView/index.d.ts +4 -0
- package/lib/components/organisms/GanttView/index.js +21 -0
- package/lib/components/organisms/GanttView/index.js.map +1 -0
- package/lib/components/organisms/GanttView/scale/GanttScaleDayRow.d.ts +10 -0
- package/lib/components/organisms/GanttView/scale/GanttScaleDayRow.js +67 -0
- package/lib/components/organisms/GanttView/scale/GanttScaleDayRow.js.map +1 -0
- package/lib/components/organisms/GanttView/scale/GanttScaleHeader.d.ts +15 -0
- package/lib/components/organisms/GanttView/scale/GanttScaleHeader.js +46 -0
- package/lib/components/organisms/GanttView/scale/GanttScaleHeader.js.map +1 -0
- package/lib/components/organisms/GanttView/scale/GanttScaleSpanRow.d.ts +8 -0
- package/lib/components/organisms/GanttView/scale/GanttScaleSpanRow.js +69 -0
- package/lib/components/organisms/GanttView/scale/GanttScaleSpanRow.js.map +1 -0
- package/lib/components/organisms/GanttView/scale/gantt-scale.helpers.d.ts +6 -0
- package/lib/components/organisms/GanttView/scale/gantt-scale.helpers.js +53 -0
- package/lib/components/organisms/GanttView/scale/gantt-scale.helpers.js.map +1 -0
- package/lib/components/organisms/GanttView/scale/index.d.ts +1 -0
- package/lib/components/organisms/GanttView/scale/index.js +19 -0
- package/lib/components/organisms/GanttView/scale/index.js.map +1 -0
- package/lib/components/organisms/GanttView/types.d.ts +87 -0
- package/lib/components/organisms/GanttView/types.js +19 -0
- package/lib/components/organisms/GanttView/types.js.map +1 -0
- package/lib/components/organisms/GanttView/use-default-zoom.d.ts +2 -0
- package/lib/components/organisms/GanttView/use-default-zoom.js +23 -0
- package/lib/components/organisms/GanttView/use-default-zoom.js.map +1 -0
- package/lib/components/organisms/GroupByScrollList/GroupByScrollList.js +6 -2
- package/lib/components/organisms/GroupByScrollList/GroupByScrollList.js.map +1 -1
- package/lib/components/organisms/HeaderContainer/HeaderContainer.js +21 -17
- package/lib/components/organisms/HeaderContainer/HeaderContainer.js.map +1 -1
- package/lib/components/organisms/ImageBubble/ImageBubble.d.ts +1 -1
- package/lib/components/organisms/ImageBubble/ImageBubble.js +4 -7
- package/lib/components/organisms/ImageBubble/ImageBubble.js.map +1 -1
- package/lib/components/organisms/InfoBubble/InfoBubble.js +1 -1
- package/lib/components/organisms/InfoBubble/InfoBubble.js.map +1 -1
- package/lib/components/organisms/InfoButton/InfoButton.d.ts +1 -1
- package/lib/components/organisms/MultiValuePicker/MultiValuePicker.js +6 -10
- package/lib/components/organisms/MultiValuePicker/MultiValuePicker.js.map +1 -1
- package/lib/components/organisms/Picker/Picker.d.ts +2 -1
- package/lib/components/organisms/Picker/Picker.js +25 -29
- package/lib/components/organisms/Picker/Picker.js.map +1 -1
- package/lib/components/organisms/ProgressBar/ProgressBar.d.ts +1 -1
- package/lib/components/organisms/ProgressBar/ProgressBar.js +11 -16
- package/lib/components/organisms/ProgressBar/ProgressBar.js.map +1 -1
- package/lib/components/organisms/QuantityCard/QuantityCard.d.ts +3 -2
- package/lib/components/organisms/QuantityCard/QuantityCard.js +47 -56
- package/lib/components/organisms/QuantityCard/QuantityCard.js.map +1 -1
- package/lib/components/organisms/ScrollList/DottedButton.js +10 -18
- package/lib/components/organisms/ScrollList/DottedButton.js.map +1 -1
- package/lib/components/organisms/ScrollList/ScrollList.js +9 -7
- package/lib/components/organisms/ScrollList/ScrollList.js.map +1 -1
- package/lib/components/organisms/ScrollList/TopActions.js +5 -3
- package/lib/components/organisms/ScrollList/TopActions.js.map +1 -1
- package/lib/components/organisms/SearchBar/SearchBar.d.ts +3 -3
- package/lib/components/organisms/SearchBar/SearchBar.js +15 -32
- package/lib/components/organisms/SearchBar/SearchBar.js.map +1 -1
- package/lib/components/organisms/SingleSelectScrollList/SingleSelectScrollList.js +1 -1
- package/lib/components/organisms/ToggleButton/ToggleButton.js +2 -2
- package/lib/components/organisms/ToggleButton/ToggleButton.js.map +1 -1
- package/lib/components/organisms/ViewAllEditList/AllLinesAlert.js +14 -16
- package/lib/components/organisms/ViewAllEditList/AllLinesAlert.js.map +1 -1
- package/lib/components/organisms/ViewAllEditList/LineComponent.js +6 -8
- package/lib/components/organisms/ViewAllEditList/LineComponent.js.map +1 -1
- package/lib/components/organisms/ViewAllEditList/ViewAllEditList.d.ts +3 -2
- package/lib/components/organisms/ViewAllEditList/ViewAllEditList.js +5 -9
- package/lib/components/organisms/ViewAllEditList/ViewAllEditList.js.map +1 -1
- package/lib/components/organisms/WeekDayPicker/DayGauge.d.ts +18 -0
- package/lib/components/organisms/WeekDayPicker/DayGauge.js +112 -0
- package/lib/components/organisms/WeekDayPicker/DayGauge.js.map +1 -0
- package/lib/components/organisms/WeekDayPicker/WeekDayPicker.d.ts +18 -0
- package/lib/components/organisms/WeekDayPicker/WeekDayPicker.js +118 -0
- package/lib/components/organisms/WeekDayPicker/WeekDayPicker.js.map +1 -0
- package/lib/components/organisms/WeekDayPicker/WeekRow.d.ts +15 -0
- package/lib/components/organisms/WeekDayPicker/WeekRow.js +39 -0
- package/lib/components/organisms/WeekDayPicker/WeekRow.js.map +1 -0
- package/lib/components/organisms/WeekDayPicker/index.d.ts +3 -0
- package/lib/components/organisms/WeekDayPicker/index.js +20 -0
- package/lib/components/organisms/WeekDayPicker/index.js.map +1 -0
- package/lib/components/organisms/WeekDayPicker/types.d.ts +17 -0
- package/lib/components/organisms/WeekDayPicker/types.js +19 -0
- package/lib/components/organisms/WeekDayPicker/types.js.map +1 -0
- package/lib/components/organisms/WeekDayPicker/week-day.helpers.d.ts +9 -0
- package/lib/components/organisms/WeekDayPicker/week-day.helpers.js +83 -0
- package/lib/components/organisms/WeekDayPicker/week-day.helpers.js.map +1 -0
- package/lib/components/organisms/index.d.ts +4 -0
- package/lib/components/organisms/index.js +4 -0
- package/lib/components/organisms/index.js.map +1 -1
- package/lib/components/templates/BottomBar/BottomBar.js +81 -22
- package/lib/components/templates/BottomBar/BottomBar.js.map +1 -1
- package/lib/components/templates/BottomBar/ItemTitle.d.ts +1 -1
- package/lib/components/templates/BottomBar/ItemTitle.js +1 -2
- package/lib/components/templates/BottomBar/ItemTitle.js.map +1 -1
- package/lib/components/templates/Dashboard/Chart/BarChart.js +3 -3
- package/lib/components/templates/Dashboard/Chart/BarChart.js.map +1 -1
- package/lib/components/templates/Dashboard/Chart/IndicatorChart/IndicatorItem.js +1 -1
- package/lib/components/templates/Dashboard/Chart/IndicatorChart/IndicatorItem.js.map +1 -1
- package/lib/components/templates/Dashboard/Chart/IndicatorChart/SimpleIndicator.js +24 -20
- package/lib/components/templates/Dashboard/Chart/IndicatorChart/SimpleIndicator.js.map +1 -1
- package/lib/components/templates/ObjectCard/ObjectCard.d.ts +3 -2
- package/lib/components/templates/ObjectCard/ObjectCard.js +46 -32
- package/lib/components/templates/ObjectCard/ObjectCard.js.map +1 -1
- package/lib/components/templates/TabsScreen/Tab.js +1 -1
- package/lib/components/templates/TabsScreen/Tab.js.map +1 -1
- package/lib/hooks/index.d.ts +1 -0
- package/lib/hooks/index.js +1 -0
- package/lib/hooks/index.js.map +1 -1
- package/lib/hooks/use-click-outside.js +2 -2
- package/lib/hooks/use-click-outside.js.map +1 -1
- package/lib/hooks/use-orientation.d.ts +1 -0
- package/lib/hooks/use-orientation.js +23 -0
- package/lib/hooks/use-orientation.js.map +1 -0
- package/lib/theme/color/ThemeContext.js +1 -1
- package/lib/theme/color/ThemeContext.js.map +1 -1
- package/lib/theme/color/color.defaults.js +22 -22
- package/lib/theme/color/content.helpers.d.ts +2 -1
- package/lib/theme/color/content.helpers.js +47 -45
- package/lib/theme/color/content.helpers.js.map +1 -1
- package/lib/theme/color/themes.js +83 -80
- package/lib/theme/color/themes.js.map +1 -1
- package/lib/theme/color/types.d.ts +1 -0
- package/lib/theme/writing/writingTheme.js +5 -5
- package/lib/tools/AnimationUtil.d.ts +18 -3
- package/lib/utils/calendar.d.ts +42 -0
- package/lib/utils/calendar.js +64 -0
- package/lib/utils/calendar.js.map +1 -0
- package/lib/utils/commons-styles.d.ts +8 -20
- package/lib/utils/commons-styles.js +14 -22
- package/lib/utils/commons-styles.js.map +1 -1
- package/lib/utils/commons-utlis.d.ts +1 -0
- package/lib/utils/commons-utlis.js +7 -0
- package/lib/utils/commons-utlis.js.map +1 -1
- package/lib/utils/dates.d.ts +30 -0
- package/lib/utils/dates.js +142 -0
- package/lib/utils/dates.js.map +1 -0
- package/lib/utils/index.d.ts +10 -8
- package/lib/utils/index.js +4 -2
- package/lib/utils/index.js.map +1 -1
- package/package.json +14 -14
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Label.js","sourceRoot":"","sources":["../../../../src/components/molecules/Label/Label.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AACvE,OAAO,EAAC,UAAU,EAAE,IAAI,EAAC,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAQ,aAAa,EAAC,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAC,
|
|
1
|
+
{"version":3,"file":"Label.js","sourceRoot":"","sources":["../../../../src/components/molecules/Label/Label.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AACvE,OAAO,EAAC,UAAU,EAAE,IAAI,EAAC,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAQ,aAAa,EAAC,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAC,eAAe,EAAC,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAC,IAAI,EAAE,IAAI,EAAC,MAAM,aAAa,CAAC;AAoBvC,MAAM,KAAK,GAAG,CAAC,EACb,KAAK,EACL,OAAO,EACP,IAAI,GAAG,OAAO,EACd,QAAQ,EACR,KAAK,EACL,OAAO,GAAG,IAAI,EACd,SAAS,GAAG,KAAK,EACjB,OAAO,GAAG,GA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CAAC,CAAC;AAEF,MAAM,SAAS,GAAG,CAAC,KAAa,EAAE,EAAE,CAClC,UAAU,CAAC,MAAM,CAAC;IAChB,SAAS,EAAE;QACT,KAAK,EAAE,MAAM;QACb,WAAW,EAAE,KAAK,EAAE,UAAU;QAC9B,WAAW,EAAE,CAAC;QACd,YAAY,EAAE,CAAC;QACf,eAAe,EAAE,KAAK,EAAE,gBAAgB;QACxC,aAAa,EAAE,KAAK;QACpB,cAAc,EAAE,YAAY;QAC5B,UAAU,EAAE,QAAQ;QACpB,cAAc,EAAE,EAAE;QAClB,gBAAgB,EAAE,CAAC;QACnB,eAAe,EAAE,EAAE;QACnB,iBAAiB,EAAE,EAAE;KACtB;IACD,IAAI,EAAE;QACJ,UAAU,EAAE,EAAE;QACd,KAAK,EAAE,KAAK,EAAE,UAAU;QACxB,SAAS,EAAE,QAAQ;QACnB,IAAI,EAAE,CAAC;KACR;CACF,CAAC,CAAC;AAEL,eAAe,KAAK,CAAC"}
|
|
@@ -19,18 +19,17 @@ import React from 'react';
|
|
|
19
19
|
import { View, StyleSheet } from 'react-native';
|
|
20
20
|
import { checkNullString } from '../../../utils/strings';
|
|
21
21
|
import { Icon, Text } from '../../atoms';
|
|
22
|
-
const LabelText = ({ style, iconStyle, textStyle, title, value, size = 12, textSize =
|
|
22
|
+
const LabelText = ({ style, iconStyle, textStyle, title, value, size = 12, textSize = 12, color, iconName, onlyOneLine = false, }) => {
|
|
23
23
|
const renderValue = () => {
|
|
24
|
-
if (checkNullString(value?.toString()))
|
|
24
|
+
if (checkNullString(value?.toString()))
|
|
25
25
|
return null;
|
|
26
|
-
}
|
|
27
26
|
return (<Text style={textStyle} writingType="important" fontSize={textSize}>
|
|
28
27
|
{value}
|
|
29
28
|
</Text>);
|
|
30
29
|
};
|
|
31
30
|
return (<View testID="labelTextContainer" style={[styles.container, style]}>
|
|
32
31
|
{iconName && (<Icon style={[styles.icon, iconStyle]} name={iconName} size={size} color={color}/>)}
|
|
33
|
-
<Text style={textStyle} fontSize={textSize} numberOfLines={onlyOneLine ? 1 : null}>
|
|
32
|
+
<Text style={[styles.text, textStyle]} fontSize={textSize} numberOfLines={onlyOneLine ? 1 : null}>
|
|
34
33
|
{!checkNullString(title?.toString()) && `${title} `}
|
|
35
34
|
{renderValue()}
|
|
36
35
|
</Text>
|
|
@@ -44,6 +43,9 @@ const styles = StyleSheet.create({
|
|
|
44
43
|
icon: {
|
|
45
44
|
marginRight: 5,
|
|
46
45
|
},
|
|
46
|
+
text: {
|
|
47
|
+
flexShrink: 1,
|
|
48
|
+
},
|
|
47
49
|
});
|
|
48
50
|
export default LabelText;
|
|
49
51
|
//# sourceMappingURL=LabelText.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LabelText.js","sourceRoot":"","sources":["../../../../src/components/molecules/LabelText/LabelText.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,IAAI,EAAE,UAAU,EAAC,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAC,eAAe,EAAC,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAC,IAAI,EAAE,IAAI,EAAC,MAAM,aAAa,CAAC;AAevC,MAAM,SAAS,GAAG,CAAC,EACjB,KAAK,EACL,SAAS,EACT,SAAS,EACT,KAAK,EACL,KAAK,EACL,IAAI,GAAG,EAAE,EACT,QAAQ,GAAG,EAAE,EACb,KAAK,EACL,QAAQ,
|
|
1
|
+
{"version":3,"file":"LabelText.js","sourceRoot":"","sources":["../../../../src/components/molecules/LabelText/LabelText.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,IAAI,EAAE,UAAU,EAAC,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAC,eAAe,EAAC,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAC,IAAI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CACnD;QAAA,CAAC,WAAW,EAAE,CAChB;MAAA,EAAE,IAAI,CACR;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC;AACF,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,SAAS,EAAE;QACT,aAAa,EAAE,KAAK;QACpB,UAAU,EAAE,QAAQ;KACrB;IACD,IAAI,EAAE;QACJ,WAAW,EAAE,CAAC;KACf;IACD,IAAI,EAAE;QACJ,UAAU,EAAE,CAAC;KACd;CACF,CAAC,CAAC;AAEH,eAAe,SAAS,CAAC"}
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
interface MovementIndicationCardProps {
|
|
3
3
|
style?: any;
|
|
4
|
+
iconTop: string;
|
|
5
|
+
labelTop?: string;
|
|
4
6
|
titleTop: string;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
disabledTop?: boolean;
|
|
7
|
+
iconDown: string;
|
|
8
|
+
labelDown?: string;
|
|
8
9
|
titleDown: string;
|
|
9
|
-
|
|
10
|
-
onPressTitleDown?: () => void;
|
|
11
|
-
disabledDown?: boolean;
|
|
10
|
+
displayCard?: boolean;
|
|
12
11
|
}
|
|
13
|
-
declare function MovementIndicationCard({ style,
|
|
12
|
+
declare function MovementIndicationCard({ style, iconTop, labelTop, titleTop, iconDown, labelDown, titleDown, displayCard, }: MovementIndicationCardProps): React.JSX.Element;
|
|
14
13
|
export default MovementIndicationCard;
|
|
@@ -15,51 +15,109 @@
|
|
|
15
15
|
* You should have received a copy of the GNU Affero General Public License
|
|
16
16
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
17
|
*/
|
|
18
|
-
import React from 'react';
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
18
|
+
import React, { useCallback, useMemo, useState } from 'react';
|
|
19
|
+
import { Platform, StyleSheet, TouchableOpacity, View } from 'react-native';
|
|
20
|
+
import { useThemeColor } from '../../../theme';
|
|
21
|
+
import { checkNullString } from '../../../utils';
|
|
22
|
+
import { Card, HorizontalRule, Icon, Text, VerticalRule } from '../../atoms';
|
|
23
|
+
import { IconTile } from '../../molecules';
|
|
24
|
+
const COLLAPSED_TILE_SIZE = 24;
|
|
25
|
+
const EXPANDED_TILE_SIZE = 30;
|
|
26
|
+
function MovementIndicationCard({ style, iconTop, labelTop, titleTop, iconDown, labelDown, titleDown, displayCard = true, }) {
|
|
27
|
+
const Colors = useThemeColor();
|
|
28
|
+
const [expanded, setExpanded] = useState(false);
|
|
29
|
+
const hasTop = useMemo(() => !checkNullString(titleTop), [titleTop]);
|
|
30
|
+
const hasDown = useMemo(() => !checkNullString(titleDown), [titleDown]);
|
|
31
|
+
const renderTile = useCallback((icon, size) => (<IconTile icon={icon} size={size} iconSize={size / 2} borderRadius={size / 3}/>), []);
|
|
32
|
+
const renderCollapsedItem = useCallback((icon, title) => (<View style={styles.collapsedItem}>
|
|
33
|
+
{renderTile(icon, COLLAPSED_TILE_SIZE)}
|
|
34
|
+
<Text numberOfLines={1} style={styles.collapsedTitle}>
|
|
35
|
+
{title}
|
|
36
|
+
</Text>
|
|
37
|
+
</View>), [renderTile]);
|
|
38
|
+
const renderExpandedItem = useCallback((icon, label, title) => (<View style={styles.expandedItem}>
|
|
39
|
+
{renderTile(icon, EXPANDED_TILE_SIZE)}
|
|
40
|
+
<View style={styles.expandedTexts}>
|
|
41
|
+
{!checkNullString(label) && (<Text fontSize={10} textColor={Colors.secondaryColor_dark.background} style={styles.label}>
|
|
42
|
+
{label}
|
|
43
|
+
</Text>)}
|
|
44
|
+
<Text writingType="important">{title}</Text>
|
|
45
|
+
</View>
|
|
46
|
+
</View>), [Colors.secondaryColor_dark.background, renderTile]);
|
|
47
|
+
if (!hasTop && !hasDown)
|
|
48
|
+
return null;
|
|
49
|
+
const Wrapper = displayCard ? Card : View;
|
|
50
|
+
return (<TouchableOpacity activeOpacity={0.9} style={styles.touchable} onPress={() => setExpanded(current => !current)} testID="movementIndicationCardTouchable">
|
|
51
|
+
<Wrapper style={[displayCard ? styles.card : styles.container, style]} testID="movementIndicationCardContainer">
|
|
52
|
+
{expanded ? (<View>
|
|
53
|
+
{hasTop && renderExpandedItem(iconTop, labelTop, titleTop)}
|
|
54
|
+
{hasTop && hasDown && (<VerticalRule style={styles.verticalRule} color={Colors.primaryColor.background}/>)}
|
|
55
|
+
{hasDown && renderExpandedItem(iconDown, labelDown, titleDown)}
|
|
56
|
+
</View>) : (<View style={styles.collapsedContainer}>
|
|
57
|
+
{hasTop && renderCollapsedItem(iconTop, titleTop)}
|
|
58
|
+
{hasTop && hasDown && (<View style={styles.arrowContainer}>
|
|
59
|
+
<HorizontalRule style={styles.dottedLine} color={Colors.secondaryColor_dark.background}/>
|
|
60
|
+
<Icon name="arrow-right" size={12} color={Colors.secondaryColor_dark.background}/>
|
|
61
|
+
</View>)}
|
|
62
|
+
{hasDown && renderCollapsedItem(iconDown, titleDown)}
|
|
63
|
+
</View>)}
|
|
64
|
+
</Wrapper>
|
|
65
|
+
</TouchableOpacity>);
|
|
38
66
|
}
|
|
39
67
|
const styles = StyleSheet.create({
|
|
68
|
+
touchable: {
|
|
69
|
+
width: '90%',
|
|
70
|
+
alignSelf: 'center',
|
|
71
|
+
marginVertical: 4,
|
|
72
|
+
},
|
|
40
73
|
container: {
|
|
41
74
|
width: '100%',
|
|
42
|
-
|
|
75
|
+
},
|
|
76
|
+
card: {
|
|
77
|
+
width: '100%',
|
|
78
|
+
paddingHorizontal: 12,
|
|
79
|
+
paddingRight: 12,
|
|
80
|
+
paddingVertical: 10,
|
|
81
|
+
},
|
|
82
|
+
collapsedContainer: {
|
|
83
|
+
flexDirection: 'row',
|
|
84
|
+
alignItems: 'center',
|
|
85
|
+
},
|
|
86
|
+
collapsedItem: {
|
|
87
|
+
flexDirection: 'row',
|
|
88
|
+
alignItems: 'center',
|
|
89
|
+
flexShrink: 1,
|
|
90
|
+
gap: 8,
|
|
91
|
+
},
|
|
92
|
+
collapsedTitle: {
|
|
93
|
+
flexShrink: 1,
|
|
94
|
+
},
|
|
95
|
+
arrowContainer: {
|
|
96
|
+
flexDirection: 'row',
|
|
43
97
|
alignItems: 'center',
|
|
44
|
-
|
|
98
|
+
flexGrow: 1,
|
|
99
|
+
minWidth: 24,
|
|
100
|
+
marginHorizontal: 8,
|
|
45
101
|
},
|
|
46
102
|
dottedLine: {
|
|
47
|
-
|
|
48
|
-
|
|
103
|
+
flexGrow: 1,
|
|
104
|
+
borderStyle: Platform.OS === 'ios' ? 'solid' : 'dotted',
|
|
49
105
|
},
|
|
50
|
-
|
|
106
|
+
expandedItem: {
|
|
51
107
|
flexDirection: 'row',
|
|
52
|
-
justifyContent: 'space-between',
|
|
53
108
|
alignItems: 'center',
|
|
54
|
-
|
|
109
|
+
gap: 12,
|
|
55
110
|
},
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
111
|
+
expandedTexts: {
|
|
112
|
+
flexShrink: 1,
|
|
113
|
+
},
|
|
114
|
+
label: {
|
|
115
|
+
letterSpacing: 0.5,
|
|
116
|
+
textTransform: 'uppercase',
|
|
60
117
|
},
|
|
61
|
-
|
|
62
|
-
|
|
118
|
+
verticalRule: {
|
|
119
|
+
height: 16,
|
|
120
|
+
marginLeft: EXPANDED_TILE_SIZE / 2,
|
|
63
121
|
},
|
|
64
122
|
});
|
|
65
123
|
export default MovementIndicationCard;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MovementIndicationCard.js","sourceRoot":"","sources":["../../../../src/components/molecules/MovementIndicationCard/MovementIndicationCard.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"MovementIndicationCard.js","sourceRoot":"","sources":["../../../../src/components/molecules/MovementIndicationCard/MovementIndicationCard.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AAC5D,OAAO,EAAC,QAAQ,EAAE,UAAU,EAAE,gBAAgB,EAAE,IAAI,EAAC,MAAM,cAAc,CAAC;AAC1E,OAAO,EAAC,aAAa,EAAC,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAC,eAAe,EAAC,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAC,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,IAAI,EAAE,YAAY,EAAC,MAAM,aAAa,CAAC;AAC3E,OAAO,EAAC,QAAQ,EAAC,MAAM,iBAAiB,CAAC;AAEzC,MAAM,mBAAmB,GAAG,EAAE,CAAC;AAC/B,MAAM,kBAAkB,GAAG,EAAE,CAAC;AAa9B,SAAS,sBAAsB,CAAC,EAC9B,KAAK,EACL,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,SAAS,EACT,WAAW,GAAG,IAAI,GACU;IAC5B,MAAM,MAAM,GAAG,aAAa,EAAE,CAAC;IAE/B,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAEhD,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC,eAAe,CAAC,QAAQ,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IACrE,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC,eAAe,CAAC,SAAS,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC;IAExE,MAAM,UAAU,GAAG,WAAW,CAC5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AAQ;QACpB,UAAU,EAAE,CAAC;QACb,GAAG,EAAE,CAAC;KACP;IACD,cAAc,EAAE;QACd,UAAU,EAAE,CAAC;KACd;IACD,cAAc,EAAE;QACd,aAAa,EAAE,KAAK;QACpB,UAAU,EAAE,QAAQ;QACpB,QAAQ,EAAE,CAAC;QACX,QAAQ,EAAE,EAAE;QACZ,gBAAgB,EAAE,CAAC;KACpB;IACD,UAAU,EAAE;QACV,QAAQ,EAAE,CAAC;QACX,WAAW,EAAE,QAAQ,CAAC,EAAE,KAAK,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ;KACxD;IACD,YAAY,EAAE;QACZ,aAAa,EAAE,KAAK;QACpB,UAAU,EAAE,QAAQ;QACpB,GAAG,EAAE,EAAE;KACR;IACD,aAAa,EAAE;QACb,UAAU,EAAE,CAAC;KACd;IACD,KAAK,EAAE;QACL,aAAa,EAAE,GAAG;QAClB,aAAa,EAAE,WAAW;KAC3B;IACD,YAAY,EAAE;QACZ,MAAM,EAAE,EAAE;QACV,UAAU,EAAE,kBAAkB,GAAG,CAAC;KACnC;CACF,CAAC,CAAC;AAEH,eAAe,sBAAsB,CAAC"}
|
|
@@ -15,40 +15,35 @@
|
|
|
15
15
|
* You should have received a copy of the GNU Affero General Public License
|
|
16
16
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
17
|
*/
|
|
18
|
-
import React
|
|
18
|
+
import React from 'react';
|
|
19
19
|
import { StyleSheet, TouchableOpacity, View } from 'react-native';
|
|
20
20
|
import { useThemeColor } from '../../../theme';
|
|
21
|
-
import {
|
|
22
|
-
const MultiValuePickerButton = ({ style, placeholder, onPress
|
|
21
|
+
import { Icon, Text } from '../../atoms';
|
|
22
|
+
const MultiValuePickerButton = ({ style, placeholder, onPress, listItem, onPressItem, readonly = false, }) => {
|
|
23
23
|
const Colors = useThemeColor();
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
24
|
+
return (<TouchableOpacity onPress={onPress} activeOpacity={0.9} style={style} testID="multiValuePickerButtonTouchable">
|
|
25
|
+
<View style={styles.listItemContainer}>
|
|
26
|
+
{listItem?.length > 0
|
|
27
|
+
? listItem.map((item, index) => {
|
|
28
|
+
const _color = item.color ?? Colors.primaryColor;
|
|
29
|
+
return (<TouchableOpacity onPress={() => onPressItem?.(item)} disabled={readonly} key={index} style={[
|
|
30
|
+
styles.cardItem,
|
|
31
|
+
{ backgroundColor: _color.background_light },
|
|
32
|
+
]} activeOpacity={0.9} testID="multiValuePickerBadgeTouchable">
|
|
33
|
+
<Text style={styles.text} numberOfLines={1} textColor={_color.foreground}>
|
|
31
34
|
{item.title}
|
|
32
35
|
</Text>
|
|
33
|
-
{!readonly && (<Icon name="x-lg" color={
|
|
34
|
-
</TouchableOpacity>)
|
|
36
|
+
{!readonly && (<Icon name="x-lg" color={_color.foreground} size={14}/>)}
|
|
37
|
+
</TouchableOpacity>);
|
|
38
|
+
})
|
|
35
39
|
: placeholder && (<Text textColor={Colors.placeholderTextColor} style={styles.placeHolder} numberOfLines={1}>
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
</Card>
|
|
40
|
+
{placeholder}
|
|
41
|
+
</Text>)}
|
|
42
|
+
</View>
|
|
43
|
+
<Icon name="chevron-down" color={Colors.secondaryColor_dark.background} size={14}/>
|
|
41
44
|
</TouchableOpacity>);
|
|
42
45
|
};
|
|
43
|
-
const
|
|
44
|
-
backgroundColor: color.background_light,
|
|
45
|
-
borderColor: color.background,
|
|
46
|
-
});
|
|
47
|
-
const getStyles = (Colors) => StyleSheet.create({
|
|
48
|
-
container: {
|
|
49
|
-
paddingLeft: 10,
|
|
50
|
-
paddingRight: 15,
|
|
51
|
-
},
|
|
46
|
+
const styles = StyleSheet.create({
|
|
52
47
|
text: {
|
|
53
48
|
textAlign: 'center',
|
|
54
49
|
marginRight: 5,
|
|
@@ -56,23 +51,16 @@ const getStyles = (Colors) => StyleSheet.create({
|
|
|
56
51
|
},
|
|
57
52
|
placeHolder: {
|
|
58
53
|
paddingLeft: 4,
|
|
59
|
-
fontSize: 15,
|
|
60
54
|
},
|
|
61
55
|
listItemContainer: {
|
|
62
56
|
flexDirection: 'row',
|
|
63
|
-
marginLeft: -5,
|
|
64
57
|
overflow: 'hidden',
|
|
65
58
|
width: '90%',
|
|
66
59
|
},
|
|
67
60
|
cardItem: {
|
|
68
61
|
flexDirection: 'row',
|
|
69
62
|
alignItems: 'center',
|
|
70
|
-
borderWidth: 2,
|
|
71
63
|
borderRadius: 14,
|
|
72
|
-
elevation: 3,
|
|
73
|
-
shadowOpacity: 0.5,
|
|
74
|
-
shadowColor: Colors.secondaryColor.background,
|
|
75
|
-
shadowOffset: { width: 0, height: 0 },
|
|
76
64
|
marginLeft: 5,
|
|
77
65
|
paddingHorizontal: 7,
|
|
78
66
|
height: 22,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MultiValuePickerButton.js","sourceRoot":"","sources":["../../../../src/components/molecules/MultiValuePickerButton/MultiValuePickerButton.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"MultiValuePickerButton.js","sourceRoot":"","sources":["../../../../src/components/molecules/MultiValuePickerButton/MultiValuePickerButton.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,UAAU,EAAE,gBAAgB,EAAE,IAAI,EAAC,MAAM,cAAc,CAAC;AAChE,OAAO,EAAQ,aAAa,EAAC,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAC,IAAI,EAAE,IAAI,EAAC,MAAM,aAAa,CAAC;AAiBvC,MAAM,sBAAsB,GAAG,CAAC,EAC9B,KAAK,EACL,WAAW,EACX,OAAO,EACP,QAAQ,EACR,WA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declare const NotesCard: ({ title, data, style }: NotesCardProps) => React.JSX.Element;
|
|
8
|
+
declare const NotesCard: ({ title, data, style, styleText }: NotesCardProps) => React.JSX.Element;
|
|
8
9
|
export default NotesCard;
|
|
@@ -17,24 +17,20 @@
|
|
|
17
17
|
*/
|
|
18
18
|
import React, { useState } from 'react';
|
|
19
19
|
import { StyleSheet, TouchableOpacity, View } from 'react-native';
|
|
20
|
-
import { Card, HtmlInput, Icon, Text } from '../../atoms';
|
|
21
20
|
import { useThemeColor } from '../../../theme';
|
|
21
|
+
import { Card, HtmlInput, Icon, Text } from '../../atoms';
|
|
22
22
|
const MAX_HEIGHT = 71;
|
|
23
|
-
const NotesCard = ({ title, data, style }) => {
|
|
23
|
+
const NotesCard = ({ title, data, style, styleText }) => {
|
|
24
24
|
const Colors = useThemeColor();
|
|
25
25
|
const [expanded, setExpanded] = useState(false);
|
|
26
26
|
const [chevronHeight, setChevronHeight] = useState(0);
|
|
27
|
-
if (data == null || data === '')
|
|
27
|
+
if (data == null || data === '')
|
|
28
28
|
return null;
|
|
29
|
-
}
|
|
30
|
-
const toggleExpanded = () => {
|
|
31
|
-
setExpanded(current => !current);
|
|
32
|
-
};
|
|
33
29
|
return (<View testID="notesCardContainer" style={[styles.description, style]}>
|
|
34
|
-
<Text style={styles.title}>{title}</Text>
|
|
35
|
-
<TouchableOpacity testID="notesCardTouchable" disabled={chevronHeight < MAX_HEIGHT} activeOpacity={0.9} onPress={
|
|
30
|
+
<Text style={[styles.title, styleText]}>{title}</Text>
|
|
31
|
+
<TouchableOpacity testID="notesCardTouchable" disabled={chevronHeight < MAX_HEIGHT} activeOpacity={0.9} onPress={() => setExpanded(current => !current)}>
|
|
36
32
|
<Card style={styles.note}>
|
|
37
|
-
<HtmlInput defaultInput={data} readonly={true} onHeightChange={setChevronHeight} style={!expanded && styles.htmlInput}/>
|
|
33
|
+
<HtmlInput defaultInput={data} readonly={true} onHeightChange={setChevronHeight} style={!expanded && styles.htmlInput} editorBackgroundColor={Colors.backgroundColor}/>
|
|
38
34
|
{chevronHeight > MAX_HEIGHT && (<Icon name={expanded ? 'chevron-up' : 'chevron-down'} color={Colors.primaryColor.background}/>)}
|
|
39
35
|
</Card>
|
|
40
36
|
</TouchableOpacity>
|
|
@@ -43,9 +39,10 @@ const NotesCard = ({ title, data, style }) => {
|
|
|
43
39
|
const styles = StyleSheet.create({
|
|
44
40
|
description: {
|
|
45
41
|
flexDirection: 'column',
|
|
46
|
-
marginVertical:
|
|
42
|
+
marginVertical: 4,
|
|
47
43
|
width: '90%',
|
|
48
44
|
alignSelf: 'center',
|
|
45
|
+
gap: 4,
|
|
49
46
|
},
|
|
50
47
|
title: {
|
|
51
48
|
marginLeft: 10,
|
|
@@ -54,10 +51,9 @@ const styles = StyleSheet.create({
|
|
|
54
51
|
justifyContent: 'center',
|
|
55
52
|
width: '100%',
|
|
56
53
|
borderRadius: 7,
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
paddingHorizontal: 10,
|
|
54
|
+
paddingRight: 5,
|
|
55
|
+
paddingVertical: 2,
|
|
56
|
+
paddingHorizontal: 5,
|
|
61
57
|
},
|
|
62
58
|
htmlInput: {
|
|
63
59
|
maxHeight: MAX_HEIGHT,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotesCard.js","sourceRoot":"","sources":["../../../../src/components/molecules/NotesCard/NotesCard.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,QAAQ,EAAC,MAAM,OAAO,CAAC;AACtC,OAAO,EAAC,UAAU,EAAE,gBAAgB,EAAE,IAAI,EAAC,MAAM,cAAc,CAAC;AAChE,OAAO,EAAC,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAC,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"NotesCard.js","sourceRoot":"","sources":["../../../../src/components/molecules/NotesCard/NotesCard.tsx"],"names":[],"mappings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Background]);
|
|
32
32
|
const styles = useMemo(() => getStyles(_color, size), [_color, size]);
|
|
33
33
|
return (<View style={[styles.bubble, style]} testID="numberBubbleContainer">
|
|
34
|
-
<Text textColor={_color.foreground} fontSize={size * 0.
|
|
34
|
+
<Text textColor={_color.foreground} adjustsFontSizeToFit fontSize={size * 0.4}>
|
|
35
35
|
{number}
|
|
36
36
|
</Text>
|
|
37
37
|
</View>);
|
|
@@ -46,7 +46,7 @@ const getStyles = (color, size) => StyleSheet.create({
|
|
|
46
46
|
backgroundColor: color.background_light,
|
|
47
47
|
borderColor: color.background,
|
|
48
48
|
borderRadius: size,
|
|
49
|
-
borderWidth:
|
|
49
|
+
borderWidth: 1,
|
|
50
50
|
},
|
|
51
51
|
});
|
|
52
52
|
export default NumberBubble;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NumberBubble.js","sourceRoot":"","sources":["../../../../src/components/molecules/NumberBubble/NumberBubble.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,OAAO,EAAC,MAAM,OAAO,CAAC;AACrC,OAAO,EAAC,UAAU,EAAE,IAAI,EAAE,UAAU,EAAC,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAC,IAAI,EAAC,MAAM,aAAa,CAAC;AACjC,OAAO,EAAQ,aAAa,EAAC,MAAM,gBAAgB,CAAC;AAEpD,MAAM,YAAY,GAAG,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,KAAK,GAAG,IAAI,CAAC;AAU3D,MAAM,YAAY,GAAG,CAAC,EACpB,KAAK,EACL,MAAM,EACN,KAAK,EACL,mBAAmB,GAAG,IAAI,EAC1B,IAAI,GAAG,YAAY,GACD,EAAE,EAAE;IACtB,MAAM,MAAM,GAAG,aAAa,EAAE,CAAC;IAE/B,MAAM,MAAM,GAAG,OAAO,CACpB,GAAG,EAAE,CACH,mBAAmB;QACjB,CAAC,CAAC;YACE,UAAU,E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C5B,gBAAgB,EAAE,MAAM,CAAC,eAAe;YACxC,UAAU,EAAE,MAAM,CAAC,IAAI;SACxB;QACH,CAAC,CAAC,KAAK,EACX,CAAC,MAAM,EAAE,KAAK,EAAE,mBAAmB,CAAC,CACrC,CAAC;IAEF,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,CAAC,EAAE,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC;IAEtE,OAAO,CACL,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,uBAAuB,CACjE;MAAA,CAAC,IAAI,CACH,SAAS,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,CAC7B,oBAAoB,CACpB,QAAQ,CAAC,CAAC,IAAI,GAAG,GAAG,CAAC,CACrB;QAAA,CAAC,MAAM,CACT;MAAA,EAAE,IAAI,CACR;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,SAAS,GAAG,CAAC,KAAY,EAAE,IAAY,EAAE,EAAE,CAC/C,UAAU,CAAC,MAAM,CAAC;IAChB,MAAM,EAAE;QACN,SAAS,EAAE,QAAQ;QACnB,cAAc,EAAE,QAAQ;QACxB,UAAU,EAAE,QAAQ;QACpB,KAAK,EAAE,IAAI;QACX,MAAM,EAAE,IAAI;QACZ,eAAe,EAAE,KAAK,CAAC,gBAAgB;QACvC,WAAW,EAAE,KAAK,CAAC,UAAU;QAC7B,YAAY,EAAE,IAAI;QAClB,WAAW,EAAE,CAAC;KACf;CACF,CAAC,CAAC;AAEL,eAAe,YAAY,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { Ref } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { TextInputInstance } from 'react-native';
|
|
3
3
|
export declare const INPUT_CHANGE_TYPE: {
|
|
4
4
|
button: number;
|
|
5
5
|
keyboard: number;
|
|
@@ -7,7 +7,8 @@ export declare const INPUT_CHANGE_TYPE: {
|
|
|
7
7
|
};
|
|
8
8
|
interface NumberChevronInputProps {
|
|
9
9
|
style?: any;
|
|
10
|
-
|
|
10
|
+
inputStyle?: any;
|
|
11
|
+
inputRef?: Ref<TextInputInstance>;
|
|
11
12
|
defaultValue?: number;
|
|
12
13
|
stepSize?: number;
|
|
13
14
|
minValue?: number;
|
|
@@ -16,6 +17,7 @@ interface NumberChevronInputProps {
|
|
|
16
17
|
onEndFocus?: () => void;
|
|
17
18
|
required?: boolean;
|
|
18
19
|
readonly?: boolean;
|
|
20
|
+
keyboardDisabled?: boolean;
|
|
19
21
|
}
|
|
20
|
-
declare const NumberChevronInput: ({ style, inputRef, defaultValue, stepSize, minValue, maxValue, onValueChange, onEndFocus, required, readonly, }: NumberChevronInputProps) => React.JSX.Element;
|
|
22
|
+
declare const NumberChevronInput: ({ style, inputStyle, inputRef, defaultValue, stepSize, minValue, maxValue, onValueChange, onEndFocus, required, readonly, keyboardDisabled, }: NumberChevronInputProps) => React.JSX.Element;
|
|
21
23
|
export default NumberChevronInput;
|
|
@@ -15,12 +15,12 @@
|
|
|
15
15
|
* You should have received a copy of the GNU Affero General Public License
|
|
16
16
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
17
|
*/
|
|
18
|
-
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
|
18
|
+
import React, { useCallback, useEffect, useMemo, useRef, useState, } from 'react';
|
|
19
19
|
import { StyleSheet, View } from 'react-native';
|
|
20
20
|
import { useThemeColor } from '../../../theme';
|
|
21
|
-
import { getCommonStyles } from '../../../utils';
|
|
21
|
+
import { checkNullString, getCommonStyles } from '../../../utils';
|
|
22
22
|
import { Icon, Input } from '../../atoms';
|
|
23
|
-
const ChevronButton = ({ isIncreasing, inputValue, setInputValue, stepSize,
|
|
23
|
+
const ChevronButton = ({ isIncreasing, inputValue, setInputValue, stepSize, maxValue, minValue, onValueChange, readonly, }) => {
|
|
24
24
|
const Colors = useThemeColor();
|
|
25
25
|
const canIncreaseValue = useMemo(() => !readonly && (maxValue == null || inputValue < maxValue), [inputValue, maxValue, readonly]);
|
|
26
26
|
const canDecreaseValue = useMemo(() => !readonly && (minValue == null || inputValue > minValue), [inputValue, minValue, readonly]);
|
|
@@ -33,29 +33,34 @@ const ChevronButton = ({ isIncreasing, inputValue, setInputValue, stepSize, read
|
|
|
33
33
|
else if (maxValue != null && newValue > maxValue) {
|
|
34
34
|
newValue = maxValue;
|
|
35
35
|
}
|
|
36
|
-
onValueChange(newValue, INPUT_CHANGE_TYPE.button);
|
|
36
|
+
onValueChange?.(newValue, INPUT_CHANGE_TYPE.button);
|
|
37
37
|
return newValue;
|
|
38
38
|
});
|
|
39
39
|
};
|
|
40
|
-
const
|
|
41
|
-
|
|
42
|
-
return (<Icon name={iconName} color={canChangeValue
|
|
40
|
+
const canChangeValue = useMemo(() => (isIncreasing ? canIncreaseValue : canDecreaseValue), [canDecreaseValue, canIncreaseValue, isIncreasing]);
|
|
41
|
+
return (<Icon name={isIncreasing ? 'chevron-up' : 'chevron-down'} color={canChangeValue
|
|
43
42
|
? Colors.secondaryColor_dark.background
|
|
44
|
-
: Colors.secondaryColor.
|
|
43
|
+
: Colors.secondaryColor.background_light} touchable={canChangeValue} onPress={changeValue}/>);
|
|
45
44
|
};
|
|
46
45
|
export const INPUT_CHANGE_TYPE = {
|
|
47
46
|
button: 0,
|
|
48
47
|
keyboard: 1,
|
|
49
48
|
limit: 2,
|
|
50
49
|
};
|
|
51
|
-
const NumberChevronInput = ({ style, inputRef, defaultValue = 0, stepSize = 1, minValue = 0, maxValue = 9, onValueChange
|
|
50
|
+
const NumberChevronInput = ({ style, inputStyle, inputRef, defaultValue = 0, stepSize = 1, minValue = 0, maxValue = 9, onValueChange, onEndFocus, required = false, readonly = false, keyboardDisabled = false, }) => {
|
|
52
51
|
const Colors = useThemeColor();
|
|
52
|
+
const defaultInputRef = useRef(null);
|
|
53
|
+
const _inputRef = inputRef ?? defaultInputRef;
|
|
53
54
|
const [inputValue, setInputValue] = useState(defaultValue);
|
|
55
|
+
const [isCleared, setIsCleared] = useState(false);
|
|
54
56
|
const [isFocused, setIsFocused] = useState(false);
|
|
57
|
+
const updateValue = useCallback(value => {
|
|
58
|
+
setIsCleared(false);
|
|
59
|
+
setInputValue(value);
|
|
60
|
+
}, []);
|
|
55
61
|
const _required = useMemo(() => required && (inputValue == null || inputValue === 0), [required, inputValue]);
|
|
56
|
-
const commonStyles = useMemo(() => getCommonStyles(Colors, _required), [Colors, _required]);
|
|
57
|
-
const
|
|
58
|
-
const handleChange = useCallback((value) => {
|
|
62
|
+
const commonStyles = useMemo(() => getCommonStyles(Colors, _required, isFocused), [Colors, _required, isFocused]);
|
|
63
|
+
const handleChange = useCallback((value = '0') => {
|
|
59
64
|
let writtenNumber = null;
|
|
60
65
|
let mode = INPUT_CHANGE_TYPE.keyboard;
|
|
61
66
|
if (maxValue != null && value?.length > maxValue.toString().length) {
|
|
@@ -81,48 +86,50 @@ const NumberChevronInput = ({ style, inputRef, defaultValue = 0, stepSize = 1, m
|
|
|
81
86
|
}
|
|
82
87
|
}, [defaultValue, handleChange]);
|
|
83
88
|
const handleInputChange = useCallback((value) => {
|
|
89
|
+
if (checkNullString(value)) {
|
|
90
|
+
setIsCleared(true);
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
84
93
|
if (!Number.isNaN(Number(value))) {
|
|
85
94
|
const { newValue, mode } = handleChange(value);
|
|
95
|
+
setIsCleared(false);
|
|
86
96
|
setInputValue(newValue);
|
|
87
|
-
onValueChange(newValue, mode);
|
|
97
|
+
onValueChange?.(newValue, mode);
|
|
88
98
|
}
|
|
89
99
|
}, [handleChange, onValueChange]);
|
|
90
100
|
const handleSelection = useCallback(() => {
|
|
91
|
-
if (
|
|
92
|
-
|
|
101
|
+
if (_inputRef?.current) {
|
|
102
|
+
_inputRef.current.setSelection(0, inputValue?.toString().length);
|
|
93
103
|
}
|
|
94
104
|
setIsFocused(true);
|
|
95
|
-
}, [
|
|
105
|
+
}, [_inputRef, inputValue]);
|
|
96
106
|
const handleEndFocus = useCallback(() => {
|
|
107
|
+
setIsCleared(false);
|
|
97
108
|
setIsFocused(false);
|
|
98
|
-
onEndFocus();
|
|
109
|
+
onEndFocus?.();
|
|
99
110
|
}, [onEndFocus]);
|
|
100
111
|
return (<View testID="numberChevronInputContainer" style={[styles.container, style]}>
|
|
101
|
-
<ChevronButton isIncreasing={true} inputValue={inputValue} maxValue={maxValue} minValue={minValue} onValueChange={onValueChange} readonly={readonly} setInputValue={
|
|
112
|
+
<ChevronButton isIncreasing={true} inputValue={inputValue} maxValue={maxValue} minValue={minValue} onValueChange={onValueChange} readonly={readonly} setInputValue={updateValue} stepSize={stepSize}/>
|
|
102
113
|
<View style={[
|
|
103
114
|
commonStyles.filter,
|
|
104
|
-
commonStyles.filterSize,
|
|
105
115
|
commonStyles.filterAlign,
|
|
106
116
|
styles.inputContainer,
|
|
107
|
-
isFocused && commonStyles.inputFocused,
|
|
108
117
|
]}>
|
|
109
|
-
<Input style={styles.input} inputRef={
|
|
118
|
+
<Input style={[styles.input, inputStyle]} inputRef={_inputRef} value={isCleared ? '' : inputValue?.toString()} onChange={handleInputChange} onSelection={handleSelection} onEndFocus={handleEndFocus} readOnly={readonly || keyboardDisabled} keyboardType="numeric"/>
|
|
110
119
|
</View>
|
|
111
|
-
<ChevronButton isIncreasing={false} inputValue={inputValue} maxValue={maxValue} minValue={minValue} onValueChange={onValueChange} readonly={readonly} setInputValue={
|
|
120
|
+
<ChevronButton isIncreasing={false} inputValue={inputValue} maxValue={maxValue} minValue={minValue} onValueChange={onValueChange} readonly={readonly} setInputValue={updateValue} stepSize={stepSize}/>
|
|
112
121
|
</View>);
|
|
113
122
|
};
|
|
114
|
-
const
|
|
123
|
+
const styles = StyleSheet.create({
|
|
115
124
|
container: {
|
|
116
|
-
width:
|
|
125
|
+
width: 40,
|
|
117
126
|
flexDirection: 'column',
|
|
127
|
+
alignItems: 'center',
|
|
118
128
|
},
|
|
119
129
|
inputContainer: {
|
|
120
130
|
width: '100%',
|
|
121
131
|
marginHorizontal: 0,
|
|
122
|
-
|
|
123
|
-
borderColor: _required
|
|
124
|
-
? Colors.errorColor.background
|
|
125
|
-
: Colors.secondaryColor.background,
|
|
132
|
+
paddingHorizontal: 0,
|
|
126
133
|
},
|
|
127
134
|
input: {
|
|
128
135
|
width: '100%',
|