@uncinc/uncinc-react-kitchen-sink 2.3.5 → 2.4.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/dist/Context/ViewportContext.js +5 -5
- package/dist/components/AbbreviationAnnotation/stories.js +1 -1
- package/dist/components/AbbreviationAnnotation/stories.scss +1 -1
- package/dist/components/AbbreviationAnnotation/style.scss +0 -2
- package/dist/components/Accordion/AccordionItem/index.js +1 -0
- package/dist/components/Accordion/stories.js +1 -1
- package/dist/components/ApiAutocomplete/stories.js +1 -1
- package/dist/components/Button/index.js +11 -7
- package/dist/components/Button/stories.js +1 -1
- package/dist/components/Cookie/Checkbox/index.js +1 -1
- package/dist/components/Cookie/index.js +28 -13
- package/dist/components/Cookie/stories.js +16 -16
- package/dist/components/Dialog/index.js +89 -0
- package/dist/components/Dialog/stories.js +28 -0
- package/dist/components/Dialog/style.scss +72 -0
- package/dist/components/FontSizeSwitcher/index.js +10 -4
- package/dist/components/FontSizeSwitcher/stories.js +1 -1
- package/dist/components/Form/Checkbox/index.js +1 -1
- package/dist/components/Form/Checkboxes/index.js +1 -1
- package/dist/components/Form/Checkboxes/index.test.js +1 -1
- package/dist/components/Form/DatePicker/index.js +3 -3
- package/dist/components/Form/DateSelect/index.js +3 -4
- package/dist/components/Form/DateSelect/stories.js +1 -1
- package/dist/components/Form/GenericFormElement/index.js +2 -2
- package/dist/components/Form/Number/index.js +1 -1
- package/dist/components/Form/SearchField/index.js +2 -2
- package/dist/components/Form/Select/Input/index.js +21 -23
- package/dist/components/Form/Select/index.js +1 -1
- package/dist/components/Form/TextField/index.js +2 -2
- package/dist/components/Form/TextField/index.test.js +1 -1
- package/dist/components/Form/TextField/stories.js +1 -1
- package/dist/components/Form/Textarea/index.js +1 -1
- package/dist/components/Hamburger/stories.js +3 -3
- package/dist/components/Header/index.js +3 -3
- package/dist/components/Header/stories.js +1 -1
- package/dist/components/Image/Picture/index.js +0 -1
- package/dist/components/Image/stories.js +9 -9
- package/dist/components/InlineMenu/index.js +2 -4
- package/dist/components/InlineMenu/stories.js +1 -1
- package/dist/components/Layout/Container/stories.js +29 -29
- package/dist/components/Layout/QuickLayout/stories.js +1 -1
- package/dist/components/Lottie/LottieAnimation/index.js +21 -17
- package/dist/components/Lottie/LottieAnimationWithMousePosition.js +4 -4
- package/dist/components/Lottie/index.js +3 -2
- package/dist/components/Lottie/stories.js +1 -1
- package/dist/components/MagicLine/index.js +3 -3
- package/dist/components/MagicLine/stories.js +4 -4
- package/dist/components/NavigationScroll/index.js +8 -11
- package/dist/components/NavigationScroll/stories.js +1 -1
- package/dist/components/Pagination/index.js +6 -0
- package/dist/components/Pagination/stories.js +11 -11
- package/dist/components/SearchKit/Facets/ChipFacet/index.js +1 -1
- package/dist/components/SearchKit/Facets/ListFacet/index.js +1 -0
- package/dist/components/SearchKit/Facets/SelectFacet/index.js +2 -2
- package/dist/components/SearchKit/SearchFacets/index.js +1 -3
- package/dist/components/SearchKit/SearchField/index.js +4 -4
- package/dist/components/SearchKit/SearchPage/index.js +9 -2
- package/dist/components/SearchKit/SearchReset/index.js +20 -8
- package/dist/components/SearchKit/SearchResults/index.js +10 -6
- package/dist/components/SearchKit/SearchSelectedFilters/Filters/CustomValue/index.js +15 -0
- package/dist/components/SearchKit/SearchSelectedFilters/Filters/DateRange/index.js +17 -0
- package/dist/components/SearchKit/SearchSelectedFilters/Filters/NumericRange/index.js +17 -0
- package/dist/components/SearchKit/SearchSelectedFilters/Filters/Value/index.js +19 -0
- package/dist/components/SearchKit/SearchSelectedFilters/index.js +30 -23
- package/dist/components/SearchKit/SearchSelectedFilters/style.scss +4 -0
- package/dist/components/SearchKit/SearchSorting/index.js +1 -1
- package/dist/components/SearchKit/index.js +10 -3
- package/dist/components/SearchKit/stories.js +83 -77
- package/dist/components/Share/index.js +4 -4
- package/dist/components/Share/stories.js +1 -1
- package/dist/components/Sliders/SliderRelated/index.js +1 -1
- package/dist/components/Sliders/SliderRelated/stories.js +13 -13
- package/dist/components/Webform/WebformDate/index.js +5 -4
- package/dist/components/Webform/WebformNumber/index.js +1 -1
- package/dist/components/Webform/WebformTextField/index.js +1 -1
- package/dist/components/Webform/stories.actions.js +17 -17
- package/dist/components/Webform/stories.checkboxes.js +22 -22
- package/dist/components/Webform/stories.checked.js +35 -35
- package/dist/components/Webform/stories.container.js +29 -29
- package/dist/components/Webform/stories.date.js +17 -17
- package/dist/components/Webform/stories.filled.js +35 -35
- package/dist/components/Webform/stories.number.js +18 -18
- package/dist/components/Webform/stories.radiobuttons.js +22 -22
- package/dist/components/Webform/stories.select.js +22 -22
- package/dist/components/Webform/stories.textarea.js +1 -1
- package/dist/components/Webform/stories.textfield.js +1 -1
- package/dist/components/Webform/stories.wizard.js +115 -115
- package/dist/components/WysiwygField/index.js +0 -1
- package/dist/components/WysiwygField/stories.js +2 -2
- package/dist/config/i18next/locales/en.json +4 -0
- package/dist/config/i18next/locales/nl.json +7 -0
- package/dist/helpers/date.js +8 -0
- package/dist/hooks/useBoolean.ts +20 -0
- package/dist/hooks/useClickOutside.ts +38 -0
- package/dist/hooks/useDialog.ts +29 -0
- package/dist/hooks/useDialogHelpers.ts +95 -0
- package/dist/hooks/useEscape.ts +26 -0
- package/dist/hooks/usePrevious.js +1 -2
- package/dist/hooks/useTrapFocus.ts +80 -0
- package/dist/index.js +1 -0
- package/package.json +39 -17
- package/dist/components/Form/SearchField/stories.js +0 -0
- package/dist/components/SearchKit/Facets/HierarchicalFilterFacet/index.js +0 -60
- package/dist/components/SearchKit/Facets/HierarchicalMenuFacet/index.js +0 -60
|
@@ -25,36 +25,36 @@ const Teaser = ({
|
|
|
25
25
|
}) => /*#__PURE__*/React.createElement("div", {
|
|
26
26
|
className: "Teaser",
|
|
27
27
|
style: {
|
|
28
|
-
margin:
|
|
29
|
-
display:
|
|
30
|
-
flexDirection:
|
|
31
|
-
flex:
|
|
28
|
+
margin: '10px',
|
|
29
|
+
display: 'flex',
|
|
30
|
+
flexDirection: 'column',
|
|
31
|
+
flex: '1 1 auto'
|
|
32
32
|
}
|
|
33
33
|
}, /*#__PURE__*/React.createElement("img", {
|
|
34
34
|
src: image,
|
|
35
35
|
alt: imageAlt,
|
|
36
36
|
style: {
|
|
37
37
|
width: '100%',
|
|
38
|
-
maxWidth:
|
|
38
|
+
maxWidth: '100%'
|
|
39
39
|
}
|
|
40
40
|
}), /*#__PURE__*/React.createElement("div", {
|
|
41
41
|
className: "Teaser__content"
|
|
42
42
|
}, /*#__PURE__*/React.createElement("div", {
|
|
43
|
-
|
|
43
|
+
className: "Teaser__content__title"
|
|
44
44
|
}, title), /*#__PURE__*/React.createElement("div", {
|
|
45
|
-
|
|
45
|
+
className: "Teaser__content__body"
|
|
46
46
|
}, content), /*#__PURE__*/React.createElement("div", {
|
|
47
|
-
|
|
47
|
+
className: "Teaser__content__read_more"
|
|
48
48
|
}, buttonText && buttonLink && /*#__PURE__*/React.createElement(Button, {
|
|
49
49
|
primary: false,
|
|
50
50
|
href: buttonLink
|
|
51
51
|
}, buttonText))));
|
|
52
52
|
const children = Array.from(Array(6).keys()).map(i => {
|
|
53
|
-
const image = [
|
|
54
|
-
const title =
|
|
55
|
-
const content = [
|
|
56
|
-
const buttonText =
|
|
57
|
-
const buttonLink =
|
|
53
|
+
const image = ['https://dummyimage.com/600x400/000/fff', 'https://dummyimage.com/600x400/f00/fff', 'https://dummyimage.com/600x400/ddd/fff'];
|
|
54
|
+
const title = 'Title';
|
|
55
|
+
const content = ['Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec et lacinia justo, in vehicula sem.', 'Lorem ipsum dolor sit amet, adipiscing elit. Donec et lacinia justo, in vehicula sem.', 'Lorem ipsum dolor sit amet, consectetur adipiscing. Donec et lacinia justo, in vehicula sem.', 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.'];
|
|
56
|
+
const buttonText = 'Read more';
|
|
57
|
+
const buttonLink = '#';
|
|
58
58
|
return /*#__PURE__*/React.createElement(Teaser, {
|
|
59
59
|
key: i,
|
|
60
60
|
image: image[Math.round(Math.random(image.length))],
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useState, useCallback, useEffect } from 'react';
|
|
2
|
-
import moment from 'moment';
|
|
3
2
|
import SelectInput from '../../Form/Select/Input';
|
|
3
|
+
import { isValidDate, parseDateWithTimezoneOffset } from '../../../helpers/date';
|
|
4
4
|
const WebformDate = ({
|
|
5
5
|
entity,
|
|
6
6
|
setFieldValue,
|
|
@@ -76,13 +76,14 @@ const WebformDate = ({
|
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
// Transform state items to date object.
|
|
79
|
-
const birthdate =
|
|
80
|
-
|
|
79
|
+
const birthdate = parseDateWithTimezoneOffset(new Date(`${year}-${month}-${day}`));
|
|
80
|
+
const birthdateFormatted = birthdate.split('T')[0];
|
|
81
|
+
setFieldValue(key, birthdateFormatted);
|
|
81
82
|
}, [day, month, year, key, setFieldValue, errors, requiredError]);
|
|
82
83
|
|
|
83
84
|
// If birthday is invalid, like 2000/02/30,
|
|
84
85
|
// set an error.
|
|
85
|
-
if (
|
|
86
|
+
if (!isValidDate(new Date(values[key])) || day === placeholderDay || month === placeholderMonth || year === placeholderYear) {
|
|
86
87
|
errors[key] = requiredError || 'Dit is geen geldige geboortedatum.';
|
|
87
88
|
} else {
|
|
88
89
|
delete errors[key];
|
|
@@ -13,7 +13,7 @@ const WebformNumber = props => {
|
|
|
13
13
|
const description = entity.get('#description');
|
|
14
14
|
const placeholder = entity.get('#placeholder');
|
|
15
15
|
const key = entity.get('#webform_key');
|
|
16
|
-
const type = props.type ||
|
|
16
|
+
const type = props.type || 'text';
|
|
17
17
|
const required = entity.get('#required');
|
|
18
18
|
const min = entity.get('#min');
|
|
19
19
|
const max = entity.get('#max');
|
|
@@ -18,7 +18,7 @@ const WebformTextField = props => {
|
|
|
18
18
|
const placeholder = entity.get('#placeholder');
|
|
19
19
|
const requiredError = entity.get('#required_error');
|
|
20
20
|
const key = entity.get('#webform_key');
|
|
21
|
-
const type = props.type ||
|
|
21
|
+
const type = props.type || 'text';
|
|
22
22
|
const validation = props.validation || (value => {
|
|
23
23
|
let error;
|
|
24
24
|
if (required && !value) {
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import Immutable from 'immutable';
|
|
3
|
-
import Webform from '
|
|
3
|
+
import Webform from '.';
|
|
4
4
|
export default {
|
|
5
5
|
title: 'Organisms/Webform/Mapper'
|
|
6
6
|
};
|
|
7
7
|
const entities = Immutable.fromJS({
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
8
|
+
'actions': {
|
|
9
|
+
'#type': 'webform_actions',
|
|
10
|
+
'#title': 'Submit button(s)',
|
|
11
|
+
'#submit__label': 'Verstuur',
|
|
12
|
+
'#webform': 'test',
|
|
13
|
+
'#webform_id': 'test--actions',
|
|
14
|
+
'#webform_key': 'actions',
|
|
15
|
+
'#webform_parent_key': '',
|
|
16
|
+
'#webform_parent_flexbox': false,
|
|
17
|
+
'#webform_depth': 0,
|
|
18
|
+
'#webform_children': [],
|
|
19
|
+
'#webform_multiple': false,
|
|
20
|
+
'#webform_composite': false,
|
|
21
|
+
'#webform_parents': ['actions'],
|
|
22
|
+
'#admin_title': 'Submit button(s)',
|
|
23
|
+
'#webform_plugin_id': 'webform_actions'
|
|
24
24
|
}
|
|
25
25
|
});
|
|
26
26
|
export const Actions = () => /*#__PURE__*/React.createElement(Webform, {
|
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import Immutable from 'immutable';
|
|
3
|
-
import Webform from '
|
|
3
|
+
import Webform from '.';
|
|
4
4
|
export default {
|
|
5
5
|
title: 'Organisms/Webform/Mapper'
|
|
6
6
|
};
|
|
7
7
|
const entities = Immutable.fromJS({
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
'#description':
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
8
|
+
'field_3': {
|
|
9
|
+
'#type': 'checkboxes',
|
|
10
|
+
'#title': 'Pick your poison',
|
|
11
|
+
'#description': 'Please select your poison.',
|
|
12
|
+
'#options': {
|
|
13
|
+
'beer': 'Beer',
|
|
14
|
+
'wine': 'Wine',
|
|
15
|
+
'rum': 'Rum',
|
|
16
|
+
'whisky': 'Whisk(e)y'
|
|
17
17
|
},
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
18
|
+
'#webform': 'test_conditionals',
|
|
19
|
+
'#webform_id': 'test_conditionals--field_3',
|
|
20
|
+
'#webform_key': 'field_3',
|
|
21
|
+
'#webform_parent_key': '',
|
|
22
|
+
'#webform_parent_flexbox': false,
|
|
23
|
+
'#webform_depth': 0,
|
|
24
|
+
'#webform_children': [],
|
|
25
|
+
'#webform_multiple': false,
|
|
26
|
+
'#webform_composite': false,
|
|
27
|
+
'#webform_parents': ['field_3'],
|
|
28
|
+
'#admin_title': 'Pick your poison',
|
|
29
|
+
'#webform_plugin_id': 'radios'
|
|
30
30
|
}
|
|
31
31
|
});
|
|
32
32
|
export const Checkboxes = () => /*#__PURE__*/React.createElement(Webform, {
|
|
@@ -1,48 +1,48 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import Immutable from 'immutable';
|
|
3
|
-
import Webform from '
|
|
3
|
+
import Webform from '.';
|
|
4
4
|
export default {
|
|
5
5
|
title: 'Organisms/Webform/Conditionals'
|
|
6
6
|
};
|
|
7
7
|
const entities = Immutable.fromJS({
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
8
|
+
'field_1': {
|
|
9
|
+
'#type': 'checkbox',
|
|
10
|
+
'#title': 'field 1',
|
|
11
|
+
'#webform': 'test_conditionals',
|
|
12
|
+
'#webform_id': 'test_conditionals--field_1',
|
|
13
|
+
'#webform_key': 'field_1',
|
|
14
|
+
'#webform_parent_key': '',
|
|
15
|
+
'#webform_parent_flexbox': false,
|
|
16
|
+
'#webform_depth': 0,
|
|
17
|
+
'#webform_children': [],
|
|
18
|
+
'#webform_multiple': false,
|
|
19
|
+
'#webform_composite': false,
|
|
20
|
+
'#webform_parents': ['field_1'],
|
|
21
|
+
'#admin_title': 'field 1',
|
|
22
|
+
'#webform_plugin_id': 'textfield'
|
|
23
23
|
},
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
24
|
+
'field_2': {
|
|
25
|
+
'#type': 'textfield',
|
|
26
|
+
'#title': 'field 2',
|
|
27
|
+
'#states': {
|
|
28
|
+
'visible': {
|
|
29
|
+
':input[name=\u0022field_1\u0022]': {
|
|
30
|
+
'checked': true
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
},
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
34
|
+
'#webform': 'test_conditionals',
|
|
35
|
+
'#webform_id': 'test_conditionals--field_2',
|
|
36
|
+
'#webform_key': 'field_2',
|
|
37
|
+
'#webform_parent_key': '',
|
|
38
|
+
'#webform_parent_flexbox': false,
|
|
39
|
+
'#webform_depth': 0,
|
|
40
|
+
'#webform_children': [],
|
|
41
|
+
'#webform_multiple': false,
|
|
42
|
+
'#webform_composite': false,
|
|
43
|
+
'#webform_parents': ['field_2'],
|
|
44
|
+
'#admin_title': 'field 2',
|
|
45
|
+
'#webform_plugin_id': 'textfield'
|
|
46
46
|
}
|
|
47
47
|
});
|
|
48
48
|
export const Checked = () => /*#__PURE__*/React.createElement(Webform, {
|
|
@@ -1,39 +1,39 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import Immutable from 'immutable';
|
|
3
|
-
import Webform from '
|
|
3
|
+
import Webform from '.';
|
|
4
4
|
export default {
|
|
5
5
|
title: 'Organisms/Webform/Mapper'
|
|
6
6
|
};
|
|
7
7
|
const entities = Immutable.fromJS({
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
8
|
+
'container': {
|
|
9
|
+
'#type': 'container',
|
|
10
|
+
'textfield': {
|
|
11
|
+
'#type': 'textfield',
|
|
12
|
+
'#title': 'Textfield',
|
|
13
|
+
'#webform': 'test',
|
|
14
|
+
'#webform_id': 'test--textfield',
|
|
15
|
+
'#webform_key': 'textfield',
|
|
16
|
+
'#webform_parent_key': 'container',
|
|
17
|
+
'#webform_parent_flexbox': false,
|
|
18
|
+
'#webform_depth': 1,
|
|
19
|
+
'#webform_children': [],
|
|
20
|
+
'#webform_multiple': false,
|
|
21
|
+
'#webform_composite': false,
|
|
22
|
+
'#admin_title': 'Textfield',
|
|
23
|
+
'#webform_plugin_id': 'textfield'
|
|
24
24
|
},
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
25
|
+
'#webform': 'test',
|
|
26
|
+
'#webform_id': 'test--container',
|
|
27
|
+
'#webform_key': 'container',
|
|
28
|
+
'#webform_parent_key': '',
|
|
29
|
+
'#webform_parent_flexbox': false,
|
|
30
|
+
'#webform_depth': 0,
|
|
31
|
+
'#webform_children': [],
|
|
32
|
+
'#webform_multiple': false,
|
|
33
|
+
'#webform_composite': false,
|
|
34
|
+
'#title': null,
|
|
35
|
+
'#admin_title': null,
|
|
36
|
+
'#webform_plugin_id': 'container'
|
|
37
37
|
}
|
|
38
38
|
});
|
|
39
39
|
export const Container = () => /*#__PURE__*/React.createElement(Webform, {
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import Immutable from 'immutable';
|
|
3
|
-
import Webform from '
|
|
3
|
+
import Webform from '.';
|
|
4
4
|
export default {
|
|
5
5
|
title: 'Organisms/Webform/Mapper'
|
|
6
6
|
};
|
|
7
7
|
const entities = Immutable.fromJS({
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
'#description':
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
8
|
+
'field_3': {
|
|
9
|
+
'#type': 'date',
|
|
10
|
+
'#title': 'What is your birth date?',
|
|
11
|
+
'#description': 'Please select your birth date.',
|
|
12
|
+
'#webform': 'test_conditionals',
|
|
13
|
+
'#webform_id': 'test_conditionals--field_3',
|
|
14
|
+
'#webform_key': 'field_3',
|
|
15
|
+
'#webform_parent_key': '',
|
|
16
|
+
'#webform_parent_flexbox': false,
|
|
17
|
+
'#webform_depth': 0,
|
|
18
|
+
'#webform_children': [],
|
|
19
|
+
'#webform_multiple': false,
|
|
20
|
+
'#webform_composite': false,
|
|
21
|
+
'#webform_parents': ['field_3'],
|
|
22
|
+
'#admin_title': 'What is your birth date?',
|
|
23
|
+
'#webform_plugin_id': 'date'
|
|
24
24
|
}
|
|
25
25
|
});
|
|
26
26
|
export const Date = () => /*#__PURE__*/React.createElement(Webform, {
|
|
@@ -1,48 +1,48 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import Immutable from 'immutable';
|
|
3
|
-
import Webform from '
|
|
3
|
+
import Webform from '.';
|
|
4
4
|
export default {
|
|
5
5
|
title: 'Organisms/Webform/Conditionals'
|
|
6
6
|
};
|
|
7
7
|
const entities = Immutable.fromJS({
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
8
|
+
'field_1': {
|
|
9
|
+
'#type': 'textfield',
|
|
10
|
+
'#title': 'field 1',
|
|
11
|
+
'#webform': 'test_conditionals',
|
|
12
|
+
'#webform_id': 'test_conditionals--field_1',
|
|
13
|
+
'#webform_key': 'field_1',
|
|
14
|
+
'#webform_parent_key': '',
|
|
15
|
+
'#webform_parent_flexbox': false,
|
|
16
|
+
'#webform_depth': 0,
|
|
17
|
+
'#webform_children': [],
|
|
18
|
+
'#webform_multiple': false,
|
|
19
|
+
'#webform_composite': false,
|
|
20
|
+
'#webform_parents': ['field_1'],
|
|
21
|
+
'#admin_title': 'field 1',
|
|
22
|
+
'#webform_plugin_id': 'textfield'
|
|
23
23
|
},
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
24
|
+
'field_2': {
|
|
25
|
+
'#type': 'textfield',
|
|
26
|
+
'#title': 'field 2',
|
|
27
|
+
'#states': {
|
|
28
|
+
'visible': {
|
|
29
|
+
':input[name=\u0022field_1\u0022]': {
|
|
30
|
+
'filled': true
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
},
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
34
|
+
'#webform': 'test_conditionals',
|
|
35
|
+
'#webform_id': 'test_conditionals--field_2',
|
|
36
|
+
'#webform_key': 'field_2',
|
|
37
|
+
'#webform_parent_key': '',
|
|
38
|
+
'#webform_parent_flexbox': false,
|
|
39
|
+
'#webform_depth': 0,
|
|
40
|
+
'#webform_children': [],
|
|
41
|
+
'#webform_multiple': false,
|
|
42
|
+
'#webform_composite': false,
|
|
43
|
+
'#webform_parents': ['field_2'],
|
|
44
|
+
'#admin_title': 'field 2',
|
|
45
|
+
'#webform_plugin_id': 'textfield'
|
|
46
46
|
}
|
|
47
47
|
});
|
|
48
48
|
export const Filled = () => /*#__PURE__*/React.createElement(Webform, {
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import Immutable from 'immutable';
|
|
3
|
-
import Webform from '
|
|
3
|
+
import Webform from '.';
|
|
4
4
|
export default {
|
|
5
5
|
title: 'Organisms/Webform/Mapper'
|
|
6
6
|
};
|
|
7
7
|
const entities = Immutable.fromJS({
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
8
|
+
'number': {
|
|
9
|
+
'#type': 'number',
|
|
10
|
+
'#title': 'Number',
|
|
11
|
+
'#min': 1,
|
|
12
|
+
'#max': 100,
|
|
13
|
+
'#step': 1,
|
|
14
|
+
'#webform': 'test',
|
|
15
|
+
'#webform_id': 'test--number',
|
|
16
|
+
'#webform_key': 'number',
|
|
17
|
+
'#webform_parent_key': '',
|
|
18
|
+
'#webform_parent_flexbox': false,
|
|
19
|
+
'#webform_depth': 0,
|
|
20
|
+
'#webform_children': [],
|
|
21
|
+
'#webform_multiple': false,
|
|
22
|
+
'#webform_composite': false,
|
|
23
|
+
'#admin_title': 'Number',
|
|
24
|
+
'#webform_plugin_id': 'number'
|
|
25
25
|
}
|
|
26
26
|
});
|
|
27
27
|
export const Number = () => /*#__PURE__*/React.createElement(Webform, {
|
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import Immutable from 'immutable';
|
|
3
|
-
import Webform from '
|
|
3
|
+
import Webform from '.';
|
|
4
4
|
export default {
|
|
5
5
|
title: 'Organisms/Webform/Mapper'
|
|
6
6
|
};
|
|
7
7
|
const entities = Immutable.fromJS({
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
'#description':
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
8
|
+
'field_3': {
|
|
9
|
+
'#type': 'radios',
|
|
10
|
+
'#title': 'Pick your poison',
|
|
11
|
+
'#description': 'Please select your poison.',
|
|
12
|
+
'#options': {
|
|
13
|
+
'beer': 'Beer',
|
|
14
|
+
'wine': 'Wine',
|
|
15
|
+
'rum': 'Rum',
|
|
16
|
+
'whisky': 'Whisk(e)y'
|
|
17
17
|
},
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
18
|
+
'#webform': 'test_conditionals',
|
|
19
|
+
'#webform_id': 'test_conditionals--field_3',
|
|
20
|
+
'#webform_key': 'field_3',
|
|
21
|
+
'#webform_parent_key': '',
|
|
22
|
+
'#webform_parent_flexbox': false,
|
|
23
|
+
'#webform_depth': 0,
|
|
24
|
+
'#webform_children': [],
|
|
25
|
+
'#webform_multiple': false,
|
|
26
|
+
'#webform_composite': false,
|
|
27
|
+
'#webform_parents': ['field_3'],
|
|
28
|
+
'#admin_title': 'Pick your poison',
|
|
29
|
+
'#webform_plugin_id': 'radios'
|
|
30
30
|
}
|
|
31
31
|
});
|
|
32
32
|
export const RadioButtons = () => /*#__PURE__*/React.createElement(Webform, {
|