@lrnwebcomponents/simple-toast
Advanced tools
Comparing version 2.3.3 to 2.3.6
{ | ||
"version": 2, | ||
"version": "experimental", | ||
"tags": [ | ||
{ | ||
"name": "simple-toast\n`A singular toast / message for conistency`", | ||
"description": "`simple-toast`", | ||
"jsDoc": "/**\n * `simple-toast`\n * @customElement simple-toast\n * `A singular toast / message for conistency`\n *\n * @microcopy - language worth noting:\n * -\n *\n\n * @polymer\n * @demo demo/index.html\n */", | ||
"attributes": [], | ||
"properties": [], | ||
"events": [], | ||
"slots": [] | ||
"name": "simple-toast", | ||
"description": "`simple-toast`" | ||
}, | ||
{ | ||
"name": "simple-toast\n`A singular toast / message for conistency`", | ||
"name": "simple-toast", | ||
"description": "`simple-toast`", | ||
"jsDoc": "/**\n * `simple-toast`\n * @customElement simple-toast\n * `A singular toast / message for conistency`\n *\n * @microcopy - language worth noting:\n * -\n *\n\n * @polymer\n * @demo demo/index.html\n */", | ||
"attributes": [ | ||
@@ -21,3 +15,2 @@ { | ||
"description": "Opened state of the toast, use event to change", | ||
"jsDoc": "/**\n * Opened state of the toast, use event to change\n */", | ||
"type": "boolean" | ||
@@ -28,3 +21,2 @@ }, | ||
"description": "Plain text based message to display", | ||
"jsDoc": "/**\n * Plain text based message to display\n */", | ||
"type": "string" | ||
@@ -35,3 +27,2 @@ }, | ||
"description": "Class name, fit-bottom being a useful one", | ||
"jsDoc": "/**\n * Class name, fit-bottom being a useful one\n */", | ||
"type": "string" | ||
@@ -42,3 +33,2 @@ }, | ||
"description": "Text for the close button", | ||
"jsDoc": "/**\n * Text for the close button\n */", | ||
"type": "string" | ||
@@ -49,3 +39,2 @@ }, | ||
"description": "How long the toast message should be displayed", | ||
"jsDoc": "/**\n * How long the toast message should be displayed\n */", | ||
"type": "number" | ||
@@ -56,3 +45,2 @@ }, | ||
"description": "Event callback when hide is called", | ||
"jsDoc": "/**\n * Event callback when hide is called\n */", | ||
"type": "string" | ||
@@ -63,3 +51,2 @@ }, | ||
"description": "If there should be a close button shown", | ||
"jsDoc": "/**\n * If there should be a close button shown\n */", | ||
"type": "boolean" | ||
@@ -71,4 +58,4 @@ } | ||
"name": "opened", | ||
"attribute": "opened", | ||
"description": "Opened state of the toast, use event to change", | ||
"jsDoc": "/**\n * Opened state of the toast, use event to change\n */", | ||
"type": "boolean" | ||
@@ -78,4 +65,4 @@ }, | ||
"name": "text", | ||
"attribute": "text", | ||
"description": "Plain text based message to display", | ||
"jsDoc": "/**\n * Plain text based message to display\n */", | ||
"type": "string" | ||
@@ -85,4 +72,4 @@ }, | ||
"name": "classStyle", | ||
"attribute": "class-style", | ||
"description": "Class name, fit-bottom being a useful one", | ||
"jsDoc": "/**\n * Class name, fit-bottom being a useful one\n */", | ||
"type": "string" | ||
@@ -92,4 +79,4 @@ }, | ||
"name": "closeText", | ||
"attribute": "close-text", | ||
"description": "Text for the close button", | ||
"jsDoc": "/**\n * Text for the close button\n */", | ||
"type": "string" | ||
@@ -99,4 +86,4 @@ }, | ||
"name": "duration", | ||
"attribute": "duration", | ||
"description": "How long the toast message should be displayed", | ||
"jsDoc": "/**\n * How long the toast message should be displayed\n */", | ||
"type": "number" | ||
@@ -106,4 +93,4 @@ }, | ||
"name": "eventCallback", | ||
"attribute": "event-callback", | ||
"description": "Event callback when hide is called", | ||
"jsDoc": "/**\n * Event callback when hide is called\n */", | ||
"type": "string" | ||
@@ -113,20 +100,16 @@ }, | ||
"name": "closeButton", | ||
"attribute": "close-button", | ||
"description": "If there should be a close button shown", | ||
"jsDoc": "/**\n * If there should be a close button shown\n */", | ||
"type": "boolean" | ||
} | ||
], | ||
"events": [], | ||
"slots": [] | ||
] | ||
}, | ||
{ | ||
"name": "simple-toast\n`A singular toast / message for conistency`", | ||
"description": "`simple-toast`", | ||
"jsDoc": "/**\n * `simple-toast`\n * @customElement simple-toast\n * `A singular toast / message for conistency`\n *\n * @microcopy - language worth noting:\n * -\n *\n\n * @polymer\n * @demo demo/index.html\n */", | ||
"attributes": [], | ||
"properties": [], | ||
"events": [], | ||
"slots": [] | ||
"name": "tag" | ||
}, | ||
{ | ||
"name": "simple-toast", | ||
"description": "`simple-toast`" | ||
} | ||
] | ||
} |
@@ -19,3 +19,3 @@ { | ||
}, | ||
"version": "2.3.3", | ||
"version": "2.3.6", | ||
"description": "A singular toast / message for conistency", | ||
@@ -32,3 +32,3 @@ "repository": { | ||
"start": "yarn run dev", | ||
"build": "../../node_modules/.bin/gulp && ../../node_modules/.bin/rollup -c && ../../node_modules/.bin/prettier --ignore-path ../../.prettierignore --write '**/*.{js,json}' && wca analyze \"**/*.js\" --outFile custom-elements.json", | ||
"build": "../../node_modules/.bin/gulp && ../../node_modules/.bin/rollup -c && ../../node_modules/.bin/prettier --ignore-path ../../.prettierignore --write '**/*.{js,json}' && wca analyze \"**/*.js\" --format vscode --outFile vscode-html-custom-data.json", | ||
"dev": "concurrently --kill-others \"yarn run watch\" \"yarn run serve\"", | ||
@@ -50,3 +50,3 @@ "watch": "../../node_modules/.bin/gulp dev", | ||
"@lrnwebcomponents/deduping-fix": "^2.1.1", | ||
"@lrnwebcomponents/storybook-utilities": "^2.3.3", | ||
"@lrnwebcomponents/storybook-utilities": "^2.3.6", | ||
"@polymer/iron-component-page": "github:PolymerElements/iron-component-page", | ||
@@ -71,3 +71,3 @@ "@polymer/iron-demo-helpers": "3.1.0", | ||
], | ||
"gitHead": "493ea1a015492311b17a8328eee98e4f6eb12948" | ||
"gitHead": "15ccf147355d2d3a441d65446f094c9d031c17c0" | ||
} |
@@ -1,2 +0,2 @@ | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("lit-element/lit-element.js")):"function"==typeof define&&define.amd?define(["exports","lit-element/lit-element.js"],e):e((t=t||self).SimpleToast={},t.litElement_js)}(this,function(t,e){"use strict";function n(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function i(t,e,i){return e&&n(t.prototype,e),i&&n(t,i),t}function o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function a(t){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function r(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function l(t,e,n){return(l="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=a(t)););return t}(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(n):o.value}})(t,e,n||t)}function c(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}function u(){var t=c(["\n:host {\n display: block;\n}\n\n:host([hidden]) {\n display: none;\n}\n\npaper-toast {\n width: var(--simple-toast-width, inherit);\n height: var(--simple-toast-height, inherit);\n color: var(--simple-toast-color, white);\n background-color: var(--simple-toast-bg, black);\n top: var(--simple-toast-top, inherit);\n margin: var(--simple-toast-margin, 16px);\n padding: var(--simple-toast-padding, 16px);\n left: var(--simple-toast-left, inherit);\n bottom: var(--simple-toast-bottom, inherit);\n right: var(--simple-toast-right, inherit);\n border: var(--simple-toast-border, inherit);\n z-index: var(--simple-toast-z-index, inherit);\n font-size: var(--simple-toast-font-size, inherit);\n}\n "]);return u=function(){return t},t}function p(){var t=c(['\n\n<paper-toast id="toast" text="','" duration="','" ?opened="','" @opened-changed="','" .class="','">\n <slot></slot>\n <paper-button .hidden="','" @click="','">',"</paper-button>\n</paper-toast>"]);return p=function(){return t},t}window.SimpleToast=window.SimpleToast||{},window.SimpleToast.requestAvailability=function(){return window.SimpleToast.instance||(window.SimpleToast.instance=document.createElement("simple-toast"),document.body.appendChild(window.SimpleToast.instance)),window.SimpleToast.instance};var d=function(t){function n(){var t,e,i;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),e=this,(t=!(i=a(n).call(this))||"object"!=typeof i&&"function"!=typeof i?r(e):i).setDefaultToast(),window.addEventListener("simple-toast-hide",t.hideSimpleToast.bind(r(t))),window.addEventListener("simple-toast-show",t.showSimpleToast.bind(r(t))),import("@polymer/paper-toast/paper-toast.js"),import("@polymer/paper-button/paper-button.js"),t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}(n,e.LitElement),i(n,[{key:"render",value:function(){return e.html(p(),this.text,this.duration,this.opened,this.openedChanged,this.classStyle,!this.closeButton,this.hide,this.closeText)}}],[{key:"styles",get:function(){return[e.css(u())]}},{key:"properties",get:function(){return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{},i=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(i=i.concat(Object.getOwnPropertySymbols(n).filter(function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),i.forEach(function(e){o(t,e,n[e])})}return t}({},l(a(n),"properties",this),{opened:{name:"opened",type:Boolean,reflect:!0},text:{name:"text",type:String},classStyle:{name:"classStyle",type:String,attribute:"class-style"},closeText:{name:"closeText",type:String,attribute:"close-text"},duration:{name:"duration",type:Number},eventCallback:{name:"eventCallback",type:String,attribute:"event-callback"},closeButton:{name:"closeButton",type:Boolean,reflect:!0,attribute:"close-button"}})}},{key:"tag",get:function(){return"simple-toast"}}]),i(n,[{key:"disconnectedCallback",value:function(){window.removeEventListener("simple-toast-hide",this.hideSimpleToast.bind(this)),window.removeEventListener("simple-toast-show",this.showSimpleToast.bind(this)),l(a(n.prototype),"connectedCallback",this).call(this)}},{key:"hideSimpleToast",value:function(t){this.hide()}},{key:"openedChanged",value:function(t){this.opened=t.detail.value}},{key:"setDefaultToast",value:function(){for(this.opened=!1,this.text="Saved",this.classStyle="",this.closeText="Close",this.duration=4e3,this.eventCallback=null,this.closeButton=!0;null!==this.firstChild;)this.removeChild(this.firstChild)}},{key:"showSimpleToast",value:function(t){var e=this;this.setDefaultToast(),t.detail.duration&&(this.duration=t.detail.duration),t.detail.text&&(this.text=t.detail.text),t.detail.classStyle&&(this.classStyle=t.detail.classStyle),t.detail.closeText&&(this.closeText=t.detail.closeText),t.detail.closeButton&&(this.closeButton=t.detail.closeButton),t.detail.eventCallback&&(this.eventCallback=t.detail.eventCallback),t.detail.slot&&this.appendChild(t.detail.slot),setTimeout(function(){e.show()},5)}},{key:"show",value:function(t){this.opened=!0}},{key:"hide",value:function(t){if(this.eventCallback){var e=new CustomEvent(this.eventCallback,{bubbles:!0,cancelable:!0,detail:!0,composed:!0});this.dispatchEvent(e)}this.opened=!1}}]),n}();window.customElements.define(d.tag,d),t.SimpleToast=d,Object.defineProperty(t,"__esModule",{value:!0})}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("lit-element/lit-element.js")):"function"==typeof define&&define.amd?define(["exports","lit-element/lit-element.js"],t):t((e=e||self).SimpleToast={},e.litElement_js)}(this,function(e,t){"use strict";function n(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function i(e,t,i){return t&&n(e.prototype,t),i&&n(e,i),e}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function s(e){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function l(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function c(e,t,n){return(c="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var i=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=s(e)););return e}(e,t);if(i){var o=Object.getOwnPropertyDescriptor(i,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function p(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function u(){var e=p(["\n:host {\n display: block;\n}\n\n:host([hidden]) {\n display: none;\n}\n\npaper-toast {\n width: var(--simple-toast-width, inherit);\n height: var(--simple-toast-height, inherit);\n color: var(--simple-toast-color, white);\n background-color: var(--simple-toast-bg, black);\n top: var(--simple-toast-top, inherit);\n margin: var(--simple-toast-margin, 16px);\n padding: var(--simple-toast-padding, 16px);\n left: var(--simple-toast-left, inherit);\n bottom: var(--simple-toast-bottom, inherit);\n right: var(--simple-toast-right, inherit);\n border: var(--simple-toast-border, inherit);\n z-index: var(--simple-toast-z-index, inherit);\n font-size: var(--simple-toast-font-size, inherit);\n}\n "]);return u=function(){return e},e}function d(){var e=p(['\n\n<paper-toast id="toast" text="','" duration="','" ?opened="','" @opened-changed="','" .class="','">\n <slot></slot>\n <paper-button .hidden="','" @click="','">',"</paper-button>\n</paper-toast>"]);return d=function(){return e},e}window.SimpleToast=window.SimpleToast||{},window.SimpleToast.requestAvailability=function(){return window.SimpleToast.instance||(window.SimpleToast.instance=document.createElement("simple-toast"),document.body.appendChild(window.SimpleToast.instance)),window.SimpleToast.instance};var h=function(e){function n(){var e,t,i;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),t=this,(e=!(i=s(n).call(this))||"object"!=typeof i&&"function"!=typeof i?l(t):i).setDefaultToast(),window.addEventListener("simple-toast-hide",e.hideSimpleToast.bind(l(e))),window.addEventListener("simple-toast-show",e.showSimpleToast.bind(l(e))),import("@polymer/paper-toast/paper-toast.js"),import("@polymer/paper-button/paper-button.js"),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&a(e,t)}(n,t.LitElement),i(n,[{key:"render",value:function(){return t.html(d(),this.text,this.duration,this.opened,this.openedChanged,this.classStyle,!this.closeButton,this.hide,this.closeText)}}],[{key:"styles",get:function(){return[t.css(u())]}},{key:"properties",get:function(){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach(function(t){o(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},c(s(n),"properties",this),{opened:{name:"opened",type:Boolean,reflect:!0},text:{name:"text",type:String},classStyle:{name:"classStyle",type:String,attribute:"class-style"},closeText:{name:"closeText",type:String,attribute:"close-text"},duration:{name:"duration",type:Number},eventCallback:{name:"eventCallback",type:String,attribute:"event-callback"},closeButton:{name:"closeButton",type:Boolean,reflect:!0,attribute:"close-button"}})}},{key:"tag",get:function(){return"simple-toast"}}]),i(n,[{key:"disconnectedCallback",value:function(){window.removeEventListener("simple-toast-hide",this.hideSimpleToast.bind(this)),window.removeEventListener("simple-toast-show",this.showSimpleToast.bind(this)),c(s(n.prototype),"connectedCallback",this).call(this)}},{key:"hideSimpleToast",value:function(e){this.hide()}},{key:"openedChanged",value:function(e){this.opened=e.detail.value}},{key:"setDefaultToast",value:function(){for(this.opened=!1,this.text="Saved",this.classStyle="",this.closeText="Close",this.duration=4e3,this.eventCallback=null,this.closeButton=!0;null!==this.firstChild;)this.removeChild(this.firstChild)}},{key:"showSimpleToast",value:function(e){var t=this;this.setDefaultToast(),e.detail.duration&&(this.duration=e.detail.duration),e.detail.text&&(this.text=e.detail.text),e.detail.classStyle&&(this.classStyle=e.detail.classStyle),e.detail.closeText&&(this.closeText=e.detail.closeText),e.detail.closeButton&&(this.closeButton=e.detail.closeButton),e.detail.eventCallback&&(this.eventCallback=e.detail.eventCallback),e.detail.slot&&this.appendChild(e.detail.slot),setTimeout(function(){t.show()},5)}},{key:"show",value:function(e){this.opened=!0}},{key:"hide",value:function(e){if(this.eventCallback){var t=new CustomEvent(this.eventCallback,{bubbles:!0,cancelable:!0,detail:!0,composed:!0});this.dispatchEvent(t)}this.opened=!1}}]),n}();window.customElements.define(h.tag,h),e.SimpleToast=h,Object.defineProperty(e,"__esModule",{value:!0})}); | ||
//# sourceMappingURL=simple-toast.umd.js.map |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
2393
1
103054