@microsoft/omnichannel-chat-widget 1.7.8-main.d38af40 → 1.7.8-main.d71f599
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/lib/cjs/common/facades/FacadeChatSDK.js +15 -4
- package/lib/cjs/common/telemetry/TelemetryConstants.js +4 -0
- package/lib/cjs/components/chatbuttonstateful/ChatButtonStateful.js +4 -5
- package/lib/cjs/components/headerstateful/HeaderStateful.js +3 -5
- package/lib/cjs/components/livechatwidget/common/chatDisconnectHelper.js +3 -1
- package/lib/cjs/components/livechatwidget/common/reconnectChatHelper.js +0 -5
- package/lib/cjs/components/livechatwidget/common/startChat.js +2 -23
- package/lib/cjs/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +3 -3
- package/lib/cjs/components/ooohpanestateful/OOOHPaneStateful.js +6 -4
- package/lib/cjs/components/webchatcontainerstateful/WebChatContainerStateful.js +4 -3
- package/lib/cjs/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/DeliveredTimestamp.js +4 -0
- package/lib/cjs/contexts/common/LiveChatWidgetContextInitialState.js +14 -2
- package/lib/cjs/firstresponselatency/FirstMessageTrackerFromBot.js +118 -0
- package/lib/cjs/firstresponselatency/FirstResponseLatencyTracker.js +32 -5
- package/lib/cjs/firstresponselatency/util.js +15 -2
- package/lib/esm/common/facades/FacadeChatSDK.js +15 -4
- package/lib/esm/common/telemetry/TelemetryConstants.js +4 -0
- package/lib/esm/components/chatbuttonstateful/ChatButtonStateful.js +4 -5
- package/lib/esm/components/headerstateful/HeaderStateful.js +3 -5
- package/lib/esm/components/livechatwidget/common/chatDisconnectHelper.js +3 -1
- package/lib/esm/components/livechatwidget/common/reconnectChatHelper.js +1 -6
- package/lib/esm/components/livechatwidget/common/startChat.js +3 -24
- package/lib/esm/components/livechatwidget/livechatwidgetstateful/LiveChatWidgetStateful.js +3 -3
- package/lib/esm/components/ooohpanestateful/OOOHPaneStateful.js +6 -4
- package/lib/esm/components/webchatcontainerstateful/WebChatContainerStateful.js +4 -3
- package/lib/esm/components/webchatcontainerstateful/webchatcontroller/middlewares/renderingmiddlewares/timestamps/DeliveredTimestamp.js +4 -0
- package/lib/esm/contexts/common/LiveChatWidgetContextInitialState.js +14 -2
- package/lib/esm/firstresponselatency/FirstMessageTrackerFromBot.js +112 -0
- package/lib/esm/firstresponselatency/FirstResponseLatencyTracker.js +33 -6
- package/lib/esm/firstresponselatency/util.js +12 -0
- package/lib/types/common/facades/FacadeChatSDK.d.ts +1 -0
- package/lib/types/common/telemetry/TelemetryConstants.d.ts +5 -1
- package/lib/types/firstresponselatency/FirstMessageTrackerFromBot.d.ts +1 -0
- package/lib/types/firstresponselatency/FirstResponseLatencyTracker.d.ts +5 -0
- package/lib/types/firstresponselatency/util.d.ts +2 -1
- package/package.json +13 -3
|
@@ -5,6 +5,7 @@ export declare class FirstResponseLatencyTracker {
|
|
|
5
5
|
private isEnded;
|
|
6
6
|
private startTrackingMessage?;
|
|
7
7
|
private stopTrackingMessage?;
|
|
8
|
+
private isReady;
|
|
8
9
|
constructor();
|
|
9
10
|
private createTrackingMessage;
|
|
10
11
|
private startTracking;
|
|
@@ -13,5 +14,9 @@ export declare class FirstResponseLatencyTracker {
|
|
|
13
14
|
private isMessageFromValidSender;
|
|
14
15
|
startClock(payload: MessagePayload): void;
|
|
15
16
|
stopClock(payload: MessagePayload): void;
|
|
17
|
+
private offlineNetworkListener;
|
|
18
|
+
private fmltrackingListener;
|
|
19
|
+
private rehydrateListener;
|
|
20
|
+
private historyListener;
|
|
16
21
|
private deregister;
|
|
17
22
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { MessagePayload, ScenarioType } from "./Constants";
|
|
1
|
+
import { MessagePayload, ScenarioType, TrackingMessage } from "./Constants";
|
|
2
2
|
import { IActivity } from "botframework-directlinejs";
|
|
3
3
|
export declare const isHistoryMessage: (activity: IActivity, startTime: number) => boolean;
|
|
4
4
|
export declare const buildMessagePayload: (activity: IActivity, userId: string) => MessagePayload;
|
|
5
5
|
export declare const polyfillMessagePayloadForEvent: (activity: IActivity, payload: MessagePayload, conversationId?: string) => MessagePayload;
|
|
6
6
|
export declare const getScenarioType: (activity: IActivity) => ScenarioType;
|
|
7
|
+
export declare const createTrackingMessage: (payload: MessagePayload, type: string) => TrackingMessage;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@microsoft/omnichannel-chat-widget",
|
|
3
|
-
"version": "1.7.8-main.
|
|
3
|
+
"version": "1.7.8-main.d71f599",
|
|
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",
|