@saasquatch/squatch-js 2.8.2-21 → 2.8.2-23
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/squatch.cjs.js +15 -357
- package/dist/squatch.cjs.js.map +1 -1
- package/dist/squatch.esm.js +15 -357
- package/dist/squatch.esm.js.map +1 -1
- package/dist/squatch.js +15 -357
- package/dist/squatch.js.map +1 -1
- package/dist/squatch.min.js +1 -1
- package/package.json +1 -1
package/dist/squatch.esm.js
CHANGED
|
@@ -1118,12 +1118,12 @@ class EmbedWidget extends Widget {
|
|
|
1118
1118
|
}
|
|
1119
1119
|
async load() {
|
|
1120
1120
|
var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
|
|
1121
|
-
const
|
|
1122
|
-
const initialHeight =
|
|
1123
|
-
(_d = (_c =
|
|
1124
|
-
(_f = (_e =
|
|
1125
|
-
(_g =
|
|
1126
|
-
const sizes = (_h =
|
|
1121
|
+
const brandingConfig = (_b = (_a2 = this.context.widgetConfig) == null ? void 0 : _a2.values) == null ? void 0 : _b.brandingConfig;
|
|
1122
|
+
const initialHeight = brandingConfig == null ? void 0 : brandingConfig.loadingHeight;
|
|
1123
|
+
(_d = (_c = brandingConfig == null ? void 0 : brandingConfig.color) == null ? void 0 : _c.loadingSkeleton) == null ? void 0 : _d.background;
|
|
1124
|
+
(_f = (_e = brandingConfig == null ? void 0 : brandingConfig.color) == null ? void 0 : _e.loadingSkeleton) == null ? void 0 : _f.animationBackground;
|
|
1125
|
+
(_g = brandingConfig == null ? void 0 : brandingConfig.border) == null ? void 0 : _g.borderColor;
|
|
1126
|
+
const sizes = (_h = brandingConfig == null ? void 0 : brandingConfig.widgetSize) == null ? void 0 : _h.embeddedWidgets;
|
|
1127
1127
|
const maxWidth = (sizes == null ? void 0 : sizes.maxWidth) ? formatWidth(sizes.maxWidth) : "";
|
|
1128
1128
|
const minWidth = (sizes == null ? void 0 : sizes.minWidth) ? formatWidth(sizes.minWidth) : "";
|
|
1129
1129
|
const frame = this._createFrame({
|
|
@@ -1160,12 +1160,12 @@ class EmbedWidget extends Widget {
|
|
|
1160
1160
|
frameDoc.open();
|
|
1161
1161
|
const domain = this.widgetApi.domain;
|
|
1162
1162
|
frameDoc.write(`
|
|
1163
|
-
${((_k =
|
|
1163
|
+
${((_k = brandingConfig == null ? void 0 : brandingConfig.main) == null ? void 0 : _k.brandFont) ? `
|
|
1164
1164
|
<link rel="preconnect" href="https://fast${domain === "https://staging.referralsaasquatch.com" && "-staging"}.ssqt.io">
|
|
1165
1165
|
<link rel="preconnect" href="https://fonts.gstatic.com">
|
|
1166
1166
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
1167
1167
|
<link rel="preload" href="https://fonts.googleapis.com/css2?family=${encodeURIComponent(
|
|
1168
|
-
(_l =
|
|
1168
|
+
(_l = brandingConfig == null ? void 0 : brandingConfig.main) == null ? void 0 : _l.brandFont
|
|
1169
1169
|
)}" as="style">` : ""}
|
|
1170
1170
|
<script src="${this.npmCdn}/resize-observer-polyfill@1.5.x"><\/script>
|
|
1171
1171
|
<style data-styles>
|
|
@@ -1277,8 +1277,8 @@ class PopupWidget extends Widget {
|
|
|
1277
1277
|
_createPopupDialog() {
|
|
1278
1278
|
var _a2, _b, _c;
|
|
1279
1279
|
const dialog = document.createElement("dialog");
|
|
1280
|
-
const
|
|
1281
|
-
const sizes = (_c =
|
|
1280
|
+
const brandingConfig = (_b = (_a2 = this.context.widgetConfig) == null ? void 0 : _a2.values) == null ? void 0 : _b.brandingConfig;
|
|
1281
|
+
const sizes = (_c = brandingConfig == null ? void 0 : brandingConfig.widgetSize) == null ? void 0 : _c.popupWidgets;
|
|
1282
1282
|
const minWidth = (sizes == null ? void 0 : sizes.minWidth) ? formatWidth(sizes.minWidth) : "auto";
|
|
1283
1283
|
const maxWidth = (sizes == null ? void 0 : sizes.maxWidth) ? formatWidth(sizes.maxWidth) : "500px";
|
|
1284
1284
|
dialog.id = this.id;
|
|
@@ -1860,351 +1860,6 @@ function _getAutoConfig() {
|
|
|
1860
1860
|
}
|
|
1861
1861
|
};
|
|
1862
1862
|
}
|
|
1863
|
-
const getSkeleton = ({
|
|
1864
|
-
height = "500px",
|
|
1865
|
-
skeletonBackgroundColor = "#e0e0e0",
|
|
1866
|
-
skeletonShimmerColor = "#f5f5f5",
|
|
1867
|
-
borderColor = "#ccc"
|
|
1868
|
-
}) => {
|
|
1869
|
-
return `
|
|
1870
|
-
<style>
|
|
1871
|
-
* {
|
|
1872
|
-
box-sizing: border-box;
|
|
1873
|
-
padding: 0;
|
|
1874
|
-
margin: 0;
|
|
1875
|
-
}
|
|
1876
|
-
|
|
1877
|
-
.widget-container {
|
|
1878
|
-
background: white;
|
|
1879
|
-
width: 100%;
|
|
1880
|
-
max-width: 900px;
|
|
1881
|
-
padding: 40px;
|
|
1882
|
-
border-radius: 12px;
|
|
1883
|
-
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
|
|
1884
|
-
box-sizing: border-box;
|
|
1885
|
-
}
|
|
1886
|
-
|
|
1887
|
-
@keyframes shimmer {
|
|
1888
|
-
0% {
|
|
1889
|
-
background-position: -100% 0;
|
|
1890
|
-
}
|
|
1891
|
-
100% {
|
|
1892
|
-
background-position: 100% 0;
|
|
1893
|
-
}
|
|
1894
|
-
}
|
|
1895
|
-
|
|
1896
|
-
.skeleton {
|
|
1897
|
-
background: ${skeletonBackgroundColor};
|
|
1898
|
-
background: linear-gradient(
|
|
1899
|
-
90deg,
|
|
1900
|
-
${skeletonBackgroundColor} 25%,
|
|
1901
|
-
${skeletonShimmerColor} 50%,
|
|
1902
|
-
${skeletonBackgroundColor} 75%
|
|
1903
|
-
);
|
|
1904
|
-
background-size: 200% 100%;
|
|
1905
|
-
animation: shimmer 1.5s infinite linear;
|
|
1906
|
-
border-radius: 6px;
|
|
1907
|
-
margin-bottom: 12px;
|
|
1908
|
-
}
|
|
1909
|
-
|
|
1910
|
-
.sk-title-lg {
|
|
1911
|
-
height: 36px;
|
|
1912
|
-
width: 50%;
|
|
1913
|
-
margin-bottom: 16px;
|
|
1914
|
-
}
|
|
1915
|
-
.sk-title-md {
|
|
1916
|
-
height: 28px;
|
|
1917
|
-
width: 30%;
|
|
1918
|
-
margin-bottom: 20px;
|
|
1919
|
-
margin-top: 40px;
|
|
1920
|
-
}
|
|
1921
|
-
.sk-text {
|
|
1922
|
-
height: 16px;
|
|
1923
|
-
width: 80%;
|
|
1924
|
-
margin-bottom: 8px;
|
|
1925
|
-
}
|
|
1926
|
-
.sk-text-short {
|
|
1927
|
-
width: 40%;
|
|
1928
|
-
}
|
|
1929
|
-
.sk-label {
|
|
1930
|
-
height: 14px;
|
|
1931
|
-
width: 25%;
|
|
1932
|
-
margin-bottom: 10px;
|
|
1933
|
-
}
|
|
1934
|
-
|
|
1935
|
-
.hero-section {
|
|
1936
|
-
display: flex;
|
|
1937
|
-
gap: 40px;
|
|
1938
|
-
margin-bottom: 40px;
|
|
1939
|
-
border-bottom: 1px solid ${borderColor};
|
|
1940
|
-
padding-bottom: 40px;
|
|
1941
|
-
flex-direction: row;
|
|
1942
|
-
}
|
|
1943
|
-
.hero-content {
|
|
1944
|
-
flex: 1;
|
|
1945
|
-
display: flex;
|
|
1946
|
-
flex-direction: column;
|
|
1947
|
-
justify-content: center;
|
|
1948
|
-
}
|
|
1949
|
-
.hero-image {
|
|
1950
|
-
flex: 1;
|
|
1951
|
-
height: 300px;
|
|
1952
|
-
border-radius: 12px;
|
|
1953
|
-
}
|
|
1954
|
-
|
|
1955
|
-
.share-section {
|
|
1956
|
-
margin-bottom: 40px;
|
|
1957
|
-
}
|
|
1958
|
-
.sk-input {
|
|
1959
|
-
height: 50px;
|
|
1960
|
-
width: 100%;
|
|
1961
|
-
border-radius: 8px;
|
|
1962
|
-
margin-bottom: 16px;
|
|
1963
|
-
}
|
|
1964
|
-
.social-buttons {
|
|
1965
|
-
display: flex;
|
|
1966
|
-
gap: 12px;
|
|
1967
|
-
}
|
|
1968
|
-
.sk-btn-social {
|
|
1969
|
-
flex: 1;
|
|
1970
|
-
height: 50px;
|
|
1971
|
-
border-radius: 8px;
|
|
1972
|
-
}
|
|
1973
|
-
|
|
1974
|
-
.stats-section {
|
|
1975
|
-
display: flex;
|
|
1976
|
-
gap: 24px;
|
|
1977
|
-
margin-bottom: 40px;
|
|
1978
|
-
padding: 30px 0;
|
|
1979
|
-
border-top: 1px solid ${borderColor};
|
|
1980
|
-
border-bottom: 1px solid ${borderColor};
|
|
1981
|
-
}
|
|
1982
|
-
.stat-card {
|
|
1983
|
-
flex: 1;
|
|
1984
|
-
display: flex;
|
|
1985
|
-
flex-direction: column;
|
|
1986
|
-
align-items: center;
|
|
1987
|
-
}
|
|
1988
|
-
.stat-divider {
|
|
1989
|
-
padding-left: 24px;
|
|
1990
|
-
}
|
|
1991
|
-
|
|
1992
|
-
.sk-stat-num {
|
|
1993
|
-
height: 48px;
|
|
1994
|
-
width: 120px;
|
|
1995
|
-
margin-bottom: 8px;
|
|
1996
|
-
}
|
|
1997
|
-
.sk-stat-label {
|
|
1998
|
-
height: 18px;
|
|
1999
|
-
width: 80px;
|
|
2000
|
-
}
|
|
2001
|
-
|
|
2002
|
-
.table-header {
|
|
2003
|
-
display: flex;
|
|
2004
|
-
gap: 16px;
|
|
2005
|
-
margin-bottom: 16px;
|
|
2006
|
-
}
|
|
2007
|
-
.sk-th {
|
|
2008
|
-
height: 16px;
|
|
2009
|
-
}
|
|
2010
|
-
.table-row {
|
|
2011
|
-
display: flex;
|
|
2012
|
-
align-items: center;
|
|
2013
|
-
gap: 16px;
|
|
2014
|
-
padding: 16px 0;
|
|
2015
|
-
border-bottom: 1px solid ${borderColor};
|
|
2016
|
-
}
|
|
2017
|
-
|
|
2018
|
-
.col-user {
|
|
2019
|
-
flex: 2;
|
|
2020
|
-
}
|
|
2021
|
-
.col-status {
|
|
2022
|
-
flex: 1;
|
|
2023
|
-
}
|
|
2024
|
-
.col-reward {
|
|
2025
|
-
flex: 2;
|
|
2026
|
-
}
|
|
2027
|
-
.col-date {
|
|
2028
|
-
flex: 1;
|
|
2029
|
-
}
|
|
2030
|
-
|
|
2031
|
-
.sk-badge {
|
|
2032
|
-
height: 28px;
|
|
2033
|
-
width: 90px;
|
|
2034
|
-
border-radius: 14px;
|
|
2035
|
-
}
|
|
2036
|
-
.sk-reward-block {
|
|
2037
|
-
height: 36px;
|
|
2038
|
-
width: 100%;
|
|
2039
|
-
border-radius: 6px;
|
|
2040
|
-
}
|
|
2041
|
-
|
|
2042
|
-
.pagination {
|
|
2043
|
-
display: flex;
|
|
2044
|
-
justify-content: flex-end;
|
|
2045
|
-
gap: 8px;
|
|
2046
|
-
margin-top: 24px;
|
|
2047
|
-
}
|
|
2048
|
-
.sk-btn-page {
|
|
2049
|
-
height: 36px;
|
|
2050
|
-
width: 64px;
|
|
2051
|
-
border-radius: 6px;
|
|
2052
|
-
margin-bottom: 0;
|
|
2053
|
-
}
|
|
2054
|
-
|
|
2055
|
-
@media (max-width: 768px) {
|
|
2056
|
-
body {
|
|
2057
|
-
padding: 20px;
|
|
2058
|
-
}
|
|
2059
|
-
.widget-container {
|
|
2060
|
-
padding: 24px;
|
|
2061
|
-
}
|
|
2062
|
-
|
|
2063
|
-
.hero-section {
|
|
2064
|
-
flex-direction: column-reverse;
|
|
2065
|
-
gap: 24px;
|
|
2066
|
-
}
|
|
2067
|
-
.hero-image {
|
|
2068
|
-
height: 220px;
|
|
2069
|
-
width: 100%;
|
|
2070
|
-
}
|
|
2071
|
-
.sk-title-lg {
|
|
2072
|
-
width: 80%;
|
|
2073
|
-
}
|
|
2074
|
-
|
|
2075
|
-
.col-date {
|
|
2076
|
-
display: none;
|
|
2077
|
-
}
|
|
2078
|
-
}
|
|
2079
|
-
|
|
2080
|
-
@media (max-width: 480px) {
|
|
2081
|
-
body {
|
|
2082
|
-
padding: 10px;
|
|
2083
|
-
}
|
|
2084
|
-
.widget-container {
|
|
2085
|
-
padding: 16px;
|
|
2086
|
-
}
|
|
2087
|
-
|
|
2088
|
-
.sk-stat-num {
|
|
2089
|
-
width: 80px;
|
|
2090
|
-
height: 40px;
|
|
2091
|
-
}
|
|
2092
|
-
|
|
2093
|
-
.col-reward {
|
|
2094
|
-
display: none;
|
|
2095
|
-
}
|
|
2096
|
-
|
|
2097
|
-
.col-user {
|
|
2098
|
-
flex: 3;
|
|
2099
|
-
}
|
|
2100
|
-
.col-status {
|
|
2101
|
-
flex: 2;
|
|
2102
|
-
display: flex;
|
|
2103
|
-
justify-content: flex-end;
|
|
2104
|
-
}
|
|
2105
|
-
}
|
|
2106
|
-
</style>
|
|
2107
|
-
|
|
2108
|
-
<div class="widget-container">
|
|
2109
|
-
<div class="hero-section">
|
|
2110
|
-
<div class="hero-content">
|
|
2111
|
-
<div class="skeleton sk-title-lg"></div>
|
|
2112
|
-
<div class="skeleton sk-text"></div>
|
|
2113
|
-
<div class="skeleton sk-text sk-text-short"></div>
|
|
2114
|
-
</div>
|
|
2115
|
-
<div class="skeleton hero-image"></div>
|
|
2116
|
-
</div>
|
|
2117
|
-
|
|
2118
|
-
<div class="share-section">
|
|
2119
|
-
<div class="skeleton sk-label"></div>
|
|
2120
|
-
<div class="skeleton sk-input"></div>
|
|
2121
|
-
<div class="social-buttons">
|
|
2122
|
-
<div class="skeleton sk-btn-social"></div>
|
|
2123
|
-
<div class="skeleton sk-btn-social"></div>
|
|
2124
|
-
<div class="skeleton sk-btn-social"></div>
|
|
2125
|
-
<div class="skeleton sk-btn-social"></div>
|
|
2126
|
-
</div>
|
|
2127
|
-
</div>
|
|
2128
|
-
|
|
2129
|
-
<div
|
|
2130
|
-
class="skeleton sk-title-md"
|
|
2131
|
-
style="margin-top: 0; width: 30%; margin-left: auto; margin-right: auto"
|
|
2132
|
-
></div>
|
|
2133
|
-
<div
|
|
2134
|
-
class="skeleton sk-text"
|
|
2135
|
-
style="width: 60%; margin-left: auto; margin-right: auto"
|
|
2136
|
-
></div>
|
|
2137
|
-
|
|
2138
|
-
<div class="stats-section">
|
|
2139
|
-
<div class="stat-card">
|
|
2140
|
-
<div class="skeleton sk-stat-num"></div>
|
|
2141
|
-
<div class="skeleton sk-stat-label"></div>
|
|
2142
|
-
</div>
|
|
2143
|
-
<div class="stat-card stat-divider">
|
|
2144
|
-
<div class="skeleton sk-stat-num"></div>
|
|
2145
|
-
<div class="skeleton sk-stat-label"></div>
|
|
2146
|
-
</div>
|
|
2147
|
-
</div>
|
|
2148
|
-
|
|
2149
|
-
<div class="skeleton sk-title-md"></div>
|
|
2150
|
-
|
|
2151
|
-
<div class="table-header">
|
|
2152
|
-
<div class="skeleton sk-th col-user"></div>
|
|
2153
|
-
<div class="skeleton sk-th col-status"></div>
|
|
2154
|
-
<div class="skeleton sk-th col-reward"></div>
|
|
2155
|
-
<div class="skeleton sk-th col-date"></div>
|
|
2156
|
-
</div>
|
|
2157
|
-
|
|
2158
|
-
<div class="table-row">
|
|
2159
|
-
<div class="col-user">
|
|
2160
|
-
<div class="skeleton sk-text" style="width: 70%; margin: 0"></div>
|
|
2161
|
-
</div>
|
|
2162
|
-
<div class="col-status">
|
|
2163
|
-
<div class="skeleton sk-badge" style="margin: 0"></div>
|
|
2164
|
-
</div>
|
|
2165
|
-
<div class="col-reward">
|
|
2166
|
-
<div class="skeleton sk-reward-block" style="margin: 0"></div>
|
|
2167
|
-
</div>
|
|
2168
|
-
<div class="col-date">
|
|
2169
|
-
<div class="skeleton sk-text" style="width: 80%; margin: 0"></div>
|
|
2170
|
-
</div>
|
|
2171
|
-
</div>
|
|
2172
|
-
<div class="table-row">
|
|
2173
|
-
<div class="col-user">
|
|
2174
|
-
<div class="skeleton sk-text" style="width: 60%; margin: 0"></div>
|
|
2175
|
-
</div>
|
|
2176
|
-
<div class="col-status">
|
|
2177
|
-
<div class="skeleton sk-badge" style="margin: 0"></div>
|
|
2178
|
-
</div>
|
|
2179
|
-
<div class="col-reward">
|
|
2180
|
-
<div class="skeleton sk-reward-block" style="margin: 0"></div>
|
|
2181
|
-
</div>
|
|
2182
|
-
<div class="col-date">
|
|
2183
|
-
<div class="skeleton sk-text" style="width: 80%; margin: 0"></div>
|
|
2184
|
-
</div>
|
|
2185
|
-
</div>
|
|
2186
|
-
<div class="table-row">
|
|
2187
|
-
<div class="col-user">
|
|
2188
|
-
<div class="skeleton sk-text" style="width: 75%; margin: 0"></div>
|
|
2189
|
-
</div>
|
|
2190
|
-
<div class="col-status">
|
|
2191
|
-
<div class="skeleton sk-badge" style="margin: 0"></div>
|
|
2192
|
-
</div>
|
|
2193
|
-
<div class="col-reward">
|
|
2194
|
-
<div class="skeleton sk-reward-block" style="margin: 0"></div>
|
|
2195
|
-
</div>
|
|
2196
|
-
<div class="col-date">
|
|
2197
|
-
<div class="skeleton sk-text" style="width: 80%; margin: 0"></div>
|
|
2198
|
-
</div>
|
|
2199
|
-
</div>
|
|
2200
|
-
|
|
2201
|
-
<div class="pagination">
|
|
2202
|
-
<div class="skeleton sk-btn-page"></div>
|
|
2203
|
-
<div class="skeleton sk-btn-page"></div>
|
|
2204
|
-
</div>
|
|
2205
|
-
</div>
|
|
2206
|
-
`;
|
|
2207
|
-
};
|
|
2208
1863
|
const _log$2 = browserExports.debug("squatch-js:decodeUserJwt");
|
|
2209
1864
|
function decodeUserJwt(tokenStr) {
|
|
2210
1865
|
var _a2;
|
|
@@ -2440,8 +2095,11 @@ class DeclarativeEmbedWidget extends DeclarativeWidget {
|
|
|
2440
2095
|
async connectedCallback() {
|
|
2441
2096
|
this.loaded = true;
|
|
2442
2097
|
this.container = this.getAttribute("container");
|
|
2443
|
-
|
|
2444
|
-
|
|
2098
|
+
const skeletonHTML = `
|
|
2099
|
+
<div>
|
|
2100
|
+
<h1>Do I see this text ????</h1>
|
|
2101
|
+
</div>
|
|
2102
|
+
`;
|
|
2445
2103
|
const skeletonContainer = document.createElement("div");
|
|
2446
2104
|
skeletonContainer.id = "loading-skeleton";
|
|
2447
2105
|
skeletonContainer.innerHTML = skeletonHTML;
|