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
|
@@ -31,12 +31,13 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
31
31
|
|
|
32
32
|
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; }
|
|
33
33
|
|
|
34
|
-
const FontdueProvider =
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
34
|
+
const FontdueProvider = _ref => {
|
|
35
|
+
let {
|
|
36
|
+
children,
|
|
37
|
+
url,
|
|
38
|
+
config,
|
|
39
|
+
components
|
|
40
|
+
} = _ref;
|
|
40
41
|
const environment = (0, _react.useRef)((0, _relayEnvironment.default)({
|
|
41
42
|
url
|
|
42
43
|
}));
|
|
@@ -23,13 +23,14 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
23
23
|
|
|
24
24
|
const updateCustomerMutation = _NewsletterSignupUpdateCustomerMutation !== void 0 ? _NewsletterSignupUpdateCustomerMutation : (_NewsletterSignupUpdateCustomerMutation = require("../../__generated__/NewsletterSignupUpdateCustomerMutation.graphql"), _NewsletterSignupUpdateCustomerMutation.hash && _NewsletterSignupUpdateCustomerMutation.hash !== "769087891b6f263122bbb630b3f2ca6c" && console.error("The definition of 'NewsletterSignupUpdateCustomerMutation' appears to have changed. Run `relay-compiler` to update the generated files to receive the expected data."), _NewsletterSignupUpdateCustomerMutation);
|
|
25
25
|
|
|
26
|
-
const NewsletterSignup =
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
26
|
+
const NewsletterSignup = _ref => {
|
|
27
|
+
let {
|
|
28
|
+
optInLabel,
|
|
29
|
+
buttonLabel = 'Subscribe',
|
|
30
|
+
optInCheckboxChecked = false,
|
|
31
|
+
title,
|
|
32
|
+
intro
|
|
33
|
+
} = _ref;
|
|
33
34
|
const [name, setName] = (0, _react.useState)('');
|
|
34
35
|
const [email, setEmail] = (0, _react.useState)('');
|
|
35
36
|
const [newsletterOptIn, setNewsletterOptIn] = (0, _react.useState)(optInCheckboxChecked);
|
|
@@ -54,9 +55,10 @@ const NewsletterSignup = ({
|
|
|
54
55
|
setError(null);
|
|
55
56
|
}
|
|
56
57
|
},
|
|
57
|
-
onError:
|
|
58
|
-
|
|
59
|
-
|
|
58
|
+
onError: _ref2 => {
|
|
59
|
+
let {
|
|
60
|
+
message
|
|
61
|
+
} = _ref2;
|
|
60
62
|
setError(message);
|
|
61
63
|
setSubmitting(false);
|
|
62
64
|
}
|
|
@@ -15,13 +15,14 @@ var _License_node;
|
|
|
15
15
|
|
|
16
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
17
|
|
|
18
|
-
const LicenseBase =
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
18
|
+
const LicenseBase = _ref => {
|
|
19
|
+
let {
|
|
20
|
+
node,
|
|
21
|
+
selected,
|
|
22
|
+
onSelectLicense,
|
|
23
|
+
selectedLicenseOptions,
|
|
24
|
+
onSelectLicenseOption
|
|
25
|
+
} = _ref;
|
|
25
26
|
if (!node) return null;
|
|
26
27
|
const selectedOptions = selectedLicenseOptions.find(spec => spec.licenseId === node.id);
|
|
27
28
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -117,10 +117,11 @@ class PrecartBase extends _react.default.Component {
|
|
|
117
117
|
|
|
118
118
|
this.selectedItemsArray = () => Object.keys(this.props.selectedSkuIds).filter(id => this.props.selectedSkuIds[id] === true);
|
|
119
119
|
|
|
120
|
-
this.licenseSelectionsArray = () => this.props.licenseOptions.reduce((res, {
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
120
|
+
this.licenseSelectionsArray = () => this.props.licenseOptions.reduce((res, _ref) => {
|
|
121
|
+
let {
|
|
122
|
+
licenseId,
|
|
123
|
+
licenseOptions
|
|
124
|
+
} = _ref;
|
|
124
125
|
const licenseVariableIds = Object.keys(licenseOptions);
|
|
125
126
|
|
|
126
127
|
if (licenseVariableIds.length > 0) {
|
|
@@ -325,9 +326,12 @@ class PrecartBase extends _react.default.Component {
|
|
|
325
326
|
key: license.id
|
|
326
327
|
}, /*#__PURE__*/_react.default.createElement(_License.default, {
|
|
327
328
|
node: license,
|
|
328
|
-
selected: this.props.licenseOptions.some(
|
|
329
|
-
|
|
330
|
-
|
|
329
|
+
selected: this.props.licenseOptions.some(_ref2 => {
|
|
330
|
+
let {
|
|
331
|
+
licenseId
|
|
332
|
+
} = _ref2;
|
|
333
|
+
return licenseId === license.id;
|
|
334
|
+
}),
|
|
331
335
|
onSelectLicense: this.onSelectLicense,
|
|
332
336
|
selectedLicenseOptions: this.props.licenseOptions,
|
|
333
337
|
onSelectLicenseOption: this.onSelectLicenseOption
|
|
@@ -355,10 +359,11 @@ const PrecartQueryRenderer = rest => {
|
|
|
355
359
|
selectedSkuIds: Object.keys(rest.selectedSkuIds).filter(id => rest.selectedSkuIds[id] === true),
|
|
356
360
|
collectionId: rest.collectionId
|
|
357
361
|
},
|
|
358
|
-
render:
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
+
render: _ref3 => {
|
|
363
|
+
let {
|
|
364
|
+
error,
|
|
365
|
+
props
|
|
366
|
+
} = _ref3;
|
|
362
367
|
if (error) return /*#__PURE__*/_react.default.createElement("div", null, error.message);
|
|
363
368
|
return /*#__PURE__*/_react.default.createElement(_reactStaticContainer.default, {
|
|
364
369
|
shouldUpdate: props
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.default = exports.
|
|
6
|
+
exports.default = exports.PriceFormat = exports.Price = void 0;
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
@@ -46,12 +46,13 @@ const formatMoney = (priceInCents, format, currency) => {
|
|
|
46
46
|
}
|
|
47
47
|
};
|
|
48
48
|
|
|
49
|
-
const calculateAmount =
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
49
|
+
const calculateAmount = _ref => {
|
|
50
|
+
let {
|
|
51
|
+
amount,
|
|
52
|
+
invert,
|
|
53
|
+
subtractFrom,
|
|
54
|
+
multiplier
|
|
55
|
+
} = _ref;
|
|
55
56
|
let subtracted = amount;
|
|
56
57
|
|
|
57
58
|
if (subtractFrom) {
|
|
@@ -65,29 +66,35 @@ const calculateAmount = ({
|
|
|
65
66
|
return subtracted * multiplier;
|
|
66
67
|
};
|
|
67
68
|
|
|
68
|
-
const Price =
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
69
|
+
const Price = _ref2 => {
|
|
70
|
+
let {
|
|
71
|
+
price,
|
|
72
|
+
format = PriceFormat.Default,
|
|
73
|
+
invert = false,
|
|
74
|
+
// multiply by -1
|
|
75
|
+
subtractFrom,
|
|
76
|
+
// amount to subtract from
|
|
77
|
+
multiplier = 1,
|
|
78
|
+
// multiply the result amount?
|
|
79
|
+
...rest
|
|
80
|
+
} = _ref2;
|
|
81
|
+
return /*#__PURE__*/_react.default.createElement("span", rest, price ? formatMoney(calculateAmount({
|
|
82
|
+
amount: price.amount,
|
|
83
|
+
subtractFrom: subtractFrom === null || subtractFrom === void 0 ? void 0 : subtractFrom.amount,
|
|
84
|
+
invert,
|
|
85
|
+
multiplier
|
|
86
|
+
}), format, price.currency) : '–');
|
|
87
|
+
};
|
|
84
88
|
|
|
85
89
|
exports.Price = Price;
|
|
86
90
|
|
|
87
|
-
const RelayPrice =
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
+
const RelayPrice = _ref3 => {
|
|
92
|
+
let {
|
|
93
|
+
relay,
|
|
94
|
+
...rest
|
|
95
|
+
} = _ref3;
|
|
96
|
+
return /*#__PURE__*/_react.default.createElement(Price, rest);
|
|
97
|
+
};
|
|
91
98
|
|
|
92
99
|
var _default = (0, _reactRelay.createFragmentContainer)(RelayPrice, {
|
|
93
100
|
price: _Price_price !== void 0 ? _Price_price : (_Price_price = require("../../__generated__/Price_price.graphql"), _Price_price.hash && _Price_price.hash !== "7d3425945fe5f6df382005630e30ce86" && console.error("The definition of 'Price_price' appears to have changed. Run `relay-compiler` to update the generated files to receive the expected data."), _Price_price)
|
|
@@ -28,8 +28,8 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
28
28
|
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; }
|
|
29
29
|
|
|
30
30
|
class PriceBarSection extends _react.default.Component {
|
|
31
|
-
constructor(
|
|
32
|
-
super(...
|
|
31
|
+
constructor() {
|
|
32
|
+
super(...arguments);
|
|
33
33
|
|
|
34
34
|
_defineProperty(this, "componentWillReceiveProps", nextProps => {
|
|
35
35
|
const {
|
|
@@ -85,15 +85,18 @@ class PriceBarSection extends _react.default.Component {
|
|
|
85
85
|
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
-
const mapStateToProps = (state, {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
88
|
+
const mapStateToProps = (state, _ref) => {
|
|
89
|
+
let {
|
|
90
|
+
node
|
|
91
|
+
} = _ref;
|
|
92
|
+
return {
|
|
93
|
+
selected: node.sku && state.selectedSkuIds[node.sku.id] === true,
|
|
94
|
+
licenseOptionsSpecs: state.licenseOptions.map(spec => ({
|
|
95
|
+
licenseId: spec.licenseId,
|
|
96
|
+
licenseOptionIds: Object.values(spec.licenseOptions).filter(Boolean)
|
|
97
|
+
}))
|
|
98
|
+
};
|
|
99
|
+
};
|
|
97
100
|
|
|
98
101
|
const mapDispatchToProps = dispatch => ({
|
|
99
102
|
onSelectSkuId: (skuId, selected) => dispatch({
|
|
@@ -18,8 +18,8 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
18
18
|
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; }
|
|
19
19
|
|
|
20
20
|
class PriceBarBase extends _react.default.Component {
|
|
21
|
-
constructor(
|
|
22
|
-
super(...
|
|
21
|
+
constructor() {
|
|
22
|
+
super(...arguments);
|
|
23
23
|
|
|
24
24
|
_defineProperty(this, "state", {
|
|
25
25
|
visible: false
|
|
@@ -150,7 +150,10 @@ const Root = props => {
|
|
|
150
150
|
url: props.url,
|
|
151
151
|
config: props.config,
|
|
152
152
|
components: props.components
|
|
153
|
-
}, /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, Array.from(elements).map(
|
|
153
|
+
}, /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, Array.from(elements).map(_ref => {
|
|
154
|
+
let [el, key] = _ref;
|
|
155
|
+
return renderCustomElement(el, key);
|
|
156
|
+
})));
|
|
154
157
|
};
|
|
155
158
|
|
|
156
159
|
var _default = Root;
|
|
@@ -32,10 +32,11 @@ const populateProductState = (store, environment, id) => {
|
|
|
32
32
|
|
|
33
33
|
exports.populateProductState = populateProductState;
|
|
34
34
|
|
|
35
|
-
const allSkus = (collection
|
|
36
|
-
includeFontStyles = true) => {
|
|
35
|
+
const allSkus = function (collection) {
|
|
37
36
|
var _collection$fontStyle, _collection$fontStyle2;
|
|
38
37
|
|
|
38
|
+
let includeCollections = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
39
|
+
let includeFontStyles = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
39
40
|
let bundleSkus = [];
|
|
40
41
|
|
|
41
42
|
if ('bundles' in collection) {
|
|
@@ -37,12 +37,13 @@ const getSavingsMultiplier = (state, options) => {
|
|
|
37
37
|
return collectionWithSavings ? differences[collectionWithSavings] / baseSkuPrice : 1;
|
|
38
38
|
};
|
|
39
39
|
|
|
40
|
-
const SKUPrice =
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
40
|
+
const SKUPrice = _ref => {
|
|
41
|
+
let {
|
|
42
|
+
sku,
|
|
43
|
+
relay,
|
|
44
|
+
showCollectionSavings,
|
|
45
|
+
...rest
|
|
46
|
+
} = _ref;
|
|
46
47
|
const savingsMultiplier = (0, _reactRedux.useSelector)(state => getSavingsMultiplier(state, {
|
|
47
48
|
showCollectionSavings,
|
|
48
49
|
sku
|
|
@@ -15,29 +15,36 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
|
|
|
15
15
|
|
|
16
16
|
const NBSP = '\xa0';
|
|
17
17
|
|
|
18
|
-
const Select =
|
|
19
|
-
options,
|
|
20
|
-
value,
|
|
21
|
-
...rest
|
|
22
|
-
}) => {
|
|
18
|
+
const Select = _ref => {
|
|
23
19
|
var _options$find;
|
|
24
20
|
|
|
21
|
+
let {
|
|
22
|
+
options,
|
|
23
|
+
value,
|
|
24
|
+
...rest
|
|
25
|
+
} = _ref;
|
|
25
26
|
return /*#__PURE__*/_react.default.createElement("label", {
|
|
26
27
|
className: "select"
|
|
27
28
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
28
29
|
className: "select__text"
|
|
29
|
-
}, /*#__PURE__*/_react.default.createElement(_Icons.DownArrow, null), NBSP, (_options$find = options.find(
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
}, /*#__PURE__*/_react.default.createElement(_Icons.DownArrow, null), NBSP, (_options$find = options.find(_ref2 => {
|
|
31
|
+
let {
|
|
32
|
+
value: v
|
|
33
|
+
} = _ref2;
|
|
34
|
+
return value === v;
|
|
35
|
+
})) === null || _options$find === void 0 ? void 0 : _options$find.text), /*#__PURE__*/_react.default.createElement("select", _extends({
|
|
32
36
|
value: value,
|
|
33
37
|
className: "select__select"
|
|
34
|
-
}, rest), options.map(
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
}, rest), options.map(_ref3 => {
|
|
39
|
+
let {
|
|
40
|
+
value,
|
|
41
|
+
text
|
|
42
|
+
} = _ref3;
|
|
43
|
+
return /*#__PURE__*/_react.default.createElement("option", {
|
|
44
|
+
value: value,
|
|
45
|
+
key: value
|
|
46
|
+
}, text);
|
|
47
|
+
})));
|
|
41
48
|
};
|
|
42
49
|
|
|
43
50
|
var _default = Select;
|
|
@@ -29,15 +29,16 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
29
29
|
|
|
30
30
|
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); }
|
|
31
31
|
|
|
32
|
-
const DefaultSelectButton =
|
|
33
|
-
productId,
|
|
34
|
-
innerProps: {
|
|
35
|
-
onClick,
|
|
36
|
-
...rest
|
|
37
|
-
}
|
|
38
|
-
}) => {
|
|
32
|
+
const DefaultSelectButton = _ref => {
|
|
39
33
|
var _config$selectButtonL;
|
|
40
34
|
|
|
35
|
+
let {
|
|
36
|
+
productId,
|
|
37
|
+
innerProps: {
|
|
38
|
+
onClick,
|
|
39
|
+
...rest
|
|
40
|
+
}
|
|
41
|
+
} = _ref;
|
|
41
42
|
const dispatch = (0, _reactRedux.useDispatch)();
|
|
42
43
|
const {
|
|
43
44
|
typeTester: config
|
|
@@ -63,12 +64,13 @@ const DefaultSelectButton = ({
|
|
|
63
64
|
}), (_config$selectButtonL = config === null || config === void 0 ? void 0 : config.selectButtonLabel) !== null && _config$selectButtonL !== void 0 ? _config$selectButtonL : 'Select');
|
|
64
65
|
};
|
|
65
66
|
|
|
66
|
-
const SelectButton =
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
67
|
+
const SelectButton = _ref2 => {
|
|
68
|
+
let {
|
|
69
|
+
relay,
|
|
70
|
+
productId,
|
|
71
|
+
sku,
|
|
72
|
+
...rest
|
|
73
|
+
} = _ref2;
|
|
72
74
|
const dispatch = (0, _reactRedux.useDispatch)();
|
|
73
75
|
const components = (0, _react.useContext)(_ComponentsContext.default);
|
|
74
76
|
const ButtonComponent = components.SelectButton || DefaultSelectButton;
|
|
@@ -21,30 +21,33 @@ const Input = props => /*#__PURE__*/_react.default.createElement(_reactSelect.co
|
|
|
21
21
|
autoComplete: "go-away"
|
|
22
22
|
}));
|
|
23
23
|
|
|
24
|
-
const SelectField =
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}, errors
|
|
24
|
+
const SelectField = _ref => {
|
|
25
|
+
let {
|
|
26
|
+
label,
|
|
27
|
+
value,
|
|
28
|
+
onChange,
|
|
29
|
+
options,
|
|
30
|
+
errors
|
|
31
|
+
} = _ref;
|
|
32
|
+
return /*#__PURE__*/_react.default.createElement("label", null, label, /*#__PURE__*/_react.default.createElement(_reactSelect.default, {
|
|
33
|
+
value: options.find(option => option.value === value) || null,
|
|
34
|
+
options: options,
|
|
35
|
+
onChange: option => onChange(option.value),
|
|
36
|
+
className: "react-select",
|
|
37
|
+
classNamePrefix: "react-select",
|
|
38
|
+
components: {
|
|
39
|
+
Input
|
|
40
|
+
},
|
|
41
|
+
filterOption: (0, _reactSelect.createFilter)({
|
|
42
|
+
ignoreCase: true,
|
|
43
|
+
ignoreAccents: true,
|
|
44
|
+
trim: true,
|
|
45
|
+
matchFrom: 'start'
|
|
46
|
+
})
|
|
47
|
+
}), errors && errors.length > 0 && /*#__PURE__*/_react.default.createElement("p", {
|
|
48
|
+
className: "react-select__errors"
|
|
49
|
+
}, errors[0]));
|
|
50
|
+
};
|
|
48
51
|
|
|
49
52
|
var _default = SelectField;
|
|
50
53
|
exports.default = _default;
|
|
@@ -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 SpecimenLinkBase =
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
const SpecimenLinkBase = _ref => {
|
|
21
|
+
let {
|
|
22
|
+
node
|
|
23
|
+
} = _ref;
|
|
23
24
|
const {
|
|
24
25
|
pdfs
|
|
25
26
|
} = node;
|
|
@@ -44,10 +45,11 @@ const SpecimenLink = (0, _reactRelay.createFragmentContainer)(SpecimenLinkBase,
|
|
|
44
45
|
node: _SpecimenLink_node !== void 0 ? _SpecimenLink_node : (_SpecimenLink_node = require("../../__generated__/SpecimenLink_node.graphql"), _SpecimenLink_node.hash && _SpecimenLink_node.hash !== "6f268528e8fccf3c43b7448884da2c6f" && console.error("The definition of 'SpecimenLink_node' appears to have changed. Run `relay-compiler` to update the generated files to receive the expected data."), _SpecimenLink_node)
|
|
45
46
|
});
|
|
46
47
|
|
|
47
|
-
const SpecimenLinkQueryRenderer =
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
48
|
+
const SpecimenLinkQueryRenderer = _ref2 => {
|
|
49
|
+
let {
|
|
50
|
+
collectionId,
|
|
51
|
+
...rest
|
|
52
|
+
} = _ref2;
|
|
51
53
|
const environment = (0, _reactRelay.useRelayEnvironment)();
|
|
52
54
|
return /*#__PURE__*/_react.default.createElement(_reactRelay.QueryRenderer, {
|
|
53
55
|
environment: environment,
|
|
@@ -55,10 +57,11 @@ const SpecimenLinkQueryRenderer = ({
|
|
|
55
57
|
variables: {
|
|
56
58
|
collectionId
|
|
57
59
|
},
|
|
58
|
-
render:
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
60
|
+
render: _ref3 => {
|
|
61
|
+
let {
|
|
62
|
+
error,
|
|
63
|
+
props
|
|
64
|
+
} = _ref3;
|
|
62
65
|
if (error) return /*#__PURE__*/_react.default.createElement("div", null, error.message);
|
|
63
66
|
|
|
64
67
|
if (props) {
|
|
@@ -13,17 +13,20 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
13
13
|
|
|
14
14
|
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; }
|
|
15
15
|
|
|
16
|
-
const NavItem =
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
"
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
16
|
+
const NavItem = _ref => {
|
|
17
|
+
let {
|
|
18
|
+
label,
|
|
19
|
+
link,
|
|
20
|
+
text
|
|
21
|
+
} = _ref;
|
|
22
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
23
|
+
className: "sticky-nav__item",
|
|
24
|
+
"data-label": label
|
|
25
|
+
}, /*#__PURE__*/_react.default.createElement("a", {
|
|
26
|
+
className: "sticky-nav__link",
|
|
27
|
+
href: link
|
|
28
|
+
}, text));
|
|
29
|
+
};
|
|
27
30
|
|
|
28
31
|
const CartNavItem = () => /*#__PURE__*/_react.default.createElement("div", {
|
|
29
32
|
className: "sticky-nav__item",
|
|
@@ -31,8 +34,8 @@ const CartNavItem = () => /*#__PURE__*/_react.default.createElement("div", {
|
|
|
31
34
|
}, /*#__PURE__*/_react.default.createElement(_CartButton.default, null));
|
|
32
35
|
|
|
33
36
|
class StickyNav extends _react.default.Component {
|
|
34
|
-
constructor(
|
|
35
|
-
super(...
|
|
37
|
+
constructor() {
|
|
38
|
+
super(...arguments);
|
|
36
39
|
|
|
37
40
|
_defineProperty(this, "state", {
|
|
38
41
|
visible: false
|
|
@@ -29,12 +29,13 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
|
|
|
29
29
|
|
|
30
30
|
const THIN_SPACE = '\u2009';
|
|
31
31
|
|
|
32
|
-
const StoreModalBundleButton =
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
32
|
+
const StoreModalBundleButton = _ref => {
|
|
33
|
+
let {
|
|
34
|
+
bundle,
|
|
35
|
+
onSelectSku,
|
|
36
|
+
relay,
|
|
37
|
+
...rest
|
|
38
|
+
} = _ref;
|
|
38
39
|
if (!bundle.sku || !bundle.fontStyles) return null;
|
|
39
40
|
const selected = (0, _reactRedux.useSelector)((0, _reducer.isSelected)(bundle.sku.id));
|
|
40
41
|
|
|
@@ -35,11 +35,12 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
35
35
|
|
|
36
36
|
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; }
|
|
37
37
|
|
|
38
|
-
const StoreModalCart =
|
|
39
|
-
prepared
|
|
40
|
-
}) => {
|
|
38
|
+
const StoreModalCart = _ref => {
|
|
41
39
|
var _order$stripePaymentM, _order$orderItems$len, _order$orderItems;
|
|
42
40
|
|
|
41
|
+
let {
|
|
42
|
+
prepared
|
|
43
|
+
} = _ref;
|
|
43
44
|
const data = (0, _reactRelay.usePreloadedQuery)(_StoreModalCartQuery !== void 0 ? _StoreModalCartQuery : (_StoreModalCartQuery = require("../../__generated__/StoreModalCartQuery.graphql"), _StoreModalCartQuery.hash && _StoreModalCartQuery.hash !== "a76f4be622be27352ef69f7285573ef9" && console.error("The definition of 'StoreModalCartQuery' appears to have changed. Run `relay-compiler` to update the generated files to receive the expected data."), _StoreModalCartQuery), prepared.cartQuery);
|
|
44
45
|
const dispatch = (0, _reactRedux.useDispatch)();
|
|
45
46
|
const order = data.viewer.currentOrder;
|
|
@@ -50,13 +51,14 @@ const StoreModalCart = ({
|
|
|
50
51
|
title: /*#__PURE__*/_react.default.createElement(_react.Fragment, null, "Your cart", !orderHasItems && ' is empty'),
|
|
51
52
|
body: order && orderHasItems ? /*#__PURE__*/_react.default.createElement(_CartState.default, {
|
|
52
53
|
order: order
|
|
53
|
-
},
|
|
54
|
-
onUpdateOrder,
|
|
55
|
-
onSubmitCoupon,
|
|
56
|
-
onRemoveDiscount
|
|
57
|
-
}) => {
|
|
54
|
+
}, _ref2 => {
|
|
58
55
|
var _order$orderItems2;
|
|
59
56
|
|
|
57
|
+
let {
|
|
58
|
+
onUpdateOrder,
|
|
59
|
+
onSubmitCoupon,
|
|
60
|
+
onRemoveDiscount
|
|
61
|
+
} = _ref2;
|
|
60
62
|
return /*#__PURE__*/_react.default.createElement(_StoreModalCartLayout.default, {
|
|
61
63
|
onClickCheckoutButton: () => dispatch({
|
|
62
64
|
type: 'STORE_MODAL_NAVIGATE',
|
|
@@ -29,12 +29,13 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
29
29
|
|
|
30
30
|
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; }
|
|
31
31
|
|
|
32
|
-
const StoreModalCheckout =
|
|
33
|
-
prepared,
|
|
34
|
-
stripe
|
|
35
|
-
}) => {
|
|
32
|
+
const StoreModalCheckout = _ref => {
|
|
36
33
|
var _viewer$currentOrder, _viewer$currentOrder$, _config$form$checkbox, _config$form;
|
|
37
34
|
|
|
35
|
+
let {
|
|
36
|
+
prepared,
|
|
37
|
+
stripe
|
|
38
|
+
} = _ref;
|
|
38
39
|
const data = (0, _reactRelay.usePreloadedQuery)(_StoreModalCheckoutQuery !== void 0 ? _StoreModalCheckoutQuery : (_StoreModalCheckoutQuery = require("../../__generated__/StoreModalCheckoutQuery.graphql"), _StoreModalCheckoutQuery.hash && _StoreModalCheckoutQuery.hash !== "25edafb70407a579c912a9f078f65534" && console.error("The definition of 'StoreModalCheckoutQuery' appears to have changed. Run `relay-compiler` to update the generated files to receive the expected data."), _StoreModalCheckoutQuery), prepared.checkoutQuery);
|
|
39
40
|
const viewer = data.viewer;
|
|
40
41
|
const dispatch = (0, _reactRedux.useDispatch)();
|