@micromag/core 0.3.569 → 0.3.570
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/es/contexts.js +8 -4
- package/es/index.js +0 -19
- package/package.json +3 -3
package/es/contexts.js
CHANGED
|
@@ -1165,20 +1165,24 @@ var useTracking = function useTracking() {
|
|
|
1165
1165
|
};
|
|
1166
1166
|
var propTypes$2 = {
|
|
1167
1167
|
children: PropTypes.node.isRequired,
|
|
1168
|
-
variables: PropTypes$1.trackingVariables
|
|
1168
|
+
variables: PropTypes$1.trackingVariables,
|
|
1169
|
+
disabled: PropTypes.bool
|
|
1169
1170
|
};
|
|
1170
1171
|
var defaultProps$2 = {
|
|
1171
|
-
variables: null
|
|
1172
|
+
variables: null,
|
|
1173
|
+
disabled: false
|
|
1172
1174
|
};
|
|
1173
1175
|
var TrackingProvider = function TrackingProvider(_ref) {
|
|
1174
1176
|
var variables = _ref.variables,
|
|
1177
|
+
disabled = _ref.disabled,
|
|
1175
1178
|
children = _ref.children;
|
|
1176
1179
|
var contextTracking = useTracking() || null;
|
|
1177
1180
|
var tracking = useMemo(function () {
|
|
1178
1181
|
return new Tracking({
|
|
1179
|
-
variables: _objectSpread(_objectSpread({}, contextTracking !== null ? contextTracking.getVariables() : null), variables)
|
|
1182
|
+
variables: _objectSpread(_objectSpread({}, contextTracking !== null ? contextTracking.getVariables() : null), variables),
|
|
1183
|
+
disabled: disabled
|
|
1180
1184
|
});
|
|
1181
|
-
}, [contextTracking, variables]);
|
|
1185
|
+
}, [contextTracking, variables, disabled]);
|
|
1182
1186
|
return /*#__PURE__*/React.createElement(TrackingContainer, {
|
|
1183
1187
|
tracking: tracking
|
|
1184
1188
|
}, children);
|
package/es/index.js
CHANGED
|
@@ -2144,30 +2144,11 @@ var Tracking = /*#__PURE__*/function (_BaseTracking) {
|
|
|
2144
2144
|
var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
2145
2145
|
_classCallCheck(this, Tracking);
|
|
2146
2146
|
_this = _callSuper(this, Tracking, [opts]);
|
|
2147
|
-
var _this$options$variabl = _this.options.variables,
|
|
2148
|
-
variables = _this$options$variabl === void 0 ? null : _this$options$variabl;
|
|
2149
|
-
_this.variables = null;
|
|
2150
2147
|
_this.screensViewed = [];
|
|
2151
|
-
if (variables !== null) {
|
|
2152
|
-
_this.setVariables(variables);
|
|
2153
|
-
}
|
|
2154
2148
|
return _this;
|
|
2155
2149
|
}
|
|
2156
2150
|
_inherits(Tracking, _BaseTracking);
|
|
2157
2151
|
return _createClass(Tracking, [{
|
|
2158
|
-
key: "setVariables",
|
|
2159
|
-
value: function setVariables(variables) {
|
|
2160
|
-
this.variables = variables;
|
|
2161
|
-
if (variables !== null) {
|
|
2162
|
-
this.push(variables);
|
|
2163
|
-
}
|
|
2164
|
-
}
|
|
2165
|
-
}, {
|
|
2166
|
-
key: "getVariables",
|
|
2167
|
-
value: function getVariables() {
|
|
2168
|
-
return this.variables;
|
|
2169
|
-
}
|
|
2170
|
-
}, {
|
|
2171
2152
|
key: "trackScreenView",
|
|
2172
2153
|
value: function trackScreenView(screen, screenIndex) {
|
|
2173
2154
|
var _ref = this.variables || {},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/core",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.570",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"keywords": [
|
|
@@ -110,7 +110,7 @@
|
|
|
110
110
|
"@folklore/routes": "^0.2.27",
|
|
111
111
|
"@folklore/services": "^0.1.24",
|
|
112
112
|
"@folklore/size": "^0.1.20",
|
|
113
|
-
"@folklore/tracking": "^0.0.
|
|
113
|
+
"@folklore/tracking": "^0.0.18",
|
|
114
114
|
"@fortawesome/fontawesome-svg-core": "^6.5.2",
|
|
115
115
|
"@fortawesome/free-solid-svg-icons": "^6.5.2",
|
|
116
116
|
"@fortawesome/react-fontawesome": "^0.2.0",
|
|
@@ -144,5 +144,5 @@
|
|
|
144
144
|
"access": "public",
|
|
145
145
|
"registry": "https://registry.npmjs.org/"
|
|
146
146
|
},
|
|
147
|
-
"gitHead": "
|
|
147
|
+
"gitHead": "77ddf956df099afb685816a80bca648690751402"
|
|
148
148
|
}
|