@saasquatch/component-boilerplate 1.3.0 → 1.3.1-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/CHANGELOG.md +112 -112
- package/README.md +7 -7
- package/dist/hooks/graphql/Refresh.d.ts +11 -0
- package/dist/hooks/graphql/useBaseQuery.d.ts +1 -1
- package/dist/hooks/useDebounce.d.ts +1 -1
- package/dist/hooks/useDeepEffect.d.ts +12 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +14 -14
- package/dist/index.modern.js.map +1 -1
- package/dist/index.module.js +1 -1
- package/dist/index.module.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/package.json +59 -59
- package/dist/hooks/graphql/useCustomQuery.d.ts +0 -30
package/package.json
CHANGED
|
@@ -1,59 +1,59 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@saasquatch/component-boilerplate",
|
|
3
|
-
"version": "1.3.
|
|
4
|
-
"private": false,
|
|
5
|
-
"description": "Boilerplate for writing web components for the SaaSquatch widget environments",
|
|
6
|
-
"source": "src/index.ts",
|
|
7
|
-
"main": "dist/index.js",
|
|
8
|
-
"exports": "./dist/index.modern.js",
|
|
9
|
-
"module": "dist/index.module.js",
|
|
10
|
-
"types": "dist/index.d.ts",
|
|
11
|
-
"files": [
|
|
12
|
-
"dist"
|
|
13
|
-
],
|
|
14
|
-
"scripts": {
|
|
15
|
-
"build": "microbundle",
|
|
16
|
-
"test": "jest --forceExit",
|
|
17
|
-
"test-watch": "jest --watch"
|
|
18
|
-
},
|
|
19
|
-
"author": "SaaSquatch",
|
|
20
|
-
"license": "ISC",
|
|
21
|
-
"devDependencies": {
|
|
22
|
-
"@graphql-tools/mock": "^7.0.0",
|
|
23
|
-
"@saasquatch/stencil-hooks": "^2.0.0",
|
|
24
|
-
"@saasquatch/universal-hooks-testing-library": "^0.1.0",
|
|
25
|
-
"@testing-library/react-hooks": "^5.1.0",
|
|
26
|
-
"@types/debounce": "^1.2.0",
|
|
27
|
-
"@types/debug": "^4.1.5",
|
|
28
|
-
"@types/jest": "^26.0.20",
|
|
29
|
-
"axios": "^0.21.1",
|
|
30
|
-
"esbuild-jest": "^0.5.0",
|
|
31
|
-
"graphql-tools": "^7.0.5",
|
|
32
|
-
"jest": "^26.6.3",
|
|
33
|
-
"jest-cucumber": "^3.0.1",
|
|
34
|
-
"microbundle": "^0.13.0",
|
|
35
|
-
"msw": "^0.28.1",
|
|
36
|
-
"react": "^17.0.1",
|
|
37
|
-
"react-test-renderer": "^17.0.1",
|
|
38
|
-
"ts-jest": "^26.5.4",
|
|
39
|
-
"ts-node": "^9.1.1",
|
|
40
|
-
"typescript": "^4.1.5"
|
|
41
|
-
},
|
|
42
|
-
"dependencies": {
|
|
43
|
-
"@formatjs/intl": "^1.8.2",
|
|
44
|
-
"@saasquatch/dom-context-hooks": "^1.0.0",
|
|
45
|
-
"@saasquatch/universal-hooks": "^1.0.0",
|
|
46
|
-
"@wry/equality": "^0.3.3",
|
|
47
|
-
"debounce": "^1.2.0",
|
|
48
|
-
"dom-context": "^1.2.0",
|
|
49
|
-
"fast-memoize": "^2.5.2",
|
|
50
|
-
"graphql": "^15.5.0",
|
|
51
|
-
"graphql-combine-query": "^1.2.3",
|
|
52
|
-
"graphql-request": "^3.4.0",
|
|
53
|
-
"history": "^5.0.0",
|
|
54
|
-
"jsonpointer": "^4.1.0",
|
|
55
|
-
"jwt-decode": "^3.1.2",
|
|
56
|
-
"nanoid": "^3.1.23",
|
|
57
|
-
"rxjs": "^6.6.7"
|
|
58
|
-
}
|
|
59
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@saasquatch/component-boilerplate",
|
|
3
|
+
"version": "1.3.1-1",
|
|
4
|
+
"private": false,
|
|
5
|
+
"description": "Boilerplate for writing web components for the SaaSquatch widget environments",
|
|
6
|
+
"source": "src/index.ts",
|
|
7
|
+
"main": "dist/index.js",
|
|
8
|
+
"exports": "./dist/index.modern.js",
|
|
9
|
+
"module": "dist/index.module.js",
|
|
10
|
+
"types": "dist/index.d.ts",
|
|
11
|
+
"files": [
|
|
12
|
+
"dist"
|
|
13
|
+
],
|
|
14
|
+
"scripts": {
|
|
15
|
+
"build": "microbundle",
|
|
16
|
+
"test": "jest --forceExit",
|
|
17
|
+
"test-watch": "jest --watch"
|
|
18
|
+
},
|
|
19
|
+
"author": "SaaSquatch",
|
|
20
|
+
"license": "ISC",
|
|
21
|
+
"devDependencies": {
|
|
22
|
+
"@graphql-tools/mock": "^7.0.0",
|
|
23
|
+
"@saasquatch/stencil-hooks": "^2.0.0",
|
|
24
|
+
"@saasquatch/universal-hooks-testing-library": "^0.1.0",
|
|
25
|
+
"@testing-library/react-hooks": "^5.1.0",
|
|
26
|
+
"@types/debounce": "^1.2.0",
|
|
27
|
+
"@types/debug": "^4.1.5",
|
|
28
|
+
"@types/jest": "^26.0.20",
|
|
29
|
+
"axios": "^0.21.1",
|
|
30
|
+
"esbuild-jest": "^0.5.0",
|
|
31
|
+
"graphql-tools": "^7.0.5",
|
|
32
|
+
"jest": "^26.6.3",
|
|
33
|
+
"jest-cucumber": "^3.0.1",
|
|
34
|
+
"microbundle": "^0.13.0",
|
|
35
|
+
"msw": "^0.28.1",
|
|
36
|
+
"react": "^17.0.1",
|
|
37
|
+
"react-test-renderer": "^17.0.1",
|
|
38
|
+
"ts-jest": "^26.5.4",
|
|
39
|
+
"ts-node": "^9.1.1",
|
|
40
|
+
"typescript": "^4.1.5"
|
|
41
|
+
},
|
|
42
|
+
"dependencies": {
|
|
43
|
+
"@formatjs/intl": "^1.8.2",
|
|
44
|
+
"@saasquatch/dom-context-hooks": "^1.0.0",
|
|
45
|
+
"@saasquatch/universal-hooks": "^1.0.0",
|
|
46
|
+
"@wry/equality": "^0.3.3",
|
|
47
|
+
"debounce": "^1.2.0",
|
|
48
|
+
"dom-context": "^1.2.0",
|
|
49
|
+
"fast-memoize": "^2.5.2",
|
|
50
|
+
"graphql": "^15.5.0",
|
|
51
|
+
"graphql-combine-query": "^1.2.3",
|
|
52
|
+
"graphql-request": "^3.4.0",
|
|
53
|
+
"history": "^5.0.0",
|
|
54
|
+
"jsonpointer": "^4.1.0",
|
|
55
|
+
"jwt-decode": "^3.1.2",
|
|
56
|
+
"nanoid": "^3.1.23",
|
|
57
|
+
"rxjs": "^6.6.7"
|
|
58
|
+
}
|
|
59
|
+
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { RequestDocument } from "graphql-request/dist/types";
|
|
2
|
-
declare type GqlType = RequestDocument;
|
|
3
|
-
interface CustomQueryData<T = unknown, E = any> {
|
|
4
|
-
loading: boolean;
|
|
5
|
-
data?: T;
|
|
6
|
-
errors?: CustomGraphQlRequestError<T, E>;
|
|
7
|
-
}
|
|
8
|
-
declare type QueryData<T> = CustomQueryData<T> & {
|
|
9
|
-
refetch: (variables?: unknown) => unknown;
|
|
10
|
-
};
|
|
11
|
-
declare type CustomGraphQlRequestError<T, E> = {
|
|
12
|
-
response: {
|
|
13
|
-
errors: E[];
|
|
14
|
-
data: Partial<T>;
|
|
15
|
-
status: number;
|
|
16
|
-
};
|
|
17
|
-
request: {
|
|
18
|
-
query: string;
|
|
19
|
-
variables: {
|
|
20
|
-
[key: string]: unknown;
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
};
|
|
24
|
-
export declare function useCustomQuery<T = any, E = any>(query: GqlType, initialState: CustomQueryData<T>, url: string): [CustomQueryData<T>, (variables: unknown) => unknown];
|
|
25
|
-
export declare const customQueryHooksFactory: <E>(url: string) => {
|
|
26
|
-
useQuery: <T = any>(query: GqlType, variables: unknown, skip?: boolean) => QueryData<T>;
|
|
27
|
-
useLazyQuery: <T_1 = any>(query: GqlType) => [(e: unknown) => unknown, QueryData<T_1>];
|
|
28
|
-
useMutation: <T_2 = any>(query: GqlType) => [(e: unknown) => unknown, CustomQueryData<T_2, any>];
|
|
29
|
-
};
|
|
30
|
-
export {};
|