@coorpacademy/components 10.6.0 → 10.7.1

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.
Files changed (81) hide show
  1. package/es/atom/select/index.js +25 -26
  2. package/es/atom/select/index.js.map +1 -1
  3. package/es/atom/select/style.css +30 -0
  4. package/es/atom/select/test/fixtures/coorpmanager.js +11 -0
  5. package/es/atom/select/test/fixtures/coorpmanager.js.map +1 -0
  6. package/es/atom/select/test/fixtures.js +0 -2
  7. package/es/atom/select/test/fixtures.js.map +1 -1
  8. package/es/atom/tag/index.js +1 -1
  9. package/es/atom/tag/index.js.map +1 -1
  10. package/es/molecule/brand-form-group/index.js +3 -1
  11. package/es/molecule/brand-form-group/index.js.map +1 -1
  12. package/es/molecule/brand-form-group/test/fixtures/lookandfeel.js +30 -26
  13. package/es/molecule/brand-form-group/test/fixtures/lookandfeel.js.map +1 -1
  14. package/es/molecule/course-section/style.css +2 -2
  15. package/es/molecule/draggable-list/test/fixtures.js +0 -2
  16. package/es/molecule/draggable-list/test/fixtures.js.map +1 -1
  17. package/es/molecule/questions/free-text/test/fixtures.js +2 -4
  18. package/es/molecule/questions/free-text/test/fixtures.js.map +1 -1
  19. package/es/molecule/search/test/fixtures.js +15 -0
  20. package/es/molecule/search/test/fixtures.js.map +1 -0
  21. package/es/molecule/wizard-summary/style.css +4 -4
  22. package/es/molecule/wizard-summary/test/fixtures.js +0 -2
  23. package/es/molecule/wizard-summary/test/fixtures.js.map +1 -1
  24. package/es/organism/list-items/index.js +2 -2
  25. package/es/organism/list-items/index.js.map +1 -1
  26. package/es/organism/wizard-contents/index.js +2 -2
  27. package/es/organism/wizard-contents/index.js.map +1 -1
  28. package/es/organism/wizard-contents/test/fixtures.js +0 -2
  29. package/es/organism/wizard-contents/test/fixtures.js.map +1 -1
  30. package/es/template/back-office/brand-list/index.js +16 -3
  31. package/es/template/back-office/brand-list/index.js.map +1 -1
  32. package/es/template/back-office/brand-list/style.css +11 -5
  33. package/es/template/back-office/brand-list/test/fixtures/default.js +3 -3
  34. package/es/template/back-office/brand-list/test/fixtures/default.js.map +1 -1
  35. package/es/template/back-office/brand-list/test/fixtures/rh.js +23 -1
  36. package/es/template/back-office/brand-list/test/fixtures/rh.js.map +1 -1
  37. package/es/template/back-office/brand-update/test/fixtures.js +0 -2
  38. package/es/template/back-office/brand-update/test/fixtures.js.map +1 -1
  39. package/lib/atom/select/index.js +30 -30
  40. package/lib/atom/select/index.js.map +1 -1
  41. package/lib/atom/select/style.css +30 -0
  42. package/lib/atom/select/test/fixtures/coorpmanager.js +21 -0
  43. package/lib/atom/select/test/fixtures/coorpmanager.js.map +1 -0
  44. package/lib/atom/select/test/fixtures.js +0 -3
  45. package/lib/atom/select/test/fixtures.js.map +1 -1
  46. package/lib/atom/tag/index.js +1 -1
  47. package/lib/atom/tag/index.js.map +1 -1
  48. package/lib/molecule/brand-form-group/index.js +3 -1
  49. package/lib/molecule/brand-form-group/index.js.map +1 -1
  50. package/lib/molecule/brand-form-group/test/fixtures/lookandfeel.js +30 -26
  51. package/lib/molecule/brand-form-group/test/fixtures/lookandfeel.js.map +1 -1
  52. package/lib/molecule/course-section/style.css +2 -2
  53. package/lib/molecule/draggable-list/test/fixtures.js +0 -3
  54. package/lib/molecule/draggable-list/test/fixtures.js.map +1 -1
  55. package/lib/molecule/questions/free-text/test/fixtures.js +2 -5
  56. package/lib/molecule/questions/free-text/test/fixtures.js.map +1 -1
  57. package/lib/molecule/search/test/fixtures.js +25 -0
  58. package/lib/molecule/search/test/fixtures.js.map +1 -0
  59. package/lib/molecule/wizard-summary/style.css +4 -4
  60. package/lib/molecule/wizard-summary/test/fixtures.js +0 -3
  61. package/lib/molecule/wizard-summary/test/fixtures.js.map +1 -1
  62. package/lib/organism/list-items/index.js +2 -2
  63. package/lib/organism/list-items/index.js.map +1 -1
  64. package/lib/organism/wizard-contents/index.js +2 -2
  65. package/lib/organism/wizard-contents/index.js.map +1 -1
  66. package/lib/organism/wizard-contents/test/fixtures.js +0 -3
  67. package/lib/organism/wizard-contents/test/fixtures.js.map +1 -1
  68. package/lib/template/back-office/brand-list/index.js +17 -3
  69. package/lib/template/back-office/brand-list/index.js.map +1 -1
  70. package/lib/template/back-office/brand-list/style.css +11 -5
  71. package/lib/template/back-office/brand-list/test/fixtures/default.js +3 -3
  72. package/lib/template/back-office/brand-list/test/fixtures/default.js.map +1 -1
  73. package/lib/template/back-office/brand-list/test/fixtures/rh.js +23 -1
  74. package/lib/template/back-office/brand-list/test/fixtures/rh.js.map +1 -1
  75. package/lib/template/back-office/brand-update/test/fixtures.js +0 -3
  76. package/lib/template/back-office/brand-update/test/fixtures.js.map +1 -1
  77. package/package.json +2 -2
  78. package/es/molecule/course-sections/test/fixtures.js +0 -15
  79. package/es/molecule/course-sections/test/fixtures.js.map +0 -1
  80. package/lib/molecule/course-sections/test/fixtures.js +0 -25
  81. package/lib/molecule/course-sections/test/fixtures.js.map +0 -1
@@ -3,27 +3,27 @@
3
3
  exports.__esModule = true;
4
4
  exports.default = exports.SelectOptionPropTypes = void 0;
5
5
 
6
- var _size2 = _interopRequireDefault(require("lodash/fp/size"));
6
+ var _react = _interopRequireWildcard(require("react"));
7
7
 
8
- var _includes2 = _interopRequireDefault(require("lodash/fp/includes"));
8
+ var _propTypes = _interopRequireDefault(require("prop-types"));
9
9
 
10
- var _filter2 = _interopRequireDefault(require("lodash/fp/filter"));
10
+ var _classnames = _interopRequireDefault(require("classnames"));
11
11
 
12
- var _getOr2 = _interopRequireDefault(require("lodash/fp/getOr"));
12
+ var _filter = _interopRequireDefault(require("lodash/fp/filter"));
13
13
 
14
- var _get2 = _interopRequireDefault(require("lodash/fp/get"));
14
+ var _find = _interopRequireDefault(require("lodash/fp/find"));
15
15
 
16
- var _map2 = _interopRequireDefault(require("lodash/fp/map"));
16
+ var _get = _interopRequireDefault(require("lodash/fp/get"));
17
17
 
18
- var _keys2 = _interopRequireDefault(require("lodash/fp/keys"));
18
+ var _getOr = _interopRequireDefault(require("lodash/fp/getOr"));
19
19
 
20
- var _find2 = _interopRequireDefault(require("lodash/fp/find"));
20
+ var _includes = _interopRequireDefault(require("lodash/fp/includes"));
21
21
 
22
- var _react = _interopRequireWildcard(require("react"));
22
+ var _keys = _interopRequireDefault(require("lodash/fp/keys"));
23
23
 
24
- var _propTypes = _interopRequireDefault(require("prop-types"));
24
+ var _map = _interopRequireDefault(require("lodash/fp/map"));
25
25
 
26
- var _classnames = _interopRequireDefault(require("classnames"));
26
+ var _size = _interopRequireDefault(require("lodash/fp/size"));
27
27
 
28
28
  var _novaIcons = require("@coorpacademy/nova-icons");
29
29
 
@@ -33,12 +33,12 @@ var _getClassState = _interopRequireDefault(require("../../util/get-class-state"
33
33
 
34
34
  var _style = _interopRequireDefault(require("./style.css"));
35
35
 
36
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
37
+
36
38
  function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
37
39
 
38
40
  function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
39
41
 
40
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
41
-
42
42
  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); }
43
43
 
44
44
  const themeStyle = {
@@ -50,8 +50,8 @@ const themeStyle = {
50
50
  sort: _style.default.sort,
51
51
  thematiques: _style.default.thematiques,
52
52
  player: _style.default.player,
53
- template: _style.default.template // we keep template in case it is used anywhere else?
54
-
53
+ template: _style.default.template,
54
+ coorpmanager: null
55
55
  };
56
56
 
57
57
  const Select = (props, context) => {
@@ -84,39 +84,39 @@ const Select = (props, context) => {
84
84
  const titleView = title ? /*#__PURE__*/_react.default.createElement("span", {
85
85
  className: _style.default.title
86
86
  }, title, " ") : null;
87
- const selected = (0, _react.useMemo)(() => multiple ? (0, _map2.default)((0, _get2.default)('value'), (0, _filter2.default)({
87
+ const selected = (0, _react.useMemo)(() => multiple ? (0, _map.default)((0, _get.default)('value'), (0, _filter.default)({
88
88
  selected: true
89
- }, options)) : (0, _get2.default)('value', (0, _find2.default)({
89
+ }, options)) : (0, _get.default)('value', (0, _find.default)({
90
90
  selected: true
91
91
  }, options)), [multiple, options]);
92
- const selectedLabel = (0, _react.useMemo)(() => multiple ? (0, _map2.default)((0, _get2.default)('name'), (0, _filter2.default)({
92
+ const selectedLabel = (0, _react.useMemo)(() => multiple ? (0, _map.default)((0, _get.default)('name'), (0, _filter.default)({
93
93
  selected: true
94
- }, options)) : (0, _get2.default)('name', (0, _find2.default)({
94
+ }, options)) : (0, _get.default)('name', (0, _find.default)({
95
95
  selected: true
96
96
  }, options)), [multiple, options]);
97
- const isSelectedInValidOption = (0, _react.useMemo)(() => theme === 'player' && (0, _getOr2.default)(false, 'name', (0, _find2.default)({
97
+ const isSelectedInValidOption = (0, _react.useMemo)(() => theme === 'player' && (0, _getOr.default)(false, 'name', (0, _find.default)({
98
98
  validOption: false,
99
99
  selected: true
100
100
  }, options)), [options, theme]);
101
101
  const handleChange = (0, _react.useMemo)(() => multiple ? e => {
102
- onChange((0, _map2.default)((0, _get2.default)('value'), e.target.selectedOptions));
102
+ onChange((0, _map.default)((0, _get.default)('value'), e.target.selectedOptions));
103
103
  } : e => {
104
104
  onChange(e.target.value);
105
105
  }, [onChange, multiple]);
106
- const black = (0, _react.useMemo)(() => (0, _getOr2.default)('#14171A', 'common.black', skin), [skin]);
107
- const color = (0, _react.useMemo)(() => (0, _getOr2.default)('#00B0FF', 'common.primary', skin), [skin]);
108
- const shouldUseSkinFontColor = (0, _react.useMemo)(() => !isSelectedInValidOption && selected && (0, _includes2.default)(theme, ['question', 'template', 'player']), [isSelectedInValidOption, selected, theme]);
106
+ const black = (0, _react.useMemo)(() => (0, _getOr.default)('#14171A', 'common.black', skin), [skin]);
107
+ const color = (0, _react.useMemo)(() => (0, _getOr.default)('#00B0FF', 'common.primary', skin), [skin]);
108
+ const shouldUseSkinFontColor = (0, _react.useMemo)(() => !isSelectedInValidOption && selected && (0, _includes.default)(theme, ['question', 'template', 'player']), [isSelectedInValidOption, selected, theme]);
109
109
  const arrowColor = selected ? color : undefined;
110
110
  const arrowView = !multiple ? /*#__PURE__*/_react.default.createElement(_novaIcons.NovaCompositionNavigationArrowDown, {
111
- color: (0, _includes2.default)(theme, ['question', 'template', 'player']) ? arrowColor : black,
111
+ color: (0, _includes.default)(theme, ['question', 'template', 'player']) ? arrowColor : black,
112
112
  className: shouldUseSkinFontColor ? _style.default.selectedArrow : _style.default.arrow
113
113
  }) : null;
114
114
  const behaviourClassName = (0, _react.useMemo)(() => (0, _getClassState.default)(_style.default.default, _style.default.modified, _style.default.error, modified, error), [error, modified]);
115
- const composedClassName = (0, _react.useMemo)(() => (0, _classnames.default)(theme ? themeStyle[theme] : behaviourClassName, selected ? _style.default.selected : _style.default.unselected, className), [behaviourClassName, className, selected, theme]);
116
- const labelSize = (0, _react.useMemo)(() => (0, _size2.default)(selectedLabel), [selectedLabel]);
115
+ const composedClassName = (0, _react.useMemo)(() => (0, _classnames.default)(theme && theme !== 'coorpmanager' ? themeStyle[theme] : behaviourClassName, selected ? _style.default.selected : _style.default.unselected, className), [behaviourClassName, className, selected, theme]);
116
+ const labelSize = (0, _react.useMemo)(() => (0, _size.default)(selectedLabel), [selectedLabel]);
117
117
  const isLongLabel = (0, _react.useMemo)(() => labelSize >= 65, [labelSize]);
118
118
  return /*#__PURE__*/_react.default.createElement("div", {
119
- className: composedClassName
119
+ className: (0, _classnames.default)(composedClassName, theme === 'coorpmanager' ? _style.default.coorpmanager : null)
120
120
  }, /*#__PURE__*/_react.default.createElement("label", {
121
121
  "data-name": "select-wrapper",
122
122
  style: _extends({}, shouldUseSkinFontColor && {
@@ -125,7 +125,7 @@ const Select = (props, context) => {
125
125
  className: _style.default.selectWrapper
126
126
  }, titleView, /*#__PURE__*/_react.default.createElement("span", {
127
127
  "data-name": "select-span",
128
- className: (0, _classnames.default)(_style.default.selectSpan, (0, _includes2.default)(theme, ['player', 'invalid', 'question', 'thematiques', 'template']) ? _style.default.noLabelCommon : null, borderClassName, isLongLabel ? _style.default.longLabel : null)
128
+ className: (0, _classnames.default)(_style.default.selectSpan, (0, _includes.default)(theme, ['player', 'invalid', 'question', 'thematiques', 'template']) ? _style.default.noLabelCommon : null, borderClassName, isLongLabel ? _style.default.longLabel : null)
129
129
  }, selectedLabel), arrowView, /*#__PURE__*/_react.default.createElement("select", {
130
130
  "data-name": "native-select",
131
131
  className: _style.default.selectBox,
@@ -160,7 +160,7 @@ Select.propTypes = process.env.NODE_ENV !== "production" ? {
160
160
  description: _propTypes.default.string,
161
161
  required: _propTypes.default.bool,
162
162
  onChange: _propTypes.default.func,
163
- theme: _propTypes.default.oneOf((0, _keys2.default)(themeStyle)),
163
+ theme: _propTypes.default.oneOf((0, _keys.default)(themeStyle)),
164
164
  options: _propTypes.default.arrayOf(_propTypes.default.shape(SelectOptionPropTypes)),
165
165
  modified: _propTypes.default.bool,
166
166
  error: _propTypes.default.bool
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/atom/select/index.js"],"names":["themeStyle","filter","style","invalid","header","mooc","question","sort","thematiques","player","template","Select","props","context","name","options","className","borderClassName","onChange","multiple","disabled","required","description","theme","modified","error","title","propTitle","skin","optionList","map","option","index","value","selectOption","titleView","selected","selectedLabel","isSelectedInValidOption","validOption","handleChange","e","target","selectedOptions","black","color","shouldUseSkinFontColor","arrowColor","undefined","arrowView","selectedArrow","arrow","behaviourClassName","default","composedClassName","unselected","labelSize","isLongLabel","selectWrapper","selectSpan","noLabelCommon","longLabel","selectBox","SelectOptionPropTypes","PropTypes","string","isRequired","oneOfType","number","bool","contextTypes","Provider","childContextTypes","propTypes","func","oneOf","arrayOf","shape"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,UAAU,GAAG;AACjBC,EAAAA,MAAM,EAAEC,eAAMD,MADG;AAEjBE,EAAAA,OAAO,EAAED,eAAMC,OAFE;AAGjBC,EAAAA,MAAM,EAAEF,eAAME,MAHG;AAIjBC,EAAAA,IAAI,EAAEH,eAAMG,IAJK;AAKjBC,EAAAA,QAAQ,EAAEJ,eAAMI,QALC;AAMjBC,EAAAA,IAAI,EAAEL,eAAMK,IANK;AAOjBC,EAAAA,WAAW,EAAEN,eAAMM,WAPF;AAQjBC,EAAAA,MAAM,EAAEP,eAAMO,MARG;AASjBC,EAAAA,QAAQ,EAAER,eAAMQ,QATC,CASQ;;AATR,CAAnB;;AAYA,MAAMC,MAAM,GAAG,CAACC,KAAD,EAAQC,OAAR,KAAoB;AACjC,QAAM;AACJC,IAAAA,IADI;AAEJC,IAAAA,OAAO,GAAG,EAFN;AAGJC,IAAAA,SAHI;AAIJC,IAAAA,eAJI;AAKJC,IAAAA,QALI;AAMJC,IAAAA,QAAQ,GAAG,KANP;AAOJC,IAAAA,QAPI;AAQJC,IAAAA,QARI;AASJC,IAAAA,WATI;AAUJC,IAAAA,KAVI;AAWJC,IAAAA,QAAQ,GAAG,KAXP;AAYJC,IAAAA,KAAK,GAAG,KAZJ;AAaJC,IAAAA,KAAK,EAAEC;AAbH,MAcFf,KAdJ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BAAUC,MAPN;AAQjB5C,EAAAA,QAAQ,EAAE2C,mBAAUK,IARH;AASjBnD,EAAAA,QAAQ,EAAE8C,mBAAUU,IATH;AAUjBnD,EAAAA,KAAK,EAAEyC,mBAAUW,KAAV,CAAgB,oBAAK3E,UAAL,CAAhB,CAVU;AAWjBe,EAAAA,OAAO,EAAEiD,mBAAUY,OAAV,CAAkBZ,mBAAUa,KAAV,CAAgBd,qBAAhB,CAAlB,CAXQ;AAYjBvC,EAAAA,QAAQ,EAAEwC,mBAAUK,IAZH;AAajB5C,EAAAA,KAAK,EAAEuC,mBAAUK;AAbA,CAAnB;eAgBe1D,M","sourcesContent":["import React, {useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {find, keys, map, get, getOr, filter, includes, size} from 'lodash/fp';\nimport {NovaCompositionNavigationArrowDown as ArrowDown} from '@coorpacademy/nova-icons';\nimport Provider from '../provider';\nimport getClassState from '../../util/get-class-state';\nimport style from './style.css';\n\nconst themeStyle = {\n filter: style.filter,\n invalid: style.invalid,\n header: style.header,\n mooc: style.mooc,\n question: style.question,\n sort: style.sort,\n thematiques: style.thematiques,\n player: style.player,\n template: style.template // we keep template in case it is used anywhere else?\n};\n\nconst Select = (props, context) => {\n const {\n name,\n options = [],\n className,\n borderClassName,\n onChange,\n multiple = false,\n disabled,\n required,\n description,\n theme,\n modified = false,\n error = false,\n title: propTitle\n } = props;\n\n const {skin} = context;\n\n const title = useMemo(() => (propTitle ? `${propTitle}${required ? '*' : ''}` : null), [\n propTitle,\n required\n ]);\n\n const optionList =\n options &&\n options.map((option, index) => {\n return (\n <option key={index} value={option.value} className={style.selectOption}>\n {option.name}\n </option>\n );\n });\n\n const titleView = title ? <span className={style.title}>{title} </span> : null;\n\n const selected = useMemo(\n () =>\n multiple\n ? map(get('value'), filter({selected: true}, options))\n : get('value', find({selected: true}, options)),\n [multiple, options]\n );\n const selectedLabel = useMemo(\n () =>\n multiple\n ? map(get('name'), filter({selected: true}, options))\n : get('name', find({selected: true}, options)),\n [multiple, options]\n );\n\n const isSelectedInValidOption = useMemo(\n () =>\n theme === 'player' &&\n getOr(false, 'name', find({validOption: false, selected: true}, options)),\n [options, theme]\n );\n\n const handleChange = useMemo(\n () =>\n multiple\n ? e => {\n onChange(map(get('value'), e.target.selectedOptions));\n }\n : e => {\n onChange(e.target.value);\n },\n [onChange, multiple]\n );\n\n const black = useMemo(() => getOr('#14171A', 'common.black', skin), [skin]);\n const color = useMemo(() => getOr('#00B0FF', 'common.primary', skin), [skin]);\n const shouldUseSkinFontColor = useMemo(\n () =>\n !isSelectedInValidOption && selected && includes(theme, ['question', 'template', 'player']),\n [isSelectedInValidOption, selected, theme]\n );\n const arrowColor = selected ? color : undefined;\n\n const arrowView = !multiple ? (\n <ArrowDown\n color={includes(theme, ['question', 'template', 'player']) ? arrowColor : black}\n className={shouldUseSkinFontColor ? style.selectedArrow : style.arrow}\n />\n ) : null;\n const behaviourClassName = useMemo(\n () => getClassState(style.default, style.modified, style.error, modified, error),\n [error, modified]\n );\n const composedClassName = useMemo(\n () =>\n classnames(\n theme ? themeStyle[theme] : behaviourClassName,\n selected ? style.selected : style.unselected,\n className\n ),\n [behaviourClassName, className, selected, theme]\n );\n\n const labelSize = useMemo(() => size(selectedLabel), [selectedLabel]);\n\n const isLongLabel = useMemo(() => labelSize >= 65, [labelSize]);\n\n return (\n <div className={composedClassName}>\n <label\n data-name=\"select-wrapper\"\n style={{\n ...(shouldUseSkinFontColor && {\n color\n })\n }}\n className={style.selectWrapper}\n >\n {titleView}\n <span\n data-name=\"select-span\"\n className={classnames(\n style.selectSpan,\n includes(theme, ['player', 'invalid', 'question', 'thematiques', 'template'])\n ? style.noLabelCommon\n : null,\n borderClassName,\n isLongLabel ? style.longLabel : null\n )}\n >\n {selectedLabel}\n </span>\n {arrowView}\n <select\n data-name=\"native-select\"\n className={style.selectBox}\n title={selectedLabel}\n name={name}\n onChange={handleChange}\n value={selected}\n multiple={multiple}\n disabled={disabled}\n >\n {optionList}\n </select>\n </label>\n <div className={style.description}>{description}</div>\n </div>\n );\n};\n\nexport const SelectOptionPropTypes = {\n name: PropTypes.string.isRequired,\n value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n selected: PropTypes.bool,\n validOption: PropTypes.bool\n};\n\nSelect.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nSelect.propTypes = {\n title: PropTypes.string,\n name: PropTypes.string,\n className: PropTypes.string,\n borderClassName: PropTypes.string,\n disabled: PropTypes.bool,\n multiple: PropTypes.bool,\n description: PropTypes.string,\n required: PropTypes.bool,\n onChange: PropTypes.func,\n theme: PropTypes.oneOf(keys(themeStyle)),\n options: PropTypes.arrayOf(PropTypes.shape(SelectOptionPropTypes)),\n modified: PropTypes.bool,\n error: PropTypes.bool\n};\n\nexport default Select;\n"],"file":"index.js"}
1
+ {"version":3,"sources":["../../../src/atom/select/index.js"],"names":["themeStyle","filter","style","invalid","header","mooc","question","sort","thematiques","player","template","coorpmanager","Select","props","context","name","options","className","borderClassName","onChange","multiple","disabled","required","description","theme","modified","error","title","propTitle","skin","optionList","map","option","index","value","selectOption","titleView","selected","selectedLabel","isSelectedInValidOption","validOption","handleChange","e","target","selectedOptions","black","color","shouldUseSkinFontColor","arrowColor","undefined","arrowView","selectedArrow","arrow","behaviourClassName","default","composedClassName","unselected","labelSize","isLongLabel","selectWrapper","selectSpan","noLabelCommon","longLabel","selectBox","SelectOptionPropTypes","PropTypes","string","isRequired","oneOfType","number","bool","contextTypes","Provider","childContextTypes","propTypes","func","oneOf","arrayOf","shape"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,UAAU,GAAG;AACjBC,EAAAA,MAAM,EAAEC,eAAMD,MADG;AAEjBE,EAAAA,OAAO,EAAED,eAAMC,OAFE;AAGjBC,EAAAA,MAAM,EAAEF,eAAME,MAHG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Types from 'prop-types';\nimport classnames from 'classnames';\nimport filter from 'lodash/fp/filter';\nimport find from 'lodash/fp/find';\nimport get from 'lodash/fp/get';\nimport getOr from 'lodash/fp/getOr';\nimport includes from 'lodash/fp/includes';\nimport keys from 'lodash/fp/keys';\nimport map from 'lodash/fp/map';\nimport size from 'lodash/fp/size';\nimport {NovaCompositionNavigationArrowDown as ArrowDown} from '@coorpacademy/nova-icons';\nimport Provider from '../provider';\nimport getClassState from '../../util/get-class-state';\nimport style from './style.css';\n\nconst themeStyle = {\n filter: style.filter,\n invalid: style.invalid,\n header: style.header,\n mooc: style.mooc,\n question: style.question,\n sort: style.sort,\n thematiques: style.thematiques,\n player: style.player,\n template: style.template,\n coorpmanager: null\n};\n\nconst Select = (props, context) => {\n const {\n name,\n options = [],\n className,\n borderClassName,\n onChange,\n multiple = false,\n disabled,\n required,\n description,\n theme,\n modified = false,\n error = false,\n title: propTitle\n } = props;\n\n const {skin} = context;\n\n const title = useMemo(() => (propTitle ? `${propTitle}${required ? '*' : ''}` : null), [\n propTitle,\n required\n ]);\n\n const optionList =\n options &&\n options.map((option, index) => {\n return (\n <option key={index} value={option.value} className={style.selectOption}>\n {option.name}\n </option>\n );\n });\n\n const titleView = title ? <span className={style.title}>{title} </span> : null;\n\n const selected = useMemo(\n () =>\n multiple\n ? map(get('value'), filter({selected: true}, options))\n : get('value', find({selected: true}, options)),\n [multiple, options]\n );\n const selectedLabel = useMemo(\n () =>\n multiple\n ? map(get('name'), filter({selected: true}, options))\n : get('name', find({selected: true}, options)),\n [multiple, options]\n );\n\n const isSelectedInValidOption = useMemo(\n () =>\n theme === 'player' &&\n getOr(false, 'name', find({validOption: false, selected: true}, options)),\n [options, theme]\n );\n\n const handleChange = useMemo(\n () =>\n multiple\n ? e => {\n onChange(map(get('value'), e.target.selectedOptions));\n }\n : e => {\n onChange(e.target.value);\n },\n [onChange, multiple]\n );\n\n const black = useMemo(() => getOr('#14171A', 'common.black', skin), [skin]);\n const color = useMemo(() => getOr('#00B0FF', 'common.primary', skin), [skin]);\n const shouldUseSkinFontColor = useMemo(\n () =>\n !isSelectedInValidOption && selected && includes(theme, ['question', 'template', 'player']),\n [isSelectedInValidOption, selected, theme]\n );\n const arrowColor = selected ? color : undefined;\n\n const arrowView = !multiple ? (\n <ArrowDown\n color={includes(theme, ['question', 'template', 'player']) ? arrowColor : black}\n className={shouldUseSkinFontColor ? style.selectedArrow : style.arrow}\n />\n ) : null;\n const behaviourClassName = useMemo(\n () => getClassState(style.default, style.modified, style.error, modified, error),\n [error, modified]\n );\n const composedClassName = useMemo(\n () =>\n classnames(\n theme && theme !== 'coorpmanager' ? themeStyle[theme] : behaviourClassName,\n selected ? style.selected : style.unselected,\n className\n ),\n [behaviourClassName, className, selected, theme]\n );\n\n const labelSize = useMemo(() => size(selectedLabel), [selectedLabel]);\n\n const isLongLabel = useMemo(() => labelSize >= 65, [labelSize]);\n\n return (\n <div\n className={classnames(\n composedClassName,\n theme === 'coorpmanager' ? style.coorpmanager : null\n )}\n >\n <label\n data-name=\"select-wrapper\"\n style={{\n ...(shouldUseSkinFontColor && {\n color\n })\n }}\n className={style.selectWrapper}\n >\n {titleView}\n <span\n data-name=\"select-span\"\n className={classnames(\n style.selectSpan,\n includes(theme, ['player', 'invalid', 'question', 'thematiques', 'template'])\n ? style.noLabelCommon\n : null,\n borderClassName,\n isLongLabel ? style.longLabel : null\n )}\n >\n {selectedLabel}\n </span>\n {arrowView}\n <select\n data-name=\"native-select\"\n className={style.selectBox}\n title={selectedLabel}\n name={name}\n onChange={handleChange}\n value={selected}\n multiple={multiple}\n disabled={disabled}\n >\n {optionList}\n </select>\n </label>\n <div className={style.description}>{description}</div>\n </div>\n );\n};\n\nexport const SelectOptionPropTypes = {\n name: PropTypes.string.isRequired,\n value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n selected: PropTypes.bool,\n validOption: PropTypes.bool\n};\n\nSelect.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nSelect.propTypes = {\n title: PropTypes.string,\n name: PropTypes.string,\n className: PropTypes.string,\n borderClassName: PropTypes.string,\n disabled: PropTypes.bool,\n multiple: PropTypes.bool,\n description: PropTypes.string,\n required: PropTypes.bool,\n onChange: PropTypes.func,\n theme: PropTypes.oneOf(keys(themeStyle)),\n options: PropTypes.arrayOf(PropTypes.shape(SelectOptionPropTypes)),\n modified: PropTypes.bool,\n error: PropTypes.bool\n};\n\nexport default Select;\n"],"file":"index.js"}
@@ -1,5 +1,6 @@
1
1
  @value breakpoints: "../../variables/breakpoints.css";
2
2
  @value mobile from breakpoints;
3
+ @value tablet from breakpoints;
3
4
  @value colors: "../../variables/colors.css";
4
5
  @value orange from colors;
5
6
  @value negative from colors;
@@ -19,6 +20,35 @@
19
20
  display: flex;
20
21
  }
21
22
 
23
+ .coorpmanager {
24
+ composes: default;
25
+ }
26
+
27
+ div.coorpmanager label.selectWrapper {
28
+ max-width: fit-content;
29
+ }
30
+
31
+ .coorpmanager label.selectWrapper select.selectBox {
32
+ padding-left: 10px;
33
+ position: relative;
34
+ border-radius: 2px;
35
+ border-width: 1px;
36
+ width: 260px;
37
+ min-width: 194px;
38
+ }
39
+
40
+ @media tablet {
41
+ .coorpmanager label.selectWrapper .description {
42
+ max-width: 120px;
43
+ }
44
+ }
45
+
46
+ @media mobile {
47
+ .coorpmanager label.selectWrapper select.selectBox {
48
+ width: 100%;
49
+ min-width: 180px;
50
+ }
51
+ }
22
52
  .error {
23
53
  composes: default;
24
54
  }
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports.default = void 0;
5
+
6
+ var _defaultsDeep2 = _interopRequireDefault(require("lodash/fp/defaultsDeep"));
7
+
8
+ var _default2 = _interopRequireDefault(require("./default"));
9
+
10
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
+
12
+ const {
13
+ props
14
+ } = _default2.default;
15
+ var _default = {
16
+ props: (0, _defaultsDeep2.default)(props, {
17
+ theme: 'coorpmanager'
18
+ })
19
+ };
20
+ exports.default = _default;
21
+ //# sourceMappingURL=coorpmanager.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../src/atom/select/test/fixtures/coorpmanager.js"],"names":["props","Default","theme"],"mappings":";;;;;;;AACA;;;;AAEA,MAAM;AAACA,EAAAA;AAAD,IAAUC,iBAAhB;eAEe;AACbD,EAAAA,KAAK,EAAE,4BAAaA,KAAb,EAAoB;AACzBE,IAAAA,KAAK,EAAE;AADkB,GAApB;AADM,C","sourcesContent":["import {defaultsDeep} from 'lodash/fp';\nimport Default from './default';\n\nconst {props} = Default;\n\nexport default {\n props: defaultsDeep(props, {\n theme: 'coorpmanager'\n })\n};\n"],"file":"coorpmanager.js"}
@@ -26,8 +26,6 @@ var _multipleSelected = _interopRequireDefault(require("./fixtures/multiple-sele
26
26
 
27
27
  var _multiple = _interopRequireDefault(require("./fixtures/multiple"));
28
28
 
29
- var _player = _interopRequireDefault(require("./fixtures/player"));
30
-
31
29
  var _question = _interopRequireDefault(require("./fixtures/question"));
32
30
 
33
31
  var _requiredWithTitle = _interopRequireDefault(require("./fixtures/required-with-title"));
@@ -59,7 +57,6 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
59
57
  (0, _ava.default)('Atom › AtomSelect › Mooc › should be rendered', _renderComponent.default, _.default, _mooc.default);
60
58
  (0, _ava.default)('Atom › AtomSelect › MultipleSelected › should be rendered', _renderComponent.default, _.default, _multipleSelected.default);
61
59
  (0, _ava.default)('Atom › AtomSelect › Multiple › should be rendered', _renderComponent.default, _.default, _multiple.default);
62
- (0, _ava.default)('Atom › AtomSelect › Player › should be rendered', _renderComponent.default, _.default, _player.default);
63
60
  (0, _ava.default)('Atom › AtomSelect › Question › should be rendered', _renderComponent.default, _.default, _question.default);
64
61
  (0, _ava.default)('Atom › AtomSelect › RequiredWithTitle › should be rendered', _renderComponent.default, _.default, _requiredWithTitle.default);
65
62
  (0, _ava.default)('Atom › AtomSelect › Required › should be rendered', _renderComponent.default, _.default, _required.default);
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/atom/select/test/fixtures.js"],"names":["t","pass","AtomSelect","propTypes","value","key","not","undefined","renderComponentMacro","fixtureDefault","fixtureDisabled","fixtureError","fixtureFilter","fixtureInvalid","fixtureModified","fixtureMooc","fixtureMultipleSelected","fixtureMultiple","fixturePlayer","fixtureQuestion","fixtureRequiredWithTitle","fixtureRequired","fixtureSort","fixtureTemplate","fixtureThematiquesLong","fixtureThematiques"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,iDAAL,EAAwDA,CAAC,IAAI;AAC3DA,EAAAA,CAAC,CAACC,IAAF;AACA,wBAAQC,UAAWC,SAAnB,EAA8B,CAACC,KAAD,EAAQC,GAAR,KAAgB;AAC5CL,IAAAA,CAAC,CAACM,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,2CAA0CF,GAAI,mEAAvE;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,kDAAL,EAAyDG,wBAAzD,EAA+EN,SAA/E,EAA2FO,gBAA3F;AACA,kBAAK,mDAAL,EAA0DD,wBAA1D,EAAgFN,SAAhF,EAA4FQ,iBAA5F;AACA,kBAAK,gDAAL,EAAuDF,wBAAvD,EAA6EN,SAA7E,EAAyFS,cAAzF;AACA,kBAAK,iDAAL,EAAwDH,wBAAxD,EAA8EN,SAA9E,EAA0FU,eAA1F;AACA,kBAAK,kDAAL,EAAyDJ,wBAAzD,EAA+EN,SAA/E,EAA2FW,gBAA3F;AACA,kBAAK,mDAAL,EAA0DL,wBAA1D,EAAgFN,SAAhF,EAA4FY,iBAA5F;AACA,kBAAK,+CAAL,EAAsDN,wBAAtD,EAA4EN,SAA5E,EAAwFa,aAAxF;AACA,kBAAK,2DAAL,EAAkEP,wBAAlE,EAAwFN,SAAxF,EAAoGc,yBAApG;AACA,kBAAK,mDAAL,EAA0DR,wBAA1D,EAAgFN,SAAhF,EAA4Fe,iBAA5F;AACA,kBAAK,iDAAL,EAAwDT,wBAAxD,EAA8EN,SAA9E,EAA0FgB,eAA1F;AACA,kBAAK,mDAAL,EAA0DV,wBAA1D,EAAgFN,SAAhF,EAA4FiB,iBAA5F;AACA,kBAAK,4DAAL,EAAmEX,wBAAnE,EAAyFN,SAAzF,EAAqGkB,0BAArG;AACA,kBAAK,mDAAL,EAA0DZ,wBAA1D,EAAgFN,SAAhF,EAA4FmB,iBAA5F;AACA,kBAAK,+CAAL,EAAsDb,wBAAtD,EAA4EN,SAA5E,EAAwFoB,aAAxF;AACA,kBAAK,mDAAL,EAA0Dd,wBAA1D,EAAgFN,SAAhF,EAA4FqB,iBAA5F;AACA,kBAAK,0DAAL,EAAiEf,wBAAjE,EAAuFN,SAAvF,EAAmGsB,wBAAnG;AACA,kBAAK,sDAAL,EAA6DhB,wBAA7D,EAAmFN,SAAnF,EAA+FuB,oBAA/F","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport AtomSelect from '..';\nimport fixtureDefault from './fixtures/default';\nimport fixtureDisabled from './fixtures/disabled';\nimport fixtureError from './fixtures/error';\nimport fixtureFilter from './fixtures/filter';\nimport fixtureInvalid from './fixtures/invalid';\nimport fixtureModified from './fixtures/modified';\nimport fixtureMooc from './fixtures/mooc';\nimport fixtureMultipleSelected from './fixtures/multiple-selected';\nimport fixtureMultiple from './fixtures/multiple';\nimport fixturePlayer from './fixtures/player';\nimport fixtureQuestion from './fixtures/question';\nimport fixtureRequiredWithTitle from './fixtures/required-with-title';\nimport fixtureRequired from './fixtures/required';\nimport fixtureSort from './fixtures/sort';\nimport fixtureTemplate from './fixtures/template';\nimport fixtureThematiquesLong from './fixtures/thematiques-long';\nimport fixtureThematiques from './fixtures/thematiques';\n\ntest('Atom › AtomSelect > should have valid propTypes', t => {\n t.pass();\n forEach(AtomSelect.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Atom.AtomSelect.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Atom › AtomSelect › Default › should be rendered', renderComponentMacro, AtomSelect, fixtureDefault);\ntest('Atom › AtomSelect › Disabled › should be rendered', renderComponentMacro, AtomSelect, fixtureDisabled);\ntest('Atom › AtomSelect › Error › should be rendered', renderComponentMacro, AtomSelect, fixtureError);\ntest('Atom › AtomSelect › Filter › should be rendered', renderComponentMacro, AtomSelect, fixtureFilter);\ntest('Atom › AtomSelect › Invalid › should be rendered', renderComponentMacro, AtomSelect, fixtureInvalid);\ntest('Atom › AtomSelect › Modified › should be rendered', renderComponentMacro, AtomSelect, fixtureModified);\ntest('Atom › AtomSelect › Mooc › should be rendered', renderComponentMacro, AtomSelect, fixtureMooc);\ntest('Atom › AtomSelect › MultipleSelected › should be rendered', renderComponentMacro, AtomSelect, fixtureMultipleSelected);\ntest('Atom › AtomSelect › Multiple › should be rendered', renderComponentMacro, AtomSelect, fixtureMultiple);\ntest('Atom › AtomSelect › Player › should be rendered', renderComponentMacro, AtomSelect, fixturePlayer);\ntest('Atom › AtomSelect › Question › should be rendered', renderComponentMacro, AtomSelect, fixtureQuestion);\ntest('Atom › AtomSelect › RequiredWithTitle › should be rendered', renderComponentMacro, AtomSelect, fixtureRequiredWithTitle);\ntest('Atom › AtomSelect › Required › should be rendered', renderComponentMacro, AtomSelect, fixtureRequired);\ntest('Atom › AtomSelect › Sort › should be rendered', renderComponentMacro, AtomSelect, fixtureSort);\ntest('Atom › AtomSelect › Template › should be rendered', renderComponentMacro, AtomSelect, fixtureTemplate);\ntest('Atom › AtomSelect › ThematiquesLong › should be rendered', renderComponentMacro, AtomSelect, fixtureThematiquesLong);\ntest('Atom › AtomSelect › Thematiques › should be rendered', renderComponentMacro, AtomSelect, fixtureThematiques);\n"],"file":"fixtures.js"}
1
+ {"version":3,"sources":["../../../../src/atom/select/test/fixtures.js"],"names":["t","pass","AtomSelect","propTypes","value","key","not","undefined","renderComponentMacro","fixtureDefault","fixtureDisabled","fixtureError","fixtureFilter","fixtureInvalid","fixtureModified","fixtureMooc","fixtureMultipleSelected","fixtureMultiple","fixtureQuestion","fixtureRequiredWithTitle","fixtureRequired","fixtureSort","fixtureTemplate","fixtureThematiquesLong","fixtureThematiques"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,iDAAL,EAAwDA,CAAC,IAAI;AAC3DA,EAAAA,CAAC,CAACC,IAAF;AACA,wBAAQC,UAAWC,SAAnB,EAA8B,CAACC,KAAD,EAAQC,GAAR,KAAgB;AAC5CL,IAAAA,CAAC,CAACM,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,2CAA0CF,GAAI,mEAAvE;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,kDAAL,EAAyDG,wBAAzD,EAA+EN,SAA/E,EAA2FO,gBAA3F;AACA,kBAAK,mDAAL,EAA0DD,wBAA1D,EAAgFN,SAAhF,EAA4FQ,iBAA5F;AACA,kBAAK,gDAAL,EAAuDF,wBAAvD,EAA6EN,SAA7E,EAAyFS,cAAzF;AACA,kBAAK,iDAAL,EAAwDH,wBAAxD,EAA8EN,SAA9E,EAA0FU,eAA1F;AACA,kBAAK,kDAAL,EAAyDJ,wBAAzD,EAA+EN,SAA/E,EAA2FW,gBAA3F;AACA,kBAAK,mDAAL,EAA0DL,wBAA1D,EAAgFN,SAAhF,EAA4FY,iBAA5F;AACA,kBAAK,+CAAL,EAAsDN,wBAAtD,EAA4EN,SAA5E,EAAwFa,aAAxF;AACA,kBAAK,2DAAL,EAAkEP,wBAAlE,EAAwFN,SAAxF,EAAoGc,yBAApG;AACA,kBAAK,mDAAL,EAA0DR,wBAA1D,EAAgFN,SAAhF,EAA4Fe,iBAA5F;AACA,kBAAK,mDAAL,EAA0DT,wBAA1D,EAAgFN,SAAhF,EAA4FgB,iBAA5F;AACA,kBAAK,4DAAL,EAAmEV,wBAAnE,EAAyFN,SAAzF,EAAqGiB,0BAArG;AACA,kBAAK,mDAAL,EAA0DX,wBAA1D,EAAgFN,SAAhF,EAA4FkB,iBAA5F;AACA,kBAAK,+CAAL,EAAsDZ,wBAAtD,EAA4EN,SAA5E,EAAwFmB,aAAxF;AACA,kBAAK,mDAAL,EAA0Db,wBAA1D,EAAgFN,SAAhF,EAA4FoB,iBAA5F;AACA,kBAAK,0DAAL,EAAiEd,wBAAjE,EAAuFN,SAAvF,EAAmGqB,wBAAnG;AACA,kBAAK,sDAAL,EAA6Df,wBAA7D,EAAmFN,SAAnF,EAA+FsB,oBAA/F","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport AtomSelect from '..';\nimport fixtureDefault from './fixtures/default';\nimport fixtureDisabled from './fixtures/disabled';\nimport fixtureError from './fixtures/error';\nimport fixtureFilter from './fixtures/filter';\nimport fixtureInvalid from './fixtures/invalid';\nimport fixtureModified from './fixtures/modified';\nimport fixtureMooc from './fixtures/mooc';\nimport fixtureMultipleSelected from './fixtures/multiple-selected';\nimport fixtureMultiple from './fixtures/multiple';\nimport fixtureQuestion from './fixtures/question';\nimport fixtureRequiredWithTitle from './fixtures/required-with-title';\nimport fixtureRequired from './fixtures/required';\nimport fixtureSort from './fixtures/sort';\nimport fixtureTemplate from './fixtures/template';\nimport fixtureThematiquesLong from './fixtures/thematiques-long';\nimport fixtureThematiques from './fixtures/thematiques';\n\ntest('Atom › AtomSelect > should have valid propTypes', t => {\n t.pass();\n forEach(AtomSelect.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Atom.AtomSelect.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Atom › AtomSelect › Default › should be rendered', renderComponentMacro, AtomSelect, fixtureDefault);\ntest('Atom › AtomSelect › Disabled › should be rendered', renderComponentMacro, AtomSelect, fixtureDisabled);\ntest('Atom › AtomSelect › Error › should be rendered', renderComponentMacro, AtomSelect, fixtureError);\ntest('Atom › AtomSelect › Filter › should be rendered', renderComponentMacro, AtomSelect, fixtureFilter);\ntest('Atom › AtomSelect › Invalid › should be rendered', renderComponentMacro, AtomSelect, fixtureInvalid);\ntest('Atom › AtomSelect › Modified › should be rendered', renderComponentMacro, AtomSelect, fixtureModified);\ntest('Atom › AtomSelect › Mooc › should be rendered', renderComponentMacro, AtomSelect, fixtureMooc);\ntest('Atom › AtomSelect › MultipleSelected › should be rendered', renderComponentMacro, AtomSelect, fixtureMultipleSelected);\ntest('Atom › AtomSelect › Multiple › should be rendered', renderComponentMacro, AtomSelect, fixtureMultiple);\ntest('Atom › AtomSelect › Question › should be rendered', renderComponentMacro, AtomSelect, fixtureQuestion);\ntest('Atom › AtomSelect › RequiredWithTitle › should be rendered', renderComponentMacro, AtomSelect, fixtureRequiredWithTitle);\ntest('Atom › AtomSelect › Required › should be rendered', renderComponentMacro, AtomSelect, fixtureRequired);\ntest('Atom › AtomSelect › Sort › should be rendered', renderComponentMacro, AtomSelect, fixtureSort);\ntest('Atom › AtomSelect › Template › should be rendered', renderComponentMacro, AtomSelect, fixtureTemplate);\ntest('Atom › AtomSelect › ThematiquesLong › should be rendered', renderComponentMacro, AtomSelect, fixtureThematiquesLong);\ntest('Atom › AtomSelect › Thematiques › should be rendered', renderComponentMacro, AtomSelect, fixtureThematiques);\n"],"file":"fixtures.js"}
@@ -28,7 +28,7 @@ const Tag = props => {
28
28
  } = props;
29
29
  return /*#__PURE__*/_react.default.createElement("span", {
30
30
  className: TAG_STYLES[type],
31
- "data-name": `custom-playlist-tag-${label}`
31
+ "data-name": `content-tag-${label}`
32
32
  }, label);
33
33
  };
34
34
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/atom/tag/index.js"],"names":["TAG_STYLES","default","style","published","revised","archived","draft","Tag","props","label","type","propTypes","PropTypes","string","oneOf"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;;;AAEA,MAAMA,UAAU,GAAG;AACjBC,EAAAA,OAAO,EAAEC,eAAMD,OADE;AAEjBE,EAAAA,SAAS,EAAED,eAAMC,SAFA;AAGjBC,EAAAA,OAAO,EAAEF,eAAME,OAHE;AAIjBC,EAAAA,QAAQ,EAAEH,eAAMG,QAJC;AAKjBC,EAAAA,KAAK,EAAEJ,eAAMI;AALI,CAAnB;;AAQA,MAAMC,GAAG,GAAGC,KAAK,IAAI;AACnB,QAAM;AAACC,IAAAA,KAAD;AAAQC,IAAAA,IAAI,GAAG;AAAf,MAA4BF,KAAlC;AAEA,sBACE;AAAM,IAAA,SAAS,EAAER,UAAU,CAACU,IAAD,CAA3B;AAAmC,iBAAY,uBAAsBD,KAAM;AAA3E,KACGA,KADH,CADF;AAKD,CARD;;AAUAF,GAAG,CAACI,SAAJ,2CAAgB;AACdF,EAAAA,KAAK,EAAEG,mBAAUC,MADH;AAEdH,EAAAA,IAAI,EAAEE,mBAAUE,KAAV,CAAgB,oBAAKd,UAAL,CAAhB;AAFQ,CAAhB;eAKeO,G","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {keys} from 'lodash/fp';\nimport style from './style.css';\n\nconst TAG_STYLES = {\n default: style.default,\n published: style.published,\n revised: style.revised,\n archived: style.archived,\n draft: style.draft\n};\n\nconst Tag = props => {\n const {label, type = 'default'} = props;\n\n return (\n <span className={TAG_STYLES[type]} data-name={`custom-playlist-tag-${label}`}>\n {label}\n </span>\n );\n};\n\nTag.propTypes = {\n label: PropTypes.string,\n type: PropTypes.oneOf(keys(TAG_STYLES))\n};\n\nexport default Tag;\n"],"file":"index.js"}
1
+ {"version":3,"sources":["../../../src/atom/tag/index.js"],"names":["TAG_STYLES","default","style","published","revised","archived","draft","Tag","props","label","type","propTypes","PropTypes","string","oneOf"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;;;AAEA,MAAMA,UAAU,GAAG;AACjBC,EAAAA,OAAO,EAAEC,eAAMD,OADE;AAEjBE,EAAAA,SAAS,EAAED,eAAMC,SAFA;AAGjBC,EAAAA,OAAO,EAAEF,eAAME,OAHE;AAIjBC,EAAAA,QAAQ,EAAEH,eAAMG,QAJC;AAKjBC,EAAAA,KAAK,EAAEJ,eAAMI;AALI,CAAnB;;AAQA,MAAMC,GAAG,GAAGC,KAAK,IAAI;AACnB,QAAM;AAACC,IAAAA,KAAD;AAAQC,IAAAA,IAAI,GAAG;AAAf,MAA4BF,KAAlC;AAEA,sBACE;AAAM,IAAA,SAAS,EAAER,UAAU,CAACU,IAAD,CAA3B;AAAmC,iBAAY,eAAcD,KAAM;AAAnE,KACGA,KADH,CADF;AAKD,CARD;;AAUAF,GAAG,CAACI,SAAJ,2CAAgB;AACdF,EAAAA,KAAK,EAAEG,mBAAUC,MADH;AAEdH,EAAAA,IAAI,EAAEE,mBAAUE,KAAV,CAAgB,oBAAKd,UAAL,CAAhB;AAFQ,CAAhB;eAKeO,G","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {keys} from 'lodash/fp';\nimport style from './style.css';\n\nconst TAG_STYLES = {\n default: style.default,\n published: style.published,\n revised: style.revised,\n archived: style.archived,\n draft: style.draft\n};\n\nconst Tag = props => {\n const {label, type = 'default'} = props;\n\n return (\n <span className={TAG_STYLES[type]} data-name={`content-tag-${label}`}>\n {label}\n </span>\n );\n};\n\nTag.propTypes = {\n label: PropTypes.string,\n type: PropTypes.oneOf(keys(TAG_STYLES))\n};\n\nexport default Tag;\n"],"file":"index.js"}
@@ -93,7 +93,9 @@ const buildInput = field => {
93
93
  return /*#__PURE__*/_react.default.createElement(_inputDoublestep.default, field);
94
94
 
95
95
  case 'select':
96
- return /*#__PURE__*/_react.default.createElement(_select.default, field);
96
+ return /*#__PURE__*/_react.default.createElement(_select.default, _extends({}, field, {
97
+ theme: 'coorpmanager'
98
+ }));
97
99
 
98
100
  case 'selectMultiple':
99
101
  return /*#__PURE__*/_react.default.createElement(_selectMultiple.default, field);
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/molecule/brand-form-group/index.js"],"names":["inputContainerStyle","default","style","defaultWidth","medium","mediumWidth","large","largeWidth","buildInput","field","type","buildField","index","input","theme","size","styleInput","BrandFormGroup","props","title","subtitle","fieldsLayout","groupLayout","fields","fieldsList","convert","cap","wrapper","groupGrid","titleWrapper","grid","propTypes","PropTypes","string","arrayOf","oneOfType","shape","Autocomplete","oneOf","InputColor","InputReadonly","InputSwitch","InputTextarea","InputHTML","InputDoublestep","Select","InputCheckbox","ImageUpload","SetupSlider","SetupSections","InputText","BrandDownloadBox","BrandUploadBox","Button","SelectMultiple","Roles"],"mappings":";;;;;;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;AAEA,MAAMA,mBAAmB,GAAG;AAC1BC,EAAAA,OAAO,EAAEC,eAAMC,YADW;AAE1BC,EAAAA,MAAM,EAAEF,eAAMG,WAFY;AAG1BC,EAAAA,KAAK,EAAEJ,eAAMK;AAHa,CAA5B;;AAMA,MAAMC,UAAU,GAAGC,KAAK,IAAI;AAC1B,QAAM;AAACC,IAAAA;AAAD,MAASD,KAAf;;AAEA,UAAQC,IAAR;AACE,SAAK,cAAL;AACE,0BAAO,6BAAC,qBAAD,EAAkBD,KAAlB,CAAP;;AACF,SAAK,OAAL;AACE,0BAAO,6BAAC,mBAAD,EAAgBA,KAAhB,CAAP;;AACF,SAAK,UAAL;AACE,0BAAO,6BAAC,sBAAD,EAAmBA,KAAnB,CAAP;;AACF,SAAK,QAAL;AACE,0BAAO,6BAAC,oBAAD,EAAiBA,KAAjB,CAAP;;AACF,SAAK,UAAL;AACE,0BAAO,6BAAC,sBAAD,EAAmBA,KAAnB,CAAP;;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,KAAV,CAAgB,CAAC,gBAAD,CAAhB;AAFR,KArEkB,EAyElBN,mBAAUI,KAAV,uBACKmB,2BAAMxB,SADX;AAEErB,IAAAA,IAAI,EAAEsB,mBAAUM,KAAV,CAAgB,CAAC,OAAD,CAAhB;AAFR,KAzEkB,EA6ElBN,mBAAUI,KAAV,CAAgBc,mBAAUnB,SAA1B,CA7EkB,CAApB,CADM;AALiB,CAA3B;eAuFed,c","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {keys, map, snakeCase} from 'lodash/fp';\nimport classNames from 'classnames';\nimport Autocomplete from '../../atom/autocomplete';\nimport Select from '../../atom/select';\nimport SelectMultiple from '../select-multiple';\nimport InputText from '../../atom/input-text';\nimport InputColor from '../../atom/input-color';\nimport InputCheckbox from '../../atom/input-checkbox';\nimport InputReadonly from '../../atom/input-readonly';\nimport InputSwitch from '../../atom/input-switch';\nimport BrandUploadBox from '../brand-upload-box';\nimport BrandDownloadBox from '../brand-download-box';\nimport Button from '../../atom/button';\nimport InputTextarea from '../../atom/input-textarea';\nimport InputHTML from '../../atom/input-html';\nimport InputDoublestep from '../../atom/input-doublestep';\nimport ImageUpload from '../../atom/image-upload';\nimport SetupSlider from '../setup-slider';\nimport SetupSections from '../setup-sections';\nimport Title from '../../atom/title';\nimport Roles from '../coorp-manager-roles';\nimport style from './style.css';\n\nconst inputContainerStyle = {\n default: style.defaultWidth,\n medium: style.mediumWidth,\n large: style.largeWidth\n};\n\nconst buildInput = field => {\n const {type} = field;\n\n switch (type) {\n case 'autoComplete':\n return <Autocomplete {...field} />;\n case 'color':\n return <InputColor {...field} />;\n case 'readonly':\n return <InputReadonly {...field} />;\n case 'switch':\n return <InputSwitch {...field} />;\n case 'textarea':\n return <InputTextarea {...field} />;\n case 'html':\n return <InputHTML {...field} />;\n case 'doublestep':\n return <InputDoublestep {...field} />;\n case 'select':\n return <Select {...field} />;\n case 'selectMultiple':\n return <SelectMultiple {...field} />;\n case 'checkbox':\n return <InputCheckbox {...field} />;\n case 'image':\n return <ImageUpload {...field} />;\n case 'slider':\n return <SetupSlider {...field} />;\n case 'sections':\n return <SetupSections {...field} />;\n case 'text':\n return <InputText {...field} />;\n case 'downloadbox':\n return <BrandDownloadBox {...field} />;\n case 'uploadbox':\n return <BrandUploadBox {...field} />;\n case 'button':\n case 'link':\n return <Button {...field} />;\n case 'roles':\n return <Roles {...field} />;\n default:\n return <InputText {...field} />;\n }\n};\n\nconst buildField = (field, index) => {\n const input = buildInput(field);\n const {theme, size = 'default'} = field;\n const styleInput = theme === 'coorpmanager' ? inputContainerStyle[size] : style.field;\n\n return (\n <div className={styleInput} key={index}>\n {input}\n </div>\n );\n};\n\nconst BrandFormGroup = props => {\n const {title, subtitle = '', fieldsLayout = '', groupLayout = '', fields = []} = props;\n const fieldsList = map.convert({cap: false})(buildField, fields);\n\n return (\n <div\n data-name={`brand_form_group_${snakeCase(title)}`}\n className={classNames(style.wrapper, groupLayout === 'grid' && style.groupGrid)}\n >\n <div className={style.titleWrapper}>\n <Title title={title} subtitle={subtitle} type={'form-group'} />\n </div>\n <div className={fieldsLayout === 'grid' ? style.grid : null}>{fieldsList}</div>\n </div>\n );\n};\n\nBrandFormGroup.propTypes = {\n title: PropTypes.string,\n subtitle: PropTypes.string,\n fieldsLayout: PropTypes.string,\n groupLayout: PropTypes.string,\n fields: PropTypes.arrayOf(\n PropTypes.oneOfType([\n PropTypes.shape({\n ...Autocomplete.propTypes,\n type: PropTypes.oneOf(['autoComplete']),\n size: PropTypes.oneOf(keys(inputContainerStyle))\n }),\n PropTypes.shape({\n ...InputColor.propTypes,\n type: PropTypes.oneOf(['color'])\n }),\n PropTypes.shape({\n ...InputReadonly.propTypes,\n type: PropTypes.oneOf(['readonly'])\n }),\n PropTypes.shape({\n ...InputSwitch.propTypes,\n type: PropTypes.oneOf(['switch'])\n }),\n PropTypes.shape({\n ...InputTextarea.propTypes,\n type: PropTypes.oneOf(['textarea']),\n size: PropTypes.oneOf(keys(inputContainerStyle))\n }),\n PropTypes.shape({\n ...InputHTML.propTypes,\n type: PropTypes.oneOf(['html'])\n }),\n PropTypes.shape({\n ...InputDoublestep.propTypes,\n type: PropTypes.oneOf(['doublestep'])\n }),\n PropTypes.shape({\n ...Select.propTypes,\n type: PropTypes.oneOf(['select']),\n size: PropTypes.oneOf(keys(inputContainerStyle))\n }),\n PropTypes.shape({\n ...InputCheckbox.propTypes,\n type: PropTypes.oneOf(['checkbox'])\n }),\n PropTypes.shape({\n ...ImageUpload.propTypes,\n type: PropTypes.oneOf(['image'])\n }),\n PropTypes.shape({\n ...SetupSlider.propTypes,\n type: PropTypes.oneOf(['slider'])\n }),\n PropTypes.shape({\n ...SetupSections.propTypes,\n type: PropTypes.oneOf(['sections'])\n }),\n PropTypes.shape({\n ...InputText.propTypes,\n type: PropTypes.oneOf(['text']),\n size: PropTypes.oneOf(keys(inputContainerStyle))\n }),\n PropTypes.shape({\n ...BrandDownloadBox.propTypes,\n type: PropTypes.oneOf(['downloadbox'])\n }),\n PropTypes.shape({\n ...BrandUploadBox.propTypes,\n type: PropTypes.oneOf(['uploadbox'])\n }),\n PropTypes.shape({\n ...Button.propTypes,\n type: PropTypes.oneOf(['button'])\n }),\n PropTypes.shape({\n ...SelectMultiple.propTypes,\n type: PropTypes.oneOf(['selectMultiple'])\n }),\n PropTypes.shape({\n ...Roles.propTypes,\n type: PropTypes.oneOf(['roles'])\n }),\n PropTypes.shape(InputText.propTypes)\n ])\n )\n};\nexport default BrandFormGroup;\n"],"file":"index.js"}
1
+ {"version":3,"sources":["../../../src/molecule/brand-form-group/index.js"],"names":["inputContainerStyle","default","style","defaultWidth","medium","mediumWidth","large","largeWidth","buildInput","field","type","buildField","index","input","theme","size","styleInput","BrandFormGroup","props","title","subtitle","fieldsLayout","groupLayout","fields","fieldsList","convert","cap","wrapper","groupGrid","titleWrapper","grid","propTypes","PropTypes","string","arrayOf","oneOfType","shape","Autocomplete","oneOf","InputColor","InputReadonly","InputSwitch","InputTextarea","InputHTML","InputDoublestep","Select","InputCheckbox","ImageUpload","SetupSlider","SetupSections","InputText","BrandDownloadBox","BrandUploadBox","Button","SelectMultiple","Roles"],"mappings":";;;;;;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;AAEA,MAAMA,mBAAmB,GAAG;AAC1BC,EAAAA,OAAO,EAAEC,eAAMC,YADW;AAE1BC,EAAAA,MAAM,EAAEF,eAAMG,WAFY;AAG1BC,EAAAA,KAAK,EAAEJ,eAAMK;AAHa,CAA5B;;AAMA,MAAMC,UAAU,GAAGC,KAAK,IAAI;AAC1B,QAAM;AAACC,IAAAA;AAAD,MAASD,KAAf;;AAEA,UAAQC,IAAR;AACE,SAAK,cAAL;AACE,0BAAO,6BAAC,qBAAD,EAAkBD,KAAlB,CAAP;;AACF,SAAK,OAAL;AACE,0BAAO,6BAAC,mBAAD,EAAgBA,KAAhB,CAAP;;AACF,SAAK,UAAL;AACE,0BAAO,6BAAC,sBAAD,EAAmBA,KAAnB,CAAP;;AACF,SAAK,QAAL;AACE,0BAAO,6BAAC,oBAAD,EAAiBA,KAAjB,CAAP;;AACF,SAAK,UAAL;AACE,0BAAO,6BAAC,sBAAD,EAAmBA,KAAnB,CAAP;;AACF,SAAK,MAAL;AACE,0BAAO,6BAAC,kBAAD,EAAeA,KAAf,CAAP;;AACF,SAAK,YAAL;AACE,0BAAO,6BAAC,wBAAD,EAAqBA,KAArB,CAAP;;AACF,SAAK,QAAL;AACE,0BAAO,6BAAC,eAAD,eAAYA,KAAZ;AAAmB,QAAA,KAAK,EAAE;AAA1B,SAAP;;AACF,SAAK,gBAAL;AACE,0BAAO,6BAAC,uBAAD,EAAoBA,KAApB,CAAP;;AACF,SAAK,UAAL;AACE,0BAAO,6BAAC,sBAAD,EAAmBA,KAAnB,CAAP;;AACF,SAAK,OAAL;A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,IAAI,EAAEsB,mBAAUM,KAAV,CAAgB,CAAC,QAAD,CAAhB;AAFR,KA5CkB,EAgDlBN,mBAAUI,KAAV,uBACKa,uBAAclB,SADnB;AAEErB,IAAAA,IAAI,EAAEsB,mBAAUM,KAAV,CAAgB,CAAC,UAAD,CAAhB;AAFR,KAhDkB,EAoDlBN,mBAAUI,KAAV,uBACKc,mBAAUnB,SADf;AAEErB,IAAAA,IAAI,EAAEsB,mBAAUM,KAAV,CAAgB,CAAC,MAAD,CAAhB,CAFR;AAGEvB,IAAAA,IAAI,EAAEiB,mBAAUM,KAAV,CAAgB,oBAAKtC,mBAAL,CAAhB;AAHR,KApDkB,EAyDlBgC,mBAAUI,KAAV,uBACKe,0BAAiBpB,SADtB;AAEErB,IAAAA,IAAI,EAAEsB,mBAAUM,KAAV,CAAgB,CAAC,aAAD,CAAhB;AAFR,KAzDkB,EA6DlBN,mBAAUI,KAAV,uBACKgB,wBAAerB,SADpB;AAEErB,IAAAA,IAAI,EAAEsB,mBAAUM,KAAV,CAAgB,CAAC,WAAD,CAAhB;AAFR,KA7DkB,EAiElBN,mBAAUI,KAAV,uBACKiB,gBAAOtB,SADZ;AAEErB,IAAAA,IAAI,EAAEsB,mBAAUM,KAAV,CAAgB,CAAC,QAAD,CAAhB;AAFR,KAjEkB,EAqElBN,mBAAUI,KAAV,uBACKkB,wBAAevB,SADpB;AAEErB,IAAAA,IAAI,EAAEsB,mBAAUM,KAAV,CAAgB,CAAC,gBAAD,CAAhB;AAFR,KArEkB,EAyElBN,mBAAUI,KAAV,uBACKmB,2BAAMxB,SADX;AAEErB,IAAAA,IAAI,EAAEsB,mBAAUM,KAAV,CAAgB,CAAC,OAAD,CAAhB;AAFR,KAzEkB,EA6ElBN,mBAAUI,KAAV,CAAgBc,mBAAUnB,SAA1B,CA7EkB,CAApB,CADM;AALiB,CAA3B;eAuFed,c","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {keys, map, snakeCase} from 'lodash/fp';\nimport classNames from 'classnames';\nimport Autocomplete from '../../atom/autocomplete';\nimport Select from '../../atom/select';\nimport SelectMultiple from '../select-multiple';\nimport InputText from '../../atom/input-text';\nimport InputColor from '../../atom/input-color';\nimport InputCheckbox from '../../atom/input-checkbox';\nimport InputReadonly from '../../atom/input-readonly';\nimport InputSwitch from '../../atom/input-switch';\nimport BrandUploadBox from '../brand-upload-box';\nimport BrandDownloadBox from '../brand-download-box';\nimport Button from '../../atom/button';\nimport InputTextarea from '../../atom/input-textarea';\nimport InputHTML from '../../atom/input-html';\nimport InputDoublestep from '../../atom/input-doublestep';\nimport ImageUpload from '../../atom/image-upload';\nimport SetupSlider from '../setup-slider';\nimport SetupSections from '../setup-sections';\nimport Title from '../../atom/title';\nimport Roles from '../coorp-manager-roles';\nimport style from './style.css';\n\nconst inputContainerStyle = {\n default: style.defaultWidth,\n medium: style.mediumWidth,\n large: style.largeWidth\n};\n\nconst buildInput = field => {\n const {type} = field;\n\n switch (type) {\n case 'autoComplete':\n return <Autocomplete {...field} />;\n case 'color':\n return <InputColor {...field} />;\n case 'readonly':\n return <InputReadonly {...field} />;\n case 'switch':\n return <InputSwitch {...field} />;\n case 'textarea':\n return <InputTextarea {...field} />;\n case 'html':\n return <InputHTML {...field} />;\n case 'doublestep':\n return <InputDoublestep {...field} />;\n case 'select':\n return <Select {...field} theme={'coorpmanager'} />;\n case 'selectMultiple':\n return <SelectMultiple {...field} />;\n case 'checkbox':\n return <InputCheckbox {...field} />;\n case 'image':\n return <ImageUpload {...field} />;\n case 'slider':\n return <SetupSlider {...field} />;\n case 'sections':\n return <SetupSections {...field} />;\n case 'text':\n return <InputText {...field} />;\n case 'downloadbox':\n return <BrandDownloadBox {...field} />;\n case 'uploadbox':\n return <BrandUploadBox {...field} />;\n case 'button':\n case 'link':\n return <Button {...field} />;\n case 'roles':\n return <Roles {...field} />;\n default:\n return <InputText {...field} />;\n }\n};\n\nconst buildField = (field, index) => {\n const input = buildInput(field);\n const {theme, size = 'default'} = field;\n const styleInput = theme === 'coorpmanager' ? inputContainerStyle[size] : style.field;\n\n return (\n <div className={styleInput} key={index}>\n {input}\n </div>\n );\n};\n\nconst BrandFormGroup = props => {\n const {title, subtitle = '', fieldsLayout = '', groupLayout = '', fields = []} = props;\n const fieldsList = map.convert({cap: false})(buildField, fields);\n\n return (\n <div\n data-name={`brand_form_group_${snakeCase(title)}`}\n className={classNames(style.wrapper, groupLayout === 'grid' && style.groupGrid)}\n >\n <div className={style.titleWrapper}>\n <Title title={title} subtitle={subtitle} type={'form-group'} />\n </div>\n <div className={fieldsLayout === 'grid' ? style.grid : null}>{fieldsList}</div>\n </div>\n );\n};\n\nBrandFormGroup.propTypes = {\n title: PropTypes.string,\n subtitle: PropTypes.string,\n fieldsLayout: PropTypes.string,\n groupLayout: PropTypes.string,\n fields: PropTypes.arrayOf(\n PropTypes.oneOfType([\n PropTypes.shape({\n ...Autocomplete.propTypes,\n type: PropTypes.oneOf(['autoComplete']),\n size: PropTypes.oneOf(keys(inputContainerStyle))\n }),\n PropTypes.shape({\n ...InputColor.propTypes,\n type: PropTypes.oneOf(['color'])\n }),\n PropTypes.shape({\n ...InputReadonly.propTypes,\n type: PropTypes.oneOf(['readonly'])\n }),\n PropTypes.shape({\n ...InputSwitch.propTypes,\n type: PropTypes.oneOf(['switch'])\n }),\n PropTypes.shape({\n ...InputTextarea.propTypes,\n type: PropTypes.oneOf(['textarea']),\n size: PropTypes.oneOf(keys(inputContainerStyle))\n }),\n PropTypes.shape({\n ...InputHTML.propTypes,\n type: PropTypes.oneOf(['html'])\n }),\n PropTypes.shape({\n ...InputDoublestep.propTypes,\n type: PropTypes.oneOf(['doublestep'])\n }),\n PropTypes.shape({\n ...Select.propTypes,\n type: PropTypes.oneOf(['select']),\n size: PropTypes.oneOf(keys(inputContainerStyle))\n }),\n PropTypes.shape({\n ...InputCheckbox.propTypes,\n type: PropTypes.oneOf(['checkbox'])\n }),\n PropTypes.shape({\n ...ImageUpload.propTypes,\n type: PropTypes.oneOf(['image'])\n }),\n PropTypes.shape({\n ...SetupSlider.propTypes,\n type: PropTypes.oneOf(['slider'])\n }),\n PropTypes.shape({\n ...SetupSections.propTypes,\n type: PropTypes.oneOf(['sections'])\n }),\n PropTypes.shape({\n ...InputText.propTypes,\n type: PropTypes.oneOf(['text']),\n size: PropTypes.oneOf(keys(inputContainerStyle))\n }),\n PropTypes.shape({\n ...BrandDownloadBox.propTypes,\n type: PropTypes.oneOf(['downloadbox'])\n }),\n PropTypes.shape({\n ...BrandUploadBox.propTypes,\n type: PropTypes.oneOf(['uploadbox'])\n }),\n PropTypes.shape({\n ...Button.propTypes,\n type: PropTypes.oneOf(['button'])\n }),\n PropTypes.shape({\n ...SelectMultiple.propTypes,\n type: PropTypes.oneOf(['selectMultiple'])\n }),\n PropTypes.shape({\n ...Roles.propTypes,\n type: PropTypes.oneOf(['roles'])\n }),\n PropTypes.shape(InputText.propTypes)\n ])\n )\n};\nexport default BrandFormGroup;\n"],"file":"index.js"}
@@ -9,42 +9,46 @@ var _default = {
9
9
  fields: [{
10
10
  title: 'Primary color',
11
11
  name: 'primary-color',
12
- value: '#ececec',
13
- placeholder: '#ffffff',
12
+ placeholder: '#FFFFFF',
14
13
  type: 'color',
15
- description: 'Lorem ipsum dolor sit amet.',
16
- onChange: () => {}
17
- }, {
18
- title: 'Secondary color',
19
- name: 'secondary-color',
20
- value: '#ececec',
21
- placeholder: '#ffffff',
22
- type: 'color',
23
- description: 'Lorem ipsum dolor sit amet.',
24
- onChange: () => {}
25
- }, {
26
- title: 'Tertirary color',
27
- name: 'tertirary-color',
28
- value: '#ececec',
29
- placeholder: '#ffffff',
30
- type: 'color',
31
- description: 'Lorem ipsum dolor sit amet.',
14
+ error: '',
15
+ description: 'CTA buttons, icons, hovers, menu backgrounds...',
16
+ value: '#00B0FF',
17
+ options: [],
18
+ modified: false,
32
19
  onChange: () => {}
33
20
  }, {
34
21
  title: 'Validation color',
35
- name: 'validation-color',
36
- value: '#ececec',
37
- placeholder: '#ffffff',
22
+ name: 'good-color',
23
+ placeholder: '#FFFFFF',
38
24
  type: 'color',
39
- description: 'Lorem ipsum dolor sit amet.',
25
+ error: '',
26
+ description: 'Success messages',
27
+ value: '#66BB6A',
28
+ options: [],
29
+ modified: false,
40
30
  onChange: () => {}
41
31
  }, {
42
32
  title: 'Error color',
43
33
  name: 'error-color',
44
- value: '#ff0000',
45
- placeholder: '#ffffff',
34
+ placeholder: '#FFFFFF',
35
+ type: 'color',
36
+ error: '',
37
+ description: 'Error messages',
38
+ value: '#F73F52',
39
+ options: [],
40
+ modified: false,
41
+ onChange: () => {}
42
+ }, {
43
+ title: 'Lives color',
44
+ name: 'life-color',
45
+ placeholder: '#FFFFFF',
46
46
  type: 'color',
47
- description: 'Lorem ipsum dolor sit amet.',
47
+ error: '',
48
+ description: 'Slides lives',
49
+ value: '#F73F52',
50
+ options: [],
51
+ modified: false,
48
52
  onChange: () => {}
49
53
  }]
50
54
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/molecule/brand-form-group/test/fixtures/lookandfeel.js"],"names":["props","title","subtitle","fields","name","value","placeholder","type","description","onChange"],"mappings":";;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,KAAK,EAAE,iBADF;AAELC,IAAAA,QAAQ,EAAE,8EAFL;AAGLC,IAAAA,MAAM,EAAE,CACN;AACEF,MAAAA,KAAK,EAAE,eADT;AAEEG,MAAAA,IAAI,EAAE,eAFR;AAGEC,MAAAA,KAAK,EAAE,SAHT;AAIEC,MAAAA,WAAW,EAAE,SAJf;AAKEC,MAAAA,IAAI,EAAE,OALR;AAMEC,MAAAA,WAAW,EAAE,6BANf;AAOEC,MAAAA,QAAQ,EAAE,MAAM,CAAE;AAPpB,KADM,EAUN;AACER,MAAAA,KAAK,EAAE,iBADT;AAEEG,MAAAA,IAAI,EAAE,iBAFR;AAGEC,MAAAA,KAAK,EAAE,SAHT;AAIEC,MAAAA,WAAW,EAAE,SAJf;AAKEC,MAAAA,IAAI,EAAE,OALR;AAMEC,MAAAA,WAAW,EAAE,6BANf;AAOEC,MAAAA,QAAQ,EAAE,MAAM,CAAE;AAPpB,KAVM,EAmBN;AACER,MAAAA,KAAK,EAAE,iBADT;AAEEG,MAAAA,IAAI,EAAE,iBAFR;AAGEC,MAAAA,KAAK,EAAE,SAHT;AAIEC,MAAAA,WAAW,EAAE,SAJf;AAKEC,MAAAA,IAAI,EAAE,OALR;AAMEC,MAAAA,WAAW,EAAE,6BANf;AAOEC,MAAAA,QAAQ,EAAE,MAAM,CAAE;AAPpB,KAnBM,EA4BN;AACER,MAAAA,KAAK,EAAE,kBADT;AAEEG,MAAAA,IAAI,EAAE,kBAFR;AAGEC,MAAAA,KAAK,EAAE,SAHT;AAIEC,MAAAA,WAAW,EAAE,SAJf;AAKEC,MAAAA,IAAI,EAAE,OALR;AAMEC,MAAAA,WAAW,EAAE,6BANf;AAOEC,MAAAA,QAAQ,EAAE,MAAM,CAAE;AAPpB,KA5BM,EAqCN;AACER,MAAAA,KAAK,EAAE,aADT;AAEEG,MAAAA,IAAI,EAAE,aAFR;AAGEC,MAAAA,KAAK,EAAE,SAHT;AAIEC,MAAAA,WAAW,EAAE,SAJf;AAKEC,MAAAA,IAAI,EAAE,OALR;AAMEC,MAAAA,WAAW,EAAE,6BANf;AAOEC,MAAAA,QAAQ,EAAE,MAAM,CAAE;AAPpB,KArCM;AAHH;AADM,C","sourcesContent":["export default {\n props: {\n title: 'Platform design',\n subtitle: 'Explanation about what Platform design is and why to set stuffs in this form',\n fields: [\n {\n title: 'Primary color',\n name: 'primary-color',\n value: '#ececec',\n placeholder: '#ffffff',\n type: 'color',\n description: 'Lorem ipsum dolor sit amet.',\n onChange: () => {}\n },\n {\n title: 'Secondary color',\n name: 'secondary-color',\n value: '#ececec',\n placeholder: '#ffffff',\n type: 'color',\n description: 'Lorem ipsum dolor sit amet.',\n onChange: () => {}\n },\n {\n title: 'Tertirary color',\n name: 'tertirary-color',\n value: '#ececec',\n placeholder: '#ffffff',\n type: 'color',\n description: 'Lorem ipsum dolor sit amet.',\n onChange: () => {}\n },\n {\n title: 'Validation color',\n name: 'validation-color',\n value: '#ececec',\n placeholder: '#ffffff',\n type: 'color',\n description: 'Lorem ipsum dolor sit amet.',\n onChange: () => {}\n },\n {\n title: 'Error color',\n name: 'error-color',\n value: '#ff0000',\n placeholder: '#ffffff',\n type: 'color',\n description: 'Lorem ipsum dolor sit amet.',\n onChange: () => {}\n }\n ]\n }\n};\n"],"file":"lookandfeel.js"}
1
+ {"version":3,"sources":["../../../../../src/molecule/brand-form-group/test/fixtures/lookandfeel.js"],"names":["props","title","subtitle","fields","name","placeholder","type","error","description","value","options","modified","onChange"],"mappings":";;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,KAAK,EAAE,iBADF;AAELC,IAAAA,QAAQ,EAAE,8EAFL;AAGLC,IAAAA,MAAM,EAAE,CACN;AACEF,MAAAA,KAAK,EAAE,eADT;AAEEG,MAAAA,IAAI,EAAE,eAFR;AAGEC,MAAAA,WAAW,EAAE,SAHf;AAIEC,MAAAA,IAAI,EAAE,OAJR;AAKEC,MAAAA,KAAK,EAAE,EALT;AAMEC,MAAAA,WAAW,EAAE,iDANf;AAOEC,MAAAA,KAAK,EAAE,SAPT;AAQEC,MAAAA,OAAO,EAAE,EARX;AASEC,MAAAA,QAAQ,EAAE,KATZ;AAUEC,MAAAA,QAAQ,EAAE,MAAM,CAAE;AAVpB,KADM,EAaN;AACEX,MAAAA,KAAK,EAAE,kBADT;AAEEG,MAAAA,IAAI,EAAE,YAFR;AAGEC,MAAAA,WAAW,EAAE,SAHf;AAIEC,MAAAA,IAAI,EAAE,OAJR;AAKEC,MAAAA,KAAK,EAAE,EALT;AAMEC,MAAAA,WAAW,EAAE,kBANf;AAOEC,MAAAA,KAAK,EAAE,SAPT;AAQEC,MAAAA,OAAO,EAAE,EARX;AASEC,MAAAA,QAAQ,EAAE,KATZ;AAUEC,MAAAA,QAAQ,EAAE,MAAM,CAAE;AAVpB,KAbM,EAyBN;AACEX,MAAAA,KAAK,EAAE,aADT;AAEEG,MAAAA,IAAI,EAAE,aAFR;AAGEC,MAAAA,WAAW,EAAE,SAHf;AAIEC,MAAAA,IAAI,EAAE,OAJR;AAKEC,MAAAA,KAAK,EAAE,EALT;AAMEC,MAAAA,WAAW,EAAE,gBANf;AAOEC,MAAAA,KAAK,EAAE,SAPT;AAQEC,MAAAA,OAAO,EAAE,EARX;AASEC,MAAAA,QAAQ,EAAE,KATZ;AAUEC,MAAAA,QAAQ,EAAE,MAAM,CAAE;AAVpB,KAzBM,EAqCN;AACEX,MAAAA,KAAK,EAAE,aADT;AAEEG,MAAAA,IAAI,EAAE,YAFR;AAGEC,MAAAA,WAAW,EAAE,SAHf;AAIEC,MAAAA,IAAI,EAAE,OAJR;AAKEC,MAAAA,KAAK,EAAE,EALT;AAMEC,MAAAA,WAAW,EAAE,cANf;AAOEC,MAAAA,KAAK,EAAE,SAPT;AAQEC,MAAAA,OAAO,EAAE,EARX;AASEC,MAAAA,QAAQ,EAAE,KATZ;AAUEC,MAAAA,QAAQ,EAAE,MAAM,CAAE;AAVpB,KArCM;AAHH;AADM,C","sourcesContent":["export default {\n props: {\n title: 'Platform design',\n subtitle: 'Explanation about what Platform design is and why to set stuffs in this form',\n fields: [\n {\n title: 'Primary color',\n name: 'primary-color',\n placeholder: '#FFFFFF',\n type: 'color',\n error: '',\n description: 'CTA buttons, icons, hovers, menu backgrounds...',\n value: '#00B0FF',\n options: [],\n modified: false,\n onChange: () => {}\n },\n {\n title: 'Validation color',\n name: 'good-color',\n placeholder: '#FFFFFF',\n type: 'color',\n error: '',\n description: 'Success messages',\n value: '#66BB6A',\n options: [],\n modified: false,\n onChange: () => {}\n },\n {\n title: 'Error color',\n name: 'error-color',\n placeholder: '#FFFFFF',\n type: 'color',\n error: '',\n description: 'Error messages',\n value: '#F73F52',\n options: [],\n modified: false,\n onChange: () => {}\n },\n {\n title: 'Lives color',\n name: 'life-color',\n placeholder: '#FFFFFF',\n type: 'color',\n error: '',\n description: 'Slides lives',\n value: '#F73F52',\n options: [],\n modified: false,\n onChange: () => {}\n }\n ]\n }\n};\n"],"file":"lookandfeel.js"}
@@ -10,7 +10,7 @@
10
10
  border-radius: 7px;
11
11
  display: flex;
12
12
  font-size: 14px;
13
- justify-content: start;
13
+ justify-content: flex-start;
14
14
  margin-top: 8px;
15
15
  padding: 8px 16px;
16
16
  border-radius: 7px;
@@ -63,4 +63,4 @@
63
63
  .containerImage {
64
64
  min-height: 56px;
65
65
  min-width: 56px;
66
- }
66
+ }
@@ -8,8 +8,6 @@ var _renderComponent = _interopRequireDefault(require("../../../test/helpers/ren
8
8
 
9
9
  var _ = _interopRequireDefault(require(".."));
10
10
 
11
- var _courseSections = _interopRequireDefault(require("./fixtures/course-sections"));
12
-
13
11
  var _dashboardSections = _interopRequireDefault(require("./fixtures/dashboard-sections"));
14
12
 
15
13
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -20,6 +18,5 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
20
18
  t.not(value, undefined, `PropType for "Molecule.MoleculeDraggableList.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
21
19
  });
22
20
  });
23
- (0, _ava.default)('Molecule › MoleculeDraggableList › CourseSections › should be rendered', _renderComponent.default, _.default, _courseSections.default);
24
21
  (0, _ava.default)('Molecule › MoleculeDraggableList › DashboardSections › should be rendered', _renderComponent.default, _.default, _dashboardSections.default);
25
22
  //# sourceMappingURL=fixtures.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/molecule/draggable-list/test/fixtures.js"],"names":["t","pass","MoleculeDraggableList","propTypes","value","key","not","undefined","renderComponentMacro","fixtureCourseSections","fixtureDashboardSections"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,gEAAL,EAAuEA,CAAC,IAAI;AAC1EA,EAAAA,CAAC,CAACC,IAAF;AACA,wBAAQC,UAAsBC,SAA9B,EAAyC,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACvDL,IAAAA,CAAC,CAACM,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,0DAAyDF,GAAI,mEAAtF;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,wEAAL,EAA+EG,wBAA/E,EAAqGN,SAArG,EAA4HO,uBAA5H;AACA,kBAAK,2EAAL,EAAkFD,wBAAlF,EAAwGN,SAAxG,EAA+HQ,0BAA/H","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport MoleculeDraggableList from '..';\nimport fixtureCourseSections from './fixtures/course-sections';\nimport fixtureDashboardSections from './fixtures/dashboard-sections';\n\ntest('Molecule › MoleculeDraggableList > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeDraggableList.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Molecule.MoleculeDraggableList.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Molecule › MoleculeDraggableList › CourseSections › should be rendered', renderComponentMacro, MoleculeDraggableList, fixtureCourseSections);\ntest('Molecule › MoleculeDraggableList › DashboardSections › should be rendered', renderComponentMacro, MoleculeDraggableList, fixtureDashboardSections);\n"],"file":"fixtures.js"}
1
+ {"version":3,"sources":["../../../../src/molecule/draggable-list/test/fixtures.js"],"names":["t","pass","MoleculeDraggableList","propTypes","value","key","not","undefined","renderComponentMacro","fixtureDashboardSections"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,gEAAL,EAAuEA,CAAC,IAAI;AAC1EA,EAAAA,CAAC,CAACC,IAAF;AACA,wBAAQC,UAAsBC,SAA9B,EAAyC,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACvDL,IAAAA,CAAC,CAACM,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,0DAAyDF,GAAI,mEAAtF;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,2EAAL,EAAkFG,wBAAlF,EAAwGN,SAAxG,EAA+HO,0BAA/H","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport MoleculeDraggableList from '..';\nimport fixtureDashboardSections from './fixtures/dashboard-sections';\n\ntest('Molecule › MoleculeDraggableList > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeDraggableList.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Molecule.MoleculeDraggableList.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Molecule › MoleculeDraggableList › DashboardSections › should be rendered', renderComponentMacro, MoleculeDraggableList, fixtureDashboardSections);\n"],"file":"fixtures.js"}
@@ -10,9 +10,7 @@ var _ = _interopRequireDefault(require(".."));
10
10
 
11
11
  var _default = _interopRequireDefault(require("./fixtures/default"));
12
12
 
13
- var _withValueOnChange = _interopRequireDefault(require("./fixtures/with-value-on-change"));
14
-
15
- var _withValue = _interopRequireDefault(require("./fixtures/with-value"));
13
+ var _withDefaultValue = _interopRequireDefault(require("./fixtures/with-default-value"));
16
14
 
17
15
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
18
16
 
@@ -23,6 +21,5 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
23
21
  });
24
22
  });
25
23
  (0, _ava.default)('MoleculeQuestions › MoleculeQuestionsFreeText › Default › should be rendered', _renderComponent.default, _.default, _default.default);
26
- (0, _ava.default)('MoleculeQuestions › MoleculeQuestionsFreeText › WithValueOnChange › should be rendered', _renderComponent.default, _.default, _withValueOnChange.default);
27
- (0, _ava.default)('MoleculeQuestions › MoleculeQuestionsFreeText › WithValue › should be rendered', _renderComponent.default, _.default, _withValue.default);
24
+ (0, _ava.default)('MoleculeQuestions › MoleculeQuestionsFreeText › WithDefaultValue › should be rendered', _renderComponent.default, _.default, _withDefaultValue.default);
28
25
  //# sourceMappingURL=fixtures.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/molecule/questions/free-text/test/fixtures.js"],"names":["t","pass","MoleculeQuestionsFreeText","propTypes","value","key","not","undefined","renderComponentMacro","fixtureDefault","fixtureWithValueOnChange","fixtureWithValue"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,6EAAL,EAAoFA,CAAC,IAAI;AACvFA,EAAAA,CAAC,CAACC,IAAF;AACA,wBAAQC,UAA0BC,SAAlC,EAA6C,CAACC,KAAD,EAAQC,GAAR,KAAgB;AAC3DL,IAAAA,CAAC,CAACM,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,uEAAsEF,GAAI,mEAAnG;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,8EAAL,EAAqFG,wBAArF,EAA2GN,SAA3G,EAAsIO,gBAAtI;AACA,kBAAK,wFAAL,EAA+FD,wBAA/F,EAAqHN,SAArH,EAAgJQ,0BAAhJ;AACA,kBAAK,gFAAL,EAAuFF,wBAAvF,EAA6GN,SAA7G,EAAwIS,kBAAxI","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 fixtureWithValueOnChange from './fixtures/with-value-on-change';\nimport fixtureWithValue from './fixtures/with-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 › WithValueOnChange › should be rendered', renderComponentMacro, MoleculeQuestionsFreeText, fixtureWithValueOnChange);\ntest('MoleculeQuestions › MoleculeQuestionsFreeText › WithValue › should be rendered', renderComponentMacro, MoleculeQuestionsFreeText, fixtureWithValue);\n"],"file":"fixtures.js"}
1
+ {"version":3,"sources":["../../../../../src/molecule/questions/free-text/test/fixtures.js"],"names":["t","pass","MoleculeQuestionsFreeText","propTypes","value","key","not","undefined","renderComponentMacro","fixtureDefault","fixtureWithDefaultValue"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,6EAAL,EAAoFA,CAAC,IAAI;AACvFA,EAAAA,CAAC,CAACC,IAAF;AACA,wBAAQC,UAA0BC,SAAlC,EAA6C,CAACC,KAAD,EAAQC,GAAR,KAAgB;AAC3DL,IAAAA,CAAC,CAACM,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,uEAAsEF,GAAI,mEAAnG;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,8EAAL,EAAqFG,wBAArF,EAA2GN,SAA3G,EAAsIO,gBAAtI;AACA,kBAAK,uFAAL,EAA8FD,wBAA9F,EAAoHN,SAApH,EAA+IQ,yBAA/I","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"}