@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
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { StyleProp, ViewStyle } from 'react-native';
|
|
3
|
+
interface BorderBarProps {
|
|
4
|
+
style?: StyleProp<ViewStyle>;
|
|
5
|
+
color?: string;
|
|
6
|
+
testID?: string;
|
|
7
|
+
}
|
|
8
|
+
declare const BorderBar: ({ style, color, testID }: BorderBarProps) => React.JSX.Element;
|
|
9
|
+
export default BorderBar;
|
|
@@ -0,0 +1,30 @@
|
|
|
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 from 'react';
|
|
19
|
+
import { StyleSheet, View } from 'react-native';
|
|
20
|
+
const BorderBar = ({ style, color, testID = 'borderBar' }) => {
|
|
21
|
+
return (<View testID={testID} style={[styles.bar, { backgroundColor: color }, style]}/>);
|
|
22
|
+
};
|
|
23
|
+
const styles = StyleSheet.create({
|
|
24
|
+
bar: {
|
|
25
|
+
width: 4,
|
|
26
|
+
borderRadius: 50,
|
|
27
|
+
},
|
|
28
|
+
});
|
|
29
|
+
export default BorderBar;
|
|
30
|
+
//# sourceMappingURL=BorderBar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BorderBar.js","sourceRoot":"","sources":["../../../../src/components/atoms/BorderBar/BorderBar.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAY,UAAU,EAAE,IAAI,EAAY,MAAM,cAAc,CAAC;AAQpE,MAAM,SAAS,GAAG,CAAC,EAAC,KAAK,EAAE,KAAK,EAAE,MAAM,GAAG,WAAW,EAAiB,EAAE,EAAE;IACzE,OAAO,CACL,CAAC,IAAI,CACH,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,EAAE,EAAC,eAAe,EAAE,KAAK,EAAC,EAAE,KAAK,CAAC,CAAC,EACrD,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,GAAG,EAAE;QACH,KAAK,EAAE,CAAC;QACR,YAAY,EAAE,EAAE;KACjB;CACF,CAAC,CAAC;AAEH,eAAe,SAAS,CAAC"}
|
|
@@ -3,6 +3,7 @@ interface CardProps {
|
|
|
3
3
|
style?: any;
|
|
4
4
|
children: any;
|
|
5
5
|
wrapperRef?: RefObject<any>;
|
|
6
|
+
testID?: string;
|
|
6
7
|
}
|
|
7
|
-
declare const Card: ({ style, children, wrapperRef }: CardProps) => React.JSX.Element;
|
|
8
|
+
declare const Card: ({ style, children, wrapperRef, testID, }: CardProps) => React.JSX.Element;
|
|
8
9
|
export default Card;
|
|
@@ -18,10 +18,10 @@
|
|
|
18
18
|
import React, { useMemo } from 'react';
|
|
19
19
|
import { StyleSheet, View } from 'react-native';
|
|
20
20
|
import { useThemeColor } from '../../../theme';
|
|
21
|
-
const Card = ({ style, children, wrapperRef }) => {
|
|
21
|
+
const Card = ({ style, children, wrapperRef, testID = 'cardContainer', }) => {
|
|
22
22
|
const Colors = useThemeColor();
|
|
23
23
|
const styles = useMemo(() => getStyles(Colors), [Colors]);
|
|
24
|
-
return (<View ref={wrapperRef} testID=
|
|
24
|
+
return (<View ref={wrapperRef} testID={testID} style={[styles.container, style]}>
|
|
25
25
|
{children}
|
|
26
26
|
</View>);
|
|
27
27
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card.js","sourceRoot":"","sources":["../../../../src/components/atoms/Card/Card.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAY,OAAO,EAAC,MAAM,OAAO,CAAC;AAChD,OAAO,EAAC,UAAU,EAAE,IAAI,EAAC,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAc,aAAa,EAAC,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"Card.js","sourceRoot":"","sources":["../../../../src/components/atoms/Card/Card.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAY,OAAO,EAAC,MAAM,OAAO,CAAC;AAChD,OAAO,EAAC,UAAU,EAAE,IAAI,EAAC,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAc,aAAa,EAAC,MAAM,gBAAgB,CAAC;AAS1D,MAAM,IAAI,GAAG,CAAC,EACZ,KAAK,EACL,QAAQ,EACR,UAAU,EACV,MAAM,GAAG,eAAe,GACd,EAAE,EAAE;IACd,MAAM,MAAM,GAAG,aAAa,EAAE,CAAC;IAE/B,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;IAE1D,OAAO,CACL,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC,CACtE;MAAA,CAAC,QAAQ,CACX;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,SAAS,GAAG,CAAC,MAAmB,EAAE,EAAE,CACxC,UAAU,CAAC,MAAM,CAAC;IAChB,SAAS,EAAE;QACT,iBAAiB,EAAE,EAAE;QACrB,YAAY,EAAE,EAAE;QAChB,eAAe,EAAE,EAAE;QACnB,YAAY,EAAE,EAAE;QAChB,SAAS,EAAE,CAAC;QACZ,aAAa,EAAE,GAAG;QAClB,WAAW,EAAE,MAAM,CAAC,cAAc,CAAC,UAAU;QAC7C,YAAY,EAAE,EAAC,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAC;QACnC,eAAe,EAAE,MAAM,CAAC,eAAe;KACxC;CACF,CAAC,CAAC;AAEL,eAAe,IAAI,CAAC"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
interface HorizontalRuleProps {
|
|
3
3
|
style?: any;
|
|
4
|
+
color?: string;
|
|
5
|
+
width?: number;
|
|
4
6
|
}
|
|
5
|
-
declare const HorizontalRule: ({ style }: HorizontalRuleProps) => React.JSX.Element;
|
|
7
|
+
declare const HorizontalRule: ({ style, color, width }: HorizontalRuleProps) => React.JSX.Element;
|
|
6
8
|
export default HorizontalRule;
|
|
@@ -18,17 +18,15 @@
|
|
|
18
18
|
import React, { useMemo } from 'react';
|
|
19
19
|
import { View, StyleSheet } from 'react-native';
|
|
20
20
|
import { useThemeColor } from '../../../theme';
|
|
21
|
-
const HorizontalRule = ({ style }) => {
|
|
21
|
+
const HorizontalRule = ({ style, color, width }) => {
|
|
22
22
|
const Colors = useThemeColor();
|
|
23
|
-
const styles = useMemo(() =>
|
|
24
|
-
return getStyles(Colors);
|
|
25
|
-
}, [Colors]);
|
|
23
|
+
const styles = useMemo(() => getStyles(color ?? Colors.secondaryColor.background, width), [Colors.secondaryColor.background, color, width]);
|
|
26
24
|
return <View testID="horizontalRule" style={[styles.line, style]}/>;
|
|
27
25
|
};
|
|
28
|
-
const getStyles =
|
|
26
|
+
const getStyles = (_color, width) => StyleSheet.create({
|
|
29
27
|
line: {
|
|
30
|
-
borderBottomColor:
|
|
31
|
-
borderBottomWidth: 1,
|
|
28
|
+
borderBottomColor: _color,
|
|
29
|
+
borderBottomWidth: width ?? 1,
|
|
32
30
|
},
|
|
33
31
|
});
|
|
34
32
|
export default HorizontalRule;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HorizontalRule.js","sourceRoot":"","sources":["../../../../src/components/atoms/HorizontalRule/HorizontalRule.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,OAAO,EAAC,MAAM,OAAO,CAAC;AACrC,OAAO,EAAC,IAAI,EAAE,UAAU,EAAC,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAC,aAAa,EAAC,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"HorizontalRule.js","sourceRoot":"","sources":["../../../../src/components/atoms/HorizontalRule/HorizontalRule.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,OAAO,EAAC,MAAM,OAAO,CAAC;AACrC,OAAO,EAAC,IAAI,EAAE,UAAU,EAAC,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAC,aAAa,EAAC,MAAM,gBAAgB,CAAC;AAQ7C,MAAM,cAAc,GAAG,CAAC,EAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAsB,EAAE,EAAE;IACpE,MAAM,MAAM,GAAG,aAAa,EAAE,CAAC;IAE/B,MAAM,MAAM,GAAG,OAAO,CACpB,GAAG,EAAE,CAAC,SAAS,CAAC,KAAK,IAAI,MAAM,CAAC,cAAc,CAAC,UAAU,EAAE,KAAK,CAAC,EACjE,CAAC,MAAM,CAAC,cAAc,CAAC,UAAU,EAAE,KAAK,EAAE,KAAK,CAAC,CACjD,CAAC;IAEF,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,EAAG,CAAC;AACvE,CAAC,CAAC;AAEF,MAAM,SAAS,GAAG,CAAC,MAAc,EAAE,KAAc,EAAE,EAAE,CACnD,UAAU,CAAC,MAAM,CAAC;IAChB,IAAI,EAAE;QACJ,iBAAiB,EAAE,MAAM;QACzB,iBAAiB,EAAE,KAAK,IAAI,CAAC;KAC9B;CACF,CAAC,CAAC;AAEL,eAAe,cAAc,CAAC"}
|
|
@@ -4,6 +4,8 @@ interface HtmlInputProps {
|
|
|
4
4
|
styleToolbar?: any;
|
|
5
5
|
containerStyle?: any;
|
|
6
6
|
editorBackgroundColor?: string;
|
|
7
|
+
editorFontSize?: number;
|
|
8
|
+
toolbarIconSize?: number;
|
|
7
9
|
title?: string;
|
|
8
10
|
placeholder?: string;
|
|
9
11
|
onChange?: (value: string) => void;
|
|
@@ -13,5 +15,5 @@ interface HtmlInputProps {
|
|
|
13
15
|
onFocus?: () => void;
|
|
14
16
|
onBlur?: () => void;
|
|
15
17
|
}
|
|
16
|
-
declare const HtmlInput: ({ style, styleToolbar, containerStyle, editorBackgroundColor, title, placeholder, onChange, defaultInput, readonly, onHeightChange, onFocus, onBlur, }: HtmlInputProps) => React.JSX.Element;
|
|
18
|
+
declare const HtmlInput: ({ style, styleToolbar, containerStyle, editorBackgroundColor, editorFontSize, toolbarIconSize, title, placeholder, onChange, defaultInput, readonly, onHeightChange, onFocus, onBlur, }: HtmlInputProps) => React.JSX.Element;
|
|
17
19
|
export default HtmlInput;
|
|
@@ -15,13 +15,13 @@
|
|
|
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, useRef, useState } from 'react';
|
|
18
|
+
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
19
19
|
import { View, ScrollView } from 'react-native';
|
|
20
20
|
import { actions, RichEditor, RichToolbar } from 'react-native-pell-rich-editor';
|
|
21
21
|
import { useOutsideClickHandler } from '../../../hooks';
|
|
22
22
|
import { useThemeColor } from '../../../theme';
|
|
23
23
|
import { Text } from '../../atoms';
|
|
24
|
-
const HtmlInput = ({ style, styleToolbar, containerStyle, editorBackgroundColor, title, placeholder, onChange, defaultInput, readonly = false, onHeightChange, onFocus, onBlur, }) => {
|
|
24
|
+
const HtmlInput = ({ style, styleToolbar, containerStyle, editorBackgroundColor, editorFontSize = 12, toolbarIconSize = 15, title, placeholder, onChange, defaultInput, readonly = false, onHeightChange, onFocus, onBlur, }) => {
|
|
25
25
|
const Colors = useThemeColor();
|
|
26
26
|
const editor = useRef(null);
|
|
27
27
|
const wrapperRef = useRef(null);
|
|
@@ -36,6 +36,13 @@ const HtmlInput = ({ style, styleToolbar, containerStyle, editorBackgroundColor,
|
|
|
36
36
|
const editorInitializedCallback = () => {
|
|
37
37
|
setEditorAttached(true);
|
|
38
38
|
};
|
|
39
|
+
const contentCSSText = useMemo(() => {
|
|
40
|
+
const rules = ['word-wrap: break-word'];
|
|
41
|
+
if (editorFontSize != null) {
|
|
42
|
+
rules.push(`font-size: ${editorFontSize}px`);
|
|
43
|
+
}
|
|
44
|
+
return rules.join('; ');
|
|
45
|
+
}, [editorFontSize]);
|
|
39
46
|
const handleFocus = useCallback(() => {
|
|
40
47
|
setIsFocused(true);
|
|
41
48
|
onFocus?.();
|
|
@@ -61,17 +68,15 @@ const HtmlInput = ({ style, styleToolbar, containerStyle, editorBackgroundColor,
|
|
|
61
68
|
<ScrollView testID="htmlInputInnerScroll" style={style}>
|
|
62
69
|
<View>
|
|
63
70
|
{title != null ? <Text>{title}</Text> : null}
|
|
64
|
-
<RichEditor key={key} ref={editor} placeholder={placeholder} androidLayerType="software" initialContentHTML={defaultInput} onChange={onChange} disabled={readonly}
|
|
65
|
-
|
|
66
|
-
editorStyle={{
|
|
67
|
-
backgroundColor: editorBackgroundColor || Colors.backgroundColor,
|
|
71
|
+
<RichEditor key={key} ref={editor} placeholder={placeholder} androidLayerType="software" initialContentHTML={defaultInput} onChange={onChange} disabled={readonly} editorStyle={{
|
|
72
|
+
backgroundColor: editorBackgroundColor ?? Colors.screenBackgroundColor,
|
|
68
73
|
color: Colors.text,
|
|
69
74
|
placeholderColor: Colors.placeholderTextColor,
|
|
70
|
-
contentCSSText
|
|
75
|
+
contentCSSText,
|
|
71
76
|
}} onHeightChange={onHeightChange} onFocus={handleFocus} onBlur={handleBlur} editorInitializedCallback={editorInitializedCallback}/>
|
|
72
77
|
</View>
|
|
73
78
|
</ScrollView>
|
|
74
|
-
{!readonly && editorAttached && (<RichToolbar style={styleToolbar} editor={editor} selectedIconTint={Colors.primaryColor.background} iconTint={Colors.text} actions={[
|
|
79
|
+
{!readonly && editorAttached && (<RichToolbar key={key} style={styleToolbar} editor={editor} iconSize={toolbarIconSize} selectedIconTint={Colors.primaryColor.background} iconTint={Colors.text} actions={[
|
|
75
80
|
actions.setBold,
|
|
76
81
|
actions.setItalic,
|
|
77
82
|
actions.setUnderline,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HtmlInput.js","sourceRoot":"","sources":["../../../../src/components/atoms/HtmlInput/HtmlInput.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"H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AC,GAAG,CAAC,CACT,KAAK,CAAC,CAAC,YAAY,CAAC,CACpB,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,QAAQ,CAAC,CAAC,eAAe,CAAC,CAC1B,gBAAgB,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC,UAAU,CAAC,CACjD,QAAQ,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CACtB,OAAO,CAAC,CAAC;gBACP,OAAO,CAAC,OAAO;gBACf,OAAO,CAAC,SAAS;gBACjB,OAAO,CAAC,YAAY;gBACpB,OAAO,CAAC,gBAAgB;gBACxB,OAAO,CAAC,iBAAiB;gBACzB,OAAO,CAAC,iBAAiB;gBACzB,OAAO,CAAC,UAAU;gBAClB,OAAO,CAAC,YAAY;gBACpB,OAAO,CAAC,IAAI;gBACZ,OAAO,CAAC,IAAI;aACb,CAAC,EACF,CACH,CACH;IAAA,EAAE,UAAU,CAAC,CACd,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface HtmlViewerProps {
|
|
3
|
+
style?: any;
|
|
4
|
+
html: string;
|
|
5
|
+
maxHeight?: number;
|
|
6
|
+
fontSize?: number;
|
|
7
|
+
backgroundColor?: string;
|
|
8
|
+
}
|
|
9
|
+
declare const HtmlViewer: ({ style, html, maxHeight, fontSize, backgroundColor, }: HtmlViewerProps) => React.JSX.Element;
|
|
10
|
+
export default HtmlViewer;
|
|
@@ -0,0 +1,93 @@
|
|
|
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, { useCallback, useMemo, useState } from 'react';
|
|
19
|
+
import { Linking, StyleSheet, View } from 'react-native';
|
|
20
|
+
import { WebView } from 'react-native-webview';
|
|
21
|
+
import { useThemeColor } from '../../../theme';
|
|
22
|
+
const INITIAL_HEIGHT = 60;
|
|
23
|
+
const HEIGHT_REPORTER = `
|
|
24
|
+
(function() {
|
|
25
|
+
function post() {
|
|
26
|
+
window.ReactNativeWebView.postMessage(String(document.body.scrollHeight));
|
|
27
|
+
}
|
|
28
|
+
post();
|
|
29
|
+
window.addEventListener('load', post);
|
|
30
|
+
if (window.ResizeObserver) {
|
|
31
|
+
new ResizeObserver(post).observe(document.body);
|
|
32
|
+
}
|
|
33
|
+
})();
|
|
34
|
+
true;
|
|
35
|
+
`;
|
|
36
|
+
const HtmlViewer = ({ style, html, maxHeight, fontSize = 12, backgroundColor, }) => {
|
|
37
|
+
const Colors = useThemeColor();
|
|
38
|
+
const [contentHeight, setContentHeight] = useState(INITIAL_HEIGHT);
|
|
39
|
+
const _backgroundColor = useMemo(() => backgroundColor ?? Colors.backgroundColor, [backgroundColor, Colors.backgroundColor]);
|
|
40
|
+
const source = useMemo(() => ({
|
|
41
|
+
html: `<!DOCTYPE html>
|
|
42
|
+
<html>
|
|
43
|
+
<head>
|
|
44
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
45
|
+
<style>
|
|
46
|
+
html, body {
|
|
47
|
+
margin: 0;
|
|
48
|
+
padding: 0;
|
|
49
|
+
background-color: ${_backgroundColor};
|
|
50
|
+
color: ${Colors.text};
|
|
51
|
+
font-family: -apple-system, Roboto, Helvetica, Arial, sans-serif;
|
|
52
|
+
font-size: ${fontSize}px;
|
|
53
|
+
line-height: 1.4;
|
|
54
|
+
overflow-wrap: break-word;
|
|
55
|
+
}
|
|
56
|
+
p { margin: 0 0 8px; }
|
|
57
|
+
p:last-child { margin-bottom: 0; }
|
|
58
|
+
ul, ol { margin: 0 0 8px; padding-left: 20px; }
|
|
59
|
+
a { color: ${Colors.primaryColor.background}; }
|
|
60
|
+
img { max-width: 100%; height: auto; }
|
|
61
|
+
table { max-width: 100%; }
|
|
62
|
+
</style>
|
|
63
|
+
</head>
|
|
64
|
+
<body>${html}</body>
|
|
65
|
+
</html>`,
|
|
66
|
+
}), [Colors, _backgroundColor, fontSize, html]);
|
|
67
|
+
const isScrollable = useMemo(() => maxHeight != null && contentHeight > maxHeight, [contentHeight, maxHeight]);
|
|
68
|
+
const height = useMemo(() => maxHeight != null ? Math.min(contentHeight, maxHeight) : contentHeight, [contentHeight, maxHeight]);
|
|
69
|
+
const handleMessage = useCallback(({ nativeEvent }) => {
|
|
70
|
+
const _height = Number(nativeEvent?.data);
|
|
71
|
+
if (!Number.isNaN(_height) && _height > 0) {
|
|
72
|
+
setContentHeight(_height);
|
|
73
|
+
}
|
|
74
|
+
}, []);
|
|
75
|
+
// The content comes from the server: never navigate inside the WebView, open
|
|
76
|
+
// the target in the system browser instead.
|
|
77
|
+
const handleShouldStartLoad = useCallback(({ url }) => {
|
|
78
|
+
if (url === 'about:blank')
|
|
79
|
+
return true;
|
|
80
|
+
Linking.openURL(url);
|
|
81
|
+
return false;
|
|
82
|
+
}, []);
|
|
83
|
+
return (<View style={[{ height }, style]} testID="htmlViewerContainer">
|
|
84
|
+
<WebView originWhitelist={['*']} source={source} style={[styles.webview, { backgroundColor: _backgroundColor }]} javaScriptEnabled domStorageEnabled={false} injectedJavaScript={HEIGHT_REPORTER} onMessage={handleMessage} scrollEnabled={isScrollable} nestedScrollEnabled={isScrollable} showsVerticalScrollIndicator={isScrollable} onShouldStartLoadWithRequest={handleShouldStartLoad} testID="htmlViewerWebView"/>
|
|
85
|
+
</View>);
|
|
86
|
+
};
|
|
87
|
+
const styles = StyleSheet.create({
|
|
88
|
+
webview: {
|
|
89
|
+
flex: 1,
|
|
90
|
+
},
|
|
91
|
+
});
|
|
92
|
+
export default HtmlViewer;
|
|
93
|
+
//# sourceMappingURL=HtmlViewer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HtmlViewer.js","sourceRoot":"","sources":["../../../../src/components/atoms/HtmlViewer/HtmlViewer.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AAC5D,OAAO,EAAC,OAAO,EAAE,UAAU,EAAE,IAAI,EAAC,MAAM,cAAc,CAAC;AACvD,OAAO,EAAC,OAAO,EAAC,MAAM,sBAAsB,CAAC;AAC7C,OAAO,EAAC,aAAa,EAAC,MAAM,gBAAgB,CAAC;AAE7C,MAAM,cAAc,GAAG,EAAE,CAAC;AAE1B,MAAM,eAAe,GAAG;;;;;;;;;;;;CAYvB,CAAC;AAUF,MAAM,UAAU,GAAG,CAAC,EAClB,KAAK,EACL,IAAI,EACJ,SAAS,EACT,QAAQ,GAAG,EAAE,EACb,eAAe,GACC,EAAE,EAAE;IACpB,MAAM,MAAM,GAAG,aAAa,EAAE,CAAC;IAE/B,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,QAAQ,CAAC,cAAc,CAAC,CAAC;IAEnE,MAAM,gBAAgB,GAAG,OAAO,CAC9B,GAAG,EAAE,CAAC,eAAe,IAAI,MAAM,CAAC,eAAe,EAC/C,CAAC,eAAe,EAAE,MAAM,CAAC,eAAe,CAAC,CAC1C,CAAC;IAEF,MAAM,MAAM,GAAG,OAAO,CACpB,GAAG,EAAE,CAAC,CAAC;QACL,IAAI,EAAE;;;;;;;;4B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AAE,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,qBAAqB,CAC1D;MAAA,CAAC,OAAO,CACN,eAAe,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CACvB,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,EAAE,EAAC,eAAe,EAAE,gBAAgB,EAAC,CAAC,CAAC,CAC7D,iBAAiB,CACjB,iBAAiB,CAAC,CAAC,KAAK,CAAC,CACzB,kBAAkB,CAAC,CAAC,eAAe,CAAC,CACpC,SAAS,CAAC,CAAC,aAAa,CAAC,CACzB,aAAa,CAAC,CAAC,YAAY,CAAC,CAC5B,mBAAmB,CAAC,CAAC,YAAY,CAAC,CAClC,4BAA4B,CAAC,CAAC,YAAY,CAAC,CAC3C,4BAA4B,CAAC,CAAC,qBAAqB,CAAC,CACpD,MAAM,CAAC,mBAAmB,EAE9B;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,OAAO,EAAE;QACP,IAAI,EAAE,CAAC;KACR;CACF,CAAC,CAAC;AAEH,eAAe,UAAU,CAAC"}
|
|
@@ -6,7 +6,8 @@ interface IconProps {
|
|
|
6
6
|
size?: number;
|
|
7
7
|
touchable?: boolean;
|
|
8
8
|
visible?: boolean;
|
|
9
|
+
testID?: string;
|
|
9
10
|
onPress?: () => void;
|
|
10
11
|
}
|
|
11
|
-
declare const Icon: ({ style, name, color, size, touchable, visible, onPress, }: IconProps) => React.JSX.Element;
|
|
12
|
+
declare const Icon: ({ style, name, color, size, touchable, visible, testID, onPress, }: IconProps) => React.JSX.Element;
|
|
12
13
|
export default Icon;
|
|
@@ -18,14 +18,13 @@
|
|
|
18
18
|
import React, { useMemo } from 'react';
|
|
19
19
|
import { StyleSheet, TouchableOpacity } from 'react-native';
|
|
20
20
|
import { useThemeColor } from '../../../theme';
|
|
21
|
-
import BootstrapIcon from '
|
|
22
|
-
const Icon = ({ style, name, color, size =
|
|
21
|
+
import { BootstrapIcon } from '../../atoms';
|
|
22
|
+
const Icon = ({ style, name, color, size = 15, touchable = false, visible = true, testID = 'iconTouchable', onPress, }) => {
|
|
23
23
|
const Colors = useThemeColor();
|
|
24
24
|
const _color = useMemo(() => color ?? Colors.secondaryColor_dark.background, [Colors.secondaryColor_dark.background, color]);
|
|
25
|
-
if (!visible)
|
|
25
|
+
if (!visible)
|
|
26
26
|
return null;
|
|
27
|
-
}
|
|
28
|
-
return (<TouchableOpacity style={[styles.container, style]} onPress={onPress} disabled={!touchable} testID="iconTouchable">
|
|
27
|
+
return (<TouchableOpacity style={[styles.container, style]} onPress={onPress} disabled={!touchable} activeOpacity={0.9} testID={testID}>
|
|
29
28
|
<BootstrapIcon name={name} size={size} color={_color}/>
|
|
30
29
|
</TouchableOpacity>);
|
|
31
30
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Icon.js","sourceRoot":"","sources":["../../../../src/components/atoms/Icon/Icon.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,OAAO,EAAC,MAAM,OAAO,CAAC;AACrC,OAAO,EAAC,UAAU,EAAE,gBAAgB,EAAC,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAC,aAAa,EAAC,MAAM,gBAAgB,CAAC;AAC7C,OAAO,aAAa,MAAM,
|
|
1
|
+
{"version":3,"file":"Icon.js","sourceRoot":"","sources":["../../../../src/components/atoms/Icon/Icon.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,OAAO,EAAC,MAAM,OAAO,CAAC;AACrC,OAAO,EAAC,UAAU,EAAE,gBAAgB,EAAC,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAC,aAAa,EAAC,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAC,aAA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KeyboardTypeOptions, NativeSyntheticEvent, TextInputContentSizeChangeEvent, TextInputInstance } from 'react-native';
|
|
3
3
|
interface InputProps {
|
|
4
4
|
style?: any;
|
|
5
|
-
inputRef?: Ref<
|
|
6
|
-
value
|
|
7
|
-
onChange
|
|
5
|
+
inputRef?: Ref<TextInputInstance>;
|
|
6
|
+
value?: string;
|
|
7
|
+
onChange?: (_v?: string) => void;
|
|
8
8
|
placeholder?: string;
|
|
9
9
|
secureTextEntry?: boolean;
|
|
10
10
|
readOnly?: boolean;
|
|
@@ -15,7 +15,7 @@ interface InputProps {
|
|
|
15
15
|
onEndFocus?: () => void;
|
|
16
16
|
isFocus?: boolean;
|
|
17
17
|
writingType?: 'title' | 'subtitle' | 'important' | 'details' | undefined;
|
|
18
|
-
onContentSizeChange?: (e: NativeSyntheticEvent<
|
|
18
|
+
onContentSizeChange?: (e: NativeSyntheticEvent<TextInputContentSizeChangeEvent>) => void;
|
|
19
19
|
isScannableInput?: boolean;
|
|
20
20
|
testID?: string;
|
|
21
21
|
}
|
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
*/
|
|
18
18
|
import React, { useCallback, useMemo } from 'react';
|
|
19
19
|
import { TextInput, } from 'react-native';
|
|
20
|
+
import { checkNullString, INPUT_MIN_HEIGHT } from '../../../utils';
|
|
20
21
|
import { useThemeColor, useWritingType } from '../../../theme';
|
|
21
|
-
import { useConfig } from '../../../config
|
|
22
|
-
import { checkNullString } from '../../../utils';
|
|
22
|
+
import { useConfig } from '../../../config';
|
|
23
23
|
import { Keyboard } from '../../../types';
|
|
24
24
|
const Input = ({ style, inputRef, value, onChange, placeholder, secureTextEntry = false, readOnly = false, onSelection, multiline = false, numberOfLines = 1, keyboardType, onEndFocus, isFocus = false, writingType, onContentSizeChange, isScannableInput = false, testID, }) => {
|
|
25
25
|
const Colors = useThemeColor();
|
|
@@ -29,7 +29,8 @@ const Input = ({ style, inputRef, value, onChange, placeholder, secureTextEntry
|
|
|
29
29
|
return {
|
|
30
30
|
...writingStyle,
|
|
31
31
|
color: Colors.text,
|
|
32
|
-
|
|
32
|
+
minHeight: INPUT_MIN_HEIGHT,
|
|
33
|
+
paddingVertical: 0,
|
|
33
34
|
textAlignVertical: multiline ? 'top' : 'center',
|
|
34
35
|
};
|
|
35
36
|
}, [Colors.text, multiline, writingStyle]);
|
|
@@ -47,10 +48,10 @@ const Input = ({ style, inputRef, value, onChange, placeholder, secureTextEntry
|
|
|
47
48
|
}, [isScannableInput, virtualKeyboardVisibility]);
|
|
48
49
|
const onValueChange = useCallback((_value) => {
|
|
49
50
|
if (checkNullString(_value)) {
|
|
50
|
-
onChange(
|
|
51
|
+
onChange?.();
|
|
51
52
|
}
|
|
52
53
|
else {
|
|
53
|
-
onChange(_value);
|
|
54
|
+
onChange?.(_value);
|
|
54
55
|
}
|
|
55
56
|
}, [onChange]);
|
|
56
57
|
return (<TextInput ref={inputRef} testID={testID} style={[defaultStyle, style]} value={value} onChangeText={onValueChange} placeholder={placeholder} secureTextEntry={secureTextEntry} autoCapitalize="none" editable={!readOnly} onFocus={onSelection} placeholderTextColor={Colors.placeholderTextColor} keyboardType={keyboardType} multiline={multiline} numberOfLines={numberOfLines} onBlur={onEndFocus} showSoftInputOnFocus={displayKeyboard} autoFocus={isFocus} onLayout={e => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.js","sourceRoot":"","sources":["../../../../src/components/atoms/Input/Input.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAM,WAAW,EAAE,OAAO,EAAC,MAAM,OAAO,CAAC;AACvD,OAAO,EAGL,SAAS,
|
|
1
|
+
{"version":3,"file":"Input.js","sourceRoot":"","sources":["../../../../src/components/atoms/Input/Input.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAM,WAAW,EAAE,OAAO,EAAC,MAAM,OAAO,CAAC;AACvD,OAA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,CAAC,CAAC,EAAE;YACZ,MAAM,EAAC,MAAM,EAAE,KAAK,EAAC,GAAG,CAAC,CAAC,WAAW,CAAC,MAAM,CAAC;YAE7C,mBAAmB,EAAE,CAAC;gBACpB,WAAW,EAAE,EAAC,WAAW,EAAE,EAAC,KAAK,EAAE,MAAM,EAAC,EAAC;aACrC,CAAC,CAAC;QACZ,CAAC,CAAC,EACF,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,KAAK,CAAC"}
|
|
@@ -19,8 +19,9 @@ import React, { useMemo } from 'react';
|
|
|
19
19
|
import { StyleSheet, View } from 'react-native';
|
|
20
20
|
import { Svg, Circle } from 'react-native-svg';
|
|
21
21
|
import { useThemeColor } from '../../../theme';
|
|
22
|
+
import { addOpacityToHex } from '../../../utils';
|
|
22
23
|
import { Text } from '../../atoms';
|
|
23
|
-
const ProgressCircle = ({ circleSize =
|
|
24
|
+
const ProgressCircle = ({ circleSize = 70, strokeWidth = 5, isError = false, progress, innerText, writingType = 'important', textStyle, }) => {
|
|
24
25
|
const Colors = useThemeColor();
|
|
25
26
|
const { radius, circumference, strokeDashoffset } = useMemo(() => {
|
|
26
27
|
const _radius = circleSize / 2 - strokeWidth / 2;
|
|
@@ -31,13 +32,12 @@ const ProgressCircle = ({ circleSize = 80, strokeWidth = 4, isError = false, pro
|
|
|
31
32
|
strokeDashoffset: _circumference - _circumference * progress,
|
|
32
33
|
};
|
|
33
34
|
}, [circleSize, progress, strokeWidth]);
|
|
35
|
+
const color = useMemo(() => (isError ? Colors.errorColor : Colors.successColor)?.background, [Colors.errorColor, Colors.successColor, isError]);
|
|
34
36
|
return (<Svg width={circleSize} height={circleSize}>
|
|
35
|
-
<Circle cx={circleSize / 2} cy={circleSize / 2} r={radius} stroke={
|
|
36
|
-
<Circle cx={circleSize / 2} cy={circleSize / 2} r={radius} stroke={
|
|
37
|
-
? Colors.errorColor.background
|
|
38
|
-
: Colors.successColor.background} strokeLinecap="round" strokeWidth={strokeWidth} strokeDasharray={`${circumference} ${circumference}`} strokeDashoffset={strokeDashoffset} rotation="-90" origin={`${circleSize / 2}, ${circleSize / 2}`} fill="none" testID="progressCircle"/>
|
|
37
|
+
<Circle cx={circleSize / 2} cy={circleSize / 2} r={radius} stroke={addOpacityToHex(color, 0.2)} strokeWidth={strokeWidth} fill="none" testID="internalCircle"/>
|
|
38
|
+
<Circle cx={circleSize / 2} cy={circleSize / 2} r={radius} stroke={color} strokeLinecap="round" strokeWidth={strokeWidth} strokeDasharray={`${circumference} ${circumference}`} strokeDashoffset={strokeDashoffset} rotation="-90" origin={`${circleSize / 2}, ${circleSize / 2}`} fill="none" testID="progressCircle"/>
|
|
39
39
|
<View style={styles.textContainer}>
|
|
40
|
-
<Text writingType={writingType} style={textStyle} adjustsFontSizeToFit>
|
|
40
|
+
<Text writingType={writingType} style={[styles.innerText, textStyle]} numberOfLines={1} adjustsFontSizeToFit>
|
|
41
41
|
{innerText}
|
|
42
42
|
</Text>
|
|
43
43
|
</View>
|
|
@@ -45,9 +45,13 @@ const ProgressCircle = ({ circleSize = 80, strokeWidth = 4, isError = false, pro
|
|
|
45
45
|
};
|
|
46
46
|
const styles = StyleSheet.create({
|
|
47
47
|
textContainer: {
|
|
48
|
-
|
|
48
|
+
flex: 1,
|
|
49
49
|
justifyContent: 'center',
|
|
50
50
|
alignItems: 'center',
|
|
51
|
+
paddingHorizontal: 5,
|
|
52
|
+
},
|
|
53
|
+
innerText: {
|
|
54
|
+
textAlign: 'center',
|
|
51
55
|
},
|
|
52
56
|
});
|
|
53
57
|
export default ProgressCircle;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProgressCircle.js","sourceRoot":"","sources":["../../../../src/components/atoms/ProgressCircle/ProgressCircle.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,OAAO,EAAC,MAAM,OAAO,CAAC;AACrC,OAAO,EAAC,UAAU,EAAE,IAAI,EAAC,MA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R;MAAA,EAAE,IAAI,CACR;IAAA,EAAE,GAAG,CAAC,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,aAAa,EAAE;QACb,IAAI,EAAE,CAAC;QACP,cAAc,EAAE,QAAQ;QACxB,UAAU,EAAE,QAAQ;QACpB,iBAAiB,EAAE,CAAC;KACrB;IACD,SAAS,EAAE;QACT,SAAS,EAAE,QAAQ;KACpB;CACF,CAAC,CAAC;AAEH,eAAe,cAAc,CAAC"}
|
|
@@ -17,17 +17,30 @@
|
|
|
17
17
|
*/
|
|
18
18
|
import React, { useMemo } from 'react';
|
|
19
19
|
import { StyleSheet, TouchableOpacity, View } from 'react-native';
|
|
20
|
-
import { Text } from '../../atoms';
|
|
21
20
|
import { useThemeColor } from '../../../theme';
|
|
21
|
+
import { getCommonStyles } from '../../../utils';
|
|
22
|
+
import { Text } from '../../atoms';
|
|
22
23
|
const DEFAULT_SIZE = 20;
|
|
23
24
|
const RadioButton = ({ style, onPress, selected, title, size = DEFAULT_SIZE, readonly = false, }) => {
|
|
24
25
|
const Colors = useThemeColor();
|
|
25
26
|
const styles = useMemo(() => getStyles(Colors, size), [Colors, size]);
|
|
26
|
-
|
|
27
|
+
const commonStyles = useMemo(() => getCommonStyles(Colors, false, selected), [Colors, selected]);
|
|
28
|
+
return (<TouchableOpacity accessibilityRole="button" onPress={onPress} activeOpacity={0.9} disabled={readonly} style={[
|
|
29
|
+
commonStyles.filter,
|
|
30
|
+
styles.container,
|
|
31
|
+
selected
|
|
32
|
+
? { backgroundColor: Colors.primaryColor.background_light }
|
|
33
|
+
: null,
|
|
34
|
+
style,
|
|
35
|
+
]}>
|
|
27
36
|
<View style={styles.buttonExt}>
|
|
28
37
|
{selected ? <View testID="radio" style={styles.buttonInt}/> : null}
|
|
29
38
|
</View>
|
|
30
|
-
<Text textColor={
|
|
39
|
+
<Text textColor={selected
|
|
40
|
+
? Colors.primaryColor.background
|
|
41
|
+
: readonly
|
|
42
|
+
? Colors.secondaryColor.background
|
|
43
|
+
: Colors.text} style={selected ? styles.boldText : undefined}>
|
|
31
44
|
{title}
|
|
32
45
|
</Text>
|
|
33
46
|
</TouchableOpacity>);
|
|
@@ -36,20 +49,10 @@ const getStyles = (Colors, size) => StyleSheet.create({
|
|
|
36
49
|
container: {
|
|
37
50
|
flexDirection: 'row',
|
|
38
51
|
alignItems: 'center',
|
|
39
|
-
margin: 5,
|
|
40
52
|
flex: 1,
|
|
41
53
|
minWidth: 100,
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
selectedCard: {
|
|
45
|
-
backgroundColor: Colors.backgroundColor,
|
|
46
|
-
borderColor: Colors.secondaryColor.background,
|
|
47
|
-
borderWidth: 1,
|
|
48
|
-
borderRadius: 7,
|
|
49
|
-
elevation: 2,
|
|
50
|
-
shadowOpacity: 0.5,
|
|
51
|
-
shadowColor: Colors.secondaryColor.background,
|
|
52
|
-
shadowOffset: { width: 0, height: 0 },
|
|
54
|
+
paddingHorizontal: 2,
|
|
55
|
+
paddingVertical: 10,
|
|
53
56
|
},
|
|
54
57
|
buttonExt: {
|
|
55
58
|
alignItems: 'center',
|
|
@@ -58,17 +61,18 @@ const getStyles = (Colors, size) => StyleSheet.create({
|
|
|
58
61
|
width: size,
|
|
59
62
|
borderRadius: size,
|
|
60
63
|
borderWidth: 1,
|
|
61
|
-
borderColor: Colors.secondaryColor.
|
|
64
|
+
borderColor: Colors.secondaryColor.background_light,
|
|
62
65
|
backgroundColor: Colors.backgroundColor,
|
|
66
|
+
marginHorizontal: 5,
|
|
63
67
|
},
|
|
64
68
|
buttonInt: {
|
|
65
|
-
height: size * 0.
|
|
66
|
-
width: size * 0.
|
|
67
|
-
borderRadius: size * 0.
|
|
69
|
+
height: size * 0.5,
|
|
70
|
+
width: size * 0.5,
|
|
71
|
+
borderRadius: size * 0.5,
|
|
68
72
|
backgroundColor: Colors.primaryColor.background,
|
|
69
73
|
},
|
|
70
|
-
|
|
71
|
-
|
|
74
|
+
boldText: {
|
|
75
|
+
fontWeight: 'bold',
|
|
72
76
|
},
|
|
73
77
|
});
|
|
74
78
|
export default RadioButton;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioButton.js","sourceRoot":"","sources":["../../../../src/components/atoms/RadioButton/RadioButton.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,OAAO,EAAC,MAAM,OAAO,CAAC;AACrC,OAAO,EAAC,UAAU,EAAE,gBAAgB,EAAE,IAAI,EAAC,MAAM,cAAc,CAAC;AAChE,OAAO,
|
|
1
|
+
{"version":3,"file":"RadioButton.js","sourceRoot":"","sources":["../../../../src/components/atoms/RadioButton/RadioButton.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,OAAO,EAAC,MAAM,OAAO,CAAC;AACrC,OAAO,EAAC,UAAU,EAAE,gBAAgB,EAAE,IAAI,EAAC,MAAM,cAAc,CAAC;AAChE,OAAO,EAAc,aAAa,EAAC,MAAM,gBAAgB,CAAC;AAC1D,OAAO,EAAC,eAAe,EAAC,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAC,IAAI,EAAC,MAAM,aAAa,CAAC;AAEjC,MAAM,YAAY,GAAG,EAAE,CAAC;AAExB,MAAM,WAAW,GAAG,CAAC,EACnB,KAAK,EACL,OAAO,EACP,QAAQ,EACR,KAAK,EACL,IAAI,GAAG,YAAY,EACnB,QAAQ,GAAG,KAAK,GAQjB,EAAE,EAAE;IACH,MAAM,MAAM,GAAG,aAAa,EAAE,CAAC;IAE/B,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,CAAC,EAAE,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC;IAEtE,MAAM,YAAY,GAAG,OAAO,CAC1B,GAAG,EAAE,C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C,MAAM,CAAC;IAChB,SAAS,EAAE;QACT,aAAa,EAAE,KAAK;QACpB,UAAU,EAAE,QAAQ;QACpB,IAAI,EAAE,CAAC;QACP,QAAQ,EAAE,GAAG;QACb,iBAAiB,EAAE,CAAC;QACpB,eAAe,EAAE,EAAE;KACpB;IACD,SAAS,EAAE;QACT,UAAU,EAAE,QAAQ;QACpB,cAAc,EAAE,QAAQ;QACxB,MAAM,EAAE,IAAI;QACZ,KAAK,EAAE,IAAI;QACX,YAAY,EAAE,IAAI;QAClB,WAAW,EAAE,CAAC;QACd,WAAW,EAAE,MAAM,CAAC,cAAc,CAAC,gBAAgB;QACnD,eAAe,EAAE,MAAM,CAAC,eAAe;QACvC,gBAAgB,EAAE,CAAC;KACpB;IACD,SAAS,EAAE;QACT,MAAM,EAAE,IAAI,GAAG,GAAG;QAClB,KAAK,EAAE,IAAI,GAAG,GAAG;QACjB,YAAY,EAAE,IAAI,GAAG,GAAG;QACxB,eAAe,EAAE,MAAM,CAAC,YAAY,CAAC,UAAU;KAChD;IACD,QAAQ,EAAE;QACR,UAAU,EAAE,MAAM;KACnB;CACF,CAAC,CAAC;AAEL,eAAe,WAAW,CAAC"}
|
|
@@ -3,9 +3,8 @@ interface ScreenProps {
|
|
|
3
3
|
style?: any;
|
|
4
4
|
children: any;
|
|
5
5
|
fixedItems?: any;
|
|
6
|
-
removeSpaceOnTop?: boolean;
|
|
7
6
|
hideButtonBackground?: boolean;
|
|
8
7
|
loading?: boolean;
|
|
9
8
|
}
|
|
10
|
-
declare const Screen: ({ style, children, fixedItems,
|
|
9
|
+
declare const Screen: ({ style, children, fixedItems, loading, hideButtonBackground, }: ScreenProps) => React.JSX.Element;
|
|
11
10
|
export default Screen;
|