This repository has been archived on 2022-03-12. You can view files and clone it, but cannot push or open issues or pull requests.

1 line
3.1 KiB
Plaintext
Raw Permalink Normal View History

2021-04-02 02:24:13 +03:00
{"version":3,"file":"react-native-maps.js","sourceRoot":"","sources":["../../../src/plugins/unversioned/react-native-maps.ts"],"names":[],"mappings":";;;;;AAAA,gEAAuC;AAGvC,qEAAsE;AACtE,2DAA4D;AAC5D,yCAAyD;AACzD,kDAAsD;AACtD,sDAAqD;AAErD,MAAM,WAAW,GAAG,mBAAmB,CAAC;AACxC,MAAM,cAAc,GAAG,+CAA+C,CAAC;AAEvE,6DAA6D;AAC7D,8DAA8D;AAC9D,MAAM,8BAA8B,GAAiB,MAAM,CAAC,EAAE;IAC5D,IAAI,CAAC,MAAM,CAAC,GAAG;QAAE,MAAM,CAAC,GAAG,GAAG,EAAE,CAAC;IACjC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,SAAS;QAAE,MAAM,CAAC,GAAG,CAAC,SAAS,GAAG,EAAE,CAAC;IACrD,MAAM,CAAC,GAAG,CAAC,SAAS,CAAC,mCAAmC;QACtD,MAAM,CAAC,GAAG,CAAC,SAAS,CAAC,mCAAmC,IAAI,cAAc,CAAC;IAE7E,OAAO,6BAAe,CAAC,MAAM,EAAE;QAC7B,2CAA2C;QAC3C,yCAAyC;KAC1C,CAAC,CAAC;AACL,CAAC,CAAC;AAEW,QAAA,QAAQ,GAAiB,MAAM,CAAC,EAAE;IAC7C,OAAO,iCAAgB,CAAC,MAAM,EAAE;QAC9B,eAAe,EAAE,IAAI;QACrB,MAAM,EAAE,WAAW;QACnB,6DAA6D;QAC7D,QAAQ,EAAE,mBAAmB;KAC9B,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,mBAAmB,GAAiB,kCAAmB,CAAC,MAAM,CAAC,EAAE;;IACrE,MAAM,GAAG,uCAAoB,CAAC,MAAM,CAAC,CAAC;IACtC,MAAM,GAAG,eAAW,CAAC,MAAM,CAAC,CAAC;IAC7B,mEAAmE;IACnE,IACE,OAAA,MAAM,CAAC,SAAS,0CAAE,WAAW;QAC7B,sBAAW,CAAC,MAAM,CAAC,MAAA,MAAM,CAAC,SAAS,0CAAE,WAAY,EAAE,mBAAmB,CAAC,EACvE;QACA,MAAM,GAAG,8BAA8B,CAAC,MAAM,CAAC,CAAC;KACjD;IACD,OAAO,MAAM,CAAC;AAChB,CAAC,EAAE,WAAW,CAAC,CAAC;AAEhB,kBAAe,gBAAQ,CAAC","sourcesContent":["import resolveFrom from 'resolve-from';\n\nimport { ConfigPlugin } from '../../Plugin.types';\nimport { withGoogleMapsApiKey } from '../../android/GoogleMapsApiKey';\nimport { withPermissions } from '../../android/Permissions';\nimport { withMaps as withMapsIOS } from '../../ios/Maps';\nimport { createRunOncePlugin } from '../core-plugins';\nimport { withStaticPlugin } from '../static-plugins';\n\nconst packageName = 'react-native-maps';\nconst LOCATION_USAGE = 'Allow $(PRODUCT_NAME) to access your location';\n\n// Copied from expo-location package, this gets used when the\n// user has react-native-maps installed but not expo-location.\nconst withDefaultLocationPermissions: ConfigPlugin = config => {\n if (!config.ios) config.ios = {};\n if (!config.ios.infoPlist) config.ios.infoPlist = {};\n config.ios.infoPlist.NSLocationWhenInUseUsageDescription =\n config.ios.infoPlist.NSLocationWhenInUseUsageDescription || LOCATION_USAGE;\n\n return withPermissions(config, [\n 'android.permission.ACCESS_COARSE_LOCATION',\n 'android.permission.ACCESS_FINE_LOCATION',\n ]);\n};\n\nexport const withMaps: ConfigPlugin = config => {\n return withStaticPlugin(config, {\n _isLegacyPlugin: true,\n plugin: packageName,\n // If the static plugin isn't found, use the unversioned one.\n fallback: withUnversionedMaps,\n });\n};\n\nconst withUnversionedMaps: ConfigPlugin = createRunOncePlugin(config => {\n config = withGoogleMapsApiKey(config);\n config = withMapsIOS(config);\n // Only add location permissions if react-native-maps is installed.\n if (\n config._internal?.projectRoot &&\n resolveFrom.silent(config._internal?.projectRoot!, 'react-native-maps')\n ) {\n config = withDefaultLocationPermissions(config);\n }\n return config;\n}, packageName);\n\nexport default withMaps;\n"]}