@uncinc/uncinc-react-kitchen-sink 2.3.3 → 2.3.4
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/Context/withMapping.js +1 -6
- package/dist/components/Accordion/AccordionItem/index.js +0 -5
- package/dist/components/Accordion/AccordionItemVariant/index.js +0 -5
- package/dist/components/Accordion/index.js +0 -2
- package/dist/components/ApiAutocomplete/index.js +6 -12
- package/dist/components/Button/index.js +4 -10
- package/dist/components/Cookie/Checkbox/index.js +0 -2
- package/dist/components/Cookie/index.js +39 -34
- package/dist/components/FontSizeSwitcher/index.js +2 -8
- package/dist/components/Form/Checkbox/index.js +1 -4
- package/dist/components/Form/Checkbox/stories.js +0 -2
- package/dist/components/Form/Checkboxes/index.js +1 -7
- package/dist/components/Form/Checkboxes/index.test.js +8 -4
- package/dist/components/Form/Checkboxes/stories.js +1 -4
- package/dist/components/Form/Date/index.js +1 -4
- package/dist/components/Form/Date/stories.js +0 -2
- package/dist/components/Form/DatePicker/index.js +0 -2
- package/dist/components/Form/DatePicker/stories.js +0 -2
- package/dist/components/Form/DateSelect/index.js +110 -85
- package/dist/components/Form/DateSelect/stories.js +24 -15
- package/dist/components/Form/DateSelect/style.scss +10 -4
- package/dist/components/Form/Email/index.js +1 -4
- package/dist/components/Form/Email/stories.js +0 -2
- package/dist/components/Form/FormikWrapper/index.js +9 -15
- package/dist/components/Form/GenericFormElement/index.js +0 -2
- package/dist/components/Form/Number/index.js +1 -10
- package/dist/components/Form/Number/stories.js +0 -2
- package/dist/components/Form/RadioButtons/index.js +1 -7
- package/dist/components/Form/RadioButtons/index.test.js +8 -4
- package/dist/components/Form/RadioButtons/stories.js +1 -4
- package/dist/components/Form/SearchField/index.js +0 -2
- package/dist/components/Form/Select/Input/index.js +4 -14
- package/dist/components/Form/Select/index.js +1 -4
- package/dist/components/Form/Select/stories.js +0 -4
- package/dist/components/Form/TextField/index.js +0 -6
- package/dist/components/Form/TextField/index.test.js +8 -4
- package/dist/components/Form/TextField/stories.js +1 -4
- package/dist/components/Form/Textarea/index.js +0 -2
- package/dist/components/Form/Textarea/stories.js +0 -2
- package/dist/components/Hamburger/index.js +0 -2
- package/dist/components/Header/index.js +4 -9
- package/dist/components/Image/Background/index.js +1 -7
- package/dist/components/Image/LazyLoadWrapper/index.js +0 -12
- package/dist/components/Image/Picture/index.js +4 -19
- package/dist/components/Image/index.js +0 -4
- package/dist/components/InlineMenu/index.js +0 -9
- package/dist/components/Layout/Container/index.js +1 -4
- package/dist/components/Layout/Container/stories.js +0 -3
- package/dist/components/Layout/QuickLayout/Auto/index.js +0 -2
- package/dist/components/Layout/QuickLayout/Center/index.js +0 -2
- package/dist/components/Layout/QuickLayout/Clamp/index.js +0 -2
- package/dist/components/Layout/QuickLayout/Sidebar/index.js +0 -2
- package/dist/components/Layout/QuickLayout/SpaceBetween/index.js +0 -2
- package/dist/components/Layout/QuickLayout/Stack/index.js +1 -4
- package/dist/components/Layout/QuickLayout/Wrap/index.js +0 -2
- package/dist/components/Layout/QuickLayout/index.js +0 -9
- package/dist/components/Lottie/LottieAnimation/index.js +12 -17
- package/dist/components/Lottie/LottieAnimationWithMousePosition.js +8 -9
- package/dist/components/Lottie/index.js +3 -3
- package/dist/components/Lottie/stories.js +10 -5
- package/dist/components/MagicLine/index.js +0 -14
- package/dist/components/MagicLine/stories.js +0 -2
- package/dist/components/NavigationScroll/index.js +2 -12
- package/dist/components/Pagination/index.js +0 -7
- package/dist/components/SearchKit/Facets/ChipFacet/index.js +0 -2
- package/dist/components/SearchKit/Facets/HierarchicalFilterFacet/index.js +0 -2
- package/dist/components/SearchKit/Facets/HierarchicalMenuFacet/index.js +0 -2
- package/dist/components/SearchKit/Facets/SelectFacet/index.js +0 -6
- package/dist/components/SearchKit/Query/index.js +3 -6
- package/dist/components/SearchKit/SearchFacets/index.js +0 -7
- package/dist/components/SearchKit/SearchField/index.js +0 -9
- package/dist/components/SearchKit/SearchLoadMore/index.js +0 -7
- package/dist/components/SearchKit/SearchPage/index.js +3 -9
- package/dist/components/SearchKit/SearchPagination/index.js +0 -5
- package/dist/components/SearchKit/SearchReset/index.js +0 -2
- package/dist/components/SearchKit/SearchResults/index.js +6 -11
- package/dist/components/SearchKit/SearchSelectedFilters/index.js +0 -4
- package/dist/components/SearchKit/SearchSorting/index.js +0 -2
- package/dist/components/SearchKit/index.js +0 -3
- package/dist/components/SearchKit/stories.js +2 -7
- package/dist/components/Share/index.js +0 -3
- package/dist/components/Sliders/SliderRelated/index.js +1 -6
- package/dist/components/Sliders/SliderRelated/stories.js +1 -4
- package/dist/components/Webform/WebformActions/index.js +0 -2
- package/dist/components/Webform/WebformCheckbox/index.js +1 -8
- package/dist/components/Webform/WebformCheckboxes/index.js +1 -9
- package/dist/components/Webform/WebformContainer/index.js +5 -6
- package/dist/components/Webform/WebformDate/index.js +12 -18
- package/dist/components/Webform/WebformMapper/index.js +1 -18
- package/dist/components/Webform/WebformNumber/index.js +1 -4
- package/dist/components/Webform/WebformRadioButtons/index.js +1 -9
- package/dist/components/Webform/WebformSelect/index.js +1 -9
- package/dist/components/Webform/WebformTextField/index.js +1 -8
- package/dist/components/Webform/WebformTextarea/index.js +1 -8
- package/dist/components/Webform/WebformWizardPage/index.js +6 -8
- package/dist/components/Webform/index.js +1 -8
- package/dist/components/Webform/withStates.js +6 -19
- package/dist/components/WysiwygField/index.js +1 -8
- package/dist/components/WysiwygField/stories.js +0 -3
- package/dist/config/constants.js +3 -4
- package/dist/config/i18next/index.js +23 -0
- package/dist/config/i18next/locales/en.json +22 -0
- package/dist/config/i18next/locales/nl.json +22 -0
- package/dist/helpers/gtm.js +11 -15
- package/dist/helpers/link.js +0 -4
- package/dist/helpers/useValueForCurrentViewPort.js +20 -14
- package/dist/hooks/useOnScreen.js +2 -2
- package/dist/hooks/usePrevious.js +3 -2
- package/dist/hooks/useScrollPosition.js +0 -3
- package/dist/hooks/useWindowDimensions.js +0 -3
- package/package.json +14 -5
- package/dist/pages/api/graphql.js +0 -25
|
@@ -3,7 +3,6 @@ import { useSearchkit, useSearchkitQueryValue } from "@searchkit/client";
|
|
|
3
3
|
import FormikWrapper from '../../Form/FormikWrapper';
|
|
4
4
|
import Button from '../../Button';
|
|
5
5
|
import TextField from '../../Form/TextField';
|
|
6
|
-
|
|
7
6
|
const SearchField = ({
|
|
8
7
|
timeout,
|
|
9
8
|
autoSearch = true,
|
|
@@ -14,35 +13,28 @@ const SearchField = ({
|
|
|
14
13
|
const api = useSearchkit();
|
|
15
14
|
const timeoutRef = useRef();
|
|
16
15
|
const fieldLabel = false;
|
|
17
|
-
|
|
18
16
|
const searchQuery = query => {
|
|
19
17
|
setQuery(query);
|
|
20
18
|
api.setQuery(query);
|
|
21
19
|
api.search();
|
|
22
20
|
};
|
|
23
|
-
|
|
24
21
|
const onSubmit = (values, form) => {
|
|
25
22
|
searchQuery(values.query);
|
|
26
23
|
};
|
|
27
|
-
|
|
28
24
|
const onChange = e => {
|
|
29
25
|
e.persist();
|
|
30
|
-
|
|
31
26
|
if (timeoutRef.current) {
|
|
32
27
|
clearTimeout(timeoutRef.current);
|
|
33
28
|
}
|
|
34
|
-
|
|
35
29
|
timeoutRef.current = setTimeout(() => {
|
|
36
30
|
searchQuery(e.target.value);
|
|
37
31
|
}, timeout);
|
|
38
32
|
};
|
|
39
|
-
|
|
40
33
|
const handleEnter = event => {
|
|
41
34
|
if (event.key === 'Enter') {
|
|
42
35
|
onSubmit();
|
|
43
36
|
}
|
|
44
37
|
};
|
|
45
|
-
|
|
46
38
|
return /*#__PURE__*/React.createElement(FormikWrapper, {
|
|
47
39
|
initialValues: {
|
|
48
40
|
query: query
|
|
@@ -60,7 +52,6 @@ const SearchField = ({
|
|
|
60
52
|
primary: true
|
|
61
53
|
}, buttonText));
|
|
62
54
|
};
|
|
63
|
-
|
|
64
55
|
SearchField.defaultProps = {
|
|
65
56
|
timeout: 1000,
|
|
66
57
|
autoSearch: true,
|
|
@@ -1,18 +1,15 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useSearchkit } from '@searchkit/client';
|
|
3
3
|
import Button from '../../Button';
|
|
4
|
-
|
|
5
4
|
const SearchLoadMore = ({
|
|
6
5
|
data,
|
|
7
6
|
label,
|
|
8
7
|
className
|
|
9
8
|
}) => {
|
|
10
9
|
const api = useSearchkit();
|
|
11
|
-
|
|
12
10
|
if (!data) {
|
|
13
11
|
return null;
|
|
14
12
|
}
|
|
15
|
-
|
|
16
13
|
const setNextPage = () => {
|
|
17
14
|
if (data) {
|
|
18
15
|
api.setPage({
|
|
@@ -22,19 +19,15 @@ const SearchLoadMore = ({
|
|
|
22
19
|
api.search();
|
|
23
20
|
}
|
|
24
21
|
};
|
|
25
|
-
|
|
26
22
|
const currentPage = data.results.hits.page.pageNumber;
|
|
27
23
|
const lastPage = data.results.hits.page.totalPages;
|
|
28
|
-
|
|
29
24
|
if (currentPage + 1 >= lastPage) {
|
|
30
25
|
return null;
|
|
31
26
|
}
|
|
32
|
-
|
|
33
27
|
return /*#__PURE__*/React.createElement("div", {
|
|
34
28
|
className: className
|
|
35
29
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
36
30
|
onClick: setNextPage
|
|
37
31
|
}, label));
|
|
38
32
|
};
|
|
39
|
-
|
|
40
33
|
export default SearchLoadMore;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { withSearchkitRouting } from '@searchkit/client';
|
|
3
3
|
import { EuiPage } from '@elastic/eui';
|
|
4
|
-
|
|
5
4
|
const SearchPage = ({
|
|
6
5
|
children
|
|
7
6
|
}) => /*#__PURE__*/React.createElement(EuiPage, null, children);
|
|
8
|
-
|
|
9
7
|
export const routeToStateFn = routeState => {
|
|
10
8
|
const value = {
|
|
11
9
|
query: routeState.query || '',
|
|
@@ -15,37 +13,33 @@ export const routeToStateFn = routeState => {
|
|
|
15
13
|
size: Number(routeState.size) || 10,
|
|
16
14
|
from: Number(routeState.from) || 0
|
|
17
15
|
}
|
|
18
|
-
};
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
// Map Number values for min and max filters. By default they
|
|
19
19
|
// are parsed as strings, which does not comply to the schema.
|
|
20
20
|
// The 'qs' package is at fault here.
|
|
21
21
|
// @see https://github.com/ljharb/qs/issues/91
|
|
22
|
-
|
|
23
22
|
value.filters = value.filters.map(item => {
|
|
24
23
|
if (item.min) {
|
|
25
24
|
item.min = Number(item.min);
|
|
26
25
|
}
|
|
27
|
-
|
|
28
26
|
if (item.max) {
|
|
29
27
|
item.max = Number(item.max);
|
|
30
28
|
}
|
|
31
|
-
|
|
32
29
|
if (item.boolValue) {
|
|
33
30
|
item.boolValue = !!item.boolValue;
|
|
34
31
|
}
|
|
35
|
-
|
|
36
32
|
if (item.geoBoundingBox) {
|
|
37
33
|
item.geoBoundingBox.topLeft.lat = Number(item.geoBoundingBox.topLeft.lat);
|
|
38
34
|
item.geoBoundingBox.topLeft.lon = Number(item.geoBoundingBox.topLeft.lon);
|
|
39
35
|
item.geoBoundingBox.bottomRight.lat = Number(item.geoBoundingBox.bottomRight.lat);
|
|
40
36
|
item.geoBoundingBox.bottomRight.lon = Number(item.geoBoundingBox.bottomRight.lon);
|
|
41
37
|
}
|
|
42
|
-
|
|
43
38
|
if (item.geoRadius) {
|
|
44
39
|
item.geoRadius.radius = Number(item.geoRadius.radius);
|
|
45
40
|
item.geoRadius.center.lat = Number(item.geoRadius.center.lat);
|
|
46
41
|
item.geoRadius.center.lon = Number(item.geoRadius.center.lon);
|
|
47
42
|
}
|
|
48
|
-
|
|
49
43
|
return item;
|
|
50
44
|
});
|
|
51
45
|
return value;
|
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useSearchkit } from '@searchkit/client';
|
|
3
3
|
import Pagination from '../../Pagination';
|
|
4
|
-
|
|
5
4
|
const SearchPagination = ({
|
|
6
5
|
data
|
|
7
6
|
}) => {
|
|
8
7
|
const api = useSearchkit();
|
|
9
|
-
|
|
10
8
|
if (!data) {
|
|
11
9
|
return null;
|
|
12
10
|
}
|
|
13
|
-
|
|
14
11
|
const setCurrentPage = page => {
|
|
15
12
|
if (data && page) {
|
|
16
13
|
api.setPage({
|
|
@@ -20,12 +17,10 @@ const SearchPagination = ({
|
|
|
20
17
|
api.search();
|
|
21
18
|
}
|
|
22
19
|
};
|
|
23
|
-
|
|
24
20
|
return /*#__PURE__*/React.createElement(Pagination, {
|
|
25
21
|
setCurrentPage: setCurrentPage,
|
|
26
22
|
totalPages: data.results.hits.page.totalPages,
|
|
27
23
|
currentPage: data.results.hits.page.pageNumber + 1
|
|
28
24
|
});
|
|
29
25
|
};
|
|
30
|
-
|
|
31
26
|
export default SearchPagination;
|
|
@@ -2,15 +2,12 @@ import React, { useState, useEffect } from 'react';
|
|
|
2
2
|
import usePrevious from '../../../hooks/usePrevious';
|
|
3
3
|
import { useSearchkitVariables } from '@searchkit/client';
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
|
-
|
|
6
5
|
const SearchResultItemDefault = ({
|
|
7
6
|
item
|
|
8
7
|
}) => /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("h3", null, item.fields.title[0]));
|
|
9
|
-
|
|
10
8
|
const SearchResultHeaderDefault = ({
|
|
11
9
|
data
|
|
12
10
|
}) => /*#__PURE__*/React.createElement("h2", null, data.results.summary.total, " Results");
|
|
13
|
-
|
|
14
11
|
const SearchResults = ({
|
|
15
12
|
data,
|
|
16
13
|
renderItem,
|
|
@@ -37,12 +34,10 @@ const SearchResults = ({
|
|
|
37
34
|
setPreviousSortBy(variables.sortBy);
|
|
38
35
|
setPreviousActiveFilters(variables.filters);
|
|
39
36
|
setCurrentData(JSON.stringify(data));
|
|
40
|
-
|
|
41
37
|
if (!appendResults) {
|
|
42
38
|
// Set items directly if not appendResults
|
|
43
39
|
return setItems([...data.results.hits.items]);
|
|
44
40
|
}
|
|
45
|
-
|
|
46
41
|
const currentPageNumber = data.results.hits.page.pageNumber;
|
|
47
42
|
const currentQuery = variables.query;
|
|
48
43
|
const currentFiltersLength = variables.filters.length;
|
|
@@ -52,8 +47,9 @@ const SearchResults = ({
|
|
|
52
47
|
const filtersChanged = previousActiveFilters.length !== currentFiltersLength;
|
|
53
48
|
const sortByChanged = currentSortBy !== previousSortBy;
|
|
54
49
|
const pageChanged = currentPageNumber !== previousPage;
|
|
55
|
-
const dataChanged = currentData !== newData;
|
|
50
|
+
const dataChanged = currentData !== newData;
|
|
56
51
|
|
|
52
|
+
// Determine if we have to reset the results, or should append them to the results
|
|
57
53
|
if (dataChanged && (queryChanged || filtersChanged || pageChanged || sortByChanged)) {
|
|
58
54
|
if (typeof previousItems === 'undefined' || queryChanged || filtersChanged || sortByChanged) {
|
|
59
55
|
// Overwrite data when Query, Filters or SortBy has changed
|
|
@@ -63,22 +59,22 @@ const SearchResults = ({
|
|
|
63
59
|
setItems([...previousItems, ...data.results.hits.items]);
|
|
64
60
|
}
|
|
65
61
|
}
|
|
66
|
-
}, [data, appendResults, variables]);
|
|
62
|
+
}, [data, appendResults, variables]);
|
|
67
63
|
|
|
64
|
+
// Set the search results when items have changed
|
|
68
65
|
useEffect(() => {
|
|
69
66
|
setSearchResultItems(items.map(item => /*#__PURE__*/React.createElement(SearchResultItem, {
|
|
70
67
|
key: item.id,
|
|
71
68
|
item: item
|
|
72
69
|
})));
|
|
73
|
-
}, [items]);
|
|
70
|
+
}, [items]);
|
|
74
71
|
|
|
72
|
+
// Scroll to top on every page.
|
|
75
73
|
useEffect(() => {
|
|
76
74
|
if (!currentData) {
|
|
77
75
|
return;
|
|
78
76
|
}
|
|
79
|
-
|
|
80
77
|
const currentPageNumber = currentData.results.hits.page.pageNumber;
|
|
81
|
-
|
|
82
78
|
if (appendResults === false && scrollView && scrollView.current && currentPageNumber !== 0) {
|
|
83
79
|
scrollView.current.scrollIntoView({
|
|
84
80
|
behavior: 'smooth',
|
|
@@ -92,7 +88,6 @@ const SearchResults = ({
|
|
|
92
88
|
data: data
|
|
93
89
|
}), searchResultItems);
|
|
94
90
|
};
|
|
95
|
-
|
|
96
91
|
SearchResults.defaultProps = {
|
|
97
92
|
renderItem: SearchResultItemDefault,
|
|
98
93
|
renderHeader: SearchResultHeaderDefault,
|
|
@@ -2,7 +2,6 @@ import React from 'react';
|
|
|
2
2
|
import { useSearchkit } from '@searchkit/client';
|
|
3
3
|
import { SelectedFilters } from '@searchkit/elastic-ui';
|
|
4
4
|
import Button from '../../Button';
|
|
5
|
-
|
|
6
5
|
const SearchSelectedFilters = ({
|
|
7
6
|
data,
|
|
8
7
|
loading
|
|
@@ -19,11 +18,9 @@ const SearchSelectedFilters = ({
|
|
|
19
18
|
}
|
|
20
19
|
}, filter.label, ": ", filter.value);
|
|
21
20
|
};
|
|
22
|
-
|
|
23
21
|
if (!data) {
|
|
24
22
|
return null;
|
|
25
23
|
}
|
|
26
|
-
|
|
27
24
|
return /*#__PURE__*/React.createElement("div", {
|
|
28
25
|
className: "SearchSelectedFilters"
|
|
29
26
|
}, /*#__PURE__*/React.createElement(SelectedFilters, {
|
|
@@ -37,5 +34,4 @@ const SearchSelectedFilters = ({
|
|
|
37
34
|
}
|
|
38
35
|
}));
|
|
39
36
|
};
|
|
40
|
-
|
|
41
37
|
export default SearchSelectedFilters;
|
|
@@ -3,14 +3,12 @@ import React, { useState, useEffect } from 'react';
|
|
|
3
3
|
import SelectStyled from 'react-select';
|
|
4
4
|
import FormikWrapper from '../../Form/FormikWrapper';
|
|
5
5
|
import Select from '../../Form/Select';
|
|
6
|
-
|
|
7
6
|
const useInitialValues = () => {
|
|
8
7
|
const parsed = useSearchkitVariables();
|
|
9
8
|
return {
|
|
10
9
|
'sortBy': parsed.sortBy
|
|
11
10
|
};
|
|
12
11
|
};
|
|
13
|
-
|
|
14
12
|
export const SearchSorting = ({
|
|
15
13
|
data,
|
|
16
14
|
loading
|
|
@@ -8,7 +8,6 @@ import SearchPagination from './SearchPagination';
|
|
|
8
8
|
import SearchResults from './SearchResults';
|
|
9
9
|
import SearchFacets from './SearchFacets';
|
|
10
10
|
import SearchSelectedFilters from './SearchFacets';
|
|
11
|
-
|
|
12
11
|
const defaultChildren = (data, loading) => /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(SearchField, null), /*#__PURE__*/React.createElement(SearchFacets, {
|
|
13
12
|
data: data,
|
|
14
13
|
loading: loading
|
|
@@ -20,7 +19,6 @@ const defaultChildren = (data, loading) => /*#__PURE__*/React.createElement(Reac
|
|
|
20
19
|
}), /*#__PURE__*/React.createElement(SearchPagination, {
|
|
21
20
|
data: data
|
|
22
21
|
}));
|
|
23
|
-
|
|
24
22
|
const SearchKit = ({
|
|
25
23
|
query,
|
|
26
24
|
uri,
|
|
@@ -60,7 +58,6 @@ const SearchKit = ({
|
|
|
60
58
|
useRouting: useRouting
|
|
61
59
|
}, (data, loading) => children ? children(data, loading) : defaultChildren(data, loading))));
|
|
62
60
|
};
|
|
63
|
-
|
|
64
61
|
SearchKit.propTypes = {
|
|
65
62
|
queryString: PropTypes.string,
|
|
66
63
|
uri: PropTypes.string,
|
|
@@ -91,15 +91,12 @@ const query = `
|
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
`;
|
|
94
|
-
|
|
95
94
|
const SearchItem = ({
|
|
96
95
|
item
|
|
97
96
|
}) => /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("h3", null, item.fields.title[0]));
|
|
98
|
-
|
|
99
97
|
const SearchHeader = ({
|
|
100
98
|
data
|
|
101
99
|
}) => /*#__PURE__*/React.createElement("h2", null, data.results.summary.total, " Resultaten");
|
|
102
|
-
|
|
103
100
|
export const Default = () => /*#__PURE__*/React.createElement(SearchKit, {
|
|
104
101
|
uri: "http://localhost:4000/api/graphql",
|
|
105
102
|
query: query
|
|
@@ -121,7 +118,6 @@ export const Default = () => /*#__PURE__*/React.createElement(SearchKit, {
|
|
|
121
118
|
}), /*#__PURE__*/React.createElement(SearchPagination, {
|
|
122
119
|
data: data
|
|
123
120
|
})));
|
|
124
|
-
|
|
125
121
|
const ListFacet = ({
|
|
126
122
|
facet
|
|
127
123
|
}) => {
|
|
@@ -153,7 +149,6 @@ const ListFacet = ({
|
|
|
153
149
|
}, "- ", entry.label, " (", entry.count, ")"));
|
|
154
150
|
})));
|
|
155
151
|
};
|
|
156
|
-
|
|
157
152
|
ListFacet.DISPLAY = 'ListFacet';
|
|
158
153
|
export const CustomFacets = () => {
|
|
159
154
|
const customFacets = [ListFacet];
|
|
@@ -221,7 +216,8 @@ export const LoadMore = () => {
|
|
|
221
216
|
const api = useSearchkit();
|
|
222
217
|
return /*#__PURE__*/React.createElement(SearchKit, {
|
|
223
218
|
uri: "http://localhost:4000/api/graphql",
|
|
224
|
-
query: query
|
|
219
|
+
query: query
|
|
220
|
+
// useRouting={false}
|
|
225
221
|
,
|
|
226
222
|
pageSize: 5
|
|
227
223
|
}, (data, loading) => {
|
|
@@ -232,7 +228,6 @@ export const LoadMore = () => {
|
|
|
232
228
|
});
|
|
233
229
|
api.search();
|
|
234
230
|
};
|
|
235
|
-
|
|
236
231
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("button", {
|
|
237
232
|
onClick: toggleFilter
|
|
238
233
|
}, "Toggle"), /*#__PURE__*/React.createElement(SearchResults, {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { EmailShareButton, FacebookShareButton, LinkedinShareButton, TwitterShareButton, WhatsappShareButton } from "react-share";
|
|
3
3
|
import './style.scss';
|
|
4
|
-
|
|
5
4
|
const ShareButton = ({
|
|
6
5
|
type,
|
|
7
6
|
pageTitle,
|
|
@@ -28,7 +27,6 @@ const ShareButton = ({
|
|
|
28
27
|
className: `icon icon-${type} icon-variant-3`
|
|
29
28
|
}))));
|
|
30
29
|
};
|
|
31
|
-
|
|
32
30
|
const Share = ({
|
|
33
31
|
title,
|
|
34
32
|
pageTitle,
|
|
@@ -56,7 +54,6 @@ const Share = ({
|
|
|
56
54
|
className: "Share__buttons"
|
|
57
55
|
}, buttons)));
|
|
58
56
|
};
|
|
59
|
-
|
|
60
57
|
Share.defaultProps = {
|
|
61
58
|
title: "Share this page:",
|
|
62
59
|
pageTitle: "",
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign
|
|
2
|
-
|
|
1
|
+
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); }
|
|
3
2
|
import React from 'react';
|
|
4
3
|
import Slider from "react-slick";
|
|
5
4
|
import useValueForCurrentViewPort from '../../../helpers/useValueForCurrentViewPort';
|
|
6
5
|
import './style.scss';
|
|
7
|
-
|
|
8
6
|
const SliderNextArrow = ({
|
|
9
7
|
onClick
|
|
10
8
|
}) => {
|
|
@@ -13,7 +11,6 @@ const SliderNextArrow = ({
|
|
|
13
11
|
onClick: onClick
|
|
14
12
|
});
|
|
15
13
|
};
|
|
16
|
-
|
|
17
14
|
const SliderPrevArrow = ({
|
|
18
15
|
onClick
|
|
19
16
|
}) => {
|
|
@@ -22,7 +19,6 @@ const SliderPrevArrow = ({
|
|
|
22
19
|
onClick: onClick
|
|
23
20
|
});
|
|
24
21
|
};
|
|
25
|
-
|
|
26
22
|
const SliderRelated = props => {
|
|
27
23
|
const {
|
|
28
24
|
children,
|
|
@@ -38,7 +34,6 @@ const SliderRelated = props => {
|
|
|
38
34
|
ref: sliderRef
|
|
39
35
|
}), children);
|
|
40
36
|
};
|
|
41
|
-
|
|
42
37
|
SliderRelated.defaultProps = {
|
|
43
38
|
title: null,
|
|
44
39
|
slidesToShow: 3,
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign
|
|
2
|
-
|
|
1
|
+
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); }
|
|
3
2
|
import React from 'react';
|
|
4
3
|
import SliderRelated from '.';
|
|
5
4
|
import Button from '../../Button';
|
|
@@ -16,7 +15,6 @@ export default d;
|
|
|
16
15
|
const defaultProps = {
|
|
17
16
|
autoplay: false
|
|
18
17
|
};
|
|
19
|
-
|
|
20
18
|
const Teaser = ({
|
|
21
19
|
title,
|
|
22
20
|
image,
|
|
@@ -51,7 +49,6 @@ const Teaser = ({
|
|
|
51
49
|
primary: false,
|
|
52
50
|
href: buttonLink
|
|
53
51
|
}, buttonText))));
|
|
54
|
-
|
|
55
52
|
const children = Array.from(Array(6).keys()).map(i => {
|
|
56
53
|
const image = ["https://dummyimage.com/600x400/000/fff", "https://dummyimage.com/600x400/f00/fff", "https://dummyimage.com/600x400/ddd/fff"];
|
|
57
54
|
const title = "Title";
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import c from 'classnames';
|
|
3
3
|
import Button from '../../Button';
|
|
4
|
-
|
|
5
4
|
const WebformActions = props => {
|
|
6
5
|
const {
|
|
7
6
|
entity,
|
|
@@ -17,5 +16,4 @@ const WebformActions = props => {
|
|
|
17
16
|
type: "submit"
|
|
18
17
|
}, entity.get('#submit__label')));
|
|
19
18
|
};
|
|
20
|
-
|
|
21
19
|
export default WebformActions;
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign
|
|
2
|
-
|
|
1
|
+
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); }
|
|
3
2
|
import React from 'react';
|
|
4
3
|
import { useTranslation } from 'react-i18next';
|
|
5
4
|
import Checkbox from '../../Form/Checkbox';
|
|
6
5
|
import withStates from '../withStates';
|
|
7
|
-
|
|
8
6
|
const WebformCheckbox = props => {
|
|
9
7
|
const {
|
|
10
8
|
entity,
|
|
@@ -21,17 +19,13 @@ const WebformCheckbox = props => {
|
|
|
21
19
|
const placeholder = entity.get('#placeholder');
|
|
22
20
|
const requiredError = entity.get('#required_error');
|
|
23
21
|
const key = entity.get('#webform_key');
|
|
24
|
-
|
|
25
22
|
function validation(value) {
|
|
26
23
|
let error;
|
|
27
|
-
|
|
28
24
|
if (required && !value) {
|
|
29
25
|
error = requiredError || t('Dit is een vereist veld.');
|
|
30
26
|
}
|
|
31
|
-
|
|
32
27
|
return error;
|
|
33
28
|
}
|
|
34
|
-
|
|
35
29
|
return /*#__PURE__*/React.createElement("div", {
|
|
36
30
|
className: "WebformCheckbox"
|
|
37
31
|
}, /*#__PURE__*/React.createElement(Checkbox, _extends({}, fieldProps, {
|
|
@@ -46,5 +40,4 @@ const WebformCheckbox = props => {
|
|
|
46
40
|
value: props.values[key]
|
|
47
41
|
})));
|
|
48
42
|
};
|
|
49
|
-
|
|
50
43
|
export default withStates(WebformCheckbox);
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign
|
|
2
|
-
|
|
1
|
+
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); }
|
|
3
2
|
import React from 'react';
|
|
4
3
|
import { useTranslation } from 'react-i18next';
|
|
5
4
|
import Immutable from 'immutable';
|
|
6
5
|
import Checkboxes from '../../Form/Checkboxes';
|
|
7
6
|
import withStates from '../withStates';
|
|
8
|
-
|
|
9
7
|
const WebformCheckboxes = props => {
|
|
10
8
|
const {
|
|
11
9
|
entity,
|
|
@@ -26,21 +24,16 @@ const WebformCheckboxes = props => {
|
|
|
26
24
|
const otherLabel = entity.get('#other__option_label');
|
|
27
25
|
const otherPlaceholder = entity.get('#other__placeholder');
|
|
28
26
|
let options = entity.get('#options', Immutable.Map());
|
|
29
|
-
|
|
30
27
|
if (showOther) {
|
|
31
28
|
options = options.set('__other__', 'Anders');
|
|
32
29
|
}
|
|
33
|
-
|
|
34
30
|
function validation(value) {
|
|
35
31
|
let error;
|
|
36
|
-
|
|
37
32
|
if (required && !value) {
|
|
38
33
|
error = requiredError || t('Dit is een vereist veld.');
|
|
39
34
|
}
|
|
40
|
-
|
|
41
35
|
return error;
|
|
42
36
|
}
|
|
43
|
-
|
|
44
37
|
return /*#__PURE__*/React.createElement("div", {
|
|
45
38
|
className: "WebformCheckboxes"
|
|
46
39
|
}, /*#__PURE__*/React.createElement(Checkboxes, _extends({}, fieldProps, {
|
|
@@ -58,5 +51,4 @@ const WebformCheckboxes = props => {
|
|
|
58
51
|
otherPlaceholder: otherPlaceholder
|
|
59
52
|
})));
|
|
60
53
|
};
|
|
61
|
-
|
|
62
54
|
export default withStates(WebformCheckboxes);
|
|
@@ -1,25 +1,24 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign
|
|
2
|
-
|
|
1
|
+
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); }
|
|
3
2
|
import React from 'react';
|
|
4
|
-
|
|
5
3
|
const WebformContainer = props => {
|
|
6
4
|
const {
|
|
7
5
|
entity,
|
|
8
6
|
WebformMapper
|
|
9
|
-
} = props;
|
|
7
|
+
} = props;
|
|
10
8
|
|
|
9
|
+
// Remove all non-element children.
|
|
11
10
|
let children = entity;
|
|
12
11
|
children.keySeq().forEach(k => {
|
|
13
12
|
if (k.indexOf('#') === 0) {
|
|
14
13
|
children = children.delete(k);
|
|
15
14
|
}
|
|
16
|
-
});
|
|
15
|
+
});
|
|
17
16
|
|
|
17
|
+
// Recursively render children.
|
|
18
18
|
return /*#__PURE__*/React.createElement("div", {
|
|
19
19
|
className: "WebformContainer"
|
|
20
20
|
}, /*#__PURE__*/React.createElement(WebformMapper, _extends({}, props, {
|
|
21
21
|
entities: children
|
|
22
22
|
})));
|
|
23
23
|
};
|
|
24
|
-
|
|
25
24
|
export default WebformContainer;
|