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

@pwabuilder/pwainstall

Package Overview
Dependencies
Maintainers
1
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pwabuilder/pwainstall - npm Package Compare versions

Comparing version 0.9.8 to 0.9.9

0

.github/ISSUE_TEMPLATE/bug_report.md

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

@@ -0,0 +0,0 @@ # Contributing to the pwa-install component

@@ -0,0 +0,0 @@ ManifoldJS

2

package.json
{
"name": "@pwabuilder/pwainstall",
"version": "0.9.8",
"version": "0.9.9",
"description": "",

@@ -5,0 +5,0 @@ "main": "dist/pwa-install.js",

@@ -39,8 +39,9 @@ # pwa-install

| Property | Attribute | Description | Type | Default |
| -------------- | -------------- | ------------------------------- | --------- | --------------- |
| `showopen` | `showopen` | Will always show install button | `boolean` | `false` |
| `manifestpath` | `manifestpath` | path to your web manifest | `string` | `manifest.json` |
| `featuresheader` | `featuresheader` | Controls the text of the features header | `string` | `Key Features` |
| `descriptionheader` | `descriptionheader` | Controls the text of the description header | `string` | `Description` |
| Property | Attribute | Description | Type | Default |
| ------------------- | ------------------- | ------------------------------------------------- | --------- | --------------- |
| `showopen` | `showopen` | Will always show install button | `boolean` | `false` |
| `showeligible` | `showeligible` | Will only show install button if user is eligible | `boolean` | `false` |
| `manifestpath` | `manifestpath` | path to your web manifest | `string` | `manifest.json` |
| `featuresheader` | `featuresheader` | Controls the text of the features header | `string` | `Key Features` |
| `descriptionheader` | `descriptionheader` | Controls the text of the description header | `string` | `Description` |

@@ -47,0 +48,0 @@ ### Methods

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

@@ -16,2 +16,5 @@ import {

@property({ type: Boolean }) showopen: boolean;
@property({ type: Boolean }) showEligible: boolean;
@property({ type: Boolean }) isSupportingBrowser: boolean;
@property({ type: Boolean }) isIOS: boolean;
@property() explainer: string = "This app can be installed on your PC or mobile device. This will allow this web app to look and behave like any other installed up. You will find it in your app lists and be able to pin it to your home screen, start menus or task bars. This installed web app will also be able to safely interact with other apps and your operating system. "

@@ -287,2 +290,9 @@ @property() featuresheader: string = "Key Features";

#iosText {
color: var(--install-button-color);
margin: 2em;
text-align: center;
font-weight: bold;
}
@media(min-width: 1445px) {

@@ -426,2 +436,8 @@ #installModal {

// handle iOS specifically
this.isIOS = navigator.userAgent.includes('iPhone');
// check for beforeinstallprompt support
this.isSupportingBrowser = window.hasOwnProperty('BeforeInstallPromptEvent');
document.onkeyup = (e) => {

@@ -476,2 +492,7 @@ if (e.key === "Escape") {

shouldShowInstall(): boolean {
const eligibleUser = this.showEligible && this.isSupportingBrowser && this.deferredprompt;
return this.showopen || eligibleUser;
}
public async install(): Promise<boolean> {

@@ -506,3 +527,3 @@ if (this.deferredprompt) {

return html`
${this.showopen ? html`<button id="openButton" @click="${() => this.openPrompt()}">
${this.shouldShowInstall() ? html`<button id="openButton" @click="${() => this.openPrompt()}">
<slot>

@@ -579,6 +600,6 @@ Install

<div id="buttonsContainer">
${!this.isIOS ? html`<div id="buttonsContainer">
${this.deferredprompt ? html`<button id="installButton" @click="${() => this.install()}">Install ${this.manifestdata.short_name}</button>` : html`<button @click="${() => this.cancel()}" id="installButton">Close</button>`}
</div>
</div>
</div>` : html`<p id="iosText">Tap the share button and then 'Add to Homescreen'</p>`}
`

@@ -585,0 +606,0 @@ : null

@@ -0,0 +0,0 @@ {

@@ -0,0 +0,0 @@ {

@@ -0,0 +0,0 @@ {

@@ -0,0 +0,0 @@ {

@@ -0,0 +0,0 @@ // This is the service worker with the Cache-first network

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

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