WebchatWidget icon indicating copy to clipboard operation
WebchatWidget copied to clipboard

feature/20929 refactor and move date picker and moment

Open cbuchwald opened this issue 3 years ago • 2 comments

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:

  1. Create a flow with a date picker
  2. Test each configuration option
  3. run "npm run test"
  4. Everything should still work the way it did before

cbuchwald avatar Jan 13 '22 23:01 cbuchwald