Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@lrnwebcomponents/responsive-utility

Package Overview
Dependencies
Maintainers
4
Versions
111
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lrnwebcomponents/responsive-utility - npm Package Compare versions

Comparing version 2.0.7 to 2.0.8

7

package.json

@@ -14,3 +14,3 @@ {

},
"version": "2.0.7",
"version": "2.0.8",
"description": "Automated conversion of responsive-utility/",

@@ -43,3 +43,4 @@ "repository": {

"devDependencies": {
"@lrnwebcomponents/deduping-fix": "^2.0.5",
"@lrnwebcomponents/deduping-fix": "^2.0.8",
"@lrnwebcomponents/storybook-utilities": "^2.0.8",
"@polymer/iron-component-page": "github:PolymerElements/iron-component-page",

@@ -64,3 +65,3 @@ "@polymer/iron-demo-helpers": "3.0.2",

],
"gitHead": "33e63ccd15a4f3edd788b4a843c2d15f7089cae6"
"gitHead": "e32dcb0831ec951b08cedb01a8f9b5c2e3bcfdaf"
}

@@ -1,1 +0,1 @@

define(["exports","./node_modules/@polymer/polymer/polymer-legacy.js","./node_modules/@polymer/polymer/lib/utils/async.js","./node_modules/@polymer/iron-resizable-behavior/iron-resizable-behavior.js"],function(_exports,_polymerLegacy,async,_ironResizableBehavior){"use strict";Object.defineProperty(_exports,"__esModule",{value:!0});_exports.ResponsiveUtility=void 0;async=babelHelpers.interopRequireWildcard(async);function _templateObject_02129d4034da11e9bfc54d33adbd029c(){var data=babelHelpers.taggedTemplateLiteral(["\n <style>\n :host {\n display: inline;\n }\n </style>\n <slot></slot>\n "]);_templateObject_02129d4034da11e9bfc54d33adbd029c=function _templateObject_02129d4034da11e9bfc54d33adbd029c(){return data};return data}window.ResponsiveUtility={};window.ResponsiveUtility.instance=null;var ResponsiveUtility=(0,_polymerLegacy.Polymer)({_template:(0,_polymerLegacy.html)(_templateObject_02129d4034da11e9bfc54d33adbd029c()),is:"responsive-utility",behaviors:[_ironResizableBehavior.IronResizableBehavior],listeners:{"iron-resize":"_onIronResize"},properties:{details:{type:Array,value:[]}},created:function created(){var root=this;if(null==window.ResponsiveUtility.instance){window.ResponsiveUtility.instance=root}window.addEventListener("responsive-element",function(e){var detail={element:e.detail.element,attribute:e.detail.attribute!==void 0&&null!==e.detail.attribute?e.detail.attribute:"responsive-size",relativeToParent:e.detail.relativeToParent!==void 0&&null!==e.detail.relativeToParent?e.detail.relativeToParent:!0,sm:e.detail.sm!==void 0&&null!==e.detail.sm?e.detail.sm:900,md:e.detail.md!==void 0&&null!==e.detail.md?e.detail.md:1200,lg:e.detail.lg!==void 0&&null!==e.detail.lg?e.detail.lg:1500,xl:e.detail.xl!==void 0&&null!==e.detail.xl?e.detail.lg:1800};if("ResizeObserver"in window&&!0===detail.relativeToParent){var resize=new ResizeObserver(function(){window.ResponsiveUtility.setSize(detail)}),observable=e.detail.parentNode!==void 0&&null!==e.detail.parentNode?e.detail.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE?e.detail.element.parentNode.host:e.detail.element.parentNode:e.detail.element;resize.observe(observable)}root.push("details",detail);window.ResponsiveUtility.setSize(detail)});window.addEventListener("delete-responsive-element",function(e){for(var i=0;i<this.details.length;i++){if(e.detail===detail[i])root.splice("details",i,1)}})},_onIronResize:function _onIronResize(){for(var i=0;i<this.details.length;i++){window.ResponsiveUtility.setSize(this.details[i])}}});_exports.ResponsiveUtility=ResponsiveUtility;window.ResponsiveUtility.requestAvailability=function(){if(null==window.ResponsiveUtility.instance){window.ResponsiveUtility.instance=document.createElement("responsive-utility")}document.body.appendChild(window.ResponsiveUtility.instance)};window.ResponsiveUtility.setSize=function(detail){var size,width=window.ResponsiveUtility._getWidth(detail);if(width<detail.sm){size="xs"}else if(width<detail.md){size="sm"}else if(width<detail.lg){size="md"}else if(width<detail.xl){size="lg"}else{size="xl"}if(detail.element.getAttribute(detail.attribute)===void 0||size!==detail.element.getAttribute(detail.attribute)){detail.element.setAttribute(detail.attribute,size)}};window.ResponsiveUtility._getWidth=function(detail){var el=detail.element;if(!0===detail.relativeToParent){if(el.offsetWidth!==void 0&&null!==el.offsetWidth&&0<el.offsetWidth){return el.offsetWidth}else if(null!==el.parentNode){return el.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE?el.parentNode.host.offsetWidth:el.parentNode.offsetWidth}}return window.outerWidth}});
define(["exports","./node_modules/@polymer/polymer/polymer-legacy.js","./node_modules/@polymer/polymer/lib/utils/async.js","./node_modules/@polymer/iron-resizable-behavior/iron-resizable-behavior.js"],function(_exports,_polymerLegacy,async,_ironResizableBehavior){"use strict";Object.defineProperty(_exports,"__esModule",{value:!0});_exports.ResponsiveUtility=void 0;async=babelHelpers.interopRequireWildcard(async);function _templateObject_7c136b60459211e9ac5963cfb9d28b4e(){var data=babelHelpers.taggedTemplateLiteral(["\n <style>\n :host {\n display: inline;\n }\n </style>\n <slot></slot>\n "]);_templateObject_7c136b60459211e9ac5963cfb9d28b4e=function _templateObject_7c136b60459211e9ac5963cfb9d28b4e(){return data};return data}window.ResponsiveUtility={};window.ResponsiveUtility.instance=null;var ResponsiveUtility=(0,_polymerLegacy.Polymer)({_template:(0,_polymerLegacy.html)(_templateObject_7c136b60459211e9ac5963cfb9d28b4e()),is:"responsive-utility",behaviors:[_ironResizableBehavior.IronResizableBehavior],listeners:{"iron-resize":"_onIronResize"},properties:{details:{type:Array,value:[]}},created:function created(){var root=this;if(null==window.ResponsiveUtility.instance){window.ResponsiveUtility.instance=root}window.addEventListener("responsive-element",function(e){var detail={element:e.detail.element,attribute:e.detail.attribute!==void 0&&null!==e.detail.attribute?e.detail.attribute:"responsive-size",relativeToParent:e.detail.relativeToParent!==void 0&&null!==e.detail.relativeToParent?e.detail.relativeToParent:!0,sm:e.detail.sm!==void 0&&null!==e.detail.sm?e.detail.sm:900,md:e.detail.md!==void 0&&null!==e.detail.md?e.detail.md:1200,lg:e.detail.lg!==void 0&&null!==e.detail.lg?e.detail.lg:1500,xl:e.detail.xl!==void 0&&null!==e.detail.xl?e.detail.lg:1800};if("ResizeObserver"in window&&!0===detail.relativeToParent){var resize=new ResizeObserver(function(){window.ResponsiveUtility.setSize(detail)}),observable=e.detail.parentNode!==void 0&&null!==e.detail.parentNode?e.detail.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE?e.detail.element.parentNode.host:e.detail.element.parentNode:e.detail.element;resize.observe(observable)}root.push("details",detail);window.ResponsiveUtility.setSize(detail)});window.addEventListener("delete-responsive-element",function(e){for(var i=0;i<this.details.length;i++){if(e.detail===detail[i])root.splice("details",i,1)}})},_onIronResize:function _onIronResize(){for(var i=0;i<this.details.length;i++){window.ResponsiveUtility.setSize(this.details[i])}}});_exports.ResponsiveUtility=ResponsiveUtility;window.ResponsiveUtility.requestAvailability=function(){if(null==window.ResponsiveUtility.instance){window.ResponsiveUtility.instance=document.createElement("responsive-utility")}document.body.appendChild(window.ResponsiveUtility.instance)};window.ResponsiveUtility.setSize=function(detail){var size,width=window.ResponsiveUtility._getWidth(detail);if(width<detail.sm){size="xs"}else if(width<detail.md){size="sm"}else if(width<detail.lg){size="md"}else if(width<detail.xl){size="lg"}else{size="xl"}if(detail.element.getAttribute(detail.attribute)===void 0||size!==detail.element.getAttribute(detail.attribute)){detail.element.setAttribute(detail.attribute,size)}};window.ResponsiveUtility._getWidth=function(detail){var el=detail.element;if(!0===detail.relativeToParent){if(el.offsetWidth!==void 0&&null!==el.offsetWidth&&0<el.offsetWidth){return el.offsetWidth}else if(null!==el.parentNode){return el.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE?el.parentNode.host.offsetWidth:el.parentNode.offsetWidth}}return window.outerWidth}});
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc