@coorpacademy/components 10.13.3-alpha.6 → 10.13.5

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 (105) hide show
  1. package/es/atom/drag-and-drop/index.js +43 -40
  2. package/es/atom/drag-and-drop/index.js.map +1 -1
  3. package/es/atom/drag-and-drop/style.css +75 -108
  4. package/es/atom/drag-and-drop/test/fixtures/default.js +3 -3
  5. package/es/atom/drag-and-drop/test/fixtures/default.js.map +1 -1
  6. package/es/atom/drag-and-drop/test/fixtures/loading.js +1 -2
  7. package/es/atom/drag-and-drop/test/fixtures/loading.js.map +1 -1
  8. package/es/atom/drag-and-drop/test/fixtures/with-children.js +0 -1
  9. package/es/atom/drag-and-drop/test/fixtures/with-children.js.map +1 -1
  10. package/es/atom/drag-and-drop/test/fixtures/with-image.js +1 -2
  11. package/es/atom/drag-and-drop/test/fixtures/with-image.js.map +1 -1
  12. package/es/atom/drag-and-drop/test/fixtures/with-video.js +1 -3
  13. package/es/atom/drag-and-drop/test/fixtures/with-video.js.map +1 -1
  14. package/es/atom/drag-and-drop/test/fixtures.js +0 -2
  15. package/es/atom/drag-and-drop/test/fixtures.js.map +1 -1
  16. package/es/atom/input-text/style.css +1 -1
  17. package/es/atom/input-text-with-title/index.js +4 -2
  18. package/es/atom/input-text-with-title/index.js.map +1 -1
  19. package/es/atom/input-text-with-title/style.css +6 -2
  20. package/es/atom/input-text-with-title/test/fixtures/error.js +3 -1
  21. package/es/atom/input-text-with-title/test/fixtures/error.js.map +1 -1
  22. package/es/atom/loader/style.css +3 -7
  23. package/es/atom/select/index.js +4 -1
  24. package/es/atom/select/index.js.map +1 -1
  25. package/es/molecule/course-sections/index.js +1 -4
  26. package/es/molecule/course-sections/index.js.map +1 -1
  27. package/es/molecule/course-sections/style.css +2 -15
  28. package/es/organism/course-selection/index.js +1 -2
  29. package/es/organism/course-selection/index.js.map +1 -1
  30. package/es/organism/course-selection/style.css +3 -12
  31. package/es/organism/course-selection/test/fixtures.js +0 -2
  32. package/es/organism/course-selection/test/fixtures.js.map +1 -1
  33. package/es/organism/search-and-chips-results/index.js +1 -2
  34. package/es/organism/search-and-chips-results/index.js.map +1 -1
  35. package/es/organism/search-and-chips-results/style.css +3 -10
  36. package/es/organism/search-and-chips-results/test/fixtures.js +0 -2
  37. package/es/organism/search-and-chips-results/test/fixtures.js.map +1 -1
  38. package/es/template/back-office/brand-update/index.js +2 -5
  39. package/es/template/back-office/brand-update/index.js.map +1 -1
  40. package/es/template/back-office/brand-update/style.css +1 -10
  41. package/es/util/button-icons.js +2 -3
  42. package/es/util/button-icons.js.map +1 -1
  43. package/lib/atom/drag-and-drop/index.js +40 -41
  44. package/lib/atom/drag-and-drop/index.js.map +1 -1
  45. package/lib/atom/drag-and-drop/style.css +75 -108
  46. package/lib/atom/drag-and-drop/test/fixtures/default.js +3 -3
  47. package/lib/atom/drag-and-drop/test/fixtures/default.js.map +1 -1
  48. package/lib/atom/drag-and-drop/test/fixtures/loading.js +1 -2
  49. package/lib/atom/drag-and-drop/test/fixtures/loading.js.map +1 -1
  50. package/lib/atom/drag-and-drop/test/fixtures/with-children.js +0 -1
  51. package/lib/atom/drag-and-drop/test/fixtures/with-children.js.map +1 -1
  52. package/lib/atom/drag-and-drop/test/fixtures/with-image.js +1 -2
  53. package/lib/atom/drag-and-drop/test/fixtures/with-image.js.map +1 -1
  54. package/lib/atom/drag-and-drop/test/fixtures/with-video.js +1 -3
  55. package/lib/atom/drag-and-drop/test/fixtures/with-video.js.map +1 -1
  56. package/lib/atom/drag-and-drop/test/fixtures.js +0 -3
  57. package/lib/atom/drag-and-drop/test/fixtures.js.map +1 -1
  58. package/lib/atom/input-text/style.css +1 -1
  59. package/lib/atom/input-text-with-title/index.js +4 -2
  60. package/lib/atom/input-text-with-title/index.js.map +1 -1
  61. package/lib/atom/input-text-with-title/style.css +6 -2
  62. package/lib/atom/input-text-with-title/test/fixtures/error.js +3 -1
  63. package/lib/atom/input-text-with-title/test/fixtures/error.js.map +1 -1
  64. package/lib/atom/loader/style.css +3 -7
  65. package/lib/atom/select/index.js +4 -1
  66. package/lib/atom/select/index.js.map +1 -1
  67. package/lib/molecule/course-sections/index.js +1 -4
  68. package/lib/molecule/course-sections/index.js.map +1 -1
  69. package/lib/molecule/course-sections/style.css +2 -15
  70. package/lib/organism/course-selection/index.js +1 -2
  71. package/lib/organism/course-selection/index.js.map +1 -1
  72. package/lib/organism/course-selection/style.css +3 -12
  73. package/lib/organism/course-selection/test/fixtures.js +0 -3
  74. package/lib/organism/course-selection/test/fixtures.js.map +1 -1
  75. package/lib/organism/search-and-chips-results/index.js +1 -2
  76. package/lib/organism/search-and-chips-results/index.js.map +1 -1
  77. package/lib/organism/search-and-chips-results/style.css +3 -10
  78. package/lib/organism/search-and-chips-results/test/fixtures.js +0 -3
  79. package/lib/organism/search-and-chips-results/test/fixtures.js.map +1 -1
  80. package/lib/template/back-office/brand-update/index.js +2 -5
  81. package/lib/template/back-office/brand-update/index.js.map +1 -1
  82. package/lib/template/back-office/brand-update/style.css +1 -10
  83. package/lib/util/button-icons.js +1 -2
  84. package/lib/util/button-icons.js.map +1 -1
  85. package/package.json +2 -2
  86. package/es/atom/drag-and-drop/test/fixtures/withLongDescription.js +0 -9
  87. package/es/atom/drag-and-drop/test/fixtures/withLongDescription.js.map +0 -1
  88. package/es/atom/review-header-step-item/test/fixtures.js +0 -19
  89. package/es/atom/review-header-step-item/test/fixtures.js.map +0 -1
  90. package/es/molecule/review-header-steps/test/fixtures.js +0 -23
  91. package/es/molecule/review-header-steps/test/fixtures.js.map +0 -1
  92. package/es/organism/course-selection/test/fixtures/loading.js +0 -9
  93. package/es/organism/course-selection/test/fixtures/loading.js.map +0 -1
  94. package/es/organism/search-and-chips-results/test/fixtures/loading.js +0 -9
  95. package/es/organism/search-and-chips-results/test/fixtures/loading.js.map +0 -1
  96. package/lib/atom/drag-and-drop/test/fixtures/withLongDescription.js +0 -18
  97. package/lib/atom/drag-and-drop/test/fixtures/withLongDescription.js.map +0 -1
  98. package/lib/atom/review-header-step-item/test/fixtures.js +0 -31
  99. package/lib/atom/review-header-step-item/test/fixtures.js.map +0 -1
  100. package/lib/molecule/review-header-steps/test/fixtures.js +0 -37
  101. package/lib/molecule/review-header-steps/test/fixtures.js.map +0 -1
  102. package/lib/organism/course-selection/test/fixtures/loading.js +0 -19
  103. package/lib/organism/course-selection/test/fixtures/loading.js.map +0 -1
  104. package/lib/organism/search-and-chips-results/test/fixtures/loading.js +0 -19
  105. package/lib/organism/search-and-chips-results/test/fixtures/loading.js.map +0 -1
@@ -19,6 +19,10 @@
19
19
  font-style: normal;
20
20
  }
21
21
 
22
- .inputText {
23
- width: 173px;
22
+ .defaultInputText {
23
+ width: 100%;
24
+ }
25
+
26
+ .smallInputText {
27
+ width: 218px;
24
28
  }
@@ -13,8 +13,10 @@ var _default = {
13
13
  props: {
14
14
  title: 'Mandatory courses to complete certification',
15
15
  inputText: _extends(_extends({}, _cmDefault.default.props), {}, {
16
+ title: 'Amount (6 items max)',
16
17
  error: 'this is error',
17
- hint: ''
18
+ hint: '',
19
+ size: 'small'
18
20
  })
19
21
  }
20
22
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/atom/input-text-with-title/test/fixtures/error.js"],"names":["props","title","inputText","error","hint"],"mappings":";;;;;AAAA;;;;;;eAEe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,KAAK,EAAE,6CADF;AAELC,IAAAA,SAAS,wBAAMA,mBAAUF,KAAhB;AAAuBG,MAAAA,KAAK,EAAE,eAA9B;AAA+CC,MAAAA,IAAI,EAAE;AAArD;AAFJ;AADM,C","sourcesContent":["import inputText from '../../../input-text/test/fixtures/cm-default';\n\nexport default {\n props: {\n title: 'Mandatory courses to complete certification',\n inputText: {...inputText.props, error: 'this is error', hint: ''}\n }\n};\n"],"file":"error.js"}
1
+ {"version":3,"sources":["../../../../../src/atom/input-text-with-title/test/fixtures/error.js"],"names":["props","title","inputText","error","hint","size"],"mappings":";;;;;AAAA;;;;;;eAEe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,KAAK,EAAE,6CADF;AAELC,IAAAA,SAAS,wBACJA,mBAAUF,KADN;AAEPC,MAAAA,KAAK,EAAE,sBAFA;AAGPE,MAAAA,KAAK,EAAE,eAHA;AAIPC,MAAAA,IAAI,EAAE,EAJC;AAKPC,MAAAA,IAAI,EAAE;AALC;AAFJ;AADM,C","sourcesContent":["import inputText from '../../../input-text/test/fixtures/cm-default';\n\nexport default {\n props: {\n title: 'Mandatory courses to complete certification',\n inputText: {\n ...inputText.props,\n title: 'Amount (6 items max)',\n error: 'this is error',\n hint: '',\n size: 'small'\n }\n }\n};\n"],"file":"error.js"}
@@ -32,11 +32,7 @@
32
32
  }
33
33
 
34
34
  .cmLoaderContainer {
35
- position: relative;
36
- top: 0;
37
- left: 0;
38
- height: 100%;
39
- width: 100%;
35
+ composes: _container;
40
36
  }
41
37
 
42
38
  .dots {
@@ -77,8 +73,8 @@
77
73
  }
78
74
 
79
75
  .icon {
80
- width: 100%;
81
- height: 100%;
76
+ width: 40px;
77
+ height: 40px;
82
78
  position: absolute;
83
79
  }
84
80
 
@@ -125,7 +125,10 @@ 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, _includes.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
+ style: _extends({}, shouldUseSkinFontColor && {
130
+ color
131
+ })
129
132
  }, selectedLabel), arrowView, /*#__PURE__*/_react.default.createElement("select", {
130
133
  "data-name": "native-select",
131
134
  className: _style.default.selectBox,
@@ -1 +1 @@
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;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;AAUjBC,EAAAA,YAAY,EAAE;AAVG,CAAnB;;AAaA,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,QA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AmB;AACjB/C,EAAAA,KAAK,EAAEsC,mBAAUC,MADA;AAEjBnD,EAAAA,IAAI,EAAEkD,mBAAUC,MAFC;AAGjBjD,EAAAA,SAAS,EAAEgD,mBAAUC,MAHJ;AAIjBhD,EAAAA,eAAe,EAAE+C,mBAAUC,MAJV;AAKjB7C,EAAAA,QAAQ,EAAE4C,mBAAUK,IALH;AAMjBlD,EAAAA,QAAQ,EAAE6C,mBAAUK,IANH;AAOjB/C,EAAAA,WAAW,EAAE0C,mBAAUC,MAPN;AAQjB5C,EAAAA,QAAQ,EAAE2C,mBAAUK,IARH;AASjBnD,EAAAA,QAAQ,EAAE8C,mBAAUU,IATH;AAUjBnD,EAAAA,KAAK,EAAEyC,mBAAUW,KAAV,CAAgB,mBAAK5E,UAAL,CAAhB,CAVU;AAWjBgB,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 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
+ {"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;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;AAUjBC,EAAAA,YAAY,EAAE;AAVG,CAAnB;;AAaA,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;AAgBA,QAAM;AAACgB,IAAAA;A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,EAAE+C,mBAAUC,MAJV;AAKjB7C,EAAAA,QAAQ,EAAE4C,mBAAUK,IALH;AAMjBlD,EAAAA,QAAQ,EAAE6C,mBAAUK,IANH;AAOjB/C,EAAAA,WAAW,EAAE0C,mBAAUC,MAPN;AAQjB5C,EAAAA,QAAQ,EAAE2C,mBAAUK,IARH;AASjBnD,EAAAA,QAAQ,EAAE8C,mBAAUU,IATH;AAUjBnD,EAAAA,KAAK,EAAEyC,mBAAUW,KAAV,CAAgB,mBAAK5E,UAAL,CAAhB,CAVU;AAWjBgB,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 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 style={{\n ...(shouldUseSkinFontColor && {\n color\n })\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"}
@@ -21,10 +21,7 @@ var _style = _interopRequireDefault(require("./style.css"));
21
21
 
22
22
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
23
23
 
24
- const Loading = () => /*#__PURE__*/_react.default.createElement("div", {
25
- className: _style.default.loaderContainer
26
- }, /*#__PURE__*/_react.default.createElement(_loader.default, {
27
- className: _style.default.loader,
24
+ const Loading = () => /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_loader.default, {
28
25
  theme: "coorpmanager"
29
26
  }));
30
27
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/molecule/course-sections/index.js"],"names":["Loading","style","loaderContainer","loader","CourseSections","sections","onDrop","isLoading","title","mandatoryCoursesInput","inputTitle","propTypes","PropTypes","string","arrayOf","shape","CourseSection","func","bool","InputTextWithTitle"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,MAAMA,OAAO,GAAG,mBACd;AAAK,EAAA,SAAS,EAAEC,eAAMC;AAAtB,gBACE,6BAAC,eAAD;AAAQ,EAAA,SAAS,EAAED,eAAME,MAAzB;AAAiC,EAAA,KAAK,EAAC;AAAvC,EADF,CADF;;AAMA,MAAMC,cAAc,GAAG,CAAC;AACtBC,EAAAA,QADsB;AAEtBC,EAAAA,MAFsB;AAGtBC,EAAAA,SAHsB;AAItBC,EAAAA,KAJsB;AAKtBC,EAAAA,qBALsB;AAMtBC,EAAAA;AANsB,CAAD,KAOjB;AACJ,MAAIH,SAAJ,EAAe,oBAAO,6BAAC,OAAD,OAAP;AAEf,sBACE,0CACGG,UAAU,gBACT;AAAK,IAAA,SAAS,EAAET,eAAMO;AAAtB,kBACE,6BAAC,cAAD;AACE,IAAA,KAAK,EAAEE,UADT;AAEE,IAAA,IAAI,EAAE,YAFR;AAGE,iBAAW;AAHb,IADF,CADS,GAQP,IATN,EAUGD,qBAAqB,gBACpB;AAAK,IAAA,SAAS,EAAER,eAAMQ;AAAtB,kBACE,6BAAC,2BAAD,EAAwBA,qBAAxB,CADF,CADoB,GAIlB,IAdN,EAeGD,KAAK,gBACJ;AAAK,IAAA,SAAS,EAAEP,eAAMO;AAAtB,kBACE,6BAAC,cAAD;AAAO,IAAA,KAAK,EAAEA,KAAd;AAAqB,IAAA,IAAI,EAAE,YAA3B;AAAyC,iBAAW;AAApD,IADF,CADI,GAIF,IAnBN,eAoBE,6BAAC,sBAAD;AAAe,IAAA,QAAQ,EAAC,gBAAxB;AAAyC,IAAA,KAAK,EAAEH,QAAhD;AAA0D,IAAA,MAAM,EAAEC;AAAlE,IApBF,CADF;AAwBD,CAlCD;;AAoCAF,cAAc,CAACO,SAAf,2CAA2B;AACzBD,EAAAA,UAAU,EAAEE,mBAAUC,MADG;AAEzBL,EAAAA,KAAK,EAAEI,mBAAUC,MAFQ;AAGzBR,EAAAA,QAAQ,EAAEO,mBAAUE,OAAV,CAAkBF,mBAAUG,KAAV,CAAgBC,uBAAcL,SAA9B,CAAlB,CAHe;AAIzBL,EAAAA,MAAM,EAAEM,mBAAUK,IAJO;AAKzBV,EAAAA,SAAS,EAAEK,mBAAUM,IALI;AAMzBT,EAAAA,qBAAqB,EAAEG,mBAAUG,KAAV,CAAgBI,4BAAmBR,SAAnC;AANE,CAA3B;eASeP,c","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport InputTextWithTitle from '../../atom/input-text-with-title';\nimport CourseSection from '../course-section';\nimport DraggableList from '../draggable-list';\nimport Loader from '../../atom/loader';\nimport Title from '../../atom/title';\nimport style from './style.css';\n\nconst Loading = () => (\n <div className={style.loaderContainer}>\n <Loader className={style.loader} theme=\"coorpmanager\" />\n </div>\n);\n\nconst CourseSections = ({\n sections,\n onDrop,\n isLoading,\n title,\n mandatoryCoursesInput,\n inputTitle\n}) => {\n if (isLoading) return <Loading />;\n\n return (\n <div>\n {inputTitle ? (\n <div className={style.title}>\n <Title\n title={inputTitle}\n type={'form-group'}\n data-name={'mandatory-courses-input-title'}\n />\n </div>\n ) : null}\n {mandatoryCoursesInput ? (\n <div className={style.mandatoryCoursesInput}>\n <InputTextWithTitle {...mandatoryCoursesInput} />\n </div>\n ) : null}\n {title ? (\n <div className={style.title}>\n <Title title={title} type={'form-group'} data-name={'course-sections-title'} />\n </div>\n ) : null}\n <DraggableList itemType=\"course-section\" items={sections} onDrop={onDrop} />\n </div>\n );\n};\n\nCourseSections.propTypes = {\n inputTitle: PropTypes.string,\n title: PropTypes.string,\n sections: PropTypes.arrayOf(PropTypes.shape(CourseSection.propTypes)),\n onDrop: PropTypes.func,\n isLoading: PropTypes.bool,\n mandatoryCoursesInput: PropTypes.shape(InputTextWithTitle.propTypes)\n};\n\nexport default CourseSections;\n"],"file":"index.js"}
1
+ {"version":3,"sources":["../../../src/molecule/course-sections/index.js"],"names":["Loading","CourseSections","sections","onDrop","isLoading","title","mandatoryCoursesInput","inputTitle","style","propTypes","PropTypes","string","arrayOf","shape","CourseSection","func","bool","InputTextWithTitle"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,MAAMA,OAAO,GAAG,mBACd,uDACE,6BAAC,eAAD;AAAQ,EAAA,KAAK,EAAC;AAAd,EADF,CADF;;AAMA,MAAMC,cAAc,GAAG,CAAC;AACtBC,EAAAA,QADsB;AAEtBC,EAAAA,MAFsB;AAGtBC,EAAAA,SAHsB;AAItBC,EAAAA,KAJsB;AAKtBC,EAAAA,qBALsB;AAMtBC,EAAAA;AANsB,CAAD,KAOjB;AACJ,MAAIH,SAAJ,EAAe,oBAAO,6BAAC,OAAD,OAAP;AAEf,sBACE,0CACGG,UAAU,gBACT;AAAK,IAAA,SAAS,EAAEC,eAAMH;AAAtB,kBACE,6BAAC,cAAD;AACE,IAAA,KAAK,EAAEE,UADT;AAEE,IAAA,IAAI,EAAE,YAFR;AAGE,iBAAW;AAHb,IADF,CADS,GAQP,IATN,EAUGD,qBAAqB,gBACpB;AAAK,IAAA,SAAS,EAAEE,eAAMF;AAAtB,kBACE,6BAAC,2BAAD,EAAwBA,qBAAxB,CADF,CADoB,GAIlB,IAdN,EAeGD,KAAK,gBACJ;AAAK,IAAA,SAAS,EAAEG,eAAMH;AAAtB,kBACE,6BAAC,cAAD;AAAO,IAAA,KAAK,EAAEA,KAAd;AAAqB,IAAA,IAAI,EAAE,YAA3B;AAAyC,iBAAW;AAApD,IADF,CADI,GAIF,IAnBN,eAoBE,6BAAC,sBAAD;AAAe,IAAA,QAAQ,EAAC,gBAAxB;AAAyC,IAAA,KAAK,EAAEH,QAAhD;AAA0D,IAAA,MAAM,EAAEC;AAAlE,IApBF,CADF;AAwBD,CAlCD;;AAoCAF,cAAc,CAACQ,SAAf,2CAA2B;AACzBF,EAAAA,UAAU,EAAEG,mBAAUC,MADG;AAEzBN,EAAAA,KAAK,EAAEK,mBAAUC,MAFQ;AAGzBT,EAAAA,QAAQ,EAAEQ,mBAAUE,OAAV,CAAkBF,mBAAUG,KAAV,CAAgBC,uBAAcL,SAA9B,CAAlB,CAHe;AAIzBN,EAAAA,MAAM,EAAEO,mBAAUK,IAJO;AAKzBX,EAAAA,SAAS,EAAEM,mBAAUM,IALI;AAMzBV,EAAAA,qBAAqB,EAAEI,mBAAUG,KAAV,CAAgBI,4BAAmBR,SAAnC;AANE,CAA3B;eASeR,c","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport InputTextWithTitle from '../../atom/input-text-with-title';\nimport CourseSection from '../course-section';\nimport DraggableList from '../draggable-list';\nimport Loader from '../../atom/loader';\nimport Title from '../../atom/title';\nimport style from './style.css';\n\nconst Loading = () => (\n <div>\n <Loader theme=\"coorpmanager\" />\n </div>\n);\n\nconst CourseSections = ({\n sections,\n onDrop,\n isLoading,\n title,\n mandatoryCoursesInput,\n inputTitle\n}) => {\n if (isLoading) return <Loading />;\n\n return (\n <div>\n {inputTitle ? (\n <div className={style.title}>\n <Title\n title={inputTitle}\n type={'form-group'}\n data-name={'mandatory-courses-input-title'}\n />\n </div>\n ) : null}\n {mandatoryCoursesInput ? (\n <div className={style.mandatoryCoursesInput}>\n <InputTextWithTitle {...mandatoryCoursesInput} />\n </div>\n ) : null}\n {title ? (\n <div className={style.title}>\n <Title title={title} type={'form-group'} data-name={'course-sections-title'} />\n </div>\n ) : null}\n <DraggableList itemType=\"course-section\" items={sections} onDrop={onDrop} />\n </div>\n );\n};\n\nCourseSections.propTypes = {\n inputTitle: PropTypes.string,\n title: PropTypes.string,\n sections: PropTypes.arrayOf(PropTypes.shape(CourseSection.propTypes)),\n onDrop: PropTypes.func,\n isLoading: PropTypes.bool,\n mandatoryCoursesInput: PropTypes.shape(InputTextWithTitle.propTypes)\n};\n\nexport default CourseSections;\n"],"file":"index.js"}
@@ -3,18 +3,5 @@
3
3
  }
4
4
 
5
5
  .mandatoryCoursesInput {
6
- margin: 0 0 16px 16px;
7
- }
8
-
9
- .loader {
10
- width: 60px;
11
- height: 60px;
12
- }
13
-
14
- .loaderContainer {
15
- display: flex;
16
- justify-content: center;
17
- align-items: center;
18
- height: 50vh;
19
- width: 100%;
20
- }
6
+ margin: 0 0 32px 16px;
7
+ }
@@ -75,9 +75,8 @@ const CourseSelection = props => {
75
75
  className: _style.default.cardsContainer,
76
76
  "data-name": 'courses-result'
77
77
  }, isLoading ? /*#__PURE__*/_react.default.createElement("div", {
78
- className: _style.default.loaderContainer
78
+ className: _style.default.loader
79
79
  }, /*#__PURE__*/_react.default.createElement(_loader.default, {
80
- className: _style.default.loader,
81
80
  theme: "coorpmanager"
82
81
  })) : resultView));
83
82
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/organism/course-selection/index.js"],"names":["buildResultView","courses","coursesSelectionAriaLabel","emptyMessages","isLoading","items","map","card","index","title","type","style","cards","CourseSelection","props","search","contentTypeFilter","switchButton","resultView","container","filters","contentFilter","cardsContainer","loaderContainer","loader","propTypes","PropTypes","shape","Search","bool","SelectMultiple","arrayOf","Card","string","firstMessage","secondMessage","InputSwitch"],"mappings":";;;;;;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;AAEA,MAAMA,eAAe,GAAG,CAACC,OAAD,EAAUC,yBAAV,EAAqCC,aAArC,EAAoDC,SAApD,KAAkE;AACxF,MAAI,CAACA,SAAD,IAAc,uBAAQH,OAAR,CAAlB,EAAoC;AAClC,wBAAO,6BAAC,0BAAD,EAAuBE,aAAvB,CAAP;AACD;;AAED,QAAME,KAAK,GAAGJ,OAAO,CAACK,GAAR,CAAY,C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AMY;AAAtB,kBACE,6BAAC,eAAD;AAAQ,IAAA,SAAS,EAAEZ,eAAMa,MAAzB;AAAiC,IAAA,KAAK,EAAC;AAAvC,IADF,CADQ,GAKRN,UANJ,CAVF,CADF;AAsBD,CAnCD;;AAqCAL,eAAe,CAACY,SAAhB,2CAA4B;AAC1BV,EAAAA,MAAM,EAAEW,mBAAUC,KAAV,CAAgBC,qBAAOF,SAAvB,CADkB;AAE1BtB,EAAAA,SAAS,EAAEsB,mBAAUG,IAFK;AAG1Bb,EAAAA,iBAAiB,EAAEU,mBAAUC,KAAV,CAAgBG,wBAAeJ,SAA/B,CAHO;AAI1BzB,EAAAA,OAAO,EAAEyB,mBAAUK,OAAV,CAAkBL,mBAAUC,KAAV,CAAgBK,cAAKP,SAArB,CAAlB,CAJiB;AAK1B,kCAAgCC,mBAAUO,MALhB;AAM1B9B,EAAAA,aAAa,EAAEuB,mBAAUC,KAAV,CAAgB;AAC7BO,IAAAA,YAAY,EAAER,mBAAUO,MADK;AAE7BE,IAAAA,aAAa,EAAET,mBAAUO;AAFI,GAAhB,CANW;AAU1BhB,EAAAA,YAAY,EAAES,mBAAUC,KAAV,CAAgBS,qBAAYV,SAA5B;AAVY,CAA5B;eAaeb,e","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {isEmpty, get, kebabCase} from 'lodash/fp';\nimport EmptySearchResult from '../../atom/empty-search-result';\nimport Search from '../../atom/input-search';\nimport SelectMultiple from '../../molecule/select-multiple';\nimport Card from '../../molecule/card';\nimport InputSwitch from '../../atom/input-switch';\nimport Loader from '../../atom/loader';\nimport style from './style.css';\n\nconst buildResultView = (courses, coursesSelectionAriaLabel, emptyMessages, isLoading) => {\n if (!isLoading && isEmpty(courses)) {\n return <EmptySearchResult {...emptyMessages} />;\n }\n\n const items = courses.map((card, index) => {\n const title = get('title', card);\n const type = get('type', card);\n return (\n <li className={style.cards} key={`card-${index}`} data-name={`${type}-${kebabCase(title)}`}>\n <Card {...card} />\n </li>\n );\n });\n\n return <ul aria-label={coursesSelectionAriaLabel}>{items}</ul>;\n};\n\nconst CourseSelection = props => {\n const {\n search,\n contentTypeFilter,\n courses,\n emptyMessages,\n isLoading = false,\n 'courses-selection-aria-label': coursesSelectionAriaLabel,\n switchButton\n } = props;\n\n const resultView = buildResultView(courses, coursesSelectionAriaLabel, emptyMessages, isLoading);\n\n return (\n <div className={style.container}>\n <div className={style.filters}>\n <div className={style.search}>\n <Search {...search} theme=\"coorpmanager\" />\n </div>\n <div className={style.contentFilter}>\n <SelectMultiple {...contentTypeFilter} />\n </div>\n <InputSwitch {...switchButton} />\n </div>\n <div className={style.cardsContainer} data-name={'courses-result'}>\n {isLoading ? (\n <div className={style.loaderContainer}>\n <Loader className={style.loader} theme=\"coorpmanager\" />\n </div>\n ) : (\n resultView\n )}\n </div>\n </div>\n );\n};\n\nCourseSelection.propTypes = {\n search: PropTypes.shape(Search.PropTypes),\n isLoading: PropTypes.bool,\n contentTypeFilter: PropTypes.shape(SelectMultiple.PropTypes),\n courses: PropTypes.arrayOf(PropTypes.shape(Card.propTypes)),\n 'courses-selection-aria-label': PropTypes.string,\n emptyMessages: PropTypes.shape({\n firstMessage: PropTypes.string,\n secondMessage: PropTypes.string\n }),\n switchButton: PropTypes.shape(InputSwitch.PropTypes)\n};\n\nexport default CourseSelection;\n"],"file":"index.js"}
1
+ {"version":3,"sources":["../../../src/organism/course-selection/index.js"],"names":["buildResultView","courses","coursesSelectionAriaLabel","emptyMessages","isLoading","items","map","card","index","title","type","style","cards","CourseSelection","props","search","contentTypeFilter","switchButton","resultView","container","filters","contentFilter","cardsContainer","loader","propTypes","PropTypes","shape","Search","bool","SelectMultiple","arrayOf","Card","string","firstMessage","secondMessage","InputSwitch"],"mappings":";;;;;;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;AAEA,MAAMA,eAAe,GAAG,CAACC,OAAD,EAAUC,yBAAV,EAAqCC,aAArC,EAAoDC,SA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ApB,CADF,CAJF,eAOE,6BAAC,oBAAD,EAAiBC,YAAjB,CAPF,CADF,eAUE;AAAK,IAAA,SAAS,EAAEN,eAAMW,cAAtB;AAAsC,iBAAW;AAAjD,KACGlB,SAAS,gBACR;AAAK,IAAA,SAAS,EAAEO,eAAMY;AAAtB,kBACE,6BAAC,eAAD;AAAQ,IAAA,KAAK,EAAC;AAAd,IADF,CADQ,GAKRL,UANJ,CAVF,CADF;AAsBD,CAnCD;;AAqCAL,eAAe,CAACW,SAAhB,2CAA4B;AAC1BT,EAAAA,MAAM,EAAEU,mBAAUC,KAAV,CAAgBC,qBAAOF,SAAvB,CADkB;AAE1BrB,EAAAA,SAAS,EAAEqB,mBAAUG,IAFK;AAG1BZ,EAAAA,iBAAiB,EAAES,mBAAUC,KAAV,CAAgBG,wBAAeJ,SAA/B,CAHO;AAI1BxB,EAAAA,OAAO,EAAEwB,mBAAUK,OAAV,CAAkBL,mBAAUC,KAAV,CAAgBK,cAAKP,SAArB,CAAlB,CAJiB;AAK1B,kCAAgCC,mBAAUO,MALhB;AAM1B7B,EAAAA,aAAa,EAAEsB,mBAAUC,KAAV,CAAgB;AAC7BO,IAAAA,YAAY,EAAER,mBAAUO,MADK;AAE7BE,IAAAA,aAAa,EAAET,mBAAUO;AAFI,GAAhB,CANW;AAU1Bf,EAAAA,YAAY,EAAEQ,mBAAUC,KAAV,CAAgBS,qBAAYV,SAA5B;AAVY,CAA5B;eAaeZ,e","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {isEmpty, get, kebabCase} from 'lodash/fp';\nimport EmptySearchResult from '../../atom/empty-search-result';\nimport Search from '../../atom/input-search';\nimport SelectMultiple from '../../molecule/select-multiple';\nimport Card from '../../molecule/card';\nimport InputSwitch from '../../atom/input-switch';\nimport Loader from '../../atom/loader';\nimport style from './style.css';\n\nconst buildResultView = (courses, coursesSelectionAriaLabel, emptyMessages, isLoading) => {\n if (!isLoading && isEmpty(courses)) {\n return <EmptySearchResult {...emptyMessages} />;\n }\n\n const items = courses.map((card, index) => {\n const title = get('title', card);\n const type = get('type', card);\n return (\n <li className={style.cards} key={`card-${index}`} data-name={`${type}-${kebabCase(title)}`}>\n <Card {...card} />\n </li>\n );\n });\n\n return <ul aria-label={coursesSelectionAriaLabel}>{items}</ul>;\n};\n\nconst CourseSelection = props => {\n const {\n search,\n contentTypeFilter,\n courses,\n emptyMessages,\n isLoading = false,\n 'courses-selection-aria-label': coursesSelectionAriaLabel,\n switchButton\n } = props;\n\n const resultView = buildResultView(courses, coursesSelectionAriaLabel, emptyMessages, isLoading);\n\n return (\n <div className={style.container}>\n <div className={style.filters}>\n <div className={style.search}>\n <Search {...search} theme=\"coorpmanager\" />\n </div>\n <div className={style.contentFilter}>\n <SelectMultiple {...contentTypeFilter} />\n </div>\n <InputSwitch {...switchButton} />\n </div>\n <div className={style.cardsContainer} data-name={'courses-result'}>\n {isLoading ? (\n <div className={style.loader}>\n <Loader theme=\"coorpmanager\" />\n </div>\n ) : (\n resultView\n )}\n </div>\n </div>\n );\n};\n\nCourseSelection.propTypes = {\n search: PropTypes.shape(Search.PropTypes),\n isLoading: PropTypes.bool,\n contentTypeFilter: PropTypes.shape(SelectMultiple.PropTypes),\n courses: PropTypes.arrayOf(PropTypes.shape(Card.propTypes)),\n 'courses-selection-aria-label': PropTypes.string,\n emptyMessages: PropTypes.shape({\n firstMessage: PropTypes.string,\n secondMessage: PropTypes.string\n }),\n switchButton: PropTypes.shape(InputSwitch.PropTypes)\n};\n\nexport default CourseSelection;\n"],"file":"index.js"}
@@ -4,7 +4,6 @@
4
4
  @value cm_grey_900 from colors;
5
5
 
6
6
  .container {
7
- height: 100%;
8
7
  width: 100%;
9
8
  }
10
9
 
@@ -27,7 +26,6 @@
27
26
 
28
27
  .cardsContainer {
29
28
  margin: 24px 0 0 0;
30
- height: 100%;
31
29
  width: 100%;
32
30
  }
33
31
 
@@ -36,15 +34,8 @@
36
34
  margin: 0 16px 16px 0px;
37
35
  }
38
36
 
39
- .loaderContainer {
40
- width: 100%;
41
- height: 50vh;
42
- display: flex;
43
- align-items: center;
44
- justify-content: center;
45
- }
46
-
47
37
  .loader {
48
- height: 60px;
49
- width: 60px;
38
+ position: relative;
39
+ min-height: 50vh;
40
+ width: 100%;
50
41
  }
@@ -14,8 +14,6 @@ var _empty = _interopRequireDefault(require("./fixtures/empty"));
14
14
 
15
15
  var _filtered = _interopRequireDefault(require("./fixtures/filtered"));
16
16
 
17
- var _loading = _interopRequireDefault(require("./fixtures/loading"));
18
-
19
17
  var _sortedSelected = _interopRequireDefault(require("./fixtures/sorted-selected"));
20
18
 
21
19
  var _switchActivated = _interopRequireDefault(require("./fixtures/switch-activated"));
@@ -33,7 +31,6 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
33
31
  (0, _ava.default)('Organism › OrganismCourseSelection › Default › should be rendered', _renderComponent.default, _.default, _default.default);
34
32
  (0, _ava.default)('Organism › OrganismCourseSelection › Empty › should be rendered', _renderComponent.default, _.default, _empty.default);
35
33
  (0, _ava.default)('Organism › OrganismCourseSelection › Filtered › should be rendered', _renderComponent.default, _.default, _filtered.default);
36
- (0, _ava.default)('Organism › OrganismCourseSelection › Loading › should be rendered', _renderComponent.default, _.default, _loading.default);
37
34
  (0, _ava.default)('Organism › OrganismCourseSelection › SortedSelected › should be rendered', _renderComponent.default, _.default, _sortedSelected.default);
38
35
  (0, _ava.default)('Organism › OrganismCourseSelection › SwitchActivated › should be rendered', _renderComponent.default, _.default, _switchActivated.default);
39
36
  (0, _ava.default)('Organism › OrganismCourseSelection › UnsortedSelected › should be rendered', _renderComponent.default, _.default, _unsortedSelected.default);
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/organism/course-selection/test/fixtures.js"],"names":["t","pass","OrganismCourseSelection","propTypes","value","key","not","undefined","renderComponentMacro","fixtureDefault","fixtureEmpty","fixtureFiltered","fixtureLoading","fixtureSortedSelected","fixtureSwitchActivated","fixtureUnsortedSelected"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,kEAAL,EAAyEA,CAAC,IAAI;AAC5EA,EAAAA,CAAC,CAACC,IAAF;AACA,wBAAQC,UAAwBC,SAAhC,EAA2C,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACzDL,IAAAA,CAAC,CAACM,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,4DAA2DF,GAAI,mEAAxF;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,mEAAL,EAA0EG,wBAA1E,EAAgGN,SAAhG,EAAyHO,gBAAzH;AACA,kBAAK,iEAAL,EAAwED,wBAAxE,EAA8FN,SAA9F,EAAuHQ,cAAvH;AACA,kBAAK,oEAAL,EAA2EF,wBAA3E,EAAiGN,SAAjG,EAA0HS,iBAA1H;AACA,kBAAK,mEAAL,EAA0EH,wBAA1E,EAAgGN,SAAhG,EAAyHU,gBAAzH;AACA,kBAAK,0EAAL,EAAiFJ,wBAAjF,EAAuGN,SAAvG,EAAgIW,uBAAhI;AACA,kBAAK,2EAAL,EAAkFL,wBAAlF,EAAwGN,SAAxG,EAAiIY,wBAAjI;AACA,kBAAK,4EAAL,EAAmFN,wBAAnF,EAAyGN,SAAzG,EAAkIa,yBAAlI","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport OrganismCourseSelection from '..';\nimport fixtureDefault from './fixtures/default';\nimport fixtureEmpty from './fixtures/empty';\nimport fixtureFiltered from './fixtures/filtered';\nimport fixtureLoading from './fixtures/loading';\nimport fixtureSortedSelected from './fixtures/sorted-selected';\nimport fixtureSwitchActivated from './fixtures/switch-activated';\nimport fixtureUnsortedSelected from './fixtures/unsorted-selected';\n\ntest('Organism › OrganismCourseSelection > should have valid propTypes', t => {\n t.pass();\n forEach(OrganismCourseSelection.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Organism.OrganismCourseSelection.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Organism › OrganismCourseSelection › Default › should be rendered', renderComponentMacro, OrganismCourseSelection, fixtureDefault);\ntest('Organism › OrganismCourseSelection › Empty › should be rendered', renderComponentMacro, OrganismCourseSelection, fixtureEmpty);\ntest('Organism › OrganismCourseSelection › Filtered › should be rendered', renderComponentMacro, OrganismCourseSelection, fixtureFiltered);\ntest('Organism › OrganismCourseSelection › Loading › should be rendered', renderComponentMacro, OrganismCourseSelection, fixtureLoading);\ntest('Organism › OrganismCourseSelection › SortedSelected › should be rendered', renderComponentMacro, OrganismCourseSelection, fixtureSortedSelected);\ntest('Organism › OrganismCourseSelection › SwitchActivated › should be rendered', renderComponentMacro, OrganismCourseSelection, fixtureSwitchActivated);\ntest('Organism › OrganismCourseSelection › UnsortedSelected › should be rendered', renderComponentMacro, OrganismCourseSelection, fixtureUnsortedSelected);\n"],"file":"fixtures.js"}
1
+ {"version":3,"sources":["../../../../src/organism/course-selection/test/fixtures.js"],"names":["t","pass","OrganismCourseSelection","propTypes","value","key","not","undefined","renderComponentMacro","fixtureDefault","fixtureEmpty","fixtureFiltered","fixtureSortedSelected","fixtureSwitchActivated","fixtureUnsortedSelected"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,kEAAL,EAAyEA,CAAC,IAAI;AAC5EA,EAAAA,CAAC,CAACC,IAAF;AACA,wBAAQC,UAAwBC,SAAhC,EAA2C,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACzDL,IAAAA,CAAC,CAACM,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,4DAA2DF,GAAI,mEAAxF;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,mEAAL,EAA0EG,wBAA1E,EAAgGN,SAAhG,EAAyHO,gBAAzH;AACA,kBAAK,iEAAL,EAAwED,wBAAxE,EAA8FN,SAA9F,EAAuHQ,cAAvH;AACA,kBAAK,oEAAL,EAA2EF,wBAA3E,EAAiGN,SAAjG,EAA0HS,iBAA1H;AACA,kBAAK,0EAAL,EAAiFH,wBAAjF,EAAuGN,SAAvG,EAAgIU,uBAAhI;AACA,kBAAK,2EAAL,EAAkFJ,wBAAlF,EAAwGN,SAAxG,EAAiIW,wBAAjI;AACA,kBAAK,4EAAL,EAAmFL,wBAAnF,EAAyGN,SAAzG,EAAkIY,yBAAlI","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport OrganismCourseSelection from '..';\nimport fixtureDefault from './fixtures/default';\nimport fixtureEmpty from './fixtures/empty';\nimport fixtureFiltered from './fixtures/filtered';\nimport fixtureSortedSelected from './fixtures/sorted-selected';\nimport fixtureSwitchActivated from './fixtures/switch-activated';\nimport fixtureUnsortedSelected from './fixtures/unsorted-selected';\n\ntest('Organism › OrganismCourseSelection > should have valid propTypes', t => {\n t.pass();\n forEach(OrganismCourseSelection.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Organism.OrganismCourseSelection.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Organism › OrganismCourseSelection › Default › should be rendered', renderComponentMacro, OrganismCourseSelection, fixtureDefault);\ntest('Organism › OrganismCourseSelection › Empty › should be rendered', renderComponentMacro, OrganismCourseSelection, fixtureEmpty);\ntest('Organism › OrganismCourseSelection › Filtered › should be rendered', renderComponentMacro, OrganismCourseSelection, fixtureFiltered);\ntest('Organism › OrganismCourseSelection › SortedSelected › should be rendered', renderComponentMacro, OrganismCourseSelection, fixtureSortedSelected);\ntest('Organism › OrganismCourseSelection › SwitchActivated › should be rendered', renderComponentMacro, OrganismCourseSelection, fixtureSwitchActivated);\ntest('Organism › OrganismCourseSelection › UnsortedSelected › should be rendered', renderComponentMacro, OrganismCourseSelection, fixtureUnsortedSelected);\n"],"file":"fixtures.js"}
@@ -83,9 +83,8 @@ const SearchAndChipsResults = props => {
83
83
  })))), /*#__PURE__*/_react.default.createElement("div", {
84
84
  className: _style.default.resultContainer
85
85
  }, isLoading ? /*#__PURE__*/_react.default.createElement("div", {
86
- className: _style.default.loaderContainer
86
+ className: _style.default.loader
87
87
  }, /*#__PURE__*/_react.default.createElement(_loader.default, {
88
- className: _style.default.loader,
89
88
  theme: "coorpmanager"
90
89
  })) : resultView));
91
90
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/organism/search-and-chips-results/index.js"],"names":["buildResultView","results","resultsAriaLabel","emptyMessages","isLoading","items","map","result","index","style","SearchAndChipsResults","props","search","selectAllButton","onClick","label","disabled","ariaLabel","resultView","buttonProps","type","icon","position","container","header","button","resultContainer","loaderContainer","loader","propTypes","PropTypes","shape","string","func","bool","Search","arrayOf","Chips","firstMessage","secondMessage"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;AAEA,MAAMA,eAAe,GAAG,CAACC,OAAD,EAAUC,gBAAV,EAA4BC,aAA5B,EAA2CC,SAA3C,KAAyD;AAC/E,MAAI,CAACA,SAAD,IAAc,uBAAQH,OAAR,CAAlB,EAAoC;AAClC,wBAAO,6BAAC,0BAAD,EAAuBE,aAAvB,CAAP;AACD;;AAED,QAAME,KAAK,GAAGJ,OAAO,CAACK,GAAR,CAAY,CAACC,MAAD,EAASC,KAAT,KAAmB;AAC3C,wBACE;AAAI,MAAA,SAAS,EAAEC,eAAMF,MAArB;AAA6B,MAAA,GAAG,EAAG,UAASC,KAAM,EAAlD;AAAqD,mBAAY,UAASA,KAAM;AAAhF,oBACE,6BAAC,cAAD,EAAWD,MAAX,CADF,CADF;AAKD,GANa,CAAd;AAQA,sBAAO;AAAI,kBAAYL;AAAhB,KAAmCG,KAAnC,CAAP;AACD,CAdD;;AAgBA,MAAMK,qBAAqB,GAAGC,KAAK,IAAI;AACrC,QAAM;AACJC,IAAAA,MADI;AAEJC,IAAAA,eAFI;AAGJZ,IAAAA,OAHI;AAI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AAC/BhB,IAAAA,KAAK,EAAEe,mBAAUE,MADc;AAE/BlB,IAAAA,OAAO,EAAEgB,mBAAUG,IAFY;AAG/BjB,IAAAA,QAAQ,EAAEc,mBAAUI,IAHW;AAI/B,kBAAcJ,mBAAUE;AAJO,GAAhB,CADe;AAOhC5B,EAAAA,SAAS,EAAE0B,mBAAUI,IAPW;AAQhCtB,EAAAA,MAAM,EAAEkB,mBAAUC,KAAV,CAAgBI,qBAAOL,SAAvB,CARwB;AAShC7B,EAAAA,OAAO,EAAE6B,mBAAUM,OAAV,CAAkBN,mBAAUC,KAAV,CAAgBM,eAAMR,SAAtB,CAAlB,CATuB;AAUhC,wBAAsBC,mBAAUE,MAVA;AAWhC7B,EAAAA,aAAa,EAAE2B,mBAAUC,KAAV,CAAgB;AAC7BO,IAAAA,YAAY,EAAER,mBAAUE,MADK;AAE7BO,IAAAA,aAAa,EAAET,mBAAUE;AAFI,GAAhB;AAXiB,CAAlC;eAiBetB,qB","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {isEmpty} from 'lodash/fp';\nimport EmptySearchResult from '../../atom/empty-search-result';\nimport Search from '../../atom/input-search';\nimport ButtonLink from '../../atom/button-link';\nimport Chips from '../../atom/chips';\nimport Loader from '../../atom/loader';\nimport style from './style.css';\n\nconst buildResultView = (results, resultsAriaLabel, emptyMessages, isLoading) => {\n if (!isLoading && isEmpty(results)) {\n return <EmptySearchResult {...emptyMessages} />;\n }\n\n const items = results.map((result, index) => {\n return (\n <li className={style.result} key={`result-${index}`} data-name={`result-${index}`}>\n <Chips {...result} />\n </li>\n );\n });\n\n return <ul aria-label={resultsAriaLabel}>{items}</ul>;\n};\n\nconst SearchAndChipsResults = props => {\n const {\n search,\n selectAllButton,\n results,\n emptyMessages,\n isLoading = false,\n 'results-aria-label': resultsAriaLabel\n } = props;\n\n const {onClick, label, disabled = false, 'aria-label': ariaLabel} = selectAllButton;\n const resultView = buildResultView(results, resultsAriaLabel, emptyMessages, isLoading);\n const buttonProps = {\n type: 'secondary',\n label,\n 'aria-label': ariaLabel,\n 'data-name': `select-all-button`,\n icon: {\n position: 'right',\n type: 'add'\n },\n onClick,\n disabled\n };\n\n return (\n <div className={style.container}>\n <div className={style.header}>\n <div className={style.button}>\n <ButtonLink {...buttonProps} />\n </div>\n <div className={style.search}>\n <Search {...search} theme=\"coorpmanager\" />\n </div>\n </div>\n <div className={style.resultContainer}>\n {isLoading ? (\n <div className={style.loaderContainer}>\n <Loader className={style.loader} theme=\"coorpmanager\" />\n </div>\n ) : (\n resultView\n )}\n </div>\n </div>\n );\n};\n\nSearchAndChipsResults.propTypes = {\n selectAllButton: PropTypes.shape({\n label: PropTypes.string,\n onClick: PropTypes.func,\n disabled: PropTypes.bool,\n 'aria-label': PropTypes.string\n }),\n isLoading: PropTypes.bool,\n search: PropTypes.shape(Search.PropTypes),\n results: PropTypes.arrayOf(PropTypes.shape(Chips.propTypes)),\n 'results-aria-label': PropTypes.string,\n emptyMessages: PropTypes.shape({\n firstMessage: PropTypes.string,\n secondMessage: PropTypes.string\n })\n};\n\nexport default SearchAndChipsResults;\n"],"file":"index.js"}
1
+ {"version":3,"sources":["../../../src/organism/search-and-chips-results/index.js"],"names":["buildResultView","results","resultsAriaLabel","emptyMessages","isLoading","items","map","result","index","style","SearchAndChipsResults","props","search","selectAllButton","onClick","label","disabled","ariaLabel","resultView","buttonProps","type","icon","position","container","header","button","resultContainer","loader","propTypes","PropTypes","shape","string","func","bool","Search","arrayOf","Chips","firstMessage","secondMessage"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;AAEA,MAAMA,eAAe,GAAG,CAACC,OAAD,EAAUC,gBAAV,EAA4BC,aAA5B,EAA2CC,SAA3C,KAAyD;AAC/E,MAAI,CAACA,SAAD,IAAc,uBAAQH,OAAR,CAAlB,EAAoC;AAClC,wBAAO,6BAAC,0BAAD,EAAuBE,aAAvB,CAAP;AACD;;AAED,QAAME,KAAK,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V,eAAMG;AAAtB,kBACE,6BAAC,oBAAD,eAAYA,MAAZ;AAAoB,IAAA,KAAK,EAAC;AAA1B,KADF,CAJF,CADF,eASE;AAAK,IAAA,SAAS,EAAEH,eAAMiB;AAAtB,KACGtB,SAAS,gBACR;AAAK,IAAA,SAAS,EAAEK,eAAMkB;AAAtB,kBACE,6BAAC,eAAD;AAAQ,IAAA,KAAK,EAAC;AAAd,IADF,CADQ,GAKRT,UANJ,CATF,CADF;AAqBD,CA9CD;;AAgDAR,qBAAqB,CAACkB,SAAtB,2CAAkC;AAChCf,EAAAA,eAAe,EAAEgB,mBAAUC,KAAV,CAAgB;AAC/Bf,IAAAA,KAAK,EAAEc,mBAAUE,MADc;AAE/BjB,IAAAA,OAAO,EAAEe,mBAAUG,IAFY;AAG/BhB,IAAAA,QAAQ,EAAEa,mBAAUI,IAHW;AAI/B,kBAAcJ,mBAAUE;AAJO,GAAhB,CADe;AAOhC3B,EAAAA,SAAS,EAAEyB,mBAAUI,IAPW;AAQhCrB,EAAAA,MAAM,EAAEiB,mBAAUC,KAAV,CAAgBI,qBAAOL,SAAvB,CARwB;AAShC5B,EAAAA,OAAO,EAAE4B,mBAAUM,OAAV,CAAkBN,mBAAUC,KAAV,CAAgBM,eAAMR,SAAtB,CAAlB,CATuB;AAUhC,wBAAsBC,mBAAUE,MAVA;AAWhC5B,EAAAA,aAAa,EAAE0B,mBAAUC,KAAV,CAAgB;AAC7BO,IAAAA,YAAY,EAAER,mBAAUE,MADK;AAE7BO,IAAAA,aAAa,EAAET,mBAAUE;AAFI,GAAhB;AAXiB,CAAlC;eAiBerB,qB","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {isEmpty} from 'lodash/fp';\nimport EmptySearchResult from '../../atom/empty-search-result';\nimport Search from '../../atom/input-search';\nimport ButtonLink from '../../atom/button-link';\nimport Chips from '../../atom/chips';\nimport Loader from '../../atom/loader';\nimport style from './style.css';\n\nconst buildResultView = (results, resultsAriaLabel, emptyMessages, isLoading) => {\n if (!isLoading && isEmpty(results)) {\n return <EmptySearchResult {...emptyMessages} />;\n }\n\n const items = results.map((result, index) => {\n return (\n <li className={style.result} key={`result-${index}`} data-name={`result-${index}`}>\n <Chips {...result} />\n </li>\n );\n });\n\n return <ul aria-label={resultsAriaLabel}>{items}</ul>;\n};\n\nconst SearchAndChipsResults = props => {\n const {\n search,\n selectAllButton,\n results,\n emptyMessages,\n isLoading = false,\n 'results-aria-label': resultsAriaLabel\n } = props;\n\n const {onClick, label, disabled = false, 'aria-label': ariaLabel} = selectAllButton;\n const resultView = buildResultView(results, resultsAriaLabel, emptyMessages, isLoading);\n const buttonProps = {\n type: 'secondary',\n label,\n 'aria-label': ariaLabel,\n 'data-name': `select-all-button`,\n icon: {\n position: 'right',\n type: 'add'\n },\n onClick,\n disabled\n };\n\n return (\n <div className={style.container}>\n <div className={style.header}>\n <div className={style.button}>\n <ButtonLink {...buttonProps} />\n </div>\n <div className={style.search}>\n <Search {...search} theme=\"coorpmanager\" />\n </div>\n </div>\n <div className={style.resultContainer}>\n {isLoading ? (\n <div className={style.loader}>\n <Loader theme=\"coorpmanager\" />\n </div>\n ) : (\n resultView\n )}\n </div>\n </div>\n );\n};\n\nSearchAndChipsResults.propTypes = {\n selectAllButton: PropTypes.shape({\n label: PropTypes.string,\n onClick: PropTypes.func,\n disabled: PropTypes.bool,\n 'aria-label': PropTypes.string\n }),\n isLoading: PropTypes.bool,\n search: PropTypes.shape(Search.PropTypes),\n results: PropTypes.arrayOf(PropTypes.shape(Chips.propTypes)),\n 'results-aria-label': PropTypes.string,\n emptyMessages: PropTypes.shape({\n firstMessage: PropTypes.string,\n secondMessage: PropTypes.string\n })\n};\n\nexport default SearchAndChipsResults;\n"],"file":"index.js"}
@@ -34,15 +34,8 @@
34
34
  margin: 0 16px 16px 0px;
35
35
  }
36
36
 
37
- .loaderContainer {
37
+ .loader {
38
+ position: relative;
39
+ min-height: 50vh;
38
40
  width: 100%;
39
- height: 50vh;
40
- display: flex;
41
- align-items: center;
42
- justify-content: center;
43
41
  }
44
-
45
- .loader {
46
- height: 60px;
47
- width: 60px;
48
- }
@@ -14,8 +14,6 @@ var _empty = _interopRequireDefault(require("./fixtures/empty"));
14
14
 
15
15
  var _filtered = _interopRequireDefault(require("./fixtures/filtered"));
16
16
 
17
- var _loading = _interopRequireDefault(require("./fixtures/loading"));
18
-
19
17
  var _sortedSelected = _interopRequireDefault(require("./fixtures/sorted-selected"));
20
18
 
21
19
  var _unsortedSelected = _interopRequireDefault(require("./fixtures/unsorted-selected"));
@@ -31,7 +29,6 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
31
29
  (0, _ava.default)('Organism › OrganismSearchAndChipsResults › Default › should be rendered', _renderComponent.default, _.default, _default.default);
32
30
  (0, _ava.default)('Organism › OrganismSearchAndChipsResults › Empty › should be rendered', _renderComponent.default, _.default, _empty.default);
33
31
  (0, _ava.default)('Organism › OrganismSearchAndChipsResults › Filtered › should be rendered', _renderComponent.default, _.default, _filtered.default);
34
- (0, _ava.default)('Organism › OrganismSearchAndChipsResults › Loading › should be rendered', _renderComponent.default, _.default, _loading.default);
35
32
  (0, _ava.default)('Organism › OrganismSearchAndChipsResults › SortedSelected › should be rendered', _renderComponent.default, _.default, _sortedSelected.default);
36
33
  (0, _ava.default)('Organism › OrganismSearchAndChipsResults › UnsortedSelected › should be rendered', _renderComponent.default, _.default, _unsortedSelected.default);
37
34
  //# sourceMappingURL=fixtures.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/organism/search-and-chips-results/test/fixtures.js"],"names":["t","pass","OrganismSearchAndChipsResults","propTypes","value","key","not","undefined","renderComponentMacro","fixtureDefault","fixtureEmpty","fixtureFiltered","fixtureLoading","fixtureSortedSelected","fixtureUnsortedSelected"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,wEAAL,EAA+EA,CAAC,IAAI;AAClFA,EAAAA,CAAC,CAACC,IAAF;AACA,wBAAQC,UAA8BC,SAAtC,EAAiD,CAACC,KAAD,EAAQC,GAAR,KAAgB;AAC/DL,IAAAA,CAAC,CAACM,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,kEAAiEF,GAAI,mEAA9F;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,yEAAL,EAAgFG,wBAAhF,EAAsGN,SAAtG,EAAqIO,gBAArI;AACA,kBAAK,uEAAL,EAA8ED,wBAA9E,EAAoGN,SAApG,EAAmIQ,cAAnI;AACA,kBAAK,0EAAL,EAAiFF,wBAAjF,EAAuGN,SAAvG,EAAsIS,iBAAtI;AACA,kBAAK,yEAAL,EAAgFH,wBAAhF,EAAsGN,SAAtG,EAAqIU,gBAArI;AACA,kBAAK,gFAAL,EAAuFJ,wBAAvF,EAA6GN,SAA7G,EAA4IW,uBAA5I;AACA,kBAAK,kFAAL,EAAyFL,wBAAzF,EAA+GN,SAA/G,EAA8IY,yBAA9I","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport OrganismSearchAndChipsResults from '..';\nimport fixtureDefault from './fixtures/default';\nimport fixtureEmpty from './fixtures/empty';\nimport fixtureFiltered from './fixtures/filtered';\nimport fixtureLoading from './fixtures/loading';\nimport fixtureSortedSelected from './fixtures/sorted-selected';\nimport fixtureUnsortedSelected from './fixtures/unsorted-selected';\n\ntest('Organism › OrganismSearchAndChipsResults > should have valid propTypes', t => {\n t.pass();\n forEach(OrganismSearchAndChipsResults.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Organism.OrganismSearchAndChipsResults.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Organism › OrganismSearchAndChipsResults › Default › should be rendered', renderComponentMacro, OrganismSearchAndChipsResults, fixtureDefault);\ntest('Organism › OrganismSearchAndChipsResults › Empty › should be rendered', renderComponentMacro, OrganismSearchAndChipsResults, fixtureEmpty);\ntest('Organism › OrganismSearchAndChipsResults › Filtered › should be rendered', renderComponentMacro, OrganismSearchAndChipsResults, fixtureFiltered);\ntest('Organism › OrganismSearchAndChipsResults › Loading › should be rendered', renderComponentMacro, OrganismSearchAndChipsResults, fixtureLoading);\ntest('Organism › OrganismSearchAndChipsResults › SortedSelected › should be rendered', renderComponentMacro, OrganismSearchAndChipsResults, fixtureSortedSelected);\ntest('Organism › OrganismSearchAndChipsResults › UnsortedSelected › should be rendered', renderComponentMacro, OrganismSearchAndChipsResults, fixtureUnsortedSelected);\n"],"file":"fixtures.js"}
1
+ {"version":3,"sources":["../../../../src/organism/search-and-chips-results/test/fixtures.js"],"names":["t","pass","OrganismSearchAndChipsResults","propTypes","value","key","not","undefined","renderComponentMacro","fixtureDefault","fixtureEmpty","fixtureFiltered","fixtureSortedSelected","fixtureUnsortedSelected"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,wEAAL,EAA+EA,CAAC,IAAI;AAClFA,EAAAA,CAAC,CAACC,IAAF;AACA,wBAAQC,UAA8BC,SAAtC,EAAiD,CAACC,KAAD,EAAQC,GAAR,KAAgB;AAC/DL,IAAAA,CAAC,CAACM,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,kEAAiEF,GAAI,mEAA9F;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,yEAAL,EAAgFG,wBAAhF,EAAsGN,SAAtG,EAAqIO,gBAArI;AACA,kBAAK,uEAAL,EAA8ED,wBAA9E,EAAoGN,SAApG,EAAmIQ,cAAnI;AACA,kBAAK,0EAAL,EAAiFF,wBAAjF,EAAuGN,SAAvG,EAAsIS,iBAAtI;AACA,kBAAK,gFAAL,EAAuFH,wBAAvF,EAA6GN,SAA7G,EAA4IU,uBAA5I;AACA,kBAAK,kFAAL,EAAyFJ,wBAAzF,EAA+GN,SAA/G,EAA8IW,yBAA9I","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport OrganismSearchAndChipsResults from '..';\nimport fixtureDefault from './fixtures/default';\nimport fixtureEmpty from './fixtures/empty';\nimport fixtureFiltered from './fixtures/filtered';\nimport fixtureSortedSelected from './fixtures/sorted-selected';\nimport fixtureUnsortedSelected from './fixtures/unsorted-selected';\n\ntest('Organism › OrganismSearchAndChipsResults > should have valid propTypes', t => {\n t.pass();\n forEach(OrganismSearchAndChipsResults.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Organism.OrganismSearchAndChipsResults.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Organism › OrganismSearchAndChipsResults › Default › should be rendered', renderComponentMacro, OrganismSearchAndChipsResults, fixtureDefault);\ntest('Organism › OrganismSearchAndChipsResults › Empty › should be rendered', renderComponentMacro, OrganismSearchAndChipsResults, fixtureEmpty);\ntest('Organism › OrganismSearchAndChipsResults › Filtered › should be rendered', renderComponentMacro, OrganismSearchAndChipsResults, fixtureFiltered);\ntest('Organism › OrganismSearchAndChipsResults › SortedSelected › should be rendered', renderComponentMacro, OrganismSearchAndChipsResults, fixtureSortedSelected);\ntest('Organism › OrganismSearchAndChipsResults › UnsortedSelected › should be rendered', renderComponentMacro, OrganismSearchAndChipsResults, fixtureUnsortedSelected);\n"],"file":"fixtures.js"}
@@ -146,10 +146,7 @@ const buildTabs = items => {
146
146
 
147
147
  const buildContentView = content => {
148
148
  if (!content) {
149
- return /*#__PURE__*/_react.default.createElement("div", {
150
- className: _style.default.loaderContainer
151
- }, /*#__PURE__*/_react.default.createElement(_loader.default, {
152
- className: _style.default.loader,
149
+ return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_loader.default, {
153
150
  theme: "coorpmanager"
154
151
  }));
155
152
  }
@@ -205,7 +202,7 @@ const BrandUpdate = props => {
205
202
  const contentView = buildContentView(content);
206
203
  const detailsView = buildDetailsView(details);
207
204
  const popinView = buildPopin(popin);
208
- const contentStyle = (0, _classnames.default)([_style.default.content, !(0, _isEmpty.default)(notifications) && _style.default.contentWithNotifications]);
205
+ const contentStyle = (0, _classnames.default)([_style.default.content, !(0, _isEmpty.default)(notifications) && _style.default.contentWithNotifications, (0, _isEmpty.default)(content) && _style.default.loader]);
209
206
  return /*#__PURE__*/_react.default.createElement("div", {
210
207
  className: _style.default.container
211
208
  }, /*#__PURE__*/_react.default.createElement("div", {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/template/back-office/brand-update/index.js"],"names":["getStyle","isSelected","style","selectedElement","unselectedElement","subTabsView","_subTabs","map","convert","cap","subTab","_index","title","type","selected","buildLeftNavigation","logo","items","onItemClick","formattedTabs","key","href","index","children","iconType","formattedTabsViews","tab","tabs","navigation","buildNotifications","notifications","notificationsList","notification","buildHeader","header","buildPopin","popin","buildTabs","selectedTab","e","showTabs","subTabs","undefined","buildContentView","content","loaderContainer","loader","buildDetailsView","details","BrandUpdate","props","leftNavigation","notificationsView","headerView","tabsView","contentView","detailsView","popinView","contentStyle","contentWithNotifications","container","left","contentWrapper","headerSticky","defaultProps","propTypes","PropTypes","arrayOf","shape","Banner","Header","string","isRequired","bool","oneOfType","BrandForm","oneOf","BrandTable","BrandUpload","BrandAnalytics","BrandDashboard","WizardContents","ListItems","CmPopin","func"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;AAEA,MAAMA,QAAQ,GAAGC,UAAU,IAAKA,UAAU,GAAGC,eAAMC,eAAT,GAA2BD,eAAME,iBAA3E;;AAEA,MAAMC,WAAW,GAAG,CAACC,QAAQ,GAAG,EAAZ,KAClBC,aAAIC,OAAJ,CAAY;AAACC,EAAAA,GAAG,EAAE;AAAN,CAAZ,EAA0B,CAACC,MAAD,EAASC,MAAT,kBACxB;AAAK,EAAA,G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,CAAC,cAAD,CAAhB;AAHR,KA/B2B,CAApB,CAhCa;AAqEtBxC,EAAAA,KAAK,EAAE8B,mBAAUE,KAAV,cAAoBe,iBAAQlB,SAA5B,EArEe;AAsEtBjB,EAAAA,OAAO,EAAEkB,mBAAUE,KAAV,uBACJS,oBAAWZ,SADP;AAEP7C,IAAAA,GAAG,EAAE8C,mBAAUK,MAFR;AAGP1D,IAAAA,IAAI,EAAEqD,mBAAUU,KAAV,CAAgB,CAAC,MAAD,CAAhB;AAHC,KAtEa;AA2EtB1D,EAAAA,WAAW,EAAEgD,mBAAUkB;AA3ED,CAAxB;eA8EenC,W","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport map from 'lodash/fp/map';\nimport pipe from 'lodash/fp/pipe';\nimport get from 'lodash/fp/get';\nimport isEmpty from 'lodash/fp/isEmpty';\nimport find from 'lodash/fp/find';\nimport classNames from 'classnames';\nimport BrandTabs from '../../../molecule/brand-tabs';\nimport {IconLinkItem, LinkItem} from '../../../organism/sidebar';\nimport BrandForm from '../../../organism/brand-form';\nimport BrandTable from '../../../organism/brand-table';\nimport BrandUpload from '../../../organism/brand-upload';\nimport BrandAnalytics from '../../../organism/brand-analytics';\nimport BrandDashboard from '../../../organism/brand-dashboard';\nimport WizardContents from '../../../organism/wizard-contents';\nimport ListItems from '../../../organism/list-items';\nimport Banner from '../../../molecule/banner';\nimport Header from '../../../organism/setup-header';\nimport Loader from '../../../atom/loader';\nimport Accordion from '../../../organism/accordion/coorp-manager';\nimport CmPopin from '../../../molecule/cm-popin';\nimport style from './style.css';\n\nconst getStyle = isSelected => (isSelected ? style.selectedElement : style.unselectedElement);\n\nconst subTabsView = (_subTabs = []) =>\n map.convert({cap: false})((subTab, _index) => (\n <div key={subTab.title}>\n {subTab.type === 'iconLink' ? (\n <IconLinkItem\n {...subTab}\n styles={getStyle(subTab.selected)}\n uppercase={false}\n target={'_blank'}\n />\n ) : (\n <LinkItem {...subTab} styles={getStyle(subTab.selected)} uppercase={false} />\n )}\n </div>\n ))(_subTabs);\n\n// TODO: this fonction should be replaced by a molecule to avoid this file to be unreadable\nconst buildLeftNavigation = (logo, items, onItemClick) => {\n const formattedTabs = items.map(({key, title, href, selected, type = 'simpleTab'}, index) => ({\n title,\n selected,\n type,\n href,\n index,\n children: [],\n iconType: key || 'arrow'\n }));\n\n const formattedTabsViews = map(tab => (\n <div key={tab.title} className={style.subTabsView}>\n {subTabsView(tab.tabs)}\n </div>\n ))(items);\n\n return (\n <div className={style.navigation}>\n <div className={style.logo}>\n <a href=\"/\">\n <img src={logo} />\n </a>\n </div>\n <Accordion tabProps={formattedTabs} theme={'setup'} onClick={onItemClick}>\n {formattedTabsViews}\n </Accordion>\n </div>\n );\n};\n\nconst buildNotifications = notifications => {\n if (isEmpty(notifications)) {\n return null;\n }\n\n const notificationsList = notifications.map((notification, index) => {\n return (\n <div className={style.notification} key={index}>\n <Banner {...notification} />\n </div>\n );\n });\n return <div className={style.notifications}>{notificationsList}</div>;\n};\n\nconst buildHeader = header => {\n return (\n <div className={style.header}>\n <Header {...header} />\n </div>\n );\n};\n\nconst buildPopin = popin => {\n return popin ? (\n <div className={style.popin}>\n <CmPopin {...popin} />\n </div>\n ) : null;\n};\n\nconst buildTabs = items => {\n const selectedTab = pipe(\n find(e => e.selected),\n get('tabs'),\n find(e => e.selected)\n )(items);\n\n const showTabs = selectedTab ? find(e => e.selected, selectedTab.subTabs) : undefined;\n if (!showTabs) return null;\n return (\n <div className={style.tabs}>\n <BrandTabs type=\"light\" tabs={selectedTab.subTabs} />\n </div>\n );\n};\n\nconst buildContentView = content => {\n if (!content) {\n return (\n <div className={style.loaderContainer}>\n <Loader className={style.loader} theme=\"coorpmanager\" />\n </div>\n );\n }\n\n const {type} = content;\n switch (type) {\n case 'form':\n return <BrandForm {...content} />;\n case 'list':\n return <BrandTable {...content} />;\n case 'upload':\n return <BrandUpload {...content} />;\n case 'analytics-dashboards':\n return <BrandAnalytics {...content} />;\n case 'list-content':\n return <ListItems {...content} />;\n case 'home':\n return <BrandDashboard {...content} />;\n case 'wizard':\n return <WizardContents {...content} />;\n }\n};\n\nconst buildDetailsView = details => {\n if (!details) return;\n return <BrandTable {...details} />;\n};\n\nconst BrandUpdate = props => {\n const {notifications, header, items, content, details, popin, onItemClick} = props;\n const logo = 'https://static.coorpacademy.com/logo/coorp-manager.svg';\n\n const leftNavigation = buildLeftNavigation(logo, items, onItemClick);\n const notificationsView = buildNotifications(notifications);\n const headerView = buildHeader(header, notifications);\n const tabsView = buildTabs(items);\n const contentView = buildContentView(content);\n const detailsView = buildDetailsView(details);\n const popinView = buildPopin(popin);\n\n const contentStyle = classNames([\n style.content,\n !isEmpty(notifications) && style.contentWithNotifications,\n ]);\n\n return (\n <div className={style.container}>\n <div className={style.left}>{leftNavigation}</div>\n <div className={style.contentWrapper}>\n <div className={style.headerSticky}>{headerView}</div>\n <div className={contentStyle}>\n {notificationsView}\n {tabsView}\n {contentView}\n {detailsView}\n </div>\n </div>\n {popinView}\n </div>\n );\n};\n\nBrandUpdate.defaultProps = {\n notifications: []\n};\n\nBrandUpdate.propTypes = {\n notifications: PropTypes.arrayOf(\n PropTypes.shape({\n ...Banner.propTypes\n })\n ),\n header: PropTypes.shape({...Header.propTypes}),\n items: PropTypes.arrayOf(\n PropTypes.shape({\n key: PropTypes.string,\n title: PropTypes.string.isRequired,\n href: PropTypes.string.isRequired,\n selected: PropTypes.bool.isRequired,\n type: PropTypes.string,\n tabs: PropTypes.arrayOf(\n PropTypes.shape({\n title: PropTypes.string.isRequired,\n href: PropTypes.string.isRequired,\n selected: PropTypes.bool.isRequired,\n type: PropTypes.string,\n subTabs: PropTypes.arrayOf(\n PropTypes.shape({\n title: PropTypes.string.isRequired,\n href: PropTypes.string.isRequired,\n selected: PropTypes.bool.isRequired,\n type: PropTypes.string\n })\n )\n })\n )\n })\n ).isRequired,\n content: PropTypes.oneOfType([\n PropTypes.shape({\n ...BrandForm.propTypes,\n key: PropTypes.string,\n type: PropTypes.oneOf(['form'])\n }),\n PropTypes.shape({\n ...BrandTable.propTypes,\n key: PropTypes.string,\n type: PropTypes.oneOf(['list'])\n }),\n PropTypes.shape({\n ...BrandUpload.propTypes,\n key: PropTypes.string,\n type: PropTypes.oneOf(['upload'])\n }),\n PropTypes.shape({\n ...BrandAnalytics.propTypes,\n key: PropTypes.string,\n type: PropTypes.oneOf(['analytics-dashboards'])\n }),\n PropTypes.shape({\n ...BrandDashboard.propTypes,\n key: PropTypes.string,\n type: PropTypes.oneOf(['home'])\n }),\n PropTypes.shape({\n ...WizardContents.propTypes,\n key: PropTypes.string,\n type: PropTypes.oneOf(['wizard'])\n }),\n PropTypes.shape({\n ...ListItems.propTypes,\n key: PropTypes.string,\n type: PropTypes.oneOf(['list-content'])\n })\n ]),\n popin: PropTypes.shape({...CmPopin.propTypes}),\n details: PropTypes.shape({\n ...BrandTable.propTypes,\n key: PropTypes.string,\n type: PropTypes.oneOf(['list'])\n }),\n onItemClick: PropTypes.func\n};\n\nexport default BrandUpdate;\n"],"file":"index.js"}
1
+ {"version":3,"sources":["../../../../src/template/back-office/brand-update/index.js"],"names":["getStyle","isSelected","style","selectedElement","unselectedElement","subTabsView","_subTabs","map","convert","cap","subTab","_index","title","type","selected","buildLeftNavigation","logo","items","onItemClick","formattedTabs","key","href","index","children","iconType","formattedTabsViews","tab","tabs","navigation","buildNotifications","notifications","notificationsList","notification","buildHeader","header","buildPopin","popin","buildTabs","selectedTab","e","showTabs","subTabs","undefined","buildContentView","content","buildDetailsView","details","BrandUpdate","props","leftNavigation","notificationsView","headerView","tabsView","contentView","detailsView","popinView","contentStyle","contentWithNotifications","loader","container","left","contentWrapper","headerSticky","defaultProps","propTypes","PropTypes","arrayOf","shape","Banner","Header","string","isRequired","bool","oneOfType","BrandForm","oneOf","BrandTable","BrandUpload","BrandAnalytics","BrandDashboard","WizardContents","ListItems","CmPopin","func"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;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BAAUE,KAAV,uBACKa,wBAAehB,SADpB;AAEE5C,IAAAA,GAAG,EAAE6C,mBAAUK,MAFjB;AAGEzD,IAAAA,IAAI,EAAEoD,mBAAUU,KAAV,CAAgB,CAAC,QAAD,CAAhB;AAHR,KA1B2B,EA+B3BV,mBAAUE,KAAV,uBACKc,mBAAUjB,SADf;AAEE5C,IAAAA,GAAG,EAAE6C,mBAAUK,MAFjB;AAGEzD,IAAAA,IAAI,EAAEoD,mBAAUU,KAAV,CAAgB,CAAC,cAAD,CAAhB;AAHR,KA/B2B,CAApB,CAhCa;AAqEtBvC,EAAAA,KAAK,EAAE6B,mBAAUE,KAAV,cAAoBe,iBAAQlB,SAA5B,EArEe;AAsEtBlB,EAAAA,OAAO,EAAEmB,mBAAUE,KAAV,uBACJS,oBAAWZ,SADP;AAEP5C,IAAAA,GAAG,EAAE6C,mBAAUK,MAFR;AAGPzD,IAAAA,IAAI,EAAEoD,mBAAUU,KAAV,CAAgB,CAAC,MAAD,CAAhB;AAHC,KAtEa;AA2EtBzD,EAAAA,WAAW,EAAE+C,mBAAUkB;AA3ED,CAAxB;eA8EepC,W","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport map from 'lodash/fp/map';\nimport pipe from 'lodash/fp/pipe';\nimport get from 'lodash/fp/get';\nimport isEmpty from 'lodash/fp/isEmpty';\nimport find from 'lodash/fp/find';\nimport classNames from 'classnames';\nimport BrandTabs from '../../../molecule/brand-tabs';\nimport {IconLinkItem, LinkItem} from '../../../organism/sidebar';\nimport BrandForm from '../../../organism/brand-form';\nimport BrandTable from '../../../organism/brand-table';\nimport BrandUpload from '../../../organism/brand-upload';\nimport BrandAnalytics from '../../../organism/brand-analytics';\nimport BrandDashboard from '../../../organism/brand-dashboard';\nimport WizardContents from '../../../organism/wizard-contents';\nimport ListItems from '../../../organism/list-items';\nimport Banner from '../../../molecule/banner';\nimport Header from '../../../organism/setup-header';\nimport Loader from '../../../atom/loader';\nimport Accordion from '../../../organism/accordion/coorp-manager';\nimport CmPopin from '../../../molecule/cm-popin';\nimport style from './style.css';\n\nconst getStyle = isSelected => (isSelected ? style.selectedElement : style.unselectedElement);\n\nconst subTabsView = (_subTabs = []) =>\n map.convert({cap: false})((subTab, _index) => (\n <div key={subTab.title}>\n {subTab.type === 'iconLink' ? (\n <IconLinkItem\n {...subTab}\n styles={getStyle(subTab.selected)}\n uppercase={false}\n target={'_blank'}\n />\n ) : (\n <LinkItem {...subTab} styles={getStyle(subTab.selected)} uppercase={false} />\n )}\n </div>\n ))(_subTabs);\n\n// TODO: this fonction should be replaced by a molecule to avoid this file to be unreadable\nconst buildLeftNavigation = (logo, items, onItemClick) => {\n const formattedTabs = items.map(({key, title, href, selected, type = 'simpleTab'}, index) => ({\n title,\n selected,\n type,\n href,\n index,\n children: [],\n iconType: key || 'arrow'\n }));\n\n const formattedTabsViews = map(tab => (\n <div key={tab.title} className={style.subTabsView}>\n {subTabsView(tab.tabs)}\n </div>\n ))(items);\n\n return (\n <div className={style.navigation}>\n <div className={style.logo}>\n <a href=\"/\">\n <img src={logo} />\n </a>\n </div>\n <Accordion tabProps={formattedTabs} theme={'setup'} onClick={onItemClick}>\n {formattedTabsViews}\n </Accordion>\n </div>\n );\n};\n\nconst buildNotifications = notifications => {\n if (isEmpty(notifications)) {\n return null;\n }\n\n const notificationsList = notifications.map((notification, index) => {\n return (\n <div className={style.notification} key={index}>\n <Banner {...notification} />\n </div>\n );\n });\n return <div className={style.notifications}>{notificationsList}</div>;\n};\n\nconst buildHeader = header => {\n return (\n <div className={style.header}>\n <Header {...header} />\n </div>\n );\n};\n\nconst buildPopin = popin => {\n return popin ? (\n <div className={style.popin}>\n <CmPopin {...popin} />\n </div>\n ) : null;\n};\n\nconst buildTabs = items => {\n const selectedTab = pipe(\n find(e => e.selected),\n get('tabs'),\n find(e => e.selected)\n )(items);\n\n const showTabs = selectedTab ? find(e => e.selected, selectedTab.subTabs) : undefined;\n if (!showTabs) return null;\n return (\n <div className={style.tabs}>\n <BrandTabs type=\"light\" tabs={selectedTab.subTabs} />\n </div>\n );\n};\n\nconst buildContentView = content => {\n if (!content) {\n return (\n <div>\n <Loader theme=\"coorpmanager\" />\n </div>\n );\n }\n\n const {type} = content;\n switch (type) {\n case 'form':\n return <BrandForm {...content} />;\n case 'list':\n return <BrandTable {...content} />;\n case 'upload':\n return <BrandUpload {...content} />;\n case 'analytics-dashboards':\n return <BrandAnalytics {...content} />;\n case 'list-content':\n return <ListItems {...content} />;\n case 'home':\n return <BrandDashboard {...content} />;\n case 'wizard':\n return <WizardContents {...content} />;\n }\n};\n\nconst buildDetailsView = details => {\n if (!details) return;\n return <BrandTable {...details} />;\n};\n\nconst BrandUpdate = props => {\n const {notifications, header, items, content, details, popin, onItemClick} = props;\n const logo = 'https://static.coorpacademy.com/logo/coorp-manager.svg';\n\n const leftNavigation = buildLeftNavigation(logo, items, onItemClick);\n const notificationsView = buildNotifications(notifications);\n const headerView = buildHeader(header, notifications);\n const tabsView = buildTabs(items);\n const contentView = buildContentView(content);\n const detailsView = buildDetailsView(details);\n const popinView = buildPopin(popin);\n\n const contentStyle = classNames([\n style.content,\n !isEmpty(notifications) && style.contentWithNotifications,\n isEmpty(content) && style.loader\n ]);\n\n return (\n <div className={style.container}>\n <div className={style.left}>{leftNavigation}</div>\n <div className={style.contentWrapper}>\n <div className={style.headerSticky}>{headerView}</div>\n <div className={contentStyle}>\n {notificationsView}\n {tabsView}\n {contentView}\n {detailsView}\n </div>\n </div>\n {popinView}\n </div>\n );\n};\n\nBrandUpdate.defaultProps = {\n notifications: []\n};\n\nBrandUpdate.propTypes = {\n notifications: PropTypes.arrayOf(\n PropTypes.shape({\n ...Banner.propTypes\n })\n ),\n header: PropTypes.shape({...Header.propTypes}),\n items: PropTypes.arrayOf(\n PropTypes.shape({\n key: PropTypes.string,\n title: PropTypes.string.isRequired,\n href: PropTypes.string.isRequired,\n selected: PropTypes.bool.isRequired,\n type: PropTypes.string,\n tabs: PropTypes.arrayOf(\n PropTypes.shape({\n title: PropTypes.string.isRequired,\n href: PropTypes.string.isRequired,\n selected: PropTypes.bool.isRequired,\n type: PropTypes.string,\n subTabs: PropTypes.arrayOf(\n PropTypes.shape({\n title: PropTypes.string.isRequired,\n href: PropTypes.string.isRequired,\n selected: PropTypes.bool.isRequired,\n type: PropTypes.string\n })\n )\n })\n )\n })\n ).isRequired,\n content: PropTypes.oneOfType([\n PropTypes.shape({\n ...BrandForm.propTypes,\n key: PropTypes.string,\n type: PropTypes.oneOf(['form'])\n }),\n PropTypes.shape({\n ...BrandTable.propTypes,\n key: PropTypes.string,\n type: PropTypes.oneOf(['list'])\n }),\n PropTypes.shape({\n ...BrandUpload.propTypes,\n key: PropTypes.string,\n type: PropTypes.oneOf(['upload'])\n }),\n PropTypes.shape({\n ...BrandAnalytics.propTypes,\n key: PropTypes.string,\n type: PropTypes.oneOf(['analytics-dashboards'])\n }),\n PropTypes.shape({\n ...BrandDashboard.propTypes,\n key: PropTypes.string,\n type: PropTypes.oneOf(['home'])\n }),\n PropTypes.shape({\n ...WizardContents.propTypes,\n key: PropTypes.string,\n type: PropTypes.oneOf(['wizard'])\n }),\n PropTypes.shape({\n ...ListItems.propTypes,\n key: PropTypes.string,\n type: PropTypes.oneOf(['list-content'])\n })\n ]),\n popin: PropTypes.shape({...CmPopin.propTypes}),\n details: PropTypes.shape({\n ...BrandTable.propTypes,\n key: PropTypes.string,\n type: PropTypes.oneOf(['list'])\n }),\n onItemClick: PropTypes.func\n};\n\nexport default BrandUpdate;\n"],"file":"index.js"}
@@ -18,17 +18,8 @@
18
18
  display: flex;
19
19
  }
20
20
 
21
- .loaderContainer {
22
- width: 100%;
23
- height: 50vh;
24
- display: flex;
25
- align-items: center;
26
- justify-content: center;
27
- }
28
-
29
21
  .loader {
30
- height: 60px;
31
- width: 60px;
22
+ height: calc(100% - 143px);
32
23
  }
33
24
 
34
25
  .left {
@@ -19,8 +19,7 @@ const ICONS = {
19
19
  logout: _novaIcons.NovaSolidLoginLogout1,
20
20
  publish: _novaIcons.NovaSolidApplicationsWindowUpload3,
21
21
  save: _novaIcons.NovaSolidComputersSdCard,
22
- see: _novaIcons.NovaCompositionCoorpacademyEye,
23
- folders: _novaIcons.NovaSolidFilesFoldersFolders
22
+ see: _novaIcons.NovaCompositionCoorpacademyEye
24
23
  };
25
24
  exports.ICONS = ICONS;
26
25
  //# sourceMappingURL=button-icons.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/util/button-icons.js"],"names":["ICONS","add","AddIcon","analytics","AnalyticsIcon","bin","BinIcon","BulletPointIcon","ChevronLeftIcon","ChevronRightIcon","close","CloseIcon","edit","EditIcon","key","KlfIcon","list","ListIcon","logout","LogoutIcon","publish","PublishIcon","save","SaveIcon","see","EyeIcon","folders","FoldersIcon"],"mappings":";;;;;AAAA;;AAkBO,MAAMA,KAAK,GAAG;AACnBC,EAAAA,GAAG,EAAEC,uCADc;AAEnBC,EAAAA,SAAS,EAAEC,+CAFQ;AAGnBC,EAAAA,GAAG,EAAEC,qCAHc;AAInB,kBAAgBC,iDAJG;AAKnB,kBAAgBC,6CALG;AAMnB,mBAAiBC,8CANE;AAOnBC,EAAAA,KAAK,EAAEC,+BAPY;AAQnBC,EAAAA,IAAI,EAAEC,6CARa;AASnBC,EAAAA,GAAG,EAAEC,4BATc;AAUnBC,EAAAA,IAAI,EAAEC,6CAVa;AAWnBC,EAAAA,MAAM,EAAEC,gCAXW;AAYnBC,EAAAA,OAAO,EAAEC,6CAZU;AAanBC,EAAAA,IAAI,EAAEC,mCAba;AAcnBC,EAAAA,GAAG,EAAEC,yCAdc;AAenBC,EAAAA,OAAO,EAAEC;AAfU,CAAd","sourcesContent":["import {\n NovaSolidRemoveAddAddCircle1 as AddIcon,\n NovaCompositionCoorpacademyAnalytics as AnalyticsIcon,\n NovaSolidContentEditionBin as BinIcon,\n NovaCompositionCoorpacademyBulletPoint as BulletPointIcon,\n NovaCompositionNavigationArrowLeft as ChevronLeftIcon,\n NovaCompositionNavigationArrowRight as ChevronRightIcon,\n NovaSolidStatusClose as CloseIcon,\n NovaSolidContentEditionPencilWrite as EditIcon,\n NovaCompositionCoorpacademyEye as EyeIcon,\n NovaSolidContentContentViewModule1 as ListIcon,\n NovaSolidLoginLogout1 as LogoutIcon,\n NovaSolidApplicationsWindowUpload3 as PublishIcon,\n NovaSolidComputersSdCard as SaveIcon,\n NovaLineLoginKey1 as KlfIcon,\n NovaSolidFilesFoldersFolders as FoldersIcon\n} from '@coorpacademy/nova-icons';\n\nexport const ICONS = {\n add: AddIcon,\n analytics: AnalyticsIcon,\n bin: BinIcon,\n 'bullet-point': BulletPointIcon,\n 'chevron-left': ChevronLeftIcon,\n 'chevron-right': ChevronRightIcon,\n close: CloseIcon,\n edit: EditIcon,\n key: KlfIcon,\n list: ListIcon,\n logout: LogoutIcon,\n publish: PublishIcon,\n save: SaveIcon,\n see: EyeIcon,\n folders: FoldersIcon\n};\n"],"file":"button-icons.js"}
1
+ {"version":3,"sources":["../../src/util/button-icons.js"],"names":["ICONS","add","AddIcon","analytics","AnalyticsIcon","bin","BinIcon","BulletPointIcon","ChevronLeftIcon","ChevronRightIcon","close","CloseIcon","edit","EditIcon","key","KlfIcon","list","ListIcon","logout","LogoutIcon","publish","PublishIcon","save","SaveIcon","see","EyeIcon"],"mappings":";;;;;AAAA;;AAiBO,MAAMA,KAAK,GAAG;AACnBC,EAAAA,GAAG,EAAEC,uCADc;AAEnBC,EAAAA,SAAS,EAAEC,+CAFQ;AAGnBC,EAAAA,GAAG,EAAEC,qCAHc;AAInB,kBAAgBC,iDAJG;AAKnB,kBAAgBC,6CALG;AAMnB,mBAAiBC,8CANE;AAOnBC,EAAAA,KAAK,EAAEC,+BAPY;AAQnBC,EAAAA,IAAI,EAAEC,6CARa;AASnBC,EAAAA,GAAG,EAAEC,4BATc;AAUnBC,EAAAA,IAAI,EAAEC,6CAVa;AAWnBC,EAAAA,MAAM,EAAEC,gCAXW;AAYnBC,EAAAA,OAAO,EAAEC,6CAZU;AAanBC,EAAAA,IAAI,EAAEC,mCAba;AAcnBC,EAAAA,GAAG,EAAEC;AAdc,CAAd","sourcesContent":["import {\n NovaSolidRemoveAddAddCircle1 as AddIcon,\n NovaCompositionCoorpacademyAnalytics as AnalyticsIcon,\n NovaSolidContentEditionBin as BinIcon,\n NovaCompositionCoorpacademyBulletPoint as BulletPointIcon,\n NovaCompositionNavigationArrowLeft as ChevronLeftIcon,\n NovaCompositionNavigationArrowRight as ChevronRightIcon,\n NovaSolidStatusClose as CloseIcon,\n NovaSolidContentEditionPencilWrite as EditIcon,\n NovaCompositionCoorpacademyEye as EyeIcon,\n NovaSolidContentContentViewModule1 as ListIcon,\n NovaSolidLoginLogout1 as LogoutIcon,\n NovaSolidApplicationsWindowUpload3 as PublishIcon,\n NovaSolidComputersSdCard as SaveIcon,\n NovaLineLoginKey1 as KlfIcon\n} from '@coorpacademy/nova-icons';\n\nexport const ICONS = {\n add: AddIcon,\n analytics: AnalyticsIcon,\n bin: BinIcon,\n 'bullet-point': BulletPointIcon,\n 'chevron-left': ChevronLeftIcon,\n 'chevron-right': ChevronRightIcon,\n close: CloseIcon,\n edit: EditIcon,\n key: KlfIcon,\n list: ListIcon,\n logout: LogoutIcon,\n publish: PublishIcon,\n save: SaveIcon,\n see: EyeIcon\n};\n"],"file":"button-icons.js"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coorpacademy/components",
3
- "version": "10.13.3-alpha.6+4c1034718",
3
+ "version": "10.13.5",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -119,5 +119,5 @@
119
119
  "webpack-hot-middleware": "^2.25.0"
120
120
  },
121
121
  "author": "CoorpAcademy",
122
- "gitHead": "4c1034718fbbe5e1920cbdafe6cb79008f7317c8"
122
+ "gitHead": "b4939d1863ac948d8401109baacd577835a7573d"
123
123
  }
@@ -1,9 +0,0 @@
1
- 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); }
2
-
3
- import props from './default';
4
- export default {
5
- props: _extends(_extends({}, props.props), {}, {
6
- description: 'Max file size: 5MO. Recommended format: SVG (if your client uses a majority of IE, use PNG format instead). Recommended aspect ratio : horizontal 2:1 (e.g. 500px x 250px). Maximum recommended aspect ratio 1:1 (e.g. 500x500, which means that it should not be taller than its width).'
7
- })
8
- };
9
- //# sourceMappingURL=withLongDescription.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../../src/atom/drag-and-drop/test/fixtures/withLongDescription.js"],"names":["props","description"],"mappings":";;AACA,OAAOA,KAAP,MAAkB,WAAlB;AAEA,eAAe;AACXA,EAAAA,KAAK,wBACEA,KAAK,CAACA,KADR;AAEDC,IAAAA,WAAW,EAAE;AAFZ;AADM,CAAf","sourcesContent":["\nimport props from './default';\n\nexport default {\n props: {\n ...props.props,\n description: 'Max file size: 5MO. Recommended format: SVG (if your client uses a majority of IE, use PNG format instead). Recommended aspect ratio : horizontal 2:1 (e.g. 500px x 250px). Maximum recommended aspect ratio 1:1 (e.g. 500x500, which means that it should not be taller than its width).'\n }\n}\n"],"file":"withLongDescription.js"}