josenanodev-react-components-library 0.2.18 → 1.0.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/LICENSE +21 -0
- package/README.md +4 -4
- package/dist/cjs/index.js +3652 -33
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/types/components/BubbleMenu/BubbleMenu.d.ts +12 -0
- package/dist/cjs/types/components/BubbleMenu/index.d.ts +1 -0
- package/dist/cjs/types/components/CalendarDatePicker/CalendarDatePicker.d.ts +19 -0
- package/dist/cjs/types/components/CalendarDatePicker/index.d.ts +1 -0
- package/dist/cjs/types/components/CalendarDatePicker/subcomponents/CalendarScrollableSection.d.ts +15 -0
- package/dist/cjs/{components → types/components}/ExportToExcelButton/ExportToExcelButton.d.ts +2 -2
- package/dist/cjs/types/components/ExportToExcelButton/index.d.ts +1 -0
- package/dist/cjs/types/components/InputBoxWithConfirmation/InputBoxWithConfirmation.d.ts +17 -0
- package/dist/cjs/types/components/InputBoxWithConfirmation/index.d.ts +1 -0
- package/dist/cjs/types/components/IntegerControl/IntegerControl.d.ts +10 -0
- package/dist/cjs/types/components/IntegerControl/index.d.ts +1 -0
- package/dist/cjs/types/components/LabeledInput/LabeledInput.d.ts +15 -0
- package/dist/cjs/types/components/LabeledInput/index.d.ts +1 -0
- package/dist/cjs/{components → types/components}/Modal/Modal.d.ts +2 -2
- package/dist/cjs/types/components/Modal/index.d.ts +1 -0
- package/dist/cjs/{components → types/components}/Multicalendar/Multicalendar.d.ts +2 -2
- package/dist/cjs/types/components/Multicalendar/index.d.ts +1 -0
- package/dist/cjs/{components → types/components}/Multicalendar/subcomponents/composites/CellsRow/CellsRow.d.ts +2 -2
- package/dist/cjs/{components → types/components}/Multicalendar/subcomponents/composites/DatesGrid/DatesGrid.d.ts +2 -2
- package/dist/cjs/{components → types/components}/Multicalendar/subcomponents/composites/ListElementsColumn/ListElementsColumn.d.ts +2 -2
- package/dist/cjs/{components → types/components}/Multicalendar/subcomponents/individuals/Cell/Cell.d.ts +1 -1
- package/dist/cjs/{components → types/components}/Multicalendar/subcomponents/individuals/DatesRow/DatesRow.d.ts +2 -2
- package/dist/cjs/types/components/Multicalendar/subcomponents/individuals/DropdownMonthNavigation/DropdownMonthNavigation.d.ts +5 -0
- package/dist/cjs/{components → types/components}/Multicalendar/subcomponents/individuals/ListElement/ListElement.d.ts +1 -1
- package/dist/{esm → cjs/types}/components/MultipleJoinedButtonsBar/MultipleJoinedButtonsBar.d.ts +2 -2
- package/dist/cjs/types/components/MultipleJoinedButtonsBar/index.d.ts +1 -0
- package/dist/{esm → cjs/types}/components/ParallelSelectionList/ParallelSelectionList.d.ts +2 -2
- package/dist/cjs/types/components/ParallelSelectionList/index.d.ts +1 -0
- package/dist/{esm → cjs/types}/components/PopUp/PopUp.d.ts +2 -2
- package/dist/cjs/types/components/PopUp/index.d.ts +1 -0
- package/dist/{esm → cjs/types}/components/ProgressBar/ProgressBar.d.ts +2 -2
- package/dist/cjs/types/components/ProgressBar/index.d.ts +1 -0
- package/dist/cjs/types/components/ScreenSteps/ScreenSteps.d.ts +14 -0
- package/dist/cjs/types/components/ScreenSteps/index.d.ts +1 -0
- package/dist/cjs/types/components/ScrollSnapGallery/ScrollSnapGallery.d.ts +14 -0
- package/dist/cjs/types/components/ScrollSnapGallery/index.d.ts +1 -0
- package/dist/{esm → cjs/types}/components/SearchBar/SearchBar.d.ts +2 -2
- package/dist/cjs/types/components/SearchBar/index.d.ts +1 -0
- package/dist/{esm → cjs/types}/components/SideBar/SideBar.d.ts +2 -2
- package/dist/cjs/types/components/SideBar/index.d.ts +1 -0
- package/dist/{esm → cjs/types}/components/Slider/Slider.d.ts +2 -2
- package/dist/cjs/types/components/Slider/index.d.ts +1 -0
- package/dist/cjs/types/components/index.d.ts +16 -0
- package/dist/cjs/types/hooks/useIntersectionObserver.d.ts +9 -0
- package/dist/cjs/types/index.d.ts +1 -0
- package/dist/{esm → cjs/types}/mocks/ReactComponentMocksForTesting/CellChildrenMock.d.ts +2 -2
- package/dist/{esm → cjs/types}/mocks/ReactComponentMocksForTesting/ListElementChildrenMock.d.ts +2 -2
- package/dist/cjs/types/stories/CalendarDatePickerMask.d.ts +4 -0
- package/dist/cjs/types/utils/dayOfTheWeekStartingOnMonday.d.ts +7 -0
- package/dist/cjs/types/utils/numberOfWeeksInAMonth.d.ts +7 -0
- package/dist/esm/index.js +3635 -13
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/types/components/BubbleMenu/BubbleMenu.d.ts +12 -0
- package/dist/esm/types/components/BubbleMenu/index.d.ts +1 -0
- package/dist/esm/types/components/CalendarDatePicker/CalendarDatePicker.d.ts +19 -0
- package/dist/esm/types/components/CalendarDatePicker/index.d.ts +1 -0
- package/dist/esm/types/components/CalendarDatePicker/subcomponents/CalendarScrollableSection.d.ts +15 -0
- package/dist/esm/{components → types/components}/ExportToExcelButton/ExportToExcelButton.d.ts +2 -2
- package/dist/esm/types/components/ExportToExcelButton/index.d.ts +1 -0
- package/dist/esm/types/components/InputBoxWithConfirmation/InputBoxWithConfirmation.d.ts +17 -0
- package/dist/esm/types/components/InputBoxWithConfirmation/index.d.ts +1 -0
- package/dist/esm/types/components/IntegerControl/IntegerControl.d.ts +10 -0
- package/dist/esm/types/components/IntegerControl/index.d.ts +1 -0
- package/dist/esm/types/components/LabeledInput/LabeledInput.d.ts +15 -0
- package/dist/esm/types/components/LabeledInput/index.d.ts +1 -0
- package/dist/esm/{components → types/components}/Modal/Modal.d.ts +2 -2
- package/dist/esm/types/components/Modal/index.d.ts +1 -0
- package/dist/esm/{components → types/components}/Multicalendar/Multicalendar.d.ts +2 -2
- package/dist/esm/types/components/Multicalendar/index.d.ts +1 -0
- package/dist/esm/{components → types/components}/Multicalendar/subcomponents/composites/CellsRow/CellsRow.d.ts +2 -2
- package/dist/esm/{components → types/components}/Multicalendar/subcomponents/composites/DatesGrid/DatesGrid.d.ts +2 -2
- package/dist/esm/{components → types/components}/Multicalendar/subcomponents/composites/ListElementsColumn/ListElementsColumn.d.ts +2 -2
- package/dist/esm/{components → types/components}/Multicalendar/subcomponents/individuals/Cell/Cell.d.ts +1 -1
- package/dist/esm/{components → types/components}/Multicalendar/subcomponents/individuals/DatesRow/DatesRow.d.ts +2 -2
- package/dist/esm/types/components/Multicalendar/subcomponents/individuals/DropdownMonthNavigation/DropdownMonthNavigation.d.ts +5 -0
- package/dist/esm/{components → types/components}/Multicalendar/subcomponents/individuals/ListElement/ListElement.d.ts +1 -1
- package/dist/{cjs → esm/types}/components/MultipleJoinedButtonsBar/MultipleJoinedButtonsBar.d.ts +2 -2
- package/dist/esm/types/components/MultipleJoinedButtonsBar/index.d.ts +1 -0
- package/dist/{cjs → esm/types}/components/ParallelSelectionList/ParallelSelectionList.d.ts +2 -2
- package/dist/esm/types/components/ParallelSelectionList/index.d.ts +1 -0
- package/dist/{cjs → esm/types}/components/PopUp/PopUp.d.ts +2 -2
- package/dist/esm/types/components/PopUp/index.d.ts +1 -0
- package/dist/{cjs → esm/types}/components/ProgressBar/ProgressBar.d.ts +2 -2
- package/dist/esm/types/components/ProgressBar/index.d.ts +1 -0
- package/dist/esm/types/components/ScreenSteps/ScreenSteps.d.ts +14 -0
- package/dist/esm/types/components/ScreenSteps/index.d.ts +1 -0
- package/dist/esm/types/components/ScrollSnapGallery/ScrollSnapGallery.d.ts +14 -0
- package/dist/esm/types/components/ScrollSnapGallery/index.d.ts +1 -0
- package/dist/{cjs → esm/types}/components/SearchBar/SearchBar.d.ts +2 -2
- package/dist/esm/types/components/SearchBar/index.d.ts +1 -0
- package/dist/{cjs → esm/types}/components/SideBar/SideBar.d.ts +2 -2
- package/dist/esm/types/components/SideBar/index.d.ts +1 -0
- package/dist/{cjs → esm/types}/components/Slider/Slider.d.ts +2 -2
- package/dist/esm/types/components/Slider/index.d.ts +1 -0
- package/dist/esm/types/components/index.d.ts +16 -0
- package/dist/esm/types/hooks/useIntersectionObserver.d.ts +9 -0
- package/dist/esm/types/index.d.ts +1 -0
- package/dist/{cjs → esm/types}/mocks/ReactComponentMocksForTesting/CellChildrenMock.d.ts +2 -2
- package/dist/{cjs → esm/types}/mocks/ReactComponentMocksForTesting/ListElementChildrenMock.d.ts +2 -2
- package/dist/esm/types/stories/CalendarDatePickerMask.d.ts +4 -0
- package/dist/esm/types/utils/dayOfTheWeekStartingOnMonday.d.ts +7 -0
- package/dist/esm/types/utils/numberOfWeeksInAMonth.d.ts +7 -0
- package/package.json +123 -106
- package/dist/cjs/Services/MulticalendarStatesAndSettings.js +0 -55
- package/dist/cjs/Services/accessToken.js +0 -15
- package/dist/cjs/common/constants.js +0 -8
- package/dist/cjs/common/turboSuiteUrls.js +0 -9
- package/dist/cjs/common/types.d.ts +0 -113
- package/dist/cjs/components/ExportToExcelButton/ExportToExcelButton.css +0 -31
- package/dist/cjs/components/ExportToExcelButton/ExportToExcelButton.js +0 -45
- package/dist/cjs/components/ExportToExcelButton/ExportToExcelButtonOwnFunctions.js +0 -75
- package/dist/cjs/components/ExportToExcelButton/types.d.ts +0 -44
- package/dist/cjs/components/InputBoxWithConfirmation/InputBoxWithConfirmation.css +0 -60
- package/dist/cjs/components/InputBoxWithConfirmation/InputBoxWithConfirmation.d.ts +0 -5
- package/dist/cjs/components/InputBoxWithConfirmation/InputBoxWithConfirmation.js +0 -117
- package/dist/cjs/components/InputBoxWithConfirmation/types.d.ts +0 -9
- package/dist/cjs/components/Modal/Modal.css +0 -43
- package/dist/cjs/components/Modal/Modal.js +0 -82
- package/dist/cjs/components/Modal/types.d.ts +0 -8
- package/dist/cjs/components/Multicalendar/Multicalendar.css +0 -191
- package/dist/cjs/components/Multicalendar/Multicalendar.js +0 -369
- package/dist/cjs/components/Multicalendar/MulticalendarOwnFunctions.js +0 -192
- package/dist/cjs/components/Multicalendar/subcomponents/composites/CellsRow/CellsRow.css +0 -5
- package/dist/cjs/components/Multicalendar/subcomponents/composites/CellsRow/CellsRow.js +0 -20
- package/dist/cjs/components/Multicalendar/subcomponents/composites/CellsRow/types.d.ts +0 -11
- package/dist/cjs/components/Multicalendar/subcomponents/composites/DatesGrid/DatesGrid.css +0 -7
- package/dist/cjs/components/Multicalendar/subcomponents/composites/DatesGrid/DatesGrid.js +0 -20
- package/dist/cjs/components/Multicalendar/subcomponents/composites/DatesGrid/types.d.ts +0 -13
- package/dist/cjs/components/Multicalendar/subcomponents/composites/ListElementsColumn/ListElementsColumn.css +0 -3
- package/dist/cjs/components/Multicalendar/subcomponents/composites/ListElementsColumn/ListElementsColumn.js +0 -15
- package/dist/cjs/components/Multicalendar/subcomponents/composites/ListElementsColumn/types.d.ts +0 -9
- package/dist/cjs/components/Multicalendar/subcomponents/individuals/Cell/Cell.css +0 -6
- package/dist/cjs/components/Multicalendar/subcomponents/individuals/Cell/Cell.js +0 -12
- package/dist/cjs/components/Multicalendar/subcomponents/individuals/Cell/types.d.ts +0 -10
- package/dist/cjs/components/Multicalendar/subcomponents/individuals/DatesRow/DatesRow.css +0 -60
- package/dist/cjs/components/Multicalendar/subcomponents/individuals/DatesRow/DatesRow.js +0 -56
- package/dist/cjs/components/Multicalendar/subcomponents/individuals/DatesRow/types.d.ts +0 -11
- package/dist/cjs/components/Multicalendar/subcomponents/individuals/DropdownMonthNavigation/DropdownMonthNavigation.css +0 -14
- package/dist/cjs/components/Multicalendar/subcomponents/individuals/DropdownMonthNavigation/DropdownMonthNavigation.d.ts +0 -5
- package/dist/cjs/components/Multicalendar/subcomponents/individuals/DropdownMonthNavigation/DropdownMonthNavigation.js +0 -13
- package/dist/cjs/components/Multicalendar/subcomponents/individuals/DropdownMonthNavigation/types.d.ts +0 -5
- package/dist/cjs/components/Multicalendar/subcomponents/individuals/ListElement/ListElement.css +0 -14
- package/dist/cjs/components/Multicalendar/subcomponents/individuals/ListElement/ListElement.js +0 -14
- package/dist/cjs/components/Multicalendar/subcomponents/individuals/ListElement/types.d.ts +0 -7
- package/dist/cjs/components/Multicalendar/types.d.ts +0 -48
- package/dist/cjs/components/MultipleJoinedButtonsBar/MultipleJoinedButtonsBar.css +0 -40
- package/dist/cjs/components/MultipleJoinedButtonsBar/MultipleJoinedButtonsBar.js +0 -48
- package/dist/cjs/components/MultipleJoinedButtonsBar/types.d.ts +0 -6
- package/dist/cjs/components/ParallelSelectionList/ParallelSelectionList.css +0 -229
- package/dist/cjs/components/ParallelSelectionList/ParallelSelectionList.js +0 -146
- package/dist/cjs/components/ParallelSelectionList/types.d.ts +0 -22
- package/dist/cjs/components/PopUp/PopUp.css +0 -15
- package/dist/cjs/components/PopUp/PopUp.js +0 -50
- package/dist/cjs/components/PopUp/types.d.ts +0 -9
- package/dist/cjs/components/ProgressBar/ProgressBar.css +0 -39
- package/dist/cjs/components/ProgressBar/ProgressBar.js +0 -56
- package/dist/cjs/components/ProgressBar/types.d.ts +0 -7
- package/dist/cjs/components/SearchBar/SearchBar.css +0 -35
- package/dist/cjs/components/SearchBar/SearchBar.js +0 -54
- package/dist/cjs/components/SearchBar/types.d.ts +0 -10
- package/dist/cjs/components/SideBar/SideBar.css +0 -53
- package/dist/cjs/components/SideBar/SideBar.js +0 -70
- package/dist/cjs/components/SideBar/types.d.ts +0 -8
- package/dist/cjs/components/Slider/Slider.css +0 -51
- package/dist/cjs/components/Slider/Slider.js +0 -165
- package/dist/cjs/components/Slider/SliderOwnFunctions.js +0 -11
- package/dist/cjs/components/Slider/types.d.ts +0 -13
- package/dist/cjs/hooks/useOutsideClick.js +0 -19
- package/dist/cjs/hooks/useResizeObserver.js +0 -30
- package/dist/cjs/hooks/useWindowsSize.js +0 -20
- package/dist/cjs/index.css +0 -77
- package/dist/cjs/index.d.ts +0 -14
- package/dist/cjs/languages/en-EN.js +0 -25
- package/dist/cjs/languages/es-ES.js +0 -25
- package/dist/cjs/languages/it-IT.js +0 -25
- package/dist/cjs/languages/types.d.ts +0 -22
- package/dist/cjs/mocks/ReactComponentMocksForTesting/CellChildrenMock.js +0 -13
- package/dist/cjs/mocks/ReactComponentMocksForTesting/ListElementChildrenMock.js +0 -10
- package/dist/cjs/react-app-env.d.ts +0 -1
- package/dist/cjs/setupTests.js +0 -8
- package/dist/cjs/stories/css-presets.css +0 -77
- package/dist/cjs/utils/datesArray.js +0 -23
- package/dist/cjs/utils/jsToSqlDate.js +0 -22
- package/dist/cjs/utils/monthYearString.js +0 -27
- package/dist/cjs/utils/numberOfDaysInAMonth.js +0 -12
- package/dist/cjs/utils/sqlToJsDate.js +0 -14
- package/dist/esm/Services/MulticalendarStatesAndSettings.js +0 -46
- package/dist/esm/Services/accessToken.js +0 -9
- package/dist/esm/common/constants.js +0 -5
- package/dist/esm/common/turboSuiteUrls.js +0 -7
- package/dist/esm/common/types.d.ts +0 -113
- package/dist/esm/components/ExportToExcelButton/ExportToExcelButton.css +0 -31
- package/dist/esm/components/ExportToExcelButton/ExportToExcelButton.js +0 -17
- package/dist/esm/components/ExportToExcelButton/ExportToExcelButtonOwnFunctions.js +0 -48
- package/dist/esm/components/ExportToExcelButton/types.d.ts +0 -44
- package/dist/esm/components/InputBoxWithConfirmation/InputBoxWithConfirmation.css +0 -60
- package/dist/esm/components/InputBoxWithConfirmation/InputBoxWithConfirmation.d.ts +0 -5
- package/dist/esm/components/InputBoxWithConfirmation/InputBoxWithConfirmation.js +0 -89
- package/dist/esm/components/InputBoxWithConfirmation/types.d.ts +0 -9
- package/dist/esm/components/Modal/Modal.css +0 -43
- package/dist/esm/components/Modal/Modal.js +0 -54
- package/dist/esm/components/Modal/types.d.ts +0 -8
- package/dist/esm/components/Multicalendar/Multicalendar.css +0 -191
- package/dist/esm/components/Multicalendar/Multicalendar.js +0 -341
- package/dist/esm/components/Multicalendar/MulticalendarOwnFunctions.js +0 -176
- package/dist/esm/components/Multicalendar/subcomponents/composites/CellsRow/CellsRow.css +0 -5
- package/dist/esm/components/Multicalendar/subcomponents/composites/CellsRow/CellsRow.js +0 -15
- package/dist/esm/components/Multicalendar/subcomponents/composites/CellsRow/types.d.ts +0 -11
- package/dist/esm/components/Multicalendar/subcomponents/composites/DatesGrid/DatesGrid.css +0 -7
- package/dist/esm/components/Multicalendar/subcomponents/composites/DatesGrid/DatesGrid.js +0 -15
- package/dist/esm/components/Multicalendar/subcomponents/composites/DatesGrid/types.d.ts +0 -13
- package/dist/esm/components/Multicalendar/subcomponents/composites/ListElementsColumn/ListElementsColumn.css +0 -3
- package/dist/esm/components/Multicalendar/subcomponents/composites/ListElementsColumn/ListElementsColumn.js +0 -10
- package/dist/esm/components/Multicalendar/subcomponents/composites/ListElementsColumn/types.d.ts +0 -9
- package/dist/esm/components/Multicalendar/subcomponents/individuals/Cell/Cell.css +0 -6
- package/dist/esm/components/Multicalendar/subcomponents/individuals/Cell/Cell.js +0 -7
- package/dist/esm/components/Multicalendar/subcomponents/individuals/Cell/types.d.ts +0 -10
- package/dist/esm/components/Multicalendar/subcomponents/individuals/DatesRow/DatesRow.css +0 -60
- package/dist/esm/components/Multicalendar/subcomponents/individuals/DatesRow/DatesRow.js +0 -51
- package/dist/esm/components/Multicalendar/subcomponents/individuals/DatesRow/types.d.ts +0 -11
- package/dist/esm/components/Multicalendar/subcomponents/individuals/DropdownMonthNavigation/DropdownMonthNavigation.css +0 -14
- package/dist/esm/components/Multicalendar/subcomponents/individuals/DropdownMonthNavigation/DropdownMonthNavigation.d.ts +0 -5
- package/dist/esm/components/Multicalendar/subcomponents/individuals/DropdownMonthNavigation/DropdownMonthNavigation.js +0 -8
- package/dist/esm/components/Multicalendar/subcomponents/individuals/DropdownMonthNavigation/types.d.ts +0 -5
- package/dist/esm/components/Multicalendar/subcomponents/individuals/ListElement/ListElement.css +0 -14
- package/dist/esm/components/Multicalendar/subcomponents/individuals/ListElement/ListElement.js +0 -9
- package/dist/esm/components/Multicalendar/subcomponents/individuals/ListElement/types.d.ts +0 -7
- package/dist/esm/components/Multicalendar/types.d.ts +0 -48
- package/dist/esm/components/MultipleJoinedButtonsBar/MultipleJoinedButtonsBar.css +0 -40
- package/dist/esm/components/MultipleJoinedButtonsBar/MultipleJoinedButtonsBar.js +0 -23
- package/dist/esm/components/MultipleJoinedButtonsBar/types.d.ts +0 -6
- package/dist/esm/components/ParallelSelectionList/ParallelSelectionList.css +0 -229
- package/dist/esm/components/ParallelSelectionList/ParallelSelectionList.js +0 -141
- package/dist/esm/components/ParallelSelectionList/types.d.ts +0 -22
- package/dist/esm/components/PopUp/PopUp.css +0 -15
- package/dist/esm/components/PopUp/PopUp.js +0 -22
- package/dist/esm/components/PopUp/types.d.ts +0 -9
- package/dist/esm/components/ProgressBar/ProgressBar.css +0 -39
- package/dist/esm/components/ProgressBar/ProgressBar.js +0 -31
- package/dist/esm/components/ProgressBar/types.d.ts +0 -7
- package/dist/esm/components/SearchBar/SearchBar.css +0 -35
- package/dist/esm/components/SearchBar/SearchBar.js +0 -29
- package/dist/esm/components/SearchBar/types.d.ts +0 -10
- package/dist/esm/components/SideBar/SideBar.css +0 -53
- package/dist/esm/components/SideBar/SideBar.js +0 -42
- package/dist/esm/components/SideBar/types.d.ts +0 -8
- package/dist/esm/components/Slider/Slider.css +0 -51
- package/dist/esm/components/Slider/Slider.js +0 -140
- package/dist/esm/components/Slider/SliderOwnFunctions.js +0 -6
- package/dist/esm/components/Slider/types.d.ts +0 -13
- package/dist/esm/hooks/useOutsideClick.js +0 -17
- package/dist/esm/hooks/useResizeObserver.js +0 -28
- package/dist/esm/hooks/useWindowsSize.js +0 -18
- package/dist/esm/index.css +0 -77
- package/dist/esm/index.d.ts +0 -14
- package/dist/esm/languages/en-EN.js +0 -23
- package/dist/esm/languages/es-ES.js +0 -23
- package/dist/esm/languages/it-IT.js +0 -23
- package/dist/esm/languages/types.d.ts +0 -22
- package/dist/esm/mocks/ReactComponentMocksForTesting/CellChildrenMock.js +0 -8
- package/dist/esm/mocks/ReactComponentMocksForTesting/ListElementChildrenMock.js +0 -5
- package/dist/esm/react-app-env.d.ts +0 -1
- package/dist/esm/setupTests.js +0 -6
- package/dist/esm/stories/css-presets.css +0 -77
- package/dist/esm/utils/datesArray.js +0 -21
- package/dist/esm/utils/jsToSqlDate.js +0 -20
- package/dist/esm/utils/monthYearString.js +0 -25
- package/dist/esm/utils/numberOfDaysInAMonth.js +0 -8
- package/dist/esm/utils/sqlToJsDate.js +0 -12
- /package/dist/cjs/{Services → types/Services}/MulticalendarStatesAndSettings.d.ts +0 -0
- /package/dist/cjs/{Services → types/Services}/accessToken.d.ts +0 -0
- /package/dist/cjs/{common → types/common}/constants.d.ts +0 -0
- /package/dist/cjs/{common → types/common}/turboSuiteUrls.d.ts +0 -0
- /package/dist/cjs/{components → types/components}/ExportToExcelButton/ExportToExcelButtonOwnFunctions.d.ts +0 -0
- /package/dist/cjs/{components → types/components}/Multicalendar/MulticalendarOwnFunctions.d.ts +0 -0
- /package/dist/cjs/{components → types/components}/Slider/SliderOwnFunctions.d.ts +0 -0
- /package/dist/cjs/{hooks → types/hooks}/useOutsideClick.d.ts +0 -0
- /package/dist/cjs/{hooks → types/hooks}/useResizeObserver.d.ts +0 -0
- /package/dist/cjs/{hooks → types/hooks}/useWindowsSize.d.ts +0 -0
- /package/dist/cjs/{languages → types/languages}/en-EN.d.ts +0 -0
- /package/dist/cjs/{languages → types/languages}/es-ES.d.ts +0 -0
- /package/dist/cjs/{languages → types/languages}/it-IT.d.ts +0 -0
- /package/dist/cjs/{setupTests.d.ts → types/setupTests.d.ts} +0 -0
- /package/dist/cjs/{utils → types/utils}/datesArray.d.ts +0 -0
- /package/dist/cjs/{utils → types/utils}/jsToSqlDate.d.ts +0 -0
- /package/dist/cjs/{utils → types/utils}/monthYearString.d.ts +0 -0
- /package/dist/cjs/{utils → types/utils}/numberOfDaysInAMonth.d.ts +0 -0
- /package/dist/cjs/{utils → types/utils}/sqlToJsDate.d.ts +0 -0
- /package/dist/esm/{Services → types/Services}/MulticalendarStatesAndSettings.d.ts +0 -0
- /package/dist/esm/{Services → types/Services}/accessToken.d.ts +0 -0
- /package/dist/esm/{common → types/common}/constants.d.ts +0 -0
- /package/dist/esm/{common → types/common}/turboSuiteUrls.d.ts +0 -0
- /package/dist/esm/{components → types/components}/ExportToExcelButton/ExportToExcelButtonOwnFunctions.d.ts +0 -0
- /package/dist/esm/{components → types/components}/Multicalendar/MulticalendarOwnFunctions.d.ts +0 -0
- /package/dist/esm/{components → types/components}/Slider/SliderOwnFunctions.d.ts +0 -0
- /package/dist/esm/{hooks → types/hooks}/useOutsideClick.d.ts +0 -0
- /package/dist/esm/{hooks → types/hooks}/useResizeObserver.d.ts +0 -0
- /package/dist/esm/{hooks → types/hooks}/useWindowsSize.d.ts +0 -0
- /package/dist/esm/{languages → types/languages}/en-EN.d.ts +0 -0
- /package/dist/esm/{languages → types/languages}/es-ES.d.ts +0 -0
- /package/dist/esm/{languages → types/languages}/it-IT.d.ts +0 -0
- /package/dist/esm/{setupTests.d.ts → types/setupTests.d.ts} +0 -0
- /package/dist/esm/{utils → types/utils}/datesArray.d.ts +0 -0
- /package/dist/esm/{utils → types/utils}/jsToSqlDate.d.ts +0 -0
- /package/dist/esm/{utils → types/utils}/monthYearString.d.ts +0 -0
- /package/dist/esm/{utils → types/utils}/numberOfDaysInAMonth.d.ts +0 -0
- /package/dist/esm/{utils → types/utils}/sqlToJsDate.d.ts +0 -0
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
*
|
|
4
|
-
* @param sqlDate sql date format, for example 1993-03-29
|
|
5
|
-
* @returns Date Object
|
|
6
|
-
*/
|
|
7
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
function sqlToJsDate(sqlDate) {
|
|
9
|
-
let dateArray = sqlDate.split("-");
|
|
10
|
-
//Es necesario restar 1 al mes ya que el mes de Enero comienza con el valor 0
|
|
11
|
-
let jsDate = new Date(Number(dateArray[0]), Number(dateArray[1]) - 1, Number(dateArray[2]));
|
|
12
|
-
return jsDate;
|
|
13
|
-
}
|
|
14
|
-
exports.default = sqlToJsDate;
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*
|
|
3
|
-
* @param multicalendarId id of the multicalendar (multicalendarId prop)
|
|
4
|
-
* @returns saved height scroll position of selected multicalendar
|
|
5
|
-
*/
|
|
6
|
-
export const getMulticalendarScrollTopPosition = (multicalendarId) => {
|
|
7
|
-
return sessionStorage.getItem(`MulticalendarScrollTopPosition-${multicalendarId}`);
|
|
8
|
-
};
|
|
9
|
-
/**
|
|
10
|
-
*
|
|
11
|
-
* @param multicalendarId id of the multicalendar (multicalendarId prop)
|
|
12
|
-
* @param scrollTop scroll height number
|
|
13
|
-
*/
|
|
14
|
-
export const setMulticalendarScrollTopPosition = (multicalendarId, scrollTop) => {
|
|
15
|
-
sessionStorage.setItem(`MulticalendarScrollTopPosition-${multicalendarId}`, scrollTop);
|
|
16
|
-
};
|
|
17
|
-
/**
|
|
18
|
-
*
|
|
19
|
-
* @param multicalendarId id of the multicalendar (multicalendarId prop)
|
|
20
|
-
*/
|
|
21
|
-
export const eraseMulticalendarScrollTopPosition = (multicalendarId) => {
|
|
22
|
-
sessionStorage.removeItem(`MulticalendarScrollTopPosition-${multicalendarId}`);
|
|
23
|
-
};
|
|
24
|
-
/**
|
|
25
|
-
*
|
|
26
|
-
* @param multicalendarId id of the multicalendar (multicalendarId prop)
|
|
27
|
-
* @returns saved horizontal scroll position of selected multicalendar
|
|
28
|
-
*/
|
|
29
|
-
export const getMulticalendarScrollLeftPosition = (multicalendarId) => {
|
|
30
|
-
return sessionStorage.getItem(`MulticalendarScrollLeftPosition-${multicalendarId}`);
|
|
31
|
-
};
|
|
32
|
-
/**
|
|
33
|
-
*
|
|
34
|
-
* @param multicalendarId id of the multicalendar (multicalendarId prop)
|
|
35
|
-
* @param xScroll left scroll number
|
|
36
|
-
*/
|
|
37
|
-
export const setMulticalendarScrollLeftPosition = (multicalendarId, scrollLeft) => {
|
|
38
|
-
sessionStorage.setItem(`MulticalendarScrollLeftPosition-${multicalendarId}`, scrollLeft);
|
|
39
|
-
};
|
|
40
|
-
/**
|
|
41
|
-
*
|
|
42
|
-
* @param multicalendarId id of the multicalendar (multicalendarId prop)
|
|
43
|
-
*/
|
|
44
|
-
export const eraseMulticalendarScrollLeftPosition = (multicalendarId) => {
|
|
45
|
-
sessionStorage.removeItem(`MulticalendarScrollLeftPosition-${multicalendarId}`);
|
|
46
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export const getAccessToken = () => {
|
|
2
|
-
return localStorage.getItem("access_token_turbosuite");
|
|
3
|
-
};
|
|
4
|
-
export const setAccessToken = (token) => {
|
|
5
|
-
localStorage.setItem("access_token_turbosuite", token);
|
|
6
|
-
};
|
|
7
|
-
export const eraseAccessToken = () => {
|
|
8
|
-
localStorage.removeItem("access_token_turbosuite");
|
|
9
|
-
};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export const access = window.access;
|
|
2
|
-
export const propertyManagerCode = window.propertyManagerCode;
|
|
3
|
-
export const propertyManagerLookAndFeelCode = window.propertyManagerLookAndFeelCode;
|
|
4
|
-
export const languageCode = window.languageCode;
|
|
5
|
-
export const millisecondsOfOneDay = 86400000;
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
import { languageType } from "./assets/languages/types";
|
|
2
|
-
|
|
3
|
-
export interface customWindow extends Window {
|
|
4
|
-
access: string;
|
|
5
|
-
propertyManagerCode: string;
|
|
6
|
-
propertyManagerLookAndFeelCode: string;
|
|
7
|
-
languageCode: string;
|
|
8
|
-
actionUrl: string;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export interface SagaActionParamsType<T> {
|
|
12
|
-
type: string;
|
|
13
|
-
payload: T;
|
|
14
|
-
repeatsLeft: number;
|
|
15
|
-
persistentReduxAction: string;
|
|
16
|
-
reduxError: string;
|
|
17
|
-
showErrorMessage?: boolean;
|
|
18
|
-
millisecondsWait?: number;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export interface NotificationsReducerStateType {
|
|
22
|
-
quickNotifications: QuickNotificationsType[];
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export interface lookAndFeelType {
|
|
26
|
-
code: string;
|
|
27
|
-
logoUrl: string;
|
|
28
|
-
primaryColor: string;
|
|
29
|
-
secondaryColor: string;
|
|
30
|
-
fontFamily: "Roboto" | "Bitter" | "Dosis" | "Figtree" | "Mulish" | "Nunito Sans";
|
|
31
|
-
enabled: boolean;
|
|
32
|
-
propertyManagerCode?: string;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export interface AppSettingsReducerStateType {
|
|
36
|
-
view: "multidestiny";
|
|
37
|
-
language: languageType;
|
|
38
|
-
lookAndFeel?: lookAndFeelType;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export interface DestiniesReducerStateType {
|
|
42
|
-
countries: CountryType[];
|
|
43
|
-
regions: RegionType[];
|
|
44
|
-
provinces: ProvinceType[];
|
|
45
|
-
municipalities: MunicipalityType[];
|
|
46
|
-
mixedDestinies: DestinyType[];
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
export interface DatesReducerStateType {
|
|
50
|
-
draggingOverDateCells: boolean;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
export interface QuickNotificationsType {
|
|
54
|
-
text: string;
|
|
55
|
-
creation: Date;
|
|
56
|
-
type: "info" | "error" | "ok";
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
export interface CountryType {
|
|
60
|
-
code: string;
|
|
61
|
-
name: string;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
export interface RegionType {
|
|
65
|
-
code: string;
|
|
66
|
-
name: string;
|
|
67
|
-
country: {
|
|
68
|
-
code: string;
|
|
69
|
-
name: string;
|
|
70
|
-
};
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
export interface ProvinceType {
|
|
74
|
-
code: string;
|
|
75
|
-
name: string;
|
|
76
|
-
country: {
|
|
77
|
-
code: string;
|
|
78
|
-
name: string;
|
|
79
|
-
};
|
|
80
|
-
region: {
|
|
81
|
-
code: string;
|
|
82
|
-
name: string;
|
|
83
|
-
};
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
export interface MunicipalityType {
|
|
87
|
-
code: string;
|
|
88
|
-
name: string;
|
|
89
|
-
country: {
|
|
90
|
-
code: string;
|
|
91
|
-
name: string;
|
|
92
|
-
};
|
|
93
|
-
region: {
|
|
94
|
-
code: string;
|
|
95
|
-
name: string;
|
|
96
|
-
};
|
|
97
|
-
province: {
|
|
98
|
-
code: string;
|
|
99
|
-
name: string;
|
|
100
|
-
};
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
export type DestinyType = (CountryType | RegionType | ProvinceType | MunicipalityType) & {
|
|
104
|
-
type: "country" | "region" | "province" | "municipality";
|
|
105
|
-
};
|
|
106
|
-
|
|
107
|
-
export type SeasonsType = "high" | "medium high" | "medium" | "medium low" | "low"
|
|
108
|
-
|
|
109
|
-
export type EventsType = "1" | "2" | "3"
|
|
110
|
-
|
|
111
|
-
export type HolidaysType = "1" | "2" | "3"
|
|
112
|
-
|
|
113
|
-
export type OccupationsType = "high" | "medium" | "low"
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
.export-to-excel-button {
|
|
2
|
-
position: relative;
|
|
3
|
-
width: 220px;
|
|
4
|
-
height: 48px;
|
|
5
|
-
opacity: 1;
|
|
6
|
-
cursor: pointer;
|
|
7
|
-
padding: 14px;
|
|
8
|
-
text-align: center;
|
|
9
|
-
text-decoration: none;
|
|
10
|
-
touch-action: manipulation;
|
|
11
|
-
font-size: 16px;
|
|
12
|
-
letter-spacing: normal;
|
|
13
|
-
color: rgb(255, 255, 255);
|
|
14
|
-
font-weight: 700;
|
|
15
|
-
border-radius: 4px;
|
|
16
|
-
border: none;
|
|
17
|
-
background: green;
|
|
18
|
-
box-shadow: none;
|
|
19
|
-
transition: all 0.5s;
|
|
20
|
-
display: flex;
|
|
21
|
-
align-items: center;
|
|
22
|
-
justify-content: space-evenly;
|
|
23
|
-
margin: auto;
|
|
24
|
-
}
|
|
25
|
-
.export-to-excel-button:hover {
|
|
26
|
-
background: rgb(0, 170, 0);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.export-to-excel-button:disabled {
|
|
30
|
-
background: rgb(216, 216, 216);
|
|
31
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import * as ownFunctions from "./ExportToExcelButtonOwnFunctions";
|
|
3
|
-
import "./ExportToExcelButton.css";
|
|
4
|
-
//Iconos
|
|
5
|
-
import { RiFileExcel2Fill } from "react-icons/ri";
|
|
6
|
-
const ExportToExcelButton = ({ customButtonText = "Export to Excel", customClass, fileName = "untitled", headers, data, onAfterExport, disabled, }) => {
|
|
7
|
-
return (React.createElement("button", { disabled: disabled, className: customClass ? customClass : "export-to-excel-button", onClick: () => {
|
|
8
|
-
ownFunctions.downloadExcel(fileName, data, headers);
|
|
9
|
-
if (onAfterExport !== undefined) {
|
|
10
|
-
onAfterExport();
|
|
11
|
-
}
|
|
12
|
-
} },
|
|
13
|
-
customButtonText,
|
|
14
|
-
" ",
|
|
15
|
-
React.createElement(RiFileExcel2Fill, null)));
|
|
16
|
-
};
|
|
17
|
-
export default ExportToExcelButton;
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
//Librerias de terceros
|
|
2
|
-
import * as XLSX from "xlsx-js-style";
|
|
3
|
-
function styleObjectParser(styleObject) {
|
|
4
|
-
let restultantStyleObject = {
|
|
5
|
-
v: styleObject.value,
|
|
6
|
-
s: {},
|
|
7
|
-
};
|
|
8
|
-
if (styleObject.allign)
|
|
9
|
-
restultantStyleObject.s.alignment = Object.assign({}, styleObject.allign);
|
|
10
|
-
if (styleObject.fontSize)
|
|
11
|
-
restultantStyleObject.s.font = Object.assign(Object.assign({}, restultantStyleObject.s.font), { sz: styleObject.fontSize });
|
|
12
|
-
if (styleObject.fontColor)
|
|
13
|
-
restultantStyleObject.s.font = Object.assign(Object.assign({}, restultantStyleObject.s.font), { color: { rgb: styleObject.fontColor } });
|
|
14
|
-
if (styleObject.bold)
|
|
15
|
-
restultantStyleObject.s.font = Object.assign(Object.assign({}, restultantStyleObject.s.font), { bold: styleObject.bold });
|
|
16
|
-
if (styleObject.backgroundColor)
|
|
17
|
-
restultantStyleObject.s.fill = Object.assign(Object.assign({}, restultantStyleObject.s.fill), { bgColor: { rgb: styleObject.backgroundColor } });
|
|
18
|
-
if (styleObject.foregroundColor)
|
|
19
|
-
restultantStyleObject.s.fill = Object.assign(Object.assign({}, restultantStyleObject.s.fill), { fgColor: { rgb: styleObject.foregroundColor } });
|
|
20
|
-
if (styleObject.borders)
|
|
21
|
-
restultantStyleObject.s.border = Object.assign({}, styleObject.borders);
|
|
22
|
-
return restultantStyleObject;
|
|
23
|
-
}
|
|
24
|
-
export function downloadExcel(fileName, data, headers) {
|
|
25
|
-
if (data !== undefined) {
|
|
26
|
-
const workbook = XLSX.utils.book_new();
|
|
27
|
-
for (const sheetName in data) {
|
|
28
|
-
if (Object.prototype.hasOwnProperty.call(data, sheetName)) {
|
|
29
|
-
let dataXlsxJs = [];
|
|
30
|
-
if (headers !== undefined &&
|
|
31
|
-
Object.prototype.hasOwnProperty.call(headers, sheetName)) {
|
|
32
|
-
dataXlsxJs = [
|
|
33
|
-
headers[sheetName].map((header) => styleObjectParser(header)),
|
|
34
|
-
...data[sheetName].map((row) => row.map((cell) => styleObjectParser(cell))),
|
|
35
|
-
];
|
|
36
|
-
}
|
|
37
|
-
else {
|
|
38
|
-
dataXlsxJs = [
|
|
39
|
-
...data[sheetName].map((row) => row.map((cell) => styleObjectParser(cell))),
|
|
40
|
-
];
|
|
41
|
-
}
|
|
42
|
-
const worksheet = XLSX.utils.aoa_to_sheet(dataXlsxJs);
|
|
43
|
-
XLSX.utils.book_append_sheet(workbook, worksheet, sheetName);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
XLSX.writeFile(workbook, `${fileName}.xlsx`);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
export interface ExportToExcelButtonPropsType {
|
|
2
|
-
customButtonText?: string;
|
|
3
|
-
customClass?: string;
|
|
4
|
-
fileName?: string;
|
|
5
|
-
headers?: { [key: string]: DataObjectXlsxType[] };
|
|
6
|
-
data?: { [key: string]: DataObjectXlsxType[][] };
|
|
7
|
-
onAfterExport?: Function;
|
|
8
|
-
disabled?: boolean;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export interface StyleObjectXlsxType {
|
|
12
|
-
allign?: {
|
|
13
|
-
vertical: "top" | "center" | "bottom";
|
|
14
|
-
horizontal: "left" | "center" | "right";
|
|
15
|
-
};
|
|
16
|
-
fontSize?: number;
|
|
17
|
-
fontColor?: string;
|
|
18
|
-
bold?: boolean;
|
|
19
|
-
backgroundColor?: string;
|
|
20
|
-
foregroundColor?: string;
|
|
21
|
-
borders?: {
|
|
22
|
-
top?: { style: BorderStyleType; color: string };
|
|
23
|
-
bottom?: { style: BorderStyleType; color: string };
|
|
24
|
-
left?: { style: BorderStyleType; color: string };
|
|
25
|
-
right?: { style: BorderStyleType; color: string };
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
export interface DataObjectXlsxType extends StyleObjectXlsxType {
|
|
29
|
-
value: string | number;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
type BorderStyleType =
|
|
33
|
-
| "dashDotDot"
|
|
34
|
-
| "dashDot"
|
|
35
|
-
| "dashed"
|
|
36
|
-
| "dotted"
|
|
37
|
-
| "hair"
|
|
38
|
-
| "mediumDashDotDot"
|
|
39
|
-
| "mediumDashDot"
|
|
40
|
-
| "mediumDashed"
|
|
41
|
-
| "medium"
|
|
42
|
-
| "slantDashDot"
|
|
43
|
-
| "thick"
|
|
44
|
-
| "thin";
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
.div-wrapper-input-box-with-confirmation {
|
|
2
|
-
position: relative;
|
|
3
|
-
display: flex;
|
|
4
|
-
align-items: center;
|
|
5
|
-
justify-content: center;
|
|
6
|
-
border: solid 1px rgb(184, 184, 184);
|
|
7
|
-
background-color: rgb(250, 250, 250);
|
|
8
|
-
border-radius: 8px;
|
|
9
|
-
transition: border 0.3s;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.div-wrapper-input-box-with-confirmation.focused {
|
|
13
|
-
border-color: var(--primary-color);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.div-wrapper-input-box-with-confirmation .input-box-with-confirmation {
|
|
17
|
-
box-sizing: border-box;
|
|
18
|
-
padding: 10px 2ch;
|
|
19
|
-
min-width: 10ch;
|
|
20
|
-
text-align: center;
|
|
21
|
-
border: none;
|
|
22
|
-
background-color: transparent;
|
|
23
|
-
font-size: 16px;
|
|
24
|
-
font-weight: 600;
|
|
25
|
-
color: dimgray;
|
|
26
|
-
transition: all 0.2s;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.div-wrapper-input-box-with-confirmation
|
|
30
|
-
.input-box-with-confirmation::-webkit-inner-spin-button {
|
|
31
|
-
display: none;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.div-wrapper-input-box-with-confirmation .input-box-with-confirmation:focus,
|
|
35
|
-
.div-wrapper-input-box-with-confirmation .button-for-input-box-with-confirmation:focus {
|
|
36
|
-
outline: none;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.div-wrapper-input-box-with-confirmation .input-box-with-confirmation:focus{
|
|
40
|
-
color: rgb(37, 37, 37);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.div-wrapper-input-box-with-confirmation .button-for-input-box-with-confirmation {
|
|
44
|
-
position: absolute;
|
|
45
|
-
right: 0px;
|
|
46
|
-
background-color: transparent;
|
|
47
|
-
color: rgb(158, 158, 158);
|
|
48
|
-
width: 32px;
|
|
49
|
-
height: 32px;
|
|
50
|
-
border-radius: 16px;
|
|
51
|
-
font-size: 16px;
|
|
52
|
-
border: none;
|
|
53
|
-
cursor: pointer;
|
|
54
|
-
transition: all 0.2s;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.div-wrapper-input-box-with-confirmation .button-for-input-box-with-confirmation:hover {
|
|
58
|
-
background-color: rgb(241, 241, 241);
|
|
59
|
-
color: var(--primary-color);
|
|
60
|
-
}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import "./InputBoxWithConfirmation.css";
|
|
3
|
-
import { InputBoxWithConfirmationPropsType } from "./types";
|
|
4
|
-
declare const InputBoxWithConfirmation: ({ onConfirmAction, inputType, minimumValue, maximumValue, aditionalClass, defaultValue, showConfirmationButton, }: InputBoxWithConfirmationPropsType) => JSX.Element;
|
|
5
|
-
export default InputBoxWithConfirmation;
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import React, { useState, useRef, Fragment } from "react";
|
|
2
|
-
import "./InputBoxWithConfirmation.css";
|
|
3
|
-
//Hooks
|
|
4
|
-
import useOutsideClick from "../../hooks/useOutsideClick";
|
|
5
|
-
//Icons
|
|
6
|
-
import { BsCheckLg, BsPencil } from "react-icons/bs";
|
|
7
|
-
const InputBoxWithConfirmation = ({ onConfirmAction, inputType = "text", minimumValue = "", maximumValue = "", aditionalClass, defaultValue, showConfirmationButton, }) => {
|
|
8
|
-
//Refs
|
|
9
|
-
const inputRef = useRef(null);
|
|
10
|
-
const containerRef = useRef(null);
|
|
11
|
-
//States
|
|
12
|
-
const [cachedValue, setCachedValue] = useState(String(defaultValue));
|
|
13
|
-
const [currentValue, setCurrentValue] = useState(String(defaultValue));
|
|
14
|
-
const [focused, setFocused] = useState(false);
|
|
15
|
-
//Hooks
|
|
16
|
-
useOutsideClick(containerRef, () => {
|
|
17
|
-
if (showConfirmationButton) {
|
|
18
|
-
setCurrentValue(cachedValue);
|
|
19
|
-
}
|
|
20
|
-
else {
|
|
21
|
-
if (currentValue) {
|
|
22
|
-
onConfirmAction(currentValue);
|
|
23
|
-
setCachedValue(currentValue);
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
setFocused(false);
|
|
27
|
-
});
|
|
28
|
-
//Variables
|
|
29
|
-
return (React.createElement("div", { ref: containerRef, className: `div-wrapper-input-box-with-confirmation ${focused ? "focused" : ""} ${aditionalClass ? aditionalClass : ""}` },
|
|
30
|
-
React.createElement("input", { ref: inputRef, className: "input-box-with-confirmation", type: inputType, style: { width: `${((currentValue === null || currentValue === void 0 ? void 0 : currentValue.length) ? currentValue.length : 0) + 7}ch` }, min: minimumValue, max: maximumValue, value: focused ? currentValue : cachedValue, onChange: (event) => {
|
|
31
|
-
if (inputType === "number") {
|
|
32
|
-
let numericValue = Number(event.target.value);
|
|
33
|
-
if (minimumValue !== "" && numericValue < Number(minimumValue)) {
|
|
34
|
-
numericValue = Number(minimumValue);
|
|
35
|
-
}
|
|
36
|
-
else if (maximumValue !== "" && numericValue > Number(maximumValue)) {
|
|
37
|
-
numericValue = Number(maximumValue);
|
|
38
|
-
}
|
|
39
|
-
setCurrentValue(String(numericValue));
|
|
40
|
-
}
|
|
41
|
-
setCurrentValue(event.target.value);
|
|
42
|
-
}, onFocus: (event) => {
|
|
43
|
-
setCachedValue(event.target.value);
|
|
44
|
-
setCurrentValue(event.target.value);
|
|
45
|
-
setFocused(true);
|
|
46
|
-
}, onKeyDown: (event) => {
|
|
47
|
-
if (event.key === "Enter") {
|
|
48
|
-
if (currentValue) {
|
|
49
|
-
onConfirmAction(currentValue);
|
|
50
|
-
setCachedValue(currentValue);
|
|
51
|
-
}
|
|
52
|
-
setFocused(false);
|
|
53
|
-
if (inputRef.current) {
|
|
54
|
-
inputRef.current.blur();
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
else if (event.key === "Tab") {
|
|
58
|
-
if (currentValue) {
|
|
59
|
-
onConfirmAction(currentValue);
|
|
60
|
-
setCachedValue(currentValue);
|
|
61
|
-
}
|
|
62
|
-
setFocused(false);
|
|
63
|
-
if (inputRef.current) {
|
|
64
|
-
inputRef.current.blur();
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
else if (event.key === "Escape") {
|
|
68
|
-
setCurrentValue(cachedValue);
|
|
69
|
-
setFocused(false);
|
|
70
|
-
if (inputRef.current) {
|
|
71
|
-
inputRef.current.blur();
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
} }),
|
|
75
|
-
showConfirmationButton && (React.createElement(Fragment, null, focused ? (React.createElement("button", { className: "button-for-input-box-with-confirmation", onClick: () => {
|
|
76
|
-
if (currentValue) {
|
|
77
|
-
onConfirmAction(currentValue);
|
|
78
|
-
setCachedValue(currentValue);
|
|
79
|
-
}
|
|
80
|
-
setFocused(false);
|
|
81
|
-
} },
|
|
82
|
-
React.createElement(BsCheckLg, null))) : (React.createElement("button", { className: "button-for-input-box-with-confirmation", onClick: () => {
|
|
83
|
-
if (inputRef.current) {
|
|
84
|
-
inputRef.current.focus();
|
|
85
|
-
}
|
|
86
|
-
} },
|
|
87
|
-
React.createElement(BsPencil, null)))))));
|
|
88
|
-
};
|
|
89
|
-
export default InputBoxWithConfirmation;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export interface InputBoxWithConfirmationPropsType {
|
|
2
|
-
onConfirmAction: (inputCurrentValue: string) => void;
|
|
3
|
-
inputType?: "text" | "number";
|
|
4
|
-
minimumValue?: HTMLInputElement["min"],
|
|
5
|
-
maximumValue?: HTMLInputElement["max"],
|
|
6
|
-
aditionalClass?: string;
|
|
7
|
-
defaultValue?: string | number;
|
|
8
|
-
showConfirmationButton?: boolean;
|
|
9
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
.modal,
|
|
2
|
-
.close-modal {
|
|
3
|
-
position: fixed;
|
|
4
|
-
width: 100vw;
|
|
5
|
-
height: 100vh;
|
|
6
|
-
backdrop-filter: blur(10px);
|
|
7
|
-
top: 0;
|
|
8
|
-
left: 0;
|
|
9
|
-
z-index: 10;
|
|
10
|
-
display: flex;
|
|
11
|
-
justify-content: center;
|
|
12
|
-
align-items: center;
|
|
13
|
-
animation-name: modal;
|
|
14
|
-
animation-duration: 500ms;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.close-modal {
|
|
18
|
-
animation-name: close-modal;
|
|
19
|
-
animation-duration: 500ms;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
@keyframes modal {
|
|
23
|
-
from {
|
|
24
|
-
backdrop-filter: none;
|
|
25
|
-
opacity: 0;
|
|
26
|
-
}
|
|
27
|
-
to {
|
|
28
|
-
backdrop-filter: blur(10px);
|
|
29
|
-
opacity: 1;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
@keyframes close-modal {
|
|
34
|
-
from {
|
|
35
|
-
backdrop-filter: blur(10px);
|
|
36
|
-
opacity: 1;
|
|
37
|
-
}
|
|
38
|
-
to {
|
|
39
|
-
backdrop-filter: none;
|
|
40
|
-
opacity: 0;
|
|
41
|
-
display: none;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import React, { useState, useEffect, useRef } from "react";
|
|
2
|
-
import ReactDOM from "react-dom";
|
|
3
|
-
import "./Modal.css";
|
|
4
|
-
//Hooks
|
|
5
|
-
import useOutsideClick from "../../hooks/useOutsideClick";
|
|
6
|
-
const Modal = ({ children, visibility, forced = false, onOpen, onClose, transitionTime = 500, }) => {
|
|
7
|
-
//Refs
|
|
8
|
-
const modalRef = useRef(null);
|
|
9
|
-
//Estados
|
|
10
|
-
const [visible, setVisible] = useState(visibility);
|
|
11
|
-
//Hooks
|
|
12
|
-
useOutsideClick(modalRef, () => {
|
|
13
|
-
if (modalRef.current !== null && !forced) {
|
|
14
|
-
modalRef.current.className = "close-modal";
|
|
15
|
-
setTimeout(() => {
|
|
16
|
-
setVisible(false);
|
|
17
|
-
if (onClose)
|
|
18
|
-
onClose();
|
|
19
|
-
}, transitionTime - 50);
|
|
20
|
-
}
|
|
21
|
-
});
|
|
22
|
-
//UseEffect
|
|
23
|
-
useEffect(() => {
|
|
24
|
-
if (visibility) {
|
|
25
|
-
setVisible(true);
|
|
26
|
-
if (onOpen)
|
|
27
|
-
onOpen();
|
|
28
|
-
}
|
|
29
|
-
else if (!visibility) {
|
|
30
|
-
setTimeout(() => {
|
|
31
|
-
setVisible(false);
|
|
32
|
-
if (onClose)
|
|
33
|
-
onClose();
|
|
34
|
-
}, transitionTime - 50);
|
|
35
|
-
}
|
|
36
|
-
}, [visibility, transitionTime, onOpen, onClose]);
|
|
37
|
-
//Render
|
|
38
|
-
if (visible) {
|
|
39
|
-
return ReactDOM.createPortal(React.createElement("div", { ref: modalRef, className: visibility ? "modal" : "close-modal", style: { animationDuration: `${transitionTime}ms` }, onClick: (event) => {
|
|
40
|
-
if (event.target.id === "modal" && !forced) {
|
|
41
|
-
event.target.id = "close-modal";
|
|
42
|
-
setTimeout(() => {
|
|
43
|
-
setVisible(false);
|
|
44
|
-
if (onClose)
|
|
45
|
-
onClose();
|
|
46
|
-
}, transitionTime - 50);
|
|
47
|
-
}
|
|
48
|
-
} }, children), document.body);
|
|
49
|
-
}
|
|
50
|
-
else {
|
|
51
|
-
return React.createElement(React.Fragment, null);
|
|
52
|
-
}
|
|
53
|
-
};
|
|
54
|
-
export default Modal;
|