@saasquatch/squatch-js 2.3.1-1 → 2.3.1-5
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 +162 -162
- 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 +43 -3
- package/demo/index.d.ts +15 -15
- package/demo/sandbox.ts +122 -122
- package/demo/styles.css +24 -24
- package/demo/templates/MintGA.ts +45 -0
- package/demo/templates/MintGAContainer.ts +45 -0
- package/demo/templates/MintGAContainerDisplayBlock.ts +45 -0
- package/demo/templates/QuirksMintGA.ts +45 -0
- package/demo/templates/QuirksMintGAContainer.ts +45 -0
- package/demo/templates/QuirksMintGAContainerDisplayBlock.ts +45 -0
- package/demo/templates/QuirksVanillaGA.ts +308 -0
- package/demo/templates/VanillaGA.ts +308 -0
- package/demo/templates/VanillaGANoContainer.ts +308 -0
- package/demo/templates/classic.ts +134 -0
- package/demo/toolbar.tsx +411 -249
- 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 -1
- package/dist/squatch.WidgetApi.js +1395 -0
- package/dist/squatch.WidgetApi.min.js +8 -0
- package/dist/squatch.d.ts +2 -2
- package/dist/squatch.esm.js +12 -26
- package/dist/squatch.esm.js.map +1 -1
- package/dist/squatch.js +12 -26
- package/dist/squatch.js.map +1 -1
- package/dist/squatch.min.js +2 -2
- package/dist/stats.html +1 -1
- package/package.json +103 -98
- package/tsconfig.json +22 -22
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
|
@@ -42,7 +42,7 @@ export default class EventsApi {
|
|
|
42
42
|
* Track an event for a user
|
|
43
43
|
*
|
|
44
44
|
* @param params Parameters for request
|
|
45
|
-
* @param
|
|
45
|
+
* @param options.jwt the JSON Web Token (JWT) that is used to authenticate the user
|
|
46
46
|
*
|
|
47
47
|
* @return An ID to confirm the event has been accepted for asynchronous processing
|
|
48
48
|
*/
|