fontdue-js 0.1.0 → 0.1.3

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.
Files changed (116) hide show
  1. package/dist/__generated__/TypeTesterStandalone_StyleQuery.graphql.d.ts +6 -0
  2. package/dist/__generated__/TypeTesterStandalone_StyleQuery.graphql.js +32 -4
  3. package/dist/__generated__/TypeTestersIDQuery.graphql.js +103 -57
  4. package/dist/__generated__/TypeTestersSlugQuery.graphql.js +103 -57
  5. package/dist/__generated__/TypeTesters_collection.graphql.d.ts +3 -0
  6. package/dist/__generated__/TypeTesters_collection.graphql.js +20 -6
  7. package/dist/components/AddToCartBanner/index.js +6 -4
  8. package/dist/components/BuyButton/index.js +21 -17
  9. package/dist/components/BuyingOptions/index.js +10 -7
  10. package/dist/components/Cart/AddressFields.js +10 -7
  11. package/dist/components/Cart/CartItem/index.js +71 -53
  12. package/dist/components/Cart/CartOrder.js +18 -14
  13. package/dist/components/Cart/CartState.js +16 -13
  14. package/dist/components/Cart/CartTotals.js +65 -59
  15. package/dist/components/Cart/Checkout.js +30 -23
  16. package/dist/components/Cart/CustomerFields.d.ts +14 -0
  17. package/dist/components/Cart/CustomerFields.js +11 -11
  18. package/dist/components/Cart/Download.js +11 -9
  19. package/dist/components/Cart/EmptyCart.js +5 -4
  20. package/dist/components/Cart/IdentityBox.js +27 -24
  21. package/dist/components/Cart/index.js +23 -17
  22. package/dist/components/CartButton/index.js +12 -9
  23. package/dist/components/CharacterViewer/index.js +65 -54
  24. package/dist/components/Checkbox/index.js +4 -5
  25. package/dist/components/CollectionAa/index.js +15 -11
  26. package/dist/components/ConfigContext.d.ts +78 -1
  27. package/dist/components/ConfigContext.js +52 -2
  28. package/dist/components/CookieNotification/index.js +46 -38
  29. package/dist/components/CouponText/index.js +6 -4
  30. package/dist/components/Family/FamilyList.js +23 -20
  31. package/dist/components/Family/index.js +11 -8
  32. package/dist/components/FontFamilies/index.js +15 -12
  33. package/dist/components/FontStyle/index.js +10 -9
  34. package/dist/components/FontdueProvider/index.js +9 -8
  35. package/dist/components/NewsletterSignup/index.js +12 -10
  36. package/dist/components/Precart/License.js +8 -7
  37. package/dist/components/Precart/index.js +16 -11
  38. package/dist/components/Price/index.js +34 -27
  39. package/dist/components/PriceBar/PriceBarSection.js +14 -11
  40. package/dist/components/PriceBar/index.js +2 -2
  41. package/dist/components/Root/index.js +4 -1
  42. package/dist/components/Root/productState.js +3 -2
  43. package/dist/components/SKUPrice/index.js +7 -6
  44. package/dist/components/Select/index.js +22 -15
  45. package/dist/components/SelectButton/index.js +16 -16
  46. package/dist/components/SelectField/index.js +27 -24
  47. package/dist/components/SpecimenLink/index.js +14 -11
  48. package/dist/components/StickyNav/index.js +16 -13
  49. package/dist/components/StoreModal/StoreModalBundleButton.js +7 -6
  50. package/dist/components/StoreModal/StoreModalCart.js +10 -8
  51. package/dist/components/StoreModal/StoreModalCheckout.js +5 -4
  52. package/dist/components/StoreModal/StoreModalContainer.js +4 -3
  53. package/dist/components/StoreModal/StoreModalDownload.js +5 -4
  54. package/dist/components/StoreModal/StoreModalFamily.js +5 -4
  55. package/dist/components/StoreModal/StoreModalFamilyButton.js +7 -6
  56. package/dist/components/StoreModal/StoreModalIndex.js +11 -9
  57. package/dist/components/StoreModal/StoreModalLoader.js +4 -3
  58. package/dist/components/StoreModal/StoreModalProduct.js +4 -3
  59. package/dist/components/StoreModal/StoreModalReview.js +11 -9
  60. package/dist/components/StoreModal/StoreModalReviewIdentity.js +6 -3
  61. package/dist/components/StoreModal/StoreModalStyleButton.js +7 -6
  62. package/dist/components/StoreModalProductLicenseSelection/ContainerElement.js +15 -12
  63. package/dist/components/StoreModalProductLicenseSelection/LicenseElement.js +13 -13
  64. package/dist/components/StoreModalProductLicenseSelection/LicenseVariableElement.js +31 -25
  65. package/dist/components/StoreModalProductLicenseSelection/LicenseVariableRadioElement.js +13 -10
  66. package/dist/components/StoreModalProductLicenseSelection/StoreModalProductLicense.js +22 -13
  67. package/dist/components/StoreModalProductLicenseSelection/index.js +12 -9
  68. package/dist/components/StoreModalProductSummary/index.js +10 -8
  69. package/dist/components/StripeProvider/index.js +5 -4
  70. package/dist/components/Stylesheet/index.js +4 -3
  71. package/dist/components/TestFontsForm/index.js +32 -25
  72. package/dist/components/TestModeBanner/index.js +9 -7
  73. package/dist/components/TextField/index.js +32 -29
  74. package/dist/components/ThemeConfig/index.js +9 -7
  75. package/dist/components/TypeTester/TypeTesterAlignButtons.js +5 -4
  76. package/dist/components/TypeTester/TypeTesterBullet.js +5 -4
  77. package/dist/components/TypeTester/TypeTesterContent.js +9 -8
  78. package/dist/components/TypeTester/TypeTesterContext.js +6 -5
  79. package/dist/components/TypeTester/TypeTesterEditAll.d.ts +0 -2
  80. package/dist/components/TypeTester/TypeTesterEditAll.js +6 -3
  81. package/dist/components/TypeTester/TypeTesterFeatures.d.ts +0 -2
  82. package/dist/components/TypeTester/TypeTesterFeatures.js +25 -14
  83. package/dist/components/TypeTester/TypeTesterFeaturesButton.js +18 -15
  84. package/dist/components/TypeTester/TypeTesterFitter.js +5 -4
  85. package/dist/components/TypeTester/TypeTesterFloatingToolbar.js +10 -11
  86. package/dist/components/TypeTester/TypeTesterInput.js +7 -6
  87. package/dist/components/TypeTester/TypeTesterSlider.js +15 -11
  88. package/dist/components/TypeTester/TypeTesterStandalone.js +21 -19
  89. package/dist/components/TypeTester/TypeTesterState.js +5 -6
  90. package/dist/components/TypeTester/TypeTesterStyleSelect.js +39 -28
  91. package/dist/components/TypeTester/TypeTesterStyleSelectData.js +7 -6
  92. package/dist/components/TypeTester/TypeTesterToolbar.d.ts +0 -2
  93. package/dist/components/TypeTester/TypeTesterToolbar.js +18 -15
  94. package/dist/components/TypeTester/index.d.ts +2 -1
  95. package/dist/components/TypeTester/index.js +48 -55
  96. package/dist/components/TypeTester/useTypeTesterStyler.js +21 -19
  97. package/dist/components/TypeTesters/index.js +48 -45
  98. package/dist/components/VariableTableAmounts/index.js +5 -4
  99. package/dist/components/elements/Button/index.js +11 -8
  100. package/dist/components/elements/StoreModalCartLayout/index.js +29 -26
  101. package/dist/components/elements/StoreModalContainer/index.js +14 -13
  102. package/dist/components/elements/StoreModalDownloadLayout/index.js +17 -14
  103. package/dist/components/elements/StoreModalFamily/index.js +22 -19
  104. package/dist/components/elements/StoreModalFamilyButton/index.js +12 -11
  105. package/dist/components/elements/StoreModalIndexItem/index.js +9 -8
  106. package/dist/components/elements/StoreModalPageContainer/index.js +18 -15
  107. package/dist/components/elements/StoreModalReviewConfirm/index.js +13 -13
  108. package/dist/components/elements/StoreModalReviewItem/index.js +11 -8
  109. package/dist/components/elements/StoreModalReviewLayout/index.js +50 -47
  110. package/dist/components/elements/StoreModalStyleButton/index.js +10 -9
  111. package/dist/components/useFontStyle.js +6 -5
  112. package/dist/utils.js +3 -2
  113. package/dist/vanilla/FontStyle.js +10 -8
  114. package/fontdue.css +10 -0
  115. package/fontdue.css.map +1 -1
  116. package/package.json +1 -1
@@ -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
- onDismiss,
24
- open,
25
- siteTitle
26
- }) => /*#__PURE__*/_react.default.createElement("div", {
27
- className: "cookie-notification",
28
- "data-open": open
29
- }, /*#__PURE__*/_react.default.createElement("div", {
30
- className: "cookie-notification__container"
31
- }, /*#__PURE__*/_react.default.createElement("div", {
32
- className: "cookie-notification__text-container"
33
- }, /*#__PURE__*/_react.default.createElement("p", {
34
- className: "cookie-notification__label"
35
- }, siteTitle, " website uses cookies"), /*#__PURE__*/_react.default.createElement("p", {
36
- className: "cookie-notification__text"
37
- }, "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", {
38
- href: "/privacy-policy"
39
- }, "privacy policy"), ".")), /*#__PURE__*/_react.default.createElement("div", {
40
- className: "cookie-notification__button-container"
41
- }, /*#__PURE__*/_react.default.createElement("button", {
42
- type: "button",
43
- className: "cookie-notification__button",
44
- onClick: onDismiss
45
- }, "Got it"))));
46
-
47
- const GetComponent = ({
48
- name,
49
- fallback,
50
- children
51
- }) => /*#__PURE__*/_react.default.createElement(_ComponentsContext.default.Consumer, null, components => {
52
- const Component = components[name] || fallback;
53
- return children(Component);
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
- coupon,
22
- subtract = 0
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
- node,
33
- text,
34
- includeTranslations
35
- }) => /*#__PURE__*/_react.default.createElement("ul", {
36
- className: "font-family-block__list",
37
- style: {
38
- fontFamily: node.name
39
- }
40
- }, node.fontStyles.map((style, i) => includeTranslations ? translatedLangs.filter(supportsLang(style.supportedLanguages)).map(lang => /*#__PURE__*/_react.default.createElement(_FontStyle.default, {
41
- fontStyle: style,
42
- Component: "li",
43
- key: i + lang,
44
- className: "font-family-block__list__item"
45
- }, /*#__PURE__*/_react.default.createElement("span", null, translateStyle(text || style.name, lang), " "))) : /*#__PURE__*/_react.default.createElement(_FontStyle.default, {
46
- fontStyle: style,
47
- Component: "li",
48
- key: i,
49
- className: "font-family-block__list__item"
50
- }, /*#__PURE__*/_react.default.createElement("span", null, text || style.name, " "))));
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(...args) {
34
- super(...args);
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
- node
111
- }) => ({
112
- precartOpen: state.precartOpen,
113
- selected: node.sku && (0, _reducer.isSelected)(node.sku.id)(state)
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
- collectionId,
56
- ...rest
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
- error,
74
- props
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
- Component = 'div',
20
- fontStyle,
21
- style,
22
- children,
23
- relay,
24
- // eslint-disable-line
25
- ...rest
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
@@ -13,7 +13,7 @@ var _reactRedux = require("react-redux");
13
13
 
14
14
  var _Stylesheet = require("../Stylesheet");
15
15
 
16
- var _ConfigContext = _interopRequireDefault(require("../ConfigContext"));
16
+ var _ConfigContext = _interopRequireWildcard(require("../ConfigContext"));
17
17
 
18
18
  var _ComponentsContext = _interopRequireDefault(require("../ComponentsContext"));
19
19
 
@@ -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
- children,
36
- url,
37
- config,
38
- components
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
  }));
@@ -45,7 +46,7 @@ const FontdueProvider = ({
45
46
  }, /*#__PURE__*/_react.default.createElement(_reactRedux.Provider, {
46
47
  store: _reducer.store
47
48
  }, /*#__PURE__*/_react.default.createElement(_Stylesheet.StylesheetContainer, null), /*#__PURE__*/_react.default.createElement(_ThemeConfig.default, null), /*#__PURE__*/_react.default.createElement(_ConfigContext.default.Provider, {
48
- value: config !== null && config !== void 0 ? config : {}
49
+ value: (0, _ConfigContext.makeConfig)(config)
49
50
  }, /*#__PURE__*/_react.default.createElement(_ComponentsContext.default.Provider, {
50
51
  value: components !== null && components !== void 0 ? components : {}
51
52
  }, /*#__PURE__*/_react.default.createElement(_TestModeBanner.default, null), children))));
@@ -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
- optInLabel,
28
- buttonLabel = 'Subscribe',
29
- optInCheckboxChecked = false,
30
- title,
31
- intro
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
- message
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
- node,
20
- selected,
21
- onSelectLicense,
22
- selectedLicenseOptions,
23
- onSelectLicenseOption
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
- licenseId,
122
- licenseOptions
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
- licenseId
330
- }) => licenseId === license.id),
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
- error,
360
- props
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.Price = exports.PriceFormat = void 0;
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
- amount,
51
- invert,
52
- subtractFrom,
53
- multiplier
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
- price,
70
- format = PriceFormat.Default,
71
- invert = false,
72
- // multiply by -1
73
- subtractFrom,
74
- // amount to subtract from
75
- multiplier = 1,
76
- // multiply the result amount?
77
- ...rest
78
- }) => /*#__PURE__*/_react.default.createElement("span", rest, price ? formatMoney(calculateAmount({
79
- amount: price.amount,
80
- subtractFrom: subtractFrom === null || subtractFrom === void 0 ? void 0 : subtractFrom.amount,
81
- invert,
82
- multiplier
83
- }), format, price.currency) : '–');
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
- relay,
89
- ...rest
90
- }) => /*#__PURE__*/_react.default.createElement(Price, rest);
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(...args) {
32
- super(...args);
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
- node
90
- }) => ({
91
- selected: node.sku && state.selectedSkuIds[node.sku.id] === true,
92
- licenseOptionsSpecs: state.licenseOptions.map(spec => ({
93
- licenseId: spec.licenseId,
94
- licenseOptionIds: Object.values(spec.licenseOptions).filter(Boolean)
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(...args) {
22
- super(...args);
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(([el, key]) => renderCustomElement(el, key))));
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, includeCollections = true, // include collection skus as well as bundle skus
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
- sku,
42
- relay,
43
- showCollectionSavings,
44
- ...rest
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