@defra/flood-webchat 1.0.11 → 1.0.19
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/dist/client.js +1 -1
- package/dist/server.js +1 -1
- package/docs/development-guide.md +1 -1
- package/package.json +43 -41
- package/src/client/components/availability/availability.jsx +1 -11
- package/src/client/components/availability/availability.scss +7 -2
- package/src/client/components/chat/chat.jsx +8 -11
- package/src/client/components/chat/chat.scss +14 -6
- package/src/client/components/panel/panel.scss +7 -2
- package/src/client/lib/history.js +0 -4
- package/src/client/store/AppProvider.jsx +1 -2
- package/src/client/store/actions-map.js +1 -2
- package/src/client/store/constants.js +0 -1
- package/src/server/lib/client.js +1 -1
- package/src/server/lib/utils.js +1 -7
- package/test.txt +6419 -0
|
@@ -2,4 +2,3 @@ export const SETTINGS_STORAGE_KEY = 'webchat_settings'
|
|
|
2
2
|
export const CUSTOMER_ID_STORAGE_KEY = 'webchat_customer_id'
|
|
3
3
|
export const THREAD_ID_STORAGE_KEY = 'webchat_thread_id'
|
|
4
4
|
export const TYPING_INDICATOR_DURATION = 4000
|
|
5
|
-
export const MESSAGES_UNSEEN_COUNT = 'message_unseen_count'
|
package/src/server/lib/client.js
CHANGED
package/src/server/lib/utils.js
CHANGED
|
@@ -18,12 +18,6 @@ const isWithinHours = (days, date) => {
|
|
|
18
18
|
return now.diff(todaysDateTimeOpen).milliseconds >= 0 && now.diff(todaysDateTimeClose).milliseconds <= 0
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
const stripPageTitle = title => {
|
|
22
|
-
const prefixPattern = /^\(\d+ new messages?\) - /
|
|
23
|
-
return title.replace(prefixPattern, '')
|
|
24
|
-
}
|
|
25
|
-
|
|
26
21
|
module.exports = {
|
|
27
|
-
isWithinHours
|
|
28
|
-
stripPageTitle
|
|
22
|
+
isWithinHours
|
|
29
23
|
}
|