forked from sarthology/ovuli
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request sarthology#105 from shilpa3495/navigation-icons
navigation-icon
- Loading branch information
Showing
5 changed files
with
14 additions
and
0 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
.expo/web/cache/development/babel-loader/001108c789d4ed5ae79f89e13dd5a4f9 2.json
Large diffs are not rendered by default.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
.expo/web/cache/development/babel-loader/0044f2870e0dc09d5bb0cf6e9bc2978a 2.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"ast":null,"code":"import _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nimport _classCallCheck from \"@babel/runtime/helpers/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/createClass\";\nimport invariant from 'invariant';\nimport NativeEventEmitter from \"react-native-web/dist/exports/NativeEventEmitter\";\nimport Platform from \"react-native-web/dist/exports/Platform\";\nvar nativeEmitterSubscriptionKey = '@@nativeEmitterSubscription@@';\nexport var EventEmitter = function () {\n function EventEmitter(nativeModule) {\n _classCallCheck(this, EventEmitter);\n\n this._listenerCount = 0;\n this._nativeModule = nativeModule;\n this._eventEmitter = new NativeEventEmitter(nativeModule);\n }\n\n _createClass(EventEmitter, [{\n key: \"addListener\",\n value: function addListener(eventName, listener) {\n var _this = this,\n _subscription;\n\n if (!this._listenerCount && Platform.OS !== 'ios' && this._nativeModule.startObserving) {\n this._nativeModule.startObserving();\n }\n\n this._listenerCount++;\n\n var nativeEmitterSubscription = this._eventEmitter.addListener(eventName, listener);\n\n var subscription = (_subscription = {}, _defineProperty(_subscription, nativeEmitterSubscriptionKey, nativeEmitterSubscription), _defineProperty(_subscription, \"remove\", function remove() {\n _this.removeSubscription(subscription);\n }), _subscription);\n return subscription;\n }\n }, {\n key: \"removeAllListeners\",\n value: function removeAllListeners(eventName) {\n var removedListenerCount = this._eventEmitter.listeners(eventName).length;\n\n this._eventEmitter.removeAllListeners(eventName);\n\n this._listenerCount -= removedListenerCount;\n invariant(this._listenerCount >= 0, \"EventEmitter must have a non-negative number of listeners\");\n\n if (!this._listenerCount && Platform.OS !== 'ios' && this._nativeModule.stopObserving) {\n this._nativeModule.stopObserving();\n }\n }\n }, {\n key: \"removeSubscription\",\n value: function removeSubscription(subscription) {\n var nativeEmitterSubscription = subscription[nativeEmitterSubscriptionKey];\n\n if (!nativeEmitterSubscription) {\n return;\n }\n\n this._eventEmitter.removeSubscription(nativeEmitterSubscription);\n\n this._listenerCount--;\n delete subscription[nativeEmitterSubscriptionKey];\n\n subscription.remove = function () {};\n\n if (!this._listenerCount && Platform.OS !== 'ios' && this._nativeModule.stopObserving) {\n this._nativeModule.stopObserving();\n }\n }\n }, {\n key: \"emit\",\n value: function emit(eventName) {\n var _this$_eventEmitter;\n\n for (var _len = arguments.length, params = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n params[_key - 1] = arguments[_key];\n }\n\n (_this$_eventEmitter = this._eventEmitter).emit.apply(_this$_eventEmitter, [eventName].concat(params));\n }\n }]);\n\n return EventEmitter;\n}();","map":{"version":3,"sources":["../src/EventEmitter.ts"],"names":[],"mappings":";;;AAAA,OAAO,SAAP,MAAsB,WAAtB;;;AAGA,IAAM,4BAA4B,GAAG,+BAArC;AAaA,WAAa,YAAb;AAKE,wBAAY,YAAZ,EAAsC;AAAA;;AAJtC,SAAA,cAAA,GAAiB,CAAjB;AAKE,SAAK,aAAL,GAAqB,YAArB;AACA,SAAK,aAAL,GAAqB,IAAI,kBAAJ,CAAuB,YAAvB,CAArB;AACD;;AARH;AAAA;AAAA,gCAUiB,SAVjB,EAUoC,QAVpC,EAUgE;AAAA;AAAA;;AAC5D,UAAI,CAAC,KAAK,cAAN,IAA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AnB;AACD;AACF;AA3DH;AAAA;AAAA,yBA6DO,SA7DP,EA6D0C;AAAA;;AAAA,wCAAb,MAAa;AAAb,QAAA,MAAa;AAAA;;AACtC,kCAAK,aAAL,EAAmB,IAAnB,6BAAwB,SAAxB,SAAsC,MAAtC;AACD;AA/DH;;AAAA;AAAA","sourcesContent":["import invariant from 'invariant';\nimport { NativeEventEmitter, Platform } from 'react-native';\n\nconst nativeEmitterSubscriptionKey = '@@nativeEmitterSubscription@@';\n\ntype NativeModule = {\n startObserving?: () => void;\n stopObserving?: () => void;\n addListener: (eventName: string) => void;\n removeListeners: (count: number) => void;\n};\n\nexport type Subscription = {\n remove: () => void;\n};\n\nexport class EventEmitter {\n _listenerCount = 0;\n _nativeModule: NativeModule;\n _eventEmitter: NativeEventEmitter;\n\n constructor(nativeModule: NativeModule) {\n this._nativeModule = nativeModule;\n this._eventEmitter = new NativeEventEmitter(nativeModule as any);\n }\n\n addListener<T>(eventName: string, listener: (event: T) => void): Subscription {\n if (!this._listenerCount && Platform.OS !== 'ios' && this._nativeModule.startObserving) {\n this._nativeModule.startObserving();\n }\n\n this._listenerCount++;\n const nativeEmitterSubscription = this._eventEmitter.addListener(eventName, listener);\n const subscription = {\n [nativeEmitterSubscriptionKey]: nativeEmitterSubscription,\n remove: () => {\n this.removeSubscription(subscription);\n },\n };\n return subscription;\n }\n\n removeAllListeners(eventName: string): void {\n const removedListenerCount = this._eventEmitter.listeners(eventName).length;\n this._eventEmitter.removeAllListeners(eventName);\n this._listenerCount -= removedListenerCount;\n invariant(\n this._listenerCount >= 0,\n `EventEmitter must have a non-negative number of listeners`\n );\n\n if (!this._listenerCount && Platform.OS !== 'ios' && this._nativeModule.stopObserving) {\n this._nativeModule.stopObserving();\n }\n }\n\n removeSubscription(subscription: Subscription): void {\n const nativeEmitterSubscription = subscription[nativeEmitterSubscriptionKey];\n if (!nativeEmitterSubscription) {\n return;\n }\n\n this._eventEmitter.removeSubscription(nativeEmitterSubscription!);\n this._listenerCount--;\n\n // Ensure that the emitter's internal state remains correct even if `removeSubscription` is\n // called again with the same subscription\n delete subscription[nativeEmitterSubscriptionKey];\n\n // Release closed-over references to the emitter\n subscription.remove = () => {};\n\n if (!this._listenerCount && Platform.OS !== 'ios' && this._nativeModule.stopObserving) {\n this._nativeModule.stopObserving();\n }\n }\n\n emit(eventName: string, ...params: any[]): void {\n this._eventEmitter.emit(eventName, ...params);\n }\n}\n"],"sourceRoot":""},"metadata":{},"sourceType":"module"} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.