@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
|
@@ -53,11 +53,10 @@ const MultiValuePicker = ({ style, pickerStyle, styleTxt, title, placeholder, on
|
|
|
53
53
|
newSelectedItemList = [...selectedItemList, itemValue];
|
|
54
54
|
}
|
|
55
55
|
setSelectedItemList(newSelectedItemList);
|
|
56
|
-
onValueChange(newSelectedItemList);
|
|
56
|
+
onValueChange?.(newSelectedItemList);
|
|
57
57
|
}, [onValueChange, selectedItemList]);
|
|
58
58
|
const _required = useMemo(() => required && (selectedItemList == null || selectedItemList?.length === 0), [required, selectedItemList]);
|
|
59
|
-
const commonStyles = useMemo(() => getCommonStyles(Colors, _required), [Colors, _required]);
|
|
60
|
-
const styles = useMemo(() => getStyles(Colors, _required), [Colors, _required]);
|
|
59
|
+
const commonStyles = useMemo(() => getCommonStyles(Colors, _required, isFocused), [Colors, _required, isFocused]);
|
|
61
60
|
return (<View ref={wrapperRef} style={[
|
|
62
61
|
styles.container,
|
|
63
62
|
Platform.OS === 'ios' && pickerIsOpen ? styles.containerZIndex : null,
|
|
@@ -66,16 +65,14 @@ const MultiValuePicker = ({ style, pickerStyle, styleTxt, title, placeholder, on
|
|
|
66
65
|
{!checkNullString(title) && (<Text style={[styles.title, styleTxt]}>{title}</Text>)}
|
|
67
66
|
<MultiValuePickerButton onPress={togglePicker} listItem={selectedItemList} placeholder={placeholder} style={[
|
|
68
67
|
commonStyles.filter,
|
|
69
|
-
commonStyles.filterSize,
|
|
70
68
|
commonStyles.filterAlign,
|
|
71
|
-
isFocused && commonStyles.inputFocused,
|
|
72
69
|
styles.content,
|
|
73
70
|
pickerStyle,
|
|
74
71
|
]} onPressItem={handleValueChange} readonly={readonly}/>
|
|
75
72
|
{pickerIsOpen ? (<SelectionContainer wrapperRef={selectionWrapperRef} objectList={listItems} keyField="key" displayValue={(item) => item.title} handleSelect={handleValueChange} isPicker={true} selectedItem={selectedItemList} readonly={readonly} title={title} translator={translator}/>) : null}
|
|
76
73
|
</View>);
|
|
77
74
|
};
|
|
78
|
-
const
|
|
75
|
+
const styles = StyleSheet.create({
|
|
79
76
|
container: {
|
|
80
77
|
width: '90%',
|
|
81
78
|
alignSelf: 'center',
|
|
@@ -88,12 +85,11 @@ const getStyles = (Colors, _required) => StyleSheet.create({
|
|
|
88
85
|
},
|
|
89
86
|
content: {
|
|
90
87
|
width: '100%',
|
|
91
|
-
borderColor: _required
|
|
92
|
-
? Colors.errorColor.background
|
|
93
|
-
: Colors.secondaryColor.background,
|
|
94
|
-
borderWidth: 1,
|
|
95
88
|
marginHorizontal: 0,
|
|
96
89
|
minHeight: 40,
|
|
90
|
+
marginRight: 0,
|
|
91
|
+
paddingLeft: 10,
|
|
92
|
+
paddingRight: 10,
|
|
97
93
|
},
|
|
98
94
|
});
|
|
99
95
|
export default MultiValuePicker;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MultiValuePicker.js","sourceRoot":"","sources":["../../../../src/components/organisms/MultiValuePicker/MultiValuePicker.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,WAAW,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AACpE,OAAO,EAAC,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAC,MAAM,cAAc,CAAC;AACxD,OAAO,
|
|
1
|
+
{"version":3,"file":"MultiValuePicker.js","sourceRoot":"","sources":["../../../../src/components/organisms/MultiValuePicker/MultiValuePicker.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE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,CAC/B,QAAQ,CAAC,CAAC,QAAQ,CAAC,CACnB,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,UAAU,CAAC,CAAC,UAAU,CAAC,EACvB,CACH,CAAC,CAAC,CAAC,IAAI,CACV;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,SAAS,EAAE;QACT,KAAK,EAAE,KAAK;QACZ,SAAS,EAAE,QAAQ;KACpB;IACD,eAAe,EAAE;QACf,MAAM,EAAE,GAAG;KACZ;IACD,KAAK,EAAE;QACL,UAAU,EAAE,EAAE;KACf;IACD,OAAO,EAAE;QACP,KAAK,EAAE,MAAM;QACb,gBAAgB,EAAE,CAAC;QACnB,SAAS,EAAE,EAAE;QACb,WAAW,EAAE,CAAC;QACd,WAAW,EAAE,EAAE;QACf,YAAY,EAAE,EAAE;KACjB;CACF,CAAC,CAAC;AAEH,eAAe,gBAAgB,CAAC"}
|
|
@@ -9,6 +9,7 @@ interface PickerProps {
|
|
|
9
9
|
defaultValue?: string | number;
|
|
10
10
|
listItems: any[];
|
|
11
11
|
displayValue?: (item: any) => string;
|
|
12
|
+
renderItem?: (item: any) => React.ReactNode;
|
|
12
13
|
labelField?: string;
|
|
13
14
|
valueField: string;
|
|
14
15
|
emptyValue?: boolean;
|
|
@@ -20,5 +21,5 @@ interface PickerProps {
|
|
|
20
21
|
popup?: boolean;
|
|
21
22
|
translator?: (key: string, values?: Object) => string;
|
|
22
23
|
}
|
|
23
|
-
declare const Picker: ({ style, pickerStyle, styleTxt, title, placeholder, onValueChange, defaultValue, listItems, displayValue, labelField, valueField, emptyValue, isValueItem, readonly, required, isScrollViewContainer, multiLineLabels, popup, translator, }: PickerProps) => React.JSX.Element;
|
|
24
|
+
declare const Picker: ({ style, pickerStyle, styleTxt, title, placeholder, onValueChange, defaultValue, listItems, displayValue, renderItem, labelField, valueField, emptyValue, isValueItem, readonly, required, isScrollViewContainer, multiLineLabels, popup, translator, }: PickerProps) => React.JSX.Element;
|
|
24
25
|
export default Picker;
|
|
@@ -23,7 +23,7 @@ import { useOutsideClickHandler } from '../../../hooks';
|
|
|
23
23
|
import { Icon, Text } from '../../atoms';
|
|
24
24
|
import { Alert, FormInput, SelectionContainer, RightIconButton, } from '../../molecules';
|
|
25
25
|
const ITEM_HEIGHT = 40;
|
|
26
|
-
const Picker = ({ style, pickerStyle, styleTxt, title, placeholder, onValueChange, defaultValue = '', listItems, displayValue, labelField, valueField, emptyValue = true, isValueItem = false, readonly = false, required = false, isScrollViewContainer = false, multiLineLabels = false, popup = false, translator, }) => {
|
|
26
|
+
const Picker = ({ style, pickerStyle, styleTxt, title, placeholder, onValueChange, defaultValue = '', listItems, displayValue, renderItem, labelField, valueField, emptyValue = true, isValueItem = false, readonly = false, required = false, isScrollViewContainer = false, multiLineLabels = false, popup = false, translator, }) => {
|
|
27
27
|
const Colors = useThemeColor();
|
|
28
28
|
const [isFocused, setIsFocused] = useState(false);
|
|
29
29
|
const [isOpen, setIsOpen] = useState(false);
|
|
@@ -72,53 +72,48 @@ const Picker = ({ style, pickerStyle, styleTxt, title, placeholder, onValueChang
|
|
|
72
72
|
? visibleListLength * ITEM_HEIGHT + ITEM_HEIGHT + 5
|
|
73
73
|
: visibleListLength * ITEM_HEIGHT + 5;
|
|
74
74
|
}
|
|
75
|
-
return
|
|
76
|
-
}, [
|
|
75
|
+
return undefined;
|
|
76
|
+
}, [isScrollViewContainer, isOpen, popup, listItems, emptyValue]);
|
|
77
77
|
const _required = useMemo(() => required && selectedItem == null, [required, selectedItem]);
|
|
78
|
-
const commonStyles = useMemo(() => getCommonStyles(Colors, _required), [Colors, _required]);
|
|
78
|
+
const commonStyles = useMemo(() => getCommonStyles(Colors, _required, isFocused), [Colors, _required, isFocused]);
|
|
79
79
|
const _displayValue = useCallback((item) => {
|
|
80
80
|
if (item == null)
|
|
81
81
|
return '';
|
|
82
|
-
if (displayValue)
|
|
82
|
+
if (displayValue)
|
|
83
83
|
return displayValue(item);
|
|
84
|
-
|
|
85
|
-
else if (labelField) {
|
|
84
|
+
if (labelField)
|
|
86
85
|
return item[labelField];
|
|
87
|
-
|
|
88
|
-
else {
|
|
89
|
-
return item[valueField];
|
|
90
|
-
}
|
|
86
|
+
return item[valueField];
|
|
91
87
|
}, [displayValue, labelField, valueField]);
|
|
92
88
|
const displayPlaceholder = useMemo(() => {
|
|
93
89
|
return (checkNullString(_displayValue(selectedItem)) &&
|
|
94
90
|
!checkNullString(placeholder));
|
|
95
91
|
}, [_displayValue, placeholder, selectedItem]);
|
|
96
|
-
const styles = useMemo(() => getStyles(
|
|
97
|
-
if (readonly)
|
|
92
|
+
const styles = useMemo(() => getStyles(isOpen, marginBottom), [marginBottom, isOpen]);
|
|
93
|
+
if (readonly)
|
|
98
94
|
return (<FormInput style={[styles.container, style]} title={title} defaultValue={_displayValue(selectedItem)} readOnly/>);
|
|
99
|
-
}
|
|
100
|
-
const renderSelection = () => (<SelectionContainer style={popup ? styles.popupSelection : pickerStyle} wrapperRef={selectionWrapperRef} emptyValue={emptyValue} objectList={listItems} keyField={valueField} displayValue={_displayValue} handleSelect={handleValueChange} isPicker={true} selectedItem={[selectedItem]} title={title} multiLineLabels={multiLineLabels && !popup} translator={translator}/>);
|
|
95
|
+
const renderSelection = () => (<SelectionContainer style={popup ? styles.popupSelection : pickerStyle} wrapperRef={selectionWrapperRef} emptyValue={emptyValue} objectList={listItems} keyField={valueField} displayValue={_displayValue} renderItem={renderItem} handleSelect={handleValueChange} isPicker={true} selectedItem={[selectedItem]} title={title} multiLineLabels={multiLineLabels && !popup} translator={translator}/>);
|
|
101
96
|
return (<View ref={wrapperRef} style={[
|
|
102
97
|
styles.container,
|
|
103
98
|
Platform.OS === 'ios' ? styles.containerZIndex : null,
|
|
104
99
|
style,
|
|
105
100
|
]} testID="pickerContainer">
|
|
106
101
|
{!checkNullString(title) && (<Text style={[styles.title, styleTxt]}>{title}</Text>)}
|
|
107
|
-
<RightIconButton numberOfLines={multiLineLabels ? null : 1} onPress={togglePicker} icon={<Icon name="chevron-down" color={Colors.secondaryColor_dark.background}/>} title={displayPlaceholder ? placeholder : _displayValue(selectedItem)}
|
|
102
|
+
<RightIconButton numberOfLines={multiLineLabels ? null : 1} onPress={togglePicker} icon={<Icon name="chevron-down" color={Colors.secondaryColor_dark.background}/>} title={displayPlaceholder ? placeholder : _displayValue(selectedItem)} titleColor={displayPlaceholder ? Colors.placeholderTextColor : Colors.text} content={displayPlaceholder || selectedItem == null
|
|
103
|
+
? undefined
|
|
104
|
+
: renderItem?.(selectedItem)} styleText={styles.text} style={[
|
|
108
105
|
commonStyles.filter,
|
|
109
|
-
commonStyles.filterSize,
|
|
110
106
|
commonStyles.filterAlign,
|
|
111
|
-
|
|
112
|
-
styles.content,
|
|
107
|
+
styles.rightIconButton,
|
|
113
108
|
multiLineLabels && styles.adjustableHeight,
|
|
114
109
|
pickerStyle,
|
|
115
|
-
]}/>
|
|
110
|
+
]} showWrapper={false}/>
|
|
116
111
|
{popup ? (<Alert visible={isOpen} title={title} cancelButtonConfig={{ showInHeader: true, onPress: closePicker }} translator={translator}>
|
|
117
112
|
{renderSelection()}
|
|
118
113
|
</Alert>) : (isOpen && renderSelection())}
|
|
119
114
|
</View>);
|
|
120
115
|
};
|
|
121
|
-
const getStyles = (
|
|
116
|
+
const getStyles = (isOpen, marginBottom) => StyleSheet.create({
|
|
122
117
|
container: {
|
|
123
118
|
width: '90%',
|
|
124
119
|
alignSelf: 'center',
|
|
@@ -127,21 +122,22 @@ const getStyles = (Colors, _required, marginBottom, isOpen, displayPlaceholder)
|
|
|
127
122
|
containerZIndex: {
|
|
128
123
|
zIndex: isOpen ? 100 : 0,
|
|
129
124
|
},
|
|
130
|
-
|
|
125
|
+
rightIconButton: {
|
|
131
126
|
width: '100%',
|
|
132
|
-
|
|
133
|
-
? Colors.errorColor.background
|
|
134
|
-
: Colors.secondaryColor.background,
|
|
135
|
-
borderWidth: 1,
|
|
136
|
-
marginHorizontal: 0,
|
|
127
|
+
height: undefined,
|
|
137
128
|
minHeight: 40,
|
|
129
|
+
marginHorizontal: 0,
|
|
130
|
+
marginRight: 0,
|
|
131
|
+
paddingLeft: 10,
|
|
132
|
+
paddingRight: 10,
|
|
138
133
|
},
|
|
139
134
|
adjustableHeight: {
|
|
140
135
|
height: undefined,
|
|
141
136
|
paddingVertical: 10,
|
|
142
137
|
},
|
|
143
|
-
|
|
144
|
-
|
|
138
|
+
text: {
|
|
139
|
+
flex: 1,
|
|
140
|
+
textAlign: 'left',
|
|
145
141
|
},
|
|
146
142
|
title: {
|
|
147
143
|
marginLeft: 10,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Picker.js","sourceRoot":"","sources":["../../../../src/components/organisms/Picker/Picker.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,SAAS,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AAC/E,OAAO,EAAC,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAC,MAAM,cAAc,CAAC;AACxD,OAAO,
|
|
1
|
+
{"version":3,"file":"Picker.js","sourceRoot":"","sources":["../../../../src/components/organisms/Picker/Picker.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,SAAS,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AAC/E,OAAO,EAAC,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAC,MAAM,cAAc,CAAC;AACxD,OAAO,EAAC,aAAa,EAAC,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAC,eAAe,EAAE,eAAe,EAAE,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAC7E,OAAO,EAAC,sBAAsB,EAAC,MAAM,gBAAgB,CA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C;QACN,SAAS,EAAE,CAAC;QACZ,aAAa,EAAE,CAAC;QAChB,YAAY,EAAE,CAAC;KAChB;CACF,CAAC,CAAC;AAEL,eAAe,MAAM,CAAC"}
|
|
@@ -20,7 +20,7 @@ import { StyleSheet, View, Animated } from 'react-native';
|
|
|
20
20
|
import { useThemeColor } from '../../../theme';
|
|
21
21
|
import { Text } from '../../atoms';
|
|
22
22
|
const BORDER_RADIUS = 7;
|
|
23
|
-
const ProgressBar = ({ style, styleTxt, value = 0, total = 100, showPercent = true, centeredPercent = false, colorRepartition = {}, height = 30, stripe = true, stripeDuration =
|
|
23
|
+
const ProgressBar = ({ style, styleTxt, value = 0, total = 100, showPercent = true, centeredPercent = false, colorRepartition = {}, height = 30, stripe = true, stripeDuration = 1500, stripeWidth = 15, }) => {
|
|
24
24
|
const Colors = useThemeColor();
|
|
25
25
|
const animatedStripe = useRef(new Animated.Value(0)).current;
|
|
26
26
|
const animatedWidth = useRef(new Animated.Value(0)).current;
|
|
@@ -28,13 +28,14 @@ const ProgressBar = ({ style, styleTxt, value = 0, total = 100, showPercent = tr
|
|
|
28
28
|
const [progressBarWidth, setProgressBarWidth] = useState(0);
|
|
29
29
|
const [textWidth, setTextWidth] = useState(0);
|
|
30
30
|
const percent = useMemo(() => {
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
const _value = typeof value === 'string' ? parseFloat(value) : value;
|
|
32
|
+
if (_value !== 0 && total !== 0 && progressBarContainerWidth !== 0) {
|
|
33
|
+
let _progressBarWidth = (_value / total) * progressBarContainerWidth;
|
|
33
34
|
if (_progressBarWidth < 2 * BORDER_RADIUS) {
|
|
34
35
|
_progressBarWidth = 2 * BORDER_RADIUS;
|
|
35
36
|
}
|
|
36
37
|
return {
|
|
37
|
-
real: (
|
|
38
|
+
real: (_value / total) * 100,
|
|
38
39
|
progressBar: (_progressBarWidth / progressBarContainerWidth) * 100,
|
|
39
40
|
};
|
|
40
41
|
}
|
|
@@ -97,12 +98,12 @@ const ProgressBar = ({ style, styleTxt, value = 0, total = 100, showPercent = tr
|
|
|
97
98
|
outputRange: [-stripeWidth, progressBarWidth],
|
|
98
99
|
});
|
|
99
100
|
const renderPercent = useCallback(() => {
|
|
100
|
-
return (<Text style={[styles.text, styleTxt]} onTextLayout={event => {
|
|
101
|
+
return (<Text style={[styles.text, styleTxt]} textColor={Colors.secondaryColor.background} onTextLayout={event => {
|
|
101
102
|
setTextWidth(event.nativeEvent.lines?.[0]?.width);
|
|
102
103
|
}}>
|
|
103
104
|
{displayText}
|
|
104
105
|
</Text>);
|
|
105
|
-
}, [
|
|
106
|
+
}, [styles.text, styleTxt, Colors.secondaryColor.background, displayText]);
|
|
106
107
|
return (<View onLayout={event => {
|
|
107
108
|
const { width } = event.nativeEvent.layout;
|
|
108
109
|
setProgressBarContainerWidth(width);
|
|
@@ -124,9 +125,7 @@ const ProgressBar = ({ style, styleTxt, value = 0, total = 100, showPercent = tr
|
|
|
124
125
|
]}>
|
|
125
126
|
<Animated.View style={[
|
|
126
127
|
stripe && percent.progressBar < 100 ? styles.stripe : styles.none,
|
|
127
|
-
{
|
|
128
|
-
transform: [{ translateX }],
|
|
129
|
-
},
|
|
128
|
+
{ transform: [{ translateX }] },
|
|
130
129
|
]}/>
|
|
131
130
|
{!displayTextOutside ? renderPercent() : null}
|
|
132
131
|
</Animated.View>
|
|
@@ -135,14 +134,10 @@ const ProgressBar = ({ style, styleTxt, value = 0, total = 100, showPercent = tr
|
|
|
135
134
|
const getStyles = (Colors, height, color, percent, stripeWidth, progressBarWidth) => StyleSheet.create({
|
|
136
135
|
container: {
|
|
137
136
|
width: '100%',
|
|
138
|
-
height: height +
|
|
137
|
+
height: height + 1,
|
|
139
138
|
borderRadius: BORDER_RADIUS + 1,
|
|
140
|
-
elevation: 3,
|
|
141
|
-
shadowOpacity: 0.5,
|
|
142
|
-
shadowColor: Colors.secondaryColor.background,
|
|
143
|
-
shadowOffset: { width: 0, height: 0 },
|
|
144
139
|
backgroundColor: Colors.backgroundColor,
|
|
145
|
-
borderWidth:
|
|
140
|
+
borderWidth: 0.5,
|
|
146
141
|
borderColor: Colors.secondaryColor.background,
|
|
147
142
|
zIndex: 1,
|
|
148
143
|
},
|
|
@@ -162,7 +157,7 @@ const getStyles = (Colors, height, color, percent, stripeWidth, progressBarWidth
|
|
|
162
157
|
bottom: 0,
|
|
163
158
|
left: 0,
|
|
164
159
|
width: stripeWidth,
|
|
165
|
-
backgroundColor:
|
|
160
|
+
backgroundColor: color.background_light,
|
|
166
161
|
},
|
|
167
162
|
text: {
|
|
168
163
|
textAlign: 'center',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProgressBar.js","sourceRoot":"","sources":["../../../../src/components/organisms/ProgressBar/ProgressBar.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AAC/E,OAAO,EAAC,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAC,MAAM,cAAc,CAAC;AACxD,OAAO,EAAc,aAAa,EAAQ,MAAM,gBAAgB,CAAC;AACjE,OAAO,EAAC,IAAI,EAAC,MAAM,aAAa,CAAC;AAEjC,MAAM,aAAa,GAAG,CAAC,CAAC;AAgBxB,MAAM,WAAW,GAAG,CAAC,EACnB,KAAK,EACL,QAAQ,EACR,KAAK,GAAG,CAAC,EACT,KAAK,GAAG,GAAG,EACX,WAAW,GAAG,IAAI,EAClB,eAAe,GAAG,KAAK,EACvB,gBAAgB,GAAG,EAAE,EACrB,MAAM,GAAG,EAAE,EACX,MAAM,GAAG,IAAI,EACb,cAAc,GAAG,IAAI,EACrB,WAAW,GAAG,EAAE,GACC,EAAE,EAAE;IACrB,MAAM,MAAM,GAAG,aAAa,EAAE,CAAC;IAE/B,MAAM,cAAc,GAAG,MAAM,CAAC,IAAI,QAAQ,CAAC,KAAK,CAAC,C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AQ,EAAE,QAAQ;KACnB;IACD,MAAM,EAAE;QACN,QAAQ,EAAE,UAAU;QACpB,GAAG,EAAE,CAAC;QACN,MAAM,EAAE,CAAC;QACT,IAAI,EAAE,CAAC;QACP,KAAK,EAAE,WAAW;QAClB,eAAe,EAAE,KAAK,CAAC,gBAAgB;KACxC;IACD,IAAI,EAAE;QACJ,SAAS,EAAE,QAAQ;KACpB;IACD,OAAO,EAAE;QACP,QAAQ,EAAE,UAAU;QACpB,IAAI,EAAE,gBAAgB,GAAG,CAAC;QAC1B,GAAG,EAAE,MAAM,GAAG,CAAC,GAAG,EAAE;KACrB;IACD,eAAe,EAAE;QACf,QAAQ,EAAE,UAAU;QACpB,IAAI,EAAE,KAAK;QACX,GAAG,EAAE,MAAM,GAAG,CAAC,GAAG,EAAE;QACpB,MAAM,EAAE,CAAC;KACV;IACD,IAAI,EAAE;QACJ,OAAO,EAAE,MAAM;KAChB;CACF,CAAC,CAAC;AAEL,eAAe,WAAW,CAAC"}
|
|
@@ -5,7 +5,7 @@ interface QuantityCardProps {
|
|
|
5
5
|
children?: any;
|
|
6
6
|
labelQty: string;
|
|
7
7
|
defaultValue: number;
|
|
8
|
-
onValueChange: (
|
|
8
|
+
onValueChange: (_v?: any) => void;
|
|
9
9
|
editable: boolean;
|
|
10
10
|
actionQty?: boolean;
|
|
11
11
|
iconName?: string;
|
|
@@ -21,6 +21,7 @@ interface QuantityCardProps {
|
|
|
21
21
|
maxValue?: number;
|
|
22
22
|
keyboardType?: KeyboardTypeOptions;
|
|
23
23
|
scale?: number;
|
|
24
|
+
isFormWrapper?: boolean;
|
|
24
25
|
}
|
|
25
|
-
declare const QuantityCard: ({ style, children, labelQty, defaultValue, onValueChange, editable, actionQty, iconName, onPressActionQty, isBigButton, translator, ...incrementProps }: QuantityCardProps) => React.JSX.Element;
|
|
26
|
+
declare const QuantityCard: ({ style, children, labelQty, defaultValue, onValueChange, editable, actionQty, iconName, onPressActionQty, isBigButton, translator, isFormWrapper, ...incrementProps }: QuantityCardProps) => React.JSX.Element;
|
|
26
27
|
export default QuantityCard;
|
|
@@ -17,89 +17,80 @@
|
|
|
17
17
|
*/
|
|
18
18
|
import React, { useCallback, useMemo } from 'react';
|
|
19
19
|
import { StyleSheet, View } from 'react-native';
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import { getCommonStyles } from '../../../utils/commons-styles';
|
|
23
|
-
import { useDigitFormat } from '../../../hooks/use-digit-format';
|
|
20
|
+
import { getCommonStyles } from '../../../utils';
|
|
21
|
+
import { useDigitFormat } from '../../../hooks';
|
|
24
22
|
import { useThemeColor } from '../../../theme';
|
|
25
|
-
|
|
23
|
+
import { Card, HorizontalRule, Icon, Text } from '../../atoms';
|
|
24
|
+
import { Increment } from '../../molecules';
|
|
25
|
+
const QuantityCard = ({ style, children, labelQty, defaultValue = 0, onValueChange, editable, actionQty = false, iconName = 'pencil-fill', onPressActionQty, isBigButton = false, translator, isFormWrapper = false, ...incrementProps }) => {
|
|
26
26
|
const Colors = useThemeColor();
|
|
27
27
|
const formatNumber = useDigitFormat();
|
|
28
28
|
const commonStyles = useMemo(() => getCommonStyles(Colors), [Colors]);
|
|
29
29
|
const _defaultValue = useMemo(() => formatNumber(defaultValue), [defaultValue, formatNumber]);
|
|
30
30
|
const renderIncrement = useCallback(() => {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
31
|
+
if (editable)
|
|
32
|
+
return (<Increment {...incrementProps} value={_defaultValue} decimalSpacer={translator('Base_DecimalSpacer')} thousandSpacer={translator('Base_ThousandSpacer')} onValueChange={onValueChange} isBigButton={isBigButton} inputStyle={styles.incrementInput}/>);
|
|
33
|
+
return <Text writingType="important">{_defaultValue}</Text>;
|
|
34
|
+
}, [
|
|
35
|
+
_defaultValue,
|
|
36
|
+
editable,
|
|
37
|
+
incrementProps,
|
|
38
|
+
isBigButton,
|
|
39
|
+
onValueChange,
|
|
40
|
+
translator,
|
|
41
|
+
]);
|
|
42
|
+
const Container = useMemo(() => (isFormWrapper ? View : Card), [isFormWrapper]);
|
|
43
|
+
return (<Container style={[
|
|
44
|
+
isFormWrapper ? commonStyles.filter : undefined,
|
|
45
|
+
styles.container,
|
|
46
|
+
style,
|
|
47
|
+
]}>
|
|
48
|
+
{children != null && (<View style={styles.upperContainer}>
|
|
49
|
+
{actionQty ? (<View style={styles.actionContainer}>
|
|
50
|
+
<View style={styles.childrenContainer}>{children}</View>
|
|
51
|
+
<Icon name={iconName} touchable onPress={onPressActionQty}/>
|
|
52
|
+
</View>) : (<View>{children}</View>)}
|
|
53
|
+
<HorizontalRule style={styles.border} color={Colors.secondaryColor.background_light}/>
|
|
54
|
+
</View>)}
|
|
55
|
+
<View style={styles.incrementContainer}>
|
|
56
|
+
<Text>{labelQty}</Text>
|
|
57
|
+
{renderIncrement()}
|
|
45
58
|
</View>
|
|
46
|
-
|
|
47
|
-
<Text style={styles.textField}>{labelQty}</Text>
|
|
48
|
-
{editable ? (renderIncrement()) : (<Text style={styles.textValue}>{_defaultValue}</Text>)}
|
|
49
|
-
</View>
|
|
50
|
-
</Card>);
|
|
59
|
+
</Container>);
|
|
51
60
|
};
|
|
52
61
|
const styles = StyleSheet.create({
|
|
53
|
-
noChildrenContainer: {
|
|
54
|
-
flexDirection: 'column',
|
|
55
|
-
marginHorizontal: 16,
|
|
56
|
-
marginBottom: '2%',
|
|
57
|
-
alignItems: 'center',
|
|
58
|
-
},
|
|
59
|
-
noChildrenTextField: {
|
|
60
|
-
fontSize: 16,
|
|
61
|
-
},
|
|
62
|
-
noChildrenTextValue: {
|
|
63
|
-
fontSize: 16,
|
|
64
|
-
fontWeight: 'bold',
|
|
65
|
-
},
|
|
66
62
|
container: {
|
|
67
63
|
flexDirection: 'column',
|
|
68
|
-
|
|
69
|
-
paddingVertical:
|
|
64
|
+
alignItems: 'center',
|
|
65
|
+
paddingVertical: 8,
|
|
70
66
|
paddingRight: 16,
|
|
71
67
|
paddingLeft: 16,
|
|
72
68
|
width: '90%',
|
|
73
69
|
alignSelf: 'center',
|
|
74
70
|
},
|
|
75
|
-
|
|
76
|
-
borderBottomColor: 'black',
|
|
77
|
-
borderBottomWidth: 0.5,
|
|
78
|
-
flexDirection: 'column',
|
|
71
|
+
upperContainer: {
|
|
79
72
|
width: '100%',
|
|
80
|
-
paddingBottom: '3%',
|
|
81
73
|
alignSelf: 'center',
|
|
74
|
+
flexDirection: 'column',
|
|
82
75
|
},
|
|
83
76
|
actionContainer: {
|
|
84
77
|
flexDirection: 'row',
|
|
85
|
-
justifyContent: 'space-between',
|
|
86
78
|
alignItems: 'flex-start',
|
|
79
|
+
gap: 5,
|
|
87
80
|
},
|
|
88
81
|
childrenContainer: {
|
|
89
|
-
|
|
82
|
+
flex: 1,
|
|
90
83
|
},
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
84
|
+
border: {
|
|
85
|
+
width: '80%',
|
|
86
|
+
alignSelf: 'center',
|
|
87
|
+
marginVertical: 5,
|
|
94
88
|
},
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
paddingTop: '3%',
|
|
89
|
+
incrementContainer: {
|
|
90
|
+
alignItems: 'center',
|
|
98
91
|
},
|
|
99
|
-
|
|
100
|
-
fontSize:
|
|
101
|
-
fontWeight: 'bold',
|
|
102
|
-
paddingTop: '3%',
|
|
92
|
+
incrementInput: {
|
|
93
|
+
fontSize: 15,
|
|
103
94
|
},
|
|
104
95
|
});
|
|
105
96
|
export default QuantityCard;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QuantityCard.js","sourceRoot":"","sources":["../../../../src/components/organisms/QuantityCard/QuantityCard.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,WAAW,EAAE,OAAO,EA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S,EAAE,QAAQ;QACnB,cAAc,EAAE,CAAC;KAClB;IACD,kBAAkB,EAAE;QAClB,UAAU,EAAE,QAAQ;KACrB;IACD,cAAc,EAAE;QACd,QAAQ,EAAE,EAAE;KACb;CACF,CAAC,CAAC;AAEH,eAAe,YAAY,CAAC"}
|
|
@@ -20,18 +20,14 @@ import { StyleSheet, TouchableOpacity } from 'react-native';
|
|
|
20
20
|
import { getCommonStyles } from '../../../utils/commons-styles';
|
|
21
21
|
import { useThemeColor } from '../../../theme';
|
|
22
22
|
import { Icon, Text } from '../../atoms';
|
|
23
|
-
const DottedButton = ({ iconName, title, color, horizontal =
|
|
23
|
+
const DottedButton = ({ iconName, title, color, horizontal = false, onPress, }) => {
|
|
24
24
|
const Colors = useThemeColor();
|
|
25
25
|
const buttonColor = useMemo(() => (color != null ? color : Colors.secondaryColor), [color, Colors]);
|
|
26
|
-
const styles = useMemo(() =>
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}, [Colors]);
|
|
32
|
-
return (<TouchableOpacity style={[commonStyles.button, styles.button]} onPress={onPress} testID="dottedButtonContainer">
|
|
33
|
-
<Icon style={styles.icon} name={iconName} size={28} color={buttonColor.background}/>
|
|
34
|
-
<Text style={styles.text} fontSize={18} textColor={buttonColor.background}>
|
|
26
|
+
const styles = useMemo(() => getStyles(buttonColor, horizontal), [buttonColor, horizontal]);
|
|
27
|
+
const commonStyles = useMemo(() => getCommonStyles(), []);
|
|
28
|
+
return (<TouchableOpacity style={[commonStyles.button, styles.button]} onPress={onPress} activeOpacity={0.9} testID="dottedButtonContainer">
|
|
29
|
+
<Icon name={iconName} size={20} color={buttonColor.background}/>
|
|
30
|
+
<Text style={styles.text} fontSize={16} textColor={buttonColor.background}>
|
|
35
31
|
{title}
|
|
36
32
|
</Text>
|
|
37
33
|
</TouchableOpacity>);
|
|
@@ -43,18 +39,14 @@ const getStyles = (color, horizontal) => StyleSheet.create({
|
|
|
43
39
|
height: 'auto',
|
|
44
40
|
justifyContent: 'flex-start',
|
|
45
41
|
alignSelf: 'stretch',
|
|
46
|
-
marginBottom: 0,
|
|
47
42
|
borderStyle: 'dotted',
|
|
48
43
|
borderColor: color.background,
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
marginHorizontal: horizontal ? 5 : 0,
|
|
44
|
+
paddingVertical: 10,
|
|
45
|
+
gap: 5,
|
|
46
|
+
marginVertical: 0,
|
|
53
47
|
},
|
|
54
48
|
text: {
|
|
55
|
-
flex:
|
|
56
|
-
marginLeft: horizontal ? 15 : 0,
|
|
57
|
-
marginTop: horizontal ? 0 : 5,
|
|
49
|
+
flex: 1,
|
|
58
50
|
},
|
|
59
51
|
});
|
|
60
52
|
export default DottedButton;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DottedButton.js","sourceRoot":"","sources":["../../../../src/components/organisms/ScrollList/DottedButton.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,eAAe,EAAC,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAQ,aAAa,EAAC,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAC,IAAI,EAAE,IAAI,EAAC,MAAM,aAAa,CAAC;AAUvC,MAAM,YAAY,GAAG,CAAC,EACpB,QAAQ,EACR,KAAK,EACL,KAAK,EACL,UAAU,GAAG,
|
|
1
|
+
{"version":3,"file":"DottedButton.js","sourceRoot":"","sources":["../../../../src/components/organisms/ScrollList/DottedButton.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,EAAC,OAAO,EAAC,MAAM,OAAO,CAAC;AACrC,OAAO,EAAC,UAAU,EAAE,gBAAgB,EAAC,MAAM,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