@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
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
*/
|
|
18
18
|
import React, { useCallback, useEffect, useRef, useState } from 'react';
|
|
19
19
|
import { Animated, ActivityIndicator, Dimensions, FlatList, StyleSheet, View, } from 'react-native';
|
|
20
|
+
import { useThemeColor } from '../../../theme';
|
|
20
21
|
import { Text } from '../../atoms';
|
|
21
22
|
import { CircleButton } from '../../molecules';
|
|
22
23
|
import TopActions from './TopActions';
|
|
@@ -27,6 +28,7 @@ const SCREEN_WIDTH_50_PERCENT = Dimensions.get('window').width * 0.5;
|
|
|
27
28
|
const SCREEN_HEIGHT_50_PERCENT = Dimensions.get('window').height * 0.5;
|
|
28
29
|
const AnimatedFlatList = Animated.createAnimatedComponent(FlatList);
|
|
29
30
|
const ScrollList = ({ style, styleFooter, loadingList = false, data = [], renderItem, fetchData = () => [], moreLoading = false, isListEnd = false, filter = false, translator, horizontal = false, disabledRefresh = false, actionList, verticalActions = true, onViewableItemsChanged, }) => {
|
|
31
|
+
const Colors = useThemeColor();
|
|
30
32
|
const { isScrollEnabled } = useConfig();
|
|
31
33
|
const [, setPage] = useState(0);
|
|
32
34
|
const [isLoading, setIsLoading] = useState(false);
|
|
@@ -81,7 +83,7 @@ const ScrollList = ({ style, styleFooter, loadingList = false, data = [], render
|
|
|
81
83
|
}, [renderActions, renderItem]);
|
|
82
84
|
const flatList = useRef(null);
|
|
83
85
|
const moveToTop = () => {
|
|
84
|
-
flatList
|
|
86
|
+
flatList?.current?.scrollToIndex({ index: 0, animated: true });
|
|
85
87
|
};
|
|
86
88
|
const translateY = new Animated.Value(0);
|
|
87
89
|
const handleScroll = Animated.event([{ nativeEvent: { contentOffset: { y: translateY } } }], { useNativeDriver: true });
|
|
@@ -115,8 +117,8 @@ const ScrollList = ({ style, styleFooter, loadingList = false, data = [], render
|
|
|
115
117
|
}, [loadingList]);
|
|
116
118
|
const renderFooter = useCallback(() => {
|
|
117
119
|
return (<View style={[styles.footerText, styleFooter]}>
|
|
118
|
-
{moreLoading && <ActivityIndicator size="large" color=
|
|
119
|
-
{isListEnd && (<Text>
|
|
120
|
+
{moreLoading && (<ActivityIndicator size="large" color={Colors.primaryColor.background}/>)}
|
|
121
|
+
{isListEnd && (<Text textColor={Colors.secondaryColor.background_light}>
|
|
120
122
|
{data == null || data?.length === 0
|
|
121
123
|
? translator != null
|
|
122
124
|
? translator('Base_NoData')
|
|
@@ -126,10 +128,10 @@ const ScrollList = ({ style, styleFooter, loadingList = false, data = [], render
|
|
|
126
128
|
: 'No more items.'}
|
|
127
129
|
</Text>)}
|
|
128
130
|
</View>);
|
|
129
|
-
}, [data, isListEnd, moreLoading, styleFooter, translator]);
|
|
131
|
+
}, [Colors, data, isListEnd, moreLoading, styleFooter, translator]);
|
|
130
132
|
if (isLoading) {
|
|
131
133
|
return (<View style={styles.loadingContainer}>
|
|
132
|
-
<ActivityIndicator size="large" color=
|
|
134
|
+
<ActivityIndicator size="large" color={Colors.primaryColor.background}/>
|
|
133
135
|
</View>);
|
|
134
136
|
}
|
|
135
137
|
return (<View style={styles.container} testID="scrollListContainer">
|
|
@@ -157,10 +159,10 @@ const styles = StyleSheet.create({
|
|
|
157
159
|
},
|
|
158
160
|
footerText: {
|
|
159
161
|
alignSelf: 'center',
|
|
160
|
-
|
|
162
|
+
marginVertical: 8,
|
|
161
163
|
},
|
|
162
164
|
scrollView: {
|
|
163
|
-
paddingTop:
|
|
165
|
+
paddingTop: 4,
|
|
164
166
|
},
|
|
165
167
|
});
|
|
166
168
|
export default ScrollList;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScrollList.js","sourceRoot":"","sources":["../../../../src/components/organisms/ScrollList/ScrollList.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AACtE,OAAO,EACL,QAAQ,EACR,iBAAiB,EACjB,UAAU,EACV,QAAQ,EACR,UAAU,EACV,IAAI,GACL,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"ScrollList.js","sourceRoot":"","sources":["../../../../src/components/organisms/ScrollList/ScrollList.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AACtE,OAAO,EACL,QAAQ,EACR,iBAAiB,EACjB,UAAU,EACV,QAAQ,EACR,UAAU,EACV,IAAI,GACL,MAAM,cAAc,CAAC;AACtB,OAAO,EAAQ,aAAa,EAAC,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAC,IAAI,EAAC,MAAM,aAAa,CAAC;AACjC,OAAO,EAAC,YAAY,EAAC,MAAM,iBAAiB,CAAC;AAC7C,OAAO,UAAU,MAAM,cAAc,CAAC;AACtC,OAAO,EAAC,SAAS,EAAC,MAAM,+BAA+B,CAAC;AAExD,MAAM,kCAAkC,GAAG,IAAI,CAAC;AAChD,MAAM,WAAW,GAAG,EAAE,CAAC;AACvB,MAAM,uBAAuB,GAAG,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,KAAK,GAAG,GAAG,CAAC;AACrE,MAAM,wBAAwB,GAAG,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,MAAM,GAAG,GAAG,CAAC;AAEvE,MAAM,gBAAgB,GAAG,QAAQ,CAAC,uBAAuB,CAAC,QAAQ,CAAC,CAAC;AA2BpE,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sBAAsB,CAAC,CAAC,sBAAsB,CAAC,CAC/C,iBAAiB,CAAC,CAAC;YACjB,2BAA2B,EAAE,CAAC;SAC/B,CAAC,CACF,aAAa,CAAC,CAAC,eAAe,CAAC,CAC/B,mBAAmB,EAEvB;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,SAAS,EAAE;QACT,IAAI,EAAE,CAAC;KACR;IACD,eAAe,EAAE;QACf,QAAQ,EAAE,UAAU;QACpB,GAAG,EAAE,CAAC;QACN,IAAI,EAAE,uBAAuB,GAAG,WAAW,GAAG,CAAC;QAC/C,MAAM,EAAE,CAAC;KACV;IACD,gBAAgB,EAAE;QAChB,IAAI,EAAE,CAAC;KACR;IACD,UAAU,EAAE;QACV,SAAS,EAAE,QAAQ;QACnB,cAAc,EAAE,CAAC;KAClB;IACD,UAAU,EAAE;QACV,UAAU,EAAE,CAAC;KACd;CACF,CAAC,CAAC;AAEH,eAAe,UAAU,CAAC"}
|
|
@@ -20,9 +20,11 @@ import { StyleSheet, View } from 'react-native';
|
|
|
20
20
|
import DottedButton from './DottedButton';
|
|
21
21
|
const TopActions = ({ actionList, verticalActions }) => {
|
|
22
22
|
return (<View style={styles.container} testID="topActionsContainer">
|
|
23
|
-
{actionList
|
|
23
|
+
{actionList?.map((action, index) => {
|
|
24
24
|
let horizontal = verticalActions;
|
|
25
|
-
|
|
25
|
+
const isLast = index === actionList.length - 1;
|
|
26
|
+
const isOddCount = actionList.length % 2 === 1;
|
|
27
|
+
if (!verticalActions && isLast && isOddCount) {
|
|
26
28
|
horizontal = true;
|
|
27
29
|
}
|
|
28
30
|
return (<DottedButton iconName={action.iconName} title={action.title} horizontal={horizontal} onPress={action.onPress} key={index}/>);
|
|
@@ -33,9 +35,9 @@ const styles = StyleSheet.create({
|
|
|
33
35
|
container: {
|
|
34
36
|
flexDirection: 'row',
|
|
35
37
|
flexWrap: 'wrap',
|
|
36
|
-
justifyContent: 'space-between',
|
|
37
38
|
marginBottom: 5,
|
|
38
39
|
marginHorizontal: 12,
|
|
40
|
+
gap: 5,
|
|
39
41
|
},
|
|
40
42
|
});
|
|
41
43
|
export default TopActions;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TopActions.js","sourceRoot":"","sources":["../../../../src/components/organisms/ScrollList/TopActions.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,UAAU,EAAE,IAAI,EAAC,MAAM,cAAc,CAAC;AAE9C,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAO1C,MAAM,UAAU,GAAG,CAAC,EAAC,UAAU,EAAE,eAAe,EAAkB,EAAE,EAAE;IACpE,OAAO,CACL,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,qBAAqB,CACzD;MAAA,CAAC,UAAU,
|
|
1
|
+
{"version":3,"file":"TopActions.js","sourceRoot":"","sources":["../../../../src/components/organisms/ScrollList/TopActions.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,UAAU,EAAE,IAAI,EAAC,MAAM,cAAc,CAAC;AAE9C,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAO1C,MAAM,UAAU,GAAG,CAAC,EAAC,UAAU,EAAE,eAAe,EAAkB,EAAE,EAAE;IACpE,OAAO,CACL,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,qBAAqB,CACzD;MAAA,CAAC,UAAU,EAAE,GAAG,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;YACjC,IAAI,UAAU,GAAG,eAAe,CAAC;YACjC,MAAM,MAAM,GAAG,KAAK,KAAK,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC;YAC/C,MAAM,UAAU,GAAG,UAAU,CAAC,MAAM,GAAG,CAAC,KAAK,CAAC,CAAC;YAC/C,IAAI,CAAC,eAAe,IAAI,MAAM,IAAI,UAAU,EAAE,CAAC;gBAC7C,UAAU,GAAG,IAAI,CAAC;YACpB,CAAC;YAED,OAAO,CACL,CAAC,YAAY,CACX,QAAQ,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAC1B,KAAK,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CACpB,UAAU,CAAC,CAAC,UAAU,CAAC,CACvB,OAAO,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CACxB,GAAG,CAAC,CAAC,KAAK,CAAC,EACX,CACH,CAAC;QACJ,CAAC,CAAC,CACJ;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,SAAS,EAAE;QACT,aAAa,EAAE,KAAK;QACpB,QAAQ,EAAE,MAAM;QAChB,YAAY,EAAE,CAAC;QACf,gBAAgB,EAAE,EAAE;QACpB,GAAG,EAAE,CAAC;KACP;CACF,CAAC,CAAC;AAEH,eAAe,UAAU,CAAC"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import React, { Ref } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { TextInputInstance } from 'react-native';
|
|
3
3
|
interface SearchBarProps {
|
|
4
4
|
title?: string;
|
|
5
5
|
style?: any;
|
|
6
|
-
inputRef?: Ref<
|
|
6
|
+
inputRef?: Ref<TextInputInstance>;
|
|
7
7
|
valueTxt: string;
|
|
8
8
|
placeholder: string;
|
|
9
9
|
required?: boolean;
|
|
10
10
|
readonly?: boolean;
|
|
11
11
|
onClearPress: () => void;
|
|
12
|
-
onChangeTxt: (
|
|
12
|
+
onChangeTxt: (_v?: string) => void;
|
|
13
13
|
onSelection?: () => void;
|
|
14
14
|
onEndFocus?: () => void;
|
|
15
15
|
onScanPress?: () => void;
|
|
@@ -15,54 +15,37 @@
|
|
|
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, View } from 'react-native';
|
|
20
|
-
import { checkNullString
|
|
20
|
+
import { checkNullString } from '../../../utils';
|
|
21
21
|
import { useThemeColor } from '../../../theme';
|
|
22
22
|
import { Icon, Text } from '../../atoms';
|
|
23
23
|
import { FormInput, IconInput } from '../../molecules';
|
|
24
|
-
const SearchBar = ({ title, style, inputRef, valueTxt, placeholder, required = false, readonly, onClearPress, onChangeTxt, onSelection
|
|
24
|
+
const SearchBar = ({ title, style, inputRef, valueTxt, placeholder, required = false, readonly = false, onClearPress, onChangeTxt, onSelection, onEndFocus, onScanPress, scanIconColor, onSearchPress, disableSearchPress = false, selected = false, isScannableInput, }) => {
|
|
25
25
|
const Colors = useThemeColor();
|
|
26
|
-
const _required = useMemo(() => required && checkNullString(valueTxt), [required, valueTxt]);
|
|
27
|
-
const commonStyles = useMemo(() => getCommonStyles(Colors, _required), [Colors, _required]);
|
|
28
|
-
const styles = useMemo(() => getStyles(Colors, _required), [Colors, _required]);
|
|
29
26
|
if (readonly) {
|
|
30
|
-
return (<
|
|
27
|
+
return (<View style={style}>
|
|
28
|
+
<FormInput style={styles.content} title={title} defaultValue={valueTxt} readOnly/>
|
|
29
|
+
</View>);
|
|
31
30
|
}
|
|
32
|
-
return (<View style={
|
|
31
|
+
return (<View style={style}>
|
|
33
32
|
{!checkNullString(title) && <Text style={styles.title}>{title}</Text>}
|
|
34
|
-
<IconInput inputRef={inputRef} style={[
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
commonStyles.filterSize,
|
|
38
|
-
styles.content,
|
|
39
|
-
]} value={valueTxt} placeholder={placeholder} onChange={onChangeTxt} onSelection={onSelection} onEndFocus={onEndFocus} readOnly={selected} rightIconsList={[
|
|
40
|
-
<Icon style={styles.action} name="x-lg" color={Colors.secondaryColor_dark.background} size={20} touchable={true} visible={!checkNullString(valueTxt)} onPress={onClearPress}/>,
|
|
41
|
-
<Icon style={styles.action} name="search" color={disableSearchPress
|
|
33
|
+
<IconInput inputRef={inputRef} style={styles.content} value={valueTxt} placeholder={placeholder} onChange={onChangeTxt} onSelection={onSelection} onEndFocus={onEndFocus} readOnly={selected} required={required} rightIconsList={[
|
|
34
|
+
<Icon name="x-lg" color={Colors.secondaryColor_dark.background} size={14} touchable={true} visible={!checkNullString(valueTxt)} onPress={onClearPress}/>,
|
|
35
|
+
<Icon name="search" color={disableSearchPress
|
|
42
36
|
? Colors.secondaryColor.background
|
|
43
|
-
: Colors.secondaryColor_dark.background} onPress={onSearchPress} touchable={!disableSearchPress} size={
|
|
44
|
-
<Icon
|
|
37
|
+
: Colors.secondaryColor_dark.background} onPress={onSearchPress} touchable={!disableSearchPress} size={14}/>,
|
|
38
|
+
<Icon name="qr-code-scan" color={scanIconColor} size={14} touchable={true} visible={!checkNullString(scanIconColor)} onPress={onScanPress}/>,
|
|
45
39
|
]} isScannableInput={isScannableInput}/>
|
|
46
40
|
</View>);
|
|
47
41
|
};
|
|
48
|
-
const
|
|
49
|
-
|
|
50
|
-
marginLeft:
|
|
51
|
-
},
|
|
52
|
-
container: {
|
|
53
|
-
width: '100%',
|
|
42
|
+
const styles = StyleSheet.create({
|
|
43
|
+
title: {
|
|
44
|
+
marginLeft: 10,
|
|
54
45
|
},
|
|
55
46
|
content: {
|
|
56
47
|
width: '100%',
|
|
57
|
-
borderColor: _required
|
|
58
|
-
? Colors.errorColor.background
|
|
59
|
-
: Colors.secondaryColor.background,
|
|
60
|
-
borderWidth: 1,
|
|
61
48
|
marginHorizontal: 0,
|
|
62
|
-
minHeight: 40,
|
|
63
|
-
},
|
|
64
|
-
title: {
|
|
65
|
-
marginLeft: 10,
|
|
66
49
|
},
|
|
67
50
|
});
|
|
68
51
|
export default SearchBar;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchBar.js","sourceRoot":"","sources":["../../../../src/components/organisms/SearchBar/SearchBar.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"SearchBar.js","sourceRoot":"","sources":["../../../../src/components/organisms/SearchBar/SearchBar.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAY,MAAM,OAAO,CAAC;AACjC,OAAO,EAAC,UAAU,EAAqB,IAAI,EAAC,MAAM,cAAc,CAAC;AACjE,OAAO,EAAC,eAAe,EAAC,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAC,aAAa,EAAC,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAC,IAAI,EAAE,IAAI,EAAC,MAAM,aAAa,CAAC;AACvC,OAAO,EAAC,SAAS,EAAE,SAAS,EAAC,MAAM,iBAAiB,CAAC;AAsBrD,MAAM,SAAS,GAAG,CAAC,EACjB,KAAK,EACL,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,WAAW,EACX,QAAQ,GAAG,KAAK,EAChB,QAAQ,GAAG,KAAK,EAChB,YAAY,EACZ,WAAW,EACX,WAAW,EACX,UAAU,EACV,WAAW,EACX,aAAa,EACb,aAAa,EACb,kBAAkB,GAAG,KAAK,EAC1B,QAAQ,GAAG,KAAK,EAChB,gBAAgB,GACD,EAAE,EAAE;IACnB,MAAM,MAAM,GAAG,aAAa,EAAE,CAAC;IAE/B,IAAI,QAAQ,EAAE,CAAC;QACb,OAAO,CACL,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CACjB;QAAA,CAAC,SAAS,CACR,KAAK,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CACtB,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,YAAY,CAAC,CAAC,QAAQ,CAAC,C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C,CAAC,EAAE,CAAC,EACT;YACF,CAAC,IAAI,CACH,IAAI,CAAC,cAAc,CACnB,KAAK,CAAC,CAAC,aAAa,CAAC,CACrB,IAAI,CAAC,CAAC,EAAE,CAAC,CACT,SAAS,CAAC,CAAC,IAAI,CAAC,CAChB,OAAO,CAAC,CAAC,CAAC,eAAe,CAAC,aAAa,CAAC,CAAC,CACzC,OAAO,CAAC,CAAC,WAAW,CAAC,EACrB;SACH,CAAC,CACF,gBAAgB,CAAC,CAAC,gBAAgB,CAAC,EAEvC;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,KAAK,EAAE;QACL,UAAU,EAAE,EAAE;KACf;IACD,OAAO,EAAE;QACP,KAAK,EAAE,MAAM;QACb,gBAAgB,EAAE,CAAC;KACpB;CACF,CAAC,CAAC;AAEH,eAAe,SAAS,CAAC"}
|
|
@@ -36,7 +36,7 @@ const SingleSelectScrollList = ({ scrollStyle, rowStyle, loadingList = false, mo
|
|
|
36
36
|
return null;
|
|
37
37
|
}
|
|
38
38
|
const isSelected = item[keyField] === selectedKey;
|
|
39
|
-
return (<TouchableOpacity testID={`singleSelectScrollListItemContainer-${index}`} onPress={() => handleRowSelection(item)} activeOpacity={0.
|
|
39
|
+
return (<TouchableOpacity testID={`singleSelectScrollListItemContainer-${index}`} onPress={() => handleRowSelection(item)} activeOpacity={0.9} style={[
|
|
40
40
|
styles.container,
|
|
41
41
|
isSelected && styles.selectedCard,
|
|
42
42
|
rowStyle,
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
import React, { useState, useCallback, useMemo, useEffect } from 'react';
|
|
19
19
|
import { useThemeColor } from '../../../theme';
|
|
20
20
|
import Button from '../../molecules/Button/Button';
|
|
21
|
-
const ToggleButton = ({ isActive = false, activeColor, inactiveColor, buttonConfig, isNeutralBackground = true, onPress
|
|
21
|
+
const ToggleButton = ({ isActive = false, activeColor, inactiveColor, buttonConfig, isNeutralBackground = true, onPress, }) => {
|
|
22
22
|
const Colors = useThemeColor();
|
|
23
23
|
const [isSelected, setIsSelected] = useState(isActive);
|
|
24
24
|
useEffect(() => {
|
|
@@ -33,7 +33,7 @@ const ToggleButton = ({ isActive = false, activeColor, inactiveColor, buttonConf
|
|
|
33
33
|
const handlePress = useCallback(() => {
|
|
34
34
|
setIsSelected(current => {
|
|
35
35
|
const newValue = !current;
|
|
36
|
-
onPress(newValue);
|
|
36
|
+
onPress?.(newValue);
|
|
37
37
|
return newValue;
|
|
38
38
|
});
|
|
39
39
|
}, [onPress]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToggleButton.js","sourceRoot":"","sources":["../../../../src/components/organisms/ToggleButton/ToggleButton.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,QAAQ,EAAE,WAAW,EAAE,OAAO,EAAE,SAAS,EAAC,MAAM,OAAO,CAAC;AACvE,OAAO,EAAC,aAAa,EAAQ,MAAM,gBAAgB,CAAC;AACpD,OAAO,MAAqB,MAAM,+BAA+B,CAAC;AAWlE,MAAM,YAAY,GAAG,CAAC,EACpB,QAAQ,GAAG,KAAK,EAChB,WAAW,EACX,aAAa,EACb,YAAY,EACZ,mBAAmB,GAAG,IAAI,EAC1B,OAAO,
|
|
1
|
+
{"version":3,"file":"ToggleButton.js","sourceRoot":"","sources":["../../../../src/components/organisms/ToggleButton/ToggleButton.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,QAAQ,EAAE,WAAW,EAAE,OAAO,EAAE,SAAS,EAAC,MAAM,OAAO,CAAC;AACvE,OAAO,EAAC,aAAa,EAAQ,MAAM,gBAAgB,CAAC;AACpD,OAAO,MAAqB,MAAM,+BAA+B,CAAC;AAWlE,MAAM,YAAY,GAAG,CAAC,EACpB,QAAQ,GAAG,K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IAAI,CAAC,UAAU;SACxD,CAAC;IACJ,CAAC,EAAE;QACD,YAAY;QACZ,cAAc;QACd,YAAY;QACZ,mBAAmB;QACnB,UAAU;KACX,CAAC,CAAC;IAEH,OAAO,CAAC,MAAM,CAAC,IAAI,gBAAgB,CAAC,CAAC,OAAO,CAAC,CAAC,WAAW,CAAC,EAAG,CAAC;AAChE,CAAC,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -17,10 +17,10 @@
|
|
|
17
17
|
*/
|
|
18
18
|
import React, { useState } from 'react';
|
|
19
19
|
import { StyleSheet, View } from 'react-native';
|
|
20
|
-
import { Icon, Text } from '../../atoms';
|
|
21
|
-
import { Alert } from '../../molecules';
|
|
22
|
-
import { CheckboxScrollList } from '../../organisms';
|
|
23
20
|
import { useThemeColor } from '../../../theme';
|
|
21
|
+
import { CheckboxScrollList } from '../../organisms';
|
|
22
|
+
import { Alert, IconTile } from '../../molecules';
|
|
23
|
+
import { Text } from '../../atoms';
|
|
24
24
|
const AllLinesAlert = ({ title, isAlertVisible, setIsAlertVisible, lines, setLines, handleEditLine, translator, }) => {
|
|
25
25
|
const Colors = useThemeColor();
|
|
26
26
|
const [selectedLines, setSelectedLines] = useState([]);
|
|
@@ -28,19 +28,17 @@ const AllLinesAlert = ({ title, isAlertVisible, setIsAlertVisible, lines, setLin
|
|
|
28
28
|
return (<View style={styles.renderContainer}>
|
|
29
29
|
<View style={styles.renderFirstLine}>
|
|
30
30
|
<View style={styles.text}>
|
|
31
|
-
<Text style={styles.
|
|
32
|
-
|
|
33
|
-
</Text>
|
|
34
|
-
<Text style={styles.productQty}>
|
|
31
|
+
<Text style={styles.title}>{item.name}</Text>
|
|
32
|
+
<Text style={styles.qty}>
|
|
35
33
|
{item.qty} {item.unitName}
|
|
36
34
|
</Text>
|
|
37
35
|
</View>
|
|
38
|
-
{handleEditLine && (<
|
|
36
|
+
{handleEditLine && (<IconTile icon="pencil-fill" size={30} iconSize={15} onPress={() => {
|
|
39
37
|
setIsAlertVisible(false);
|
|
40
38
|
handleEditLine(item);
|
|
41
39
|
}}/>)}
|
|
42
40
|
</View>
|
|
43
|
-
{item.nameDetails &&
|
|
41
|
+
{item.nameDetails && <Text>{item.nameDetails}</Text>}
|
|
44
42
|
</View>);
|
|
45
43
|
};
|
|
46
44
|
return (<Alert style={styles.alertContainer} visible={isAlertVisible} title={title} cancelButtonConfig={{
|
|
@@ -52,7 +50,8 @@ const AllLinesAlert = ({ title, isAlertVisible, setIsAlertVisible, lines, setLin
|
|
|
52
50
|
width: '45%',
|
|
53
51
|
color: Colors.warningColor,
|
|
54
52
|
onPress: () => {
|
|
55
|
-
setLines(lines.filter(_line => selectedLines.filter(
|
|
53
|
+
setLines(lines.filter(_line => selectedLines.filter((_s) => _s.id === _line.id).length ===
|
|
54
|
+
0));
|
|
56
55
|
setIsAlertVisible(false);
|
|
57
56
|
},
|
|
58
57
|
}} translator={translator}>
|
|
@@ -60,8 +59,10 @@ const AllLinesAlert = ({ title, isAlertVisible, setIsAlertVisible, lines, setLin
|
|
|
60
59
|
</Alert>);
|
|
61
60
|
};
|
|
62
61
|
const styles = StyleSheet.create({
|
|
62
|
+
alertContainer: {
|
|
63
|
+
height: '70%',
|
|
64
|
+
},
|
|
63
65
|
renderContainer: {
|
|
64
|
-
minHeight: 45,
|
|
65
66
|
justifyContent: 'center',
|
|
66
67
|
},
|
|
67
68
|
renderFirstLine: {
|
|
@@ -73,15 +74,12 @@ const styles = StyleSheet.create({
|
|
|
73
74
|
alignItems: 'center',
|
|
74
75
|
flex: 1,
|
|
75
76
|
},
|
|
76
|
-
|
|
77
|
+
title: {
|
|
77
78
|
flex: 1,
|
|
78
79
|
},
|
|
79
|
-
|
|
80
|
+
qty: {
|
|
80
81
|
maxWidth: '25%',
|
|
81
82
|
},
|
|
82
|
-
alertContainer: {
|
|
83
|
-
height: '70%',
|
|
84
|
-
},
|
|
85
83
|
});
|
|
86
84
|
export default AllLinesAlert;
|
|
87
85
|
//# sourceMappingURL=AllLinesAlert.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AllLinesAlert.js","sourceRoot":"","sources":["../../../../src/components/organisms/ViewAllEditList/AllLinesAlert.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,QAAQ,EAAC,MAAM,OAAO,CAAC;AACtC,OAAO,EAAC,UAAU,EAAE,IAAI,EAAC,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAC,
|
|
1
|
+
{"version":3,"file":"AllLinesAlert.js","sourceRoot":"","sources":["../../../../src/components/organisms/ViewAllEditList/AllLinesAlert.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,QAAQ,EAAC,MAAM,OAAO,CAAC;AACtC,OAAO,EAAC,UAAU,EAAE,IAAI,EAAC,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAC,aAAa,EAAC,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAC,kBAAkB,EAAC,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAC,KAAK,EAAE,QAAQ,EAAC,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAC,IAAI,EAAC,MAAM,aAAa,CAAC;AAajC,MAAM,aAAa,GAAG,CAAC,EACrB,KAAK,EACL,cAAc,EACd,iBAAiB,EACjB,KAAK,EACL,QAAQ,EACR,cAAc,EACd,UAAU,GACS,EAAE,EAAE;IACvB,MAAM,MAAM,GAAG,aAAa,EAAE,CAAC;IAE/B,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,QAAQ,CAAQ,EAAE,CAAC,CAAC;IAE9D,MAAM,iBAAiB,GAAG,CAAC,EAAC,IAAI,EAAM,EAAE,EAAE;QACxC,OAAO,CACL,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,eAAe,CAAC,CAClC;QAAA,CAAC,IAAI,CAAC,KAAK,CA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AC;YAChC,QAAQ,EAAE,aAAa;YACvB,KAAK,EAAE,KAAK;YACZ,KAAK,EAAE,MAAM,CAAC,YAAY;YAC1B,OAAO,EAAE,GAAG,EAAE;gBACZ,QAAQ,CACN,KAAK,CAAC,MAAM,CACV,KAAK,CAAC,EAAE,CACN,aAAa,CAAC,MAAM,CAAC,CAAC,EAAO,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,KAAK,CAAC,EAAE,CAAC,CAAC,MAAM;oBAC5D,CAAC,CACJ,CACF,CAAC;gBACF,iBAAiB,CAAC,KAAK,CAAC,CAAC;YAC3B,CAAC;SACF,CAAC,CACF,UAAU,CAAC,CAAC,UAAU,CAAC,CACvB;MAAA,CAAC,kBAAkB,CACjB,IAAI,CAAC,CAAC,KAAK,CAAC,CACZ,eAAe,CAAC,CAAC,gBAA0C,CAAC,CAC5D,UAAU,CAAC,CAAC,iBAAiB,CAAC,CAC9B,UAAU,CAAC,CAAC,UAAU,CAAC,EAE3B;IAAA,EAAE,KAAK,CAAC,CACT,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,cAAc,EAAE;QACd,MAAM,EAAE,KAAK;KACd;IACD,eAAe,EAAE;QACf,cAAc,EAAE,QAAQ;KACzB;IACD,eAAe,EAAE;QACf,aAAa,EAAE,KAAK;QACpB,GAAG,EAAE,CAAC;KACP;IACD,IAAI,EAAE;QACJ,aAAa,EAAE,KAAK;QACpB,UAAU,EAAE,QAAQ;QACpB,IAAI,EAAE,CAAC;KACR;IACD,KAAK,EAAE;QACL,IAAI,EAAE,CAAC;KACR;IACD,GAAG,EAAE;QACH,QAAQ,EAAE,KAAK;KAChB;CACF,CAAC,CAAC;AAEH,eAAe,aAAa,CAAC"}
|
|
@@ -17,21 +17,22 @@
|
|
|
17
17
|
*/
|
|
18
18
|
import React from 'react';
|
|
19
19
|
import { StyleSheet, View } from 'react-native';
|
|
20
|
-
import { Icon, Text } from '../../atoms';
|
|
21
20
|
import { useThemeColor } from '../../../theme';
|
|
21
|
+
import { IconTile } from '../../molecules';
|
|
22
|
+
import { Text } from '../../atoms';
|
|
22
23
|
const LineComponent = ({ line, isSelected, handleEditLine, handleDeleteLine, }) => {
|
|
23
24
|
const Colors = useThemeColor();
|
|
24
25
|
return (<View style={styles.container}>
|
|
25
26
|
<View style={styles.line}>
|
|
26
|
-
<Text style={styles.productName} writingType={isSelected ? 'title' :
|
|
27
|
+
<Text style={styles.productName} writingType={isSelected ? 'title' : undefined} fontSize={12} textColor={isSelected ? Colors.secondaryColor.background : undefined}>
|
|
27
28
|
{line.name}
|
|
28
29
|
</Text>
|
|
29
|
-
<Text
|
|
30
|
+
<Text writingType={isSelected ? 'title' : undefined} fontSize={12} textColor={isSelected ? Colors.secondaryColor.background : undefined}>
|
|
30
31
|
{line.qty} {line.unitName}
|
|
31
32
|
</Text>
|
|
32
33
|
</View>
|
|
33
|
-
{handleEditLine && (<
|
|
34
|
-
<
|
|
34
|
+
{!isSelected && handleEditLine && (<IconTile size={25} iconSize={12} icon="pencil-fill" onPress={() => handleEditLine(line)}/>)}
|
|
35
|
+
<IconTile size={25} iconSize={12} icon="x-lg" color={Colors.errorColor} onPress={() => handleDeleteLine(line.id)}/>
|
|
35
36
|
</View>);
|
|
36
37
|
};
|
|
37
38
|
const styles = StyleSheet.create({
|
|
@@ -48,9 +49,6 @@ const styles = StyleSheet.create({
|
|
|
48
49
|
productName: {
|
|
49
50
|
flex: 1,
|
|
50
51
|
},
|
|
51
|
-
productQty: {
|
|
52
|
-
maxWidth: '25%',
|
|
53
|
-
},
|
|
54
52
|
});
|
|
55
53
|
export default LineComponent;
|
|
56
54
|
//# sourceMappingURL=LineComponent.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LineComponent.js","sourceRoot":"","sources":["../../../../src/components/organisms/ViewAllEditList/LineComponent.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAE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{
|
|
10
10
|
title: string;
|
|
11
11
|
lines: Line[];
|
|
12
|
-
currentLineId
|
|
12
|
+
currentLineId?: number;
|
|
13
13
|
setLines: (lines: Line[]) => void;
|
|
14
14
|
handleEditLine?: (line: Line) => void;
|
|
15
15
|
translator: (key: string) => string;
|
|
16
|
+
isFormWrapper?: boolean;
|
|
16
17
|
}
|
|
17
|
-
declare const ViewAllEditList: ({ title, lines, currentLineId, setLines, handleEditLine, translator, }: ViewAllEditListProps) => React.JSX.Element;
|
|
18
|
+
declare const ViewAllEditList: ({ title, lines, currentLineId, setLines, handleEditLine, translator, isFormWrapper, }: ViewAllEditListProps) => React.JSX.Element;
|
|
18
19
|
export default ViewAllEditList;
|
|
@@ -22,18 +22,16 @@ import { NumberBubble, ViewAllContainer } from '../../molecules';
|
|
|
22
22
|
import { useThemeColor } from '../../../theme';
|
|
23
23
|
import AllLinesAlert from './AllLinesAlert';
|
|
24
24
|
import LineComponent from './LineComponent';
|
|
25
|
-
const ViewAllEditList = ({ title, lines, currentLineId, setLines, handleEditLine, translator, }) => {
|
|
25
|
+
const ViewAllEditList = ({ title, lines, currentLineId, setLines, handleEditLine, translator, isFormWrapper = false, }) => {
|
|
26
26
|
const Colors = useThemeColor();
|
|
27
27
|
const [isAlertVisible, setIsAlertVisible] = useState(false);
|
|
28
28
|
return (<>
|
|
29
|
-
<ViewAllContainer style={styles.container} disabled={lines?.length === 0} onViewPress={() => setIsAlertVisible(true)} translator={translator}>
|
|
29
|
+
<ViewAllContainer style={styles.container} disabled={lines?.length === 0} onViewPress={() => setIsAlertVisible(true)} translator={translator} isFormWrapper={isFormWrapper}>
|
|
30
30
|
<View style={styles.title}>
|
|
31
31
|
<Text>{title}</Text>
|
|
32
|
-
<NumberBubble
|
|
32
|
+
<NumberBubble number={lines?.length ?? 0} color={Colors.primaryColor} isNeutralBackground size={25}/>
|
|
33
33
|
</View>
|
|
34
|
-
{lines.slice(0, 3).map((line, index) => {
|
|
35
|
-
return (<LineComponent key={index} line={line} isSelected={currentLineId === line.id} handleEditLine={handleEditLine} handleDeleteLine={lineId => setLines(lines.filter(_line => _line.id !== lineId))}/>);
|
|
36
|
-
})}
|
|
34
|
+
{lines.slice(0, 3).map((line, index) => (<LineComponent key={index} line={line} isSelected={currentLineId === line.id} handleEditLine={handleEditLine} handleDeleteLine={lineId => setLines(lines.filter(_line => _line.id !== lineId))}/>))}
|
|
37
35
|
</ViewAllContainer>
|
|
38
36
|
<AllLinesAlert title={title} isAlertVisible={isAlertVisible} setIsAlertVisible={setIsAlertVisible} lines={lines} setLines={setLines} handleEditLine={handleEditLine} translator={translator}/>
|
|
39
37
|
</>);
|
|
@@ -46,9 +44,7 @@ const styles = StyleSheet.create({
|
|
|
46
44
|
title: {
|
|
47
45
|
flexDirection: 'row',
|
|
48
46
|
alignItems: 'center',
|
|
49
|
-
|
|
50
|
-
numberBubble: {
|
|
51
|
-
marginLeft: 10,
|
|
47
|
+
gap: 10,
|
|
52
48
|
},
|
|
53
49
|
});
|
|
54
50
|
export default ViewAllEditList;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ViewAllEditList.js","sourceRoot":"","sources":["../../../../src/components/organisms/ViewAllEditList/ViewAllEditList.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,QAAQ,EAAC,MAAM,OAAO,CAAC;AACtC,OAAO,EAAC,UAAU,EAAE,IAAI,EAAC,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAC,IAAI,EAAC,MAAM,aAAa,CAAC;AACjC,OAAO,EAAC,YAAY,EAAE,gBAAgB,EAAC,MAAM,iBAAiB,CAAC;AAC/D,OAAO,EAAC,aAAa,EAAC,MAAM,gBAAgB,CAAC;AAC7C,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAC5C,OAAO,aAAa,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"ViewAllEditList.js","sourceRoot":"","sources":["../../../../src/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@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Color } from '../../../theme';
|
|
3
|
+
interface DayGaugeProps {
|
|
4
|
+
dateString: string;
|
|
5
|
+
dayNumber: number;
|
|
6
|
+
dayLabel: string;
|
|
7
|
+
ratio?: number;
|
|
8
|
+
isFilled: boolean;
|
|
9
|
+
isSelected: boolean;
|
|
10
|
+
isDisabled: boolean;
|
|
11
|
+
isOutOfPeriod: boolean;
|
|
12
|
+
isWeekEnd: boolean;
|
|
13
|
+
isToday: boolean;
|
|
14
|
+
color: Color;
|
|
15
|
+
onPress: (dateString: string) => void;
|
|
16
|
+
}
|
|
17
|
+
declare const _default: React.MemoExoticComponent<({ dateString, dayNumber, dayLabel, ratio, isFilled, isSelected, isDisabled, isOutOfPeriod, isWeekEnd, isToday, color, onPress, }: DayGaugeProps) => React.JSX.Element>;
|
|
18
|
+
export default _default;
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Axelor Business Solutions
|
|
3
|
+
*
|
|
4
|
+
* Copyright (C) 2026 Axelor (<http://axelor.com>).
|
|
5
|
+
*
|
|
6
|
+
* This program is free software: you can redistribute it and/or modify
|
|
7
|
+
* it under the terms of the GNU Affero General Public License, version 3,
|
|
8
|
+
* as published by the Free Software Foundation.
|
|
9
|
+
*
|
|
10
|
+
* This program is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
* GNU Affero General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU Affero General Public License
|
|
16
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
18
|
+
import React, { memo, useCallback, useMemo } from 'react';
|
|
19
|
+
import { Pressable, StyleSheet, View } from 'react-native';
|
|
20
|
+
import { useThemeColor } from '../../../theme';
|
|
21
|
+
import { addOpacityToHex } from '../../../utils';
|
|
22
|
+
import { Text } from '../../atoms';
|
|
23
|
+
import { DAY_LABEL_HEIGHT, GAUGE_SIZE, WEEK_ROW_HEIGHT, } from './week-day.helpers';
|
|
24
|
+
const DOT_SIZE = 6;
|
|
25
|
+
const getDiscSize = (ratio, isFilled) => {
|
|
26
|
+
if (ratio == null)
|
|
27
|
+
return isFilled ? GAUGE_SIZE : 0;
|
|
28
|
+
if (ratio <= 0)
|
|
29
|
+
return 0;
|
|
30
|
+
if (ratio >= 1)
|
|
31
|
+
return GAUGE_SIZE;
|
|
32
|
+
return ratio * GAUGE_SIZE;
|
|
33
|
+
};
|
|
34
|
+
const DayGauge = ({ dateString, dayNumber, dayLabel, ratio, isFilled, isSelected, isDisabled, isOutOfPeriod, isWeekEnd, isToday, color, onPress, }) => {
|
|
35
|
+
const Colors = useThemeColor();
|
|
36
|
+
const handlePress = useCallback(() => onPress(dateString), [dateString, onPress]);
|
|
37
|
+
const containerStyle = useMemo(() => isSelected
|
|
38
|
+
? { backgroundColor: Colors.secondaryColor.background_light }
|
|
39
|
+
: null, [Colors.secondaryColor.background_light, isSelected]);
|
|
40
|
+
const ringStyle = useMemo(() => ({ borderColor: color.background }), [color.background]);
|
|
41
|
+
const discStyle = useMemo(() => {
|
|
42
|
+
const size = getDiscSize(ratio, isFilled);
|
|
43
|
+
if (size === 0)
|
|
44
|
+
return null;
|
|
45
|
+
return {
|
|
46
|
+
width: size,
|
|
47
|
+
height: size,
|
|
48
|
+
borderRadius: size / 2,
|
|
49
|
+
backgroundColor: addOpacityToHex(color.background, 0.2),
|
|
50
|
+
};
|
|
51
|
+
}, [color, isFilled, ratio]);
|
|
52
|
+
const dotStyle = useMemo(() => ({
|
|
53
|
+
backgroundColor: isOutOfPeriod
|
|
54
|
+
? Colors.secondaryColor.background
|
|
55
|
+
: color.background,
|
|
56
|
+
}), [Colors.secondaryColor.background, color.background, isOutOfPeriod]);
|
|
57
|
+
const textColor = useMemo(() => {
|
|
58
|
+
if (isOutOfPeriod)
|
|
59
|
+
return Colors.placeholderTextColor;
|
|
60
|
+
if (isToday)
|
|
61
|
+
return Colors.primaryColor.background;
|
|
62
|
+
if (isWeekEnd || isDisabled)
|
|
63
|
+
return Colors.secondaryColor_dark.background;
|
|
64
|
+
return Colors.text;
|
|
65
|
+
}, [Colors, isDisabled, isOutOfPeriod, isToday, isWeekEnd]);
|
|
66
|
+
return (<Pressable style={[styles.container, containerStyle]} onPress={handlePress} disabled={isOutOfPeriod} testID={`weekDay-${dateString}`}>
|
|
67
|
+
<Text style={styles.label} textColor={textColor} writingType={isToday ? 'important' : undefined} fontSize={12} numberOfLines={1}>
|
|
68
|
+
{`${dayLabel} ${dayNumber}`}
|
|
69
|
+
</Text>
|
|
70
|
+
<View style={styles.gauge}>
|
|
71
|
+
{isDisabled || isOutOfPeriod ? (<View style={[styles.dot, dotStyle]} testID={`weekDayDot-${dateString}`}/>) : (<View style={[styles.ring, ringStyle]}>
|
|
72
|
+
{discStyle != null && (<View style={discStyle} testID={`weekDayFill-${dateString}`}/>)}
|
|
73
|
+
</View>)}
|
|
74
|
+
</View>
|
|
75
|
+
</Pressable>);
|
|
76
|
+
};
|
|
77
|
+
const styles = StyleSheet.create({
|
|
78
|
+
container: {
|
|
79
|
+
flex: 1,
|
|
80
|
+
height: WEEK_ROW_HEIGHT,
|
|
81
|
+
alignItems: 'center',
|
|
82
|
+
justifyContent: 'center',
|
|
83
|
+
borderRadius: 10,
|
|
84
|
+
gap: 6,
|
|
85
|
+
},
|
|
86
|
+
label: {
|
|
87
|
+
height: DAY_LABEL_HEIGHT,
|
|
88
|
+
lineHeight: DAY_LABEL_HEIGHT,
|
|
89
|
+
textAlign: 'center',
|
|
90
|
+
},
|
|
91
|
+
gauge: {
|
|
92
|
+
width: GAUGE_SIZE,
|
|
93
|
+
height: GAUGE_SIZE,
|
|
94
|
+
alignItems: 'center',
|
|
95
|
+
justifyContent: 'center',
|
|
96
|
+
},
|
|
97
|
+
ring: {
|
|
98
|
+
width: GAUGE_SIZE,
|
|
99
|
+
height: GAUGE_SIZE,
|
|
100
|
+
borderRadius: GAUGE_SIZE / 2,
|
|
101
|
+
borderWidth: 1,
|
|
102
|
+
alignItems: 'center',
|
|
103
|
+
justifyContent: 'center',
|
|
104
|
+
},
|
|
105
|
+
dot: {
|
|
106
|
+
width: DOT_SIZE,
|
|
107
|
+
height: DOT_SIZE,
|
|
108
|
+
borderRadius: DOT_SIZE / 2,
|
|
109
|
+
},
|
|
110
|
+
});
|
|
111
|
+
export default memo(DayGauge);
|
|
112
|
+
//# sourceMappingURL=DayGauge.js.map
|