@momo-kits/foundation 0.121.3-tracking.3 → 0.121.3-tracking.5

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.
@@ -21,9 +21,7 @@ const MiniAppContext = (Platform as any).MiniAppContext ?? Context;
21
21
  const ScreenContext = (Platform as any).ScreenContext ?? Context;
22
22
  const ComponentContext = (Platform as any).ComponentContext ?? Context;
23
23
  const SkeletonContext = createContext({loading: false});
24
- const TrackingScopeContext = createContext<{scopeName?: string}>({
25
- scopeName: undefined,
26
- });
24
+ const TrackingScopeContext = (Platform as any).ComponentContext ?? Context;
27
25
 
28
26
  export {
29
27
  ApplicationContext,
@@ -179,7 +179,9 @@ const useComponentId = (componentName: string, accessibilityLabel?: string) => {
179
179
  if (accessibilityLabel) {
180
180
  return accessibilityLabel;
181
181
  }
182
- return `${app.appId}/${app.code}/${screen.screenName}/${scopeName}/${componentName}`;
182
+ return `${app.appId}/${app.code}/${screen.screenName}/${
183
+ scopeName + scopeName && '/'
184
+ }${componentName}`;
183
185
  }, [componentName, accessibilityLabel, app, screen]);
184
186
 
185
187
  return {componentId};
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import {TrackingScopeContext} from './Application';
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 default TrackingScope;
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
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo-kits/foundation",
3
- "version": "0.121.3-tracking.3",
3
+ "version": "0.121.3-tracking.5",
4
4
  "minimumDeployTarget": 32,
5
5
  "deploymentTarget": 121,
6
6
  "description": "React Native Component Kits",