@adobe/helix-rum-enhancer 1.8.1 → 1.9.0
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/CHANGELOG.md +7 -0
- package/package.json +5 -5
- package/src/index.js +4 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
# [1.9.0](https://github.com/adobe/helix-rum-enhancer/compare/v1.8.1...v1.9.0) (2023-12-11)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* add support for source/target data attributes ([27739c6](https://github.com/adobe/helix-rum-enhancer/commit/27739c660b41f84df4e20d38efcf00d5335c7f5d))
|
|
7
|
+
|
|
1
8
|
## [1.8.1](https://github.com/adobe/helix-rum-enhancer/compare/v1.8.0...v1.8.1) (2023-11-29)
|
|
2
9
|
|
|
3
10
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adobe/helix-rum-enhancer",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.9.0",
|
|
4
4
|
"description": "Helix RUM Enhancer",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -31,19 +31,19 @@
|
|
|
31
31
|
"@adobe/eslint-config-helix": "2.0.5",
|
|
32
32
|
"@semantic-release/changelog": "6.0.3",
|
|
33
33
|
"@semantic-release/git": "10.0.1",
|
|
34
|
-
"@semantic-release/npm": "11.0.
|
|
34
|
+
"@semantic-release/npm": "11.0.2",
|
|
35
35
|
"c8": "8.0.1",
|
|
36
36
|
"codecov": "3.8.3",
|
|
37
|
-
"eslint": "8.
|
|
37
|
+
"eslint": "8.55.0",
|
|
38
38
|
"eslint-plugin-header": "3.1.1",
|
|
39
39
|
"eslint-plugin-import": "2.29.0",
|
|
40
40
|
"husky": "8.0.3",
|
|
41
41
|
"jsdoc-to-markdown": "8.0.0",
|
|
42
42
|
"junit-report-builder": "3.1.0",
|
|
43
|
-
"lint-staged": "15.
|
|
43
|
+
"lint-staged": "15.2.0",
|
|
44
44
|
"mocha": "10.2.0",
|
|
45
45
|
"mocha-multi-reporters": "1.5.1",
|
|
46
|
-
"semantic-release": "22.0.
|
|
46
|
+
"semantic-release": "22.0.10"
|
|
47
47
|
},
|
|
48
48
|
"lint-staged": {
|
|
49
49
|
"*.js": "eslint",
|
package/src/index.js
CHANGED
|
@@ -67,7 +67,7 @@ new PerformanceObserver((list) => list
|
|
|
67
67
|
.observe({ type: 'navigation', buffered: true });
|
|
68
68
|
|
|
69
69
|
sampleRUM.targetselector = (element) => {
|
|
70
|
-
let value = element.getAttribute('href') || element.currentSrc || element.getAttribute('src')
|
|
70
|
+
let value = element.getAttribute('data-rum-target') || element.getAttribute('href') || element.currentSrc || element.getAttribute('src')
|
|
71
71
|
|| element.dataset.action || element.action;
|
|
72
72
|
if (value && value.startsWith('https://')) {
|
|
73
73
|
// resolve relative links
|
|
@@ -115,7 +115,9 @@ sampleRUM.sourceselector = (element) => {
|
|
|
115
115
|
if (element === document.body || element === document.documentElement || !element) {
|
|
116
116
|
return undefined;
|
|
117
117
|
}
|
|
118
|
-
|
|
118
|
+
if (element.getAttribute('data-rum-source')) {
|
|
119
|
+
return element.getAttribute('data-rum-source');
|
|
120
|
+
}
|
|
119
121
|
const form = element.closest('form');
|
|
120
122
|
let formElementSelector = '';
|
|
121
123
|
if (form && Array.from(form.elements).includes(element)) {
|