@lrnwebcomponents/simple-toast
Advanced tools
Comparing version 2.4.1 to 2.5.0
@@ -5,3 +5,3 @@ { | ||
{ | ||
"description": "`simple-toast`", | ||
"description": "`simple-toast`\n`A singular toast / message for conistency`", | ||
"summary": "", | ||
@@ -11,94 +11,2 @@ "path": "simple-toast.js", | ||
{ | ||
"name": "_hasConnected", | ||
"type": "?", | ||
"description": "", | ||
"privacy": "protected", | ||
"sourceRange": { | ||
"file": "../lit-element/lib/updating-element.js", | ||
"start": { | ||
"line": 472, | ||
"column": 4 | ||
}, | ||
"end": { | ||
"line": 474, | ||
"column": 5 | ||
} | ||
}, | ||
"metadata": { | ||
"polymer": { | ||
"readOnly": true | ||
} | ||
}, | ||
"inheritedFrom": "UpdatingElement" | ||
}, | ||
{ | ||
"name": "_hasRequestedUpdate", | ||
"type": "?", | ||
"description": "", | ||
"privacy": "protected", | ||
"sourceRange": { | ||
"file": "../lit-element/lib/updating-element.js", | ||
"start": { | ||
"line": 475, | ||
"column": 4 | ||
}, | ||
"end": { | ||
"line": 477, | ||
"column": 5 | ||
} | ||
}, | ||
"metadata": { | ||
"polymer": { | ||
"readOnly": true | ||
} | ||
}, | ||
"inheritedFrom": "UpdatingElement" | ||
}, | ||
{ | ||
"name": "hasUpdated", | ||
"type": "?", | ||
"description": "", | ||
"privacy": "public", | ||
"sourceRange": { | ||
"file": "../lit-element/lib/updating-element.js", | ||
"start": { | ||
"line": 478, | ||
"column": 4 | ||
}, | ||
"end": { | ||
"line": 480, | ||
"column": 5 | ||
} | ||
}, | ||
"metadata": { | ||
"polymer": { | ||
"readOnly": true | ||
} | ||
}, | ||
"inheritedFrom": "UpdatingElement" | ||
}, | ||
{ | ||
"name": "updateComplete", | ||
"type": "Promise", | ||
"description": "Returns a Promise that resolves when the element has completed updating.\nThe Promise value is a boolean that is `true` if the element completed the\nupdate without triggering another update. The Promise result is `false` if\na property was set inside `updated()`. If the Promise is rejected, an\nexception was thrown during the update.\n\nTo await additional asynchronous work, override the `_getUpdateComplete`\nmethod. For example, it is sometimes useful to await a rendered element\nbefore fulfilling this Promise. To do this, first await\n`super._getUpdateComplete()`, then any subsequent state.", | ||
"privacy": "public", | ||
"sourceRange": { | ||
"file": "../lit-element/lib/updating-element.js", | ||
"start": { | ||
"line": 547, | ||
"column": 4 | ||
}, | ||
"end": { | ||
"line": 549, | ||
"column": 5 | ||
} | ||
}, | ||
"metadata": { | ||
"polymer": { | ||
"readOnly": true | ||
} | ||
}, | ||
"inheritedFrom": "UpdatingElement" | ||
}, | ||
{ | ||
"name": "opened", | ||
@@ -110,7 +18,7 @@ "type": "boolean | null | undefined", | ||
"start": { | ||
"line": 84, | ||
"line": 83, | ||
"column": 2 | ||
}, | ||
"end": { | ||
"line": 88, | ||
"line": 86, | ||
"column": 3 | ||
@@ -132,7 +40,7 @@ } | ||
"start": { | ||
"line": 92, | ||
"line": 90, | ||
"column": 2 | ||
}, | ||
"end": { | ||
"line": 95, | ||
"line": 92, | ||
"column": 3 | ||
@@ -154,7 +62,7 @@ } | ||
"start": { | ||
"line": 99, | ||
"line": 96, | ||
"column": 2 | ||
}, | ||
"end": { | ||
"line": 103, | ||
"line": 99, | ||
"column": 3 | ||
@@ -176,7 +84,7 @@ } | ||
"start": { | ||
"line": 107, | ||
"line": 103, | ||
"column": 2 | ||
}, | ||
"end": { | ||
"line": 111, | ||
"line": 106, | ||
"column": 3 | ||
@@ -198,7 +106,7 @@ } | ||
"start": { | ||
"line": 115, | ||
"line": 110, | ||
"column": 2 | ||
}, | ||
"end": { | ||
"line": 118, | ||
"line": 112, | ||
"column": 3 | ||
@@ -220,7 +128,7 @@ } | ||
"start": { | ||
"line": 122, | ||
"line": 116, | ||
"column": 2 | ||
}, | ||
"end": { | ||
"line": 126, | ||
"line": 119, | ||
"column": 3 | ||
@@ -242,7 +150,7 @@ } | ||
"start": { | ||
"line": 130, | ||
"line": 123, | ||
"column": 2 | ||
}, | ||
"end": { | ||
"line": 135, | ||
"line": 127, | ||
"column": 3 | ||
@@ -260,36 +168,30 @@ } | ||
{ | ||
"name": "initialize", | ||
"description": "Performs element initialization. By default this calls `createRenderRoot`\nto create the element `renderRoot` node and captures any pre-set values for\nregistered properties.", | ||
"name": "render", | ||
"description": "render function", | ||
"privacy": "public", | ||
"sourceRange": { | ||
"file": "../lit-element/lit-element.js", | ||
"start": { | ||
"line": 93, | ||
"column": 4 | ||
"line": 65, | ||
"column": 2 | ||
}, | ||
"end": { | ||
"line": 103, | ||
"column": 5 | ||
"line": 72, | ||
"column": 3 | ||
} | ||
}, | ||
"metadata": {}, | ||
"params": [], | ||
"return": { | ||
"type": "void" | ||
}, | ||
"inheritedFrom": "LitElement" | ||
"params": [] | ||
}, | ||
{ | ||
"name": "_saveInstanceProperties", | ||
"description": "Fixes any properties set on the instance before upgrade time.\nOtherwise these would shadow the accessor and break these properties.\nThe properties are stored in a Map which is played back after the\nconstructor runs. Note, on very old versions of Safari (<=9) or Chrome\n(<=41), properties created for native platform properties like (`id` or\n`name`) may not have default values set in the element constructor. On\nthese browsers native properties appear on instances and therefore their\ndefault value will overwrite any element default (e.g. if the element sets\nthis.id = 'id' in the constructor, the 'id' will become '' since this is\nthe native platform default).", | ||
"privacy": "protected", | ||
"name": "firstUpdated", | ||
"description": "", | ||
"privacy": "public", | ||
"sourceRange": { | ||
"file": "../lit-element/lib/updating-element.js", | ||
"start": { | ||
"line": 281, | ||
"column": 4 | ||
"line": 146, | ||
"column": 2 | ||
}, | ||
"end": { | ||
"line": 295, | ||
"column": 5 | ||
"line": 151, | ||
"column": 3 | ||
} | ||
@@ -301,28 +203,5 @@ }, | ||
"type": "void" | ||
}, | ||
"inheritedFrom": "UpdatingElement" | ||
} | ||
}, | ||
{ | ||
"name": "_applyInstanceProperties", | ||
"description": "Applies previously saved instance properties.", | ||
"privacy": "protected", | ||
"sourceRange": { | ||
"file": "../lit-element/lib/updating-element.js", | ||
"start": { | ||
"line": 299, | ||
"column": 4 | ||
}, | ||
"end": { | ||
"line": 305, | ||
"column": 5 | ||
} | ||
}, | ||
"metadata": {}, | ||
"params": [], | ||
"return": { | ||
"type": "void" | ||
}, | ||
"inheritedFrom": "UpdatingElement" | ||
}, | ||
{ | ||
"name": "connectedCallback", | ||
@@ -332,10 +211,9 @@ "description": "", | ||
"sourceRange": { | ||
"file": "../lit-element/lit-element.js", | ||
"start": { | ||
"line": 146, | ||
"column": 4 | ||
"line": 152, | ||
"column": 2 | ||
}, | ||
"end": { | ||
"line": 153, | ||
"column": 5 | ||
"line": 162, | ||
"column": 3 | ||
} | ||
@@ -347,4 +225,3 @@ }, | ||
"type": "void" | ||
}, | ||
"inheritedFrom": "LitElement" | ||
} | ||
}, | ||
@@ -357,7 +234,7 @@ { | ||
"start": { | ||
"line": 167, | ||
"line": 166, | ||
"column": 2 | ||
}, | ||
"end": { | ||
"line": 177, | ||
"line": 176, | ||
"column": 3 | ||
@@ -373,402 +250,2 @@ } | ||
{ | ||
"name": "attributeChangedCallback", | ||
"description": "Synchronizes property values when attributes change.", | ||
"privacy": "public", | ||
"sourceRange": { | ||
"file": "../lit-element/lib/updating-element.js", | ||
"start": { | ||
"line": 327, | ||
"column": 4 | ||
}, | ||
"end": { | ||
"line": 331, | ||
"column": 5 | ||
} | ||
}, | ||
"metadata": {}, | ||
"params": [ | ||
{ | ||
"name": "name" | ||
}, | ||
{ | ||
"name": "old" | ||
}, | ||
{ | ||
"name": "value" | ||
} | ||
], | ||
"return": { | ||
"type": "void" | ||
}, | ||
"inheritedFrom": "UpdatingElement" | ||
}, | ||
{ | ||
"name": "_propertyToAttribute", | ||
"description": "", | ||
"privacy": "protected", | ||
"sourceRange": { | ||
"file": "../lit-element/lib/updating-element.js", | ||
"start": { | ||
"line": 332, | ||
"column": 4 | ||
}, | ||
"end": { | ||
"line": 359, | ||
"column": 5 | ||
} | ||
}, | ||
"metadata": {}, | ||
"params": [ | ||
{ | ||
"name": "name" | ||
}, | ||
{ | ||
"name": "value" | ||
}, | ||
{ | ||
"name": "options", | ||
"defaultValue": "defaultPropertyDeclaration" | ||
} | ||
], | ||
"return": { | ||
"type": "void" | ||
}, | ||
"inheritedFrom": "UpdatingElement" | ||
}, | ||
{ | ||
"name": "_attributeToProperty", | ||
"description": "", | ||
"privacy": "protected", | ||
"sourceRange": { | ||
"file": "../lit-element/lib/updating-element.js", | ||
"start": { | ||
"line": 360, | ||
"column": 4 | ||
}, | ||
"end": { | ||
"line": 378, | ||
"column": 5 | ||
} | ||
}, | ||
"metadata": {}, | ||
"params": [ | ||
{ | ||
"name": "name" | ||
}, | ||
{ | ||
"name": "value" | ||
} | ||
], | ||
"return": { | ||
"type": "void" | ||
}, | ||
"inheritedFrom": "UpdatingElement" | ||
}, | ||
{ | ||
"name": "_requestUpdate", | ||
"description": "This private version of `requestUpdate` does not access or return the\n`updateComplete` promise. This promise can be overridden and is therefore\nnot free to access.", | ||
"privacy": "protected", | ||
"sourceRange": { | ||
"file": "../lit-element/lib/updating-element.js", | ||
"start": { | ||
"line": 384, | ||
"column": 4 | ||
}, | ||
"end": { | ||
"line": 414, | ||
"column": 5 | ||
} | ||
}, | ||
"metadata": {}, | ||
"params": [ | ||
{ | ||
"name": "name" | ||
}, | ||
{ | ||
"name": "oldValue" | ||
} | ||
], | ||
"return": { | ||
"type": "void" | ||
}, | ||
"inheritedFrom": "UpdatingElement" | ||
}, | ||
{ | ||
"name": "requestUpdate", | ||
"description": "Requests an update which is processed asynchronously. This should\nbe called when an element should update based on some state not triggered\nby setting a property. In this case, pass no arguments. It should also be\ncalled when manually implementing a property setter. In this case, pass the\nproperty `name` and `oldValue` to ensure that any configured property\noptions are honored. Returns the `updateComplete` Promise which is resolved\nwhen the update completes.", | ||
"privacy": "public", | ||
"sourceRange": { | ||
"file": "../lit-element/lib/updating-element.js", | ||
"start": { | ||
"line": 428, | ||
"column": 4 | ||
}, | ||
"end": { | ||
"line": 431, | ||
"column": 5 | ||
} | ||
}, | ||
"metadata": {}, | ||
"params": [ | ||
{ | ||
"name": "name", | ||
"description": "{PropertyKey} (optional) name of requesting property" | ||
}, | ||
{ | ||
"name": "oldValue", | ||
"description": "{any} (optional) old value of requesting property" | ||
} | ||
], | ||
"return": { | ||
"type": "Promise", | ||
"desc": "A Promise that is resolved when the update completes." | ||
}, | ||
"inheritedFrom": "UpdatingElement" | ||
}, | ||
{ | ||
"name": "_enqueueUpdate", | ||
"description": "Sets up the element to asynchronously update.", | ||
"privacy": "protected", | ||
"sourceRange": { | ||
"file": "../lit-element/lib/updating-element.js", | ||
"start": { | ||
"line": 435, | ||
"column": 4 | ||
}, | ||
"end": { | ||
"line": 471, | ||
"column": 5 | ||
} | ||
}, | ||
"metadata": {}, | ||
"params": [], | ||
"inheritedFrom": "UpdatingElement" | ||
}, | ||
{ | ||
"name": "performUpdate", | ||
"description": "Performs an element update. Note, if an exception is thrown during the\nupdate, `firstUpdated` and `updated` will not be called.\n\nYou can override this method to change the timing of updates. If this\nmethod is overridden, `super.performUpdate()` must be called.\n\nFor instance, to schedule updates to occur just before the next frame:\n\n```\nprotected async performUpdate(): Promise<unknown> {\n await new Promise((resolve) => requestAnimationFrame(() => resolve()));\n super.performUpdate();\n}\n```", | ||
"privacy": "public", | ||
"sourceRange": { | ||
"file": "../lit-element/lib/updating-element.js", | ||
"start": { | ||
"line": 497, | ||
"column": 4 | ||
}, | ||
"end": { | ||
"line": 527, | ||
"column": 5 | ||
} | ||
}, | ||
"metadata": {}, | ||
"params": [], | ||
"return": { | ||
"type": "void" | ||
}, | ||
"inheritedFrom": "UpdatingElement" | ||
}, | ||
{ | ||
"name": "_markUpdated", | ||
"description": "", | ||
"privacy": "protected", | ||
"sourceRange": { | ||
"file": "../lit-element/lib/updating-element.js", | ||
"start": { | ||
"line": 528, | ||
"column": 4 | ||
}, | ||
"end": { | ||
"line": 531, | ||
"column": 5 | ||
} | ||
}, | ||
"metadata": {}, | ||
"params": [], | ||
"return": { | ||
"type": "void" | ||
}, | ||
"inheritedFrom": "UpdatingElement" | ||
}, | ||
{ | ||
"name": "_getUpdateComplete", | ||
"description": "Override point for the `updateComplete` promise.\n\nIt is not safe to override the `updateComplete` getter directly due to a\nlimitation in TypeScript which means it is not possible to call a\nsuperclass getter (e.g. `super.updateComplete.then(...)`) when the target\nlanguage is ES5 (https://github.com/microsoft/TypeScript/issues/338).\nThis method should be overridden instead. For example:\n\n class MyElement extends LitElement {\n async _getUpdateComplete() {\n await super._getUpdateComplete();\n await this._myChild.updateComplete;\n }\n }", | ||
"privacy": "protected", | ||
"sourceRange": { | ||
"file": "../lit-element/lib/updating-element.js", | ||
"start": { | ||
"line": 566, | ||
"column": 4 | ||
}, | ||
"end": { | ||
"line": 568, | ||
"column": 5 | ||
} | ||
}, | ||
"metadata": {}, | ||
"params": [], | ||
"inheritedFrom": "UpdatingElement" | ||
}, | ||
{ | ||
"name": "shouldUpdate", | ||
"description": "Controls whether or not `update` should be called when the element requests\nan update. By default, this method always returns `true`, but this can be\ncustomized to control when to update.\n\n* @param _changedProperties Map of changed properties with old values", | ||
"privacy": "public", | ||
"sourceRange": { | ||
"file": "../lit-element/lib/updating-element.js", | ||
"start": { | ||
"line": 576, | ||
"column": 4 | ||
}, | ||
"end": { | ||
"line": 578, | ||
"column": 5 | ||
} | ||
}, | ||
"metadata": {}, | ||
"params": [ | ||
{ | ||
"name": "_changedProperties" | ||
} | ||
], | ||
"inheritedFrom": "UpdatingElement" | ||
}, | ||
{ | ||
"name": "update", | ||
"description": "Updates the element. This method reflects property values to attributes\nand calls `render` to render DOM via lit-html. Setting properties inside\nthis method will *not* trigger another update.\n* @param _changedProperties Map of changed properties with old values", | ||
"privacy": "public", | ||
"sourceRange": { | ||
"file": "../lit-element/lit-element.js", | ||
"start": { | ||
"line": 160, | ||
"column": 4 | ||
}, | ||
"end": { | ||
"line": 178, | ||
"column": 5 | ||
} | ||
}, | ||
"metadata": {}, | ||
"params": [ | ||
{ | ||
"name": "changedProperties" | ||
} | ||
], | ||
"return": { | ||
"type": "void" | ||
}, | ||
"inheritedFrom": "LitElement" | ||
}, | ||
{ | ||
"name": "updated", | ||
"description": "Invoked whenever the element is updated. Implement to perform\npost-updating tasks via DOM APIs, for example, focusing an element.\n\nSetting properties inside this method will trigger the element to update\nagain after this update cycle completes.\n\n* @param _changedProperties Map of changed properties with old values", | ||
"privacy": "public", | ||
"sourceRange": { | ||
"file": "../lit-element/lib/updating-element.js", | ||
"start": { | ||
"line": 605, | ||
"column": 4 | ||
}, | ||
"end": { | ||
"line": 606, | ||
"column": 5 | ||
} | ||
}, | ||
"metadata": {}, | ||
"params": [ | ||
{ | ||
"name": "_changedProperties" | ||
} | ||
], | ||
"return": { | ||
"type": "void" | ||
}, | ||
"inheritedFrom": "UpdatingElement" | ||
}, | ||
{ | ||
"name": "firstUpdated", | ||
"description": "Invoked when the element is first updated. Implement to perform one time\nwork on the element after update.\n\nSetting properties inside this method will trigger the element to update\nagain after this update cycle completes.\n\n* @param _changedProperties Map of changed properties with old values", | ||
"privacy": "public", | ||
"sourceRange": { | ||
"file": "../lit-element/lib/updating-element.js", | ||
"start": { | ||
"line": 616, | ||
"column": 4 | ||
}, | ||
"end": { | ||
"line": 617, | ||
"column": 5 | ||
} | ||
}, | ||
"metadata": {}, | ||
"params": [ | ||
{ | ||
"name": "_changedProperties" | ||
} | ||
], | ||
"return": { | ||
"type": "void" | ||
}, | ||
"inheritedFrom": "UpdatingElement" | ||
}, | ||
{ | ||
"name": "createRenderRoot", | ||
"description": "Returns the node into which the element should render and by default\ncreates and returns an open shadowRoot. Implement to customize where the\nelement's DOM is rendered. For example, to render into the element's\nchildNodes, return `this`.", | ||
"privacy": "public", | ||
"sourceRange": { | ||
"file": "../lit-element/lit-element.js", | ||
"start": { | ||
"line": 111, | ||
"column": 4 | ||
}, | ||
"end": { | ||
"line": 113, | ||
"column": 5 | ||
} | ||
}, | ||
"metadata": {}, | ||
"params": [], | ||
"return": { | ||
"type": "(Element | DocumentFragment)", | ||
"desc": "Returns a node into which to render." | ||
}, | ||
"inheritedFrom": "LitElement" | ||
}, | ||
{ | ||
"name": "adoptStyles", | ||
"description": "Applies styling to the element shadowRoot using the `static get styles`\nproperty. Styling will apply using `shadowRoot.adoptedStyleSheets` where\navailable and will fallback otherwise. When Shadow DOM is polyfilled,\nShadyCSS scopes styles and adds them to the document. When Shadow DOM\nis available but `adoptedStyleSheets` is not, styles are appended to the\nend of the `shadowRoot` to [mimic spec\nbehavior](https://wicg.github.io/construct-stylesheets/#using-constructed-stylesheets).", | ||
"privacy": "public", | ||
"sourceRange": { | ||
"file": "../lit-element/lit-element.js", | ||
"start": { | ||
"line": 123, | ||
"column": 4 | ||
}, | ||
"end": { | ||
"line": 145, | ||
"column": 5 | ||
} | ||
}, | ||
"metadata": {}, | ||
"params": [], | ||
"return": { | ||
"type": "void" | ||
}, | ||
"inheritedFrom": "LitElement" | ||
}, | ||
{ | ||
"name": "render", | ||
"description": "render function", | ||
"privacy": "public", | ||
"sourceRange": { | ||
"start": { | ||
"line": 66, | ||
"column": 2 | ||
}, | ||
"end": { | ||
"line": 73, | ||
"column": 3 | ||
} | ||
}, | ||
"metadata": {}, | ||
"params": [] | ||
}, | ||
{ | ||
"name": "hideSimpleToast", | ||
@@ -779,7 +256,7 @@ "description": "Hide callback", | ||
"start": { | ||
"line": 181, | ||
"line": 180, | ||
"column": 2 | ||
}, | ||
"end": { | ||
"line": 183, | ||
"line": 182, | ||
"column": 3 | ||
@@ -804,7 +281,7 @@ } | ||
"start": { | ||
"line": 184, | ||
"line": 183, | ||
"column": 2 | ||
}, | ||
"end": { | ||
"line": 186, | ||
"line": 185, | ||
"column": 3 | ||
@@ -829,7 +306,7 @@ } | ||
"start": { | ||
"line": 187, | ||
"line": 186, | ||
"column": 2 | ||
}, | ||
"end": { | ||
"line": 198, | ||
"line": 197, | ||
"column": 3 | ||
@@ -850,7 +327,7 @@ } | ||
"start": { | ||
"line": 202, | ||
"line": 201, | ||
"column": 2 | ||
}, | ||
"end": { | ||
"line": 230, | ||
"line": 229, | ||
"column": 3 | ||
@@ -875,7 +352,7 @@ } | ||
"start": { | ||
"line": 232, | ||
"line": 231, | ||
"column": 2 | ||
}, | ||
"end": { | ||
"line": 234, | ||
"line": 233, | ||
"column": 3 | ||
@@ -900,7 +377,7 @@ } | ||
"start": { | ||
"line": 235, | ||
"line": 234, | ||
"column": 2 | ||
}, | ||
"end": { | ||
"line": 246, | ||
"line": 245, | ||
"column": 3 | ||
@@ -920,205 +397,3 @@ } | ||
], | ||
"staticMethods": [ | ||
{ | ||
"name": "_ensureClassProperties", | ||
"description": "", | ||
"privacy": "protected", | ||
"sourceRange": { | ||
"file": "../lit-element/lib/updating-element.js", | ||
"start": { | ||
"line": 124, | ||
"column": 4 | ||
}, | ||
"end": { | ||
"line": 134, | ||
"column": 5 | ||
} | ||
}, | ||
"metadata": {}, | ||
"params": [], | ||
"return": { | ||
"type": "void" | ||
}, | ||
"inheritedFrom": "UpdatingElement" | ||
}, | ||
{ | ||
"name": "createProperty", | ||
"description": "Creates a property accessor on the element prototype if one does not exist.\nThe property setter calls the property's `hasChanged` property option\nor uses a strict identity check to determine whether or not to request\nan update.", | ||
"privacy": "public", | ||
"sourceRange": { | ||
"file": "../lit-element/lib/updating-element.js", | ||
"start": { | ||
"line": 142, | ||
"column": 4 | ||
}, | ||
"end": { | ||
"line": 170, | ||
"column": 5 | ||
} | ||
}, | ||
"metadata": {}, | ||
"params": [ | ||
{ | ||
"name": "name" | ||
}, | ||
{ | ||
"name": "options", | ||
"defaultValue": "defaultPropertyDeclaration" | ||
} | ||
], | ||
"return": { | ||
"type": "void" | ||
}, | ||
"inheritedFrom": "UpdatingElement" | ||
}, | ||
{ | ||
"name": "finalize", | ||
"description": "", | ||
"privacy": "public", | ||
"sourceRange": { | ||
"file": "../lit-element/lit-element.js", | ||
"start": { | ||
"line": 47, | ||
"column": 4 | ||
}, | ||
"end": { | ||
"line": 57, | ||
"column": 5 | ||
} | ||
}, | ||
"metadata": {}, | ||
"params": [], | ||
"return": { | ||
"type": "void" | ||
}, | ||
"inheritedFrom": "LitElement" | ||
}, | ||
{ | ||
"name": "_attributeNameForProperty", | ||
"description": "Returns the property name for the given attribute `name`.", | ||
"privacy": "protected", | ||
"sourceRange": { | ||
"file": "../lit-element/lib/updating-element.js", | ||
"start": { | ||
"line": 212, | ||
"column": 4 | ||
}, | ||
"end": { | ||
"line": 219, | ||
"column": 5 | ||
} | ||
}, | ||
"metadata": {}, | ||
"params": [ | ||
{ | ||
"name": "name" | ||
}, | ||
{ | ||
"name": "options" | ||
} | ||
], | ||
"inheritedFrom": "UpdatingElement" | ||
}, | ||
{ | ||
"name": "_valueHasChanged", | ||
"description": "Returns true if a property should request an update.\nCalled when a property value is set and uses the `hasChanged`\noption for the property if present or a strict identity check.", | ||
"privacy": "protected", | ||
"sourceRange": { | ||
"file": "../lit-element/lib/updating-element.js", | ||
"start": { | ||
"line": 226, | ||
"column": 4 | ||
}, | ||
"end": { | ||
"line": 228, | ||
"column": 5 | ||
} | ||
}, | ||
"metadata": {}, | ||
"params": [ | ||
{ | ||
"name": "value" | ||
}, | ||
{ | ||
"name": "old" | ||
}, | ||
{ | ||
"name": "hasChanged", | ||
"defaultValue": "notEqual" | ||
} | ||
], | ||
"inheritedFrom": "UpdatingElement" | ||
}, | ||
{ | ||
"name": "_propertyValueFromAttribute", | ||
"description": "Returns the property value for the given attribute value.\nCalled via the `attributeChangedCallback` and uses the property's\n`converter` or `converter.fromAttribute` property option.", | ||
"privacy": "protected", | ||
"sourceRange": { | ||
"file": "../lit-element/lib/updating-element.js", | ||
"start": { | ||
"line": 235, | ||
"column": 4 | ||
}, | ||
"end": { | ||
"line": 240, | ||
"column": 5 | ||
} | ||
}, | ||
"metadata": {}, | ||
"params": [ | ||
{ | ||
"name": "value" | ||
}, | ||
{ | ||
"name": "options" | ||
} | ||
], | ||
"inheritedFrom": "UpdatingElement" | ||
}, | ||
{ | ||
"name": "_propertyValueToAttribute", | ||
"description": "Returns the attribute value for the given property value. If this\nreturns undefined, the property will *not* be reflected to an attribute.\nIf this returns null, the attribute will be removed, otherwise the\nattribute will be set to the value.\nThis uses the property's `reflect` and `type.toAttribute` property options.", | ||
"privacy": "protected", | ||
"sourceRange": { | ||
"file": "../lit-element/lib/updating-element.js", | ||
"start": { | ||
"line": 249, | ||
"column": 4 | ||
}, | ||
"end": { | ||
"line": 258, | ||
"column": 5 | ||
} | ||
}, | ||
"metadata": {}, | ||
"params": [ | ||
{ | ||
"name": "value" | ||
}, | ||
{ | ||
"name": "options" | ||
} | ||
], | ||
"inheritedFrom": "UpdatingElement" | ||
}, | ||
{ | ||
"name": "_getUniqueStyles", | ||
"description": "", | ||
"privacy": "protected", | ||
"sourceRange": { | ||
"file": "../lit-element/lit-element.js", | ||
"start": { | ||
"line": 59, | ||
"column": 4 | ||
}, | ||
"end": { | ||
"line": 87, | ||
"column": 5 | ||
} | ||
}, | ||
"metadata": {}, | ||
"params": [], | ||
"inheritedFrom": "LitElement" | ||
} | ||
], | ||
"staticMethods": [], | ||
"demos": [ | ||
@@ -1133,7 +408,7 @@ { | ||
"start": { | ||
"line": 32, | ||
"line": 26, | ||
"column": 0 | ||
}, | ||
"end": { | ||
"line": 247, | ||
"line": 246, | ||
"column": 1 | ||
@@ -1151,7 +426,7 @@ } | ||
"start": { | ||
"line": 84, | ||
"line": 83, | ||
"column": 2 | ||
}, | ||
"end": { | ||
"line": 88, | ||
"line": 86, | ||
"column": 3 | ||
@@ -1168,7 +443,7 @@ } | ||
"start": { | ||
"line": 92, | ||
"line": 90, | ||
"column": 2 | ||
}, | ||
"end": { | ||
"line": 95, | ||
"line": 92, | ||
"column": 3 | ||
@@ -1185,7 +460,7 @@ } | ||
"start": { | ||
"line": 99, | ||
"line": 96, | ||
"column": 2 | ||
}, | ||
"end": { | ||
"line": 103, | ||
"line": 99, | ||
"column": 3 | ||
@@ -1202,7 +477,7 @@ } | ||
"start": { | ||
"line": 107, | ||
"line": 103, | ||
"column": 2 | ||
}, | ||
"end": { | ||
"line": 111, | ||
"line": 106, | ||
"column": 3 | ||
@@ -1219,7 +494,7 @@ } | ||
"start": { | ||
"line": 115, | ||
"line": 110, | ||
"column": 2 | ||
}, | ||
"end": { | ||
"line": 118, | ||
"line": 112, | ||
"column": 3 | ||
@@ -1236,7 +511,7 @@ } | ||
"start": { | ||
"line": 122, | ||
"line": 116, | ||
"column": 2 | ||
}, | ||
"end": { | ||
"line": 126, | ||
"line": 119, | ||
"column": 3 | ||
@@ -1253,7 +528,7 @@ } | ||
"start": { | ||
"line": 130, | ||
"line": 123, | ||
"column": 2 | ||
}, | ||
"end": { | ||
"line": 135, | ||
"line": 127, | ||
"column": 3 | ||
@@ -1272,5 +547,5 @@ } | ||
"slots": [], | ||
"tagname": "simple-toast\n`A singular toast / message for conistency`" | ||
"tagname": "simple-toast" | ||
} | ||
] | ||
} |
@@ -20,3 +20,3 @@ { | ||
}, | ||
"version": "2.4.1", | ||
"version": "2.5.0", | ||
"description": "A singular toast / message for conistency", | ||
@@ -51,13 +51,13 @@ "repository": { | ||
"@lrnwebcomponents/deduping-fix": "^2.4.0", | ||
"@lrnwebcomponents/storybook-utilities": "^2.4.1", | ||
"@lrnwebcomponents/storybook-utilities": "^2.5.0", | ||
"@polymer/iron-component-page": "github:PolymerElements/iron-component-page", | ||
"@polymer/iron-demo-helpers": "3.1.0", | ||
"@webcomponents/webcomponentsjs": "^2.2.10", | ||
"concurrently": "4.1.0", | ||
"@webcomponents/webcomponentsjs": "2.4.1", | ||
"concurrently": "5.1.0", | ||
"gulp-babel": "8.0.0", | ||
"gulp-sourcemaps": "2.6.4", | ||
"lodash": "4.17.13", | ||
"polymer-cli": "1.9.9", | ||
"polymer-cli": "1.9.11", | ||
"wct-browser-legacy": "1.0.2", | ||
"web-animations-js": "2.3.1" | ||
"web-animations-js": "2.3.2" | ||
}, | ||
@@ -72,3 +72,3 @@ "private": false, | ||
], | ||
"gitHead": "27af689f6d96197fba00cc508a953cdd008f21b1" | ||
"gitHead": "3f7a6e3d9f51b13c9b2abaa53b1f75f3acb46f70" | ||
} |
@@ -23,11 +23,5 @@ /** | ||
* `simple-toast` | ||
* @customElement simple-toast | ||
* `A singular toast / message for conistency` | ||
* | ||
* @microcopy - language worth noting: | ||
* - | ||
* | ||
* @polymer | ||
* @demo demo/index.html | ||
* @customElement simple-toast | ||
*/ | ||
@@ -49,2 +43,7 @@ class SimpleToast extends LitElement { | ||
paper-button:not(:defined), | ||
paper-toast:not(:defined) { | ||
display: none; | ||
} | ||
paper-toast { | ||
@@ -88,3 +87,2 @@ width: var(--simple-toast-width, inherit); | ||
"opened": { | ||
"name": "opened", | ||
"type": Boolean, | ||
@@ -97,3 +95,2 @@ "reflect": true | ||
"text": { | ||
"name": "text", | ||
"type": String | ||
@@ -105,3 +102,2 @@ }, | ||
"classStyle": { | ||
"name": "classStyle", | ||
"type": String, | ||
@@ -114,3 +110,2 @@ "attribute": "class-style" | ||
"closeText": { | ||
"name": "closeText", | ||
"type": String, | ||
@@ -123,3 +118,2 @@ "attribute": "close-text" | ||
"duration": { | ||
"name": "duration", | ||
"type": Number | ||
@@ -131,3 +125,2 @@ }, | ||
"eventCallback": { | ||
"name": "eventCallback", | ||
"type": String, | ||
@@ -140,3 +133,2 @@ "attribute": "event-callback" | ||
"closeButton": { | ||
"name": "closeButton", | ||
"type": Boolean, | ||
@@ -163,2 +155,11 @@ "reflect": true, | ||
this.setDefaultToast(); | ||
} | ||
firstUpdated() { | ||
setTimeout(() => { | ||
import("@polymer/paper-toast/paper-toast.js"); | ||
import("@polymer/paper-button/paper-button.js"); | ||
}, 0); | ||
} | ||
connectedCallback() { | ||
super.connectedCallback(); | ||
window.addEventListener( | ||
@@ -172,4 +173,2 @@ "simple-toast-hide", | ||
); | ||
import("@polymer/paper-toast/paper-toast.js"); | ||
import("@polymer/paper-button/paper-button.js"); | ||
} | ||
@@ -188,3 +187,3 @@ /** | ||
); | ||
super.connectedCallback(); | ||
super.disconnectedCallback(); | ||
} | ||
@@ -191,0 +190,0 @@ /** |
@@ -23,11 +23,5 @@ /** | ||
* `simple-toast` | ||
* @customElement simple-toast | ||
* `A singular toast / message for conistency` | ||
* | ||
* @microcopy - language worth noting: | ||
* - | ||
* | ||
* @polymer | ||
* @demo demo/index.html | ||
* @customElement simple-toast | ||
*/ | ||
@@ -47,2 +41,7 @@ class SimpleToast extends LitElement { | ||
paper-button:not(:defined), | ||
paper-toast:not(:defined) { | ||
display: none; | ||
} | ||
paper-toast { | ||
@@ -94,3 +93,2 @@ width: var(--simple-toast-width, inherit); | ||
opened: { | ||
name: "opened", | ||
type: Boolean, | ||
@@ -103,3 +101,2 @@ reflect: true | ||
text: { | ||
name: "text", | ||
type: String | ||
@@ -111,3 +108,2 @@ }, | ||
classStyle: { | ||
name: "classStyle", | ||
type: String, | ||
@@ -120,3 +116,2 @@ attribute: "class-style" | ||
closeText: { | ||
name: "closeText", | ||
type: String, | ||
@@ -129,3 +124,2 @@ attribute: "close-text" | ||
duration: { | ||
name: "duration", | ||
type: Number | ||
@@ -137,3 +131,2 @@ }, | ||
eventCallback: { | ||
name: "eventCallback", | ||
type: String, | ||
@@ -146,3 +139,2 @@ attribute: "event-callback" | ||
closeButton: { | ||
name: "closeButton", | ||
type: Boolean, | ||
@@ -168,2 +160,11 @@ reflect: true, | ||
this.setDefaultToast(); | ||
} | ||
firstUpdated() { | ||
setTimeout(() => { | ||
import("@polymer/paper-toast/paper-toast.js"); | ||
import("@polymer/paper-button/paper-button.js"); | ||
}, 0); | ||
} | ||
connectedCallback() { | ||
super.connectedCallback(); | ||
window.addEventListener( | ||
@@ -177,4 +178,2 @@ "simple-toast-hide", | ||
); | ||
import("@polymer/paper-toast/paper-toast.js"); | ||
import("@polymer/paper-button/paper-button.js"); | ||
} | ||
@@ -193,3 +192,3 @@ /** | ||
); | ||
super.connectedCallback(); | ||
super.disconnectedCallback(); | ||
} | ||
@@ -196,0 +195,0 @@ /** |
@@ -1,2 +0,2 @@ | ||
!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})}); | ||
!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 r(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,i)}return n}function s(t){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function a(t,e){return(a=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function l(t,e){return!e||"object"!=typeof e&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function c(t,e,n){return(c="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=s(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 p(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}function u(){var t=p(["\n:host {\n display: block;\n}\n\n:host([hidden]) {\n display: none;\n}\n\npaper-button:not(:defined),\npaper-toast:not(:defined) {\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 d(){var t=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 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 h=function(t){function n(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),(t=l(this,s(n).call(this))).setDefaultToast(),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&&a(t,e)}(n,e.LitElement),i(n,[{key:"render",value:function(){return e.html(d(),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]:{};e%2?r(Object(n),!0).forEach(function(e){o(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({},c(s(n),"properties",this),{opened:{type:Boolean,reflect:!0},text:{type:String},classStyle:{type:String,attribute:"class-style"},closeText:{type:String,attribute:"close-text"},duration:{type:Number},eventCallback:{type:String,attribute:"event-callback"},closeButton:{type:Boolean,reflect:!0,attribute:"close-button"}})}},{key:"tag",get:function(){return"simple-toast"}}]),i(n,[{key:"firstUpdated",value:function(){setTimeout(function(){import("@polymer/paper-toast/paper-toast.js"),import("@polymer/paper-button/paper-button.js")},0)}},{key:"connectedCallback",value:function(){c(s(n.prototype),"connectedCallback",this).call(this),window.addEventListener("simple-toast-hide",this.hideSimpleToast.bind(this)),window.addEventListener("simple-toast-show",this.showSimpleToast.bind(this))}},{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),"disconnectedCallback",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(h.tag,h),t.SimpleToast=h,Object.defineProperty(t,"__esModule",{value:!0})}); | ||
//# sourceMappingURL=simple-toast.umd.js.map |
@@ -6,3 +6,2 @@ { | ||
"opened": { | ||
"name": "opened", | ||
"type": Boolean, | ||
@@ -15,3 +14,2 @@ "reflect": true | ||
"text": { | ||
"name": "text", | ||
"type": String | ||
@@ -23,3 +21,2 @@ }, | ||
"classStyle": { | ||
"name": "classStyle", | ||
"type": String, | ||
@@ -32,3 +29,2 @@ "attribute": "class-style" | ||
"closeText": { | ||
"name": "closeText", | ||
"type": String, | ||
@@ -41,3 +37,2 @@ "attribute": "close-text" | ||
"duration": { | ||
"name": "duration", | ||
"type": Number | ||
@@ -49,3 +44,2 @@ }, | ||
"eventCallback": { | ||
"name": "eventCallback", | ||
"type": String, | ||
@@ -58,3 +52,2 @@ "attribute": "event-callback" | ||
"closeButton": { | ||
"name": "closeButton", | ||
"type": Boolean, | ||
@@ -61,0 +54,0 @@ "reflect": true, |
@@ -23,11 +23,5 @@ /** | ||
* `simple-toast` | ||
* @customElement simple-toast | ||
* `A singular toast / message for conistency` | ||
* | ||
* @microcopy - language worth noting: | ||
* - | ||
* | ||
* @polymer | ||
* @demo demo/index.html | ||
* @customElement simple-toast | ||
*/ | ||
@@ -50,2 +44,11 @@ class SimpleToast extends LitElement { | ||
this.setDefaultToast(); | ||
} | ||
firstUpdated() { | ||
setTimeout(() => { | ||
import("@polymer/paper-toast/paper-toast.js"); | ||
import("@polymer/paper-button/paper-button.js"); | ||
}, 0); | ||
} | ||
connectedCallback() { | ||
super.connectedCallback(); | ||
window.addEventListener( | ||
@@ -59,4 +62,2 @@ "simple-toast-hide", | ||
); | ||
import("@polymer/paper-toast/paper-toast.js"); | ||
import("@polymer/paper-button/paper-button.js"); | ||
} | ||
@@ -75,3 +76,3 @@ /** | ||
); | ||
super.connectedCallback(); | ||
super.disconnectedCallback(); | ||
} | ||
@@ -78,0 +79,0 @@ /** |
@@ -6,3 +6,3 @@ { | ||
"name": "simple-toast", | ||
"description": "`simple-toast`\n\n", | ||
"description": "`simple-toast`\n`A singular toast / message for conistency`\n\n", | ||
"attributes": [] | ||
@@ -12,3 +12,3 @@ }, | ||
"name": "simple-toast", | ||
"description": "`simple-toast`\n\nAttributes:\n\n * `opened` {`boolean`} - Opened state of the toast, use event to change\n\n * `text` {`string`} - Plain text based message to display\n\n * `class-style` {`string`} - Class name, fit-bottom being a useful one\n\n * `close-text` {`string`} - Text for the close button\n\n * `duration` {`number`} - How long the toast message should be displayed\n\n * `event-callback` {`string`} - Event callback when hide is called\n\n * `close-button` {`boolean`} - If there should be a close button shown\n\nProperties:\n\n * `opened` {`boolean`} - Opened state of the toast, use event to change\n\n * `text` {`string`} - Plain text based message to display\n\n * `classStyle` {`string`} - Class name, fit-bottom being a useful one\n\n * `closeText` {`string`} - Text for the close button\n\n * `duration` {`number`} - How long the toast message should be displayed\n\n * `eventCallback` {`string`} - Event callback when hide is called\n\n * `closeButton` {`boolean`} - If there should be a close button shown", | ||
"description": "`simple-toast`\n`A singular toast / message for conistency`\n\nAttributes:\n\n * `opened` {`boolean`} - Opened state of the toast, use event to change\n\n * `text` {`string`} - Plain text based message to display\n\n * `class-style` {`string`} - Class name, fit-bottom being a useful one\n\n * `close-text` {`string`} - Text for the close button\n\n * `duration` {`number`} - How long the toast message should be displayed\n\n * `event-callback` {`string`} - Event callback when hide is called\n\n * `close-button` {`boolean`} - If there should be a close button shown\n\nProperties:\n\n * `opened` {`boolean`} - Opened state of the toast, use event to change\n\n * `text` {`string`} - Plain text based message to display\n\n * `classStyle` {`string`} - Class name, fit-bottom being a useful one\n\n * `closeText` {`string`} - Text for the close button\n\n * `duration` {`number`} - How long the toast message should be displayed\n\n * `eventCallback` {`string`} - Event callback when hide is called\n\n * `closeButton` {`boolean`} - If there should be a close button shown", | ||
"attributes": [ | ||
@@ -53,3 +53,3 @@ { | ||
"name": "simple-toast", | ||
"description": "`simple-toast`\n\n", | ||
"description": "`simple-toast`\n`A singular toast / message for conistency`\n\n", | ||
"attributes": [] | ||
@@ -56,0 +56,0 @@ } |
Sorry, the diff of this file is not supported yet
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
78366
1642