@auxilium/datalynk-client 1.3.0 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +49 -25
- package/dist/index.mjs +49 -25
- package/dist/login-prompt.d.ts +8 -1
- package/dist/login-prompt.d.ts.map +1 -1
- package/dist/pwa.d.ts +1 -1
- package/dist/pwa.d.ts.map +1 -1
- package/dist/service.worker.js +4 -10
- package/dist/service.worker.mjs +4 -10
- package/dist/themes.d.ts +4 -0
- package/dist/themes.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1719,6 +1719,8 @@ async function getTheme(spoke, scope) {
|
|
|
1719
1719
|
color: "#c83232",
|
|
1720
1720
|
glow: "#c83232",
|
|
1721
1721
|
logo: `https://${spoke}.auxiliumgroup.com/static/js/auxilium/dijits/templates/login/${spoke}/logo.png`,
|
|
1722
|
+
logoPosition: "left",
|
|
1723
|
+
hideLogo: false,
|
|
1722
1724
|
hideApps: false,
|
|
1723
1725
|
persist: true,
|
|
1724
1726
|
title: spoke.toUpperCase(),
|
|
@@ -1755,7 +1757,6 @@ const _LoginPrompt = class _LoginPrompt {
|
|
|
1755
1757
|
this.themeDefaults().then(() => this.render());
|
|
1756
1758
|
}
|
|
1757
1759
|
async render() {
|
|
1758
|
-
var _a;
|
|
1759
1760
|
this.close();
|
|
1760
1761
|
document.head.innerHTML += _LoginPrompt.css(this.options);
|
|
1761
1762
|
const div = document.createElement("div");
|
|
@@ -1770,18 +1771,17 @@ const _LoginPrompt = class _LoginPrompt {
|
|
|
1770
1771
|
if (this.options.persist === false) this.persist.parentElement.remove();
|
|
1771
1772
|
this.form.onsubmit = (event) => this.login(event);
|
|
1772
1773
|
const pwaLink = document.querySelector("#pwa-install-link");
|
|
1773
|
-
|
|
1774
|
-
if (pwaLink && ((_a = this.api.options.pwaSettings) == null ? void 0 : _a.loginLink) && !isApple) {
|
|
1775
|
-
pwaLink.classList.remove("hidden");
|
|
1774
|
+
if (pwaLink) {
|
|
1776
1775
|
pwaLink.addEventListener("click", async (e) => {
|
|
1776
|
+
var _a;
|
|
1777
1777
|
e.preventDefault();
|
|
1778
|
-
if (this.api.pwa
|
|
1779
|
-
this.api.pwa
|
|
1780
|
-
const choice = await this.api.pwa
|
|
1778
|
+
if ((_a = this.api.pwa) == null ? void 0 : _a.deferredPrompt) {
|
|
1779
|
+
this.api.pwa.deferredPrompt.prompt();
|
|
1780
|
+
const choice = await this.api.pwa.deferredPrompt.userChoice;
|
|
1781
1781
|
if (choice.outcome === "accepted") {
|
|
1782
1782
|
console.log("PWA installed via login link");
|
|
1783
1783
|
}
|
|
1784
|
-
this.api.pwa
|
|
1784
|
+
this.api.pwa.deferredPrompt = null;
|
|
1785
1785
|
} else {
|
|
1786
1786
|
this.api.pwa.prompt();
|
|
1787
1787
|
}
|
|
@@ -1790,16 +1790,23 @@ const _LoginPrompt = class _LoginPrompt {
|
|
|
1790
1790
|
}
|
|
1791
1791
|
async themeDefaults() {
|
|
1792
1792
|
const theme = await getTheme(this.spoke, "login");
|
|
1793
|
+
const cleaned = clean(this.options, true);
|
|
1793
1794
|
this.options = {
|
|
1794
|
-
logoOnly: !this.options.title && !theme.found,
|
|
1795
1795
|
...theme,
|
|
1796
|
-
...
|
|
1796
|
+
...cleaned,
|
|
1797
|
+
logoOnly: !this.options.title && !theme.found,
|
|
1798
|
+
logoPosition: cleaned.logoPosition ?? theme.logoPosition ?? "left",
|
|
1799
|
+
hideLogo: cleaned.hideLogo ?? theme.hideLogo ?? false,
|
|
1800
|
+
platform: this.api.pwa.platform,
|
|
1801
|
+
...Object.prototype.hasOwnProperty.call(this.api.options, "pwaSettings") && {
|
|
1802
|
+
pwaSettings: this.api.options.pwaSettings
|
|
1803
|
+
}
|
|
1797
1804
|
};
|
|
1798
1805
|
}
|
|
1799
1806
|
/** Close the login prompt */
|
|
1800
1807
|
close() {
|
|
1801
1808
|
var _a, _b;
|
|
1802
|
-
(_a = document.querySelector("#datalynk-login-
|
|
1809
|
+
(_a = document.querySelector("#datalynk-login-styles")) == null ? void 0 : _a.remove();
|
|
1803
1810
|
(_b = document.querySelector("#datalynk-login")) == null ? void 0 : _b.remove();
|
|
1804
1811
|
}
|
|
1805
1812
|
/** Check if login prompt is still open */
|
|
@@ -2018,19 +2025,28 @@ __publicField(_LoginPrompt, "css", (options) => `
|
|
|
2018
2025
|
}
|
|
2019
2026
|
</style>`);
|
|
2020
2027
|
/** Dynamically create HTML */
|
|
2021
|
-
__publicField(_LoginPrompt, "template", (options) =>
|
|
2028
|
+
__publicField(_LoginPrompt, "template", (options) => {
|
|
2029
|
+
var _a;
|
|
2030
|
+
return `
|
|
2022
2031
|
<div id="datalynk-login">
|
|
2023
2032
|
${!options.backgroundColor ? `<img src="${options.background}" onerror="document.querySelector('#datalynk-login').style.backgroundImage = 'url(https://datalynk.auxiliumgroup.com/static/js/auxilium/dijits/templates/login/datalynk/background.jpg)'" style="width: 0; height: 0;"/>` : ""}
|
|
2024
2033
|
<div class="added-links">
|
|
2025
2034
|
${(options.addLinks || []).map((link) => `<a href="${link.url || "#"}" target="_blank">${link.text}</a>`).join(" | ")}
|
|
2026
2035
|
</div>
|
|
2027
2036
|
<div class="login-container">
|
|
2028
|
-
<div class="login-header">
|
|
2029
|
-
${options.logo ? `<img alt="Logo" src="${options.logo}" class="login-logo" style="height: 100px; width: auto;" onerror="this.style.display='none'"
|
|
2030
|
-
|
|
2037
|
+
<div class="login-header" style="flex-direction: ${["aboveTitle", "belowTitle", "belowSubtitle"].includes(options.logoPosition || "") ? "column" : "row"};">
|
|
2038
|
+
${!options.hideLogo && options.logo && options.logoPosition === "aboveTitle" ? `<img alt="Logo" src="${options.logo}" class="login-logo" style="height: 100px; width: auto; margin-bottom: 0.5rem;" onerror="this.style.display='none'">` : ""}
|
|
2039
|
+
|
|
2040
|
+
${!options.hideLogo && options.logo && options.logoPosition === "left" ? `<img alt="Logo" src="${options.logo}" class="login-logo" style="height: 100px; width: auto; margin-right: 0.5rem;" onerror="this.style.display='none'">` : ""}
|
|
2041
|
+
|
|
2042
|
+
<div style="display: flex; flex-direction: column; align-items: center;">
|
|
2031
2043
|
<span class="login-title">${options.title || ""}</span>
|
|
2044
|
+
${options.logo && !options.hideLogo && options.logoPosition === "belowTitle" ? `<img alt="Logo" src="${options.logo}" class="login-logo" style="height: 100px; width: auto; margin-top: 0.5rem;" onerror="this.style.display='none'">` : ""}
|
|
2032
2045
|
${options.subtitle ? `<span class="login-subtitle">${options.subtitle}</span>` : ""}
|
|
2046
|
+
${options.logo && !options.hideLogo && options.logoPosition === "belowSubtitle" ? `<img alt="Logo" src="${options.logo}" class="login-logo" style="height: 100px; width: auto; margin-top: 0.5rem;" onerror="this.style.display='none'">` : ""}
|
|
2033
2047
|
</div>
|
|
2048
|
+
|
|
2049
|
+
${!options.hideLogo && options.logo && options.logoPosition === "right" ? `<img alt="Logo" src="${options.logo}" class="login-logo" style="height: 100px; width: auto; margin-left: 0.5rem;" onerror="this.style.display='none'">` : ""}
|
|
2034
2050
|
</div>
|
|
2035
2051
|
<div class="login-content">
|
|
2036
2052
|
<div class="login-body" style="max-width: 300px">
|
|
@@ -2053,11 +2069,12 @@ __publicField(_LoginPrompt, "template", (options) => `
|
|
|
2053
2069
|
</form>
|
|
2054
2070
|
</div>
|
|
2055
2071
|
<div class="login-links" style="text-align: center">
|
|
2056
|
-
|
|
2072
|
+
${((_a = options == null ? void 0 : options.pwaSettings) == null ? void 0 : _a.loginLink) === true && !["ios", "mac"].includes(options.platform) ? `
|
|
2073
|
+
<a href="#" id="pwa-install-link" style="margin-right: 1rem;" title="Install App">
|
|
2057
2074
|
<svg xmlns="http://www.w3.org/2000/svg" height="40px" viewBox="0 0 24 24" width="40px" fill="${options.color || "#0B76FC"}">
|
|
2058
2075
|
<path d="M12 16l4-5h-3V4h-2v7H8z"/><path d="M20 18H4v-2h16v2z"/>
|
|
2059
2076
|
</svg> Download App
|
|
2060
|
-
</a
|
|
2077
|
+
</a>` : ""}
|
|
2061
2078
|
${options.hideApps ? "" : `
|
|
2062
2079
|
<a href="https://itunes.apple.com/ca/app/auxilium-mobile/id1166379280?mt=8" target="_blank">
|
|
2063
2080
|
<img alt="App Store" src="https://datalynk.auxiliumgroup.com/api/js/auxilium/dijits/templates/login/_common/mobile_apple_transparent.png">
|
|
@@ -2076,7 +2093,8 @@ __publicField(_LoginPrompt, "template", (options) => `
|
|
|
2076
2093
|
</div>
|
|
2077
2094
|
</div>
|
|
2078
2095
|
</div>
|
|
2079
|
-
|
|
2096
|
+
`;
|
|
2097
|
+
});
|
|
2080
2098
|
let LoginPrompt = _LoginPrompt;
|
|
2081
2099
|
class Auth {
|
|
2082
2100
|
constructor(api) {
|
|
@@ -2356,14 +2374,20 @@ class PWA {
|
|
|
2356
2374
|
meta("name", "apple-touch-startup-image", `https://datalynk-client.scarborough.auxilium.world/logo.png`);
|
|
2357
2375
|
if (!document.querySelector('link[rel="manifest"]')) {
|
|
2358
2376
|
const link = document.createElement("link");
|
|
2359
|
-
link.
|
|
2360
|
-
|
|
2377
|
+
link.rel = "manifest";
|
|
2378
|
+
const base = String(this.api.url).replace(/\/+$/, "");
|
|
2379
|
+
const startUrl = location.pathname;
|
|
2380
|
+
const scopePath = startUrl.endsWith("/") ? startUrl : startUrl.replace(/[^/]+$/, "");
|
|
2381
|
+
const manifestObj = {
|
|
2361
2382
|
name: this.api.options.name,
|
|
2362
2383
|
short_name: this.api.options.name,
|
|
2363
|
-
start_url:
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2384
|
+
start_url: startUrl,
|
|
2385
|
+
scope: scopePath || "/",
|
|
2386
|
+
display: "standalone",
|
|
2387
|
+
...this.api.options.manifest || {},
|
|
2388
|
+
...manifest || {}
|
|
2389
|
+
};
|
|
2390
|
+
link.href = `${base}/manifest?json=${encodeURIComponent(JSON.stringify(manifestObj))}`;
|
|
2367
2391
|
document.head.append(link);
|
|
2368
2392
|
}
|
|
2369
2393
|
if (!this.iframe && !this.pwa && this.platform != "mac") setTimeout(() => {
|
|
@@ -3428,7 +3452,7 @@ class Superuser {
|
|
|
3428
3452
|
} });
|
|
3429
3453
|
}
|
|
3430
3454
|
}
|
|
3431
|
-
const version = "1.3.
|
|
3455
|
+
const version = "1.3.1";
|
|
3432
3456
|
class WebRtc {
|
|
3433
3457
|
constructor(api) {
|
|
3434
3458
|
__publicField(this, "ice");
|
package/dist/index.mjs
CHANGED
|
@@ -1717,6 +1717,8 @@ async function getTheme(spoke, scope) {
|
|
|
1717
1717
|
color: "#c83232",
|
|
1718
1718
|
glow: "#c83232",
|
|
1719
1719
|
logo: `https://${spoke}.auxiliumgroup.com/static/js/auxilium/dijits/templates/login/${spoke}/logo.png`,
|
|
1720
|
+
logoPosition: "left",
|
|
1721
|
+
hideLogo: false,
|
|
1720
1722
|
hideApps: false,
|
|
1721
1723
|
persist: true,
|
|
1722
1724
|
title: spoke.toUpperCase(),
|
|
@@ -1753,7 +1755,6 @@ const _LoginPrompt = class _LoginPrompt {
|
|
|
1753
1755
|
this.themeDefaults().then(() => this.render());
|
|
1754
1756
|
}
|
|
1755
1757
|
async render() {
|
|
1756
|
-
var _a;
|
|
1757
1758
|
this.close();
|
|
1758
1759
|
document.head.innerHTML += _LoginPrompt.css(this.options);
|
|
1759
1760
|
const div = document.createElement("div");
|
|
@@ -1768,18 +1769,17 @@ const _LoginPrompt = class _LoginPrompt {
|
|
|
1768
1769
|
if (this.options.persist === false) this.persist.parentElement.remove();
|
|
1769
1770
|
this.form.onsubmit = (event) => this.login(event);
|
|
1770
1771
|
const pwaLink = document.querySelector("#pwa-install-link");
|
|
1771
|
-
|
|
1772
|
-
if (pwaLink && ((_a = this.api.options.pwaSettings) == null ? void 0 : _a.loginLink) && !isApple) {
|
|
1773
|
-
pwaLink.classList.remove("hidden");
|
|
1772
|
+
if (pwaLink) {
|
|
1774
1773
|
pwaLink.addEventListener("click", async (e) => {
|
|
1774
|
+
var _a;
|
|
1775
1775
|
e.preventDefault();
|
|
1776
|
-
if (this.api.pwa
|
|
1777
|
-
this.api.pwa
|
|
1778
|
-
const choice = await this.api.pwa
|
|
1776
|
+
if ((_a = this.api.pwa) == null ? void 0 : _a.deferredPrompt) {
|
|
1777
|
+
this.api.pwa.deferredPrompt.prompt();
|
|
1778
|
+
const choice = await this.api.pwa.deferredPrompt.userChoice;
|
|
1779
1779
|
if (choice.outcome === "accepted") {
|
|
1780
1780
|
console.log("PWA installed via login link");
|
|
1781
1781
|
}
|
|
1782
|
-
this.api.pwa
|
|
1782
|
+
this.api.pwa.deferredPrompt = null;
|
|
1783
1783
|
} else {
|
|
1784
1784
|
this.api.pwa.prompt();
|
|
1785
1785
|
}
|
|
@@ -1788,16 +1788,23 @@ const _LoginPrompt = class _LoginPrompt {
|
|
|
1788
1788
|
}
|
|
1789
1789
|
async themeDefaults() {
|
|
1790
1790
|
const theme = await getTheme(this.spoke, "login");
|
|
1791
|
+
const cleaned = clean(this.options, true);
|
|
1791
1792
|
this.options = {
|
|
1792
|
-
logoOnly: !this.options.title && !theme.found,
|
|
1793
1793
|
...theme,
|
|
1794
|
-
...
|
|
1794
|
+
...cleaned,
|
|
1795
|
+
logoOnly: !this.options.title && !theme.found,
|
|
1796
|
+
logoPosition: cleaned.logoPosition ?? theme.logoPosition ?? "left",
|
|
1797
|
+
hideLogo: cleaned.hideLogo ?? theme.hideLogo ?? false,
|
|
1798
|
+
platform: this.api.pwa.platform,
|
|
1799
|
+
...Object.prototype.hasOwnProperty.call(this.api.options, "pwaSettings") && {
|
|
1800
|
+
pwaSettings: this.api.options.pwaSettings
|
|
1801
|
+
}
|
|
1795
1802
|
};
|
|
1796
1803
|
}
|
|
1797
1804
|
/** Close the login prompt */
|
|
1798
1805
|
close() {
|
|
1799
1806
|
var _a, _b;
|
|
1800
|
-
(_a = document.querySelector("#datalynk-login-
|
|
1807
|
+
(_a = document.querySelector("#datalynk-login-styles")) == null ? void 0 : _a.remove();
|
|
1801
1808
|
(_b = document.querySelector("#datalynk-login")) == null ? void 0 : _b.remove();
|
|
1802
1809
|
}
|
|
1803
1810
|
/** Check if login prompt is still open */
|
|
@@ -2016,19 +2023,28 @@ __publicField(_LoginPrompt, "css", (options) => `
|
|
|
2016
2023
|
}
|
|
2017
2024
|
</style>`);
|
|
2018
2025
|
/** Dynamically create HTML */
|
|
2019
|
-
__publicField(_LoginPrompt, "template", (options) =>
|
|
2026
|
+
__publicField(_LoginPrompt, "template", (options) => {
|
|
2027
|
+
var _a;
|
|
2028
|
+
return `
|
|
2020
2029
|
<div id="datalynk-login">
|
|
2021
2030
|
${!options.backgroundColor ? `<img src="${options.background}" onerror="document.querySelector('#datalynk-login').style.backgroundImage = 'url(https://datalynk.auxiliumgroup.com/static/js/auxilium/dijits/templates/login/datalynk/background.jpg)'" style="width: 0; height: 0;"/>` : ""}
|
|
2022
2031
|
<div class="added-links">
|
|
2023
2032
|
${(options.addLinks || []).map((link) => `<a href="${link.url || "#"}" target="_blank">${link.text}</a>`).join(" | ")}
|
|
2024
2033
|
</div>
|
|
2025
2034
|
<div class="login-container">
|
|
2026
|
-
<div class="login-header">
|
|
2027
|
-
${options.logo ? `<img alt="Logo" src="${options.logo}" class="login-logo" style="height: 100px; width: auto;" onerror="this.style.display='none'"
|
|
2028
|
-
|
|
2035
|
+
<div class="login-header" style="flex-direction: ${["aboveTitle", "belowTitle", "belowSubtitle"].includes(options.logoPosition || "") ? "column" : "row"};">
|
|
2036
|
+
${!options.hideLogo && options.logo && options.logoPosition === "aboveTitle" ? `<img alt="Logo" src="${options.logo}" class="login-logo" style="height: 100px; width: auto; margin-bottom: 0.5rem;" onerror="this.style.display='none'">` : ""}
|
|
2037
|
+
|
|
2038
|
+
${!options.hideLogo && options.logo && options.logoPosition === "left" ? `<img alt="Logo" src="${options.logo}" class="login-logo" style="height: 100px; width: auto; margin-right: 0.5rem;" onerror="this.style.display='none'">` : ""}
|
|
2039
|
+
|
|
2040
|
+
<div style="display: flex; flex-direction: column; align-items: center;">
|
|
2029
2041
|
<span class="login-title">${options.title || ""}</span>
|
|
2042
|
+
${options.logo && !options.hideLogo && options.logoPosition === "belowTitle" ? `<img alt="Logo" src="${options.logo}" class="login-logo" style="height: 100px; width: auto; margin-top: 0.5rem;" onerror="this.style.display='none'">` : ""}
|
|
2030
2043
|
${options.subtitle ? `<span class="login-subtitle">${options.subtitle}</span>` : ""}
|
|
2044
|
+
${options.logo && !options.hideLogo && options.logoPosition === "belowSubtitle" ? `<img alt="Logo" src="${options.logo}" class="login-logo" style="height: 100px; width: auto; margin-top: 0.5rem;" onerror="this.style.display='none'">` : ""}
|
|
2031
2045
|
</div>
|
|
2046
|
+
|
|
2047
|
+
${!options.hideLogo && options.logo && options.logoPosition === "right" ? `<img alt="Logo" src="${options.logo}" class="login-logo" style="height: 100px; width: auto; margin-left: 0.5rem;" onerror="this.style.display='none'">` : ""}
|
|
2032
2048
|
</div>
|
|
2033
2049
|
<div class="login-content">
|
|
2034
2050
|
<div class="login-body" style="max-width: 300px">
|
|
@@ -2051,11 +2067,12 @@ __publicField(_LoginPrompt, "template", (options) => `
|
|
|
2051
2067
|
</form>
|
|
2052
2068
|
</div>
|
|
2053
2069
|
<div class="login-links" style="text-align: center">
|
|
2054
|
-
|
|
2070
|
+
${((_a = options == null ? void 0 : options.pwaSettings) == null ? void 0 : _a.loginLink) === true && !["ios", "mac"].includes(options.platform) ? `
|
|
2071
|
+
<a href="#" id="pwa-install-link" style="margin-right: 1rem;" title="Install App">
|
|
2055
2072
|
<svg xmlns="http://www.w3.org/2000/svg" height="40px" viewBox="0 0 24 24" width="40px" fill="${options.color || "#0B76FC"}">
|
|
2056
2073
|
<path d="M12 16l4-5h-3V4h-2v7H8z"/><path d="M20 18H4v-2h16v2z"/>
|
|
2057
2074
|
</svg> Download App
|
|
2058
|
-
</a
|
|
2075
|
+
</a>` : ""}
|
|
2059
2076
|
${options.hideApps ? "" : `
|
|
2060
2077
|
<a href="https://itunes.apple.com/ca/app/auxilium-mobile/id1166379280?mt=8" target="_blank">
|
|
2061
2078
|
<img alt="App Store" src="https://datalynk.auxiliumgroup.com/api/js/auxilium/dijits/templates/login/_common/mobile_apple_transparent.png">
|
|
@@ -2074,7 +2091,8 @@ __publicField(_LoginPrompt, "template", (options) => `
|
|
|
2074
2091
|
</div>
|
|
2075
2092
|
</div>
|
|
2076
2093
|
</div>
|
|
2077
|
-
|
|
2094
|
+
`;
|
|
2095
|
+
});
|
|
2078
2096
|
let LoginPrompt = _LoginPrompt;
|
|
2079
2097
|
class Auth {
|
|
2080
2098
|
constructor(api) {
|
|
@@ -2354,14 +2372,20 @@ class PWA {
|
|
|
2354
2372
|
meta("name", "apple-touch-startup-image", `https://datalynk-client.scarborough.auxilium.world/logo.png`);
|
|
2355
2373
|
if (!document.querySelector('link[rel="manifest"]')) {
|
|
2356
2374
|
const link = document.createElement("link");
|
|
2357
|
-
link.
|
|
2358
|
-
|
|
2375
|
+
link.rel = "manifest";
|
|
2376
|
+
const base = String(this.api.url).replace(/\/+$/, "");
|
|
2377
|
+
const startUrl = location.pathname;
|
|
2378
|
+
const scopePath = startUrl.endsWith("/") ? startUrl : startUrl.replace(/[^/]+$/, "");
|
|
2379
|
+
const manifestObj = {
|
|
2359
2380
|
name: this.api.options.name,
|
|
2360
2381
|
short_name: this.api.options.name,
|
|
2361
|
-
start_url:
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2382
|
+
start_url: startUrl,
|
|
2383
|
+
scope: scopePath || "/",
|
|
2384
|
+
display: "standalone",
|
|
2385
|
+
...this.api.options.manifest || {},
|
|
2386
|
+
...manifest || {}
|
|
2387
|
+
};
|
|
2388
|
+
link.href = `${base}/manifest?json=${encodeURIComponent(JSON.stringify(manifestObj))}`;
|
|
2365
2389
|
document.head.append(link);
|
|
2366
2390
|
}
|
|
2367
2391
|
if (!this.iframe && !this.pwa && this.platform != "mac") setTimeout(() => {
|
|
@@ -3426,7 +3450,7 @@ class Superuser {
|
|
|
3426
3450
|
} });
|
|
3427
3451
|
}
|
|
3428
3452
|
}
|
|
3429
|
-
const version = "1.3.
|
|
3453
|
+
const version = "1.3.1";
|
|
3430
3454
|
class WebRtc {
|
|
3431
3455
|
constructor(api) {
|
|
3432
3456
|
__publicField(this, "ice");
|
package/dist/login-prompt.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Api } from './api';
|
|
1
|
+
import { Api, ApiOptions } from './api';
|
|
2
2
|
/** Styling options for login prompt */
|
|
3
3
|
export type LoginPromptOptions = {
|
|
4
4
|
/** Add links to top of page */
|
|
@@ -18,6 +18,11 @@ export type LoginPromptOptions = {
|
|
|
18
18
|
hideApps?: boolean;
|
|
19
19
|
/** Logo URL */
|
|
20
20
|
logo?: string;
|
|
21
|
+
/** Logo Position */
|
|
22
|
+
/** 'left' | 'right' | 'aboveTitle' | 'belowTitle' | 'belowSubtitle' */
|
|
23
|
+
logoPosition?: 'left' | 'right' | 'aboveTitle' | 'belowTitle' | 'belowSubtitle';
|
|
24
|
+
/** Hide Logo regardless of existing Logo Url */
|
|
25
|
+
hideLogo?: boolean;
|
|
21
26
|
/** Allow users to stay logged in */
|
|
22
27
|
persist?: boolean;
|
|
23
28
|
/** Header string or HTML: <img alt="logo" src="...">*/
|
|
@@ -44,6 +49,8 @@ export type LoginPromptOptions = {
|
|
|
44
49
|
subtitleFontSize?: string;
|
|
45
50
|
/** Text shadow for subtitle */
|
|
46
51
|
subtitleTextShadow?: string;
|
|
52
|
+
platform?: 'android' | 'ios' | 'mac' | 'windows' | 'linux' | 'unknown';
|
|
53
|
+
pwaSettings?: ApiOptions["pwaSettings"];
|
|
47
54
|
};
|
|
48
55
|
/** Create a login prompt */
|
|
49
56
|
export declare class LoginPrompt {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"login-prompt.d.ts","sourceRoot":"","sources":["../src/login-prompt.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,GAAG,EAAC,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version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ings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,OAAO,CAAC;AAE1B,qBAAa,GAAG;IAqBH,OAAO,CAAC,QAAQ,CAAC,GAAG;
|
|
1
|
+
{"version":3,"file":"pwa.d.ts","sourceRoot":"","sources":["../src/pwa.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,OAAO,CAAC;AAE1B,qBAAa,GAAG;IAqBH,OAAO,CAAC,QAAQ,CAAC,GAAG;IApBzB,cAAc,EAAE,GAAG,CAAQ;IAElC,IAAI,MAAM,IAAI,OAAO,CAAyC;IAE9D,IAAI,MAAM,IAAI,OAAO,CAAuD;IAE5E,IAAI,QAAQ,IAAI,SAAS,GAAG,KAAK,GAAG,KAAK,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAQ1E;IAED,IAAI,GAAG,IAAI,OAAO,CAEjB;gBAE4B,GAAG,EAAE,GAAG;IAErC,OAAO,CAAC,iBAAiB;IAezB,oBAAoB;IACd,KAAK,CAAC,QAAQ,GAAE,GAAQ;IAmE9B,qCAAqC;IAC/B,MAAM,CAAC,QAAQ,CAAC,EAAE,SAAS,GAAG,KAAK;CAgJzC"}
|
package/dist/service.worker.js
CHANGED
|
@@ -5,22 +5,16 @@ self.addEventListener("fetch", (event) => {
|
|
|
5
5
|
if (navigator.onLine) {
|
|
6
6
|
event.respondWith(
|
|
7
7
|
fetch(request).then((response) => {
|
|
8
|
-
if (response
|
|
9
|
-
|
|
10
|
-
caches.open(cache).then((cache2) => cache2.put(request, responseClone));
|
|
11
|
-
}
|
|
8
|
+
if ((response == null ? void 0 : response.status) === 200 && (request == null ? void 0 : request.method) === "GET")
|
|
9
|
+
caches.open(cache).then((cache2) => cache2.put(request, response.clone()));
|
|
12
10
|
return response;
|
|
13
11
|
}).catch(() => {
|
|
14
|
-
return caches.match(request).then(
|
|
15
|
-
(cachedResponse) => cachedResponse || new Response("You are offline", { status: 503, statusText: "Service Unavailable" })
|
|
16
|
-
);
|
|
12
|
+
return caches.match(request).then((cachedResponse) => cachedResponse || new Response("You are offline", { status: 503, statusText: "Service Unavailable" }));
|
|
17
13
|
})
|
|
18
14
|
);
|
|
19
15
|
} else {
|
|
20
16
|
event.respondWith(
|
|
21
|
-
caches.match(request).then(
|
|
22
|
-
(cachedResponse) => cachedResponse || new Response("You are offline", { status: 503, statusText: "Service Unavailable" })
|
|
23
|
-
)
|
|
17
|
+
caches.match(request).then((cachedResponse) => cachedResponse || new Response("You are offline", { status: 503, statusText: "Service Unavailable" }))
|
|
24
18
|
);
|
|
25
19
|
}
|
|
26
20
|
});
|
package/dist/service.worker.mjs
CHANGED
|
@@ -4,22 +4,16 @@ self.addEventListener("fetch", (event) => {
|
|
|
4
4
|
if (navigator.onLine) {
|
|
5
5
|
event.respondWith(
|
|
6
6
|
fetch(request).then((response) => {
|
|
7
|
-
if (response
|
|
8
|
-
|
|
9
|
-
caches.open(cache).then((cache2) => cache2.put(request, responseClone));
|
|
10
|
-
}
|
|
7
|
+
if ((response == null ? void 0 : response.status) === 200 && (request == null ? void 0 : request.method) === "GET")
|
|
8
|
+
caches.open(cache).then((cache2) => cache2.put(request, response.clone()));
|
|
11
9
|
return response;
|
|
12
10
|
}).catch(() => {
|
|
13
|
-
return caches.match(request).then(
|
|
14
|
-
(cachedResponse) => cachedResponse || new Response("You are offline", { status: 503, statusText: "Service Unavailable" })
|
|
15
|
-
);
|
|
11
|
+
return caches.match(request).then((cachedResponse) => cachedResponse || new Response("You are offline", { status: 503, statusText: "Service Unavailable" }));
|
|
16
12
|
})
|
|
17
13
|
);
|
|
18
14
|
} else {
|
|
19
15
|
event.respondWith(
|
|
20
|
-
caches.match(request).then(
|
|
21
|
-
(cachedResponse) => cachedResponse || new Response("You are offline", { status: 503, statusText: "Service Unavailable" })
|
|
22
|
-
)
|
|
16
|
+
caches.match(request).then((cachedResponse) => cachedResponse || new Response("You are offline", { status: 503, statusText: "Service Unavailable" }))
|
|
23
17
|
);
|
|
24
18
|
}
|
|
25
19
|
});
|
package/dist/themes.d.ts
CHANGED
|
@@ -16,6 +16,10 @@ export interface Theme {
|
|
|
16
16
|
hideApps?: boolean;
|
|
17
17
|
/** Logo URL */
|
|
18
18
|
logo?: string;
|
|
19
|
+
/** Logo Position */
|
|
20
|
+
logoPosition?: 'left' | 'right' | 'aboveTitle' | 'belowTitle' | 'belowSubtitle';
|
|
21
|
+
/** Hide Logo regardless of existing Logo Url */
|
|
22
|
+
hideLogo?: boolean;
|
|
19
23
|
/** Allow users to stay logged in */
|
|
20
24
|
persist?: boolean;
|
|
21
25
|
/** Header string or HTML: <img alt="logo" src="...">*/
|
package/dist/themes.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"themes.d.ts","sourceRoot":"","sources":["../src/themes.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,KAAK;IACrB,+BAA+B;IAC/B,QAAQ,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAC3C,2BAA2B;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,2DAA2D;IAC3D,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,sCAAsC;IACtC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,sEAAsE;IACtE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,qBAAqB;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,eAAe;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,oCAAoC;IACpC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,uDAAuD;IACvD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,+BAA+B;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,4BAA4B;IAC5B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,iCAAiC;IACjC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,8BAA8B;IAC9B,aAAa,CA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;IACnB,oCAAoC;IACpC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,uDAAuD;IACvD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,+BAA+B;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,4BAA4B;IAC5B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,iCAAiC;IACjC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,8BAA8B;IAC9B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,gCAAgC;IAChC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,oBAAoB;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,+BAA+B;IAC/B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,mCAAmC;IACnC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,yBAAyB;IACzB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,6BAA6B;IAC7B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,+BAA+B;IAC/B,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED;;;;;GAKG;AACH,wBAAsB,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,GAAG;IAAC,KAAK,EAAE,OAAO,CAAA;CAAC,CAAC,CA6B/F"}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@auxilium/datalynk-client",
|
|
3
3
|
"description": "Datalynk client library",
|
|
4
4
|
"repository": "https://gitlab.auxiliumgroup.com/auxilium/datalynk/datalynk-client",
|
|
5
|
-
"version": "1.3.
|
|
5
|
+
"version": "1.3.1",
|
|
6
6
|
"author": "Zak Timson <zaktimson@gmail.com>",
|
|
7
7
|
"private": false,
|
|
8
8
|
"main": "./dist/index.cjs",
|