@momo-kits/foundation 0.121.3-beta.1 → 0.121.3-beta.2
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.
|
@@ -105,7 +105,7 @@ const HeaderToolkitAction: React.FC<any> = ({
|
|
|
105
105
|
);
|
|
106
106
|
|
|
107
107
|
const onDismiss = () => {
|
|
108
|
-
if (useCloseIcon
|
|
108
|
+
if (useCloseIcon || !isWhiteList) {
|
|
109
109
|
navigator?.maxApi?.dispatchFunction?.(
|
|
110
110
|
'dismiss',
|
|
111
111
|
navigator?.dismissData,
|
|
@@ -300,7 +300,7 @@ const HeaderToolkitAction: React.FC<any> = ({
|
|
|
300
300
|
<Icon
|
|
301
301
|
color={tintColor}
|
|
302
302
|
source={
|
|
303
|
-
useCloseIcon
|
|
303
|
+
useCloseIcon || !isWhiteList
|
|
304
304
|
? '16_navigation_close_circle'
|
|
305
305
|
: '16_basic_home'
|
|
306
306
|
}
|
|
@@ -26,6 +26,7 @@ const StackScreen: React.FC<ScreenParams> = props => {
|
|
|
26
26
|
traceIdInteraction: undefined,
|
|
27
27
|
releaseLoad: undefined,
|
|
28
28
|
releaseInteraction: undefined,
|
|
29
|
+
releaseUserInteraction: undefined,
|
|
29
30
|
timeLoad: 0,
|
|
30
31
|
timeInteraction: 0,
|
|
31
32
|
widgets: [],
|
|
@@ -183,6 +184,36 @@ const StackScreen: React.FC<ScreenParams> = props => {
|
|
|
183
184
|
}
|
|
184
185
|
};
|
|
185
186
|
|
|
187
|
+
/**
|
|
188
|
+
* tracking for first interaction by user
|
|
189
|
+
*/
|
|
190
|
+
const onFirstInteraction = (action: string) => {
|
|
191
|
+
if (!tracking.current?.releaseUserInteraction) {
|
|
192
|
+
let timeLoad = tracking.current.timeLoad;
|
|
193
|
+
if (timeLoad === 0) {
|
|
194
|
+
timeLoad = tracking.current.endTime - tracking.current.startTime;
|
|
195
|
+
}
|
|
196
|
+
context?.autoTracking?.({
|
|
197
|
+
...context,
|
|
198
|
+
screenName,
|
|
199
|
+
componentName: 'Screen',
|
|
200
|
+
state: 'interaction',
|
|
201
|
+
duration: timeLoad,
|
|
202
|
+
action,
|
|
203
|
+
});
|
|
204
|
+
tracking.current.releaseUserInteraction = true;
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* debug
|
|
208
|
+
*/
|
|
209
|
+
navigator?.maxApi?.showToastDebug?.({
|
|
210
|
+
appId: context.appId,
|
|
211
|
+
message: `${screenName} user_interaction ${timeLoad}`,
|
|
212
|
+
type: 'ERROR',
|
|
213
|
+
});
|
|
214
|
+
}
|
|
215
|
+
};
|
|
216
|
+
|
|
186
217
|
return (
|
|
187
218
|
<ScreenContext.Provider
|
|
188
219
|
value={{
|
|
@@ -237,6 +268,7 @@ const StackScreen: React.FC<ScreenParams> = props => {
|
|
|
237
268
|
if (data?.interaction) {
|
|
238
269
|
onScreenLoad();
|
|
239
270
|
onScreenInteraction();
|
|
271
|
+
onFirstInteraction(data?.action);
|
|
240
272
|
}
|
|
241
273
|
/**
|
|
242
274
|
* timeout for handle tracking screen
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {TrackingScopeContext} from '
|
|
2
|
+
import {TrackingScopeContext} from '../Application';
|
|
3
3
|
|
|
4
4
|
const TrackingScope = ({
|
|
5
5
|
scopeName,
|
|
@@ -15,4 +15,4 @@ const TrackingScope = ({
|
|
|
15
15
|
);
|
|
16
16
|
};
|
|
17
17
|
|
|
18
|
-
export
|
|
18
|
+
export {TrackingScope};
|
package/Layout/index.ts
CHANGED
|
@@ -7,6 +7,7 @@ import {GridContextProps} from './types';
|
|
|
7
7
|
import Item from './Item';
|
|
8
8
|
import ItemList from './ItemList';
|
|
9
9
|
import ItemSectionList from './ItemSectionList';
|
|
10
|
+
import {TrackingScope} from './TrackingScope';
|
|
10
11
|
|
|
11
12
|
const GridContext = createContext<GridContextProps>({
|
|
12
13
|
numberOfColumns: 12,
|
|
@@ -24,4 +25,5 @@ export {
|
|
|
24
25
|
Item,
|
|
25
26
|
ItemList,
|
|
26
27
|
ItemSectionList,
|
|
28
|
+
TrackingScope,
|
|
27
29
|
};
|