fontdue-js 0.1.0 → 0.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/dist/__generated__/TypeTestersIDQuery.graphql.js +103 -57
- package/dist/__generated__/TypeTestersSlugQuery.graphql.js +103 -57
- package/dist/__generated__/TypeTesters_collection.graphql.d.ts +3 -0
- package/dist/__generated__/TypeTesters_collection.graphql.js +20 -6
- package/dist/components/AddToCartBanner/index.js +6 -4
- package/dist/components/BuyButton/index.js +21 -17
- package/dist/components/BuyingOptions/index.js +10 -7
- package/dist/components/Cart/AddressFields.js +10 -7
- package/dist/components/Cart/CartItem/index.js +71 -53
- package/dist/components/Cart/CartOrder.js +18 -14
- package/dist/components/Cart/CartState.js +16 -13
- package/dist/components/Cart/CartTotals.js +65 -59
- package/dist/components/Cart/Checkout.js +30 -23
- package/dist/components/Cart/CustomerFields.js +7 -6
- package/dist/components/Cart/Download.js +11 -9
- package/dist/components/Cart/EmptyCart.js +5 -4
- package/dist/components/Cart/IdentityBox.js +27 -24
- package/dist/components/Cart/index.js +23 -17
- package/dist/components/CartButton/index.js +12 -9
- package/dist/components/CharacterViewer/index.js +65 -54
- package/dist/components/CollectionAa/index.js +15 -11
- package/dist/components/CookieNotification/index.js +46 -38
- package/dist/components/CouponText/index.js +6 -4
- package/dist/components/Family/FamilyList.js +23 -20
- package/dist/components/Family/index.js +11 -8
- package/dist/components/FontFamilies/index.js +15 -12
- package/dist/components/FontStyle/index.js +10 -9
- package/dist/components/FontdueProvider/index.js +7 -6
- package/dist/components/NewsletterSignup/index.js +12 -10
- package/dist/components/Precart/License.js +8 -7
- package/dist/components/Precart/index.js +16 -11
- package/dist/components/Price/index.js +34 -27
- package/dist/components/PriceBar/PriceBarSection.js +14 -11
- package/dist/components/PriceBar/index.js +2 -2
- package/dist/components/Root/index.js +4 -1
- package/dist/components/Root/productState.js +3 -2
- package/dist/components/SKUPrice/index.js +7 -6
- package/dist/components/Select/index.js +22 -15
- package/dist/components/SelectButton/index.js +15 -13
- package/dist/components/SelectField/index.js +27 -24
- package/dist/components/SpecimenLink/index.js +14 -11
- package/dist/components/StickyNav/index.js +16 -13
- package/dist/components/StoreModal/StoreModalBundleButton.js +7 -6
- package/dist/components/StoreModal/StoreModalCart.js +10 -8
- package/dist/components/StoreModal/StoreModalCheckout.js +5 -4
- package/dist/components/StoreModal/StoreModalContainer.js +4 -3
- package/dist/components/StoreModal/StoreModalDownload.js +5 -4
- package/dist/components/StoreModal/StoreModalFamily.js +5 -4
- package/dist/components/StoreModal/StoreModalFamilyButton.js +7 -6
- package/dist/components/StoreModal/StoreModalIndex.js +4 -3
- package/dist/components/StoreModal/StoreModalLoader.js +4 -3
- package/dist/components/StoreModal/StoreModalProduct.js +4 -3
- package/dist/components/StoreModal/StoreModalReview.js +11 -9
- package/dist/components/StoreModal/StoreModalReviewIdentity.js +6 -3
- package/dist/components/StoreModal/StoreModalStyleButton.js +7 -6
- package/dist/components/StoreModalProductLicenseSelection/ContainerElement.js +15 -12
- package/dist/components/StoreModalProductLicenseSelection/LicenseElement.js +9 -8
- package/dist/components/StoreModalProductLicenseSelection/LicenseVariableElement.js +31 -25
- package/dist/components/StoreModalProductLicenseSelection/LicenseVariableRadioElement.js +13 -10
- package/dist/components/StoreModalProductLicenseSelection/StoreModalProductLicense.js +22 -13
- package/dist/components/StoreModalProductLicenseSelection/index.js +12 -9
- package/dist/components/StoreModalProductSummary/index.js +10 -8
- package/dist/components/StripeProvider/index.js +5 -4
- package/dist/components/Stylesheet/index.js +4 -3
- package/dist/components/TestFontsForm/index.js +32 -25
- package/dist/components/TestModeBanner/index.js +9 -7
- package/dist/components/TextField/index.js +32 -29
- package/dist/components/ThemeConfig/index.js +9 -7
- package/dist/components/TypeTester/TypeTesterAlignButtons.js +5 -4
- package/dist/components/TypeTester/TypeTesterBullet.js +5 -4
- package/dist/components/TypeTester/TypeTesterContent.js +9 -8
- package/dist/components/TypeTester/TypeTesterContext.js +6 -5
- package/dist/components/TypeTester/TypeTesterEditAll.js +4 -3
- package/dist/components/TypeTester/TypeTesterFeatures.js +16 -10
- package/dist/components/TypeTester/TypeTesterFeaturesButton.js +18 -15
- package/dist/components/TypeTester/TypeTesterFitter.js +5 -4
- package/dist/components/TypeTester/TypeTesterFloatingToolbar.js +6 -5
- package/dist/components/TypeTester/TypeTesterInput.js +7 -6
- package/dist/components/TypeTester/TypeTesterSlider.js +15 -11
- package/dist/components/TypeTester/TypeTesterStandalone.js +18 -16
- package/dist/components/TypeTester/TypeTesterState.js +4 -3
- package/dist/components/TypeTester/TypeTesterStyleSelect.js +39 -26
- package/dist/components/TypeTester/TypeTesterStyleSelectData.js +7 -6
- package/dist/components/TypeTester/TypeTesterToolbar.js +6 -5
- package/dist/components/TypeTester/index.js +36 -29
- package/dist/components/TypeTester/useTypeTesterStyler.js +21 -19
- package/dist/components/TypeTesters/index.js +40 -34
- package/dist/components/VariableTableAmounts/index.js +5 -4
- package/dist/components/elements/Button/index.js +11 -8
- package/dist/components/elements/StoreModalCartLayout/index.js +29 -26
- package/dist/components/elements/StoreModalContainer/index.js +14 -13
- package/dist/components/elements/StoreModalDownloadLayout/index.js +17 -14
- package/dist/components/elements/StoreModalFamily/index.js +22 -19
- package/dist/components/elements/StoreModalFamilyButton/index.js +12 -11
- package/dist/components/elements/StoreModalIndexItem/index.js +9 -8
- package/dist/components/elements/StoreModalPageContainer/index.js +18 -15
- package/dist/components/elements/StoreModalReviewConfirm/index.js +9 -8
- package/dist/components/elements/StoreModalReviewItem/index.js +11 -8
- package/dist/components/elements/StoreModalReviewLayout/index.js +50 -47
- package/dist/components/elements/StoreModalStyleButton/index.js +10 -9
- package/dist/components/useFontStyle.js +6 -5
- package/dist/utils.js +3 -2
- package/dist/vanilla/FontStyle.js +10 -8
- package/fontdue.css +6 -0
- package/fontdue.css.map +1 -1
- package/package.json +1 -1
|
@@ -13,30 +13,33 @@ var _IdentityBox_identity;
|
|
|
13
13
|
|
|
14
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
15
|
|
|
16
|
-
const IdentityBox =
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
},
|
|
30
|
-
|
|
31
|
-
}, "
|
|
32
|
-
|
|
33
|
-
},
|
|
34
|
-
|
|
35
|
-
}, identity.
|
|
36
|
-
|
|
37
|
-
}, identity.
|
|
38
|
-
|
|
39
|
-
},
|
|
16
|
+
const IdentityBox = _ref => {
|
|
17
|
+
let {
|
|
18
|
+
identity,
|
|
19
|
+
title,
|
|
20
|
+
onClick,
|
|
21
|
+
children: {
|
|
22
|
+
icon
|
|
23
|
+
}
|
|
24
|
+
} = _ref;
|
|
25
|
+
return /*#__PURE__*/_react.default.createElement("button", {
|
|
26
|
+
className: "cart__review__button",
|
|
27
|
+
type: "button",
|
|
28
|
+
onClick: onClick
|
|
29
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
30
|
+
className: "cart__review__label"
|
|
31
|
+
}, icon, title, " ", /*#__PURE__*/_react.default.createElement("span", {
|
|
32
|
+
className: "cart__review__label__text"
|
|
33
|
+
}, "Edit")), /*#__PURE__*/_react.default.createElement("div", {
|
|
34
|
+
className: "cart__review__section"
|
|
35
|
+
}, /*#__PURE__*/_react.default.createElement("pre", null, identity.addressFormatted)), /*#__PURE__*/_react.default.createElement("div", {
|
|
36
|
+
className: "cart__review__section"
|
|
37
|
+
}, identity.email), /*#__PURE__*/_react.default.createElement("div", {
|
|
38
|
+
className: "cart__review__section"
|
|
39
|
+
}, identity.phoneFormatted), identity.vatNumber && /*#__PURE__*/_react.default.createElement("div", {
|
|
40
|
+
className: "cart__review__section"
|
|
41
|
+
}, "VAT: ", identity.vatNumber));
|
|
42
|
+
};
|
|
40
43
|
|
|
41
44
|
var _default = (0, _reactRelay.createFragmentContainer)(IdentityBox, {
|
|
42
45
|
identity: _IdentityBox_identity !== void 0 ? _IdentityBox_identity : (_IdentityBox_identity = require("../../__generated__/IdentityBox_identity.graphql"), _IdentityBox_identity.hash && _IdentityBox_identity.hash !== "d93d9cb6f2c86580fb57b4de6782ec9d" && console.error("The definition of 'IdentityBox_identity' appears to have changed. Run `relay-compiler` to update the generated files to receive the expected data."), _IdentityBox_identity)
|
|
@@ -25,10 +25,11 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
25
25
|
|
|
26
26
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
27
27
|
|
|
28
|
-
const CartBase =
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
const CartBase = _ref => {
|
|
29
|
+
let {
|
|
30
|
+
status,
|
|
31
|
+
viewer
|
|
32
|
+
} = _ref;
|
|
32
33
|
const {
|
|
33
34
|
currentOrder
|
|
34
35
|
} = viewer;
|
|
@@ -44,15 +45,18 @@ const CartBase = ({
|
|
|
44
45
|
}));
|
|
45
46
|
};
|
|
46
47
|
|
|
47
|
-
const CartTransitionBase =
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
},
|
|
48
|
+
const CartTransitionBase = _ref2 => {
|
|
49
|
+
let {
|
|
50
|
+
cartOpen,
|
|
51
|
+
...props
|
|
52
|
+
} = _ref2;
|
|
53
|
+
return /*#__PURE__*/_react.default.createElement(_Transition.default, {
|
|
54
|
+
in: cartOpen,
|
|
55
|
+
timeout: 200
|
|
56
|
+
}, status => /*#__PURE__*/_react.default.createElement(CartBase, _extends({
|
|
57
|
+
status: status
|
|
58
|
+
}, props)));
|
|
59
|
+
};
|
|
56
60
|
|
|
57
61
|
const CartTransition = (0, _reactRelay.createFragmentContainer)(CartTransitionBase, {
|
|
58
62
|
viewer: _Cart_viewer !== void 0 ? _Cart_viewer : (_Cart_viewer = require("../../__generated__/Cart_viewer.graphql"), _Cart_viewer.hash && _Cart_viewer.hash !== "f8014219785183b543a2133a9ff912b0" && console.error("The definition of 'Cart_viewer' appears to have changed. Run `relay-compiler` to update the generated files to receive the expected data."), _Cart_viewer)
|
|
@@ -65,10 +69,12 @@ const CartQueryRenderer = () => {
|
|
|
65
69
|
environment: environment,
|
|
66
70
|
query: _CartQuery !== void 0 ? _CartQuery : (_CartQuery = require("../../__generated__/CartQuery.graphql"), _CartQuery.hash && _CartQuery.hash !== "310dc24fc7f5886c3ddb7cc7b8c0f4a2" && console.error("The definition of 'CartQuery' appears to have changed. Run `relay-compiler` to update the generated files to receive the expected data."), _CartQuery),
|
|
67
71
|
variables: {},
|
|
68
|
-
render:
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
+
render: _ref3 => {
|
|
73
|
+
let {
|
|
74
|
+
error,
|
|
75
|
+
props
|
|
76
|
+
} = _ref3;
|
|
77
|
+
|
|
72
78
|
if (error) {
|
|
73
79
|
console.error(error);
|
|
74
80
|
return null;
|
|
@@ -38,11 +38,12 @@ const openCart = () => ({
|
|
|
38
38
|
type: 'OPEN_CART'
|
|
39
39
|
});
|
|
40
40
|
|
|
41
|
-
const CartButtonBase =
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
41
|
+
const CartButtonBase = _ref => {
|
|
42
|
+
let {
|
|
43
|
+
label,
|
|
44
|
+
buttonStyle,
|
|
45
|
+
order
|
|
46
|
+
} = _ref;
|
|
46
47
|
const dispatch = (0, _reactRedux.useDispatch)();
|
|
47
48
|
const count = cartButtonCount(order);
|
|
48
49
|
const handleClick = (0, _react.useCallback)(() => {
|
|
@@ -83,10 +84,12 @@ const CartButtonQueryRenderer = params => {
|
|
|
83
84
|
environment: environment,
|
|
84
85
|
query: _CartButtonQuery !== void 0 ? _CartButtonQuery : (_CartButtonQuery = require("../../__generated__/CartButtonQuery.graphql"), _CartButtonQuery.hash && _CartButtonQuery.hash !== "5c0da5849bf1215a9d1f264831830f71" && console.error("The definition of 'CartButtonQuery' appears to have changed. Run `relay-compiler` to update the generated files to receive the expected data."), _CartButtonQuery),
|
|
85
86
|
variables: {},
|
|
86
|
-
render:
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
87
|
+
render: _ref2 => {
|
|
88
|
+
let {
|
|
89
|
+
error,
|
|
90
|
+
props
|
|
91
|
+
} = _ref2;
|
|
92
|
+
|
|
90
93
|
if (error) {
|
|
91
94
|
console.error(error);
|
|
92
95
|
return null;
|
|
@@ -50,13 +50,14 @@ const collectionInfo = collection => ({
|
|
|
50
50
|
fontStyles: collection.fontStyles
|
|
51
51
|
});
|
|
52
52
|
|
|
53
|
-
const CharacterViewerComponent =
|
|
54
|
-
|
|
55
|
-
}) => {
|
|
56
|
-
var _collection$children$, _collection$children, _ref, _collection$featureSt, _collection$featureSt2, _collection$fontStyle, _collection$fontStyle2, _collection$children2, _collection$children3, _collection$children4, _collection$children5, _fontStyle$characterB, _fontStyle$characterB2, _fontStyle$featureCha, _fontStyle$featureCha2, _fontStyle$featureCha3, _fontStyle$featureCha4, _fontStyle$featureCha5, _fontStyle$characterB3, _fontStyle$featureCha6;
|
|
53
|
+
const CharacterViewerComponent = _ref => {
|
|
54
|
+
var _collection$children$, _collection$children, _ref2, _collection$featureSt, _collection$featureSt2, _collection$fontStyle, _collection$fontStyle2, _collection$children2, _collection$children3, _collection$children4, _collection$children5, _fontStyle$characterB, _fontStyle$characterB2, _fontStyle$featureCha, _fontStyle$featureCha2, _fontStyle$featureCha3, _fontStyle$featureCha4, _fontStyle$featureCha5, _fontStyle$characterB3, _fontStyle$featureCha6;
|
|
57
55
|
|
|
56
|
+
let {
|
|
57
|
+
collection
|
|
58
|
+
} = _ref;
|
|
58
59
|
const allCollections = [collectionInfo(collection)].concat((_collection$children$ = (_collection$children = collection.children) === null || _collection$children === void 0 ? void 0 : _collection$children.map(collectionInfo)) !== null && _collection$children$ !== void 0 ? _collection$children$ : []);
|
|
59
|
-
const [fontStyleId, setFontStyleId] = (0, _react.useState)((
|
|
60
|
+
const [fontStyleId, setFontStyleId] = (0, _react.useState)((_ref2 = (_collection$featureSt = (_collection$featureSt2 = collection.featureStyle) === null || _collection$featureSt2 === void 0 ? void 0 : _collection$featureSt2.id) !== null && _collection$featureSt !== void 0 ? _collection$featureSt : (_collection$fontStyle = collection.fontStyles) === null || _collection$fontStyle === void 0 ? void 0 : (_collection$fontStyle2 = _collection$fontStyle[0]) === null || _collection$fontStyle2 === void 0 ? void 0 : _collection$fontStyle2.id) !== null && _ref2 !== void 0 ? _ref2 : (_collection$children2 = collection.children) === null || _collection$children2 === void 0 ? void 0 : (_collection$children3 = _collection$children2[0]) === null || _collection$children3 === void 0 ? void 0 : (_collection$children4 = _collection$children3.fontStyles) === null || _collection$children4 === void 0 ? void 0 : (_collection$children5 = _collection$children4[0]) === null || _collection$children5 === void 0 ? void 0 : _collection$children5.id);
|
|
60
61
|
const fontStyle = allCollections.flatMap(coll => coll.fontStyles).find(style => style.id === fontStyleId);
|
|
61
62
|
const {
|
|
62
63
|
style
|
|
@@ -128,24 +129,27 @@ const CharacterViewerComponent = ({
|
|
|
128
129
|
style: {
|
|
129
130
|
'--width': blocksWidth
|
|
130
131
|
}
|
|
131
|
-
}, (_fontStyle$characterB3 = fontStyle.characterBlocks) === null || _fontStyle$characterB3 === void 0 ? void 0 : _fontStyle$characterB3.map(({
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
132
|
+
}, (_fontStyle$characterB3 = fontStyle.characterBlocks) === null || _fontStyle$characterB3 === void 0 ? void 0 : _fontStyle$characterB3.map((_ref3, i) => {
|
|
133
|
+
let {
|
|
134
|
+
name,
|
|
135
|
+
characters
|
|
136
|
+
} = _ref3;
|
|
137
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
138
|
+
className: "character-viewer__block",
|
|
139
|
+
key: i
|
|
140
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
141
|
+
className: "character-viewer__block__name"
|
|
142
|
+
}, name), /*#__PURE__*/_react.default.createElement("div", {
|
|
143
|
+
className: "character-viewer__block__characters",
|
|
144
|
+
style: style,
|
|
145
|
+
onMouseLeave: handleMouseLeave
|
|
146
|
+
}, characters.map((chars, j) => /*#__PURE__*/_react.default.createElement("div", {
|
|
147
|
+
key: j,
|
|
148
|
+
onClick: () => setSelectedCharacter(chars),
|
|
149
|
+
onMouseEnter: () => setActiveCharacter(chars),
|
|
150
|
+
"data-selected": selectedCharacter === chars
|
|
151
|
+
}, chars))));
|
|
152
|
+
}))), /*#__PURE__*/_react.default.createElement("div", {
|
|
149
153
|
className: "character-viewer__features-map"
|
|
150
154
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
151
155
|
className: "character-viewer__feature-monitor"
|
|
@@ -193,27 +197,30 @@ const CharacterViewerComponent = ({
|
|
|
193
197
|
style: {
|
|
194
198
|
'--width': blocksWidth
|
|
195
199
|
}
|
|
196
|
-
}, (_fontStyle$featureCha6 = fontStyle.featureCharacters) === null || _fontStyle$featureCha6 === void 0 ? void 0 : _fontStyle$featureCha6.map(({
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
200
|
+
}, (_fontStyle$featureCha6 = fontStyle.featureCharacters) === null || _fontStyle$featureCha6 === void 0 ? void 0 : _fontStyle$featureCha6.map((_ref4, i) => {
|
|
201
|
+
let {
|
|
202
|
+
name,
|
|
203
|
+
feature,
|
|
204
|
+
characters
|
|
205
|
+
} = _ref4;
|
|
206
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
207
|
+
className: "character-viewer__block",
|
|
208
|
+
key: i
|
|
209
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
210
|
+
className: "character-viewer__block__name"
|
|
211
|
+
}, name), /*#__PURE__*/_react.default.createElement("div", {
|
|
212
|
+
className: "character-viewer__block__characters",
|
|
213
|
+
style: { ...style,
|
|
214
|
+
fontFeatureSettings: `'${feature}' 1`
|
|
215
|
+
},
|
|
216
|
+
onMouseLeave: handleFeatureCharacterMouseLeave
|
|
217
|
+
}, characters.map((chars, j) => /*#__PURE__*/_react.default.createElement("div", {
|
|
218
|
+
key: j,
|
|
219
|
+
onClick: () => setSelectedFeatureCharacter([chars, feature]),
|
|
220
|
+
onMouseEnter: () => setActiveFeatureCharacter([chars, feature]),
|
|
221
|
+
"data-selected": (selectedFeatureCharacter === null || selectedFeatureCharacter === void 0 ? void 0 : selectedFeatureCharacter[0]) === chars && (selectedFeatureCharacter === null || selectedFeatureCharacter === void 0 ? void 0 : selectedFeatureCharacter[1]) === feature
|
|
222
|
+
}, chars))));
|
|
223
|
+
}))));
|
|
217
224
|
};
|
|
218
225
|
|
|
219
226
|
_CharacterViewer_family !== void 0 ? _CharacterViewer_family : (_CharacterViewer_family = require("../../__generated__/CharacterViewer_family.graphql"), _CharacterViewer_family.hash && _CharacterViewer_family.hash !== "2883e053de6bd4a34d802fe4af824991" && console.error("The definition of 'CharacterViewer_family' appears to have changed. Run `relay-compiler` to update the generated files to receive the expected data."), _CharacterViewer_family);
|
|
@@ -221,9 +228,10 @@ const CharacterViewer = (0, _reactRelay.createFragmentContainer)(CharacterViewer
|
|
|
221
228
|
collection: _CharacterViewer_collection !== void 0 ? _CharacterViewer_collection : (_CharacterViewer_collection = require("../../__generated__/CharacterViewer_collection.graphql"), _CharacterViewer_collection.hash && _CharacterViewer_collection.hash !== "6f5a8250fc907a798d7e83c8a9ce3f45" && console.error("The definition of 'CharacterViewer_collection' appears to have changed. Run `relay-compiler` to update the generated files to receive the expected data."), _CharacterViewer_collection)
|
|
222
229
|
});
|
|
223
230
|
|
|
224
|
-
const CharacterViewerQueryRenderer =
|
|
225
|
-
|
|
226
|
-
|
|
231
|
+
const CharacterViewerQueryRenderer = _ref5 => {
|
|
232
|
+
let {
|
|
233
|
+
collectionId
|
|
234
|
+
} = _ref5;
|
|
227
235
|
const environment = (0, _reactRelay.useRelayEnvironment)();
|
|
228
236
|
return /*#__PURE__*/_react.default.createElement(_reactRelay.QueryRenderer, {
|
|
229
237
|
query: _CharacterViewer_Query !== void 0 ? _CharacterViewer_Query : (_CharacterViewer_Query = require("../../__generated__/CharacterViewer_Query.graphql"), _CharacterViewer_Query.hash && _CharacterViewer_Query.hash !== "10b58f0e5e086adbcd2a0d4cd44c442c" && console.error("The definition of 'CharacterViewer_Query' appears to have changed. Run `relay-compiler` to update the generated files to receive the expected data."), _CharacterViewer_Query),
|
|
@@ -231,13 +239,16 @@ const CharacterViewerQueryRenderer = ({
|
|
|
231
239
|
collectionId
|
|
232
240
|
},
|
|
233
241
|
environment: environment,
|
|
234
|
-
render:
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
242
|
+
render: _ref6 => {
|
|
243
|
+
let {
|
|
244
|
+
props
|
|
245
|
+
} = _ref6;
|
|
246
|
+
return /*#__PURE__*/_react.default.createElement(_reactStaticContainer.default, {
|
|
247
|
+
shouldUpdate: props
|
|
248
|
+
}, props !== null && props !== void 0 && props.node ? /*#__PURE__*/_react.default.createElement(CharacterViewer, {
|
|
249
|
+
collection: props.node
|
|
250
|
+
}) : null);
|
|
251
|
+
}
|
|
241
252
|
});
|
|
242
253
|
};
|
|
243
254
|
|
|
@@ -17,9 +17,10 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
17
17
|
|
|
18
18
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
19
19
|
|
|
20
|
-
const CollectionAaBase =
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
const CollectionAaBase = _ref => {
|
|
21
|
+
let {
|
|
22
|
+
product
|
|
23
|
+
} = _ref;
|
|
23
24
|
let fontStyle;
|
|
24
25
|
|
|
25
26
|
if (product.__typename === 'Bundle') {
|
|
@@ -38,10 +39,11 @@ const CollectionAaFragment = (0, _reactRelay.createFragmentContainer)(Collection
|
|
|
38
39
|
});
|
|
39
40
|
exports.CollectionAaFragment = CollectionAaFragment;
|
|
40
41
|
|
|
41
|
-
const CollectionAaQueryRenderer =
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
const CollectionAaQueryRenderer = _ref2 => {
|
|
43
|
+
let {
|
|
44
|
+
collectionId,
|
|
45
|
+
...rest
|
|
46
|
+
} = _ref2;
|
|
45
47
|
const environment = (0, _reactRelay.useRelayEnvironment)();
|
|
46
48
|
return /*#__PURE__*/_react.default.createElement(_reactRelay.QueryRenderer, {
|
|
47
49
|
environment: environment,
|
|
@@ -49,10 +51,12 @@ const CollectionAaQueryRenderer = ({
|
|
|
49
51
|
variables: {
|
|
50
52
|
collectionId
|
|
51
53
|
},
|
|
52
|
-
render:
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
render: _ref3 => {
|
|
55
|
+
let {
|
|
56
|
+
error,
|
|
57
|
+
props
|
|
58
|
+
} = _ref3;
|
|
59
|
+
|
|
56
60
|
if (error) {
|
|
57
61
|
console.error(error);
|
|
58
62
|
return null;
|
|
@@ -19,45 +19,53 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
|
|
|
19
19
|
|
|
20
20
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
21
21
|
|
|
22
|
-
const DefaultCookieNotification =
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
"
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
32
|
-
|
|
33
|
-
}, /*#__PURE__*/_react.default.createElement("
|
|
34
|
-
|
|
35
|
-
},
|
|
36
|
-
|
|
37
|
-
}, "
|
|
38
|
-
|
|
39
|
-
}, "
|
|
40
|
-
|
|
41
|
-
}, /*#__PURE__*/_react.default.createElement("
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
22
|
+
const DefaultCookieNotification = _ref => {
|
|
23
|
+
let {
|
|
24
|
+
onDismiss,
|
|
25
|
+
open,
|
|
26
|
+
siteTitle
|
|
27
|
+
} = _ref;
|
|
28
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
29
|
+
className: "cookie-notification",
|
|
30
|
+
"data-open": open
|
|
31
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
32
|
+
className: "cookie-notification__container"
|
|
33
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
34
|
+
className: "cookie-notification__text-container"
|
|
35
|
+
}, /*#__PURE__*/_react.default.createElement("p", {
|
|
36
|
+
className: "cookie-notification__label"
|
|
37
|
+
}, siteTitle, " website uses cookies"), /*#__PURE__*/_react.default.createElement("p", {
|
|
38
|
+
className: "cookie-notification__text"
|
|
39
|
+
}, "We use cookies to ensure that we give you the best experience. By continuing to visit this site you agree to receive cookies from generaltypestudio.com. You can read more about cookies in our ", /*#__PURE__*/_react.default.createElement("a", {
|
|
40
|
+
href: "/privacy-policy"
|
|
41
|
+
}, "privacy policy"), ".")), /*#__PURE__*/_react.default.createElement("div", {
|
|
42
|
+
className: "cookie-notification__button-container"
|
|
43
|
+
}, /*#__PURE__*/_react.default.createElement("button", {
|
|
44
|
+
type: "button",
|
|
45
|
+
className: "cookie-notification__button",
|
|
46
|
+
onClick: onDismiss
|
|
47
|
+
}, "Got it"))));
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
const GetComponent = _ref2 => {
|
|
51
|
+
let {
|
|
52
|
+
name,
|
|
53
|
+
fallback,
|
|
54
|
+
children
|
|
55
|
+
} = _ref2;
|
|
56
|
+
return /*#__PURE__*/_react.default.createElement(_ComponentsContext.default.Consumer, null, components => {
|
|
57
|
+
const Component = components[name] || fallback;
|
|
58
|
+
return children(Component);
|
|
59
|
+
});
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
const CookieNotificationBase = _ref3 => {
|
|
63
|
+
let {
|
|
64
|
+
status,
|
|
65
|
+
siteTitle,
|
|
66
|
+
dismiss
|
|
67
|
+
} = _ref3;
|
|
55
68
|
|
|
56
|
-
const CookieNotificationBase = ({
|
|
57
|
-
status,
|
|
58
|
-
siteTitle,
|
|
59
|
-
dismiss
|
|
60
|
-
}) => {
|
|
61
69
|
if (status === 'exited') {
|
|
62
70
|
return null;
|
|
63
71
|
}
|
|
@@ -17,10 +17,12 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
17
17
|
|
|
18
18
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
19
19
|
|
|
20
|
-
const CouponText =
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
const CouponText = _ref => {
|
|
21
|
+
let {
|
|
22
|
+
coupon,
|
|
23
|
+
subtract = 0
|
|
24
|
+
} = _ref;
|
|
25
|
+
|
|
24
26
|
if (coupon.type === 'credit') {
|
|
25
27
|
const amountRemaining = { ...coupon.creditAmountRemaining,
|
|
26
28
|
amount: coupon.creditAmountRemaining.amount - subtract,
|
|
@@ -28,26 +28,29 @@ const translatedLangs = ['en', 'ar', 'el', 'ru'];
|
|
|
28
28
|
|
|
29
29
|
const supportsLang = supported => lang => supported.indexOf(lang) >= 0;
|
|
30
30
|
|
|
31
|
-
const FamilyList =
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
31
|
+
const FamilyList = _ref => {
|
|
32
|
+
let {
|
|
33
|
+
node,
|
|
34
|
+
text,
|
|
35
|
+
includeTranslations
|
|
36
|
+
} = _ref;
|
|
37
|
+
return /*#__PURE__*/_react.default.createElement("ul", {
|
|
38
|
+
className: "font-family-block__list",
|
|
39
|
+
style: {
|
|
40
|
+
fontFamily: node.name
|
|
41
|
+
}
|
|
42
|
+
}, node.fontStyles.map((style, i) => includeTranslations ? translatedLangs.filter(supportsLang(style.supportedLanguages)).map(lang => /*#__PURE__*/_react.default.createElement(_FontStyle.default, {
|
|
43
|
+
fontStyle: style,
|
|
44
|
+
Component: "li",
|
|
45
|
+
key: i + lang,
|
|
46
|
+
className: "font-family-block__list__item"
|
|
47
|
+
}, /*#__PURE__*/_react.default.createElement("span", null, translateStyle(text || style.name, lang), " "))) : /*#__PURE__*/_react.default.createElement(_FontStyle.default, {
|
|
48
|
+
fontStyle: style,
|
|
49
|
+
Component: "li",
|
|
50
|
+
key: i,
|
|
51
|
+
className: "font-family-block__list__item"
|
|
52
|
+
}, /*#__PURE__*/_react.default.createElement("span", null, text || style.name, " "))));
|
|
53
|
+
};
|
|
51
54
|
|
|
52
55
|
var _default = (0, _reactRelay.createFragmentContainer)(FamilyList, {
|
|
53
56
|
node: _FamilyList_node !== void 0 ? _FamilyList_node : (_FamilyList_node = require("../../__generated__/FamilyList_node.graphql"), _FamilyList_node.hash && _FamilyList_node.hash !== "c5a85886573109526219a27d22905425" && console.error("The definition of 'FamilyList_node' appears to have changed. Run `relay-compiler` to update the generated files to receive the expected data."), _FamilyList_node)
|
|
@@ -30,8 +30,8 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
30
30
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
31
31
|
|
|
32
32
|
class FamilyBase extends _react.default.Component {
|
|
33
|
-
constructor(
|
|
34
|
-
super(...
|
|
33
|
+
constructor() {
|
|
34
|
+
super(...arguments);
|
|
35
35
|
|
|
36
36
|
_defineProperty(this, "state", {
|
|
37
37
|
buyButtonIsHovered: false
|
|
@@ -106,12 +106,15 @@ class FamilyBase extends _react.default.Component {
|
|
|
106
106
|
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
-
const mapStateToProps = (state, {
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
109
|
+
const mapStateToProps = (state, _ref) => {
|
|
110
|
+
let {
|
|
111
|
+
node
|
|
112
|
+
} = _ref;
|
|
113
|
+
return {
|
|
114
|
+
precartOpen: state.precartOpen,
|
|
115
|
+
selected: node.sku && (0, _reducer.isSelected)(node.sku.id)(state)
|
|
116
|
+
};
|
|
117
|
+
};
|
|
115
118
|
|
|
116
119
|
const Family = (0, _reactRelay.createFragmentContainer)((0, _reactRedux.connect)(mapStateToProps)(FamilyBase), {
|
|
117
120
|
node: _Family_node !== void 0 ? _Family_node : (_Family_node = require("../../__generated__/Family_node.graphql"), _Family_node.hash && _Family_node.hash !== "b51af1e6bc979d5219f04c848dc3d76d" && console.error("The definition of 'Family_node' appears to have changed. Run `relay-compiler` to update the generated files to receive the expected data."), _Family_node)
|
|
@@ -25,12 +25,13 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
25
25
|
|
|
26
26
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
27
27
|
|
|
28
|
-
const FontFamiliesBase =
|
|
29
|
-
node,
|
|
30
|
-
includeTranslations
|
|
31
|
-
}) => {
|
|
28
|
+
const FontFamiliesBase = _ref => {
|
|
32
29
|
var _node$families;
|
|
33
30
|
|
|
31
|
+
let {
|
|
32
|
+
node,
|
|
33
|
+
includeTranslations
|
|
34
|
+
} = _ref;
|
|
34
35
|
if (!node) return null;
|
|
35
36
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
36
37
|
className: "font-families"
|
|
@@ -51,10 +52,11 @@ const FontFamilies = (0, _reactRelay.createFragmentContainer)(FontFamiliesBase,
|
|
|
51
52
|
node: _FontFamilies_node !== void 0 ? _FontFamilies_node : (_FontFamilies_node = require("../../__generated__/FontFamilies_node.graphql"), _FontFamilies_node.hash && _FontFamilies_node.hash !== "472d13cd7851f2c92785410aae4acf45" && console.error("The definition of 'FontFamilies_node' appears to have changed. Run `relay-compiler` to update the generated files to receive the expected data."), _FontFamilies_node)
|
|
52
53
|
});
|
|
53
54
|
|
|
54
|
-
const FontFamiliesQueryRenderer =
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
55
|
+
const FontFamiliesQueryRenderer = _ref2 => {
|
|
56
|
+
let {
|
|
57
|
+
collectionId,
|
|
58
|
+
...rest
|
|
59
|
+
} = _ref2;
|
|
58
60
|
const environment = (0, _reactRelay.useRelayEnvironment)();
|
|
59
61
|
const store = (0, _reactRedux.useStore)();
|
|
60
62
|
(0, _react.useEffect)(() => {
|
|
@@ -69,10 +71,11 @@ const FontFamiliesQueryRenderer = ({
|
|
|
69
71
|
variables: {
|
|
70
72
|
collectionId
|
|
71
73
|
},
|
|
72
|
-
render:
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
74
|
+
render: _ref3 => {
|
|
75
|
+
let {
|
|
76
|
+
error,
|
|
77
|
+
props
|
|
78
|
+
} = _ref3;
|
|
76
79
|
if (error) return /*#__PURE__*/_react.default.createElement("div", null, error.message);
|
|
77
80
|
|
|
78
81
|
if (props) {
|
|
@@ -15,15 +15,16 @@ var _FontStyle_fontStyle;
|
|
|
15
15
|
|
|
16
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
17
|
|
|
18
|
-
const FontStyle =
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
18
|
+
const FontStyle = _ref => {
|
|
19
|
+
let {
|
|
20
|
+
Component = 'div',
|
|
21
|
+
fontStyle,
|
|
22
|
+
style,
|
|
23
|
+
children,
|
|
24
|
+
relay,
|
|
25
|
+
// eslint-disable-line
|
|
26
|
+
...rest
|
|
27
|
+
} = _ref;
|
|
27
28
|
const {
|
|
28
29
|
cssFamily,
|
|
29
30
|
name
|