@coorpacademy/components 10.5.7-alpha.11 → 10.5.7-alpha.6
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/es/atom/select/index.js +20 -38
- package/es/atom/select/index.js.map +1 -1
- package/es/atom/select/style.css +40 -129
- package/es/atom/select/test/fixtures.js +0 -2
- package/es/atom/select/test/fixtures.js.map +1 -1
- package/es/molecule/cockpit-popin/test/fixtures.js +17 -0
- package/es/molecule/cockpit-popin/test/fixtures.js.map +1 -0
- package/es/molecule/questions/drop-down/index.js +6 -1
- package/es/molecule/questions/drop-down/index.js.map +1 -1
- package/es/molecule/questions/free-text/index.js +15 -35
- package/es/molecule/questions/free-text/index.js.map +1 -1
- package/es/molecule/questions/free-text/style.css +15 -35
- package/es/molecule/questions/free-text/test/fixtures/default.js +1 -1
- package/es/molecule/questions/free-text/test/fixtures/default.js.map +1 -1
- package/es/molecule/questions/free-text/test/fixtures/{with-value.js → with-default-value.js} +2 -2
- package/es/molecule/questions/free-text/test/fixtures/with-default-value.js.map +1 -0
- package/es/molecule/questions/free-text/test/fixtures.js +2 -4
- package/es/molecule/questions/free-text/test/fixtures.js.map +1 -1
- package/es/molecule/questions/qcm/style.css +4 -0
- package/es/molecule/questions/qcm-graphic/index.js +1 -0
- package/es/molecule/questions/qcm-graphic/index.js.map +1 -1
- package/es/molecule/questions/qcm-graphic/style.css +12 -0
- package/es/molecule/questions/qcm-graphic/test/fixtures/default.js +1 -1
- package/es/molecule/questions/qcm-graphic/test/fixtures/default.js.map +1 -1
- package/es/molecule/questions/qcm-graphic/test/fixtures/no-selected.js +1 -1
- package/es/molecule/questions/qcm-graphic/test/fixtures/no-selected.js.map +1 -1
- package/es/molecule/questions/qcm-graphic/test/qcm-graphic.js +1 -1
- package/es/molecule/questions/qcm-graphic/test/qcm-graphic.js.map +1 -1
- package/es/molecule/questions/template/index.js +10 -13
- package/es/molecule/questions/template/index.js.map +1 -1
- package/es/molecule/search/test/fixtures.js +15 -0
- package/es/molecule/search/test/fixtures.js.map +1 -0
- package/lib/atom/select/index.js +17 -40
- package/lib/atom/select/index.js.map +1 -1
- package/lib/atom/select/style.css +40 -129
- package/lib/atom/select/test/fixtures.js +0 -3
- package/lib/atom/select/test/fixtures.js.map +1 -1
- package/lib/molecule/cockpit-popin/test/fixtures.js +28 -0
- package/lib/molecule/cockpit-popin/test/fixtures.js.map +1 -0
- package/lib/molecule/questions/drop-down/index.js +5 -1
- package/lib/molecule/questions/drop-down/index.js.map +1 -1
- package/lib/molecule/questions/free-text/index.js +14 -32
- package/lib/molecule/questions/free-text/index.js.map +1 -1
- package/lib/molecule/questions/free-text/style.css +15 -35
- package/lib/molecule/questions/free-text/test/fixtures/default.js +1 -1
- package/lib/molecule/questions/free-text/test/fixtures/default.js.map +1 -1
- package/lib/molecule/questions/free-text/test/fixtures/{with-value.js → with-default-value.js} +2 -2
- package/lib/molecule/questions/free-text/test/fixtures/with-default-value.js.map +1 -0
- package/lib/molecule/questions/free-text/test/fixtures.js +2 -5
- package/lib/molecule/questions/free-text/test/fixtures.js.map +1 -1
- package/lib/molecule/questions/qcm/style.css +4 -0
- package/lib/molecule/questions/qcm-graphic/index.js +1 -0
- package/lib/molecule/questions/qcm-graphic/index.js.map +1 -1
- package/lib/molecule/questions/qcm-graphic/style.css +12 -0
- package/lib/molecule/questions/qcm-graphic/test/fixtures/default.js +1 -1
- package/lib/molecule/questions/qcm-graphic/test/fixtures/default.js.map +1 -1
- package/lib/molecule/questions/qcm-graphic/test/fixtures/no-selected.js +1 -1
- package/lib/molecule/questions/qcm-graphic/test/fixtures/no-selected.js.map +1 -1
- package/lib/molecule/questions/qcm-graphic/test/qcm-graphic.js +1 -1
- package/lib/molecule/questions/qcm-graphic/test/qcm-graphic.js.map +1 -1
- package/lib/molecule/questions/template/index.js +10 -13
- package/lib/molecule/questions/template/index.js.map +1 -1
- package/lib/molecule/search/test/fixtures.js +25 -0
- package/lib/molecule/search/test/fixtures.js.map +1 -0
- package/package.json +2 -2
- package/es/atom/select/test/fixtures/player.js +0 -11
- package/es/atom/select/test/fixtures/player.js.map +0 -1
- package/es/atom/select/test/select.js +0 -49
- package/es/atom/select/test/select.js.map +0 -1
- package/es/molecule/questions/free-text/test/fixtures/with-value-on-change.js +0 -9
- package/es/molecule/questions/free-text/test/fixtures/with-value-on-change.js.map +0 -1
- package/es/molecule/questions/free-text/test/fixtures/with-value.js.map +0 -1
- package/es/molecule/questions/free-text/test/free-text.js +0 -106
- package/es/molecule/questions/free-text/test/free-text.js.map +0 -1
- package/lib/atom/select/test/fixtures/player.js +0 -21
- package/lib/atom/select/test/fixtures/player.js.map +0 -1
- package/lib/atom/select/test/select.js +0 -62
- package/lib/atom/select/test/select.js.map +0 -1
- package/lib/molecule/questions/free-text/test/fixtures/with-value-on-change.js +0 -14
- package/lib/molecule/questions/free-text/test/fixtures/with-value-on-change.js.map +0 -1
- package/lib/molecule/questions/free-text/test/fixtures/with-value.js.map +0 -1
- package/lib/molecule/questions/free-text/test/free-text.js +0 -119
- package/lib/molecule/questions/free-text/test/free-text.js.map +0 -1
|
@@ -1,53 +1,34 @@
|
|
|
1
|
-
import
|
|
1
|
+
import _get from "lodash/fp/get";
|
|
2
2
|
import _noop from "lodash/fp/noop";
|
|
3
|
-
|
|
4
|
-
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
5
|
-
|
|
6
|
-
import React, { useCallback, useMemo, useState } from 'react';
|
|
3
|
+
import React, { useMemo } from 'react';
|
|
7
4
|
import PropTypes from 'prop-types';
|
|
8
|
-
import { convert } from 'css-color-function';
|
|
9
5
|
import Provider from '../../../atom/provider';
|
|
10
6
|
import style from './style.css';
|
|
11
7
|
|
|
12
|
-
const FreeText = (props,
|
|
8
|
+
const FreeText = (props, {
|
|
9
|
+
skin
|
|
10
|
+
}) => {
|
|
13
11
|
const {
|
|
14
12
|
placeholder = '',
|
|
15
13
|
value = '',
|
|
16
|
-
onChange = _noop
|
|
17
|
-
'aria-label': ariaLabel
|
|
14
|
+
onChange = _noop
|
|
18
15
|
} = props;
|
|
19
|
-
const
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
const primarySkinColor = _getOr('#00B0FF', 'skin.common.primary', context);
|
|
23
|
-
|
|
24
|
-
const handleMouseOver = useCallback(() => setHovered(true), [setHovered]);
|
|
25
|
-
const handleMouseLeave = useCallback(() => setHovered(false), [setHovered]);
|
|
26
|
-
const shadowBoxPrimaryColor = useMemo(() => convert(`color(${primarySkinColor} a(12%))`), [primarySkinColor]);
|
|
16
|
+
const handleChange = useMemo(() => e => onChange(e.target.value), [onChange]);
|
|
17
|
+
const skinView = value ? _get('common.primary', skin) : null;
|
|
27
18
|
return /*#__PURE__*/React.createElement("div", {
|
|
28
19
|
"data-name": "freeText",
|
|
29
|
-
className: style.wrapper
|
|
30
|
-
onMouseOver: handleMouseOver,
|
|
31
|
-
onMouseLeave: handleMouseLeave,
|
|
32
|
-
style: _extends({}, value && {
|
|
33
|
-
boxShadow: hovered ? 'none' : `0 4px 16px ${shadowBoxPrimaryColor}`
|
|
34
|
-
})
|
|
20
|
+
className: style.wrapper
|
|
35
21
|
}, /*#__PURE__*/React.createElement("input", {
|
|
36
|
-
"data-name": "free-text-input",
|
|
37
22
|
type: "text",
|
|
38
|
-
|
|
39
|
-
className: style.freeText,
|
|
23
|
+
className: style.input,
|
|
40
24
|
placeholder: placeholder,
|
|
41
25
|
value: value,
|
|
42
26
|
onInput: handleChange,
|
|
43
27
|
onChange: _noop,
|
|
44
|
-
style:
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
}), {}, {
|
|
49
|
-
color: primarySkinColor
|
|
50
|
-
})
|
|
28
|
+
style: {
|
|
29
|
+
color: skinView,
|
|
30
|
+
borderColor: skinView
|
|
31
|
+
}
|
|
51
32
|
}));
|
|
52
33
|
};
|
|
53
34
|
|
|
@@ -57,8 +38,7 @@ FreeText.contextTypes = {
|
|
|
57
38
|
FreeText.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
58
39
|
placeholder: PropTypes.string,
|
|
59
40
|
value: PropTypes.string,
|
|
60
|
-
onChange: PropTypes.func
|
|
61
|
-
'aria-label': PropTypes.string
|
|
41
|
+
onChange: PropTypes.func
|
|
62
42
|
} : {};
|
|
63
43
|
export default FreeText;
|
|
64
44
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/molecule/questions/free-text/index.js"],"names":["React","
|
|
1
|
+
{"version":3,"sources":["../../../../src/molecule/questions/free-text/index.js"],"names":["React","useMemo","PropTypes","Provider","style","FreeText","props","skin","placeholder","value","onChange","handleChange","e","target","skinView","wrapper","input","color","borderColor","contextTypes","childContextTypes","propTypes","string","func"],"mappings":";;AAAA,OAAOA,KAAP,IAAeC,OAAf,QAA6B,OAA7B;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,OAAOC,QAAP,MAAqB,wBAArB;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,QAAQ,GAAG,CAACC,KAAD,EAAQ;AAACC,EAAAA;AAAD,CAAR,KAAmB;AAClC,QAAM;AAACC,IAAAA,WAAW,GAAG,EAAf;AAAmBC,IAAAA,KAAK,GAAG,EAA3B;AAA+BC,IAAAA,QAAQ;AAAvC,MAAkDJ,KAAxD;AAEA,QAAMK,YAAY,GAAGV,OAAO,CAAC,MAAMW,CAAC,IAAIF,QAAQ,CAACE,CAAC,CAACC,MAAF,CAASJ,KAAV,CAApB,EAAsC,CAACC,QAAD,CAAtC,CAA5B;AACA,QAAMI,QAAQ,GAAGL,KAAK,GAAG,KAAI,gBAAJ,EAAsBF,IAAtB,CAAH,GAAiC,IAAvD;AAEA,sBACE;AAAK,iBAAU,UAAf;AAA0B,IAAA,SAAS,EAAEH,KAAK,CAACW;AAA3C,kBACE;AACE,IAAA,IAAI,EAAC,MADP;AAEE,IAAA,SAAS,EAAEX,KAAK,CAACY,KAFnB;AAGE,IAAA,WAAW,EAAER,WAHf;AAIE,IAAA,KAAK,EAAEC,KAJT;AAKE,IAAA,OAAO,EAAEE,YALX;AAME,IAAA,QAAQ,OANV;AAOE,IAAA,KAAK,EAAE;AACLM,MAAAA,KAAK,EAAEH,QADF;AAELI,MAAAA,WAAW,EAAEJ;AAFR;AAPT,IADF,CADF;AAgBD,CAtBD;;AAwBAT,QAAQ,CAACc,YAAT,GAAwB;AACtBZ,EAAAA,IAAI,EAAEJ,QAAQ,CAACiB,iBAAT,CAA2Bb;AADX,CAAxB;AAIAF,QAAQ,CAACgB,SAAT,2CAAqB;AACnBb,EAAAA,WAAW,EAAEN,SAAS,CAACoB,MADJ;AAEnBb,EAAAA,KAAK,EAAEP,SAAS,CAACoB,MAFE;AAGnBZ,EAAAA,QAAQ,EAAER,SAAS,CAACqB;AAHD,CAArB;AAMA,eAAelB,QAAf","sourcesContent":["import React, {useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport {noop, get} from 'lodash/fp';\nimport Provider from '../../../atom/provider';\nimport style from './style.css';\n\nconst FreeText = (props, {skin}) => {\n const {placeholder = '', value = '', onChange = noop} = props;\n\n const handleChange = useMemo(() => e => onChange(e.target.value), [onChange]);\n const skinView = value ? get('common.primary', skin) : null;\n\n return (\n <div data-name=\"freeText\" className={style.wrapper}>\n <input\n type=\"text\"\n className={style.input}\n placeholder={placeholder}\n value={value}\n onInput={handleChange}\n onChange={noop}\n style={{\n color: skinView,\n borderColor: skinView\n }}\n />\n </div>\n );\n};\n\nFreeText.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nFreeText.propTypes = {\n placeholder: PropTypes.string,\n value: PropTypes.string,\n onChange: PropTypes.func\n};\n\nexport default FreeText;\n"],"file":"index.js"}
|
|
@@ -1,61 +1,41 @@
|
|
|
1
1
|
@value breakpoints: "../../../variables/breakpoints.css";
|
|
2
2
|
@value mobile from breakpoints;
|
|
3
3
|
@value colors: "../../../variables/colors.css";
|
|
4
|
-
@value
|
|
5
|
-
@value
|
|
4
|
+
@value medium from colors;
|
|
5
|
+
@value black from colors;
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
.freeText {
|
|
9
|
-
border: unset;
|
|
10
|
-
border-width: 0;
|
|
7
|
+
.input {
|
|
11
8
|
font-family: "Gilroy";
|
|
12
9
|
font-weight: 700;
|
|
13
10
|
text-transform: none;
|
|
11
|
+
padding: 0 15px;
|
|
12
|
+
border: solid 1px;
|
|
13
|
+
border-color: color(black lightness(85%));
|
|
14
14
|
height: 50px;
|
|
15
|
-
border-radius:
|
|
15
|
+
border-radius: 2px;
|
|
16
16
|
font-size: 14px;
|
|
17
|
-
|
|
18
|
-
width: 100%;
|
|
17
|
+
width: 230px;
|
|
19
18
|
outline: none;
|
|
20
|
-
padding-left: 12px;
|
|
21
|
-
padding-right: 12px;
|
|
22
19
|
}
|
|
23
20
|
|
|
24
|
-
.
|
|
25
|
-
color:
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.freeText:focus {
|
|
29
|
-
outline: none;
|
|
21
|
+
.input::placeholder {
|
|
22
|
+
color: medium;
|
|
30
23
|
}
|
|
31
24
|
|
|
32
|
-
.
|
|
25
|
+
.input:focus {
|
|
33
26
|
outline: none;
|
|
34
27
|
}
|
|
35
28
|
|
|
36
|
-
.wrapper {
|
|
37
|
-
border-radius: 8px;
|
|
38
|
-
box-shadow: 0px 4px 16px box_shadow_light_dark;
|
|
39
|
-
margin: 0 15px;
|
|
40
|
-
overflow: hidden;
|
|
41
|
-
width: 230px;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.wrapper:hover {
|
|
45
|
-
box-shadow: none;
|
|
46
|
-
overflow: visible;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
29
|
@media mobile {
|
|
50
30
|
.wrapper {
|
|
51
|
-
|
|
52
|
-
width: auto;
|
|
31
|
+
width: 304px;
|
|
53
32
|
box-sizing: border-box;
|
|
33
|
+
max-width: 100%;
|
|
54
34
|
}
|
|
55
35
|
|
|
56
|
-
.
|
|
57
|
-
min-width: fit-content;
|
|
36
|
+
.input {
|
|
58
37
|
width: 100%;
|
|
38
|
+
margin: 0;
|
|
59
39
|
box-sizing: border-box;
|
|
60
40
|
}
|
|
61
41
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../src/molecule/questions/free-text/test/fixtures/default.js"],"names":["props","placeholder","
|
|
1
|
+
{"version":3,"sources":["../../../../../../src/molecule/questions/free-text/test/fixtures/default.js"],"names":["props","placeholder","defaultValue"],"mappings":"AAAA,eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,WAAW,EAAE,uBADR;AAELC,IAAAA,YAAY,EAAE;AAFT;AADM,CAAf","sourcesContent":["export default {\n props: {\n placeholder: 'Type your answer here',\n defaultValue: null\n }\n};\n"],"file":"default.js"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../src/molecule/questions/free-text/test/fixtures/with-default-value.js"],"names":["props","placeholder","defaultValue"],"mappings":"AAAA,eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,WAAW,EAAE,uBADR;AAELC,IAAAA,YAAY,EAAE;AAFT;AADM,CAAf","sourcesContent":["export default {\n props: {\n placeholder: 'Type your answer here',\n defaultValue: 'plop!'\n }\n};\n"],"file":"with-default-value.js"}
|
|
@@ -3,8 +3,7 @@ import forEach from 'lodash/forEach';
|
|
|
3
3
|
import renderComponentMacro from '../../../../test/helpers/render-component';
|
|
4
4
|
import MoleculeQuestionsFreeText from '..';
|
|
5
5
|
import fixtureDefault from './fixtures/default';
|
|
6
|
-
import
|
|
7
|
-
import fixtureWithValue from './fixtures/with-value';
|
|
6
|
+
import fixtureWithDefaultValue from './fixtures/with-default-value';
|
|
8
7
|
test('MoleculeQuestions › MoleculeQuestionsFreeText > should have valid propTypes', t => {
|
|
9
8
|
t.pass();
|
|
10
9
|
forEach(MoleculeQuestionsFreeText.propTypes, (value, key) => {
|
|
@@ -12,6 +11,5 @@ test('MoleculeQuestions › MoleculeQuestionsFreeText > should have valid propTy
|
|
|
12
11
|
});
|
|
13
12
|
});
|
|
14
13
|
test('MoleculeQuestions › MoleculeQuestionsFreeText › Default › should be rendered', renderComponentMacro, MoleculeQuestionsFreeText, fixtureDefault);
|
|
15
|
-
test('MoleculeQuestions › MoleculeQuestionsFreeText ›
|
|
16
|
-
test('MoleculeQuestions › MoleculeQuestionsFreeText › WithValue › should be rendered', renderComponentMacro, MoleculeQuestionsFreeText, fixtureWithValue);
|
|
14
|
+
test('MoleculeQuestions › MoleculeQuestionsFreeText › WithDefaultValue › should be rendered', renderComponentMacro, MoleculeQuestionsFreeText, fixtureWithDefaultValue);
|
|
17
15
|
//# sourceMappingURL=fixtures.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/molecule/questions/free-text/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","MoleculeQuestionsFreeText","fixtureDefault","
|
|
1
|
+
{"version":3,"sources":["../../../../../src/molecule/questions/free-text/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","MoleculeQuestionsFreeText","fixtureDefault","fixtureWithDefaultValue","t","pass","propTypes","value","key","not","undefined"],"mappings":"AAAA,OAAOA,IAAP,MAAiB,KAAjB;AACA,OAAOC,OAAP,MAAoB,gBAApB;AACA,OAAOC,oBAAP,MAAiC,2CAAjC;AACA,OAAOC,yBAAP,MAAsC,IAAtC;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,uBAAP,MAAoC,+BAApC;AAEAL,IAAI,CAAC,6EAAD,EAAgFM,CAAC,IAAI;AACvFA,EAAAA,CAAC,CAACC,IAAF;AACAN,EAAAA,OAAO,CAACE,yBAAyB,CAACK,SAA3B,EAAsC,CAACC,KAAD,EAAQC,GAAR,KAAgB;AAC3DJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,uEAAsEF,GAAI,mEAAnG;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAV,IAAI,CAAC,8EAAD,EAAiFE,oBAAjF,EAAuGC,yBAAvG,EAAkIC,cAAlI,CAAJ;AACAJ,IAAI,CAAC,uFAAD,EAA0FE,oBAA1F,EAAgHC,yBAAhH,EAA2IE,uBAA3I,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../../test/helpers/render-component';\nimport MoleculeQuestionsFreeText from '..';\nimport fixtureDefault from './fixtures/default';\nimport fixtureWithDefaultValue from './fixtures/with-default-value';\n\ntest('MoleculeQuestions › MoleculeQuestionsFreeText > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeQuestionsFreeText.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"MoleculeQuestions.MoleculeQuestionsFreeText.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('MoleculeQuestions › MoleculeQuestionsFreeText › Default › should be rendered', renderComponentMacro, MoleculeQuestionsFreeText, fixtureDefault);\ntest('MoleculeQuestions › MoleculeQuestionsFreeText › WithDefaultValue › should be rendered', renderComponentMacro, MoleculeQuestionsFreeText, fixtureWithDefaultValue);\n"],"file":"fixtures.js"}
|
|
@@ -57,6 +57,7 @@ const QCMImage = (props, context) => {
|
|
|
57
57
|
"data-name": "answerText",
|
|
58
58
|
className: style.titleWrapper
|
|
59
59
|
}, /*#__PURE__*/React.createElement("div", {
|
|
60
|
+
title: title,
|
|
60
61
|
className: classnames(style.title, innerHTML) // eslint-disable-next-line react/no-danger
|
|
61
62
|
,
|
|
62
63
|
dangerouslySetInnerHTML: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/molecule/questions/qcm-graphic/index.js"],"names":["React","PropTypes","classnames","Provider","innerHTML","getShadowBoxColorFromPrimary","style","QCMImage","props","context","answers","skin","primarySkinColor","answersViews","map","answer","key","onClick","title","selected","image","ariaLabel","boxShadow","backgroundColor","background","content","imageWrapper","backgroundImage","titleWrapper","__html","wrapper","contextTypes","childContextTypes","propTypes","arrayOf","shape","string","bool","func"],"mappings":";;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,OAAOC,UAAP,MAAuB,YAAvB;AACA,OAAOC,QAAP,MAAqB,wBAArB;AACA,SAAQC,SAAR,QAAwB,+BAAxB;AACA,SAAQC,4BAAR,QAA2C,iDAA3C;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,QAAQ,GAAG,CAACC,KAAD,EAAQC,OAAR,KAAoB;AACnC,QAAM;AAACC,IAAAA;AAAD,MAAYF,KAAlB;AACA,QAAM;AAACG,IAAAA;AAAD,MAASF,OAAf;;AACA,QAAMG,gBAAgB,GAAG,OAAM,SAAN,EAAiB,gBAAjB,EAAmCD,IAAnC,CAAzB;;AAEA,QAAME,YAAY,GAAGH,OAAO,CAACI,GAAR,CAAY,CAACC,MAAD,EAASC,GAAT,KAAiB;AAChD,UAAM;AAACC,MAAAA,OAAD;AAAUC,MAAAA,KAAV;AAAiBC,MAAAA,QAAjB;AAA2BC,MAAAA,KAA3B;AAAkCC,MAAAA;AAAlC,QAA+CN,MAArD;AAEA,wBACE;AACE,MAAA,OAAO,EAAEE,OADX;AAEE,uBAAeE,QAFjB;AAGE,mBAAU,eAHZ;AAIE,MAAA,KAAK,eACCA,QAAQ,IAAI;AACdG,QAAAA,SAAS,EAAG,cAAajB,4BAA4B,CAACO,gBAAD,CAAmB;AAD1D,OADb,CAJP;AASE,MAAA,SAAS,EAAEO,QAAQ,GAAGb,KAAK,CAACa,QAAT,GAAoBb,KAAK,CAACS,MAT/C;AAUE,MAAA,GAAG,EAAEC;AAVP,oBAYE;AACE,mBAAU,kBADZ;AAEE,MAAA,KAAK,EAAE;AACLO,QAAAA,eAAe,EAAEJ,QAAQ,GAAGP,gBAAH,GAAsB;AAD1C,OAFT;AAKE,MAAA,SAAS,EAAEN,KAAK,CAACkB;AALnB,MAZF,eAmBE;AAAK,mBAAU,eAAf;AAA+B,MAAA,SAAS,EAAElB,KAAK,CAACmB;AAAhD,oBACE;AACE,MAAA,SAAS,EAAEnB,KAAK,CAACoB,YADnB;AAEE,mBAAU,aAFZ;AAGE,oBAAYL,SAAS,IAAIH,KAH3B;AAIE,MAAA,KAAK,EAAE;AACLS,QAAAA,eAAe,EAAG,OAAMP,KAAM;AADzB;AAJT,MADF,eASE;AAAK,mBAAU,YAAf;AAA4B,MAAA,SAAS,EAAEd,KAAK,CAACsB;AAA7C,oBACE;AACE,MAAA,SAAS,
|
|
1
|
+
{"version":3,"sources":["../../../../src/molecule/questions/qcm-graphic/index.js"],"names":["React","PropTypes","classnames","Provider","innerHTML","getShadowBoxColorFromPrimary","style","QCMImage","props","context","answers","skin","primarySkinColor","answersViews","map","answer","key","onClick","title","selected","image","ariaLabel","boxShadow","backgroundColor","background","content","imageWrapper","backgroundImage","titleWrapper","__html","wrapper","contextTypes","childContextTypes","propTypes","arrayOf","shape","string","bool","func"],"mappings":"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","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {getOr} from 'lodash/fp';\nimport classnames from 'classnames';\nimport Provider from '../../../atom/provider';\nimport {innerHTML} from '../../../atom/label/style.css';\nimport {getShadowBoxColorFromPrimary} from '../../../util/get-shadow-box-color-from-primary';\nimport style from './style.css';\n\nconst QCMImage = (props, context) => {\n const {answers} = props;\n const {skin} = context;\n const primarySkinColor = getOr('#00B0FF', 'common.primary', skin);\n\n const answersViews = answers.map((answer, key) => {\n const {onClick, title, selected, image, ariaLabel} = answer;\n\n return (\n <div\n onClick={onClick}\n data-selected={selected}\n data-name=\"answerGraphic\"\n style={{\n ...(selected && {\n boxShadow: `0 4px 16px ${getShadowBoxColorFromPrimary(primarySkinColor)}`\n })\n }}\n className={selected ? style.selected : style.answer}\n key={key}\n >\n <div\n data-name=\"answerBackground\"\n style={{\n backgroundColor: selected ? primarySkinColor : '#F4F4F5'\n }}\n className={style.background}\n />\n <div data-name=\"answerContent\" className={style.content}>\n <div\n className={style.imageWrapper}\n data-name=\"answerImage\"\n aria-label={ariaLabel || title}\n style={{\n backgroundImage: `url(${image})`\n }}\n />\n <div data-name=\"answerText\" className={style.titleWrapper}>\n <div\n title={title}\n className={classnames(style.title, innerHTML)}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: title}}\n />\n </div>\n </div>\n </div>\n );\n });\n\n return (\n <div data-name=\"qcm-graphic-wrapper\" className={style.wrapper}>\n {answersViews}\n </div>\n );\n};\n\nQCMImage.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nQCMImage.propTypes = {\n answers: PropTypes.arrayOf(\n PropTypes.shape({\n title: PropTypes.string,\n selected: PropTypes.bool,\n onClick: PropTypes.func,\n image: PropTypes.string,\n ariaLabel: PropTypes.string\n })\n )\n};\n\nexport default QCMImage;\n"],"file":"index.js"}
|
|
@@ -64,6 +64,11 @@
|
|
|
64
64
|
width: 100%;
|
|
65
65
|
align-items: center;
|
|
66
66
|
justify-content: center;
|
|
67
|
+
overflow: hidden;
|
|
68
|
+
hyphens: auto;
|
|
69
|
+
-ms-word-break: break-all;
|
|
70
|
+
word-break: break-all;
|
|
71
|
+
word-break: break-word;
|
|
67
72
|
}
|
|
68
73
|
|
|
69
74
|
.title {
|
|
@@ -144,10 +149,17 @@
|
|
|
144
149
|
}
|
|
145
150
|
|
|
146
151
|
.titleWrapper {
|
|
152
|
+
height: 100%;
|
|
153
|
+
width: 100%;
|
|
154
|
+
display: flex;
|
|
147
155
|
white-space: wrap;
|
|
148
156
|
overflow: hidden;
|
|
149
157
|
padding: 0;
|
|
150
158
|
justify-content: left;
|
|
151
159
|
font-size: 15px;
|
|
152
160
|
}
|
|
161
|
+
|
|
162
|
+
.title {
|
|
163
|
+
text-align: left;
|
|
164
|
+
}
|
|
153
165
|
}
|
|
@@ -6,7 +6,7 @@ export default {
|
|
|
6
6
|
selected: false,
|
|
7
7
|
image: 'https://images.unsplash.com/photo-1467890947394-8171244e5410?dpr=2&auto=format&fit=crop&w=1080&h=720&q=80&cs=tinysrgb&crop=&bg='
|
|
8
8
|
}, {
|
|
9
|
-
title: 'Lorem ipsum',
|
|
9
|
+
title: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sut labore et dolore magna aliqua.',
|
|
10
10
|
onClick: () => {},
|
|
11
11
|
selected: false,
|
|
12
12
|
image: 'https://images.unsplash.com/photo-1494477920939-88c59ba76428?dpr=2&auto=format&fit=crop&w=1080&h=607&q=80&cs=tinysrgb&crop=&bg='
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../src/molecule/questions/qcm-graphic/test/fixtures/default.js"],"names":["props","answers","title","onClick","selected","image"],"mappings":"AAAA,eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,OAAO,EAAE,CACP;AACEC,MAAAA,KAAK,EAAE,iCADT;AAEEC,MAAAA,OAAO,EAAE,MAAM,CAAE,CAFnB;AAGEC,MAAAA,QAAQ,EAAE,KAHZ;AAIEC,MAAAA,KAAK,EACH;AALJ,KADO,EAQP;AACEH,MAAAA,KAAK,
|
|
1
|
+
{"version":3,"sources":["../../../../../../src/molecule/questions/qcm-graphic/test/fixtures/default.js"],"names":["props","answers","title","onClick","selected","image"],"mappings":"AAAA,eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,OAAO,EAAE,CACP;AACEC,MAAAA,KAAK,EAAE,iCADT;AAEEC,MAAAA,OAAO,EAAE,MAAM,CAAE,CAFnB;AAGEC,MAAAA,QAAQ,EAAE,KAHZ;AAIEC,MAAAA,KAAK,EACH;AALJ,KADO,EAQP;AACEH,MAAAA,KAAK,EACH,6FAFJ;AAGEC,MAAAA,OAAO,EAAE,MAAM,CAAE,CAHnB;AAIEC,MAAAA,QAAQ,EAAE,KAJZ;AAKEC,MAAAA,KAAK,EACH;AANJ,KARO,EAgBP;AACEH,MAAAA,KAAK,EAAE,OADT;AAEEC,MAAAA,OAAO,EAAE,MAAM,CAAE,CAFnB;AAGEC,MAAAA,QAAQ,EAAE,IAHZ;AAIEC,MAAAA,KAAK,EACH;AALJ,KAhBO,EAuBP;AACEH,MAAAA,KAAK,EAAE,6BADT;AAEEC,MAAAA,OAAO,EAAE,MAAM,CAAE,CAFnB;AAGEC,MAAAA,QAAQ,EAAE,KAHZ;AAIEC,MAAAA,KAAK,EACH;AALJ,KAvBO,EA8BP;AACEH,MAAAA,KAAK,EAAE,iCADT;AAEEC,MAAAA,OAAO,EAAE,MAAM,CAAE,CAFnB;AAGEC,MAAAA,QAAQ,EAAE,KAHZ;AAIEC,MAAAA,KAAK,EACH;AALJ,KA9BO,EAqCP;AACEH,MAAAA,KAAK,EAAE,aADT;AAEEC,MAAAA,OAAO,EAAE,MAAM,CAAE,CAFnB;AAGEC,MAAAA,QAAQ,EAAE,KAHZ;AAIEC,MAAAA,KAAK,EACH;AALJ,KArCO,EA4CP;AACEH,MAAAA,KAAK,EAAE,OADT;AAEEC,MAAAA,OAAO,EAAE,MAAM,CAAE,CAFnB;AAGEC,MAAAA,QAAQ,EAAE,IAHZ;AAIEC,MAAAA,KAAK,EACH;AALJ,KA5CO,EAmDP;AACEH,MAAAA,KAAK,EAAE,6BADT;AAEEC,MAAAA,OAAO,EAAE,MAAM,CAAE,CAFnB;AAGEC,MAAAA,QAAQ,EAAE,KAHZ;AAIEC,MAAAA,KAAK,EACH;AALJ,KAnDO;AADJ;AADM,CAAf","sourcesContent":["export default {\n props: {\n answers: [\n {\n title: 'There is no need for a password',\n onClick: () => {},\n selected: false,\n image:\n 'https://images.unsplash.com/photo-1467890947394-8171244e5410?dpr=2&auto=format&fit=crop&w=1080&h=720&q=80&cs=tinysrgb&crop=&bg='\n },\n {\n title:\n 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sut labore et dolore magna aliqua.',\n onClick: () => {},\n selected: false,\n image:\n 'https://images.unsplash.com/photo-1494477920939-88c59ba76428?dpr=2&auto=format&fit=crop&w=1080&h=607&q=80&cs=tinysrgb&crop=&bg='\n },\n {\n title: 'Lorem',\n onClick: () => {},\n selected: true,\n image:\n 'https://images.unsplash.com/photo-1494416952682-200c9e760aac?dpr=2&auto=format&fit=crop&w=1080&h=607&q=80&cs=tinysrgb&crop=&bg='\n },\n {\n title: 'You need to have a password',\n onClick: () => {},\n selected: false,\n image:\n 'https://images.unsplash.com/photo-1493442043090-087540b34c1a?dpr=2&auto=format&fit=crop&w=1080&h=607&q=80&cs=tinysrgb&crop=&bg='\n },\n {\n title: 'There is no need for a password',\n onClick: () => {},\n selected: false,\n image:\n 'https://images.unsplash.com/photo-1467890947394-8171244e5410?dpr=2&auto=format&fit=crop&w=1080&h=720&q=80&cs=tinysrgb&crop=&bg='\n },\n {\n title: 'Lorem ipsum',\n onClick: () => {},\n selected: false,\n image:\n 'https://images.unsplash.com/photo-1494477920939-88c59ba76428?dpr=2&auto=format&fit=crop&w=1080&h=607&q=80&cs=tinysrgb&crop=&bg='\n },\n {\n title: 'Lorem',\n onClick: () => {},\n selected: true,\n image:\n 'https://images.unsplash.com/photo-1494416952682-200c9e760aac?dpr=2&auto=format&fit=crop&w=1080&h=607&q=80&cs=tinysrgb&crop=&bg='\n },\n {\n title: 'You need to have a password',\n onClick: () => {},\n selected: false,\n image:\n 'https://images.unsplash.com/photo-1493442043090-087540b34c1a?dpr=2&auto=format&fit=crop&w=1080&h=607&q=80&cs=tinysrgb&crop=&bg='\n }\n ]\n }\n};\n"],"file":"default.js"}
|
|
@@ -6,7 +6,7 @@ export default {
|
|
|
6
6
|
selected: false,
|
|
7
7
|
image: 'https://images.unsplash.com/photo-1467890947394-8171244e5410?dpr=2&auto=format&fit=crop&w=1080&h=720&q=80&cs=tinysrgb&crop=&bg='
|
|
8
8
|
}, {
|
|
9
|
-
title: 'Lorem ipsum',
|
|
9
|
+
title: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua tempor incididunt ut labore et dolore tempor incididunt ut labore et dolore magna aliqua tempor incididunt ut labore et dolore.',
|
|
10
10
|
onClick: () => {},
|
|
11
11
|
selected: false,
|
|
12
12
|
image: 'https://images.unsplash.com/photo-1494477920939-88c59ba76428?dpr=2&auto=format&fit=crop&w=1080&h=607&q=80&cs=tinysrgb&crop=&bg='
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../src/molecule/questions/qcm-graphic/test/fixtures/no-selected.js"],"names":["props","answers","title","onClick","selected","image"],"mappings":"AAAA,eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,OAAO,EAAE,CACP;AACEC,MAAAA,KAAK,EAAE,iCADT;AAEEC,MAAAA,OAAO,EAAE,MAAM,CAAE,CAFnB;AAGEC,MAAAA,QAAQ,EAAE,KAHZ;AAIEC,MAAAA,KAAK,EACH;AALJ,KADO,EAQP;AACEH,MAAAA,KAAK,
|
|
1
|
+
{"version":3,"sources":["../../../../../../src/molecule/questions/qcm-graphic/test/fixtures/no-selected.js"],"names":["props","answers","title","onClick","selected","image"],"mappings":"AAAA,eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,OAAO,EAAE,CACP;AACEC,MAAAA,KAAK,EAAE,iCADT;AAEEC,MAAAA,OAAO,EAAE,MAAM,CAAE,CAFnB;AAGEC,MAAAA,QAAQ,EAAE,KAHZ;AAIEC,MAAAA,KAAK,EACH;AALJ,KADO,EAQP;AACEH,MAAAA,KAAK,EACH,6PAFJ;AAGEC,MAAAA,OAAO,EAAE,MAAM,CAAE,CAHnB;AAIEC,MAAAA,QAAQ,EAAE,KAJZ;AAKEC,MAAAA,KAAK,EACH;AANJ,KARO,EAgBP;AACEH,MAAAA,KAAK,EAAE,OADT;AAEEC,MAAAA,OAAO,EAAE,MAAM,CAAE,CAFnB;AAGEC,MAAAA,QAAQ,EAAE,KAHZ;AAIEC,MAAAA,KAAK,EACH;AALJ,KAhBO,EAuBP;AACEH,MAAAA,KAAK,EAAE,6BADT;AAEEC,MAAAA,OAAO,EAAE,MAAM,CAAE,CAFnB;AAGEC,MAAAA,QAAQ,EAAE,KAHZ;AAIEC,MAAAA,KAAK,EACH;AALJ,KAvBO;AADJ;AADM,CAAf","sourcesContent":["export default {\n props: {\n answers: [\n {\n title: 'There is no need for a password',\n onClick: () => {},\n selected: false,\n image:\n 'https://images.unsplash.com/photo-1467890947394-8171244e5410?dpr=2&auto=format&fit=crop&w=1080&h=720&q=80&cs=tinysrgb&crop=&bg='\n },\n {\n title:\n 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua tempor incididunt ut labore et dolore tempor incididunt ut labore et dolore magna aliqua tempor incididunt ut labore et dolore.',\n onClick: () => {},\n selected: false,\n image:\n 'https://images.unsplash.com/photo-1494477920939-88c59ba76428?dpr=2&auto=format&fit=crop&w=1080&h=607&q=80&cs=tinysrgb&crop=&bg='\n },\n {\n title: 'Lorem',\n onClick: () => {},\n selected: false,\n image:\n 'https://images.unsplash.com/photo-1494416952682-200c9e760aac?dpr=2&auto=format&fit=crop&w=1080&h=607&q=80&cs=tinysrgb&crop=&bg='\n },\n {\n title: 'You need to have a password',\n onClick: () => {},\n selected: false,\n image:\n 'https://images.unsplash.com/photo-1493442043090-087540b34c1a?dpr=2&auto=format&fit=crop&w=1080&h=607&q=80&cs=tinysrgb&crop=&bg='\n }\n ]\n }\n};\n"],"file":"no-selected.js"}
|
|
@@ -28,7 +28,7 @@ test('onClick should be reachable, should match given aria-label', t => {
|
|
|
28
28
|
});
|
|
29
29
|
const answersImages = wrapper.find('[data-name="answerImage"]');
|
|
30
30
|
t.true(answersImages.at(1).exists());
|
|
31
|
-
t.is(answersImages.at(1).props()['aria-label'], 'Lorem ipsum');
|
|
31
|
+
t.is(answersImages.at(1).props()['aria-label'], 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sut labore et dolore magna aliqua.');
|
|
32
32
|
const answers = wrapper.find('[data-name="answerGraphic"]');
|
|
33
33
|
answers.at(1).simulate('click');
|
|
34
34
|
t.true(answerWasClicked);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/molecule/questions/qcm-graphic/test/qcm-graphic.js"],"names":["browserEnv","test","React","shallow","configure","Adapter","QCMImage","defaultFixture","adapter","translate","t","answerWasClicked","props","answers","onClick","wrapper","context","answersImages","find","true","at","exists","is","simulate","pass","firstAnswer","deepEqual","style","unselectedBackgroundAnswer","children","backgroundColor","firstAnswerText","thirdAnswer","boxShadow","selectedBackgroundAnswer"],"mappings":";;;;AAAA,OAAOA,UAAP,MAAuB,aAAvB;AACA,OAAOC,IAAP,MAAiB,KAAjB;AACA,OAAOC,KAAP,MAAkB,OAAlB;AACA,SAAQC,OAAR,EAAiBC,SAAjB,QAAiC,QAAjC;AAEA,OAAOC,OAAP,MAAoB,yBAApB;AACA,OAAOC,QAAP,MAAqB,IAArB;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AAEAP,UAAU;AACVI,SAAS,CAAC;AAACI,EAAAA,OAAO,EAAE,IAAIH,OAAJ;AAAV,CAAD,CAAT;AACA,MAAMI,SAAS,YAAf;AAEAR,IAAI,CAAC,4DAAD,EAA+DS,CAAC,IAAI;AACtE,MAAIC,gBAAgB,GAAG,KAAvB;AACAJ,EAAAA,cAAc,CAACK,KAAf,CAAqBC,OAArB,CAA6B,CAA7B,0BACKN,cAAc,CAACK,KAAf,CAAqBC,OAArB,CAA6B,CAA7B,CADL;AAEEC,IAAAA,OAAO,EAAE,MAAM;AACbH,MAAAA,gBAAgB,GAAG,IAAnB;AACD;AAJH;AAOA,QAAMI,OAAO,GAAGZ,OAAO,eAAC,oBAAC,QAAD,EAAcI,cAAc,CAACK,KAA7B,CAAD,EAAyC;AAC9DI,IAAAA,OAAO,EAAE;AAACP,MAAAA;AAAD;AADqD,GAAzC,CAAvB;AAIA,QAAMQ,aAAa,GAAGF,OAAO,CAACG,IAAR,CAAa,2BAAb,CAAtB;AACAR,EAAAA,CAAC,CAACS,IAAF,CAAOF,aAAa,CAACG,EAAd,CAAiB,CAAjB,EAAoBC,MAApB,EAAP;AACAX,EAAAA,CAAC,CAACY,EAAF,
|
|
1
|
+
{"version":3,"sources":["../../../../../src/molecule/questions/qcm-graphic/test/qcm-graphic.js"],"names":["browserEnv","test","React","shallow","configure","Adapter","QCMImage","defaultFixture","adapter","translate","t","answerWasClicked","props","answers","onClick","wrapper","context","answersImages","find","true","at","exists","is","simulate","pass","firstAnswer","deepEqual","style","unselectedBackgroundAnswer","children","backgroundColor","firstAnswerText","thirdAnswer","boxShadow","selectedBackgroundAnswer"],"mappings":"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","sourcesContent":["import browserEnv from 'browser-env';\nimport test from 'ava';\nimport React from 'react';\nimport {shallow, configure} from 'enzyme';\nimport {identity} from 'lodash/fp';\nimport Adapter from 'enzyme-adapter-react-16';\nimport QCMImage from '..';\nimport defaultFixture from './fixtures/default';\n\nbrowserEnv();\nconfigure({adapter: new Adapter()});\nconst translate = identity;\n\ntest('onClick should be reachable, should match given aria-label', t => {\n let answerWasClicked = false;\n defaultFixture.props.answers[1] = {\n ...defaultFixture.props.answers[1],\n onClick: () => {\n answerWasClicked = true;\n }\n };\n\n const wrapper = shallow(<QCMImage {...defaultFixture.props} />, {\n context: {translate}\n });\n\n const answersImages = wrapper.find('[data-name=\"answerImage\"]');\n t.true(answersImages.at(1).exists());\n t.is(\n answersImages.at(1).props()['aria-label'],\n 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sut labore et dolore magna aliqua.'\n );\n\n const answers = wrapper.find('[data-name=\"answerGraphic\"]');\n answers.at(1).simulate('click');\n t.true(answerWasClicked);\n t.pass();\n});\n\ntest(\"should set: selected's background to Primary, unselected's no background\", t => {\n const wrapper = shallow(<QCMImage {...defaultFixture.props} />, {\n context: {translate}\n });\n const answers = wrapper.find('[data-name=\"answerGraphic\"]');\n\n const firstAnswer = answers.at(0);\n t.true(firstAnswer.exists());\n t.deepEqual(firstAnswer.props().style, {});\n const unselectedBackgroundAnswer = firstAnswer.children().at(0);\n t.true(unselectedBackgroundAnswer.exists());\n t.deepEqual(unselectedBackgroundAnswer.props().style, {backgroundColor: '#F4F4F5'});\n const firstAnswerText = firstAnswer.children().at(1).children().at(1).children().at(0);\n t.true(firstAnswerText.exists());\n\n const thirdAnswer = answers.at(2);\n t.true(thirdAnswer.exists());\n t.deepEqual(thirdAnswer.props().style, {boxShadow: '0 4px 16px rgba(0, 122, 179, 0.25)'});\n const selectedBackgroundAnswer = thirdAnswer.children().at(0);\n t.true(selectedBackgroundAnswer.exists());\n t.deepEqual(selectedBackgroundAnswer.props().style, {backgroundColor: '#00B0FF'});\n});\n"],"file":"qcm-graphic.js"}
|
|
@@ -3,8 +3,6 @@ import _map from "lodash/fp/map";
|
|
|
3
3
|
|
|
4
4
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
5
5
|
|
|
6
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
7
|
-
|
|
8
6
|
import React from 'react';
|
|
9
7
|
import PropTypes from 'prop-types';
|
|
10
8
|
import parseTemplateString from '../../../util/parse-template-string';
|
|
@@ -39,16 +37,10 @@ const Template = ({
|
|
|
39
37
|
}, answers);
|
|
40
38
|
|
|
41
39
|
if (!field) return null;
|
|
42
|
-
|
|
43
|
-
const {
|
|
44
|
-
type: fieldType
|
|
45
|
-
} = field,
|
|
46
|
-
fieldProps = _objectWithoutPropertiesLoose(field, ["type"]);
|
|
47
|
-
|
|
48
|
-
const fieldView = fieldType === 'text' ? /*#__PURE__*/React.createElement(FreeText, _extends({}, fieldProps, {
|
|
40
|
+
const fieldView = field.type === 'text' ? /*#__PURE__*/React.createElement(FreeText, _extends({}, field, {
|
|
49
41
|
className: style.text
|
|
50
|
-
})) : /*#__PURE__*/React.createElement(DropDown, _extends({},
|
|
51
|
-
theme: "
|
|
42
|
+
})) : /*#__PURE__*/React.createElement(DropDown, _extends({}, field, {
|
|
43
|
+
theme: "template"
|
|
52
44
|
}));
|
|
53
45
|
return /*#__PURE__*/React.createElement("div", {
|
|
54
46
|
className: style.answerType,
|
|
@@ -64,11 +56,16 @@ const Template = ({
|
|
|
64
56
|
};
|
|
65
57
|
|
|
66
58
|
const TextPropTypes = process.env.NODE_ENV !== "production" ? _extends(_extends({}, DropDown.propTypes), {}, {
|
|
67
|
-
type: PropTypes.string
|
|
59
|
+
type: PropTypes.string,
|
|
60
|
+
name: PropTypes.string
|
|
61
|
+
}) : {};
|
|
62
|
+
const DropDownPropTypes = process.env.NODE_ENV !== "production" ? _extends(_extends({}, DropDown.propTypes), {}, {
|
|
63
|
+
type: PropTypes.string,
|
|
64
|
+
name: PropTypes.string
|
|
68
65
|
}) : {};
|
|
69
66
|
Template.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
70
67
|
template: PropTypes.string,
|
|
71
|
-
answers: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.shape(
|
|
68
|
+
answers: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.shape(DropDownPropTypes), PropTypes.shape(TextPropTypes)]))
|
|
72
69
|
} : {};
|
|
73
70
|
export default Template;
|
|
74
71
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/molecule/questions/template/index.js"],"names":["React","PropTypes","parseTemplateString","DropDown","FreeText","style","Template","template","answers","totalTemplate","templateCompose","convert","cap","part","key","type","__html","value","field","name","
|
|
1
|
+
{"version":3,"sources":["../../../../src/molecule/questions/template/index.js"],"names":["React","PropTypes","parseTemplateString","DropDown","FreeText","style","Template","template","answers","totalTemplate","templateCompose","convert","cap","part","key","type","__html","value","field","name","fieldView","text","answerType","wrapper","TextPropTypes","propTypes","string","DropDownPropTypes","arrayOf","oneOfType","shape"],"mappings":";;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,OAAOC,mBAAP,MAAgC,qCAAhC;AACA,OAAOC,QAAP,MAAqB,cAArB;AACA,OAAOC,QAAP,MAAqB,cAArB;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,QAAQ,GAAG,CAAC;AAACC,EAAAA,QAAD;AAAWC,EAAAA;AAAX,CAAD,KAAyB;AACxC,QAAMC,aAAa,GAAGP,mBAAmB,CAACK,QAAD,CAAzC;;AACA,QAAMG,eAAe,GAAG,KAAIC,OAAJ,CAAY;AAACC,IAAAA,GAAG,EAAE;AAAN,GAAZ,EAA0B,CAACC,IAAD,EAAOC,GAAP,KAAe;AAC/D,UAAMC,IAAI,GAAGF,IAAI,CAACE,IAAlB;;AACA,QAAIA,IAAI,KAAK,QAAb,EAAuB;AACrB,0BACE;AACE,QAAA,GAAG,EAAED,GADP,CAEE;AAFF;AAGE,QAAA,uBAAuB,EAAE;AAACE,UAAAA,MAAM,EAAEH,IAAI,CAACI;AAAd;AAH3B,QADF;AAOD;;AACD,QAAIF,IAAI,KAAK,aAAb,EAA4B;AAC1B,YAAMG,KAAK,GAAG,MAAK;AAACC,QAAAA,IAAI,EAAEN,IAAI,CAACI;AAAZ,OAAL,EAAyBT,OAAzB,CAAd;;AACA,UAAI,CAACU,KAAL,EAAY,OAAO,IAAP;AACZ,YAAME,SAAS,GACbF,KAAK,CAACH,IAAN,KAAe,MAAf,gBACE,oBAAC,QAAD,eAAcG,KAAd;AAAqB,QAAA,SAAS,EAAEb,KAAK,CAACgB;AAAtC,SADF,gBAGE,oBAAC,QAAD,eAAcH,KAAd;AAAqB,QAAA,KAAK,EAAC;AAA3B,SAJJ;AAOA,0BACE;AAAK,QAAA,SAAS,EAAEb,KAAK,CAACiB,UAAtB;AAAkC,QAAA,GAAG,EAAET,IAAI,CAACI;AAA5C,SACGG,SADH,CADF;AAKD;AACF,GA3BuB,EA2BrBX,aA3BqB,CAAxB;;AA6BA,sBACE;AAAK,iBAAU,kBAAf;AAAkC,IAAA,SAAS,EAAEJ,KAAK,CAACkB;AAAnD,KACGb,eADH,CADF;AAKD,CApCD;;AAsCA,MAAMc,aAAN,iEACKrB,QAAQ,CAACsB,SADd;AAEEV,EAAAA,IAAI,EAAEd,SAAS,CAACyB,MAFlB;AAGEP,EAAAA,IAAI,EAAElB,SAAS,CAACyB;AAHlB;AAMA,MAAMC,iBAAN,iEACKxB,QAAQ,CAACsB,SADd;AAEEV,EAAAA,IAAI,EAAEd,SAAS,CAACyB,MAFlB;AAGEP,EAAAA,IAAI,EAAElB,SAAS,CAACyB;AAHlB;AAMApB,QAAQ,CAACmB,SAAT,2CAAqB;AACnBlB,EAAAA,QAAQ,EAAEN,SAAS,CAACyB,MADD;AAEnBlB,EAAAA,OAAO,EAAEP,SAAS,CAAC2B,OAAV,CACP3B,SAAS,CAAC4B,SAAV,CAAoB,CAAC5B,SAAS,CAAC6B,KAAV,CAAgBH,iBAAhB,CAAD,EAAqC1B,SAAS,CAAC6B,KAAV,CAAgBN,aAAhB,CAArC,CAApB,CADO;AAFU,CAArB;AAOA,eAAelB,QAAf","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {map, find} from 'lodash/fp';\nimport parseTemplateString from '../../../util/parse-template-string';\nimport DropDown from '../drop-down';\nimport FreeText from '../free-text';\nimport style from './style.css';\n\nconst Template = ({template, answers}) => {\n const totalTemplate = parseTemplateString(template);\n const templateCompose = map.convert({cap: false})((part, key) => {\n const type = part.type;\n if (type === 'string') {\n return (\n <span\n key={key}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: part.value}}\n />\n );\n }\n if (type === 'answerField') {\n const field = find({name: part.value}, answers);\n if (!field) return null;\n const fieldView =\n field.type === 'text' ? (\n <FreeText {...field} className={style.text} />\n ) : (\n <DropDown {...field} theme=\"template\" />\n );\n\n return (\n <div className={style.answerType} key={part.value}>\n {fieldView}\n </div>\n );\n }\n }, totalTemplate);\n\n return (\n <div data-name=\"template-wrapper\" className={style.wrapper}>\n {templateCompose}\n </div>\n );\n};\n\nconst TextPropTypes = {\n ...DropDown.propTypes,\n type: PropTypes.string,\n name: PropTypes.string\n};\n\nconst DropDownPropTypes = {\n ...DropDown.propTypes,\n type: PropTypes.string,\n name: PropTypes.string\n};\n\nTemplate.propTypes = {\n template: PropTypes.string,\n answers: PropTypes.arrayOf(\n PropTypes.oneOfType([PropTypes.shape(DropDownPropTypes), PropTypes.shape(TextPropTypes)])\n )\n};\n\nexport default Template;\n"],"file":"index.js"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import test from 'ava';
|
|
2
|
+
import forEach from 'lodash/forEach';
|
|
3
|
+
import renderComponentMacro from '../../../test/helpers/render-component';
|
|
4
|
+
import MoleculeSearch from '..';
|
|
5
|
+
import fixtureDefault from './fixtures/default';
|
|
6
|
+
import fixtureWithValue from './fixtures/with-value';
|
|
7
|
+
test('Molecule › MoleculeSearch > should have valid propTypes', t => {
|
|
8
|
+
t.pass();
|
|
9
|
+
forEach(MoleculeSearch.propTypes, (value, key) => {
|
|
10
|
+
t.not(value, undefined, `PropType for "Molecule.MoleculeSearch.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
|
|
11
|
+
});
|
|
12
|
+
});
|
|
13
|
+
test('Molecule › MoleculeSearch › Default › should be rendered', renderComponentMacro, MoleculeSearch, fixtureDefault);
|
|
14
|
+
test('Molecule › MoleculeSearch › WithValue › should be rendered', renderComponentMacro, MoleculeSearch, fixtureWithValue);
|
|
15
|
+
//# sourceMappingURL=fixtures.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/molecule/search/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","MoleculeSearch","fixtureDefault","fixtureWithValue","t","pass","propTypes","value","key","not","undefined"],"mappings":"AAAA,OAAOA,IAAP,MAAiB,KAAjB;AACA,OAAOC,OAAP,MAAoB,gBAApB;AACA,OAAOC,oBAAP,MAAiC,wCAAjC;AACA,OAAOC,cAAP,MAA2B,IAA3B;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,gBAAP,MAA6B,uBAA7B;AAEAL,IAAI,CAAC,yDAAD,EAA4DM,CAAC,IAAI;AACnEA,EAAAA,CAAC,CAACC,IAAF;AACAN,EAAAA,OAAO,CAACE,cAAc,CAACK,SAAhB,EAA2B,CAACC,KAAD,EAAQC,GAAR,KAAgB;AAChDJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,mDAAkDF,GAAI,mEAA/E;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAV,IAAI,CAAC,0DAAD,EAA6DE,oBAA7D,EAAmFC,cAAnF,EAAmGC,cAAnG,CAAJ;AACAJ,IAAI,CAAC,4DAAD,EAA+DE,oBAA/D,EAAqFC,cAArF,EAAqGE,gBAArG,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport MoleculeSearch from '..';\nimport fixtureDefault from './fixtures/default';\nimport fixtureWithValue from './fixtures/with-value';\n\ntest('Molecule › MoleculeSearch > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeSearch.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Molecule.MoleculeSearch.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Molecule › MoleculeSearch › Default › should be rendered', renderComponentMacro, MoleculeSearch, fixtureDefault);\ntest('Molecule › MoleculeSearch › WithValue › should be rendered', renderComponentMacro, MoleculeSearch, fixtureWithValue);\n"],"file":"fixtures.js"}
|