@applitools/snippets 2.1.9 → 2.1.10

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 CHANGED
@@ -4,6 +4,10 @@
4
4
  ## Unreleased
5
5
 
6
6
 
7
+ ## 2.1.10 - 2021/12/20
8
+
9
+ - overwrite `transform` style property with `!important` in `translateTo`
10
+
7
11
  ## 2.1.9 - 2021/12/17
8
12
 
9
13
  - fix `scrollTo` which was returning the wrong actual scroll position due to `scroll-behavior: smooth` style on the scrollable element
@@ -27,5 +27,5 @@
27
27
  "scrollTo": "function(arg){var s=function(){\"use strict\";var t=function(t){var r=void 0===t?[]:t,o=r[0],e=r[1],l=Object.keys(e).sort(),n=l.reduce((function(t,r){return t[r]={value:o.style.getPropertyValue(r),important:Boolean(o.style.getPropertyPriority(r))},t}),{});return l.forEach((function(t){o.style.setProperty(t,\"string\"!=typeof e[t]&&e[t]?e[t].value:e[t],e[t]&&e[t].important?\"important\":\"\")})),n};return function(r){var o=void 0===r?[]:r,e=o[0],l=o[1];e=e||document.documentElement;var n=t([e,{\"scroll-behavior\":{value:\"auto\",important:!0}}]);return e.scrollTo?e.scrollTo(l.x,l.y):(e.scrollLeft=l.x,e.scrollTop=l.y),t([e,n]),{x:e.scrollLeft,y:e.scrollTop}}}();\nreturn s(arg)}",
28
28
  "setElementAttributes": "function(arg){var s=function(){\"use strict\";return function(t){var e=void 0===t?[]:t,r=e[0],u=e[1];return Object.keys(u).reduce((function(t,e){return t[e]=r.getAttribute(e),r.setAttribute(e,u[e]),t}),{})}}();\nreturn s(arg)}",
29
29
  "setElementStyleProperties": "function(arg){var s=function(){\"use strict\";return function(t){var r=void 0===t?[]:t,e=r[0],o=r[1],n=Object.keys(o).sort(),i=n.reduce((function(t,r){return t[r]={value:e.style.getPropertyValue(r),important:Boolean(e.style.getPropertyPriority(r))},t}),{});return n.forEach((function(t){e.style.setProperty(t,\"string\"!=typeof o[t]&&o[t]?o[t].value:o[t],o[t]&&o[t].important?\"important\":\"\")})),i}}();\nreturn s(arg)}",
30
- "translateTo": "function(arg){var s=function(){\"use strict\";var t=function(t){var r=void 0===t?[]:t,e=r[0],n=r[1],o=Object.keys(n).sort(),a=o.reduce((function(t,r){return t[r]={value:e.style.getPropertyValue(r),important:Boolean(e.style.getPropertyPriority(r))},t}),{});return o.forEach((function(t){e.style.setProperty(t,\"string\"!=typeof n[t]&&n[t]?n[t].value:n[t],n[t]&&n[t].important?\"important\":\"\")})),a};return function(r){var e=void 0===r?[]:r,n=e[0],o=e[1];n=n||document.documentElement;var a=\"translate(\"+-o.x+\"px, \"+-o.y+\"px)\";return t([n,{transform:{value:a},\"-webkit-transform\":{value:a}}]),o}}();\nreturn s(arg)}"
30
+ "translateTo": "function(arg){var s=function(){\"use strict\";var t=function(t){var r=void 0===t?[]:t,e=r[0],n=r[1],o=Object.keys(n).sort(),a=o.reduce((function(t,r){return t[r]={value:e.style.getPropertyValue(r),important:Boolean(e.style.getPropertyPriority(r))},t}),{});return o.forEach((function(t){e.style.setProperty(t,\"string\"!=typeof n[t]&&n[t]?n[t].value:n[t],n[t]&&n[t].important?\"important\":\"\")})),a};return function(r){var e=void 0===r?[]:r,n=e[0],o=e[1];n=n||document.documentElement;var a={value:\"translate(\"+-o.x+\"px, \"+-o.y+\"px)\",important:!0};return t([n,{transform:a,\"-webkit-transform\":a}]),o}}();\nreturn s(arg)}"
31
31
  }
package/dist/index.js CHANGED
@@ -111,6 +111,6 @@ var s=function(){"use strict";return function(t){var r=void 0===t?[]:t,e=r[0],o=
111
111
  return s(arg)
112
112
  }
113
113
  exports.translateTo=function(arg){
114
- var s=function(){"use strict";var t=function(t){var r=void 0===t?[]:t,e=r[0],n=r[1],o=Object.keys(n).sort(),a=o.reduce((function(t,r){return t[r]={value:e.style.getPropertyValue(r),important:Boolean(e.style.getPropertyPriority(r))},t}),{});return o.forEach((function(t){e.style.setProperty(t,"string"!=typeof n[t]&&n[t]?n[t].value:n[t],n[t]&&n[t].important?"important":"")})),a};return function(r){var e=void 0===r?[]:r,n=e[0],o=e[1];n=n||document.documentElement;var a="translate("+-o.x+"px, "+-o.y+"px)";return t([n,{transform:{value:a},"-webkit-transform":{value:a}}]),o}}();
114
+ var s=function(){"use strict";var t=function(t){var r=void 0===t?[]:t,e=r[0],n=r[1],o=Object.keys(n).sort(),a=o.reduce((function(t,r){return t[r]={value:e.style.getPropertyValue(r),important:Boolean(e.style.getPropertyPriority(r))},t}),{});return o.forEach((function(t){e.style.setProperty(t,"string"!=typeof n[t]&&n[t]?n[t].value:n[t],n[t]&&n[t].important?"important":"")})),a};return function(r){var e=void 0===r?[]:r,n=e[0],o=e[1];n=n||document.documentElement;var a={value:"translate("+-o.x+"px, "+-o.y+"px)",important:!0};return t([n,{transform:a,"-webkit-transform":a}]),o}}();
115
115
  return s(arg)
116
116
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applitools/snippets",
3
- "version": "2.1.9",
3
+ "version": "2.1.10",
4
4
  "license": "SEE LICENSE IN LICENSE",
5
5
  "main": "./dist/index.js",
6
6
  "files": [