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.35 to 0.0.36

3

analysis.json

@@ -501,3 +501,3 @@ {

"line": 6,
"column": 8
"column": 32
},

@@ -511,2 +511,3 @@ "end": {

"superclass": "HTMLElement",
"name": "ResponsiveUtility",
"attributes": [

@@ -513,0 +514,0 @@ {

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

},
"version": "0.0.35",
"version": "0.0.36",
"description": "Automated conversion of responsive-utility/",

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

"build": "../../node_modules/.bin/gulp && ../../node_modules/.bin/rollup -c && ../../node_modules/.bin/prettier --ignore-path ../../.prettierignore --write '**/*.{js,json}'",
"dev": "open ./src && concurrently --kill-others 'yarn run watch' 'yarn run serve'",
"dev": "concurrently --kill-others \"yarn run watch\" \"yarn run serve\"",
"watch": "../../node_modules/.bin/gulp dev",

@@ -44,3 +44,3 @@ "serve": "polymer serve --npm --module-resolution=node --open",

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

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

],
"gitHead": "71dcc2b61045070a009e654226e6c0892f11a854"
"gitHead": "3bf677e6744e92117f1958f79ee85cc7d9f89452"
}

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

define(["./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(_polymerLegacy,async,_ironResizableBehavior){"use strict";async=babelHelpers.interopRequireWildcard(async);function _templateObject_c83ae2e0f1e411e89dd4711b8b5dec47(){var data=babelHelpers.taggedTemplateLiteral(["\n <style>\n :host {\n display: inline;\n }\n </style>\n <slot></slot>\n"]);_templateObject_c83ae2e0f1e411e89dd4711b8b5dec47=function _templateObject_c83ae2e0f1e411e89dd4711b8b5dec47(){return data};return data}window.ResponsiveUtility={};window.ResponsiveUtility.instance=null;(0,_polymerLegacy.Polymer)({_template:(0,_polymerLegacy.html)(_templateObject_c83ae2e0f1e411e89dd4711b8b5dec47()),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}document.body.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)});document.body.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])}}});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_06e3a590f51911e8b0051506a3b37649(){var data=babelHelpers.taggedTemplateLiteral(["\n <style>\n :host {\n display: inline;\n }\n </style>\n <slot></slot>\n"]);_templateObject_06e3a590f51911e8b0051506a3b37649=function _templateObject_06e3a590f51911e8b0051506a3b37649(){return data};return data}window.ResponsiveUtility={};window.ResponsiveUtility.instance=null;var ResponsiveUtility=(0,_polymerLegacy.Polymer)({_template:(0,_polymerLegacy.html)(_templateObject_06e3a590f51911e8b0051506a3b37649()),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}document.body.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)});document.body.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 @@

import{html,Polymer}from"./node_modules/@polymer/polymer/polymer-legacy.js";import*as async from"./node_modules/@polymer/polymer/lib/utils/async.js";import{IronResizableBehavior}from"./node_modules/@polymer/iron-resizable-behavior/iron-resizable-behavior.js";window.ResponsiveUtility={};window.ResponsiveUtility.instance=null;Polymer({_template:html`
import{html,Polymer}from"./node_modules/@polymer/polymer/polymer-legacy.js";import*as async from"./node_modules/@polymer/polymer/lib/utils/async.js";import{IronResizableBehavior}from"./node_modules/@polymer/iron-resizable-behavior/iron-resizable-behavior.js";window.ResponsiveUtility={};window.ResponsiveUtility.instance=null;let ResponsiveUtility=Polymer({_template:html`
<style>

@@ -8,2 +8,2 @@ :host {

<slot></slot>
`,is:"responsive-utility",behaviors:[IronResizableBehavior],listeners:{"iron-resize":"_onIronResize"},properties:{targets:{type:Array,value:[]}},created:function(){let root=this;if(null==window.ResponsiveUtility.instance){window.ResponsiveUtility.instance=root}document.body.addEventListener("responsive-element",function(e){let relative=e.detail.relativeToParent!==void 0&&null!==e.detail.relativeToParent?e.detail.relativeToParent:!0;if("ResizeObserver"in window&&!0===relative.relativeToParent){let 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)});document.body.addEventListener("delete-responsive-element",function(e){for(let i=0;i<this.targets.length;i++){if(e.detail===target[i])root.splice("targets",i,1)}})},_onIronResize:function(){for(let i=0;i<this.targets.length;i++){window.ResponsiveUtility.setSize(this.targets[i])}}});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){let 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){let relative=target.relativeToParent!==void 0&&null!==target.relativeToParent?target.relativeToParent:!0,getWidth=function(){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(width,breakpoint,def){let 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};
`,is:"responsive-utility",behaviors:[IronResizableBehavior],listeners:{"iron-resize":"_onIronResize"},properties:{targets:{type:Array,value:[]}},created:function(){let root=this;if(null==window.ResponsiveUtility.instance){window.ResponsiveUtility.instance=root}document.body.addEventListener("responsive-element",function(e){let relative=e.detail.relativeToParent!==void 0&&null!==e.detail.relativeToParent?e.detail.relativeToParent:!0;if("ResizeObserver"in window&&!0===relative.relativeToParent){let 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)});document.body.addEventListener("delete-responsive-element",function(e){for(let i=0;i<this.targets.length;i++){if(e.detail===target[i])root.splice("targets",i,1)}})},_onIronResize:function(){for(let i=0;i<this.targets.length;i++){window.ResponsiveUtility.setSize(this.targets[i])}}});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){let 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){let relative=target.relativeToParent!==void 0&&null!==target.relativeToParent?target.relativeToParent:!0,getWidth=function(){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(width,breakpoint,def){let 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};export{ResponsiveUtility};

@@ -7,3 +7,3 @@ import { html, Polymer } from "@polymer/polymer/polymer-legacy.js";

window.ResponsiveUtility.instance = null;
Polymer({
let ResponsiveUtility = Polymer({
_template: html`

@@ -16,3 +16,3 @@ <style>

<slot></slot>
`,
`,

@@ -168,1 +168,2 @@ is: "responsive-utility",

};
export { ResponsiveUtility };

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

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(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(["@polymer/polymer/polymer-legacy.js","@polymer/polymer/lib/utils/async.js","@polymer/iron-resizable-behavior/iron-resizable-behavior.js"],t):t(e.polymerLegacy_js,e.async_js,e.ironResizableBehavior_js)}(this,function(e,t,i){"use strict";function n(){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 n=function(){return i},i}window.ResponsiveUtility={},window.ResponsiveUtility.instance=null,e.Polymer({_template:e.html(n()),is:"responsive-utility",behaviors:[i.IronResizableBehavior],listeners:{"iron-resize":"_onIronResize"},properties:{targets:{type:Array,value:[]}},created:function(){var e=this;null==window.ResponsiveUtility.instance&&(window.ResponsiveUtility.instance=e),document.body.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)}),document.body.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"}});
!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),document.body.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)}),document.body.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

@@ -7,3 +7,3 @@ import { html, Polymer } from "@polymer/polymer/polymer-legacy.js";

window.ResponsiveUtility.instance = null;
Polymer({
let ResponsiveUtility = Polymer({
_template: html`

@@ -16,3 +16,3 @@ <style>

<slot></slot>
`,
`,

@@ -168,1 +168,2 @@ is: "responsive-utility",

};
export { ResponsiveUtility };

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