WebchatWidget
WebchatWidget copied to clipboard
feature/20929 refactor and move date picker and moment
This PR deletes the local copied react-flatpickr and reuses it via NPM package. It replaces Moment with Intl in the code and adds some tests to verify the date format is still the same.
Moment is now included as a dev dependency for comparing the outputs, reducing the uncompressed file size of date-picker.webchat-plugin.legacy.js from 477,8kb to 159,5kb and a compressed version with 30,3kb.
How to test:
- Create a flow with a date picker
- Test each configuration option
- run "npm run test"
- Everything should still work the way it did before