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 0.0.39 to 0.0.40

8

package.json

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

},
"version": "0.0.39",
"version": "0.0.40",
"description": "Automated conversion of responsive-utility/",

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

"devDependencies": {
"@lrnwebcomponents/deduping-fix": "^0.0.39",
"@lrnwebcomponents/deduping-fix": "^0.0.40",
"@polymer/iron-component-page": "github:PolymerElements/iron-component-page",

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

"polymer-build": "3.1.1",
"polymer-cli": "1.9.1",
"polymer-cli": "1.9.2",
"wct-browser-legacy": "1.0.2"

@@ -65,3 +65,3 @@ },

],
"gitHead": "e38751e6f76a812e00ae87ef826fafcdbfec4083"
"gitHead": "31deee0fa61eb2dcfeb49f907618076bf3863495"
}

@@ -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_b212ae60f9ac11e88a72edbb7e4238d1(){var data=babelHelpers.taggedTemplateLiteral(["\n <style>\n :host {\n display: inline;\n }\n </style>\n <slot></slot>\n "]);_templateObject_b212ae60f9ac11e88a72edbb7e4238d1=function _templateObject_b212ae60f9ac11e88a72edbb7e4238d1(){return data};return data}window.ResponsiveUtility={};window.ResponsiveUtility.instance=null;var ResponsiveUtility=(0,_polymerLegacy.Polymer)({_template:(0,_polymerLegacy.html)(_templateObject_b212ae60f9ac11e88a72edbb7e4238d1()),is:"responsive-utility",behaviors:[_ironResizableBehavior.IronResizableBehavior],listeners:{"iron-resize":"_onIronResize"},properties:{targets:{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 relative=e.detail.relativeToParent!==void 0&&null!==e.detail.relativeToParent?e.detail.relativeToParent:!0;if("ResizeObserver"in window&&!0===relative.relativeToParent){var parent=e.detail.element.parentNode,resize=new ResizeObserver(function(){window.ResponsiveUtility.setSize(e.detail)});if(parent.nodeType===Node.DOCUMENT_FRAGMENT_NODE){parent=parent.host}resize.observe(parent)}root.push("targets",e.detail);window.ResponsiveUtility.setSize(e.detail)});window.addEventListener("delete-responsive-element",function(e){for(var i=0;i<this.targets.length;i++){if(e.detail===target[i])root.splice("targets",i,1)}})},_onIronResize:function _onIronResize(){for(var i=0;i<this.targets.length;i++){window.ResponsiveUtility.setSize(this.targets[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(target){var element=target.element,attribute=target.attribute!==void 0&&null!==target.attribute?target.attribute:"responsive-size",size=window.ResponsiveUtility.getSize(target);if(element.getAttribute(attribute)===void 0||size!==element.getAttribute(attribute)){element.setAttribute(attribute,size)}};window.ResponsiveUtility.getSize=function(target){var relative=target.relativeToParent!==void 0&&null!==target.relativeToParent?target.relativeToParent:!0,getWidth=function getWidth(){if(null!==target.element.parentNode&&!0===relative){if(target.element.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){return target.element.parentNode.host.offsetWidth}return target.element.parentNode.offsetWidth}return window.outerWidth},testBreakpoint=function testBreakpoint(width,breakpoint,def){var val=breakpoint!==void 0&&null!==breakpoint?breakpoint:def;return width<val},size,width=getWidth();if(testBreakpoint(width,target.sm,600)){size="xs"}else if(testBreakpoint(width,target.md,900)){size="sm"}else if(testBreakpoint(width,target.lg,1200)){size="md"}else if(testBreakpoint(width,target.xl,1200)){size="lg"}else{size="xl"}return size}});
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_fa08240003cc11e98785b12714788c84(){var data=babelHelpers.taggedTemplateLiteral(["\n <style>\n :host {\n display: inline;\n }\n </style>\n <slot></slot>\n "]);_templateObject_fa08240003cc11e98785b12714788c84=function _templateObject_fa08240003cc11e98785b12714788c84(){return data};return data}window.ResponsiveUtility={};window.ResponsiveUtility.instance=null;var ResponsiveUtility=(0,_polymerLegacy.Polymer)({_template:(0,_polymerLegacy.html)(_templateObject_fa08240003cc11e98785b12714788c84()),is:"responsive-utility",behaviors:[_ironResizableBehavior.IronResizableBehavior],listeners:{"iron-resize":"_onIronResize"},properties:{targets:{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 relative=e.detail.relativeToParent!==void 0&&null!==e.detail.relativeToParent?e.detail.relativeToParent:!0;if("ResizeObserver"in window&&!0===relative.relativeToParent){var parent=e.detail.element.parentNode,resize=new ResizeObserver(function(){window.ResponsiveUtility.setSize(e.detail)});if(parent.nodeType===Node.DOCUMENT_FRAGMENT_NODE){parent=parent.host}resize.observe(parent)}root.push("targets",e.detail);window.ResponsiveUtility.setSize(e.detail)});window.addEventListener("delete-responsive-element",function(e){for(var i=0;i<this.targets.length;i++){if(e.detail===target[i])root.splice("targets",i,1)}})},_onIronResize:function _onIronResize(){for(var i=0;i<this.targets.length;i++){window.ResponsiveUtility.setSize(this.targets[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(target){var element=target.element,attribute=target.attribute!==void 0&&null!==target.attribute?target.attribute:"responsive-size",size=window.ResponsiveUtility.getSize(target);if(element.getAttribute(attribute)===void 0||size!==element.getAttribute(attribute)){element.setAttribute(attribute,size)}};window.ResponsiveUtility.getSize=function(target){var relative=target.relativeToParent!==void 0&&null!==target.relativeToParent?target.relativeToParent:!0,getWidth=function getWidth(){if(null!==target.element.parentNode&&!0===relative){if(target.element.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){return target.element.parentNode.host.offsetWidth}return target.element.parentNode.offsetWidth}return window.outerWidth},testBreakpoint=function testBreakpoint(width,breakpoint,def){var val=breakpoint!==void 0&&null!==breakpoint?breakpoint:def;return width<val},size,width=getWidth();if(testBreakpoint(width,target.sm,600)){size="xs"}else if(testBreakpoint(width,target.md,900)){size="sm"}else if(testBreakpoint(width,target.lg,1200)){size="md"}else if(testBreakpoint(width,target.xl,1200)){size="lg"}else{size="xl"}return size}});

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

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@polymer/polymer/polymer-legacy.js"),require("@polymer/polymer/lib/utils/async.js"),require("@polymer/iron-resizable-behavior/iron-resizable-behavior.js")):"function"==typeof define&&define.amd?define(["exports","@polymer/polymer/polymer-legacy.js","@polymer/polymer/lib/utils/async.js","@polymer/iron-resizable-behavior/iron-resizable-behavior.js"],t):t(e.ResponsiveUtility={},e.polymerLegacy_js,e.async_js,e.ironResizableBehavior_js)}(this,function(e,t,i,n){"use strict";function o(){var e,t,i=(e=["\n <style>\n :host {\n display: inline;\n }\n </style>\n <slot></slot>\n "],t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}})));return o=function(){return i},i}window.ResponsiveUtility={},window.ResponsiveUtility.instance=null;var r=t.Polymer({_template:t.html(o()),is:"responsive-utility",behaviors:[n.IronResizableBehavior],listeners:{"iron-resize":"_onIronResize"},properties:{targets:{type:Array,value:[]}},created:function(){var e=this;null==window.ResponsiveUtility.instance&&(window.ResponsiveUtility.instance=e),window.addEventListener("responsive-element",function(t){var i=void 0===t.detail.relativeToParent||null===t.detail.relativeToParent||t.detail.relativeToParent;if("ResizeObserver"in window&&!0===i.relativeToParent){var n=t.detail.element.parentNode,o=new ResizeObserver(function(){window.ResponsiveUtility.setSize(t.detail)});n.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&(n=n.host),o.observe(n)}e.push("targets",t.detail),window.ResponsiveUtility.setSize(t.detail)}),window.addEventListener("delete-responsive-element",function(t){for(var i=0;i<this.targets.length;i++)t.detail===target[i]&&e.splice("targets",i,1)})},_onIronResize:function(){for(var e=0;e<this.targets.length;e++)window.ResponsiveUtility.setSize(this.targets[e])}});window.ResponsiveUtility.requestAvailability=function(){null==window.ResponsiveUtility.instance&&(window.ResponsiveUtility.instance=document.createElement("responsive-utility")),document.body.appendChild(window.ResponsiveUtility.instance)},window.ResponsiveUtility.setSize=function(e){var t=e.element,i=void 0!==e.attribute&&null!==e.attribute?e.attribute:"responsive-size",n=window.ResponsiveUtility.getSize(e);void 0!==t.getAttribute(i)&&n===t.getAttribute(i)||t.setAttribute(i,n)},window.ResponsiveUtility.getSize=function(e){var t=void 0===e.relativeToParent||null===e.relativeToParent||e.relativeToParent,i=function(e,t,i){return e<(null!=t?t:i)},n=null!==e.element.parentNode&&!0===t?e.element.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE?e.element.parentNode.host.offsetWidth:e.element.parentNode.offsetWidth:window.outerWidth;return i(n,e.sm,600)?"xs":i(n,e.md,900)?"sm":i(n,e.lg,1200)?"md":i(n,e.xl,1200)?"lg":"xl"},e.ResponsiveUtility=r,Object.defineProperty(e,"__esModule",{value:!0})});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@polymer/polymer/polymer-legacy.js"),require("@polymer/polymer/lib/utils/async.js"),require("@polymer/iron-resizable-behavior/iron-resizable-behavior.js")):"function"==typeof define&&define.amd?define(["exports","@polymer/polymer/polymer-legacy.js","@polymer/polymer/lib/utils/async.js","@polymer/iron-resizable-behavior/iron-resizable-behavior.js"],t):t(e.ResponsiveUtility={},e.polymerLegacy_js,null,e.ironResizableBehavior_js)}("undefined"!=typeof self?self:this,function(e,t,i,n){"use strict";function o(){var e,t,i=(e=["\n <style>\n :host {\n display: inline;\n }\n </style>\n <slot></slot>\n "],t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}})));return o=function(){return i},i}window.ResponsiveUtility={},window.ResponsiveUtility.instance=null;var r=t.Polymer({_template:t.html(o()),is:"responsive-utility",behaviors:[n.IronResizableBehavior],listeners:{"iron-resize":"_onIronResize"},properties:{targets:{type:Array,value:[]}},created:function(){var e=this;null==window.ResponsiveUtility.instance&&(window.ResponsiveUtility.instance=e),window.addEventListener("responsive-element",function(t){var i=void 0===t.detail.relativeToParent||null===t.detail.relativeToParent||t.detail.relativeToParent;if("ResizeObserver"in window&&!0===i.relativeToParent){var n=t.detail.element.parentNode,o=new ResizeObserver(function(){window.ResponsiveUtility.setSize(t.detail)});n.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&(n=n.host),o.observe(n)}e.push("targets",t.detail),window.ResponsiveUtility.setSize(t.detail)}),window.addEventListener("delete-responsive-element",function(t){for(var i=0;i<this.targets.length;i++)t.detail===target[i]&&e.splice("targets",i,1)})},_onIronResize:function(){for(var e=0;e<this.targets.length;e++)window.ResponsiveUtility.setSize(this.targets[e])}});window.ResponsiveUtility.requestAvailability=function(){null==window.ResponsiveUtility.instance&&(window.ResponsiveUtility.instance=document.createElement("responsive-utility")),document.body.appendChild(window.ResponsiveUtility.instance)},window.ResponsiveUtility.setSize=function(e){var t=e.element,i=void 0!==e.attribute&&null!==e.attribute?e.attribute:"responsive-size",n=window.ResponsiveUtility.getSize(e);void 0!==t.getAttribute(i)&&n===t.getAttribute(i)||t.setAttribute(i,n)},window.ResponsiveUtility.getSize=function(e){var t=void 0===e.relativeToParent||null===e.relativeToParent||e.relativeToParent,i=function(e,t,i){return e<(null!=t?t:i)},n=null!==e.element.parentNode&&!0===t?e.element.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE?e.element.parentNode.host.offsetWidth:e.element.parentNode.offsetWidth:window.outerWidth;return i(n,e.sm,600)?"xs":i(n,e.md,900)?"sm":i(n,e.lg,1200)?"md":i(n,e.xl,1200)?"lg":"xl"},e.ResponsiveUtility=r,Object.defineProperty(e,"__esModule",{value:!0})});
//# sourceMappingURL=responsive-utility.umd.js.map

Sorry, the diff of this file is not supported yet

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