@micromag/core 0.3.763 → 0.3.767

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.
Files changed (2) hide show
  1. package/es/index.js +16 -8
  2. package/package.json +3 -3
package/es/index.js CHANGED
@@ -2349,12 +2349,16 @@ var Tracking = /*#__PURE__*/function (_BaseTracking) {
2349
2349
  }
2350
2350
  }, {
2351
2351
  key: "trackEvent",
2352
- value: function trackEvent(category, action, label) {
2353
- var _ref4 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},
2352
+ value: function trackEvent() {
2353
+ var category = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
2354
+ var action = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
2355
+ var label = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
2356
+ var opts = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
2357
+ var _ref4 = opts || {},
2354
2358
  _ref4$value = _ref4.value,
2355
2359
  value = _ref4$value === void 0 ? null : _ref4$value,
2356
- opts = _objectWithoutProperties(_ref4, _excluded);
2357
- var data = _objectSpread(_objectSpread({}, opts), {}, {
2360
+ otherOpts = _objectWithoutProperties(_ref4, _excluded);
2361
+ var data = _objectSpread(_objectSpread({}, otherOpts || null), {}, {
2358
2362
  event: 'eventInteraction',
2359
2363
  eventCategory: category,
2360
2364
  eventAction: action,
@@ -2365,13 +2369,17 @@ var Tracking = /*#__PURE__*/function (_BaseTracking) {
2365
2369
  }
2366
2370
  }, {
2367
2371
  key: "trackMedia",
2368
- value: function trackMedia(type, media, action) {
2369
- var _ref5 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},
2372
+ value: function trackMedia() {
2373
+ var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
2374
+ var media = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
2375
+ var action = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
2376
+ var opts = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
2377
+ var _ref5 = opts || {},
2370
2378
  _ref5$value = _ref5.value,
2371
2379
  value = _ref5$value === void 0 ? null : _ref5$value,
2372
2380
  _ref5$currentTime = _ref5.currentTime,
2373
2381
  optsCurrentTime = _ref5$currentTime === void 0 ? null : _ref5$currentTime,
2374
- opts = _objectWithoutProperties(_ref5, _excluded2);
2382
+ otherOpts = _objectWithoutProperties(_ref5, _excluded2);
2375
2383
  var _ref6 = media || {},
2376
2384
  _ref6$id = _ref6.id,
2377
2385
  mediaId = _ref6$id === void 0 ? null : _ref6$id,
@@ -2388,7 +2396,7 @@ var Tracking = /*#__PURE__*/function (_BaseTracking) {
2388
2396
  var _ref7 = metadata || {},
2389
2397
  _ref7$duration = _ref7.duration,
2390
2398
  duration = _ref7$duration === void 0 ? rootDuration : _ref7$duration;
2391
- var data = _objectSpread(_objectSpread({}, opts), {}, {
2399
+ var data = _objectSpread(_objectSpread({}, otherOpts || null), {}, {
2392
2400
  event: 'eventInteraction',
2393
2401
  eventCategory: type,
2394
2402
  eventAction: action,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@micromag/core",
3
- "version": "0.3.763",
3
+ "version": "0.3.767",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "keywords": [
@@ -125,7 +125,7 @@
125
125
  "@folklore/routes": "^0.2.36",
126
126
  "@folklore/services": "^0.1.24",
127
127
  "@folklore/size": "^0.1.20",
128
- "@folklore/tracking": "~0.0.28",
128
+ "@folklore/tracking": "^0.0.34",
129
129
  "@fortawesome/fontawesome-svg-core": "^6.5.2",
130
130
  "@fortawesome/free-solid-svg-icons": "^6.5.2",
131
131
  "@fortawesome/react-fontawesome": "^0.2.0",
@@ -159,5 +159,5 @@
159
159
  "access": "public",
160
160
  "registry": "https://registry.npmjs.org/"
161
161
  },
162
- "gitHead": "843084e78ba9bf2de883b2c958bd38853cdc20e6"
162
+ "gitHead": "af57b08ccc073db83b6480e3a43fe14e6f36e0f6"
163
163
  }