@microsoft/omnichannel-chat-widget 1.7.8-main.9e74278 → 1.7.8-main.ab4d3b4

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 (48) hide show
  1. package/lib/cjs/common/telemetry/TelemetryConstants.js +9 -0
  2. package/lib/cjs/components/chatbuttonstateful/ChatButtonStateful.js +4 -5
  3. package/lib/cjs/components/headerstateful/HeaderStateful.js +3 -5
  4. package/lib/cjs/components/livechatwidget/common/ActivitySubscriber/BotAuthActivitySubscriber.js +4 -1
  5. package/lib/cjs/components/livechatwidget/common/chatDisconnectHelper.js +3 -1
  6. package/lib/cjs/components/livechatwidget/common/endChat.js +4 -18
  7. package/lib/cjs/components/livechatwidget/common/startChat.js +2 -0
  8. package/lib/cjs/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +17 -11
  9. package/lib/cjs/components/ooohpanestateful/OOOHPaneStateful.js +9 -3
  10. package/lib/cjs/components/postchatsurveypanestateful/PostChatSurveyPaneStateful.js +22 -6
  11. package/lib/cjs/components/postchatsurveypanestateful/common/isValidSurveyUrl.js +28 -0
  12. package/lib/cjs/components/webchatcontainerstateful/WebChatContainerStateful.js +4 -3
  13. package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/DeliveredTimestamp.js +4 -0
  14. package/lib/cjs/contexts/common/LiveChatWidgetContextInitialState.js +18 -6
  15. package/lib/cjs/firstresponselatency/Constants.js +13 -0
  16. package/lib/cjs/firstresponselatency/FirstMessageTrackerFromBot.js +118 -0
  17. package/lib/cjs/firstresponselatency/FirstResponseLatencyTracker.js +179 -0
  18. package/lib/cjs/firstresponselatency/util.js +98 -0
  19. package/lib/cjs/plugins/createChatTranscript.js +4 -4
  20. package/lib/cjs/plugins/newMessageEventHandler.js +102 -88
  21. package/lib/esm/common/telemetry/TelemetryConstants.js +9 -0
  22. package/lib/esm/components/chatbuttonstateful/ChatButtonStateful.js +4 -5
  23. package/lib/esm/components/headerstateful/HeaderStateful.js +3 -5
  24. package/lib/esm/components/livechatwidget/common/ActivitySubscriber/BotAuthActivitySubscriber.js +4 -1
  25. package/lib/esm/components/livechatwidget/common/chatDisconnectHelper.js +3 -1
  26. package/lib/esm/components/livechatwidget/common/endChat.js +4 -18
  27. package/lib/esm/components/livechatwidget/common/startChat.js +2 -0
  28. package/lib/esm/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +17 -11
  29. package/lib/esm/components/ooohpanestateful/OOOHPaneStateful.js +9 -3
  30. package/lib/esm/components/postchatsurveypanestateful/PostChatSurveyPaneStateful.js +22 -6
  31. package/lib/esm/components/postchatsurveypanestateful/common/isValidSurveyUrl.js +21 -0
  32. package/lib/esm/components/webchatcontainerstateful/WebChatContainerStateful.js +4 -3
  33. package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/DeliveredTimestamp.js +4 -0
  34. package/lib/esm/contexts/common/LiveChatWidgetContextInitialState.js +18 -6
  35. package/lib/esm/firstresponselatency/Constants.js +6 -0
  36. package/lib/esm/firstresponselatency/FirstMessageTrackerFromBot.js +112 -0
  37. package/lib/esm/firstresponselatency/FirstResponseLatencyTracker.js +172 -0
  38. package/lib/esm/firstresponselatency/util.js +87 -0
  39. package/lib/esm/plugins/createChatTranscript.js +4 -4
  40. package/lib/esm/plugins/newMessageEventHandler.js +100 -86
  41. package/lib/types/common/telemetry/TelemetryConstants.d.ts +10 -1
  42. package/lib/types/components/postchatsurveypanestateful/common/isValidSurveyUrl.d.ts +2 -0
  43. package/lib/types/contexts/common/ILiveChatWidgetContext.d.ts +1 -1
  44. package/lib/types/firstresponselatency/Constants.d.ts +30 -0
  45. package/lib/types/firstresponselatency/FirstMessageTrackerFromBot.d.ts +1 -0
  46. package/lib/types/firstresponselatency/FirstResponseLatencyTracker.d.ts +22 -0
  47. package/lib/types/firstresponselatency/util.d.ts +7 -0
  48. package/package.json +13 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@microsoft/omnichannel-chat-widget",
3
- "version": "1.7.8-main.9e74278",
3
+ "version": "1.7.8-main.ab4d3b4",
4
4
  "description": "Microsoft Omnichannel Chat Widget",
5
5
  "main": "lib/cjs/index.js",
6
6
  "types": "lib/types/index.d.ts",
@@ -47,6 +47,7 @@
47
47
  "babel-jest": "^27.3.1",
48
48
  "babel-loader": "^8.2.3",
49
49
  "botframework-directlinejs": "^0.15.0",
50
+ "concurrently": "^9.1.2",
50
51
  "copyfiles": "^2.4.1",
51
52
  "eslint": "^7.32.0",
52
53
  "eslint-config-standard": "^16.0.3",
@@ -56,10 +57,12 @@
56
57
  "eslint-plugin-react": "^7.26.1",
57
58
  "eslint-plugin-storybook": "^0.5.3",
58
59
  "file-loader": "^6.2.0",
60
+ "husky": "^9.1.7",
59
61
  "jest": "^27.3.1",
60
62
  "jest-dom": "^4.0.0",
61
63
  "jest-image-snapshot": "^4.5.1",
62
64
  "json": "^11.0.0",
65
+ "lint-staged": "^15.5.2",
63
66
  "p-defer": "^4.0.1",
64
67
  "playwright": "^1.20.0",
65
68
  "postcss": "^8.3.9",
@@ -67,9 +70,11 @@
67
70
  "react-docgen-typescript-plugin": "^1.0.8",
68
71
  "react-dom": "^17.0.2",
69
72
  "react-test-renderer": "^17.0.2",
73
+ "rimraf": "^6.0.1",
70
74
  "storybook-addon-playwright": "^4.9.2",
71
75
  "swiper": "^9.0.5",
72
76
  "terser-webpack-plugin": "^4.2.3",
77
+ "thread-loader": "^2.1.3",
73
78
  "ts-loader": "^9.2.6",
74
79
  "typescript": "4.9.5",
75
80
  "webpack": "^4.44.2",
@@ -97,7 +102,7 @@
97
102
  "compose-storybook": "start-storybook -c stories/.storybook -p 9009",
98
103
  "build-composite-storybook": "build-storybook -c stories/.storybook -o storybook-build",
99
104
  "build-storybook": "build-storybook",
100
- "build": "yarn lint && yarn build:esm && yarn build:cjs && tsc",
105
+ "build": "yarn clean yarn lint && yarn build:esm && yarn build:cjs && tsc",
101
106
  "test:unit": "jest -c jest.config.unit.cjs --env=jsdom --runInBand --force-exit",
102
107
  "test:e2e": "cd automation_tests && yarn test",
103
108
  "test:e2e:build": "yarn build-sample && cd automation_tests && yarn test",
@@ -105,6 +110,8 @@
105
110
  "test:all": "yarn test:unit && yarn test:visual",
106
111
  "build:esm": "babel ./src --config-file ./babel.esm.config.json --out-dir lib/esm --extensions .ts,.js,.tsx --ignore **/*.test.ts,**/*.stories.tsx,**/*.test.tsx,**/*.spec.ts,**/*.spec.tsx",
107
112
  "build:cjs": "babel ./src --config-file ./babel.config.json --out-dir lib/cjs --extensions .ts,.js,.tsx --ignore **/*.test.ts,**/*.stories.tsx,**/*.test.tsx,**/*.spec.ts,**/*.spec.tsx",
113
+ "build:esm:watch": "babel ./src --config-file ./babel.esm.config.json --out-dir lib/esm --extensions .ts,.js,.tsx --watch --ignore **/*.test.ts,**/*.stories.tsx,**/*.test.tsx,**/*.spec.ts,**/*.spec.tsx",
114
+ "build:cjs:watch": "babel ./src --config-file ./babel.config.json --out-dir lib/cjs --extensions .ts,.js,.tsx --watch --ignore **/*.test.ts,**/*.stories.tsx,**/*.test.tsx,**/*.spec.ts,**/*.spec.tsx",
108
115
  "build:umd": "webpack --config ./webpack.umd.config.cjs",
109
116
  "verify": "yarn install && yarn build-storybook && yarn test:all && yarn build && yarn storybook",
110
117
  "testpack": "yarn build && yarn pack",
@@ -112,7 +119,10 @@
112
119
  "build-sample:dev": "yarn build && webpack --config ./webpack.dev.config.cjs",
113
120
  "test:visual:build": "yarn build-storybook && yarn test:visual",
114
121
  "lint": "yarn eslint . --max-warnings=0",
115
- "pretest:visual": "yarn playwright install"
122
+ "pretest:visual": "yarn playwright install",
123
+ "prepare": "husky install",
124
+ "clean": "rimraf lib",
125
+ "dev": "concurrently \"yarn build:esm:watch\" \"webpack --config ./webpack.config.cjs --watch\""
116
126
  },
117
127
  "resolutions": {
118
128
  "**/url-parse": "1.5.9",