@saasquatch/squatch-js 2.4.0 → 2.4.1-0
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/CHANGELOG.md +260 -260
- package/LICENSE +20 -20
- package/README.md +144 -144
- package/SECURITY.md +10 -10
- package/babelregister.js +16 -16
- package/cucumber.js +45 -45
- package/demo/generate.tsx +39 -39
- package/demo/index.d.ts +15 -15
- package/demo/sandbox.ts +122 -122
- package/demo/styles.css +24 -24
- package/demo/templates/MintGA.ts +106 -106
- package/demo/templates/MintGAContainer.ts +105 -105
- package/demo/templates/MintGAContainerDisplayBlock.ts +104 -104
- package/demo/templates/QuirksMintGA.ts +104 -104
- package/demo/templates/QuirksMintGAContainer.ts +104 -104
- package/demo/templates/QuirksMintGAContainerDisplayBlock.ts +104 -104
- package/demo/templates/QuirksVanillaGA.ts +308 -308
- package/demo/templates/VanillaGA.ts +308 -308
- package/demo/templates/VanillaGANoContainer.ts +308 -308
- package/demo/templates/classic.ts +1234 -1234
- package/demo/toolbar.tsx +526 -526
- package/demo/tsconfig.json +14 -14
- package/demo/util.ts +21 -21
- package/demo/versions.ts +14 -14
- package/dist/api/EventsApi.d.ts +1 -0
- package/dist/squatch.d.ts +2 -2
- package/dist/squatch.esm.js +2 -2
- package/dist/squatch.js +2 -2
- package/dist/stats.html +1 -1
- package/package.json +104 -103
- package/tsconfig.json +22 -22
- package/dist/squatchjs.min.js +0 -13
package/demo/tsconfig.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"outDir": "demo/dist",
|
|
4
|
-
"sourceMap": true,
|
|
5
|
-
"noImplicitAny": false,
|
|
6
|
-
"allowSyntheticDefaultImports": true,
|
|
7
|
-
"strictNullChecks": true,
|
|
8
|
-
"module": "commonjs",
|
|
9
|
-
"target": "es5",
|
|
10
|
-
"allowJs": true,
|
|
11
|
-
"jsx": "react",
|
|
12
|
-
"lib": ["es2015", "dom", "es5", "scripthost"]
|
|
13
|
-
}
|
|
14
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"outDir": "demo/dist",
|
|
4
|
+
"sourceMap": true,
|
|
5
|
+
"noImplicitAny": false,
|
|
6
|
+
"allowSyntheticDefaultImports": true,
|
|
7
|
+
"strictNullChecks": true,
|
|
8
|
+
"module": "commonjs",
|
|
9
|
+
"target": "es5",
|
|
10
|
+
"allowJs": true,
|
|
11
|
+
"jsx": "react",
|
|
12
|
+
"lib": ["es2015", "dom", "es5", "scripthost"]
|
|
13
|
+
}
|
|
14
|
+
}
|
package/demo/util.ts
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
export function getQueryStringParams(query) {
|
|
2
|
-
return query
|
|
3
|
-
? (/^[?#]/.test(query) ? query.slice(1) : query)
|
|
4
|
-
.split("&")
|
|
5
|
-
.reduce((params, param) => {
|
|
6
|
-
let [key, value] = param.split("=");
|
|
7
|
-
params[key] = value
|
|
8
|
-
? decodeURIComponent(value.replace(/\+/g, " "))
|
|
9
|
-
: "";
|
|
10
|
-
return params;
|
|
11
|
-
}, {})
|
|
12
|
-
: {};
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
export function delay (duration) {
|
|
17
|
-
return new Promise(function(resolve, reject){
|
|
18
|
-
setTimeout(function(){
|
|
19
|
-
resolve();
|
|
20
|
-
}, duration)
|
|
21
|
-
})
|
|
1
|
+
export function getQueryStringParams(query) {
|
|
2
|
+
return query
|
|
3
|
+
? (/^[?#]/.test(query) ? query.slice(1) : query)
|
|
4
|
+
.split("&")
|
|
5
|
+
.reduce((params, param) => {
|
|
6
|
+
let [key, value] = param.split("=");
|
|
7
|
+
params[key] = value
|
|
8
|
+
? decodeURIComponent(value.replace(/\+/g, " "))
|
|
9
|
+
: "";
|
|
10
|
+
return params;
|
|
11
|
+
}, {})
|
|
12
|
+
: {};
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
export function delay (duration) {
|
|
17
|
+
return new Promise(function(resolve, reject){
|
|
18
|
+
setTimeout(function(){
|
|
19
|
+
resolve();
|
|
20
|
+
}, duration)
|
|
21
|
+
})
|
|
22
22
|
}
|
package/demo/versions.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
export async function getVersions(): Promise<string[]> {
|
|
2
|
-
const headers = {
|
|
3
|
-
Origin: "google.com",
|
|
4
|
-
"X-Requested-With":
|
|
5
|
-
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36"
|
|
6
|
-
};
|
|
7
|
-
|
|
8
|
-
const response = await fetch(
|
|
9
|
-
"https://cors-anywhere.herokuapp.com/https://registry.npmjs.org/@saasquatch/squatch-js",
|
|
10
|
-
{}
|
|
11
|
-
);
|
|
12
|
-
const body = await response.json();
|
|
13
|
-
return Object.keys(body.versions).reverse();
|
|
14
|
-
}
|
|
1
|
+
export async function getVersions(): Promise<string[]> {
|
|
2
|
+
const headers = {
|
|
3
|
+
Origin: "google.com",
|
|
4
|
+
"X-Requested-With":
|
|
5
|
+
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36"
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
const response = await fetch(
|
|
9
|
+
"https://cors-anywhere.herokuapp.com/https://registry.npmjs.org/@saasquatch/squatch-js",
|
|
10
|
+
{}
|
|
11
|
+
);
|
|
12
|
+
const body = await response.json();
|
|
13
|
+
return Object.keys(body.versions).reverse();
|
|
14
|
+
}
|
package/dist/api/EventsApi.d.ts
CHANGED
package/dist/squatch.d.ts
CHANGED
|
@@ -85,9 +85,9 @@ export declare function submitEmail(fn: (target: any, widget: any, email: any) =
|
|
|
85
85
|
* Manually set the _saasquatch cookie as a 1st party cookie if available as a URL parameter on the current page.
|
|
86
86
|
* This runs automatically immediately when squatch-js is loaded, except when window.SaaSquatchDoNotAutoDrop is true.
|
|
87
87
|
* Use this function manually if you have a single page application or custom routing that causes the `_saasquatch` URL parameter to not be set when Squatch.js loads.
|
|
88
|
-
|
|
88
|
+
|
|
89
89
|
* It is safe to run this function multiple times. If the `_saasquatch` URL parameter is invalid or missing it will not clear the 1st party cookie.
|
|
90
|
-
|
|
90
|
+
|
|
91
91
|
*
|
|
92
92
|
* @returns {void}
|
|
93
93
|
*
|
package/dist/squatch.esm.js
CHANGED
|
@@ -2217,9 +2217,9 @@ function submitEmail(fn) {
|
|
|
2217
2217
|
* Manually set the _saasquatch cookie as a 1st party cookie if available as a URL parameter on the current page.
|
|
2218
2218
|
* This runs automatically immediately when squatch-js is loaded, except when window.SaaSquatchDoNotAutoDrop is true.
|
|
2219
2219
|
* Use this function manually if you have a single page application or custom routing that causes the `_saasquatch` URL parameter to not be set when Squatch.js loads.
|
|
2220
|
-
|
|
2220
|
+
|
|
2221
2221
|
* It is safe to run this function multiple times. If the `_saasquatch` URL parameter is invalid or missing it will not clear the 1st party cookie.
|
|
2222
|
-
|
|
2222
|
+
|
|
2223
2223
|
*
|
|
2224
2224
|
* @returns {void}
|
|
2225
2225
|
*
|
package/dist/squatch.js
CHANGED
|
@@ -2244,9 +2244,9 @@ function submitEmail(fn) {
|
|
|
2244
2244
|
* Manually set the _saasquatch cookie as a 1st party cookie if available as a URL parameter on the current page.
|
|
2245
2245
|
* This runs automatically immediately when squatch-js is loaded, except when window.SaaSquatchDoNotAutoDrop is true.
|
|
2246
2246
|
* Use this function manually if you have a single page application or custom routing that causes the `_saasquatch` URL parameter to not be set when Squatch.js loads.
|
|
2247
|
-
|
|
2247
|
+
|
|
2248
2248
|
* It is safe to run this function multiple times. If the `_saasquatch` URL parameter is invalid or missing it will not clear the 1st party cookie.
|
|
2249
|
-
|
|
2249
|
+
|
|
2250
2250
|
*
|
|
2251
2251
|
* @returns {void}
|
|
2252
2252
|
*
|