fontdue-js 2.4.0 → 2.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -0
- package/dist/__generated__/FamilyList_node.graphql.d.ts +8 -1
- package/dist/__generated__/FamilyList_node.graphql.js +32 -2
- package/dist/__generated__/Family_node.graphql.d.ts +10 -1
- package/dist/__generated__/Family_node.graphql.js +46 -10
- package/dist/__generated__/FontFamiliesQuery.graphql.d.ts +1 -1
- package/dist/__generated__/FontFamiliesQuery.graphql.js +95 -35
- package/dist/__generated__/License_node.graphql.d.ts +2 -1
- package/dist/__generated__/License_node.graphql.js +13 -3
- package/dist/__generated__/PrecartQuery.graphql.d.ts +1 -1
- package/dist/__generated__/PrecartQuery.graphql.js +14 -4
- package/dist/__generated__/StoreModalContainerQuery.graphql.d.ts +15 -3
- package/dist/__generated__/StoreModalContainerQuery.graphql.js +98 -23
- package/dist/__generated__/StoreModalProductLicense_license.graphql.d.ts +2 -1
- package/dist/__generated__/StoreModalProductLicense_license.graphql.js +12 -2
- package/dist/__generated__/StoreModalProductQuery.graphql.d.ts +1 -1
- package/dist/__generated__/StoreModalProductQuery.graphql.js +13 -3
- package/dist/components/Family/FamilyList.js +27 -7
- package/dist/components/Family/index.js +18 -3
- package/dist/components/NewsletterSignup/index.d.ts +2 -4
- package/dist/components/NewsletterSignup/index.js +4 -3
- package/dist/components/NewsletterSignup/index.server.js +2 -2
- package/dist/components/Precart/License.js +9 -2
- package/dist/components/Precart/index.js +2 -2
- package/dist/components/SKUPrice/index.js +4 -1
- package/dist/components/StoreModal/StoreModalContainer.js +17 -3
- package/dist/components/StoreModal/StoreModalFamily.d.ts +2 -1
- package/dist/components/StoreModal/StoreModalFamily.js +3 -1
- package/dist/components/StoreModal/StoreModalProduct.js +1 -0
- package/dist/components/StoreModalProductLicenseSelection/LicenseElement.d.ts +1 -0
- package/dist/components/StoreModalProductLicenseSelection/LicenseElement.js +10 -2
- package/dist/components/StoreModalProductLicenseSelection/StoreModalProductLicense.js +2 -1
- package/dist/components/StoreModalProductSummary/index.js +1 -1
- package/dist/components/TypeTester/TypeTesterStyleSelectData.js +3 -2
- package/dist/components/elements/StoreModalContainer/index.d.ts +8 -2
- package/dist/components/elements/StoreModalContainer/index.js +9 -6
- package/dist/components/elements/StoreModalFamily/index.d.ts +1 -0
- package/dist/components/elements/StoreModalFamily/index.js +5 -2
- package/dist/fontdue.css +20 -3
- package/package.json +1 -1
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
/**
|
|
8
|
-
* @generated SignedSource<<
|
|
8
|
+
* @generated SignedSource<<602548031710d0196136676f735a8272>>
|
|
9
9
|
* @lightSyntaxTransform
|
|
10
10
|
* @nogrep
|
|
11
11
|
*/
|
|
@@ -36,25 +36,47 @@ const node = function () {
|
|
|
36
36
|
v2 = {
|
|
37
37
|
"alias": null,
|
|
38
38
|
"args": null,
|
|
39
|
-
"
|
|
39
|
+
"kind": "ScalarField",
|
|
40
|
+
"name": "name",
|
|
41
|
+
"storageKey": null
|
|
42
|
+
},
|
|
43
|
+
v3 = {
|
|
44
|
+
"alias": null,
|
|
45
|
+
"args": null,
|
|
46
|
+
"kind": "ScalarField",
|
|
47
|
+
"name": "cssFamily",
|
|
48
|
+
"storageKey": null
|
|
49
|
+
},
|
|
50
|
+
v4 = {
|
|
51
|
+
"alias": null,
|
|
52
|
+
"args": null,
|
|
53
|
+
"kind": "ScalarField",
|
|
54
|
+
"name": "cssUrl",
|
|
55
|
+
"storageKey": null
|
|
56
|
+
},
|
|
57
|
+
v5 = [v2 /*: any*/, v3 /*: any*/, {
|
|
58
|
+
"alias": null,
|
|
59
|
+
"args": null,
|
|
60
|
+
"concreteType": "FontCollection",
|
|
40
61
|
"kind": "LinkedField",
|
|
41
|
-
"name": "
|
|
62
|
+
"name": "family",
|
|
42
63
|
"plural": false,
|
|
43
|
-
"selections": [
|
|
44
|
-
|
|
45
|
-
"args": null,
|
|
46
|
-
"kind": "ScalarField",
|
|
47
|
-
"name": "uiFontUrl",
|
|
48
|
-
"storageKey": null
|
|
49
|
-
}, {
|
|
50
|
-
"alias": null,
|
|
51
|
-
"args": null,
|
|
52
|
-
"kind": "ScalarField",
|
|
53
|
-
"name": "uiFontName",
|
|
54
|
-
"storageKey": null
|
|
55
|
-
}],
|
|
64
|
+
"selections": [v4 /*: any*/],
|
|
65
|
+
|
|
56
66
|
"storageKey": null
|
|
57
|
-
}
|
|
67
|
+
}],
|
|
68
|
+
v6 = [v2 /*: any*/, v3 /*: any*/, {
|
|
69
|
+
"alias": null,
|
|
70
|
+
"args": null,
|
|
71
|
+
"concreteType": "FontCollection",
|
|
72
|
+
"kind": "LinkedField",
|
|
73
|
+
"name": "family",
|
|
74
|
+
"plural": false,
|
|
75
|
+
"selections": [v4 /*: any*/, v0 /*: any*/],
|
|
76
|
+
|
|
77
|
+
"storageKey": null
|
|
78
|
+
}, v0 /*: any*/];
|
|
79
|
+
|
|
58
80
|
return {
|
|
59
81
|
"fragment": {
|
|
60
82
|
"argumentDefinitions": [],
|
|
@@ -78,8 +100,34 @@ const node = function () {
|
|
|
78
100
|
"selections": [v1 /*: any*/],
|
|
79
101
|
|
|
80
102
|
"storageKey": null
|
|
81
|
-
},
|
|
82
|
-
|
|
103
|
+
}, {
|
|
104
|
+
"alias": null,
|
|
105
|
+
"args": null,
|
|
106
|
+
"concreteType": "Settings",
|
|
107
|
+
"kind": "LinkedField",
|
|
108
|
+
"name": "settings",
|
|
109
|
+
"plural": false,
|
|
110
|
+
"selections": [{
|
|
111
|
+
"alias": null,
|
|
112
|
+
"args": null,
|
|
113
|
+
"concreteType": "FontStyle",
|
|
114
|
+
"kind": "LinkedField",
|
|
115
|
+
"name": "uiFontStyle",
|
|
116
|
+
"plural": false,
|
|
117
|
+
"selections": v5 /*: any*/,
|
|
118
|
+
"storageKey": null
|
|
119
|
+
}, {
|
|
120
|
+
"alias": null,
|
|
121
|
+
"args": null,
|
|
122
|
+
"concreteType": "FontStyle",
|
|
123
|
+
"kind": "LinkedField",
|
|
124
|
+
"name": "uiFontStyleBold",
|
|
125
|
+
"plural": false,
|
|
126
|
+
"selections": v5 /*: any*/,
|
|
127
|
+
"storageKey": null
|
|
128
|
+
}],
|
|
129
|
+
"storageKey": null
|
|
130
|
+
}],
|
|
83
131
|
"storageKey": null
|
|
84
132
|
}],
|
|
85
133
|
"type": "RootQueryType",
|
|
@@ -107,21 +155,48 @@ const node = function () {
|
|
|
107
155
|
"selections": [v1 /*: any*/, v0 /*: any*/],
|
|
108
156
|
|
|
109
157
|
"storageKey": null
|
|
110
|
-
},
|
|
158
|
+
}, {
|
|
159
|
+
"alias": null,
|
|
160
|
+
"args": null,
|
|
161
|
+
"concreteType": "Settings",
|
|
162
|
+
"kind": "LinkedField",
|
|
163
|
+
"name": "settings",
|
|
164
|
+
"plural": false,
|
|
165
|
+
"selections": [{
|
|
166
|
+
"alias": null,
|
|
167
|
+
"args": null,
|
|
168
|
+
"concreteType": "FontStyle",
|
|
169
|
+
"kind": "LinkedField",
|
|
170
|
+
"name": "uiFontStyle",
|
|
171
|
+
"plural": false,
|
|
172
|
+
"selections": v6 /*: any*/,
|
|
173
|
+
"storageKey": null
|
|
174
|
+
}, {
|
|
175
|
+
"alias": null,
|
|
176
|
+
"args": null,
|
|
177
|
+
"concreteType": "FontStyle",
|
|
178
|
+
"kind": "LinkedField",
|
|
179
|
+
"name": "uiFontStyleBold",
|
|
180
|
+
"plural": false,
|
|
181
|
+
"selections": v6 /*: any*/,
|
|
182
|
+
"storageKey": null
|
|
183
|
+
}],
|
|
184
|
+
"storageKey": null
|
|
185
|
+
}, v0 /*: any*/],
|
|
111
186
|
|
|
112
187
|
"storageKey": null
|
|
113
188
|
}]
|
|
114
189
|
},
|
|
115
190
|
"params": {
|
|
116
|
-
"cacheID": "
|
|
191
|
+
"cacheID": "8b53d0e391aeeeeefd259a13251aca86",
|
|
117
192
|
"id": null,
|
|
118
193
|
"metadata": {},
|
|
119
194
|
"name": "StoreModalContainerQuery",
|
|
120
195
|
"operationKind": "query",
|
|
121
|
-
"text": "query StoreModalContainerQuery {\n viewer {\n currentOrder {\n orderItems {\n id\n }\n id\n }\n settings {\n
|
|
196
|
+
"text": "query StoreModalContainerQuery {\n viewer {\n currentOrder {\n orderItems {\n id\n }\n id\n }\n settings {\n uiFontStyle {\n name\n cssFamily\n family {\n cssUrl\n id\n }\n id\n }\n uiFontStyleBold {\n name\n cssFamily\n family {\n cssUrl\n id\n }\n id\n }\n }\n id\n }\n}\n"
|
|
122
197
|
}
|
|
123
198
|
};
|
|
124
199
|
}();
|
|
125
|
-
node.hash = "
|
|
200
|
+
node.hash = "dd4757b9238f5ae8689c7191b4abe64c";
|
|
126
201
|
var _default = node;
|
|
127
202
|
exports.default = _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @generated SignedSource<<
|
|
2
|
+
* @generated SignedSource<<12d307fcc2ca71585e67af5328841e38>>
|
|
3
3
|
* @lightSyntaxTransform
|
|
4
4
|
* @nogrep
|
|
5
5
|
*/
|
|
@@ -7,6 +7,7 @@ import { ReaderFragment } from 'relay-runtime';
|
|
|
7
7
|
import { FragmentRefs } from "relay-runtime";
|
|
8
8
|
export type StoreModalProductLicense_license$data = {
|
|
9
9
|
readonly defaultSelected: boolean | null;
|
|
10
|
+
readonly description: string | null;
|
|
10
11
|
readonly id: string;
|
|
11
12
|
readonly name: string | null;
|
|
12
13
|
readonly url: string | null;
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
/**
|
|
8
|
-
* @generated SignedSource<<
|
|
8
|
+
* @generated SignedSource<<12d307fcc2ca71585e67af5328841e38>>
|
|
9
9
|
* @lightSyntaxTransform
|
|
10
10
|
* @nogrep
|
|
11
11
|
*/
|
|
@@ -41,6 +41,16 @@ const node = function () {
|
|
|
41
41
|
"name": "url",
|
|
42
42
|
"storageKey": null
|
|
43
43
|
}, v1 /*: any*/, {
|
|
44
|
+
"alias": null,
|
|
45
|
+
"args": [{
|
|
46
|
+
"kind": "Literal",
|
|
47
|
+
"name": "format",
|
|
48
|
+
"value": "HTML"
|
|
49
|
+
}],
|
|
50
|
+
"kind": "ScalarField",
|
|
51
|
+
"name": "description",
|
|
52
|
+
"storageKey": "description(format:\"HTML\")"
|
|
53
|
+
}, {
|
|
44
54
|
"alias": null,
|
|
45
55
|
"args": null,
|
|
46
56
|
"kind": "ScalarField",
|
|
@@ -89,6 +99,6 @@ const node = function () {
|
|
|
89
99
|
"abstractKey": null
|
|
90
100
|
};
|
|
91
101
|
}();
|
|
92
|
-
node.hash = "
|
|
102
|
+
node.hash = "5729815aeedac2b8ea39eaab0a986b48";
|
|
93
103
|
var _default = node;
|
|
94
104
|
exports.default = _default;
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
/**
|
|
8
|
-
* @generated SignedSource<<
|
|
8
|
+
* @generated SignedSource<<c70b3a4167e830f3a526f236819eeb80>>
|
|
9
9
|
* @lightSyntaxTransform
|
|
10
10
|
* @nogrep
|
|
11
11
|
*/
|
|
@@ -377,6 +377,16 @@ const node = function () {
|
|
|
377
377
|
"name": "url",
|
|
378
378
|
"storageKey": null
|
|
379
379
|
}, v10 /*: any*/, {
|
|
380
|
+
"alias": null,
|
|
381
|
+
"args": [{
|
|
382
|
+
"kind": "Literal",
|
|
383
|
+
"name": "format",
|
|
384
|
+
"value": "HTML"
|
|
385
|
+
}],
|
|
386
|
+
"kind": "ScalarField",
|
|
387
|
+
"name": "description",
|
|
388
|
+
"storageKey": "description(format:\"HTML\")"
|
|
389
|
+
}, {
|
|
380
390
|
"alias": null,
|
|
381
391
|
"args": null,
|
|
382
392
|
"kind": "ScalarField",
|
|
@@ -491,12 +501,12 @@ const node = function () {
|
|
|
491
501
|
}]
|
|
492
502
|
},
|
|
493
503
|
"params": {
|
|
494
|
-
"cacheID": "
|
|
504
|
+
"cacheID": "4432f6cf13a130d083e8ae9a7116da48",
|
|
495
505
|
"id": null,
|
|
496
506
|
"metadata": {},
|
|
497
507
|
"name": "StoreModalProductQuery",
|
|
498
508
|
"operationKind": "query",
|
|
499
|
-
"text": "query StoreModalProductQuery(\n $productId: ID!\n) {\n collection: node(id: $productId) {\n __typename\n id\n ...StoreModalFamily_collection\n ... on FontCollection {\n children(collectionTypes: [FAMILY]) {\n id\n ...StoreModalFamily_collection\n }\n }\n }\n viewer {\n ...StoreModalProductLicenseSelection_viewer\n ...StoreModalProductSummary_viewer\n endpoint\n stripeAccountId\n id\n }\n}\n\nfragment FontStyle_fontStyle on FontStyle {\n cssFamily\n name\n}\n\nfragment Price_price on Money {\n amount\n currency\n}\n\nfragment SKUPrice_sku on Sku {\n id\n price(licenseOptions: []) {\n amount\n ...Price_price\n }\n}\n\nfragment StoreModalBundleButton_bundle on Bundle {\n name\n sku {\n ...SKUPrice_sku\n id\n }\n fontStyles {\n id\n ...FontStyle_fontStyle\n }\n}\n\nfragment StoreModalFamilyButton_collection on FontCollection {\n isVariableFont\n collectionType\n name\n sku {\n ...SKUPrice_sku\n id\n }\n parent {\n id\n }\n featureStyle {\n ...FontStyle_fontStyle\n id\n }\n totalStyles\n totalStylesPrice {\n ...Price_price\n }\n ...useTotalStyles_fontCollection\n}\n\nfragment StoreModalFamily_collection on FontCollection {\n ...StoreModalFamilyButton_collection\n cssUrl\n collectionType\n sku {\n id\n }\n isVariableFont\n bundles {\n id\n fontStyles {\n id\n cssFamily\n cssWeight\n cssStretch\n ...StoreModalStyleButton_fontStyle\n }\n ...StoreModalBundleButton_bundle\n }\n fontStyles {\n id\n cssFamily\n cssWeight\n cssStretch\n ...StoreModalStyleButton_fontStyle\n }\n}\n\nfragment StoreModalProductLicenseSelection_viewer on Viewer {\n licenses(licenseTypes: [RETAIL]) {\n id\n ...StoreModalProductLicense_license\n }\n}\n\nfragment StoreModalProductLicense_license on License {\n id\n url\n name\n defaultSelected\n variables: licenseVariables {\n id\n name\n variableType\n ...VariableTableAmounts_variable\n options: licenseOptions {\n id\n name\n amount\n ...VariableTableAmounts_option\n }\n }\n}\n\nfragment StoreModalProductSummary_viewer on Viewer {\n precart(skuIds: [], licenseOptions: []) {\n skus {\n price(licenseOptions: []) {\n amount\n }\n product {\n __typename\n ... on FontCollection {\n totalStyles\n totalStylesPrice(licenseOptions: []) {\n amount\n }\n }\n ... on Bundle {\n totalStyles\n totalStylesPrice(licenseOptions: []) {\n amount\n }\n }\n ... on Node {\n __isNode: __typename\n id\n }\n }\n id\n }\n subtotal {\n ...Price_price\n amount\n currency\n }\n }\n}\n\nfragment StoreModalStyleButton_fontStyle on FontStyle {\n ...FontStyle_fontStyle\n id\n name\n sku {\n ...SKUPrice_sku\n id\n }\n variableInstances {\n name\n coordinates {\n axis\n value\n }\n }\n variableAxes {\n name\n }\n}\n\nfragment VariableTableAmounts_option on LicenseOption {\n amounts\n}\n\nfragment VariableTableAmounts_variable on LicenseVariable {\n units\n}\n\nfragment useTotalStyles_fontCollection on FontCollection {\n totalStyles\n children(collectionTypes: [FAMILY]) {\n isVariableFont\n totalStyles\n id\n }\n}\n"
|
|
509
|
+
"text": "query StoreModalProductQuery(\n $productId: ID!\n) {\n collection: node(id: $productId) {\n __typename\n id\n ...StoreModalFamily_collection\n ... on FontCollection {\n children(collectionTypes: [FAMILY]) {\n id\n ...StoreModalFamily_collection\n }\n }\n }\n viewer {\n ...StoreModalProductLicenseSelection_viewer\n ...StoreModalProductSummary_viewer\n endpoint\n stripeAccountId\n id\n }\n}\n\nfragment FontStyle_fontStyle on FontStyle {\n cssFamily\n name\n}\n\nfragment Price_price on Money {\n amount\n currency\n}\n\nfragment SKUPrice_sku on Sku {\n id\n price(licenseOptions: []) {\n amount\n ...Price_price\n }\n}\n\nfragment StoreModalBundleButton_bundle on Bundle {\n name\n sku {\n ...SKUPrice_sku\n id\n }\n fontStyles {\n id\n ...FontStyle_fontStyle\n }\n}\n\nfragment StoreModalFamilyButton_collection on FontCollection {\n isVariableFont\n collectionType\n name\n sku {\n ...SKUPrice_sku\n id\n }\n parent {\n id\n }\n featureStyle {\n ...FontStyle_fontStyle\n id\n }\n totalStyles\n totalStylesPrice {\n ...Price_price\n }\n ...useTotalStyles_fontCollection\n}\n\nfragment StoreModalFamily_collection on FontCollection {\n ...StoreModalFamilyButton_collection\n cssUrl\n collectionType\n sku {\n id\n }\n isVariableFont\n bundles {\n id\n fontStyles {\n id\n cssFamily\n cssWeight\n cssStretch\n ...StoreModalStyleButton_fontStyle\n }\n ...StoreModalBundleButton_bundle\n }\n fontStyles {\n id\n cssFamily\n cssWeight\n cssStretch\n ...StoreModalStyleButton_fontStyle\n }\n}\n\nfragment StoreModalProductLicenseSelection_viewer on Viewer {\n licenses(licenseTypes: [RETAIL]) {\n id\n ...StoreModalProductLicense_license\n }\n}\n\nfragment StoreModalProductLicense_license on License {\n id\n url\n name\n description(format: HTML)\n defaultSelected\n variables: licenseVariables {\n id\n name\n variableType\n ...VariableTableAmounts_variable\n options: licenseOptions {\n id\n name\n amount\n ...VariableTableAmounts_option\n }\n }\n}\n\nfragment StoreModalProductSummary_viewer on Viewer {\n precart(skuIds: [], licenseOptions: []) {\n skus {\n price(licenseOptions: []) {\n amount\n }\n product {\n __typename\n ... on FontCollection {\n totalStyles\n totalStylesPrice(licenseOptions: []) {\n amount\n }\n }\n ... on Bundle {\n totalStyles\n totalStylesPrice(licenseOptions: []) {\n amount\n }\n }\n ... on Node {\n __isNode: __typename\n id\n }\n }\n id\n }\n subtotal {\n ...Price_price\n amount\n currency\n }\n }\n}\n\nfragment StoreModalStyleButton_fontStyle on FontStyle {\n ...FontStyle_fontStyle\n id\n name\n sku {\n ...SKUPrice_sku\n id\n }\n variableInstances {\n name\n coordinates {\n axis\n value\n }\n }\n variableAxes {\n name\n }\n}\n\nfragment VariableTableAmounts_option on LicenseOption {\n amounts\n}\n\nfragment VariableTableAmounts_variable on LicenseVariable {\n units\n}\n\nfragment useTotalStyles_fontCollection on FontCollection {\n totalStyles\n children(collectionTypes: [FAMILY]) {\n isVariableFont\n totalStyles\n id\n }\n}\n"
|
|
500
510
|
}
|
|
501
511
|
};
|
|
502
512
|
}();
|
|
@@ -19,16 +19,36 @@ function FamilyList(_ref) {
|
|
|
19
19
|
node: nodeKey,
|
|
20
20
|
text
|
|
21
21
|
} = _ref;
|
|
22
|
-
const node = (0, _reactRelay.useFragment)(_FamilyList_node !== void 0 ? _FamilyList_node : (_FamilyList_node = require("../../__generated__/FamilyList_node.graphql"), _FamilyList_node.hash && _FamilyList_node.hash !== "
|
|
22
|
+
const node = (0, _reactRelay.useFragment)(_FamilyList_node !== void 0 ? _FamilyList_node : (_FamilyList_node = require("../../__generated__/FamilyList_node.graphql"), _FamilyList_node.hash && _FamilyList_node.hash !== "d52770ab2e7aaa83f392a5d80340f3ad" && 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), nodeKey);
|
|
23
23
|
return /*#__PURE__*/_react.default.createElement("ul", {
|
|
24
24
|
className: "font-family-block__list",
|
|
25
25
|
style: {
|
|
26
26
|
fontFamily: node.name
|
|
27
27
|
}
|
|
28
|
-
}, (_node$fontStyles = node.fontStyles) === null || _node$fontStyles === void 0 ? void 0 : _node$fontStyles.map((style, i) =>
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
28
|
+
}, (_node$fontStyles = node.fontStyles) === null || _node$fontStyles === void 0 ? void 0 : _node$fontStyles.map((style, i) => {
|
|
29
|
+
var _style$variableInstan, _style$variableInstan2;
|
|
30
|
+
return /*#__PURE__*/_react.default.createElement(_FontStyle.default, {
|
|
31
|
+
fontStyle: style,
|
|
32
|
+
Component: "li",
|
|
33
|
+
key: i,
|
|
34
|
+
className: "font-family-block__list__item"
|
|
35
|
+
}, (((_style$variableInstan = style.variableInstances) === null || _style$variableInstan === void 0 ? void 0 : _style$variableInstan.length) ?? 0) > 0 ? (_style$variableInstan2 = style.variableInstances) === null || _style$variableInstan2 === void 0 ? void 0 : _style$variableInstan2.map(_ref2 => {
|
|
36
|
+
let {
|
|
37
|
+
name,
|
|
38
|
+
coordinates
|
|
39
|
+
} = _ref2;
|
|
40
|
+
return /*#__PURE__*/_react.default.createElement("span", {
|
|
41
|
+
key: name,
|
|
42
|
+
style: {
|
|
43
|
+
fontVariationSettings: coordinates.map(_ref3 => {
|
|
44
|
+
let {
|
|
45
|
+
axis,
|
|
46
|
+
value
|
|
47
|
+
} = _ref3;
|
|
48
|
+
return `'${axis}' ${value}`;
|
|
49
|
+
}).join(',')
|
|
50
|
+
}
|
|
51
|
+
}, name, ' ');
|
|
52
|
+
}) : /*#__PURE__*/_react.default.createElement("span", null, text || styleName(style.name, style.name_localized), " "));
|
|
53
|
+
}));
|
|
34
54
|
}
|
|
@@ -13,17 +13,18 @@ var _Price = require("../Price");
|
|
|
13
13
|
var _FamilyList = _interopRequireDefault(require("./FamilyList"));
|
|
14
14
|
var _Stylesheet = _interopRequireDefault(require("../Stylesheet"));
|
|
15
15
|
var _reducer = require("../../reducer");
|
|
16
|
+
var _utils = require("../../utils");
|
|
16
17
|
var _Family_node;
|
|
17
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
18
19
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
19
20
|
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; }
|
|
20
21
|
function Family(_ref) {
|
|
21
|
-
var _node$families;
|
|
22
|
+
var _node$fontStyles, _node$fontStyles2, _node$families;
|
|
22
23
|
let {
|
|
23
24
|
node: nodeKey,
|
|
24
25
|
size
|
|
25
26
|
} = _ref;
|
|
26
|
-
const node = (0, _reactRelay.useFragment)(_Family_node !== void 0 ? _Family_node : (_Family_node = require("../../__generated__/Family_node.graphql"), _Family_node.hash && _Family_node.hash !== "
|
|
27
|
+
const node = (0, _reactRelay.useFragment)(_Family_node !== void 0 ? _Family_node : (_Family_node = require("../../__generated__/Family_node.graphql"), _Family_node.hash && _Family_node.hash !== "2fecc4fd332a593d28387a3a87559fe4" && 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), nodeKey);
|
|
27
28
|
const precartOpen = (0, _reactRedux.useSelector)(state => state.precartOpen);
|
|
28
29
|
const selector = node.sku ? (0, _reducer.isSelected)(node.sku.id) : () => false;
|
|
29
30
|
const selected = (0, _reactRedux.useSelector)(selector);
|
|
@@ -61,7 +62,21 @@ function Family(_ref) {
|
|
|
61
62
|
className: "font-family-block__separator"
|
|
62
63
|
}), /*#__PURE__*/_react.default.createElement("p", {
|
|
63
64
|
className: "font-family-block__count"
|
|
64
|
-
}, node.totalStyles,
|
|
65
|
+
}, (0, _utils.pluralize)(node.totalStyles ?? 0, node.isVariableFont ? 'font' : 'style')), node.isVariableFont ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("span", {
|
|
66
|
+
className: "font-family-block__separator"
|
|
67
|
+
}), /*#__PURE__*/_react.default.createElement("p", {
|
|
68
|
+
className: "font-family-block__count"
|
|
69
|
+
}, (0, _utils.pluralize)(((_node$fontStyles = node.fontStyles) === null || _node$fontStyles === void 0 ? void 0 : _node$fontStyles.reduce((total, style) => {
|
|
70
|
+
var _style$variableAxes;
|
|
71
|
+
return total + (((_style$variableAxes = style.variableAxes) === null || _style$variableAxes === void 0 ? void 0 : _style$variableAxes.length) ?? 0);
|
|
72
|
+
}, 0)) ?? 0, 'variable axis', 'variable axes')), /*#__PURE__*/_react.default.createElement("span", {
|
|
73
|
+
className: "font-family-block__separator"
|
|
74
|
+
}), /*#__PURE__*/_react.default.createElement("p", {
|
|
75
|
+
className: "font-family-block__count"
|
|
76
|
+
}, (0, _utils.pluralize)(((_node$fontStyles2 = node.fontStyles) === null || _node$fontStyles2 === void 0 ? void 0 : _node$fontStyles2.reduce((total, style) => {
|
|
77
|
+
var _style$variableInstan;
|
|
78
|
+
return total + (((_style$variableInstan = style.variableInstances) === null || _style$variableInstan === void 0 ? void 0 : _style$variableInstan.length) ?? 0);
|
|
79
|
+
}, 0)) ?? 0, 'named instance'))) : null), /*#__PURE__*/_react.default.createElement("div", {
|
|
65
80
|
className: "font-family-block__lists"
|
|
66
81
|
}, isSuperFamily ? (_node$families = node.families) === null || _node$families === void 0 ? void 0 : _node$families.map((family, index) => {
|
|
67
82
|
var _family$featureStyle;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { SerializablePreloadedQuery } from '../../relay/loadSerializableQuery';
|
|
3
|
-
import { NewsletterSignupQuery
|
|
3
|
+
import { NewsletterSignupQuery } from '__generated__/NewsletterSignupQuery.graphql';
|
|
4
4
|
type PreloadedQuery = SerializablePreloadedQuery<NewsletterSignupQuery>;
|
|
5
5
|
export interface NewsletterSignup_props {
|
|
6
6
|
optInLabel?: string;
|
|
@@ -9,11 +9,9 @@ export interface NewsletterSignup_props {
|
|
|
9
9
|
optInCheckboxChecked?: boolean;
|
|
10
10
|
title?: string;
|
|
11
11
|
intro?: string;
|
|
12
|
-
data: NewsletterSignupQuery$data;
|
|
13
|
-
preloadedQuery?: PreloadedQuery;
|
|
14
12
|
}
|
|
15
13
|
export declare function NewsletterSignupPreloadedQueryRenderer({ preloadedQuery, }: {
|
|
16
14
|
preloadedQuery: PreloadedQuery;
|
|
17
15
|
}): React.JSX.Element;
|
|
18
|
-
export default function NewsletterSignup(): React.JSX.Element;
|
|
16
|
+
export default function NewsletterSignup(props: NewsletterSignup_props): React.JSX.Element;
|
|
19
17
|
export {};
|
|
@@ -15,6 +15,7 @@ var _NewsletterSignupUpdateCustomerMutation, _NewsletterSignupQuery;
|
|
|
15
15
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
16
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
17
17
|
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; }
|
|
18
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
|
|
18
19
|
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);
|
|
19
20
|
const query = _NewsletterSignupQuery !== void 0 ? _NewsletterSignupQuery : (_NewsletterSignupQuery = require("../../__generated__/NewsletterSignupQuery.graphql"), _NewsletterSignupQuery.hash && _NewsletterSignupQuery.hash !== "16f0b6d7ed420ec5857c972b77805e4c" && console.error("The definition of 'NewsletterSignupQuery' appears to have changed. Run `relay-compiler` to update the generated files to receive the expected data."), _NewsletterSignupQuery);
|
|
20
21
|
function NewsletterSignupComponent(_ref) {
|
|
@@ -145,9 +146,9 @@ function NewsletterSignupPreloadedQueryRenderer(_ref3) {
|
|
|
145
146
|
data: data
|
|
146
147
|
});
|
|
147
148
|
}
|
|
148
|
-
function NewsletterSignup() {
|
|
149
|
+
function NewsletterSignup(props) {
|
|
149
150
|
const data = (0, _reactRelay.useLazyLoadQuery)(query, {});
|
|
150
|
-
return /*#__PURE__*/_react.default.createElement(NewsletterSignupComponent, {
|
|
151
|
+
return /*#__PURE__*/_react.default.createElement(NewsletterSignupComponent, _extends({}, props, {
|
|
151
152
|
data: data
|
|
152
|
-
});
|
|
153
|
+
}));
|
|
153
154
|
}
|
|
@@ -12,7 +12,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
12
12
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
|
|
13
13
|
async function NewsletterSignup(props) {
|
|
14
14
|
const preloadedQuery = await (0, _loadSerializableQuery.default)(_NewsletterSignupQuery.default, {});
|
|
15
|
-
return /*#__PURE__*/_react.default.createElement(_index.NewsletterSignupPreloadedQueryRenderer, _extends({
|
|
15
|
+
return /*#__PURE__*/_react.default.createElement(_index.NewsletterSignupPreloadedQueryRenderer, _extends({}, props, {
|
|
16
16
|
preloadedQuery: preloadedQuery
|
|
17
|
-
}
|
|
17
|
+
}));
|
|
18
18
|
}
|
|
@@ -17,11 +17,13 @@ const License = _ref => {
|
|
|
17
17
|
onSelectLicense,
|
|
18
18
|
onSelectLicenseOption
|
|
19
19
|
} = _ref;
|
|
20
|
-
const node = (0, _reactRelay.useFragment)(_License_node !== void 0 ? _License_node : (_License_node = require("../../__generated__/License_node.graphql"), _License_node.hash && _License_node.hash !== "
|
|
20
|
+
const node = (0, _reactRelay.useFragment)(_License_node !== void 0 ? _License_node : (_License_node = require("../../__generated__/License_node.graphql"), _License_node.hash && _License_node.hash !== "1550b152731d8412ffc55716cb536407" && console.error("The definition of 'License_node' appears to have changed. Run `relay-compiler` to update the generated files to receive the expected data."), _License_node), nodeKey);
|
|
21
21
|
if (!node) return null;
|
|
22
22
|
const selectedLicenseOptions = (0, _reactRedux.useSelector)(state => state.licenseOptions);
|
|
23
23
|
const selectedOptions = selectedLicenseOptions.find(spec => spec.licenseId === node.id);
|
|
24
24
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
25
|
+
className: "pre-cart__license-wrapper"
|
|
26
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
25
27
|
className: "pre-cart__license",
|
|
26
28
|
"data-selected": selected
|
|
27
29
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -59,7 +61,12 @@ const License = _ref => {
|
|
|
59
61
|
key: option.id,
|
|
60
62
|
value: option.id
|
|
61
63
|
}, option.amount)))));
|
|
62
|
-
})))
|
|
64
|
+
}))), node.description && /*#__PURE__*/_react.default.createElement("div", {
|
|
65
|
+
className: "pre-cart__license__description",
|
|
66
|
+
dangerouslySetInnerHTML: {
|
|
67
|
+
__html: node.description
|
|
68
|
+
}
|
|
69
|
+
}));
|
|
63
70
|
};
|
|
64
71
|
var _default = License;
|
|
65
72
|
exports.default = _default;
|
|
@@ -43,7 +43,7 @@ const countStylesPrice = _ref2 => {
|
|
|
43
43
|
var _sku$product4, _sku$product5;
|
|
44
44
|
if (((_sku$product4 = sku.product) === null || _sku$product4 === void 0 ? void 0 : _sku$product4.__typename) === 'FontCollection' || ((_sku$product5 = sku.product) === null || _sku$product5 === void 0 ? void 0 : _sku$product5.__typename) === 'Bundle') {
|
|
45
45
|
var _sku$product6, _sku$product6$totalSt;
|
|
46
|
-
return acc + (((_sku$product6 = sku.product) === null || _sku$product6 === void 0 ? void 0 : (_sku$product6$totalSt = _sku$product6.totalStylesPrice) === null || _sku$product6$totalSt === void 0 ? void 0 : _sku$product6$totalSt.amount) ??
|
|
46
|
+
return acc + (((_sku$product6 = sku.product) === null || _sku$product6 === void 0 ? void 0 : (_sku$product6$totalSt = _sku$product6.totalStylesPrice) === null || _sku$product6$totalSt === void 0 ? void 0 : _sku$product6$totalSt.amount) ?? sku.price.amount);
|
|
47
47
|
}
|
|
48
48
|
return acc + sku.price.amount;
|
|
49
49
|
}, 0);
|
|
@@ -241,7 +241,7 @@ function Precart(_ref3) {
|
|
|
241
241
|
className: "pre-cart__your-selection__items"
|
|
242
242
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
243
243
|
className: "pre-cart__your-selection__item"
|
|
244
|
-
}, /*#__PURE__*/_react.default.createElement("div", null, collection === null || collection === void 0 ? void 0 : collection.name, /*#__PURE__*/_react.default.createElement("br", null), (0, _utils.pluralize)(countStyles(viewer), '
|
|
244
|
+
}, /*#__PURE__*/_react.default.createElement("div", null, collection === null || collection === void 0 ? void 0 : collection.name, /*#__PURE__*/_react.default.createElement("br", null), (0, _utils.pluralize)(countStyles(viewer), 'font')), /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_Price.Price, {
|
|
245
245
|
price: {
|
|
246
246
|
amount: countStylesPrice(viewer),
|
|
247
247
|
currency: subtotal.currency
|
|
@@ -46,7 +46,10 @@ function SKUPrice(_ref) {
|
|
|
46
46
|
licenseId: spec.licenseId,
|
|
47
47
|
licenseOptionIds: Object.values(spec.licenseOptions).filter(Boolean)
|
|
48
48
|
}));
|
|
49
|
-
|
|
49
|
+
|
|
50
|
+
// this must be null to start because we always want to fetch the price for
|
|
51
|
+
// the current license selection on mount
|
|
52
|
+
const prevLicenseOptionsSpecs = (0, _react.useRef)(null);
|
|
50
53
|
(0, _react.useEffect)(() => {
|
|
51
54
|
if (!sku) return;
|
|
52
55
|
if (!(0, _fastDeepEqual.default)(prevLicenseOptionsSpecs.current, licenseOptionsSpecs)) {
|
|
@@ -37,12 +37,24 @@ const getBackLink = (history, currentRoute) => {
|
|
|
37
37
|
if (!previous) return null;
|
|
38
38
|
return getPageTitle(previous.name);
|
|
39
39
|
};
|
|
40
|
+
function getFontData(fontStyle) {
|
|
41
|
+
if (!fontStyle) return null;
|
|
42
|
+
const {
|
|
43
|
+
name,
|
|
44
|
+
cssFamily,
|
|
45
|
+
family
|
|
46
|
+
} = fontStyle;
|
|
47
|
+
return {
|
|
48
|
+
name: `${cssFamily} ${name}`,
|
|
49
|
+
cssUrl: (family === null || family === void 0 ? void 0 : family.cssUrl) ?? null
|
|
50
|
+
};
|
|
51
|
+
}
|
|
40
52
|
const StoreModalContainer = _ref => {
|
|
41
53
|
var _currentOrder, _currentOrder$orderIt, _settings, _settings2;
|
|
42
54
|
let {
|
|
43
55
|
children
|
|
44
56
|
} = _ref;
|
|
45
|
-
const data = (0, _reactRelay.useLazyLoadQuery)(_StoreModalContainerQuery !== void 0 ? _StoreModalContainerQuery : (_StoreModalContainerQuery = require("../../__generated__/StoreModalContainerQuery.graphql"), _StoreModalContainerQuery.hash && _StoreModalContainerQuery.hash !== "
|
|
57
|
+
const data = (0, _reactRelay.useLazyLoadQuery)(_StoreModalContainerQuery !== void 0 ? _StoreModalContainerQuery : (_StoreModalContainerQuery = require("../../__generated__/StoreModalContainerQuery.graphql"), _StoreModalContainerQuery.hash && _StoreModalContainerQuery.hash !== "dd4757b9238f5ae8689c7191b4abe64c" && console.error("The definition of 'StoreModalContainerQuery' appears to have changed. Run `relay-compiler` to update the generated files to receive the expected data."), _StoreModalContainerQuery), {});
|
|
46
58
|
const dispatch = (0, _reactRedux.useDispatch)();
|
|
47
59
|
const orderItemCount = ((_currentOrder = data.viewer.currentOrder) === null || _currentOrder === void 0 ? void 0 : (_currentOrder$orderIt = _currentOrder.orderItems) === null || _currentOrder$orderIt === void 0 ? void 0 : _currentOrder$orderIt.length) ?? 0;
|
|
48
60
|
const showCartButton = orderItemCount > 0;
|
|
@@ -92,8 +104,10 @@ const StoreModalContainer = _ref => {
|
|
|
92
104
|
onClickCart: handleCart,
|
|
93
105
|
showCartButton: showCartButton,
|
|
94
106
|
orderItemCount: orderItemCount,
|
|
95
|
-
|
|
96
|
-
|
|
107
|
+
fonts: {
|
|
108
|
+
regular: getFontData((_settings = data.viewer.settings) === null || _settings === void 0 ? void 0 : _settings.uiFontStyle),
|
|
109
|
+
bold: getFontData((_settings2 = data.viewer.settings) === null || _settings2 === void 0 ? void 0 : _settings2.uiFontStyleBold)
|
|
110
|
+
}
|
|
97
111
|
}, {
|
|
98
112
|
backText: link,
|
|
99
113
|
pageTitle: getPageTitle(currentRoute),
|
|
@@ -3,6 +3,7 @@ import { StoreModalFamily_collection$key } from '../../__generated__/StoreModalF
|
|
|
3
3
|
interface StoreModalFamilyProps {
|
|
4
4
|
collection: StoreModalFamily_collection$key;
|
|
5
5
|
onSelect: (skuId: string, selected: boolean) => void;
|
|
6
|
+
title?: React.ReactNode;
|
|
6
7
|
}
|
|
7
|
-
export default function StoreModalFamily({ collection: collectionKey, onSelect, }: StoreModalFamilyProps): React.JSX.Element | null;
|
|
8
|
+
export default function StoreModalFamily({ collection: collectionKey, onSelect, title, }: StoreModalFamilyProps): React.JSX.Element | null;
|
|
8
9
|
export {};
|
|
@@ -34,7 +34,8 @@ function StoreModalFamily(_ref) {
|
|
|
34
34
|
var _collection$bundles;
|
|
35
35
|
let {
|
|
36
36
|
collection: collectionKey,
|
|
37
|
-
onSelect
|
|
37
|
+
onSelect,
|
|
38
|
+
title
|
|
38
39
|
} = _ref;
|
|
39
40
|
const collection = (0, _reactRelay.useFragment)(_StoreModalFamily_collection !== void 0 ? _StoreModalFamily_collection : (_StoreModalFamily_collection = require("../../__generated__/StoreModalFamily_collection.graphql"), _StoreModalFamily_collection.hash && _StoreModalFamily_collection.hash !== "f0e4764ace2386cb64ef3f8d85128268" && console.error("The definition of 'StoreModalFamily_collection' appears to have changed. Run `relay-compiler` to update the generated files to receive the expected data."), _StoreModalFamily_collection), collectionKey);
|
|
40
41
|
const fontStyles = (0, _react.useMemo)(() => stylesGrouped(collection), [collection]);
|
|
@@ -43,6 +44,7 @@ function StoreModalFamily(_ref) {
|
|
|
43
44
|
stylesheet: collection.cssUrl && /*#__PURE__*/_react.default.createElement(_Stylesheet.default, {
|
|
44
45
|
href: collection.cssUrl
|
|
45
46
|
}) || null,
|
|
47
|
+
title,
|
|
46
48
|
familyButton: /*#__PURE__*/_react.default.createElement(_StoreModalFamilyButton.default, {
|
|
47
49
|
collection: collection,
|
|
48
50
|
onSelectSku: onSelect
|
|
@@ -56,6 +56,7 @@ const StoreModalProduct = _ref => {
|
|
|
56
56
|
body: /*#__PURE__*/_react.default.createElement(_react.Fragment, null, licensesPosition === 'top' && /*#__PURE__*/_react.default.createElement(_StoreModalProductLicenseSelection.default, {
|
|
57
57
|
viewer: viewer
|
|
58
58
|
}), collection && /*#__PURE__*/_react.default.createElement(_StoreModalFamily.default, {
|
|
59
|
+
title: "Select fonts",
|
|
59
60
|
collection: collection,
|
|
60
61
|
onSelect: handleSelectProduct
|
|
61
62
|
}), collection === null || collection === void 0 ? void 0 : (_collection$children = collection.children) === null || _collection$children === void 0 ? void 0 : _collection$children.map(child => /*#__PURE__*/_react.default.createElement(_StoreModalFamily.default, {
|
|
@@ -16,6 +16,7 @@ const LicenseElement = _ref => {
|
|
|
16
16
|
onClick,
|
|
17
17
|
isSelected,
|
|
18
18
|
children: {
|
|
19
|
+
description,
|
|
19
20
|
name,
|
|
20
21
|
variables
|
|
21
22
|
}
|
|
@@ -23,7 +24,9 @@ const LicenseElement = _ref => {
|
|
|
23
24
|
const {
|
|
24
25
|
form: config
|
|
25
26
|
} = (0, _react.useContext)(_ConfigContext.default);
|
|
26
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
27
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
28
|
+
className: "store-modal__license-selection__license"
|
|
29
|
+
}, /*#__PURE__*/_react.default.createElement(_Button.default, {
|
|
27
30
|
onClick: onClick,
|
|
28
31
|
className: "store-modal__license-selection__license-button",
|
|
29
32
|
"data-selected": isSelected
|
|
@@ -33,7 +36,12 @@ const LicenseElement = _ref => {
|
|
|
33
36
|
className: "store-modal__license-selection__icon-pair"
|
|
34
37
|
}, isSelected ? config.checkboxStyle === 'check' ? /*#__PURE__*/_react.default.createElement(_Icons.CheckboxChecked, null) : /*#__PURE__*/_react.default.createElement(_Icons.CheckboxCrossed, null) : /*#__PURE__*/_react.default.createElement(_Icons.Checkbox, null), name)), /*#__PURE__*/_react.default.createElement("div", {
|
|
35
38
|
className: "store-modal__license-selection__variables"
|
|
36
|
-
}, variables))
|
|
39
|
+
}, variables)), description && /*#__PURE__*/_react.default.createElement("div", {
|
|
40
|
+
className: "store-modal__license-selection__description",
|
|
41
|
+
dangerouslySetInnerHTML: {
|
|
42
|
+
__html: description
|
|
43
|
+
}
|
|
44
|
+
}));
|
|
37
45
|
};
|
|
38
46
|
var _default = LicenseElement;
|
|
39
47
|
exports.default = _default;
|
|
@@ -41,7 +41,7 @@ function StoreModalProduceLicense(_ref) {
|
|
|
41
41
|
let {
|
|
42
42
|
license: licenseKey
|
|
43
43
|
} = _ref;
|
|
44
|
-
const license = (0, _reactRelay.useFragment)(_StoreModalProductLicense_license !== void 0 ? _StoreModalProductLicense_license : (_StoreModalProductLicense_license = require("../../__generated__/StoreModalProductLicense_license.graphql"), _StoreModalProductLicense_license.hash && _StoreModalProductLicense_license.hash !== "
|
|
44
|
+
const license = (0, _reactRelay.useFragment)(_StoreModalProductLicense_license !== void 0 ? _StoreModalProductLicense_license : (_StoreModalProductLicense_license = require("../../__generated__/StoreModalProductLicense_license.graphql"), _StoreModalProductLicense_license.hash && _StoreModalProductLicense_license.hash !== "5729815aeedac2b8ea39eaab0a986b48" && console.error("The definition of 'StoreModalProductLicense_license' appears to have changed. Run `relay-compiler` to update the generated files to receive the expected data."), _StoreModalProductLicense_license), licenseKey);
|
|
45
45
|
const licenseOptions = (0, _reactRedux.useSelector)(state => state.licenseOptions);
|
|
46
46
|
const selectedOptions = licenseOptions.find(_ref2 => {
|
|
47
47
|
let {
|
|
@@ -90,6 +90,7 @@ function StoreModalProduceLicense(_ref) {
|
|
|
90
90
|
isSelected: isSelected
|
|
91
91
|
}, {
|
|
92
92
|
name: license.name,
|
|
93
|
+
description: license.description,
|
|
93
94
|
variables: license.variables && license.variables.map(variable => {
|
|
94
95
|
if (variable.variableType === 'text') return null;
|
|
95
96
|
if (!variable.options) return null;
|
|
@@ -129,7 +129,7 @@ const StoreModalProductSummary = _ref => {
|
|
|
129
129
|
className: "store-modal__product-summary__nothing-selected"
|
|
130
130
|
}, "Calculating price...") : /*#__PURE__*/_react.default.createElement("span", {
|
|
131
131
|
className: "store-modal__product-summary__nothing-selected"
|
|
132
|
-
}, anySkusSelected ? 'Please select a license' : 'Please
|
|
132
|
+
}, anySkusSelected ? 'Please select a license' : 'Please select some fonts'), /*#__PURE__*/_react.default.createElement(_Button.default, {
|
|
133
133
|
className: "store-modal__product-summary__add-to-cart-button",
|
|
134
134
|
onClick: handleAddToCart,
|
|
135
135
|
disabled: submitting || !hasSelection
|