@pareto-engineering/design-system 2.0.0-alpha.49 → 2.0.0-alpha.51
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/cjs/c/SocialMediaShareButton/SocialMediaShareButton.js +10 -4
- package/dist/cjs/f/fields/QueryCombobox/QueryCombobox.js +3 -3
- package/dist/cjs/f/fields/QuerySelect/QuerySelect.js +3 -3
- package/dist/cjs/f/fields/TaskRecommendationInput/TaskRecommendationInput.js +1 -1
- package/dist/cjs/f/fields/TaskRecommendationInput/styles.scss +0 -4
- package/dist/es/c/SocialMediaShareButton/SocialMediaShareButton.js +10 -4
- package/dist/es/f/fields/QueryCombobox/QueryCombobox.js +3 -3
- package/dist/es/f/fields/QuerySelect/QuerySelect.js +3 -3
- package/dist/es/f/fields/TaskRecommendationInput/TaskRecommendationInput.js +1 -1
- package/dist/es/f/fields/TaskRecommendationInput/styles.scss +0 -4
- package/package.json +1 -1
- package/src/__snapshots__/Storyshots.test.js.snap +2 -2
- package/src/stories/f/FormInput.stories.jsx +6 -6
- package/src/stories/f/QueryCombobox.stories.jsx +2 -2
- package/src/stories/f/QuerySelect.stories.jsx +2 -2
- package/src/ui/c/SocialMediaShareButton/SocialMediaShareButton.jsx +11 -3
- package/src/ui/f/fields/QueryCombobox/QueryCombobox.jsx +5 -5
- package/src/ui/f/fields/QuerySelect/QuerySelect.jsx +4 -4
- package/dist/cjs/a/GradientBackground/GradientBackground.js +0 -140
- package/dist/cjs/a/GradientBackground/index.js +0 -15
- package/dist/cjs/a/GradientBackground/styles.scss +0 -191
- package/dist/cjs/a/Popover/common/Divider/Divider.js +0 -67
- package/dist/cjs/a/Popover/common/Divider/index.js +0 -15
- package/dist/cjs/a/Popover/common/Item/Item.js +0 -67
- package/dist/cjs/a/Popover/common/Item/index.js +0 -15
- package/dist/cjs/a/Popover/common/index.js +0 -21
- package/dist/cjs/c/AcceptCookies/AcceptCookies.js +0 -134
- package/dist/cjs/c/AcceptCookies/index.js +0 -15
- package/dist/cjs/c/AcceptCookies/styles.scss +0 -49
- package/dist/cjs/c/BlogCategoryButton/BlogCategoryButton.js +0 -95
- package/dist/cjs/c/BlogCategoryButton/index.js +0 -15
- package/dist/cjs/c/BlogContext/BlogContextProvider.js +0 -63
- package/dist/cjs/c/BlogContext/Context.js +0 -16
- package/dist/cjs/c/BlogContext/ContextProvider.js +0 -63
- package/dist/cjs/c/BlogContext/index.js +0 -31
- package/dist/cjs/c/BlogContext/useBlog.js +0 -16
- package/dist/cjs/c/BlogPost/BlogPost.js +0 -147
- package/dist/cjs/c/BlogPost/index.js +0 -15
- package/dist/cjs/c/BlogPost/styles.scss +0 -33
- package/dist/cjs/c/BlogPostsList/BlogPostsList.js +0 -73
- package/dist/cjs/c/BlogPostsList/common/Card/Card.js +0 -170
- package/dist/cjs/c/BlogPostsList/common/Card/index.js +0 -15
- package/dist/cjs/c/BlogPostsList/common/index.js +0 -13
- package/dist/cjs/c/BlogPostsList/index.js +0 -15
- package/dist/cjs/c/BlogPostsList/styles.scss +0 -72
- package/dist/cjs/c/SiteFooter/SiteFooter.js +0 -73
- package/dist/cjs/c/SiteFooter/common/Section/Section.js +0 -95
- package/dist/cjs/c/SiteFooter/common/Section/index.js +0 -15
- package/dist/cjs/c/SiteFooter/common/index.js +0 -13
- package/dist/cjs/c/SiteFooter/index.js +0 -15
- package/dist/cjs/c/SiteFooter/styles.scss +0 -34
- package/dist/cjs/c/SiteHeaderCTA/SiteHeaderCTA.js +0 -108
- package/dist/cjs/c/SiteHeaderCTA/index.js +0 -15
- package/dist/cjs/c/SiteHeaderCTA/styles.scss +0 -44
- package/dist/cjs/c/SiteMission/SiteMission.js +0 -113
- package/dist/cjs/c/SiteMission/index.js +0 -15
- package/dist/cjs/c/SiteMission/styles.scss +0 -30
- package/dist/cjs/c/SiteNavigation/SiteNavigation.js +0 -130
- package/dist/cjs/c/SiteNavigation/index.js +0 -15
- package/dist/cjs/c/SiteNavigation/styles.scss +0 -118
- package/dist/cjs/c/SiteOnboardingStep/SiteOnboardingStep.js +0 -98
- package/dist/cjs/c/SiteOnboardingStep/index.js +0 -15
- package/dist/cjs/c/SiteOnboardingStep/styles.scss +0 -51
- package/dist/cjs/c/SitePricing/SitePricing.js +0 -108
- package/dist/cjs/c/SitePricing/index.js +0 -15
- package/dist/cjs/c/SitePricing/styles.scss +0 -73
- package/dist/cjs/c/SiteServices/SiteServices.js +0 -211
- package/dist/cjs/c/SiteServices/index.js +0 -15
- package/dist/cjs/c/SiteServices/styles.scss +0 -138
- package/dist/cjs/c/TeamGallery/TeamGallery.js +0 -80
- package/dist/cjs/c/TeamGallery/common/PersonCard/PersonCard.js +0 -84
- package/dist/cjs/c/TeamGallery/common/PersonCard/index.js +0 -15
- package/dist/cjs/c/TeamGallery/common/index.js +0 -13
- package/dist/cjs/c/TeamGallery/index.js +0 -15
- package/dist/cjs/c/TeamGallery/styles.scss +0 -100
- package/dist/cjs/c/Testimonials/Testimonials.js +0 -119
- package/dist/cjs/c/Testimonials/index.js +0 -15
- package/dist/cjs/c/Testimonials/styles.scss +0 -112
- package/dist/cjs/experimental/GradientBackground/GradientBackground.js +0 -98
- package/dist/cjs/experimental/GradientBackground/index.js +0 -15
- package/dist/cjs/experimental/GradientBackground/styles.scss +0 -64
- package/dist/cjs/experimental/index.js +0 -13
- package/dist/cjs/f/fields/QuerySelect/styles.scss +0 -21
- package/dist/cjs/f/fields/TaskRecommendation/TaskRecommendation.js +0 -129
- package/dist/cjs/f/fields/TaskRecommendation/index.js +0 -15
- package/dist/cjs/f/fields/TaskRecommendation/styles.scss +0 -37
- package/dist/cjs/f/fields/TextArea/TextArea.js +0 -141
- package/dist/cjs/f/fields/TextArea/index.js +0 -15
- package/dist/cjs/f/fields/TextArea/styles.scss +0 -19
- package/dist/cjs/test/QueryLoader/styles.scss +0 -9
- package/dist/es/a/GradientBackground/GradientBackground.js +0 -118
- package/dist/es/a/GradientBackground/index.js +0 -2
- package/dist/es/a/GradientBackground/styles.scss +0 -191
- package/dist/es/a/Popover/common/Divider/Divider.js +0 -47
- package/dist/es/a/Popover/common/Divider/index.js +0 -2
- package/dist/es/a/Popover/common/Item/Item.js +0 -47
- package/dist/es/a/Popover/common/Item/index.js +0 -2
- package/dist/es/a/Popover/common/index.js +0 -2
- package/dist/es/c/AcceptCookies/AcceptCookies.js +0 -117
- package/dist/es/c/AcceptCookies/index.js +0 -2
- package/dist/es/c/AcceptCookies/styles.scss +0 -49
- package/dist/es/c/BlogCategoryButton/BlogCategoryButton.js +0 -68
- package/dist/es/c/BlogCategoryButton/index.js +0 -2
- package/dist/es/c/BlogContext/BlogContextProvider.js +0 -45
- package/dist/es/c/BlogContext/Context.js +0 -2
- package/dist/es/c/BlogContext/ContextProvider.js +0 -45
- package/dist/es/c/BlogContext/index.js +0 -4
- package/dist/es/c/BlogContext/useBlog.js +0 -3
- package/dist/es/c/BlogPost/BlogPost.js +0 -128
- package/dist/es/c/BlogPost/index.js +0 -2
- package/dist/es/c/BlogPost/styles.scss +0 -33
- package/dist/es/c/BlogPostsList/BlogPostsList.js +0 -56
- package/dist/es/c/BlogPostsList/common/Card/Card.js +0 -143
- package/dist/es/c/BlogPostsList/common/Card/index.js +0 -2
- package/dist/es/c/BlogPostsList/common/index.js +0 -1
- package/dist/es/c/BlogPostsList/index.js +0 -2
- package/dist/es/c/BlogPostsList/styles.scss +0 -72
- package/dist/es/c/SiteFooter/SiteFooter.js +0 -56
- package/dist/es/c/SiteFooter/common/Section/Section.js +0 -73
- package/dist/es/c/SiteFooter/common/Section/index.js +0 -2
- package/dist/es/c/SiteFooter/common/index.js +0 -1
- package/dist/es/c/SiteFooter/index.js +0 -2
- package/dist/es/c/SiteFooter/styles.scss +0 -34
- package/dist/es/c/SiteHeaderCTA/SiteHeaderCTA.js +0 -92
- package/dist/es/c/SiteHeaderCTA/index.js +0 -2
- package/dist/es/c/SiteHeaderCTA/styles.scss +0 -44
- package/dist/es/c/SiteMission/SiteMission.js +0 -96
- package/dist/es/c/SiteMission/index.js +0 -2
- package/dist/es/c/SiteMission/styles.scss +0 -30
- package/dist/es/c/SiteNavigation/SiteNavigation.js +0 -111
- package/dist/es/c/SiteNavigation/index.js +0 -2
- package/dist/es/c/SiteNavigation/styles.scss +0 -118
- package/dist/es/c/SiteOnboardingStep/SiteOnboardingStep.js +0 -81
- package/dist/es/c/SiteOnboardingStep/index.js +0 -2
- package/dist/es/c/SiteOnboardingStep/styles.scss +0 -51
- package/dist/es/c/SitePricing/SitePricing.js +0 -91
- package/dist/es/c/SitePricing/index.js +0 -2
- package/dist/es/c/SitePricing/styles.scss +0 -73
- package/dist/es/c/SiteServices/SiteServices.js +0 -195
- package/dist/es/c/SiteServices/index.js +0 -2
- package/dist/es/c/SiteServices/styles.scss +0 -138
- package/dist/es/c/TeamGallery/TeamGallery.js +0 -64
- package/dist/es/c/TeamGallery/common/PersonCard/PersonCard.js +0 -64
- package/dist/es/c/TeamGallery/common/PersonCard/index.js +0 -2
- package/dist/es/c/TeamGallery/common/index.js +0 -1
- package/dist/es/c/TeamGallery/index.js +0 -2
- package/dist/es/c/TeamGallery/styles.scss +0 -100
- package/dist/es/c/Testimonials/Testimonials.js +0 -99
- package/dist/es/c/Testimonials/index.js +0 -2
- package/dist/es/c/Testimonials/styles.scss +0 -112
- package/dist/es/experimental/GradientBackground/GradientBackground.js +0 -76
- package/dist/es/experimental/GradientBackground/index.js +0 -2
- package/dist/es/experimental/GradientBackground/styles.scss +0 -64
- package/dist/es/experimental/index.js +0 -1
- package/dist/es/f/fields/QuerySelect/styles.scss +0 -21
- package/dist/es/f/fields/TaskRecommendation/TaskRecommendation.js +0 -111
- package/dist/es/f/fields/TaskRecommendation/index.js +0 -2
- package/dist/es/f/fields/TaskRecommendation/styles.scss +0 -37
- package/dist/es/f/fields/TextArea/TextArea.js +0 -124
- package/dist/es/f/fields/TextArea/index.js +0 -2
- package/dist/es/f/fields/TextArea/styles.scss +0 -19
- package/dist/es/test/QueryLoader/styles.scss +0 -9
|
@@ -38,16 +38,22 @@ var SocialMediaShareButton = _ref => {
|
|
|
38
38
|
Promise.resolve().then(() => _interopRequireWildcard(require("./styles.scss")));
|
|
39
39
|
}, []);
|
|
40
40
|
var isServer = typeof window === 'undefined';
|
|
41
|
-
var
|
|
42
|
-
|
|
41
|
+
var link = isServer ? '' : window.location.href; // We can pass additional text to the social media share buttons such as the title.
|
|
42
|
+
// See commented code below for an example on how to pass text.
|
|
43
|
+
// It is important we encode the text with the encodeURIComponent function to pass
|
|
44
|
+
// special characters (such as |, &, etc.) properly through the URL.
|
|
45
|
+
// const title = isServer ? '' : encodeURIComponent(document.title)
|
|
46
|
+
|
|
43
47
|
var defaultsMap = {
|
|
44
48
|
facebook: {
|
|
45
49
|
icon: 'f',
|
|
46
|
-
link: "https://www.facebook.com/sharer/sharer.php?u=".concat(link
|
|
50
|
+
link: "https://www.facebook.com/sharer/sharer.php?u=".concat(link) // link: `https://www.facebook.com/sharer/sharer.php?u=${link}"e=${title}`,
|
|
51
|
+
|
|
47
52
|
},
|
|
48
53
|
twitter: {
|
|
49
54
|
icon: 't',
|
|
50
|
-
link: "https://twitter.com/intent/tweet?
|
|
55
|
+
link: "https://twitter.com/intent/tweet?url=".concat(link) // link: `https://twitter.com/intent/tweet?text=${title}&url=${link}`,
|
|
56
|
+
|
|
51
57
|
}
|
|
52
58
|
};
|
|
53
59
|
return /*#__PURE__*/React.createElement("a", {
|
|
@@ -98,7 +98,7 @@ var QueryCombobox = _ref => {
|
|
|
98
98
|
} = _ref2;
|
|
99
99
|
return {
|
|
100
100
|
value: node[optionsKeyMap.value],
|
|
101
|
-
label:
|
|
101
|
+
label: optionsKeyMap.getLabel(node)
|
|
102
102
|
};
|
|
103
103
|
}));
|
|
104
104
|
}
|
|
@@ -193,7 +193,7 @@ QueryCombobox.propTypes = {
|
|
|
193
193
|
*/
|
|
194
194
|
optionsKeyMap: _propTypes.default.shape({
|
|
195
195
|
value: _propTypes.default.string.isRequired,
|
|
196
|
-
|
|
196
|
+
getLabel: _propTypes.default.func.isRequired
|
|
197
197
|
}),
|
|
198
198
|
|
|
199
199
|
/**
|
|
@@ -224,7 +224,7 @@ QueryCombobox.propTypes = {
|
|
|
224
224
|
QueryCombobox.defaultProps = {
|
|
225
225
|
optionsKeyMap: {
|
|
226
226
|
value: 'id',
|
|
227
|
-
|
|
227
|
+
getLabel: node => node.name
|
|
228
228
|
},
|
|
229
229
|
multiple: false,
|
|
230
230
|
color: 'background2',
|
|
@@ -77,7 +77,7 @@ var QuerySelect = _ref => {
|
|
|
77
77
|
} = _ref2;
|
|
78
78
|
return {
|
|
79
79
|
value: node[optionsKeyMap.value],
|
|
80
|
-
label:
|
|
80
|
+
label: optionsKeyMap.getLabel(node)
|
|
81
81
|
};
|
|
82
82
|
})]);
|
|
83
83
|
}
|
|
@@ -162,8 +162,8 @@ QuerySelect.propTypes = {
|
|
|
162
162
|
*/
|
|
163
163
|
optionsKeyMap: _propTypes.default.shape({
|
|
164
164
|
value: _propTypes.default.string.isRequired,
|
|
165
|
-
|
|
166
|
-
}),
|
|
165
|
+
getLabel: _propTypes.default.func.isRequired
|
|
166
|
+
}).isRequired,
|
|
167
167
|
|
|
168
168
|
/**
|
|
169
169
|
* The default select option for the query select
|
|
@@ -60,7 +60,7 @@ var TaskRecommendationInput = _ref => {
|
|
|
60
60
|
}, /*#__PURE__*/React.createElement("div", {
|
|
61
61
|
className: "v1 p-v task"
|
|
62
62
|
}, /*#__PURE__*/React.createElement(_common.FormLabel, {
|
|
63
|
-
className: "uc mb-v ".concat(isOptionSelected ?
|
|
63
|
+
className: "uc mb-v ".concat(isOptionSelected ? 'c-on-x' : 'c-x'),
|
|
64
64
|
name: name
|
|
65
65
|
}, label), /*#__PURE__*/React.createElement("input", _extends({}, field, {
|
|
66
66
|
value: value,
|
|
@@ -23,16 +23,22 @@ const SocialMediaShareButton = ({
|
|
|
23
23
|
import("./styles.scss");
|
|
24
24
|
}, []);
|
|
25
25
|
const isServer = typeof window === 'undefined';
|
|
26
|
-
const
|
|
27
|
-
|
|
26
|
+
const link = isServer ? '' : window.location.href; // We can pass additional text to the social media share buttons such as the title.
|
|
27
|
+
// See commented code below for an example on how to pass text.
|
|
28
|
+
// It is important we encode the text with the encodeURIComponent function to pass
|
|
29
|
+
// special characters (such as |, &, etc.) properly through the URL.
|
|
30
|
+
// const title = isServer ? '' : encodeURIComponent(document.title)
|
|
31
|
+
|
|
28
32
|
const defaultsMap = {
|
|
29
33
|
facebook: {
|
|
30
34
|
icon: 'f',
|
|
31
|
-
link: `https://www.facebook.com/sharer/sharer.php?u=${link}"e=${title}
|
|
35
|
+
link: `https://www.facebook.com/sharer/sharer.php?u=${link}` // link: `https://www.facebook.com/sharer/sharer.php?u=${link}"e=${title}`,
|
|
36
|
+
|
|
32
37
|
},
|
|
33
38
|
twitter: {
|
|
34
39
|
icon: 't',
|
|
35
|
-
link: `https://twitter.com/intent/tweet?text=${title}&url=${link}
|
|
40
|
+
link: `https://twitter.com/intent/tweet?url=${link}` // link: `https://twitter.com/intent/tweet?text=${title}&url=${link}`,
|
|
41
|
+
|
|
36
42
|
}
|
|
37
43
|
};
|
|
38
44
|
return /*#__PURE__*/React.createElement("a", {
|
|
@@ -77,7 +77,7 @@ const QueryCombobox = ({
|
|
|
77
77
|
node
|
|
78
78
|
}) => ({
|
|
79
79
|
value: node[optionsKeyMap.value],
|
|
80
|
-
label:
|
|
80
|
+
label: optionsKeyMap.getLabel(node)
|
|
81
81
|
})));
|
|
82
82
|
}
|
|
83
83
|
});
|
|
@@ -171,7 +171,7 @@ QueryCombobox.propTypes = {
|
|
|
171
171
|
*/
|
|
172
172
|
optionsKeyMap: PropTypes.shape({
|
|
173
173
|
value: PropTypes.string.isRequired,
|
|
174
|
-
|
|
174
|
+
getLabel: PropTypes.func.isRequired
|
|
175
175
|
}),
|
|
176
176
|
|
|
177
177
|
/**
|
|
@@ -202,7 +202,7 @@ QueryCombobox.propTypes = {
|
|
|
202
202
|
QueryCombobox.defaultProps = {
|
|
203
203
|
optionsKeyMap: {
|
|
204
204
|
value: 'id',
|
|
205
|
-
|
|
205
|
+
getLabel: node => node.name
|
|
206
206
|
},
|
|
207
207
|
multiple: false,
|
|
208
208
|
color: 'background2',
|
|
@@ -57,7 +57,7 @@ const QuerySelect = ({
|
|
|
57
57
|
node
|
|
58
58
|
}) => ({
|
|
59
59
|
value: node[optionsKeyMap.value],
|
|
60
|
-
label:
|
|
60
|
+
label: optionsKeyMap.getLabel(node)
|
|
61
61
|
}))]);
|
|
62
62
|
}
|
|
63
63
|
});
|
|
@@ -141,8 +141,8 @@ QuerySelect.propTypes = {
|
|
|
141
141
|
*/
|
|
142
142
|
optionsKeyMap: PropTypes.shape({
|
|
143
143
|
value: PropTypes.string.isRequired,
|
|
144
|
-
|
|
145
|
-
}),
|
|
144
|
+
getLabel: PropTypes.func.isRequired
|
|
145
|
+
}).isRequired,
|
|
146
146
|
|
|
147
147
|
/**
|
|
148
148
|
* The default select option for the query select
|
|
@@ -43,7 +43,7 @@ const TaskRecommendationInput = ({
|
|
|
43
43
|
}, /*#__PURE__*/React.createElement("div", {
|
|
44
44
|
className: "v1 p-v task"
|
|
45
45
|
}, /*#__PURE__*/React.createElement(FormLabel, {
|
|
46
|
-
className: `uc mb-v ${isOptionSelected ?
|
|
46
|
+
className: `uc mb-v ${isOptionSelected ? 'c-on-x' : 'c-x'}`,
|
|
47
47
|
name: name
|
|
48
48
|
}, label), /*#__PURE__*/React.createElement("input", _extends({}, field, {
|
|
49
49
|
value: value,
|
package/package.json
CHANGED
|
@@ -10195,7 +10195,7 @@ exports[`Storyshots c/SocialMediaShareButton Base 1`] = `
|
|
|
10195
10195
|
<div>
|
|
10196
10196
|
<a
|
|
10197
10197
|
className="base social-media-share-button x-facebook"
|
|
10198
|
-
href="https://www.facebook.com/sharer/sharer.php?u=http://localhost/#/welcome
|
|
10198
|
+
href="https://www.facebook.com/sharer/sharer.php?u=http://localhost/#/welcome"
|
|
10199
10199
|
rel="noreferrer"
|
|
10200
10200
|
target="_blank"
|
|
10201
10201
|
>
|
|
@@ -10207,7 +10207,7 @@ exports[`Storyshots c/SocialMediaShareButton Base 1`] = `
|
|
|
10207
10207
|
</a>
|
|
10208
10208
|
<a
|
|
10209
10209
|
className="base social-media-share-button x-twitter"
|
|
10210
|
-
href="https://twitter.com/intent/tweet?
|
|
10210
|
+
href="https://twitter.com/intent/tweet?url=http://localhost/#/welcome"
|
|
10211
10211
|
rel="noreferrer"
|
|
10212
10212
|
target="_blank"
|
|
10213
10213
|
>
|
|
@@ -194,8 +194,8 @@ export const WithQueryCombobox = () => {
|
|
|
194
194
|
},
|
|
195
195
|
label :'Search for a team',
|
|
196
196
|
optionsKeyMap:{
|
|
197
|
-
value:'id',
|
|
198
|
-
|
|
197
|
+
value :'id',
|
|
198
|
+
getLabel:(node) => node.name,
|
|
199
199
|
},
|
|
200
200
|
searchVariable:'name_Icontains',
|
|
201
201
|
},
|
|
@@ -208,8 +208,8 @@ export const WithQueryCombobox = () => {
|
|
|
208
208
|
},
|
|
209
209
|
label :'Search for teams',
|
|
210
210
|
optionsKeyMap:{
|
|
211
|
-
value:'id',
|
|
212
|
-
|
|
211
|
+
value :'id',
|
|
212
|
+
getLabel:(node) => node.name,
|
|
213
213
|
},
|
|
214
214
|
searchVariable:'name_Icontains',
|
|
215
215
|
multiple :true,
|
|
@@ -311,8 +311,8 @@ export const WithPrefetchedQuerySelect = () => {
|
|
|
311
311
|
},
|
|
312
312
|
label :'Select Task Status',
|
|
313
313
|
optionsKeyMap:{
|
|
314
|
-
value:'id',
|
|
315
|
-
|
|
314
|
+
value :'id',
|
|
315
|
+
getLabel:(node) => node.status,
|
|
316
316
|
},
|
|
317
317
|
},
|
|
318
318
|
]
|
|
@@ -120,8 +120,8 @@ const ResolvedTemplate = ({ multiple, defaultFormikState }) => {
|
|
|
120
120
|
<QueryCombobox
|
|
121
121
|
label="Search for a team"
|
|
122
122
|
optionsKeyMap={{
|
|
123
|
-
value:'id',
|
|
124
|
-
|
|
123
|
+
value :'id',
|
|
124
|
+
getLabel:(node) => node.name,
|
|
125
125
|
}}
|
|
126
126
|
query={{
|
|
127
127
|
graphql :FETCH_TEAMS_QUERY,
|
|
@@ -31,17 +31,25 @@ const SocialMediaShareButton = ({
|
|
|
31
31
|
|
|
32
32
|
const isServer = typeof window === 'undefined'
|
|
33
33
|
|
|
34
|
-
const title = isServer ? '' : document.title
|
|
35
34
|
const link = isServer ? '' : window.location.href
|
|
36
35
|
|
|
36
|
+
// We can pass additional text to the social media share buttons such as the title.
|
|
37
|
+
// See commented code below for an example on how to pass text.
|
|
38
|
+
// It is important we encode the text with the encodeURIComponent function to pass
|
|
39
|
+
// special characters (such as |, &, etc.) properly through the URL.
|
|
40
|
+
|
|
41
|
+
// const title = isServer ? '' : encodeURIComponent(document.title)
|
|
42
|
+
|
|
37
43
|
const defaultsMap = {
|
|
38
44
|
facebook:{
|
|
39
45
|
icon:'f',
|
|
40
|
-
link:`https://www.facebook.com/sharer/sharer.php?u=${link}
|
|
46
|
+
link:`https://www.facebook.com/sharer/sharer.php?u=${link}`,
|
|
47
|
+
// link: `https://www.facebook.com/sharer/sharer.php?u=${link}"e=${title}`,
|
|
41
48
|
},
|
|
42
49
|
twitter:{
|
|
43
50
|
icon:'t',
|
|
44
|
-
link:`https://twitter.com/intent/tweet?
|
|
51
|
+
link:`https://twitter.com/intent/tweet?url=${link}`,
|
|
52
|
+
// link: `https://twitter.com/intent/tweet?text=${title}&url=${link}`,
|
|
45
53
|
},
|
|
46
54
|
}
|
|
47
55
|
|
|
@@ -84,7 +84,7 @@ const QueryCombobox = ({
|
|
|
84
84
|
next:(data) => {
|
|
85
85
|
setOptions(data[accessor].edges.map(({ node }) => ({
|
|
86
86
|
value:node[optionsKeyMap.value],
|
|
87
|
-
label:
|
|
87
|
+
label:optionsKeyMap.getLabel(node),
|
|
88
88
|
})))
|
|
89
89
|
},
|
|
90
90
|
})
|
|
@@ -182,8 +182,8 @@ QueryCombobox.propTypes = {
|
|
|
182
182
|
* i.e `{ value: 'id', label: 'name' }`
|
|
183
183
|
*/
|
|
184
184
|
optionsKeyMap:PropTypes.shape({
|
|
185
|
-
value:PropTypes.string.isRequired,
|
|
186
|
-
|
|
185
|
+
value :PropTypes.string.isRequired,
|
|
186
|
+
getLabel:PropTypes.func.isRequired,
|
|
187
187
|
}),
|
|
188
188
|
|
|
189
189
|
/**
|
|
@@ -214,8 +214,8 @@ QueryCombobox.propTypes = {
|
|
|
214
214
|
|
|
215
215
|
QueryCombobox.defaultProps = {
|
|
216
216
|
optionsKeyMap:{
|
|
217
|
-
value:'id',
|
|
218
|
-
|
|
217
|
+
value :'id',
|
|
218
|
+
getLabel:(node) => node.name,
|
|
219
219
|
},
|
|
220
220
|
multiple :false,
|
|
221
221
|
color :'background2',
|
|
@@ -69,7 +69,7 @@ const QuerySelect = ({
|
|
|
69
69
|
defaultOption,
|
|
70
70
|
...data[accessor].edges.map(({ node }) => ({
|
|
71
71
|
value:node[optionsKeyMap.value],
|
|
72
|
-
label:
|
|
72
|
+
label:optionsKeyMap.getLabel(node),
|
|
73
73
|
})),
|
|
74
74
|
])
|
|
75
75
|
},
|
|
@@ -159,9 +159,9 @@ QuerySelect.propTypes = {
|
|
|
159
159
|
* i.e `{ value: 'id', label: 'name' }`
|
|
160
160
|
*/
|
|
161
161
|
optionsKeyMap:PropTypes.shape({
|
|
162
|
-
value:PropTypes.string.isRequired,
|
|
163
|
-
|
|
164
|
-
}),
|
|
162
|
+
value :PropTypes.string.isRequired,
|
|
163
|
+
getLabel:PropTypes.func.isRequired,
|
|
164
|
+
}).isRequired,
|
|
165
165
|
|
|
166
166
|
/**
|
|
167
167
|
* The default select option for the query select
|
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
|
|
8
|
-
var React = _interopRequireWildcard(require("react"));
|
|
9
|
-
|
|
10
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
-
|
|
12
|
-
var _bem = _interopRequireDefault(require("@pareto-engineering/bem"));
|
|
13
|
-
|
|
14
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
-
|
|
16
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
17
|
-
|
|
18
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
19
|
-
|
|
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
|
-
|
|
22
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
23
|
-
|
|
24
|
-
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; }
|
|
25
|
-
|
|
26
|
-
// Local Definitions
|
|
27
|
-
var baseClassName = _bem.default.base;
|
|
28
|
-
var componentClassName = 'gradient-background';
|
|
29
|
-
/**
|
|
30
|
-
* This is the component description.
|
|
31
|
-
*/
|
|
32
|
-
|
|
33
|
-
var GradientBackground = _ref => {
|
|
34
|
-
var {
|
|
35
|
-
id,
|
|
36
|
-
className: userClassName,
|
|
37
|
-
style,
|
|
38
|
-
pin,
|
|
39
|
-
shape,
|
|
40
|
-
height,
|
|
41
|
-
width // ...otherProps
|
|
42
|
-
|
|
43
|
-
} = _ref;
|
|
44
|
-
(0, React.useLayoutEffect)(() => {
|
|
45
|
-
Promise.resolve().then(() => _interopRequireWildcard(require("./styles.scss")));
|
|
46
|
-
}, []);
|
|
47
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
48
|
-
id: id,
|
|
49
|
-
className: [baseClassName, componentClassName, userClassName].filter(e => e).join(' '),
|
|
50
|
-
style: _objectSpread(_objectSpread({}, style), {}, {
|
|
51
|
-
'--pin': pin,
|
|
52
|
-
'--height': height,
|
|
53
|
-
'--width': width
|
|
54
|
-
}) // {...otherProps}
|
|
55
|
-
|
|
56
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
57
|
-
className: "shapes"
|
|
58
|
-
}, shape === 'triangle' && /*#__PURE__*/React.createElement("div", {
|
|
59
|
-
className: "triangle"
|
|
60
|
-
}), shape === 'half-ellipses' && /*#__PURE__*/React.createElement("div", {
|
|
61
|
-
className: "half-ellipses"
|
|
62
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
63
|
-
className: "up"
|
|
64
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
65
|
-
className: "down"
|
|
66
|
-
})), shape === 'ellipse' && /*#__PURE__*/React.createElement("div", {
|
|
67
|
-
className: "ellipse"
|
|
68
|
-
}), shape === 'diamonds' && /*#__PURE__*/React.createElement("div", {
|
|
69
|
-
className: "diamonds"
|
|
70
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
71
|
-
className: "top-right"
|
|
72
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
73
|
-
className: "bottom-left"
|
|
74
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
75
|
-
className: "bottom-right"
|
|
76
|
-
})), shape === 'rectangles' && /*#__PURE__*/React.createElement("div", {
|
|
77
|
-
className: "rectangles"
|
|
78
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
79
|
-
className: "top"
|
|
80
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
81
|
-
className: "center"
|
|
82
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
83
|
-
className: "bottom"
|
|
84
|
-
})), shape === 'half-ellipse' && /*#__PURE__*/React.createElement("div", {
|
|
85
|
-
className: "half-ellipse"
|
|
86
|
-
}), shape === 'circle' && /*#__PURE__*/React.createElement("div", {
|
|
87
|
-
className: "circle"
|
|
88
|
-
}), shape === 'half-circle' && /*#__PURE__*/React.createElement("div", {
|
|
89
|
-
className: "half-circle"
|
|
90
|
-
}), shape === 'ellipses' && /*#__PURE__*/React.createElement("div", {
|
|
91
|
-
className: "ellipses"
|
|
92
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
93
|
-
className: "first"
|
|
94
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
95
|
-
className: "second"
|
|
96
|
-
})), shape === 'spiral' && /*#__PURE__*/React.createElement("div", {
|
|
97
|
-
className: "spiral"
|
|
98
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
99
|
-
className: "quater-circle-one"
|
|
100
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
101
|
-
className: "quater-circle-two"
|
|
102
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
103
|
-
className: "quater-circle-three"
|
|
104
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
105
|
-
className: "quater-circle-four"
|
|
106
|
-
}))));
|
|
107
|
-
};
|
|
108
|
-
|
|
109
|
-
GradientBackground.propTypes = {
|
|
110
|
-
/**
|
|
111
|
-
* The HTML id for this element
|
|
112
|
-
*/
|
|
113
|
-
id: _propTypes.default.string,
|
|
114
|
-
|
|
115
|
-
/**
|
|
116
|
-
* The HTML class names for this element
|
|
117
|
-
*/
|
|
118
|
-
className: _propTypes.default.string,
|
|
119
|
-
|
|
120
|
-
/**
|
|
121
|
-
* The React-written, css properties for this element.
|
|
122
|
-
*/
|
|
123
|
-
style: _propTypes.default.objectOf(_propTypes.default.string),
|
|
124
|
-
|
|
125
|
-
/**
|
|
126
|
-
* Where to pin the shapes
|
|
127
|
-
*/
|
|
128
|
-
pin: _propTypes.default.oneOf(['flex-start', 'center', 'flex-end']),
|
|
129
|
-
|
|
130
|
-
/**
|
|
131
|
-
* The options of a shape to use
|
|
132
|
-
*/
|
|
133
|
-
shape: _propTypes.default.oneOf(['triangle', 'ellipse', 'half-ellipse', 'half-ellipses', 'spiral', 'diamonds', 'circle', 'half-circle', 'ellipses', 'rectangles'])
|
|
134
|
-
};
|
|
135
|
-
GradientBackground.defaultProps = {
|
|
136
|
-
pin: 'center',
|
|
137
|
-
shape: 'triangle'
|
|
138
|
-
};
|
|
139
|
-
var _default = GradientBackground;
|
|
140
|
-
exports.default = _default;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "GradientBackground", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function get() {
|
|
9
|
-
return _GradientBackground.default;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
var _GradientBackground = _interopRequireDefault(require("./GradientBackground"));
|
|
14
|
-
|
|
15
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|