@jetshop/core 5.17.0-alpha.48cd30e1 → 5.17.0-alpha.4c1bb8b6
Sign up to get free protection for your applications and to get access to all the features.
- package/components/Fonts/CustomFont.d.ts +1 -1
- package/data/cache.js +4 -4
- package/data/cache.js.map +1 -1
- package/package.json +4 -5
- package/components/Fonts/GoogleFont.d.ts +0 -10
- package/components/Fonts/GoogleFont.js +0 -35
- package/components/Fonts/GoogleFont.js.map +0 -1
- package/components/Fonts/TypekitFont.d.ts +0 -16
- package/components/Fonts/TypekitFont.js +0 -25
- package/components/Fonts/TypekitFont.js.map +0 -1
@@ -8,7 +8,7 @@ export type CustomFontProps = {
|
|
8
8
|
* declarations */
|
9
9
|
injectCss: () => string;
|
10
10
|
};
|
11
|
-
export default class CustomFont extends React.PureComponent<CustomFontProps,
|
11
|
+
export default class CustomFont extends React.PureComponent<CustomFontProps, any> {
|
12
12
|
componentDidMount: () => void;
|
13
13
|
render(): null;
|
14
14
|
}
|
package/data/cache.js
CHANGED
@@ -23,11 +23,11 @@ const createCache = () => new InMemoryCache({
|
|
23
23
|
Product: {
|
24
24
|
// https://www.apollographql.com/docs/react/caching/cache-configuration#disabling-normalization
|
25
25
|
keyFields: false
|
26
|
-
},
|
27
|
-
Category: {
|
28
|
-
// https://www.apollographql.com/docs/react/caching/cache-configuration#disabling-normalization
|
29
|
-
keyFields: false
|
30
26
|
}
|
27
|
+
// Category: {
|
28
|
+
// // https://www.apollographql.com/docs/react/caching/cache-configuration#disabling-normalization
|
29
|
+
// keyFields: false
|
30
|
+
// }
|
31
31
|
}
|
32
32
|
});
|
33
33
|
export default createCache;
|
package/data/cache.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"cache.js","sourceRoot":"","sources":["cache.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE/C,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAE5C,MAAM,WAAW,GAAG,GAAG,EAAE,CACvB,IAAI,aAAa,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,EAAE,CAAC,CACP;IACD,YAAY,EAAE;QACZ,OAAO,EAAE;YACP,MAAM,EAAE;gBACN,QAAQ,EAAE;oBACR,KAAK,CAAC,QAAQ,EAAE,QAAQ,EAAE,EAAE,YAAY,EAAE;wBACxC,iFAAiF;wBACjF,sDAAsD;wBACtD,8EAA8E;wBAC9E,OAAO,YAAY,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;oBAC1C,CAAC;iBACF;aACF;SACF;QACD,OAAO,EAAE;YACP,+FAA+F;YAC/F,SAAS,EAAE,KAAK;SACjB;QACD,cAAc;QACd,oGAAoG;QACpG,qBAAqB;QACrB,IAAI;KACL;CACF,CAAC,CAAC;AAEL,eAAe,WAAW,CAAC"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@jetshop/core",
|
3
|
-
"version": "5.17.0-alpha.
|
3
|
+
"version": "5.17.0-alpha.4c1bb8b6",
|
4
4
|
"license": "MIT",
|
5
5
|
"files": [
|
6
6
|
"**/*.js",
|
@@ -42,7 +42,7 @@
|
|
42
42
|
"@sentry/browser": "^6.15.0",
|
43
43
|
"@sentry/core": "^6.15.0",
|
44
44
|
"@sentry/node": "^6.15.0",
|
45
|
-
"@tanem/react-nprogress": "^5.0.
|
45
|
+
"@tanem/react-nprogress": "^5.0.44",
|
46
46
|
"@types/accept-language-parser": "^1.5.1",
|
47
47
|
"@types/gtag.js": "^0.0.10",
|
48
48
|
"@types/loadable__component": "^5.10.0",
|
@@ -78,10 +78,8 @@
|
|
78
78
|
"react-router-dom": "^5.2.1",
|
79
79
|
"request-ip": "^2.1.3",
|
80
80
|
"schema-dts": "^0.8.2",
|
81
|
-
"store-css": "^0.3.0",
|
82
81
|
"ts-node": "^7.0.1",
|
83
82
|
"typed-emitter": "^0.1.0",
|
84
|
-
"typescript": "^4.8.3",
|
85
83
|
"universal-cookie-express": "^4.0.3",
|
86
84
|
"uuid": "^8.3.2",
|
87
85
|
"web-vitals": "^0.2.3",
|
@@ -113,7 +111,8 @@
|
|
113
111
|
"jest-dom": "^3.4.0",
|
114
112
|
"lint-staged": "^8.1.5",
|
115
113
|
"nock": "^10.0.6",
|
116
|
-
"prettier": "^2.3.2"
|
114
|
+
"prettier": "^2.3.2",
|
115
|
+
"typescript": "^4.8.3"
|
117
116
|
},
|
118
117
|
"peerDependencies": {
|
119
118
|
"react": "^18",
|
@@ -1,10 +0,0 @@
|
|
1
|
-
import * as React from 'react';
|
2
|
-
import { primaryFont, secondaryFonts } from './injectFont';
|
3
|
-
export type GoogleFontProps = {
|
4
|
-
primaryFont?: primaryFont;
|
5
|
-
secondaryFonts?: secondaryFonts;
|
6
|
-
};
|
7
|
-
export default class GoogleFont extends React.PureComponent<GoogleFontProps, {}> {
|
8
|
-
componentDidMount: () => void;
|
9
|
-
render(): null;
|
10
|
-
}
|
@@ -1,35 +0,0 @@
|
|
1
|
-
import * as React from 'react';
|
2
|
-
import { injectFont } from './injectFont';
|
3
|
-
export default class GoogleFont extends React.PureComponent {
|
4
|
-
constructor() {
|
5
|
-
super(...arguments);
|
6
|
-
// Uses Google's CDN to request the desired font
|
7
|
-
this.componentDidMount = () => {
|
8
|
-
const { primaryFont = '', secondaryFonts = [] } = this.props;
|
9
|
-
handleGoogleFonts([primaryFont, ...secondaryFonts]);
|
10
|
-
injectFont(cleanFontName(primaryFont), secondaryFonts.map(font => cleanFontName(font)));
|
11
|
-
};
|
12
|
-
}
|
13
|
-
render() {
|
14
|
-
return null;
|
15
|
-
}
|
16
|
-
}
|
17
|
-
function cleanFontName(family) {
|
18
|
-
// Takes a font formatted as `Source+Sans+Pro:400,600&subset=greek-ext`
|
19
|
-
// and returns 'Source Sans Pro'
|
20
|
-
return family
|
21
|
-
.split('&')[0]
|
22
|
-
.split(':')[0]
|
23
|
-
.replace(/\+/gi, ' ');
|
24
|
-
}
|
25
|
-
function handleGoogleFonts(families) {
|
26
|
-
// import external font stylesheet and store it in session storage to optimise
|
27
|
-
// future loads
|
28
|
-
// Check for document first as this should not run on the server
|
29
|
-
document &&
|
30
|
-
import('store-css').then(module => families.map(family => module.default.css(`https://fonts.googleapis.com/css?family=${family}`, {
|
31
|
-
crossOrigin: 'anonymous',
|
32
|
-
storage: 'session'
|
33
|
-
})));
|
34
|
-
}
|
35
|
-
//# sourceMappingURL=GoogleFont.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"GoogleFont.js","sourceRoot":"","sources":["GoogleFont.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,UAAU,EAA+B,MAAM,cAAc,CAAC;AAOvE,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,KAAK,CAAC,aAG7C;IAHD;;QAIE,gDAAgD;QAChD,sBAAiB,GAAG,GAAG,EAAE;YACvB,MAAM,EAAE,WAAW,GAAG,EAAE,EAAE,cAAc,GAAG,EAAE,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;YAE7D,iBAAiB,CAAC,CAAC,WAAW,EAAE,GAAG,cAAc,CAAC,CAAC,CAAC;YAEpD,UAAU,CACR,aAAa,CAAC,WAAW,CAAC,EAC1B,cAAc,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,CAChD,CAAC;QACJ,CAAC,CAAC;IAKJ,CAAC;IAHQ,MAAM;QACX,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAED,SAAS,aAAa,CAAC,MAAc;IACnC,2EAA2E;IAC3E,gCAAgC;IAChC,OAAO,MAAM;SACV,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;SACb,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;SACb,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAC1B,CAAC;AAED,SAAS,iBAAiB,CAAC,QAAkB;IAC3C,8EAA8E;IAC9E,eAAe;IACf,gEAAgE;IAChE,QAAQ;QACN,MAAM,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAChC,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CACpB,MAAM,CAAC,OAAO,CAAC,GAAG,CAChB,2CAA2C,MAAM,EAAE,EACnD;YACE,WAAW,EAAE,WAAW;YACxB,OAAO,EAAE,SAAS;SACnB,CACF,CACF,CACF,CAAC;AACN,CAAC"}
|
@@ -1,16 +0,0 @@
|
|
1
|
-
import * as React from 'react';
|
2
|
-
import { primaryFont, secondaryFonts } from './injectFont';
|
3
|
-
type TypekitFontProps = {
|
4
|
-
primaryFont?: primaryFont;
|
5
|
-
secondaryFonts?: secondaryFonts;
|
6
|
-
/**
|
7
|
-
* The embed code ID given by Adobe.
|
8
|
-
* @see https://helpx.adobe.com/fonts/using/embed-codes.html
|
9
|
-
*/
|
10
|
-
id: string;
|
11
|
-
};
|
12
|
-
export default class TypekitFont extends React.PureComponent<TypekitFontProps, {}> {
|
13
|
-
componentDidMount: () => void;
|
14
|
-
render(): null;
|
15
|
-
}
|
16
|
-
export {};
|
@@ -1,25 +0,0 @@
|
|
1
|
-
import * as React from 'react';
|
2
|
-
import { injectFont } from './injectFont';
|
3
|
-
function handleTypekitFonts(id) {
|
4
|
-
// Check for document first as this should not run on the server
|
5
|
-
document &&
|
6
|
-
import('store-css').then(module => module.default.css(`https://use.typekit.net/${id}.css`, {
|
7
|
-
crossOrigin: 'anonymous',
|
8
|
-
storage: 'session'
|
9
|
-
}));
|
10
|
-
}
|
11
|
-
export default class TypekitFont extends React.PureComponent {
|
12
|
-
constructor() {
|
13
|
-
super(...arguments);
|
14
|
-
// Uses Google's CDN to request the desired font
|
15
|
-
this.componentDidMount = () => {
|
16
|
-
const { primaryFont = '', secondaryFonts = [], id } = this.props;
|
17
|
-
injectFont(primaryFont, secondaryFonts);
|
18
|
-
handleTypekitFonts(id);
|
19
|
-
};
|
20
|
-
}
|
21
|
-
render() {
|
22
|
-
return null;
|
23
|
-
}
|
24
|
-
}
|
25
|
-
//# sourceMappingURL=TypekitFont.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"TypekitFont.js","sourceRoot":"","sources":["TypekitFont.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,UAAU,EAA+B,MAAM,cAAc,CAAC;AAYvE,SAAS,kBAAkB,CAAC,EAAU;IACpC,gEAAgE;IAChE,QAAQ;QACN,MAAM,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAChC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,2BAA2B,EAAE,MAAM,EAAE;YACtD,WAAW,EAAE,WAAW;YACxB,OAAO,EAAE,SAAS;SACnB,CAAC,CACH,CAAC;AACN,CAAC;AAED,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,KAAK,CAAC,aAG9C;IAHD;;QAIE,gDAAgD;QAChD,sBAAiB,GAAG,GAAG,EAAE;YACvB,MAAM,EAAE,WAAW,GAAG,EAAE,EAAE,cAAc,GAAG,EAAE,EAAE,EAAE,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;YACjE,UAAU,CAAC,WAAW,EAAE,cAAc,CAAC,CAAC;YACxC,kBAAkB,CAAC,EAAE,CAAC,CAAC;QACzB,CAAC,CAAC;IAKJ,CAAC;IAHQ,MAAM;QACX,OAAO,IAAI,CAAC;IACd,CAAC;CACF"}
|