fix(SW-2801): Added lang specific date formats
* fix(SW-2801): Added lang specific date formats
* fix: wrong type import
Approved-by: Michael Zetterberg
fix: as a temporary fix hide booking code switcher and add a way to do a search without bookingcode
* fix: as a temporary fix hide booking code switcher and add a way to do a search without bookingcode
Approved-by: Linus Flood
Fix: refactor booking flow search params
* wip: apply codemod and upgrade swc plugin
* wip: design-system to react 19, fix issues from async (search)params
* Prepare new parse function for booking flow search params
* Prepare serialize function for booking flow search params
* Improve handling of comma separated arrays
* Slightly refactor for readability
* Next abstracts URLSearchParams so handle the abstraction instead
* Refactor booking widget to use new search params parsing
* Rename search param functions
* Refactor select-hotel to use new search param parser
* Use new search params parser in select-rate and details
* Fix hotelId type
* Avoid passing down search params into BookingWidget components
* More updates to use new types instead of SearchParams<T>
* Remove types SelectHotelSearchParams and AlternativeSelectHotelSearchParams
* Fix parseBookingWidgetSearchParams return type
* Add error handling to booking search param parsers
* Fix modifyRateIndex handling in details page
* Clean up
* Refactor booking widget search param serializing to util function
* Move start page booking widget search param parsing to page
* Use new search param serializer in HandleErrorCallback
* Delete convertSearchParamsToObj & convertObjToSearchParams
Approved-by: Michael Zetterberg
Fix: (#SW-2663) bookingwidget mobile - Space around, border-radius and correct color on date field
* fix: booking widget mobile - padding around booking widget and date color
* Fixed rounded corners
* Reduced minimum size of column
Approved-by: Joakim Jäderberg
* fix(SW-2682): Added overflow-y: hidden to body on destination and hotel map pages
* fix(SW-2682): Added scroll to top functionality on map components with reason why
Approved-by: Matilda Landström
fix: when floating booking widget is sticky let it have white background all the way out. SW-2427
* fix: when floating booking widget is sticky let it have white background all the way out.
Resolves SW-2427
* pr: move styling variants to it's own file
Approved-by: Christian Andolf
Feature/autocomplete search
* wip autocomplete search
* add skeletons to loading
* Using aumlauts/accents when searching will still give results
remove unused reducer
sort autocomplete results
* remove testcode
* Add tests for autocomplete
* cleanup tests
* use node@20
* use node 22
* use node22
* merge
fix: search button outside of viewport
* merge
* remove more unused code
* fix: error message when empty search field in booking widget
* fix: don't display empty white box when search field is empty and no searchHistory is present
* merge
* fix: set height of shimmer for search skeleton
* rename autocomplete trpc -> destinationsAutocomplete
* more accute cache key naming
* fix: able to control wether bookingwidget is visible on startPage
fix: sticky booking widget under alert
* remove unused code
* fix: skeletons
fix: error overlay on search startpage
* remove extra .nvmrc
* merge
Approved-by: Linus Flood
SW-2121: Fix issue where closing SidePeeks would trigger other click events
* fix: replace div with Button in BookingWidget to align press events
* fix: replace div with Button in ImageGallery to align press events
Approved-by: Michael Zetterberg
Feature/SW-1736 floating booking widget
* feature: Add floating booking widget on start page SW-1736
* fix: Make sure we don't try to use IntersectionObserver on the server
* fix: make sure that we disconnect the intersectionobserver when dismounting
* fix: pass searchparams to floating bookingwidget
Approved-by: Michael Zetterberg
Switches out all the old icons to new ones, and moves them to the design system. The new icons are of three different types: Materialise Symbol, Nucleo, and Customized. Also adds further mapping between facilities/amenities and icons.
Approved-by: Michael Zetterberg
Approved-by: Erik Tiekstra
Fix: Error message when copy fail. Null check on localstorage. Removed Intl from global-error.tsx
* Error message if failed to copy
* Use try/catch instead
Approved-by: Joakim Jäderberg
fix: switch to using useQuery over useSuspenseQuery for booking widget
* fix: switch to using useQuery over useSuspenseQuery for booking widget
Approved-by: Linus Flood
Move more of BookingWidget to client SW-1639
* feat: move getLocations in booking widget to client side so that it's also cached on the client reducing the blinking when switching urls (and reducing duplicate calls)
Approved-by: Linus Flood
Migrate to a monorepo setup - step 1
* Move web to subfolder /apps/scandic-web
* Yarn + transitive deps
- Move to yarn
- design-system package removed for now since yarn doesn't
support the parameter for token (ie project currently broken)
- Add missing transitive dependencies as Yarn otherwise
prevents these imports
- VS Code doesn't pick up TS path aliases unless you open
/apps/scandic-web instead of root (will be fixed with monorepo)
* Pin framer-motion to temporarily fix typing issue
https://github.com/adobe/react-spectrum/issues/7494
* Pin zod to avoid typ error
There seems to have been a breaking change in the types
returned by zod where error is now returned as undefined
instead of missing in the type. We should just handle this
but to avoid merge conflicts just pin the dependency for
now.
* Pin react-intl version
Pin version of react-intl to avoid tiny type issue where formatMessage
does not accept a generic any more. This will be fixed in a future
commit, but to avoid merge conflicts just pin for now.
* Pin typescript version
Temporarily pin version as newer versions as stricter and results in
a type error. Will be fixed in future commit after merge.
* Setup workspaces
* Add design-system as a monorepo package
* Remove unused env var DESIGN_SYSTEM_ACCESS_TOKEN
* Fix husky for monorepo setup
* Update netlify.toml
* Add lint script to root package.json
* Add stub readme
* Fix react-intl formatMessage types
* Test netlify.toml in root
* Remove root toml
* Update netlify.toml publish path
* Remove package-lock.json
* Update build for branch/preview builds
Approved-by: Linus Flood