@dynatrace/react-native-plugin 2.307.1 → 2.309.1
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.
- package/README.md +7 -3
- package/android/build.gradle +3 -1
- package/android/src/main/java/com/dynatrace/android/agent/DynatraceAppStartModule.kt +128 -0
- package/android/src/main/java/com/dynatrace/android/agent/DynatraceInternalModule.kt +22 -0
- package/android/src/main/java/com/dynatrace/android/agent/DynatraceRNBridgeImpl.kt +411 -0
- package/android/src/main/java/com/dynatrace/android/agent/DynatraceReactPackage.kt +54 -0
- package/android/src/main/java/com/dynatrace/android/agent/DynatraceUtils.kt +86 -0
- package/android/src/main/java/com/dynatrace/android/agent/model/AppStartMeasurement.kt +15 -0
- package/android/src/main/java/com/dynatrace/android/agent/model/AppStartMeasurementType.kt +18 -0
- package/android/src/new/java/com/dynatrace/android/agent/DynatraceRNBridge.kt +228 -0
- package/android/src/old/java/com/dynatrace/android/agent/DynatraceRNBridge.kt +258 -0
- package/files/plugin.gradle +1 -1
- package/index.js +10 -10
- package/instrumentation/DynatraceInstrumentation.js +1 -0
- package/{lib → instrumentation/jsx}/CreateElement.js +6 -5
- package/{lib/instrumentor/base → instrumentation/jsx}/ElementHelper.js +14 -12
- package/{lib/jsx-dev-runtime.js → instrumentation/jsx/JsxDevRuntime.js} +10 -19
- package/instrumentation/jsx/JsxRuntime.js +63 -0
- package/instrumentation/jsx/JsxRuntimeUtil.js +31 -0
- package/instrumentation/jsx/components/ClassComponent.js +49 -0
- package/instrumentation/jsx/components/ComponentUtil.js +33 -0
- package/instrumentation/jsx/components/FunctionalComponent.js +20 -0
- package/{lib/instrumentor/base → instrumentation/jsx/components}/Picker.js +1 -1
- package/{lib/instrumentor/base → instrumentation/jsx/components}/RefreshControl.js +1 -1
- package/{lib/instrumentor/base → instrumentation/jsx/components}/Switch.js +1 -1
- package/{lib/instrumentor/base → instrumentation/jsx/components}/Touchable.js +5 -5
- package/instrumentation/libs/community/Picker.InstrInfo.js +20 -0
- package/{lib → instrumentation/libs}/community/Picker.js +1 -1
- package/instrumentation/libs/community/gesture-handler/Touchables.InstrInfo.js +23 -0
- package/{lib → instrumentation/libs}/community/gesture-handler/Touchables.js +1 -1
- package/{lib → instrumentation/libs}/react-native/RefreshControl.InstrInfo.js +2 -2
- package/{lib → instrumentation/libs}/react-native/RefreshControl.js +5 -5
- package/{lib → instrumentation/libs}/react-native/Switch.InstrInfo.js +2 -2
- package/{lib → instrumentation/libs}/react-native/Switch.js +5 -5
- package/instrumentation/libs/react-native/Touchables.InstrInfo.js +25 -0
- package/{lib → instrumentation/libs}/react-native/Touchables.js +1 -1
- package/{lib → instrumentation/libs}/react-navigation/ReactNavigation.js +6 -5
- package/{lib/instrumentor → instrumentation}/model/Types.js +1 -14
- package/instrumentation/model/TypesUtil.js +17 -0
- package/ios/DynatraceRNBridge.h +10 -1
- package/ios/DynatraceRNBridge.mm +152 -0
- package/jsx-dev-runtime.js +1 -1
- package/jsx-runtime.js +1 -1
- package/lib/core/Application.js +20 -0
- package/lib/{instrumentor/base → core}/Dynatrace.js +57 -48
- package/lib/{instrumentor/base → core}/DynatraceAction.js +23 -22
- package/lib/core/DynatraceInternal.js +46 -0
- package/lib/{instrumentor/base → core}/DynatraceRootAction.js +5 -4
- package/lib/{instrumentor/base → core}/DynatraceWebRequestTiming.js +6 -5
- package/lib/{instrumentor/base → core}/ErrorHandler.js +6 -5
- package/lib/{instrumentor/base → core}/configuration/Configuration.js +1 -1
- package/lib/{instrumentor/base → core}/configuration/ConfigurationDefaults.js +1 -2
- package/lib/{instrumentor/base → core}/configuration/ConfigurationHandler.js +2 -2
- package/lib/{instrumentor/base → core}/configuration/ManualStartupConfiguration.js +1 -1
- package/lib/core/logging/ConsoleLogger.js +27 -0
- package/lib/core/logging/LogLevel.js +12 -0
- package/lib/dynatrace-transformer.js +1 -1
- package/lib/next/Dynatrace.js +86 -0
- package/lib/next/DynatraceSecondGenForwarder.js +17 -0
- package/lib/next/IDynatrace.js +2 -0
- package/lib/next/IDynatraceForwarder.js +2 -0
- package/lib/next/appstart/AppStartObserver.js +32 -0
- package/lib/next/appstart/AppStartType.js +38 -0
- package/lib/next/events/EventCreator.js +77 -0
- package/lib/next/events/EventPipeline.js +57 -0
- package/lib/next/events/EventTimestamp.js +24 -0
- package/lib/next/events/ViewInfoCreator.js +27 -0
- package/lib/next/events/modifier/BaseDataEventModifier.js +31 -0
- package/lib/next/events/modifier/EventLimitation.js +69 -0
- package/lib/next/events/modifier/EventModifierUtil.js +88 -0
- package/lib/next/events/modifier/IEventModifier.js +2 -0
- package/lib/next/events/modifier/ModifyEventValidation.js +187 -0
- package/lib/next/events/modifier/NonFiniteNumbersModifier.js +50 -0
- package/lib/next/events/modifier/SendEventValidation.js +84 -0
- package/lib/next/events/spec/EventFieldKeysEnum.js +2 -0
- package/lib/next/events/spec/EventSpecContstants.js +46 -0
- package/lib/next/events/spec/IAppStartEvent.js +2 -0
- package/lib/next/events/spec/ICrashEvent.js +2 -0
- package/lib/next/events/spec/IErrorCodeEvent.js +2 -0
- package/lib/next/events/spec/IErrorExceptionEvent.js +2 -0
- package/lib/next/events/spec/IReactNativeEvent.js +2 -0
- package/lib/next/events/spec/IRumEvent.js +2 -0
- package/lib/next/provider/ITimestampProvider.js +2 -0
- package/lib/next/provider/TimestampProvider.js +10 -0
- package/package.json +41 -33
- package/react-native-dynatrace.podspec +1 -1
- package/src/lib/{instrumentor/base → core}/interface/NativeDynatraceBridge.ts +8 -0
- package/typings/react-native-dynatrace.d.ts +0 -1
- package/android/src/main/java/com/dynatrace/android/agent/DynatraceRNBridgeImpl.java +0 -366
- package/android/src/main/java/com/dynatrace/android/agent/DynatraceReactPackage.java +0 -67
- package/android/src/main/java/com/dynatrace/android/agent/DynatraceUtils.java +0 -108
- package/android/src/main/java/com/dynatrace/android/agent/PrivateDTBridge.java +0 -28
- package/android/src/new/java/com/dynatrace/android/agent/DynatraceRNBridge.java +0 -192
- package/android/src/old/java/com/dynatrace/android/agent/DynatraceRNBridge.java +0 -194
- package/lib/community/Picker.InstrInfo.js +0 -20
- package/lib/community/gesture-handler/Touchables.InstrInfo.js +0 -56
- package/lib/instrumentor/DynatraceInstrumentation.js +0 -1
- package/lib/instrumentor/base/Application.js +0 -16
- package/lib/instrumentor/base/DynatraceInternal.js +0 -34
- package/lib/instrumentor/base/Logger.js +0 -16
- package/lib/instrumentor/base/model/LogLevel.js +0 -17
- package/lib/jsx-runtime.js +0 -69
- package/lib/react/Component.js +0 -90
- package/lib/react-native/Touchables.InstrInfo.js +0 -60
- /package/{lib/instrumentor/base/interface → instrumentation/jsx}/IDynatraceProperties.js +0 -0
- /package/{lib → instrumentation/libs}/community/gesture-handler/index.js +0 -0
- /package/{lib → instrumentation/libs}/gesture-handler.js +0 -0
- /package/{lib → instrumentation/libs}/react-native/index.js +0 -0
- /package/{lib → instrumentation/libs}/react-native.js +0 -0
- /package/{lib/instrumentor → instrumentation}/model/Reference.js +0 -0
- /package/{lib/instrumentor → instrumentation}/parser/Babel.js +0 -0
- /package/lib/{instrumentor/base → core}/DynatraceBridge.js +0 -0
- /package/lib/{instrumentor/base → core}/NullAction.js +0 -0
- /package/lib/{instrumentor/base → core}/NullRootAction.js +0 -0
- /package/lib/{instrumentor/base → core}/NullWebRequestTiming.js +0 -0
- /package/lib/{instrumentor/base → core}/UserPrivacyOptions.js +0 -0
- /package/lib/{instrumentor/base → core}/configuration/ConfigurationBuilder.js +0 -0
- /package/lib/{instrumentor/base → core}/configuration/ConfigurationPreset.js +0 -0
- /package/lib/{instrumentor/base → core}/configuration/IConfiguration.js +0 -0
- /package/lib/{instrumentor/base → core}/interface/IDynatrace.js +0 -0
- /package/lib/{instrumentor/base → core}/interface/IDynatraceAction.js +0 -0
- /package/lib/{instrumentor/base → core}/interface/IDynatraceInternal.js +0 -0
- /package/lib/{instrumentor/base → core}/interface/IDynatraceRootAction.js +0 -0
- /package/lib/{instrumentor/base → core}/interface/IWebRequestTiming.js +0 -0
- /package/lib/{instrumentor/base → core}/interface/NativeDynatraceBridge.js +0 -0
- /package/lib/{instrumentor/base/interface → core/logging}/ILogger.js +0 -0
- /package/lib/{instrumentor/base → core}/model/DataCollectionLevel.js +0 -0
- /package/lib/{instrumentor/base → core}/model/Json.js +0 -0
- /package/lib/{instrumentor/base → core}/model/Platform.js +0 -0
- /package/lib/{instrumentor/base → core}/util/StringUtils.js +0 -0
|
@@ -2,13 +2,15 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.isDtActionIgnore = exports.modifyElement = exports.instrumentCreateElement = void 0;
|
|
4
4
|
const Types_1 = require("../model/Types");
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const RefreshControl_1 = require("./RefreshControl");
|
|
11
|
-
const Switch_1 = require("./Switch");
|
|
5
|
+
const TypesUtil_1 = require("../model/TypesUtil");
|
|
6
|
+
const Dynatrace_1 = require("../../lib/core/Dynatrace");
|
|
7
|
+
const ConsoleLogger_1 = require("../../lib/core/logging/ConsoleLogger");
|
|
8
|
+
const Picker_1 = require("./components/Picker");
|
|
9
|
+
const Touchable_1 = require("./components/Touchable");
|
|
10
|
+
const RefreshControl_1 = require("./components/RefreshControl");
|
|
11
|
+
const Switch_1 = require("./components/Switch");
|
|
12
|
+
const FunctionalComponent_1 = require("./components/FunctionalComponent");
|
|
13
|
+
const ClassComponent_1 = require("./components/ClassComponent");
|
|
12
14
|
const instrumentCreateElement = (reactModule) => {
|
|
13
15
|
if (reactModule != null && reactModule.createElement != null) {
|
|
14
16
|
const reactCreateElement = reactModule.createElement;
|
|
@@ -17,12 +19,12 @@ const instrumentCreateElement = (reactModule) => {
|
|
|
17
19
|
type._dtInfo != null &&
|
|
18
20
|
!(0, exports.isDtActionIgnore)(props)) {
|
|
19
21
|
if (type._dtInfo.type === Types_1.Types.FunctionalComponent) {
|
|
20
|
-
return reactCreateElement(
|
|
22
|
+
return reactCreateElement(FunctionalComponent_1.DynatraceFunctionalComponent, {}, reactCreateElement(type, props, ...children));
|
|
21
23
|
}
|
|
22
24
|
else if (type._dtInfo.type === Types_1.Types.ClassComponent &&
|
|
23
25
|
type.prototype !== undefined &&
|
|
24
26
|
type.prototype.isReactComponent !== undefined) {
|
|
25
|
-
return reactCreateElement(
|
|
27
|
+
return reactCreateElement(ClassComponent_1.DynatraceClassComponent, {}, reactCreateElement(type, props, ...children));
|
|
26
28
|
}
|
|
27
29
|
else {
|
|
28
30
|
(0, exports.modifyElement)(type, props, ...children);
|
|
@@ -46,12 +48,12 @@ const modifyElement = (type, props, ...children) => {
|
|
|
46
48
|
else if (type._dtInfo.type === Types_1.Types.Button ||
|
|
47
49
|
type._dtInfo.type === Types_1.Types.Text ||
|
|
48
50
|
type._dtInfo.type === Types_1.Types.Pressable ||
|
|
49
|
-
(0,
|
|
51
|
+
(0, TypesUtil_1.isTypeTouchable)(type._dtInfo.type)) {
|
|
50
52
|
if (props.onPress != null) {
|
|
51
|
-
props.onPress = (0, Touchable_1.TouchableHelper)(Dynatrace_1.Dynatrace,
|
|
53
|
+
props.onPress = (0, Touchable_1.TouchableHelper)(Dynatrace_1.Dynatrace, new ConsoleLogger_1.ConsoleLogger('TouchableHelper')).attachOnPress(false, props, children);
|
|
52
54
|
}
|
|
53
55
|
if (props.onLongPress != null) {
|
|
54
|
-
props.onLongPress = (0, Touchable_1.TouchableHelper)(Dynatrace_1.Dynatrace,
|
|
56
|
+
props.onLongPress = (0, Touchable_1.TouchableHelper)(Dynatrace_1.Dynatrace, new ConsoleLogger_1.ConsoleLogger('TouchableHelper')).attachOnPress(true, props, children);
|
|
55
57
|
}
|
|
56
58
|
}
|
|
57
59
|
else if (props.onValueChange != null &&
|
|
@@ -1,21 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
const
|
|
3
|
+
const Types_1 = require("../model/Types");
|
|
4
|
+
const JsxRuntimeUtil_1 = require("./JsxRuntimeUtil");
|
|
5
|
+
const FunctionalComponent_1 = require("./components/FunctionalComponent");
|
|
6
|
+
const ClassComponent_1 = require("./components/ClassComponent");
|
|
7
|
+
const ElementHelper_1 = require("./ElementHelper");
|
|
6
8
|
try {
|
|
7
|
-
|
|
8
|
-
try {
|
|
9
|
-
_jsxDevRuntime = require('react/jsx-dev-runtime.js');
|
|
10
|
-
}
|
|
11
|
-
catch (error) {
|
|
12
|
-
try {
|
|
13
|
-
_jsxDevRuntime = require('../../../react/jsx-dev-runtime');
|
|
14
|
-
}
|
|
15
|
-
catch (error) {
|
|
16
|
-
_jsxDevRuntime = null;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
9
|
+
const _jsxDevRuntime = (0, JsxRuntimeUtil_1.dynamicRequireJSXDevRuntime)();
|
|
19
10
|
if (_jsxDevRuntime != null) {
|
|
20
11
|
const jsxDEV = (...args) => {
|
|
21
12
|
if (args[0] !== undefined &&
|
|
@@ -31,10 +22,10 @@ try {
|
|
|
31
22
|
? args[1].dtActionName
|
|
32
23
|
: args[0]._dtInfo.name;
|
|
33
24
|
if (args[2] !== undefined) {
|
|
34
|
-
return _jsxDevRuntime.jsxDEV(
|
|
25
|
+
return _jsxDevRuntime.jsxDEV(FunctionalComponent_1.DynatraceFunctionalComponent, wrapperProps, args[2] + '_dt');
|
|
35
26
|
}
|
|
36
27
|
else {
|
|
37
|
-
return _jsxDevRuntime.jsxDEV(
|
|
28
|
+
return _jsxDevRuntime.jsxDEV(FunctionalComponent_1.DynatraceFunctionalComponent, wrapperProps);
|
|
38
29
|
}
|
|
39
30
|
}
|
|
40
31
|
else if (args[0]._dtInfo.type === Types_1.Types.ClassComponent &&
|
|
@@ -44,10 +35,10 @@ try {
|
|
|
44
35
|
children: _jsxDevRuntime.jsxDEV(...args),
|
|
45
36
|
};
|
|
46
37
|
if (args[2] !== undefined) {
|
|
47
|
-
return _jsxDevRuntime.jsxDEV(
|
|
38
|
+
return _jsxDevRuntime.jsxDEV(ClassComponent_1.DynatraceClassComponent, wrapperProps, args[2] + '_dt');
|
|
48
39
|
}
|
|
49
40
|
else {
|
|
50
|
-
return _jsxDevRuntime.jsxDEV(
|
|
41
|
+
return _jsxDevRuntime.jsxDEV(ClassComponent_1.DynatraceClassComponent, wrapperProps);
|
|
51
42
|
}
|
|
52
43
|
}
|
|
53
44
|
if (Array.isArray(args[1].children)) {
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const Types_1 = require("../model/Types");
|
|
4
|
+
const JsxRuntimeUtil_1 = require("./JsxRuntimeUtil");
|
|
5
|
+
const FunctionalComponent_1 = require("./components/FunctionalComponent");
|
|
6
|
+
const ClassComponent_1 = require("./components/ClassComponent");
|
|
7
|
+
const ElementHelper_1 = require("./ElementHelper");
|
|
8
|
+
const instrumentJsxCall = (jsxFunction) => (...args) => {
|
|
9
|
+
if (args[0] !== undefined &&
|
|
10
|
+
args[0]._dtInfo !== undefined &&
|
|
11
|
+
!(0, ElementHelper_1.isDtActionIgnore)(args[1])) {
|
|
12
|
+
if (args[0]._dtInfo.type === Types_1.Types.FunctionalComponent) {
|
|
13
|
+
const wrapperProps = {
|
|
14
|
+
children: jsxFunction(...args),
|
|
15
|
+
};
|
|
16
|
+
wrapperProps.dtActionName =
|
|
17
|
+
args[1] !== undefined && args[1].dtActionName !== undefined
|
|
18
|
+
? args[1].dtActionName
|
|
19
|
+
: args[0]._dtInfo.name;
|
|
20
|
+
if (args[2] !== undefined) {
|
|
21
|
+
return jsxFunction(FunctionalComponent_1.DynatraceFunctionalComponent, wrapperProps, args[2] + '_dt');
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
return jsxFunction(FunctionalComponent_1.DynatraceFunctionalComponent, wrapperProps);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
else if (args[0]._dtInfo.type === Types_1.Types.ClassComponent &&
|
|
28
|
+
args[0].prototype !== undefined &&
|
|
29
|
+
args[0].prototype.isReactComponent !== undefined) {
|
|
30
|
+
const wrapperProps = {
|
|
31
|
+
children: jsxFunction(...args),
|
|
32
|
+
};
|
|
33
|
+
if (args[2] !== undefined) {
|
|
34
|
+
return jsxFunction(ClassComponent_1.DynatraceClassComponent, wrapperProps, args[2] + '_dt');
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
return jsxFunction(ClassComponent_1.DynatraceClassComponent, wrapperProps);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
if (Array.isArray(args[1].children)) {
|
|
41
|
+
(0, ElementHelper_1.modifyElement)(args[0], args[1], ...args[1].children);
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
(0, ElementHelper_1.modifyElement)(args[0], args[1], args[1].children);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
return jsxFunction(...args);
|
|
48
|
+
};
|
|
49
|
+
try {
|
|
50
|
+
const _jsxRuntime = (0, JsxRuntimeUtil_1.dynamicRequireJSXRuntime)();
|
|
51
|
+
if (_jsxRuntime != null) {
|
|
52
|
+
const jsx = instrumentJsxCall(_jsxRuntime.jsx);
|
|
53
|
+
const jsxs = instrumentJsxCall(_jsxRuntime.jsxs);
|
|
54
|
+
module.exports = Object.assign(Object.assign({}, _jsxRuntime), { jsx,
|
|
55
|
+
jsxs });
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
module.exports = {};
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
catch (error) {
|
|
62
|
+
module.exports = {};
|
|
63
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.dynamicRequireJSXDevRuntime = exports.dynamicRequireJSXRuntime = void 0;
|
|
4
|
+
const dynamicRequireJSXRuntime = () => {
|
|
5
|
+
try {
|
|
6
|
+
return require('react/jsx-runtime.js');
|
|
7
|
+
}
|
|
8
|
+
catch (error) {
|
|
9
|
+
try {
|
|
10
|
+
return require('../../../react/jsx-runtime');
|
|
11
|
+
}
|
|
12
|
+
catch (error) {
|
|
13
|
+
return null;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
exports.dynamicRequireJSXRuntime = dynamicRequireJSXRuntime;
|
|
18
|
+
const dynamicRequireJSXDevRuntime = () => {
|
|
19
|
+
try {
|
|
20
|
+
return require('react/jsx-dev-runtime.js');
|
|
21
|
+
}
|
|
22
|
+
catch (error) {
|
|
23
|
+
try {
|
|
24
|
+
return require('../../../react/jsx-dev-runtime');
|
|
25
|
+
}
|
|
26
|
+
catch (error) {
|
|
27
|
+
return null;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
exports.dynamicRequireJSXDevRuntime = dynamicRequireJSXDevRuntime;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DynatraceClassComponent = void 0;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
const ConfigurationHandler_1 = require("../../../lib/core/configuration/ConfigurationHandler");
|
|
6
|
+
const ConsoleLogger_1 = require("../../../lib/core/logging/ConsoleLogger");
|
|
7
|
+
const Dynatrace_1 = require("../../../lib/core/Dynatrace");
|
|
8
|
+
const ComponentUtil_1 = require("./ComponentUtil");
|
|
9
|
+
class DynatraceClassComponent extends react_1.Component {
|
|
10
|
+
constructor(props) {
|
|
11
|
+
super(props);
|
|
12
|
+
this.wrappingName = (0, ComponentUtil_1.getNameFromComponent)(props);
|
|
13
|
+
this.componentMounted = false;
|
|
14
|
+
this.logger = new ConsoleLogger_1.ConsoleLogger(`Component ${this.wrappingName}`);
|
|
15
|
+
}
|
|
16
|
+
render() {
|
|
17
|
+
if (!ConfigurationHandler_1.ConfigurationHandler.isConfigurationAvailable()) {
|
|
18
|
+
this.logger.info('React Native plugin has not been started yet! Component will not be reported!');
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
if (ConfigurationHandler_1.ConfigurationHandler.isLifecycleUpdateEnabled() ||
|
|
22
|
+
!this.componentMounted) {
|
|
23
|
+
const actionPrefix = !this.componentMounted
|
|
24
|
+
? 'Render '
|
|
25
|
+
: 'Update ';
|
|
26
|
+
this.internalAction = Dynatrace_1.Dynatrace.enterAutoAction(actionPrefix + this.wrappingName);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
return this.props.children;
|
|
30
|
+
}
|
|
31
|
+
componentWillUnmount() {
|
|
32
|
+
this.componentMounted = false;
|
|
33
|
+
}
|
|
34
|
+
componentDidUpdate() {
|
|
35
|
+
this.reportFunctionEvent('componentDidUpdate()');
|
|
36
|
+
}
|
|
37
|
+
componentDidMount() {
|
|
38
|
+
this.componentMounted = true;
|
|
39
|
+
this.reportFunctionEvent('componentDidMount()');
|
|
40
|
+
}
|
|
41
|
+
reportFunctionEvent(event) {
|
|
42
|
+
if (this.internalAction !== undefined) {
|
|
43
|
+
this.internalAction.reportEvent(`${this.wrappingName}.${event}`);
|
|
44
|
+
this.internalAction.leaveAction();
|
|
45
|
+
this.internalAction = undefined;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
exports.DynatraceClassComponent = DynatraceClassComponent;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getNameFromComponent = void 0;
|
|
4
|
+
const getNameFromComponent = (props) => {
|
|
5
|
+
if (props !== undefined && props.children !== undefined) {
|
|
6
|
+
let child;
|
|
7
|
+
if (Array.isArray(props.children) && props.children.length === 1) {
|
|
8
|
+
child = props.children[0];
|
|
9
|
+
}
|
|
10
|
+
else {
|
|
11
|
+
child = props.children;
|
|
12
|
+
}
|
|
13
|
+
if (child.props !== undefined &&
|
|
14
|
+
child.props.dtActionName !== undefined) {
|
|
15
|
+
return child.props.dtActionName;
|
|
16
|
+
}
|
|
17
|
+
else if (child.type !== undefined) {
|
|
18
|
+
if (child.type.displayName !== undefined) {
|
|
19
|
+
return child.type.displayName;
|
|
20
|
+
}
|
|
21
|
+
else if (child.type._dtInfo !== undefined) {
|
|
22
|
+
return child.type._dtInfo.name;
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
return child.type.name;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
return 'Undefined Name';
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
exports.getNameFromComponent = getNameFromComponent;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DynatraceFunctionalComponent = void 0;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
const Dynatrace_1 = require("../../../lib/core/Dynatrace");
|
|
6
|
+
const NullAction_1 = require("../../../lib/core/NullAction");
|
|
7
|
+
const ConsoleLogger_1 = require("../../../lib/core/logging/ConsoleLogger");
|
|
8
|
+
const ComponentUtil_1 = require("./ComponentUtil");
|
|
9
|
+
const DynatraceFunctionalComponent = (props) => {
|
|
10
|
+
const componentName = (0, ComponentUtil_1.getNameFromComponent)(props);
|
|
11
|
+
const action = Dynatrace_1.Dynatrace.enterAutoAction(`Render ${componentName}`);
|
|
12
|
+
if (action instanceof NullAction_1.NullAction) {
|
|
13
|
+
new ConsoleLogger_1.ConsoleLogger(`Component ${componentName}`).info('React Native plugin has not been started yet! Component will not be reported!');
|
|
14
|
+
}
|
|
15
|
+
(0, react_1.useEffect)(() => {
|
|
16
|
+
action.leaveAction();
|
|
17
|
+
});
|
|
18
|
+
return props.children;
|
|
19
|
+
};
|
|
20
|
+
exports.DynatraceFunctionalComponent = DynatraceFunctionalComponent;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PickerHelper = void 0;
|
|
4
|
-
const IDynatraceProperties_1 = require("
|
|
4
|
+
const IDynatraceProperties_1 = require("../IDynatraceProperties");
|
|
5
5
|
const PickerHelper = (Dynatrace) => ({
|
|
6
6
|
attachOnValueChange: (pickerProps) => {
|
|
7
7
|
if ((0, IDynatraceProperties_1.isDynatraceIgnored)(pickerProps)) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.RefreshControlHelper = void 0;
|
|
4
|
-
const IDynatraceProperties_1 = require("
|
|
4
|
+
const IDynatraceProperties_1 = require("../IDynatraceProperties");
|
|
5
5
|
const RefreshControlHelper = (Dynatrace) => ({
|
|
6
6
|
attachOnRefresh: (refreshControlProps) => {
|
|
7
7
|
if ((0, IDynatraceProperties_1.isDynatraceIgnored)(refreshControlProps)) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SwitchHelper = void 0;
|
|
4
|
-
const IDynatraceProperties_1 = require("
|
|
4
|
+
const IDynatraceProperties_1 = require("../IDynatraceProperties");
|
|
5
5
|
const SwitchHelper = (Dynatrace) => ({
|
|
6
6
|
attachOnValueChange: (switchProps) => {
|
|
7
7
|
if ((0, IDynatraceProperties_1.isDynatraceIgnored)(switchProps)) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TouchableHelper = void 0;
|
|
4
|
-
const ConfigurationHandler_1 = require("
|
|
5
|
-
const IDynatraceProperties_1 = require("
|
|
4
|
+
const ConfigurationHandler_1 = require("../../../lib/core/configuration/ConfigurationHandler");
|
|
5
|
+
const IDynatraceProperties_1 = require("../IDynatraceProperties");
|
|
6
6
|
const TouchableHelper = (Dynatrace, Logger) => ({
|
|
7
7
|
attachOnPress(longPress, props, children) {
|
|
8
8
|
const origFunction = longPress && this._isLongPress(props)
|
|
@@ -12,7 +12,7 @@ const TouchableHelper = (Dynatrace, Logger) => ({
|
|
|
12
12
|
const isButton = this._isPropsButton(props);
|
|
13
13
|
const wrappedFunction = (event) => {
|
|
14
14
|
if (nameOfAction == null) {
|
|
15
|
-
Logger.
|
|
15
|
+
Logger.debug('Skipping creation of action as no name was found!');
|
|
16
16
|
if (origFunction != null) {
|
|
17
17
|
return origFunction(event);
|
|
18
18
|
}
|
|
@@ -20,11 +20,11 @@ const TouchableHelper = (Dynatrace, Logger) => ({
|
|
|
20
20
|
else if (origFunction != null &&
|
|
21
21
|
origFunction._dtWrapped !== undefined &&
|
|
22
22
|
origFunction._dtWrapped === true) {
|
|
23
|
-
Logger.
|
|
23
|
+
Logger.debug(`Skip wrapping of ${nameOfAction} onPress as it is already wrapped!`);
|
|
24
24
|
return origFunction(event);
|
|
25
25
|
}
|
|
26
26
|
else if (!ConfigurationHandler_1.ConfigurationHandler.isConfigurationAvailable()) {
|
|
27
|
-
Logger.
|
|
27
|
+
Logger.info('React Native plugin has not been started yet! Touch will not be reported!');
|
|
28
28
|
if (origFunction != null) {
|
|
29
29
|
return origFunction(event);
|
|
30
30
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.instrumentationDefaultImport = exports.instrumentationModule = exports.instrumentationFolder = exports.instrumentationInfo = void 0;
|
|
4
|
+
exports.instrumentationInfo = [];
|
|
5
|
+
exports.instrumentationFolder = '@dynatrace/react-native-plugin/instrumentation/libs';
|
|
6
|
+
exports.instrumentationModule = `${exports.instrumentationFolder}/community/Picker`;
|
|
7
|
+
exports.instrumentationDefaultImport = exports.instrumentationModule;
|
|
8
|
+
const generateInstrumentation = (name) => ({
|
|
9
|
+
old: {
|
|
10
|
+
module: '@react-native-picker/picker',
|
|
11
|
+
reference: name,
|
|
12
|
+
},
|
|
13
|
+
new: {
|
|
14
|
+
module: exports.instrumentationModule,
|
|
15
|
+
reference: name,
|
|
16
|
+
defaultImport: exports.instrumentationModule,
|
|
17
|
+
},
|
|
18
|
+
});
|
|
19
|
+
exports.instrumentationInfo.push(generateInstrumentation('Picker'));
|
|
20
|
+
exports.instrumentationInfo.push(generateInstrumentation('PickerIOS'));
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
var _a, _b;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
require("proxy-polyfill");
|
|
5
|
-
const Types_1 = require("
|
|
5
|
+
const Types_1 = require("../../model/Types");
|
|
6
6
|
const PickerRN = require('@react-native-picker/picker');
|
|
7
7
|
const dynatraceProxy = new Proxy(PickerRN, {
|
|
8
8
|
get: (target, property) => {
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.instrumentationDefaultImport = exports.instrumentationModule = exports.instrumentationFolder = exports.instrumentationInfo = void 0;
|
|
4
|
+
exports.instrumentationInfo = [];
|
|
5
|
+
exports.instrumentationFolder = '@dynatrace/react-native-plugin/instrumentation/libs';
|
|
6
|
+
exports.instrumentationModule = `${exports.instrumentationFolder}/community/gesture-handler/`;
|
|
7
|
+
exports.instrumentationDefaultImport = `${exports.instrumentationFolder}/gesture-handler`;
|
|
8
|
+
const generateInstrumentation = (name) => ({
|
|
9
|
+
old: {
|
|
10
|
+
module: 'react-native-gesture-handler',
|
|
11
|
+
reference: name,
|
|
12
|
+
},
|
|
13
|
+
new: {
|
|
14
|
+
module: exports.instrumentationModule,
|
|
15
|
+
reference: name,
|
|
16
|
+
defaultImport: exports.instrumentationDefaultImport,
|
|
17
|
+
},
|
|
18
|
+
});
|
|
19
|
+
exports.instrumentationInfo.push(generateInstrumentation('TouchableHighlight'));
|
|
20
|
+
exports.instrumentationInfo.push(generateInstrumentation('TouchableOpacity'));
|
|
21
|
+
exports.instrumentationInfo.push(generateInstrumentation('TouchableNativeFeedback'));
|
|
22
|
+
exports.instrumentationInfo.push(generateInstrumentation('TouchableWithoutFeedback'));
|
|
23
|
+
exports.instrumentationInfo.push(generateInstrumentation('RectButton'));
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
var _a, _b, _c, _d;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.RectButton = exports.TouchableWithoutFeedback = exports.TouchableNativeFeedback = exports.TouchableHighlight = exports.TouchableOpacity = void 0;
|
|
5
|
-
const Types_1 = require("
|
|
5
|
+
const Types_1 = require("../../../model/Types");
|
|
6
6
|
const gestureHandler = require('react-native-gesture-handler');
|
|
7
7
|
if (gestureHandler !== undefined) {
|
|
8
8
|
if (typeof gestureHandler.TouchableOpacity !== 'object') {
|
|
@@ -5,8 +5,8 @@ exports.instrumentationInfo = [];
|
|
|
5
5
|
exports.instrumentationInfo.push({
|
|
6
6
|
old: { module: 'react-native', reference: 'RefreshControl' },
|
|
7
7
|
new: {
|
|
8
|
-
module: '@dynatrace/react-native-plugin/
|
|
8
|
+
module: '@dynatrace/react-native-plugin/instrumentation/libs/react-native/',
|
|
9
9
|
reference: 'RefreshControl',
|
|
10
|
-
defaultImport: '@dynatrace/react-native-plugin/
|
|
10
|
+
defaultImport: '@dynatrace/react-native-plugin/instrumentation/libs/react-native',
|
|
11
11
|
},
|
|
12
12
|
});
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
var _a;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.RefreshControl = void 0;
|
|
5
|
-
const
|
|
6
|
-
const Types_1 = require("
|
|
7
|
-
if (typeof
|
|
8
|
-
exports.RefreshControl = Object.assign({ _dtInfo: { type: Types_1.Types.RefreshControl } },
|
|
5
|
+
const react_native_1 = require("react-native");
|
|
6
|
+
const Types_1 = require("../../model/Types");
|
|
7
|
+
if (typeof react_native_1.RefreshControl === 'object') {
|
|
8
|
+
exports.RefreshControl = Object.assign({ _dtInfo: { type: Types_1.Types.RefreshControl } }, react_native_1.RefreshControl);
|
|
9
9
|
}
|
|
10
10
|
else {
|
|
11
|
-
exports.RefreshControl = (_a = class RefreshControl extends
|
|
11
|
+
exports.RefreshControl = (_a = class RefreshControl extends react_native_1.RefreshControl {
|
|
12
12
|
},
|
|
13
13
|
_a._dtInfo = { type: Types_1.Types.RefreshControl },
|
|
14
14
|
_a);
|
|
@@ -5,8 +5,8 @@ exports.instrumentationInfo = [];
|
|
|
5
5
|
exports.instrumentationInfo.push({
|
|
6
6
|
old: { module: 'react-native', reference: 'Switch' },
|
|
7
7
|
new: {
|
|
8
|
-
module: '@dynatrace/react-native-plugin/
|
|
8
|
+
module: '@dynatrace/react-native-plugin/instrumentation/libs/react-native/',
|
|
9
9
|
reference: 'Switch',
|
|
10
|
-
defaultImport: '@dynatrace/react-native-plugin/
|
|
10
|
+
defaultImport: '@dynatrace/react-native-plugin/instrumentation/libs/react-native',
|
|
11
11
|
},
|
|
12
12
|
});
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
var _a;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.Switch = void 0;
|
|
5
|
-
const
|
|
6
|
-
const Types_1 = require("
|
|
7
|
-
if (typeof
|
|
8
|
-
exports.Switch = Object.assign({ _dtInfo: { type: Types_1.Types.Switch } },
|
|
5
|
+
const react_native_1 = require("react-native");
|
|
6
|
+
const Types_1 = require("../../model/Types");
|
|
7
|
+
if (typeof react_native_1.Switch === 'object') {
|
|
8
|
+
exports.Switch = Object.assign({ _dtInfo: { type: Types_1.Types.Switch } }, react_native_1.Switch);
|
|
9
9
|
}
|
|
10
10
|
else {
|
|
11
|
-
exports.Switch = (_a = class Switch extends
|
|
11
|
+
exports.Switch = (_a = class Switch extends react_native_1.Switch {
|
|
12
12
|
},
|
|
13
13
|
_a._dtInfo = { type: Types_1.Types.Switch },
|
|
14
14
|
_a);
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.instrumentationDefaultImport = exports.instrumentationModule = exports.instrumentationFolder = exports.instrumentationInfo = void 0;
|
|
4
|
+
exports.instrumentationInfo = [];
|
|
5
|
+
exports.instrumentationFolder = '@dynatrace/react-native-plugin/instrumentation/libs';
|
|
6
|
+
exports.instrumentationModule = `${exports.instrumentationFolder}/react-native/`;
|
|
7
|
+
exports.instrumentationDefaultImport = `${exports.instrumentationFolder}/react-native`;
|
|
8
|
+
const generateInstrumentation = (name) => ({
|
|
9
|
+
old: {
|
|
10
|
+
module: 'react-native',
|
|
11
|
+
reference: name,
|
|
12
|
+
},
|
|
13
|
+
new: {
|
|
14
|
+
module: exports.instrumentationModule,
|
|
15
|
+
reference: name,
|
|
16
|
+
defaultImport: exports.instrumentationDefaultImport,
|
|
17
|
+
},
|
|
18
|
+
});
|
|
19
|
+
exports.instrumentationInfo.push(generateInstrumentation('TouchableHighlight'));
|
|
20
|
+
exports.instrumentationInfo.push(generateInstrumentation('TouchableOpacity'));
|
|
21
|
+
exports.instrumentationInfo.push(generateInstrumentation('TouchableNativeFeedback'));
|
|
22
|
+
exports.instrumentationInfo.push(generateInstrumentation('TouchableWithoutFeedback'));
|
|
23
|
+
exports.instrumentationInfo.push(generateInstrumentation('Button'));
|
|
24
|
+
exports.instrumentationInfo.push(generateInstrumentation('Text'));
|
|
25
|
+
exports.instrumentationInfo.push(generateInstrumentation('Pressable'));
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
4
4
|
exports.Pressable = exports.Text = exports.TouchableWithoutFeedback = exports.TouchableNativeFeedback = exports.TouchableHighlight = exports.TouchableOpacity = exports.Button = void 0;
|
|
5
5
|
const ReactNative = require("react-native");
|
|
6
6
|
const React = require("react");
|
|
7
|
-
const Types_1 = require("
|
|
7
|
+
const Types_1 = require("../../model/Types");
|
|
8
8
|
exports.Button = React.forwardRef((props, ref) => (React.createElement(ReactNative.Button, Object.assign({}, props, { ref: ref }))));
|
|
9
9
|
exports.Button._dtInfo = { type: Types_1.Types.Button };
|
|
10
10
|
if (typeof ReactNative.TouchableOpacity === 'object') {
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.registerListener = void 0;
|
|
4
|
-
const
|
|
5
|
-
const
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
const ConsoleLogger_1 = require("../../../lib/core/logging/ConsoleLogger");
|
|
6
6
|
let isRegistered = false;
|
|
7
|
+
const logger = new ConsoleLogger_1.ConsoleLogger('ReactNavigation');
|
|
7
8
|
const registerListener = (navContainer) => {
|
|
8
|
-
|
|
9
|
+
(0, react_1.useEffect)(() => {
|
|
9
10
|
if (isRegistered &&
|
|
10
11
|
navContainer.current != null &&
|
|
11
12
|
navContainer.current.addListener != null) {
|
|
@@ -14,11 +15,11 @@ const registerListener = (navContainer) => {
|
|
|
14
15
|
if (data != null &&
|
|
15
16
|
data.data != null &&
|
|
16
17
|
data.data.action != null) {
|
|
17
|
-
|
|
18
|
+
logger.debug(`Listener Dispatch: ${JSON.stringify(data.data.action)}`);
|
|
18
19
|
}
|
|
19
20
|
});
|
|
20
21
|
navContainer.current.addListener('state', (state) => {
|
|
21
|
-
|
|
22
|
+
logger.debug(`Listener State: ${JSON.stringify(state)}`);
|
|
22
23
|
});
|
|
23
24
|
}
|
|
24
25
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.Types = void 0;
|
|
4
4
|
var Types;
|
|
5
5
|
(function (Types) {
|
|
6
6
|
Types[Types["FunctionalComponent"] = 0] = "FunctionalComponent";
|
|
@@ -21,16 +21,3 @@ var Types;
|
|
|
21
21
|
Types[Types["RefreshControl"] = 15] = "RefreshControl";
|
|
22
22
|
Types[Types["Switch"] = 16] = "Switch";
|
|
23
23
|
})(Types = exports.Types || (exports.Types = {}));
|
|
24
|
-
const isTypeReactNativeTouchable = (type) => type === Types.TouchableHighlight ||
|
|
25
|
-
type === Types.TouchableNativeFeedback ||
|
|
26
|
-
type === Types.TouchableOpacity ||
|
|
27
|
-
type === Types.TouchableWithoutFeedback;
|
|
28
|
-
exports.isTypeReactNativeTouchable = isTypeReactNativeTouchable;
|
|
29
|
-
const isTypeGestureHandlerTouchable = (type) => type === Types.TouchableHighlightGestureHandler ||
|
|
30
|
-
type === Types.TouchableNativeFeedbackGestureHandler ||
|
|
31
|
-
type === Types.TouchableOpacityGestureHandler ||
|
|
32
|
-
type === Types.TouchableWithoutFeedbackGestureHandler ||
|
|
33
|
-
type === Types.RectButtonGestureHandler;
|
|
34
|
-
exports.isTypeGestureHandlerTouchable = isTypeGestureHandlerTouchable;
|
|
35
|
-
const isTypeTouchable = (type) => (0, exports.isTypeGestureHandlerTouchable)(type) || (0, exports.isTypeReactNativeTouchable)(type);
|
|
36
|
-
exports.isTypeTouchable = isTypeTouchable;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isTypeTouchable = exports.isTypeGestureHandlerTouchable = exports.isTypeReactNativeTouchable = void 0;
|
|
4
|
+
const Types_1 = require("./Types");
|
|
5
|
+
const isTypeReactNativeTouchable = (type) => type === Types_1.Types.TouchableHighlight ||
|
|
6
|
+
type === Types_1.Types.TouchableNativeFeedback ||
|
|
7
|
+
type === Types_1.Types.TouchableOpacity ||
|
|
8
|
+
type === Types_1.Types.TouchableWithoutFeedback;
|
|
9
|
+
exports.isTypeReactNativeTouchable = isTypeReactNativeTouchable;
|
|
10
|
+
const isTypeGestureHandlerTouchable = (type) => type === Types_1.Types.TouchableHighlightGestureHandler ||
|
|
11
|
+
type === Types_1.Types.TouchableNativeFeedbackGestureHandler ||
|
|
12
|
+
type === Types_1.Types.TouchableOpacityGestureHandler ||
|
|
13
|
+
type === Types_1.Types.TouchableWithoutFeedbackGestureHandler ||
|
|
14
|
+
type === Types_1.Types.RectButtonGestureHandler;
|
|
15
|
+
exports.isTypeGestureHandlerTouchable = isTypeGestureHandlerTouchable;
|
|
16
|
+
const isTypeTouchable = (type) => (0, exports.isTypeGestureHandlerTouchable)(type) || (0, exports.isTypeReactNativeTouchable)(type);
|
|
17
|
+
exports.isTypeTouchable = isTypeTouchable;
|