@momo-kits/foundation 0.92.29-optimize.11 → 0.92.29-optimize.12

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.
@@ -297,6 +297,7 @@ const HeaderRightAction: React.FC<any> = ({children, ...restProps}) => {
297
297
  const HeaderToolkitAction: React.FC<any> = ({
298
298
  tintColor,
299
299
  pinnedTool,
300
+ runtimeTools = [],
300
301
  preventClose,
301
302
  }) => {
302
303
  const {navigator} = useContext(ApplicationContext);
@@ -333,15 +334,13 @@ const HeaderToolkitAction: React.FC<any> = ({
333
334
  const onMore = () => {
334
335
  onAction?.('onMore');
335
336
  navigator?.maxApi?.dispatchFunction?.(
336
- 'showToolkit',
337
- {
338
- tools: miniContext?.toolkitConfig?.oldTools ?? [
339
- 'addFavorite',
340
- 'addShortcut',
341
- 'share',
342
- ],
343
- },
344
- () => {}
337
+ 'showTools',
338
+ {runtimeTools},
339
+ (res: {item: {action?: string; key: string}}) => {
340
+ const {item} = res;
341
+ navigator?.toolkitCallback?.(item.key);
342
+ getToolkitConfig();
343
+ }
345
344
  );
346
345
  };
347
346
 
@@ -386,7 +385,7 @@ const HeaderToolkitAction: React.FC<any> = ({
386
385
  onPress={() => {
387
386
  navigator?.maxApi?.dispatchFunction?.(
388
387
  'onToolAction',
389
- {item: pinTool},
388
+ [pinTool?.key],
390
389
  () => {
391
390
  getToolkitConfig();
392
391
  }
package/Tag/styles.ts CHANGED
@@ -1,20 +1,19 @@
1
1
  import {StyleSheet} from 'react-native';
2
2
  import {Radius, Spacing} from '../Consts';
3
- import {scaleSize} from '../Text';
4
3
 
5
4
  export default StyleSheet.create({
6
5
  container: {
7
6
  paddingHorizontal: Spacing.S,
8
7
  borderRadius: Radius.S,
9
8
  flexDirection: 'row',
10
- height: scaleSize(24),
9
+ height: 24,
11
10
  alignItems: 'center',
12
11
  justifyContent: 'center',
13
12
  },
14
13
  mediumContainer: {
15
14
  paddingHorizontal: Spacing.S,
16
15
  borderRadius: Radius.S,
17
- height: scaleSize(18),
16
+ height: 18,
18
17
  alignItems: 'center',
19
18
  flexDirection: 'row',
20
19
  justifyContent: 'center',
package/package.json CHANGED
@@ -1,46 +1,46 @@
1
1
  {
2
- "name": "@momo-kits/foundation",
3
- "version": "0.92.29-optimize.11",
4
- "description": "React Native Component Kits",
5
- "main": "index.ts",
6
- "scripts": {},
7
- "keywords": [
8
- "@momo-kits/foundation"
9
- ],
10
- "dependencies": {
11
- "@gorhom/bottom-sheet": "2.4.1",
12
- "react-native-safe-area-context": "3.1.4",
13
- "react-native-linear-gradient": "2.8.3",
14
- "react-native-gesture-handler": "1.10.3",
15
- "react-native-modalize": "2.1.1",
16
- "react-native-fast-image": "8.1.5",
17
- "@react-navigation/bottom-tabs": "https://oauth2:5WXQLHPMxxCyvGt_Py4D@gitlab.mservice.com.vn/momo-platform/react-native-bottom-tabs.git",
18
- "@react-navigation/core": "5.16.1",
19
- "@react-navigation/native": "5.9.8",
20
- "@react-navigation/routers": "5.7.4",
21
- "lottie-react-native": "git+https://gitlab.mservice.com.vn/momo-platform/momo-lottie-react-native.git",
22
- "@react-navigation/stack": "https://oauth2:eX-jVhzQdLc343AjD3Sc@gitlab.mservice.com.vn/momo-platform/react-navigation-stack.git"
23
- },
24
- "peerDependencies": {
25
- "react-native": "*"
26
- },
27
- "devDependencies": {
28
- "@babel/core": "^7.12.9",
29
- "@babel/runtime": "^7.12.5",
30
- "@react-native-community/eslint-config": "^2.0.0",
31
- "@types/jest": "26.0.23",
32
- "@types/react-native": "0.64.4",
33
- "@types/react-test-renderer": "16.9.2",
34
- "@types/d3-shape": "1.3.7",
35
- "babel-jest": "^26.6.3",
36
- "eslint": "^7.14.0",
37
- "jest": "^26.6.3",
38
- "metro-react-native-babel-preset": "^0.64.0",
39
- "react-test-renderer": "17.0.1",
40
- "typescript": "^4.0.3",
41
- "@momo-platform/versions": "4.1.11",
42
- "react-scanner": "^1.1.0"
43
- },
44
- "author": "@momo-kits/foundation",
45
- "license": "ISC"
46
- }
2
+ "name": "@momo-kits/foundation",
3
+ "version": "0.92.29-optimize.12",
4
+ "description": "React Native Component Kits",
5
+ "main": "index.ts",
6
+ "scripts": {},
7
+ "keywords": [
8
+ "@momo-kits/foundation"
9
+ ],
10
+ "dependencies": {
11
+ "@gorhom/bottom-sheet": "2.4.1",
12
+ "react-native-safe-area-context": "3.1.4",
13
+ "react-native-linear-gradient": "2.8.3",
14
+ "react-native-gesture-handler": "1.10.3",
15
+ "react-native-modalize": "2.1.1",
16
+ "react-native-fast-image": "8.1.5",
17
+ "@react-navigation/bottom-tabs": "https://oauth2:5WXQLHPMxxCyvGt_Py4D@gitlab.mservice.com.vn/momo-platform/react-native-bottom-tabs.git",
18
+ "@react-navigation/core": "5.16.1",
19
+ "@react-navigation/native": "5.9.8",
20
+ "@react-navigation/routers": "5.7.4",
21
+ "lottie-react-native": "git+https://gitlab.mservice.com.vn/momo-platform/momo-lottie-react-native.git",
22
+ "@react-navigation/stack": "https://oauth2:eX-jVhzQdLc343AjD3Sc@gitlab.mservice.com.vn/momo-platform/react-navigation-stack.git"
23
+ },
24
+ "peerDependencies": {
25
+ "react-native": "*"
26
+ },
27
+ "devDependencies": {
28
+ "@babel/core": "^7.12.9",
29
+ "@babel/runtime": "^7.12.5",
30
+ "@react-native-community/eslint-config": "^2.0.0",
31
+ "@types/jest": "26.0.23",
32
+ "@types/react-native": "0.64.4",
33
+ "@types/react-test-renderer": "16.9.2",
34
+ "@types/d3-shape": "1.3.7",
35
+ "babel-jest": "^26.6.3",
36
+ "eslint": "^7.14.0",
37
+ "jest": "^26.6.3",
38
+ "metro-react-native-babel-preset": "^0.64.0",
39
+ "react-test-renderer": "17.0.1",
40
+ "typescript": "^4.0.3",
41
+ "@momo-platform/versions": "4.1.11",
42
+ "react-scanner": "^1.1.0"
43
+ },
44
+ "author": "@momo-kits/foundation",
45
+ "license": "ISC"
46
+ }
package/publish.sh CHANGED
@@ -1,15 +1,28 @@
1
1
  #!/bin/bash
2
2
 
3
- if [ "$1" == "stable" ]; then
3
+ # Prepare dist files
4
+ rm -rf dist
5
+ mkdir dist
6
+ rsync -r --exclude=/dist ./* dist
7
+ cd dist
4
8
 
9
+ if [ "$1" == "stable" ]; then
10
+ #npm version $(npm view @momo-kits/foundation@stable version)
11
+ #npm version patch
5
12
  npm publish --tag stable --access=public
6
13
  elif [ "$1" == "latest" ]; then
7
-
14
+ #npm version $(npm view @momo-kits/foundation@latest version)
15
+ #npm version prerelease --preid=rc
8
16
  npm publish --tag latest --access=public
9
17
  else
10
-
18
+ #npm version $(npm view @momo-kits/foundation@beta version)
19
+ #npm version prerelease --preid=beta
11
20
  npm publish --tag beta --access=public
12
21
  fi
13
22
 
14
23
  PACKAGE_NAME=$(npm pkg get name)
15
24
  NEW_PACKAGE_VERSION=$(npm pkg get version)
25
+
26
+ # Clean up
27
+ cd ..
28
+ rm -rf dist