@defra/flood-webchat 0.0.1-alpha.10 → 0.0.1-alpha.12

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.
Files changed (38) hide show
  1. package/README.md +1 -83
  2. package/dist/client.js +445 -0
  3. package/dist/client.js.map +1 -0
  4. package/dist/server.js +363 -0
  5. package/dist/server.js.map +1 -0
  6. package/docs/development-guide.md +1 -2
  7. package/jest.config.mjs +29 -0
  8. package/main.scss +5 -741
  9. package/package.json +19 -15
  10. package/src/client/components/availability/availability.jsx +101 -0
  11. package/src/client/components/availability/availability.scss +89 -0
  12. package/src/client/index.jsx +16 -0
  13. package/src/client/lib/check-availability.js +7 -0
  14. package/src/client/lib/classnames.js +1 -0
  15. package/src/client/lib/external-stores.js +4 -0
  16. package/src/client/lib/external-sync-store.js +42 -0
  17. package/src/server/index.js +11 -6
  18. package/src/server/{client.js → lib/client.js} +32 -12
  19. package/src/server/lib/utils.js +15 -0
  20. package/webpack.config.mjs +32 -0
  21. package/assets/audio/notification.mp3 +0 -0
  22. package/babel.config.cjs +0 -3
  23. package/dist/templates.js +0 -554
  24. package/src/client/index.js +0 -14
  25. package/src/client/lib/availability.js +0 -75
  26. package/src/client/lib/config.js +0 -17
  27. package/src/client/lib/keyboard.js +0 -149
  28. package/src/client/lib/notification.js +0 -59
  29. package/src/client/lib/nunjucks.js +0 -3
  30. package/src/client/lib/panel.js +0 -293
  31. package/src/client/lib/provider.js +0 -11
  32. package/src/client/lib/skiplink.js +0 -27
  33. package/src/client/lib/state.js +0 -82
  34. package/src/client/lib/transcript.js +0 -34
  35. package/src/client/lib/utils.js +0 -190
  36. package/src/client/lib/webchat.js +0 -1073
  37. package/src/server/utils.js +0 -19
  38. package/src/style/_mixins.scss +0 -13
@@ -2,5 +2,4 @@
2
2
 
3
3
  1) Clone the repo
4
4
  2) Run `npm install` to install the dependencies.
5
- 3) Create a `.env` file in the root of the project (variables are with our other secrets under `node/configLocal/flood-webchat.env`)
6
- 4) Run `npm run dev` to run a demo server with hot module reloading on http://localhost:9000.
5
+ 3) Run `npm run dev` to run a demo server with hot module reloading on http://localhost:9000.
@@ -0,0 +1,29 @@
1
+ /**
2
+ * For a detailed explanation regarding each configuration property, visit:
3
+ * https://jestjs.io/docs/configuration
4
+ */
5
+
6
+ /** @type {import('jest').Config} */
7
+ const config = {
8
+ collectCoverage: true,
9
+ coverageDirectory: 'coverage',
10
+ transform: {
11
+ '\\.jsx?$': 'babel-jest',
12
+ '\\.mjs$': 'babel-jest'
13
+ },
14
+ projects: [
15
+ {
16
+ displayName: 'client-side',
17
+ testEnvironment: 'jsdom',
18
+ testMatch: ['**/__tests__/client/**/*.?(m)js?(x)'],
19
+ transformIgnorePatterns: []
20
+ },
21
+ {
22
+ displayName: 'server-side',
23
+ testEnvironment: 'node',
24
+ testMatch: ['**/__tests__/server/**/*.?(m)js?(x)']
25
+ }
26
+ ]
27
+ }
28
+
29
+ export default config