@dynatrace/react-native-plugin 2.271.1 → 2.271.2
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 +2 -1
- package/index.js +1 -1
- package/lib/CreateElement.js +24 -0
- package/lib/jsx-runtime.js +1 -17
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1169,8 +1169,9 @@ If you are struggling with a problem, submit a support ticket to Dynatrace (supp
|
|
|
1169
1169
|
<br/><br/>
|
|
1170
1170
|
## Changelog
|
|
1171
1171
|
|
|
1172
|
-
2.271.
|
|
1172
|
+
2.271.2
|
|
1173
1173
|
* Update Android (8.271.1.1003) & iOS Agent (8.271.2.1007)
|
|
1174
|
+
* Fixed createElement logic for older React Native versions
|
|
1174
1175
|
|
|
1175
1176
|
2.269.1
|
|
1176
1177
|
* Update Android (8.269.1.1009) & iOS Agent (8.269.1.1007)
|
package/index.js
CHANGED
|
@@ -5,4 +5,4 @@ export { Platform } from './lib/instrumentor/base/model/Platform';
|
|
|
5
5
|
export { LogLevel } from './lib/instrumentor/base/model/LogLevel';
|
|
6
6
|
export { ApplicationHandler } from './lib/instrumentor/base/Application';
|
|
7
7
|
export { UserPrivacyOptions } from './lib/instrumentor/base/UserPrivacyOptions';
|
|
8
|
-
export { createElement } from './
|
|
8
|
+
export { createElement } from './lib/CreateElement';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const ElementHelper_1 = require("./instrumentor/base/ElementHelper");
|
|
4
|
+
const Types_1 = require("./instrumentor/model/Types");
|
|
5
|
+
const Component_1 = require("./react/Component");
|
|
6
|
+
const _createElement = require('react').createElement;
|
|
7
|
+
const createElement = (type, props, ...children) => {
|
|
8
|
+
if (type != null && type._dtInfo != null && !(0, ElementHelper_1.isDtActionIgnore)(props)) {
|
|
9
|
+
if (type._dtInfo.type === Types_1.Types.FunctionalComponent) {
|
|
10
|
+
return _createElement(Component_1.DynatraceFnWrapper, {}, _createElement(type, props, ...children));
|
|
11
|
+
}
|
|
12
|
+
else if (type._dtInfo.type === Types_1.Types.ClassComponent &&
|
|
13
|
+
type.prototype !== undefined && type.prototype.isReactComponent !== undefined) {
|
|
14
|
+
return _createElement(Component_1.DynatraceClassWrapper, {}, _createElement(type, props, ...children));
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
(0, ElementHelper_1.modifyElement)(type, props, ...children);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return _createElement(type, props, ...children);
|
|
21
|
+
};
|
|
22
|
+
module.exports = {
|
|
23
|
+
createElement,
|
|
24
|
+
};
|
package/lib/jsx-runtime.js
CHANGED
|
@@ -17,7 +17,6 @@ try {
|
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
if (_jsxRuntime != null) {
|
|
20
|
-
const _createElement = require('react').createElement;
|
|
21
20
|
const jsxProd = (type, config, maybeKey) => jsxHelper(_jsxRuntime.jsx, type, config, [maybeKey]);
|
|
22
21
|
const jsxDev = (type, config, maybeKey, source, self) => jsxHelper(_jsxRuntime.jsx, type, config, [maybeKey, source, self]);
|
|
23
22
|
const jsxsDev = (type, config, maybeKey, source, self) => jsxHelper(_jsxRuntime.jsxs, type, config, [maybeKey, source, self]);
|
|
@@ -45,22 +44,7 @@ try {
|
|
|
45
44
|
}
|
|
46
45
|
return jsxFn(type, config, ...args);
|
|
47
46
|
};
|
|
48
|
-
|
|
49
|
-
if (type != null && type._dtInfo != null && !(0, ElementHelper_1.isDtActionIgnore)(props)) {
|
|
50
|
-
if (type._dtInfo.type === Types_1.Types.FunctionalComponent) {
|
|
51
|
-
return _createElement(Component_1.DynatraceFnWrapper, {}, _createElement(type, props, ...children));
|
|
52
|
-
}
|
|
53
|
-
else if (type._dtInfo.type === Types_1.Types.ClassComponent &&
|
|
54
|
-
type.prototype !== undefined && type.prototype.isReactComponent !== undefined) {
|
|
55
|
-
return _createElement(Component_1.DynatraceClassWrapper, {}, _createElement(type, props, ...children));
|
|
56
|
-
}
|
|
57
|
-
else {
|
|
58
|
-
(0, ElementHelper_1.modifyElement)(type, props, ...children);
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
return _createElement(type, props, ...children);
|
|
62
|
-
};
|
|
63
|
-
module.exports = Object.assign(Object.assign({}, _jsxRuntime), { jsx: __DEV__ ? jsxDev : jsxProd, jsxs: __DEV__ ? jsxsDev : jsxProd, createElement });
|
|
47
|
+
module.exports = Object.assign(Object.assign({}, _jsxRuntime), { jsx: __DEV__ ? jsxDev : jsxProd, jsxs: __DEV__ ? jsxsDev : jsxProd });
|
|
64
48
|
}
|
|
65
49
|
else {
|
|
66
50
|
module.exports = {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynatrace/react-native-plugin",
|
|
3
|
-
"version": "2.271.
|
|
3
|
+
"version": "2.271.2",
|
|
4
4
|
"description": "This plugin gives you the ability to use the Dynatrace Mobile agent in your react native application.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "typings/react-native-dynatrace.d.ts",
|