@coorpacademy/components 10.3.19 → 10.3.20-alpha.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/es/atom/input-switch/index.js +11 -5
  2. package/es/atom/input-switch/index.js.map +1 -1
  3. package/es/atom/input-switch/style.css +46 -0
  4. package/es/atom/input-switch/test/fixtures/cm-left.js +11 -0
  5. package/es/atom/input-switch/test/fixtures/cm-left.js.map +1 -0
  6. package/es/atom/input-switch/test/fixtures/cm-right-checked.js +11 -0
  7. package/es/atom/input-switch/test/fixtures/cm-right-checked.js.map +1 -0
  8. package/es/atom/input-switch/test/fixtures/cm-right-disabled.js +11 -0
  9. package/es/atom/input-switch/test/fixtures/cm-right-disabled.js.map +1 -0
  10. package/es/atom/input-switch/test/fixtures/cm-right-modified.js +12 -0
  11. package/es/atom/input-switch/test/fixtures/cm-right-modified.js.map +1 -0
  12. package/es/atom/input-switch/test/fixtures/cm-right.js +11 -0
  13. package/es/atom/input-switch/test/fixtures/cm-right.js.map +1 -0
  14. package/es/atom/input-switch/test/fixtures.js +10 -0
  15. package/es/atom/input-switch/test/fixtures.js.map +1 -1
  16. package/es/molecule/select-multiple/style.css +1 -0
  17. package/es/organism/course-selection/index.js +6 -3
  18. package/es/organism/course-selection/index.js.map +1 -1
  19. package/es/organism/course-selection/style.css +2 -1
  20. package/es/organism/course-selection/test/fixtures/default.js +9 -1
  21. package/es/organism/course-selection/test/fixtures/default.js.map +1 -1
  22. package/es/organism/course-selection/test/fixtures/empty.js +9 -0
  23. package/es/organism/course-selection/test/fixtures/empty.js.map +1 -1
  24. package/es/organism/course-selection/test/fixtures/filtered.js +9 -1
  25. package/es/organism/course-selection/test/fixtures/filtered.js.map +1 -1
  26. package/es/organism/course-selection/test/fixtures/sorted-selected.js +9 -1
  27. package/es/organism/course-selection/test/fixtures/sorted-selected.js.map +1 -1
  28. package/es/organism/course-selection/test/fixtures/switch-activated.js +23 -0
  29. package/es/organism/course-selection/test/fixtures/switch-activated.js.map +1 -0
  30. package/es/organism/course-selection/test/fixtures/unsorted-selected.js +9 -1
  31. package/es/organism/course-selection/test/fixtures/unsorted-selected.js.map +1 -1
  32. package/es/organism/course-selection/test/fixtures.js +2 -0
  33. package/es/organism/course-selection/test/fixtures.js.map +1 -1
  34. package/lib/atom/button-menu/test/fixtures/default.js +1 -1
  35. package/lib/atom/button-menu/test/fixtures/multiple-buttons.js +1 -1
  36. package/lib/atom/input-switch/index.js +11 -5
  37. package/lib/atom/input-switch/index.js.map +1 -1
  38. package/lib/atom/input-switch/style.css +46 -0
  39. package/lib/atom/input-switch/test/fixtures/cm-left.js +16 -0
  40. package/lib/atom/input-switch/test/fixtures/cm-left.js.map +1 -0
  41. package/lib/atom/input-switch/test/fixtures/cm-right-checked.js +16 -0
  42. package/lib/atom/input-switch/test/fixtures/cm-right-checked.js.map +1 -0
  43. package/lib/atom/input-switch/test/fixtures/cm-right-disabled.js +20 -0
  44. package/lib/atom/input-switch/test/fixtures/cm-right-disabled.js.map +1 -0
  45. package/lib/atom/input-switch/test/fixtures/cm-right-modified.js +17 -0
  46. package/lib/atom/input-switch/test/fixtures/cm-right-modified.js.map +1 -0
  47. package/lib/atom/input-switch/test/fixtures/cm-right.js +16 -0
  48. package/lib/atom/input-switch/test/fixtures/cm-right.js.map +1 -0
  49. package/lib/atom/input-switch/test/fixtures.js +15 -0
  50. package/lib/atom/input-switch/test/fixtures.js.map +1 -1
  51. package/lib/hoc/animation/index.js +1 -1
  52. package/lib/hoc/animation-scheduler/index.js +1 -1
  53. package/lib/hoc/animation-scheduler/test/fixtures/parallel.js +1 -1
  54. package/lib/hoc/swapper/index.js +1 -1
  55. package/lib/molecule/add-to-my-list/index.js +1 -1
  56. package/lib/molecule/answer/index.js +1 -1
  57. package/lib/molecule/resource-player/index.js +1 -1
  58. package/lib/molecule/select-multiple/index.js +1 -1
  59. package/lib/molecule/select-multiple/style.css +1 -0
  60. package/lib/molecule/share/index.js +1 -1
  61. package/lib/organism/course-selection/index.js +7 -3
  62. package/lib/organism/course-selection/index.js.map +1 -1
  63. package/lib/organism/course-selection/style.css +2 -1
  64. package/lib/organism/course-selection/test/fixtures/default.js +9 -1
  65. package/lib/organism/course-selection/test/fixtures/default.js.map +1 -1
  66. package/lib/organism/course-selection/test/fixtures/empty.js +9 -0
  67. package/lib/organism/course-selection/test/fixtures/empty.js.map +1 -1
  68. package/lib/organism/course-selection/test/fixtures/filtered.js +9 -1
  69. package/lib/organism/course-selection/test/fixtures/filtered.js.map +1 -1
  70. package/lib/organism/course-selection/test/fixtures/sorted-selected.js +9 -1
  71. package/lib/organism/course-selection/test/fixtures/sorted-selected.js.map +1 -1
  72. package/lib/organism/course-selection/test/fixtures/switch-activated.js +32 -0
  73. package/lib/organism/course-selection/test/fixtures/switch-activated.js.map +1 -0
  74. package/lib/organism/course-selection/test/fixtures/unsorted-selected.js +9 -1
  75. package/lib/organism/course-selection/test/fixtures/unsorted-selected.js.map +1 -1
  76. package/lib/organism/course-selection/test/fixtures.js +3 -0
  77. package/lib/organism/course-selection/test/fixtures.js.map +1 -1
  78. package/lib/organism/sidebar/index.js +1 -1
  79. package/lib/template/back-office/brand-update/test/fixtures/default.js +1 -1
  80. package/lib/template/teams-dashboard/test/fixtures/default.js +1 -1
  81. package/lib/test/helpers/render-component.js +1 -1
  82. package/lib/util/external-content.js +1 -1
  83. package/lib/util/proptypes.js +1 -1
  84. package/package.json +2 -2
@@ -14,7 +14,9 @@ const InputSwitch = props => {
14
14
  disabled,
15
15
  onChange = _noop,
16
16
  description,
17
- modified = false
17
+ modified = false,
18
+ theme = 'default',
19
+ titlePosition = 'left'
18
20
  } = props;
19
21
 
20
22
  const idSwitch = id || _uniqueId('input-switch-');
@@ -27,10 +29,12 @@ const InputSwitch = props => {
27
29
  const descriptionView = description ? /*#__PURE__*/React.createElement("div", {
28
30
  className: style.description
29
31
  }, description) : null;
30
- const className = getClassState(style.default, style.modified, null, modified);
32
+ const defaultClass = theme === 'coorpmanager' ? style.coorpmanager : style.default;
33
+ const modifiedClass = theme === 'coorpmanager' ? style.coorpmanagerModified : style.modified;
34
+ const className = getClassState(defaultClass, modifiedClass, null, modified);
31
35
  return /*#__PURE__*/React.createElement("div", {
32
36
  className: className
33
- }, titleView, /*#__PURE__*/React.createElement("input", {
37
+ }, titlePosition === 'left' ? titleView : null, /*#__PURE__*/React.createElement("input", {
34
38
  type: "checkbox",
35
39
  id: idSwitch,
36
40
  name: name,
@@ -40,7 +44,7 @@ const InputSwitch = props => {
40
44
  className: style.checkbox
41
45
  }), /*#__PURE__*/React.createElement("label", {
42
46
  htmlFor: idSwitch
43
- }), descriptionView);
47
+ }), titlePosition === 'right' ? titleView : null, descriptionView);
44
48
  };
45
49
 
46
50
  InputSwitch.propTypes = process.env.NODE_ENV !== "production" ? {
@@ -51,7 +55,9 @@ InputSwitch.propTypes = process.env.NODE_ENV !== "production" ? {
51
55
  disabled: PropTypes.bool,
52
56
  onChange: PropTypes.func,
53
57
  description: PropTypes.string,
54
- modified: PropTypes.bool
58
+ modified: PropTypes.bool,
59
+ titlePosition: PropTypes.oneOf(['right', 'left']),
60
+ theme: PropTypes.oneOf(['default', 'coorpmanager'])
55
61
  } : {};
56
62
  export default InputSwitch;
57
63
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/atom/input-switch/index.js"],"names":["React","useMemo","PropTypes","getClassState","style","InputSwitch","props","title","name","id","value","disabled","onChange","description","modified","idSwitch","isDisabled","handleChange","e","target","checked","titleView","descriptionView","className","default","checkbox","propTypes","string","bool","func"],"mappings":";;AAAA,OAAOA,KAAP,IAAeC,OAAf,QAA6B,OAA7B;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,OAAOC,aAAP,MAA0B,4BAA1B;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,WAAW,GAAGC,KAAK,IAAI;AAC3B,QAAM;AAACC,IAAAA,KAAD;AAAQC,IAAAA,IAAR;AAAcC,IAAAA,EAAd;AAAkBC,IAAAA,KAAlB;AAAyBC,IAAAA,QAAzB;AAAmCC,IAAAA,QAAQ,QAA3C;AAAoDC,IAAAA,WAApD;AAAiEC,IAAAA,QAAQ,GAAG;AAA5E,MAAqFR,KAA3F;;AAEA,QAAMS,QAAQ,GAAGN,EAAE,IAAI,UAAS,eAAT,CAAvB;;AACA,QAAMO,UAAU,GAAGL,QAAQ,GAAG,UAAH,GAAgB,EAA3C;AACA,QAAMM,YAAY,GAAGhB,OAAO,CAAC,MAAMiB,CAAC,IAAIN,QAAQ,CAACM,CAAC,CAACC,MAAF,CAASC,OAAV,CAApB,EAAwC,CAACR,QAAD,CAAxC,CAA5B;AAEA,QAAMS,SAAS,GAAGd,KAAK,gBAAG;AAAM,IAAA,SAAS,EAAEH,KAAK,CAACG;AAAvB,KAAgC,GAAEA,KAAM,GAAxC,CAAH,GAAwD,IAA/E;AAEA,QAAMe,eAAe,GAAGT,WAAW,gBACjC;AAAK,IAAA,SAAS,EAAET,KAAK,CAACS;AAAtB,KAAoCA,WAApC,CADiC,GAE/B,IAFJ;AAGA,QAAMU,SAAS,GAAGpB,aAAa,CAACC,KAAK,CAACoB,OAAP,EAAgBpB,KAAK,CAACU,QAAtB,EAAgC,IAAhC,EAAsCA,QAAtC,CAA/B;AAEA,sBACE;AAAK,IAAA,SAAS,EAAES;AAAhB,KACGF,SADH,eAEE;AACE,IAAA,IAAI,EAAC,UADP;AAEE,IAAA,EAAE,EAAEN,QAFN;AAGE,IAAA,IAAI,EAAEP,IAHR;AAIE,IAAA,QAAQ,EAAES,YAJZ;AAKE,IAAA,OAAO,EAAEP,KALX;AAME,IAAA,QAAQ,EAAEM,UANZ;AAOE,IAAA,SAAS,EAAEZ,KAAK,CAACqB;AAPnB,IAFF,eAWE;AAAO,IAAA,OAAO,EAAEV;AAAhB,IAXF,EAYGO,eAZH,CADF;AAgBD,CA9BD;;AAgCAjB,WAAW,CAACqB,SAAZ,2CAAwB;AACtBnB,EAAAA,KAAK,EAAEL,SAAS,CAACyB,MADK;AAEtBnB,EAAAA,IAAI,EAAEN,SAAS,CAACyB,MAFM;AAGtBlB,EAAAA,EAAE,EAAEP,SAAS,CAACyB,MAHQ;AAItBjB,EAAAA,KAAK,EAAER,SAAS,CAAC0B,IAJK;AAKtBjB,EAAAA,QAAQ,EAAET,SAAS,CAAC0B,IALE;AAMtBhB,EAAAA,QAAQ,EAAEV,SAAS,CAAC2B,IANE;AAOtBhB,EAAAA,WAAW,EAAEX,SAAS,CAACyB,MAPD;AAQtBb,EAAAA,QAAQ,EAAEZ,SAAS,CAAC0B;AARE,CAAxB;AAUA,eAAevB,WAAf","sourcesContent":["import React, {useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport {noop, uniqueId} from 'lodash/fp';\nimport getClassState from '../../util/get-class-state';\nimport style from './style.css';\n\nconst InputSwitch = props => {\n const {title, name, id, value, disabled, onChange = noop, description, modified = false} = props;\n\n const idSwitch = id || uniqueId('input-switch-');\n const isDisabled = disabled ? 'disabled' : '';\n const handleChange = useMemo(() => e => onChange(e.target.checked), [onChange]);\n\n const titleView = title ? <span className={style.title}>{`${title} `}</span> : null;\n\n const descriptionView = description ? (\n <div className={style.description}>{description}</div>\n ) : null;\n const className = getClassState(style.default, style.modified, null, modified);\n\n return (\n <div className={className}>\n {titleView}\n <input\n type=\"checkbox\"\n id={idSwitch}\n name={name}\n onChange={handleChange}\n checked={value}\n disabled={isDisabled}\n className={style.checkbox}\n />\n <label htmlFor={idSwitch} />\n {descriptionView}\n </div>\n );\n};\n\nInputSwitch.propTypes = {\n title: PropTypes.string,\n name: PropTypes.string,\n id: PropTypes.string,\n value: PropTypes.bool,\n disabled: PropTypes.bool,\n onChange: PropTypes.func,\n description: PropTypes.string,\n modified: PropTypes.bool\n};\nexport default InputSwitch;\n"],"file":"index.js"}
1
+ {"version":3,"sources":["../../../src/atom/input-switch/index.js"],"names":["React","useMemo","PropTypes","getClassState","style","InputSwitch","props","title","name","id","value","disabled","onChange","description","modified","theme","titlePosition","idSwitch","isDisabled","handleChange","e","target","checked","titleView","descriptionView","defaultClass","coorpmanager","default","modifiedClass","coorpmanagerModified","className","checkbox","propTypes","string","bool","func","oneOf"],"mappings":";;AAAA,OAAOA,KAAP,IAAeC,OAAf,QAA6B,OAA7B;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,OAAOC,aAAP,MAA0B,4BAA1B;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,WAAW,GAAGC,KAAK,IAAI;AAC3B,QAAM;AACJC,IAAAA,KADI;AAEJC,IAAAA,IAFI;AAGJC,IAAAA,EAHI;AAIJC,IAAAA,KAJI;AAKJC,IAAAA,QALI;AAMJC,IAAAA,QAAQ,QANJ;AAOJC,IAAAA,WAPI;AAQJC,IAAAA,QAAQ,GAAG,KARP;AASJC,IAAAA,KAAK,GAAG,SATJ;AAUJC,IAAAA,aAAa,GAAG;AAVZ,MAWFV,KAXJ;;AAaA,QAAMW,QAAQ,GAAGR,EAAE,IAAI,UAAS,eAAT,CAAvB;;AACA,QAAMS,UAAU,GAAGP,QAAQ,GAAG,UAAH,GAAgB,EAA3C;AACA,QAAMQ,YAAY,GAAGlB,OAAO,CAAC,MAAMmB,CAAC,IAAIR,QAAQ,CAACQ,CAAC,CAACC,MAAF,CAASC,OAAV,CAApB,EAAwC,CAACV,QAAD,CAAxC,CAA5B;AAEA,QAAMW,SAAS,GAAGhB,KAAK,gBAAG;AAAM,IAAA,SAAS,EAAEH,KAAK,CAACG;AAAvB,KAAgC,GAAEA,KAAM,GAAxC,CAAH,GAAwD,IAA/E;AAEA,QAAMiB,eAAe,GAAGX,WAAW,gBACjC;AAAK,IAAA,SAAS,EAAET,KAAK,CAACS;AAAtB,KAAoCA,WAApC,CADiC,GAE/B,IAFJ;AAIA,QAAMY,YAAY,GAAGV,KAAK,KAAK,cAAV,GAA2BX,KAAK,CAACsB,YAAjC,GAAgDtB,KAAK,CAACuB,OAA3E;AACA,QAAMC,aAAa,GAAGb,KAAK,KAAK,cAAV,GAA2BX,KAAK,CAACyB,oBAAjC,GAAwDzB,KAAK,CAACU,QAApF;AACA,QAAMgB,SAAS,GAAG3B,aAAa,CAACsB,YAAD,EAAeG,aAAf,EAA8B,IAA9B,EAAoCd,QAApC,CAA/B;AAEA,sBACE;AAAK,IAAA,SAAS,EAAEgB;AAAhB,KACGd,aAAa,KAAK,MAAlB,GAA2BO,SAA3B,GAAuC,IAD1C,eAEE;AACE,IAAA,IAAI,EAAC,UADP;AAEE,IAAA,EAAE,EAAEN,QAFN;AAGE,IAAA,IAAI,EAAET,IAHR;AAIE,IAAA,QAAQ,EAAEW,YAJZ;AAKE,IAAA,OAAO,EAAET,KALX;AAME,IAAA,QAAQ,EAAEQ,UANZ;AAOE,IAAA,SAAS,EAAEd,KAAK,CAAC2B;AAPnB,IAFF,eAWE;AAAO,IAAA,OAAO,EAAEd;AAAhB,IAXF,EAYGD,aAAa,KAAK,OAAlB,GAA4BO,SAA5B,GAAwC,IAZ3C,EAaGC,eAbH,CADF;AAiBD,CA7CD;;AA+CAnB,WAAW,CAAC2B,SAAZ,2CAAwB;AACtBzB,EAAAA,KAAK,EAAEL,SAAS,CAAC+B,MADK;AAEtBzB,EAAAA,IAAI,EAAEN,SAAS,CAAC+B,MAFM;AAGtBxB,EAAAA,EAAE,EAAEP,SAAS,CAAC+B,MAHQ;AAItBvB,EAAAA,KAAK,EAAER,SAAS,CAACgC,IAJK;AAKtBvB,EAAAA,QAAQ,EAAET,SAAS,CAACgC,IALE;AAMtBtB,EAAAA,QAAQ,EAAEV,SAAS,CAACiC,IANE;AAOtBtB,EAAAA,WAAW,EAAEX,SAAS,CAAC+B,MAPD;AAQtBnB,EAAAA,QAAQ,EAAEZ,SAAS,CAACgC,IARE;AAStBlB,EAAAA,aAAa,EAAEd,SAAS,CAACkC,KAAV,CAAgB,CAAC,OAAD,EAAU,MAAV,CAAhB,CATO;AAUtBrB,EAAAA,KAAK,EAAEb,SAAS,CAACkC,KAAV,CAAgB,CAAC,SAAD,EAAY,cAAZ,CAAhB;AAVe,CAAxB;AAYA,eAAe/B,WAAf","sourcesContent":["import React, {useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport {noop, uniqueId} from 'lodash/fp';\nimport getClassState from '../../util/get-class-state';\nimport style from './style.css';\n\nconst InputSwitch = props => {\n const {\n title,\n name,\n id,\n value,\n disabled,\n onChange = noop,\n description,\n modified = false,\n theme = 'default',\n titlePosition = 'left'\n } = props;\n\n const idSwitch = id || uniqueId('input-switch-');\n const isDisabled = disabled ? 'disabled' : '';\n const handleChange = useMemo(() => e => onChange(e.target.checked), [onChange]);\n\n const titleView = title ? <span className={style.title}>{`${title} `}</span> : null;\n\n const descriptionView = description ? (\n <div className={style.description}>{description}</div>\n ) : null;\n\n const defaultClass = theme === 'coorpmanager' ? style.coorpmanager : style.default;\n const modifiedClass = theme === 'coorpmanager' ? style.coorpmanagerModified : style.modified;\n const className = getClassState(defaultClass, modifiedClass, null, modified);\n\n return (\n <div className={className}>\n {titlePosition === 'left' ? titleView : null}\n <input\n type=\"checkbox\"\n id={idSwitch}\n name={name}\n onChange={handleChange}\n checked={value}\n disabled={isDisabled}\n className={style.checkbox}\n />\n <label htmlFor={idSwitch} />\n {titlePosition === 'right' ? titleView : null}\n {descriptionView}\n </div>\n );\n};\n\nInputSwitch.propTypes = {\n title: PropTypes.string,\n name: PropTypes.string,\n id: PropTypes.string,\n value: PropTypes.bool,\n disabled: PropTypes.bool,\n onChange: PropTypes.func,\n description: PropTypes.string,\n modified: PropTypes.bool,\n titlePosition: PropTypes.oneOf(['right', 'left']),\n theme: PropTypes.oneOf(['default', 'coorpmanager'])\n};\nexport default InputSwitch;\n"],"file":"index.js"}
@@ -5,6 +5,9 @@
5
5
  @value positive from colors;
6
6
  @value light from colors;
7
7
  @value dark from colors;
8
+ @value cm_grey_200 from colors;
9
+ @value black from colors;
10
+ @value cm_primary_blue from colors;
8
11
 
9
12
  .default {
10
13
  display: flex;
@@ -16,6 +19,14 @@
16
19
  composes: default;
17
20
  }
18
21
 
22
+ .coorpmanager {
23
+ composes: default;
24
+ }
25
+
26
+ .coorpmanagerModified {
27
+ composes: modified;
28
+ }
29
+
19
30
  .default label {
20
31
  height: 30px;
21
32
  position: relative;
@@ -102,3 +113,38 @@
102
113
  font-style: italic;
103
114
  margin-left: 20px;
104
115
  }
116
+
117
+ .coorpmanager label, .coorpmanagerModified label {
118
+ width: 48px;
119
+ height: 24px;
120
+ border: solid 2px cm_grey_200;
121
+ margin-right: 8px;
122
+ background: cm_grey_200;
123
+ }
124
+
125
+ .coorpmanager label::after, .coorpmanagerModified label::after {
126
+ width: 22px;
127
+ height: 22px;
128
+ }
129
+
130
+ .coorpmanager span, .coorpmanagerModified span {
131
+ font-family: Gilroy;
132
+ font-weight: bold;
133
+ color: black;
134
+ min-width: 190px;
135
+ }
136
+
137
+ .coorpmanager .checkbox:checked ~ label {
138
+ background: cm_primary_blue;
139
+ border-color: cm_primary_blue;
140
+ }
141
+
142
+ .coorpmanager .checkbox:disabled ~ label {
143
+ background: light;
144
+ border-color: light;
145
+ pointer-events: none;
146
+ }
147
+
148
+ .coorpmanager .checkbox:disabled ~ label::after {
149
+ background: medium;
150
+ }
@@ -0,0 +1,11 @@
1
+ export default {
2
+ props: {
3
+ type: 'switch',
4
+ title: 'Name',
5
+ value: false,
6
+ onChange: value => console.log(value),
7
+ titlePosition: 'left',
8
+ theme: 'coorpmanager'
9
+ }
10
+ };
11
+ //# sourceMappingURL=cm-left.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../src/atom/input-switch/test/fixtures/cm-left.js"],"names":["props","type","title","value","onChange","console","log","titlePosition","theme"],"mappings":"AAAA,eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,IAAI,EAAE,QADD;AAELC,IAAAA,KAAK,EAAE,MAFF;AAGLC,IAAAA,KAAK,EAAE,KAHF;AAILC,IAAAA,QAAQ,EAAED,KAAK,IAAIE,OAAO,CAACC,GAAR,CAAYH,KAAZ,CAJd;AAKLI,IAAAA,aAAa,EAAE,MALV;AAMLC,IAAAA,KAAK,EAAE;AANF;AADM,CAAf","sourcesContent":["export default {\n props: {\n type: 'switch',\n title: 'Name',\n value: false,\n onChange: value => console.log(value),\n titlePosition: 'left',\n theme: 'coorpmanager'\n }\n};\n"],"file":"cm-left.js"}
@@ -0,0 +1,11 @@
1
+ export default {
2
+ props: {
3
+ type: 'switch',
4
+ title: 'Name',
5
+ value: true,
6
+ onChange: value => console.log(value),
7
+ titlePosition: 'right',
8
+ theme: 'coorpmanager'
9
+ }
10
+ };
11
+ //# sourceMappingURL=cm-right-checked.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../src/atom/input-switch/test/fixtures/cm-right-checked.js"],"names":["props","type","title","value","onChange","console","log","titlePosition","theme"],"mappings":"AAAA,eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,IAAI,EAAE,QADD;AAELC,IAAAA,KAAK,EAAE,MAFF;AAGLC,IAAAA,KAAK,EAAE,IAHF;AAILC,IAAAA,QAAQ,EAAED,KAAK,IAAIE,OAAO,CAACC,GAAR,CAAYH,KAAZ,CAJd;AAKLI,IAAAA,aAAa,EAAE,OALV;AAMLC,IAAAA,KAAK,EAAE;AANF;AADM,CAAf","sourcesContent":["export default {\n props: {\n type: 'switch',\n title: 'Name',\n value: true,\n onChange: value => console.log(value),\n titlePosition: 'right',\n theme: 'coorpmanager'\n }\n};\n"],"file":"cm-right-checked.js"}
@@ -0,0 +1,11 @@
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 checked from './checked';
4
+ export default {
5
+ props: _extends({}, checked.props, {
6
+ disabled: true,
7
+ titlePosition: 'right',
8
+ theme: 'coorpmanager'
9
+ })
10
+ };
11
+ //# sourceMappingURL=cm-right-disabled.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../src/atom/input-switch/test/fixtures/cm-right-disabled.js"],"names":["checked","props","disabled","titlePosition","theme"],"mappings":";;AAAA,OAAOA,OAAP,MAAoB,WAApB;AAEA,eAAe;AACbC,EAAAA,KAAK,eACAD,OAAO,CAACC,KADR;AAEHC,IAAAA,QAAQ,EAAE,IAFP;AAGHC,IAAAA,aAAa,EAAE,OAHZ;AAIHC,IAAAA,KAAK,EAAE;AAJJ;AADQ,CAAf","sourcesContent":["import checked from './checked';\n\nexport default {\n props: {\n ...checked.props,\n disabled: true,\n titlePosition: 'right',\n theme: 'coorpmanager'\n }\n};\n"],"file":"cm-right-disabled.js"}
@@ -0,0 +1,12 @@
1
+ export default {
2
+ props: {
3
+ type: 'switch',
4
+ title: 'Name',
5
+ value: false,
6
+ modified: true,
7
+ onChange: value => console.log(value),
8
+ titlePosition: 'right',
9
+ theme: 'coorpmanager'
10
+ }
11
+ };
12
+ //# sourceMappingURL=cm-right-modified.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../src/atom/input-switch/test/fixtures/cm-right-modified.js"],"names":["props","type","title","value","modified","onChange","console","log","titlePosition","theme"],"mappings":"AAAA,eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,IAAI,EAAE,QADD;AAELC,IAAAA,KAAK,EAAE,MAFF;AAGLC,IAAAA,KAAK,EAAE,KAHF;AAILC,IAAAA,QAAQ,EAAE,IAJL;AAKLC,IAAAA,QAAQ,EAAEF,KAAK,IAAIG,OAAO,CAACC,GAAR,CAAYJ,KAAZ,CALd;AAMLK,IAAAA,aAAa,EAAE,OANV;AAOLC,IAAAA,KAAK,EAAE;AAPF;AADM,CAAf","sourcesContent":["export default {\n props: {\n type: 'switch',\n title: 'Name',\n value: false,\n modified: true,\n onChange: value => console.log(value),\n titlePosition: 'right',\n theme: 'coorpmanager'\n }\n};\n"],"file":"cm-right-modified.js"}
@@ -0,0 +1,11 @@
1
+ export default {
2
+ props: {
3
+ type: 'switch',
4
+ title: 'Name',
5
+ value: false,
6
+ onChange: value => console.log(value),
7
+ titlePosition: 'right',
8
+ theme: 'coorpmanager'
9
+ }
10
+ };
11
+ //# sourceMappingURL=cm-right.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../src/atom/input-switch/test/fixtures/cm-right.js"],"names":["props","type","title","value","onChange","console","log","titlePosition","theme"],"mappings":"AAAA,eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,IAAI,EAAE,QADD;AAELC,IAAAA,KAAK,EAAE,MAFF;AAGLC,IAAAA,KAAK,EAAE,KAHF;AAILC,IAAAA,QAAQ,EAAED,KAAK,IAAIE,OAAO,CAACC,GAAR,CAAYH,KAAZ,CAJd;AAKLI,IAAAA,aAAa,EAAE,OALV;AAMLC,IAAAA,KAAK,EAAE;AANF;AADM,CAAf","sourcesContent":["export default {\n props: {\n type: 'switch',\n title: 'Name',\n value: false,\n onChange: value => console.log(value),\n titlePosition: 'right',\n theme: 'coorpmanager'\n }\n};\n"],"file":"cm-right.js"}
@@ -3,6 +3,11 @@ import forEach from 'lodash/forEach';
3
3
  import renderComponentMacro from '../../../test/helpers/render-component';
4
4
  import AtomInputSwitch from '..';
5
5
  import fixtureChecked from './fixtures/checked';
6
+ import fixtureCmLeft from './fixtures/cm-left';
7
+ import fixtureCmRightChecked from './fixtures/cm-right-checked';
8
+ import fixtureCmRightDisabled from './fixtures/cm-right-disabled';
9
+ import fixtureCmRightModified from './fixtures/cm-right-modified';
10
+ import fixtureCmRight from './fixtures/cm-right';
6
11
  import fixtureDisabled from './fixtures/disabled';
7
12
  import fixtureModified from './fixtures/modified';
8
13
  import fixtureNoTitle from './fixtures/no-title';
@@ -15,6 +20,11 @@ test('Atom › AtomInputSwitch > should have valid propTypes', t => {
15
20
  });
16
21
  });
17
22
  test('Atom › AtomInputSwitch › Checked › should be rendered', renderComponentMacro, AtomInputSwitch, fixtureChecked);
23
+ test('Atom › AtomInputSwitch › CmLeft › should be rendered', renderComponentMacro, AtomInputSwitch, fixtureCmLeft);
24
+ test('Atom › AtomInputSwitch › CmRightChecked › should be rendered', renderComponentMacro, AtomInputSwitch, fixtureCmRightChecked);
25
+ test('Atom › AtomInputSwitch › CmRightDisabled › should be rendered', renderComponentMacro, AtomInputSwitch, fixtureCmRightDisabled);
26
+ test('Atom › AtomInputSwitch › CmRightModified › should be rendered', renderComponentMacro, AtomInputSwitch, fixtureCmRightModified);
27
+ test('Atom › AtomInputSwitch › CmRight › should be rendered', renderComponentMacro, AtomInputSwitch, fixtureCmRight);
18
28
  test('Atom › AtomInputSwitch › Disabled › should be rendered', renderComponentMacro, AtomInputSwitch, fixtureDisabled);
19
29
  test('Atom › AtomInputSwitch › Modified › should be rendered', renderComponentMacro, AtomInputSwitch, fixtureModified);
20
30
  test('Atom › AtomInputSwitch › NoTitle › should be rendered', renderComponentMacro, AtomInputSwitch, fixtureNoTitle);
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/atom/input-switch/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","AtomInputSwitch","fixtureChecked","fixtureDisabled","fixtureModified","fixtureNoTitle","fixtureSso","fixtureUnchecked","t","pass","propTypes","value","key","not","undefined"],"mappings":"AAAA,OAAOA,IAAP,MAAiB,KAAjB;AACA,OAAOC,OAAP,MAAoB,gBAApB;AACA,OAAOC,oBAAP,MAAiC,wCAAjC;AACA,OAAOC,eAAP,MAA4B,IAA5B;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,eAAP,MAA4B,qBAA5B;AACA,OAAOC,eAAP,MAA4B,qBAA5B;AACA,OAAOC,cAAP,MAA2B,qBAA3B;AACA,OAAOC,UAAP,MAAuB,gBAAvB;AACA,OAAOC,gBAAP,MAA6B,sBAA7B;AAEAT,IAAI,CAAC,sDAAD,EAAyDU,CAAC,IAAI;AAChEA,EAAAA,CAAC,CAACC,IAAF;AACAV,EAAAA,OAAO,CAACE,eAAe,CAACS,SAAjB,EAA4B,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACjDJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,gDAA+CF,GAAI,mEAA5E;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAd,IAAI,CAAC,uDAAD,EAA0DE,oBAA1D,EAAgFC,eAAhF,EAAiGC,cAAjG,CAAJ;AACAJ,IAAI,CAAC,wDAAD,EAA2DE,oBAA3D,EAAiFC,eAAjF,EAAkGE,eAAlG,CAAJ;AACAL,IAAI,CAAC,wDAAD,EAA2DE,oBAA3D,EAAiFC,eAAjF,EAAkGG,eAAlG,CAAJ;AACAN,IAAI,CAAC,uDAAD,EAA0DE,oBAA1D,EAAgFC,eAAhF,EAAiGI,cAAjG,CAAJ;AACAP,IAAI,CAAC,mDAAD,EAAsDE,oBAAtD,EAA4EC,eAA5E,EAA6FK,UAA7F,CAAJ;AACAR,IAAI,CAAC,yDAAD,EAA4DE,oBAA5D,EAAkFC,eAAlF,EAAmGM,gBAAnG,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport AtomInputSwitch from '..';\nimport fixtureChecked from './fixtures/checked';\nimport fixtureDisabled from './fixtures/disabled';\nimport fixtureModified from './fixtures/modified';\nimport fixtureNoTitle from './fixtures/no-title';\nimport fixtureSso from './fixtures/sso';\nimport fixtureUnchecked from './fixtures/unchecked';\n\ntest('Atom › AtomInputSwitch > should have valid propTypes', t => {\n t.pass();\n forEach(AtomInputSwitch.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Atom.AtomInputSwitch.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Atom › AtomInputSwitch › Checked › should be rendered', renderComponentMacro, AtomInputSwitch, fixtureChecked);\ntest('Atom › AtomInputSwitch › Disabled › should be rendered', renderComponentMacro, AtomInputSwitch, fixtureDisabled);\ntest('Atom › AtomInputSwitch › Modified › should be rendered', renderComponentMacro, AtomInputSwitch, fixtureModified);\ntest('Atom › AtomInputSwitch › NoTitle › should be rendered', renderComponentMacro, AtomInputSwitch, fixtureNoTitle);\ntest('Atom › AtomInputSwitch › Sso › should be rendered', renderComponentMacro, AtomInputSwitch, fixtureSso);\ntest('Atom › AtomInputSwitch › Unchecked › should be rendered', renderComponentMacro, AtomInputSwitch, fixtureUnchecked);\n"],"file":"fixtures.js"}
1
+ {"version":3,"sources":["../../../../src/atom/input-switch/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","AtomInputSwitch","fixtureChecked","fixtureCmLeft","fixtureCmRightChecked","fixtureCmRightDisabled","fixtureCmRightModified","fixtureCmRight","fixtureDisabled","fixtureModified","fixtureNoTitle","fixtureSso","fixtureUnchecked","t","pass","propTypes","value","key","not","undefined"],"mappings":"AAAA,OAAOA,IAAP,MAAiB,KAAjB;AACA,OAAOC,OAAP,MAAoB,gBAApB;AACA,OAAOC,oBAAP,MAAiC,wCAAjC;AACA,OAAOC,eAAP,MAA4B,IAA5B;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,aAAP,MAA0B,oBAA1B;AACA,OAAOC,qBAAP,MAAkC,6BAAlC;AACA,OAAOC,sBAAP,MAAmC,8BAAnC;AACA,OAAOC,sBAAP,MAAmC,8BAAnC;AACA,OAAOC,cAAP,MAA2B,qBAA3B;AACA,OAAOC,eAAP,MAA4B,qBAA5B;AACA,OAAOC,eAAP,MAA4B,qBAA5B;AACA,OAAOC,cAAP,MAA2B,qBAA3B;AACA,OAAOC,UAAP,MAAuB,gBAAvB;AACA,OAAOC,gBAAP,MAA6B,sBAA7B;AAEAd,IAAI,CAAC,sDAAD,EAAyDe,CAAC,IAAI;AAChEA,EAAAA,CAAC,CAACC,IAAF;AACAf,EAAAA,OAAO,CAACE,eAAe,CAACc,SAAjB,EAA4B,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACjDJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,gDAA+CF,GAAI,mEAA5E;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAnB,IAAI,CAAC,uDAAD,EAA0DE,oBAA1D,EAAgFC,eAAhF,EAAiGC,cAAjG,CAAJ;AACAJ,IAAI,CAAC,sDAAD,EAAyDE,oBAAzD,EAA+EC,eAA/E,EAAgGE,aAAhG,CAAJ;AACAL,IAAI,CAAC,8DAAD,EAAiEE,oBAAjE,EAAuFC,eAAvF,EAAwGG,qBAAxG,CAAJ;AACAN,IAAI,CAAC,+DAAD,EAAkEE,oBAAlE,EAAwFC,eAAxF,EAAyGI,sBAAzG,CAAJ;AACAP,IAAI,CAAC,+DAAD,EAAkEE,oBAAlE,EAAwFC,eAAxF,EAAyGK,sBAAzG,CAAJ;AACAR,IAAI,CAAC,uDAAD,EAA0DE,oBAA1D,EAAgFC,eAAhF,EAAiGM,cAAjG,CAAJ;AACAT,IAAI,CAAC,wDAAD,EAA2DE,oBAA3D,EAAiFC,eAAjF,EAAkGO,eAAlG,CAAJ;AACAV,IAAI,CAAC,wDAAD,EAA2DE,oBAA3D,EAAiFC,eAAjF,EAAkGQ,eAAlG,CAAJ;AACAX,IAAI,CAAC,uDAAD,EAA0DE,oBAA1D,EAAgFC,eAAhF,EAAiGS,cAAjG,CAAJ;AACAZ,IAAI,CAAC,mDAAD,EAAsDE,oBAAtD,EAA4EC,eAA5E,EAA6FU,UAA7F,CAAJ;AACAb,IAAI,CAAC,yDAAD,EAA4DE,oBAA5D,EAAkFC,eAAlF,EAAmGW,gBAAnG,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport AtomInputSwitch from '..';\nimport fixtureChecked from './fixtures/checked';\nimport fixtureCmLeft from './fixtures/cm-left';\nimport fixtureCmRightChecked from './fixtures/cm-right-checked';\nimport fixtureCmRightDisabled from './fixtures/cm-right-disabled';\nimport fixtureCmRightModified from './fixtures/cm-right-modified';\nimport fixtureCmRight from './fixtures/cm-right';\nimport fixtureDisabled from './fixtures/disabled';\nimport fixtureModified from './fixtures/modified';\nimport fixtureNoTitle from './fixtures/no-title';\nimport fixtureSso from './fixtures/sso';\nimport fixtureUnchecked from './fixtures/unchecked';\n\ntest('Atom › AtomInputSwitch > should have valid propTypes', t => {\n t.pass();\n forEach(AtomInputSwitch.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Atom.AtomInputSwitch.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Atom › AtomInputSwitch › Checked › should be rendered', renderComponentMacro, AtomInputSwitch, fixtureChecked);\ntest('Atom › AtomInputSwitch › CmLeft › should be rendered', renderComponentMacro, AtomInputSwitch, fixtureCmLeft);\ntest('Atom › AtomInputSwitch › CmRightChecked › should be rendered', renderComponentMacro, AtomInputSwitch, fixtureCmRightChecked);\ntest('Atom › AtomInputSwitch › CmRightDisabled › should be rendered', renderComponentMacro, AtomInputSwitch, fixtureCmRightDisabled);\ntest('Atom › AtomInputSwitch › CmRightModified › should be rendered', renderComponentMacro, AtomInputSwitch, fixtureCmRightModified);\ntest('Atom › AtomInputSwitch › CmRight › should be rendered', renderComponentMacro, AtomInputSwitch, fixtureCmRight);\ntest('Atom › AtomInputSwitch › Disabled › should be rendered', renderComponentMacro, AtomInputSwitch, fixtureDisabled);\ntest('Atom › AtomInputSwitch › Modified › should be rendered', renderComponentMacro, AtomInputSwitch, fixtureModified);\ntest('Atom › AtomInputSwitch › NoTitle › should be rendered', renderComponentMacro, AtomInputSwitch, fixtureNoTitle);\ntest('Atom › AtomInputSwitch › Sso › should be rendered', renderComponentMacro, AtomInputSwitch, fixtureSso);\ntest('Atom › AtomInputSwitch › Unchecked › should be rendered', renderComponentMacro, AtomInputSwitch, fixtureUnchecked);\n"],"file":"fixtures.js"}
@@ -466,6 +466,7 @@
466
466
  padding-top: 8px;
467
467
  transition: transform 0.25s;
468
468
  color: cm_grey_700;
469
+ display: inline;
469
470
  }
470
471
 
471
472
  .coorpmanager.error .hint {
@@ -8,6 +8,7 @@ import EmptySearchResult from '../../atom/empty-search-result';
8
8
  import Search from '../../atom/input-search';
9
9
  import SelectMultiple from '../../molecule/select-multiple';
10
10
  import Card from '../../molecule/card';
11
+ import InputSwitch from '../../atom/input-switch';
11
12
  import style from './style.css';
12
13
 
13
14
  const buildResultView = (courses, coursesSelectionAriaLabel, emptyMessages) => {
@@ -33,7 +34,8 @@ const CourseSelection = props => {
33
34
  contentTypeFilter,
34
35
  courses,
35
36
  emptyMessages,
36
- 'courses-selection-aria-label': coursesSelectionAriaLabel
37
+ 'courses-selection-aria-label': coursesSelectionAriaLabel,
38
+ switchButton
37
39
  } = props;
38
40
  const resultView = buildResultView(courses, coursesSelectionAriaLabel, emptyMessages);
39
41
  return /*#__PURE__*/React.createElement("div", {
@@ -46,7 +48,7 @@ const CourseSelection = props => {
46
48
  theme: "coorpmanager"
47
49
  }))), /*#__PURE__*/React.createElement("div", {
48
50
  className: style.contentFilter
49
- }, /*#__PURE__*/React.createElement(SelectMultiple, contentTypeFilter))), /*#__PURE__*/React.createElement("div", {
51
+ }, /*#__PURE__*/React.createElement(SelectMultiple, contentTypeFilter)), /*#__PURE__*/React.createElement(InputSwitch, switchButton)), /*#__PURE__*/React.createElement("div", {
50
52
  className: style.cardsContainer
51
53
  }, resultView));
52
54
  };
@@ -59,7 +61,8 @@ CourseSelection.propTypes = process.env.NODE_ENV !== "production" ? {
59
61
  emptyMessages: PropTypes.shape({
60
62
  firstMessage: PropTypes.string,
61
63
  secondMessage: PropTypes.string
62
- })
64
+ }),
65
+ switchButton: PropTypes.shape(InputSwitch.PropTypes)
63
66
  } : {};
64
67
  export default CourseSelection;
65
68
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/organism/course-selection/index.js"],"names":["React","PropTypes","EmptySearchResult","Search","SelectMultiple","Card","style","buildResultView","courses","coursesSelectionAriaLabel","emptyMessages","items","map","card","index","cards","CourseSelection","props","search","contentTypeFilter","resultView","container","filters","contentFilter","cardsContainer","propTypes","shape","arrayOf","string","firstMessage","secondMessage"],"mappings":";;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,OAAOC,iBAAP,MAA8B,gCAA9B;AACA,OAAOC,MAAP,MAAmB,yBAAnB;AACA,OAAOC,cAAP,MAA2B,gCAA3B;AACA,OAAOC,IAAP,MAAiB,qBAAjB;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,eAAe,GAAG,CAACC,OAAD,EAAUC,yBAAV,EAAqCC,aAArC,KAAuD;AAC7E,MAAI,SAAQF,OAAR,CAAJ,EAAsB;AACpB,wBAAO,oBAAC,iBAAD,EAAuBE,aAAvB,CAAP;AACD;;AAED,QAAMC,KAAK,GAAGH,OAAO,CAACI,GAAR,CAAY,CAACC,IAAD,EAAOC,KAAP,KAAiB;AACzC,wBACE;AAAI,MAAA,SAAS,EAAER,KAAK,CAACS,KAArB;AAA4B,MAAA,GAAG,EAAG,QAAOD,KAAM,EAA/C;AAAkD,mBAAY,UAASA,KAAM;AAA7E,oBACE,oBAAC,IAAD,EAAUD,IAAV,CADF,CADF;AAKD,GANa,CAAd;AAQA,sBAAO;AAAI,kBAAYJ;AAAhB,KAA4CE,KAA5C,CAAP;AACD,CAdD;;AAgBA,MAAMK,eAAe,GAAGC,KAAK,IAAI;AAC/B,QAAM;AACJC,IAAAA,MADI;AAEJC,IAAAA,iBAFI;AAGJX,IAAAA,OAHI;AAIJE,IAAAA,aAJI;AAKJ,oCAAgCD;AAL5B,MAMFQ,KANJ;AAQA,QAAMG,UAAU,GAAGb,eAAe,CAACC,OAAD,EAAUC,yBAAV,EAAqCC,aAArC,CAAlC;AAEA,sBACE;AAAK,IAAA,SAAS,EAAEJ,KAAK,CAACe;AAAtB,kBACE;AAAK,IAAA,SAAS,EAAEf,KAAK,CAACgB;AAAtB,kBACE;AAAK,IAAA,SAAS,EAAEhB,KAAK,CAACY;AAAtB,kBACE,oBAAC,MAAD,eAAYA,MAAZ;AAAoB,IAAA,KAAK,EAAC;AAA1B,KADF,CADF,eAIE;AAAK,IAAA,SAAS,EAAEZ,KAAK,CAACiB;AAAtB,kBACE,oBAAC,cAAD,EAAoBJ,iBAApB,CADF,CAJF,CADF,eASE;AAAK,IAAA,SAAS,EAAEb,KAAK,CAACkB;AAAtB,KAAuCJ,UAAvC,CATF,CADF;AAaD,CAxBD;;AA0BAJ,eAAe,CAACS,SAAhB,2CAA4B;AAC1BP,EAAAA,MAAM,EAAEjB,SAAS,CAACyB,KAAV,CAAgBvB,MAAM,CAACF,SAAvB,CADkB;AAE1BkB,EAAAA,iBAAiB,EAAElB,SAAS,CAACyB,KAAV,CAAgBtB,cAAc,CAACH,SAA/B,CAFO;AAG1BO,EAAAA,OAAO,EAAEP,SAAS,CAAC0B,OAAV,CAAkB1B,SAAS,CAACyB,KAAV,CAAgBrB,IAAI,CAACoB,SAArB,CAAlB,CAHiB;AAI1B,kCAAgCxB,SAAS,CAAC2B,MAJhB;AAK1BlB,EAAAA,aAAa,EAAET,SAAS,CAACyB,KAAV,CAAgB;AAC7BG,IAAAA,YAAY,EAAE5B,SAAS,CAAC2B,MADK;AAE7BE,IAAAA,aAAa,EAAE7B,SAAS,CAAC2B;AAFI,GAAhB;AALW,CAA5B;AAWA,eAAeZ,eAAf","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 SelectMultiple from '../../molecule/select-multiple';\nimport Card from '../../molecule/card';\nimport style from './style.css';\n\nconst buildResultView = (courses, coursesSelectionAriaLabel, emptyMessages) => {\n if (isEmpty(courses)) {\n return <EmptySearchResult {...emptyMessages} />;\n }\n\n const items = courses.map((card, index) => {\n return (\n <li className={style.cards} key={`card-${index}`} data-name={`course-${index}`}>\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 'courses-selection-aria-label': coursesSelectionAriaLabel\n } = props;\n\n const resultView = buildResultView(courses, coursesSelectionAriaLabel, emptyMessages);\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 </div>\n <div className={style.cardsContainer}>{resultView}</div>\n </div>\n );\n};\n\nCourseSelection.propTypes = {\n search: PropTypes.shape(Search.PropTypes),\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};\n\nexport default CourseSelection;\n"],"file":"index.js"}
1
+ {"version":3,"sources":["../../../src/organism/course-selection/index.js"],"names":["React","PropTypes","EmptySearchResult","Search","SelectMultiple","Card","InputSwitch","style","buildResultView","courses","coursesSelectionAriaLabel","emptyMessages","items","map","card","index","cards","CourseSelection","props","search","contentTypeFilter","switchButton","resultView","container","filters","contentFilter","cardsContainer","propTypes","shape","arrayOf","string","firstMessage","secondMessage"],"mappings":";;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,OAAOC,iBAAP,MAA8B,gCAA9B;AACA,OAAOC,MAAP,MAAmB,yBAAnB;AACA,OAAOC,cAAP,MAA2B,gCAA3B;AACA,OAAOC,IAAP,MAAiB,qBAAjB;AACA,OAAOC,WAAP,MAAwB,yBAAxB;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,eAAe,GAAG,CAACC,OAAD,EAAUC,yBAAV,EAAqCC,aAArC,KAAuD;AAC7E,MAAI,SAAQF,OAAR,CAAJ,EAAsB;AACpB,wBAAO,oBAAC,iBAAD,EAAuBE,aAAvB,CAAP;AACD;;AAED,QAAMC,KAAK,GAAGH,OAAO,CAACI,GAAR,CAAY,CAACC,IAAD,EAAOC,KAAP,KAAiB;AACzC,wBACE;AAAI,MAAA,SAAS,EAAER,KAAK,CAACS,KAArB;AAA4B,MAAA,GAAG,EAAG,QAAOD,KAAM,EAA/C;AAAkD,mBAAY,UAASA,KAAM;AAA7E,oBACE,oBAAC,IAAD,EAAUD,IAAV,CADF,CADF;AAKD,GANa,CAAd;AAQA,sBAAO;AAAI,kBAAYJ;AAAhB,KAA4CE,KAA5C,CAAP;AACD,CAdD;;AAgBA,MAAMK,eAAe,GAAGC,KAAK,IAAI;AAC/B,QAAM;AACJC,IAAAA,MADI;AAEJC,IAAAA,iBAFI;AAGJX,IAAAA,OAHI;AAIJE,IAAAA,aAJI;AAKJ,oCAAgCD,yBAL5B;AAMJW,IAAAA;AANI,MAOFH,KAPJ;AASA,QAAMI,UAAU,GAAGd,eAAe,CAACC,OAAD,EAAUC,yBAAV,EAAqCC,aAArC,CAAlC;AAEA,sBACE;AAAK,IAAA,SAAS,EAAEJ,KAAK,CAACgB;AAAtB,kBACE;AAAK,IAAA,SAAS,EAAEhB,KAAK,CAACiB;AAAtB,kBACE;AAAK,IAAA,SAAS,EAAEjB,KAAK,CAACY;AAAtB,kBACE,oBAAC,MAAD,eAAYA,MAAZ;AAAoB,IAAA,KAAK,EAAC;AAA1B,KADF,CADF,eAIE;AAAK,IAAA,SAAS,EAAEZ,KAAK,CAACkB;AAAtB,kBACE,oBAAC,cAAD,EAAoBL,iBAApB,CADF,CAJF,eAOE,oBAAC,WAAD,EAAiBC,YAAjB,CAPF,CADF,eAUE;AAAK,IAAA,SAAS,EAAEd,KAAK,CAACmB;AAAtB,KAAuCJ,UAAvC,CAVF,CADF;AAcD,CA1BD;;AA4BAL,eAAe,CAACU,SAAhB,2CAA4B;AAC1BR,EAAAA,MAAM,EAAElB,SAAS,CAAC2B,KAAV,CAAgBzB,MAAM,CAACF,SAAvB,CADkB;AAE1BmB,EAAAA,iBAAiB,EAAEnB,SAAS,CAAC2B,KAAV,CAAgBxB,cAAc,CAACH,SAA/B,CAFO;AAG1BQ,EAAAA,OAAO,EAAER,SAAS,CAAC4B,OAAV,CAAkB5B,SAAS,CAAC2B,KAAV,CAAgBvB,IAAI,CAACsB,SAArB,CAAlB,CAHiB;AAI1B,kCAAgC1B,SAAS,CAAC6B,MAJhB;AAK1BnB,EAAAA,aAAa,EAAEV,SAAS,CAAC2B,KAAV,CAAgB;AAC7BG,IAAAA,YAAY,EAAE9B,SAAS,CAAC6B,MADK;AAE7BE,IAAAA,aAAa,EAAE/B,SAAS,CAAC6B;AAFI,GAAhB,CALW;AAS1BT,EAAAA,YAAY,EAAEpB,SAAS,CAAC2B,KAAV,CAAgBtB,WAAW,CAACL,SAA5B;AATY,CAA5B;AAYA,eAAegB,eAAf","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 SelectMultiple from '../../molecule/select-multiple';\nimport Card from '../../molecule/card';\nimport InputSwitch from '../../atom/input-switch';\nimport style from './style.css';\n\nconst buildResultView = (courses, coursesSelectionAriaLabel, emptyMessages) => {\n if (isEmpty(courses)) {\n return <EmptySearchResult {...emptyMessages} />;\n }\n\n const items = courses.map((card, index) => {\n return (\n <li className={style.cards} key={`card-${index}`} data-name={`course-${index}`}>\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 'courses-selection-aria-label': coursesSelectionAriaLabel,\n switchButton\n } = props;\n\n const resultView = buildResultView(courses, coursesSelectionAriaLabel, emptyMessages);\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}>{resultView}</div>\n </div>\n );\n};\n\nCourseSelection.propTypes = {\n search: PropTypes.shape(Search.PropTypes),\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"}
@@ -9,6 +9,8 @@
9
9
 
10
10
  .filters {
11
11
  display: flex;
12
+ align-items: center;
13
+ justify-content: space-between;
12
14
  }
13
15
 
14
16
  .search {
@@ -19,7 +21,6 @@
19
21
  .contentFilter {
20
22
  width: 24%;
21
23
  min-width: 181px;
22
- margin: 0 0 0 16px;
23
24
  }
24
25
 
25
26
  .cardsContainer {
@@ -54,7 +54,15 @@ export default {
54
54
  }), _extends({}, Scorm.props, {
55
55
  isSelected: false,
56
56
  title: 'Scorm course'
57
- })]
57
+ })],
58
+ switchButton: {
59
+ type: 'switch',
60
+ title: 'Show selected courses only',
61
+ value: false,
62
+ onChange: value => console.log(value),
63
+ titlePosition: 'right',
64
+ theme: 'coorpmanager'
65
+ }
58
66
  }
59
67
  };
60
68
  //# sourceMappingURL=default.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/organism/course-selection/test/fixtures/default.js"],"names":["UnSelectedCard","SelectedCard","Article","Scorm","ExternalContent","props","search","title","placeholder","value","description","onChange","console","log","contentTypeFilter","type","theme","size","options","name","selected","multiple","courses","isSelected"],"mappings":";;AAAA,OAAOA,cAAP,MAA2B,0DAA3B;AACA,OAAOC,YAAP,MAAyB,yDAAzB;AACA,OAAOC,OAAP,MAAoB,iDAApB;AACA,OAAOC,KAAP,MAAkB,+CAAlB;AACA,OAAOC,eAAP,MAA4B,0DAA5B;AAEA,eAAe;AACbC,EAAAA,KAAK,EAAE;AACLC,IAAAA,MAAM,EAAE;AACNC,MAAAA,KAAK,EAAE,WADD;AAENC,MAAAA,WAAW,EAAE,WAFP;AAGNC,MAAAA,KAAK,EAAE,EAHD;AAINC,MAAAA,WAAW,EAAE,4BAJP;AAKNC,MAAAA,QAAQ,EAAEF,KAAK,IAAIG,OAAO,CAACC,GAAR,CAAYJ,KAAZ;AALb,KADH;AAQLK,IAAAA,iBAAiB,EAAE;AACjBC,MAAAA,IAAI,EAAE,gBADW;AAEjBR,MAAAA,KAAK,EAAE,cAFU;AAGjBC,MAAAA,WAAW,EAAE,cAHI;AAIjBE,MAAAA,WAAW,EAAE,0BAJI;AAKjBM,MAAAA,KAAK,EAAE,cALU;AAMjBC,MAAAA,IAAI,EAAE,SANW;AAOjBC,MAAAA,OAAO,EAAE,CACP;AACEC,QAAAA,IAAI,EAAE,QADR;AAEEV,QAAAA,KAAK,EAAE,QAFT;AAGEW,QAAAA,QAAQ,EAAE;AAHZ,OADO,EAMP;AACED,QAAAA,IAAI,EAAE,aADR;AAEEV,QAAAA,KAAK,EAAE,SAFT;AAGEW,QAAAA,QAAQ,EAAE;AAHZ,OANO,EAWP;AACED,QAAAA,IAAI,EAAE,oBADR;AAEEV,QAAAA,KAAK,EAAE,OAFT;AAGEW,QAAAA,QAAQ,EAAE;AAHZ,OAXO,EAgBP;AACED,QAAAA,IAAI,EAAE,OADR;AAEEV,QAAAA,KAAK,EAAE,OAFT;AAGEW,QAAAA,QAAQ,EAAE;AAHZ,OAhBO,CAPQ;AA6BjBC,MAAAA,QAAQ,EAAE;AA7BO,KARd;AAuCL,oCAAgC,iBAvC3B;AAwCLC,IAAAA,OAAO,EAAE,CACPrB,YAAY,CAACI,KADN,EAEPL,cAAc,CAACK,KAFR,eAGHH,OAAO,CAACG,KAHL;AAGYkB,MAAAA,UAAU,EAAE;AAHxB,QAIPtB,YAAY,CAACI,KAJN,eAKHF,KAAK,CAACE,KALH;AAKUkB,MAAAA,UAAU,EAAE;AALtB,qBAMHvB,cAAc,CAACK,KANZ;AAMmBkB,MAAAA,UAAU,EAAE,KAN/B;AAMsChB,MAAAA,KAAK,EAAE;AAN7C,qBAOHH,eAAe,CAACC,KAPb;AAOoBkB,MAAAA,UAAU,EAAE,KAPhC;AAOuChB,MAAAA,KAAK,EAAE;AAP9C,qBAQHJ,KAAK,CAACE,KARH;AAQUkB,MAAAA,UAAU,EAAE,KARtB;AAQ6BhB,MAAAA,KAAK,EAAE;AARpC;AAxCJ;AADM,CAAf","sourcesContent":["import UnSelectedCard from '../../../../molecule/card/test/fixtures/selectable-false';\nimport SelectedCard from '../../../../molecule/card/test/fixtures/selectable-true';\nimport Article from '../../../../molecule/card/test/fixtures/article';\nimport Scorm from '../../../../molecule/card/test/fixtures/scorm';\nimport ExternalContent from '../../../../molecule/card/test/fixtures/external-content';\n\nexport default {\n props: {\n search: {\n title: 'Search...',\n placeholder: 'Search...',\n value: '',\n description: 'Type to filter the courses',\n onChange: value => console.log(value)\n },\n contentTypeFilter: {\n type: 'selectMultiple',\n title: 'Content type',\n placeholder: 'Content type',\n description: 'This filters the courses',\n theme: 'coorpmanager',\n size: 'default',\n options: [\n {\n name: 'Course',\n value: 'course',\n selected: true\n },\n {\n name: \"5' learning\",\n value: 'chapter',\n selected: false\n },\n {\n name: 'Interactive slides',\n value: 'scorm',\n selected: false\n },\n {\n name: 'Video',\n value: 'video',\n selected: false\n }\n ],\n multiple: false\n },\n 'courses-selection-aria-label': 'Courses results',\n courses: [\n SelectedCard.props,\n UnSelectedCard.props,\n {...Article.props, isSelected: false},\n SelectedCard.props,\n {...Scorm.props, isSelected: true},\n {...UnSelectedCard.props, isSelected: false, title: 'Standard course'},\n {...ExternalContent.props, isSelected: false, title: 'External course'},\n {...Scorm.props, isSelected: false, title: 'Scorm course'}\n ]\n }\n};\n"],"file":"default.js"}
1
+ {"version":3,"sources":["../../../../../src/organism/course-selection/test/fixtures/default.js"],"names":["UnSelectedCard","SelectedCard","Article","Scorm","ExternalContent","props","search","title","placeholder","value","description","onChange","console","log","contentTypeFilter","type","theme","size","options","name","selected","multiple","courses","isSelected","switchButton","titlePosition"],"mappings":";;AAAA,OAAOA,cAAP,MAA2B,0DAA3B;AACA,OAAOC,YAAP,MAAyB,yDAAzB;AACA,OAAOC,OAAP,MAAoB,iDAApB;AACA,OAAOC,KAAP,MAAkB,+CAAlB;AACA,OAAOC,eAAP,MAA4B,0DAA5B;AAEA,eAAe;AACbC,EAAAA,KAAK,EAAE;AACLC,IAAAA,MAAM,EAAE;AACNC,MAAAA,KAAK,EAAE,WADD;AAENC,MAAAA,WAAW,EAAE,WAFP;AAGNC,MAAAA,KAAK,EAAE,EAHD;AAINC,MAAAA,WAAW,EAAE,4BAJP;AAKNC,MAAAA,QAAQ,EAAEF,KAAK,IAAIG,OAAO,CAACC,GAAR,CAAYJ,KAAZ;AALb,KADH;AAQLK,IAAAA,iBAAiB,EAAE;AACjBC,MAAAA,IAAI,EAAE,gBADW;AAEjBR,MAAAA,KAAK,EAAE,cAFU;AAGjBC,MAAAA,WAAW,EAAE,cAHI;AAIjBE,MAAAA,WAAW,EAAE,0BAJI;AAKjBM,MAAAA,KAAK,EAAE,cALU;AAMjBC,MAAAA,IAAI,EAAE,SANW;AAOjBC,MAAAA,OAAO,EAAE,CACP;AACEC,QAAAA,IAAI,EAAE,QADR;AAEEV,QAAAA,KAAK,EAAE,QAFT;AAGEW,QAAAA,QAAQ,EAAE;AAHZ,OADO,EAMP;AACED,QAAAA,IAAI,EAAE,aADR;AAEEV,QAAAA,KAAK,EAAE,SAFT;AAGEW,QAAAA,QAAQ,EAAE;AAHZ,OANO,EAWP;AACED,QAAAA,IAAI,EAAE,oBADR;AAEEV,QAAAA,KAAK,EAAE,OAFT;AAGEW,QAAAA,QAAQ,EAAE;AAHZ,OAXO,EAgBP;AACED,QAAAA,IAAI,EAAE,OADR;AAEEV,QAAAA,KAAK,EAAE,OAFT;AAGEW,QAAAA,QAAQ,EAAE;AAHZ,OAhBO,CAPQ;AA6BjBC,MAAAA,QAAQ,EAAE;AA7BO,KARd;AAuCL,oCAAgC,iBAvC3B;AAwCLC,IAAAA,OAAO,EAAE,CACPrB,YAAY,CAACI,KADN,EAEPL,cAAc,CAACK,KAFR,eAGHH,OAAO,CAACG,KAHL;AAGYkB,MAAAA,UAAU,EAAE;AAHxB,QAIPtB,YAAY,CAACI,KAJN,eAKHF,KAAK,CAACE,KALH;AAKUkB,MAAAA,UAAU,EAAE;AALtB,qBAMHvB,cAAc,CAACK,KANZ;AAMmBkB,MAAAA,UAAU,EAAE,KAN/B;AAMsChB,MAAAA,KAAK,EAAE;AAN7C,qBAOHH,eAAe,CAACC,KAPb;AAOoBkB,MAAAA,UAAU,EAAE,KAPhC;AAOuChB,MAAAA,KAAK,EAAE;AAP9C,qBAQHJ,KAAK,CAACE,KARH;AAQUkB,MAAAA,UAAU,EAAE,KARtB;AAQ6BhB,MAAAA,KAAK,EAAE;AARpC,OAxCJ;AAkDLiB,IAAAA,YAAY,EAAE;AACZT,MAAAA,IAAI,EAAE,QADM;AAEZR,MAAAA,KAAK,EAAE,4BAFK;AAGZE,MAAAA,KAAK,EAAE,KAHK;AAIZE,MAAAA,QAAQ,EAAEF,KAAK,IAAIG,OAAO,CAACC,GAAR,CAAYJ,KAAZ,CAJP;AAKZgB,MAAAA,aAAa,EAAE,OALH;AAMZT,MAAAA,KAAK,EAAE;AANK;AAlDT;AADM,CAAf","sourcesContent":["import UnSelectedCard from '../../../../molecule/card/test/fixtures/selectable-false';\nimport SelectedCard from '../../../../molecule/card/test/fixtures/selectable-true';\nimport Article from '../../../../molecule/card/test/fixtures/article';\nimport Scorm from '../../../../molecule/card/test/fixtures/scorm';\nimport ExternalContent from '../../../../molecule/card/test/fixtures/external-content';\n\nexport default {\n props: {\n search: {\n title: 'Search...',\n placeholder: 'Search...',\n value: '',\n description: 'Type to filter the courses',\n onChange: value => console.log(value)\n },\n contentTypeFilter: {\n type: 'selectMultiple',\n title: 'Content type',\n placeholder: 'Content type',\n description: 'This filters the courses',\n theme: 'coorpmanager',\n size: 'default',\n options: [\n {\n name: 'Course',\n value: 'course',\n selected: true\n },\n {\n name: \"5' learning\",\n value: 'chapter',\n selected: false\n },\n {\n name: 'Interactive slides',\n value: 'scorm',\n selected: false\n },\n {\n name: 'Video',\n value: 'video',\n selected: false\n }\n ],\n multiple: false\n },\n 'courses-selection-aria-label': 'Courses results',\n courses: [\n SelectedCard.props,\n UnSelectedCard.props,\n {...Article.props, isSelected: false},\n SelectedCard.props,\n {...Scorm.props, isSelected: true},\n {...UnSelectedCard.props, isSelected: false, title: 'Standard course'},\n {...ExternalContent.props, isSelected: false, title: 'External course'},\n {...Scorm.props, isSelected: false, title: 'Scorm course'}\n ],\n switchButton: {\n type: 'switch',\n title: 'Show selected courses only',\n value: false,\n onChange: value => console.log(value),\n titlePosition: 'right',\n theme: 'coorpmanager'\n }\n }\n};\n"],"file":"default.js"}
@@ -12,6 +12,15 @@ export default {
12
12
  emptyMessages: {
13
13
  firstMessage: 'No results...',
14
14
  secondMessage: 'Try something else'
15
+ },
16
+ switchButton: {
17
+ type: 'switch',
18
+ title: 'Show selected courses only',
19
+ value: false,
20
+ onChange: value => console.log(value),
21
+ titlePosition: 'right',
22
+ disabled: true,
23
+ theme: 'coorpmanager'
15
24
  }
16
25
  }
17
26
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/organism/course-selection/test/fixtures/empty.js"],"names":["props","search","title","placeholder","value","description","onChange","console","log","courses","emptyMessages","firstMessage","secondMessage"],"mappings":"AAAA,eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,MAAM,EAAE;AACNC,MAAAA,KAAK,EAAE,WADD;AAENC,MAAAA,WAAW,EAAE,WAFP;AAGNC,MAAAA,KAAK,EAAE,QAHD;AAINC,MAAAA,WAAW,EAAE,0BAJP;AAKNC,MAAAA,QAAQ,EAAEF,KAAK,IAAIG,OAAO,CAACC,GAAR,CAAYJ,KAAZ;AALb,KADH;AAQL,oCAAgC,iBAR3B;AASLK,IAAAA,OAAO,EAAE,EATJ;AAULC,IAAAA,aAAa,EAAE;AACbC,MAAAA,YAAY,EAAE,eADD;AAEbC,MAAAA,aAAa,EAAE;AAFF;AAVV;AADM,CAAf","sourcesContent":["export default {\n props: {\n search: {\n title: 'Search...',\n placeholder: 'Search...',\n value: 'Xoxoxo',\n description: 'Type to find the courses',\n onChange: value => console.log(value)\n },\n 'courses-selection-aria-label': 'Courses results',\n courses: [],\n emptyMessages: {\n firstMessage: 'No results...',\n secondMessage: 'Try something else'\n }\n }\n};\n"],"file":"empty.js"}
1
+ {"version":3,"sources":["../../../../../src/organism/course-selection/test/fixtures/empty.js"],"names":["props","search","title","placeholder","value","description","onChange","console","log","courses","emptyMessages","firstMessage","secondMessage","switchButton","type","titlePosition","disabled","theme"],"mappings":"AAAA,eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,MAAM,EAAE;AACNC,MAAAA,KAAK,EAAE,WADD;AAENC,MAAAA,WAAW,EAAE,WAFP;AAGNC,MAAAA,KAAK,EAAE,QAHD;AAINC,MAAAA,WAAW,EAAE,0BAJP;AAKNC,MAAAA,QAAQ,EAAEF,KAAK,IAAIG,OAAO,CAACC,GAAR,CAAYJ,KAAZ;AALb,KADH;AAQL,oCAAgC,iBAR3B;AASLK,IAAAA,OAAO,EAAE,EATJ;AAULC,IAAAA,aAAa,EAAE;AACbC,MAAAA,YAAY,EAAE,eADD;AAEbC,MAAAA,aAAa,EAAE;AAFF,KAVV;AAcLC,IAAAA,YAAY,EAAE;AACZC,MAAAA,IAAI,EAAE,QADM;AAEZZ,MAAAA,KAAK,EAAE,4BAFK;AAGZE,MAAAA,KAAK,EAAE,KAHK;AAIZE,MAAAA,QAAQ,EAAEF,KAAK,IAAIG,OAAO,CAACC,GAAR,CAAYJ,KAAZ,CAJP;AAKZW,MAAAA,aAAa,EAAE,OALH;AAMZC,MAAAA,QAAQ,EAAE,IANE;AAOZC,MAAAA,KAAK,EAAE;AAPK;AAdT;AADM,CAAf","sourcesContent":["export default {\n props: {\n search: {\n title: 'Search...',\n placeholder: 'Search...',\n value: 'Xoxoxo',\n description: 'Type to find the courses',\n onChange: value => console.log(value)\n },\n 'courses-selection-aria-label': 'Courses results',\n courses: [],\n emptyMessages: {\n firstMessage: 'No results...',\n secondMessage: 'Try something else'\n },\n switchButton: {\n type: 'switch',\n title: 'Show selected courses only',\n value: false,\n onChange: value => console.log(value),\n titlePosition: 'right',\n disabled: true,\n theme: 'coorpmanager'\n }\n }\n};\n"],"file":"empty.js"}
@@ -18,7 +18,15 @@ export default {
18
18
  isSelected: true
19
19
  }), SelectedCard.props, UnSelectedCard.props, _extends({}, Article.props, {
20
20
  isSelected: false
21
- })]
21
+ })],
22
+ switchButton: {
23
+ type: 'switch',
24
+ title: 'Show selected courses only',
25
+ value: false,
26
+ onChange: value => console.log(value),
27
+ titlePosition: 'right',
28
+ theme: 'coorpmanager'
29
+ }
22
30
  }
23
31
  };
24
32
  //# sourceMappingURL=filtered.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/organism/course-selection/test/fixtures/filtered.js"],"names":["UnSelectedCard","SelectedCard","Article","Scorm","props","search","title","placeholder","value","description","onChange","console","log","courses","isSelected"],"mappings":";;AAAA,OAAOA,cAAP,MAA2B,0DAA3B;AACA,OAAOC,YAAP,MAAyB,yDAAzB;AACA,OAAOC,OAAP,MAAoB,iDAApB;AACA,OAAOC,KAAP,MAAkB,+CAAlB;AAEA,eAAe;AACbC,EAAAA,KAAK,EAAE;AACLC,IAAAA,MAAM,EAAE;AACNC,MAAAA,KAAK,EAAE,WADD;AAENC,MAAAA,WAAW,EAAE,WAFP;AAGNC,MAAAA,KAAK,EAAE,MAHD;AAINC,MAAAA,WAAW,EAAE,4BAJP;AAKNC,MAAAA,QAAQ,EAAEF,KAAK,IAAIG,OAAO,CAACC,GAAR,CAAYJ,KAAZ;AALb,KADH;AAQL,oCAAgC,iBAR3B;AASLK,IAAAA,OAAO,EAAE,CACPZ,YAAY,CAACG,KADN,eAEHD,KAAK,CAACC,KAFH;AAEUU,MAAAA,UAAU,EAAE;AAFtB,QAGPb,YAAY,CAACG,KAHN,EAIPJ,cAAc,CAACI,KAJR,eAKHF,OAAO,CAACE,KALL;AAKYU,MAAAA,UAAU,EAAE;AALxB;AATJ;AADM,CAAf","sourcesContent":["import UnSelectedCard from '../../../../molecule/card/test/fixtures/selectable-false';\nimport SelectedCard from '../../../../molecule/card/test/fixtures/selectable-true';\nimport Article from '../../../../molecule/card/test/fixtures/article';\nimport Scorm from '../../../../molecule/card/test/fixtures/scorm';\n\nexport default {\n props: {\n search: {\n title: 'Search...',\n placeholder: 'Search...',\n value: 'from',\n description: 'Type to filter the courses',\n onChange: value => console.log(value)\n },\n 'courses-selection-aria-label': 'Courses results',\n courses: [\n SelectedCard.props,\n {...Scorm.props, isSelected: true},\n SelectedCard.props,\n UnSelectedCard.props,\n {...Article.props, isSelected: false}\n ]\n }\n};\n"],"file":"filtered.js"}
1
+ {"version":3,"sources":["../../../../../src/organism/course-selection/test/fixtures/filtered.js"],"names":["UnSelectedCard","SelectedCard","Article","Scorm","props","search","title","placeholder","value","description","onChange","console","log","courses","isSelected","switchButton","type","titlePosition","theme"],"mappings":";;AAAA,OAAOA,cAAP,MAA2B,0DAA3B;AACA,OAAOC,YAAP,MAAyB,yDAAzB;AACA,OAAOC,OAAP,MAAoB,iDAApB;AACA,OAAOC,KAAP,MAAkB,+CAAlB;AAEA,eAAe;AACbC,EAAAA,KAAK,EAAE;AACLC,IAAAA,MAAM,EAAE;AACNC,MAAAA,KAAK,EAAE,WADD;AAENC,MAAAA,WAAW,EAAE,WAFP;AAGNC,MAAAA,KAAK,EAAE,MAHD;AAINC,MAAAA,WAAW,EAAE,4BAJP;AAKNC,MAAAA,QAAQ,EAAEF,KAAK,IAAIG,OAAO,CAACC,GAAR,CAAYJ,KAAZ;AALb,KADH;AAQL,oCAAgC,iBAR3B;AASLK,IAAAA,OAAO,EAAE,CACPZ,YAAY,CAACG,KADN,eAEHD,KAAK,CAACC,KAFH;AAEUU,MAAAA,UAAU,EAAE;AAFtB,QAGPb,YAAY,CAACG,KAHN,EAIPJ,cAAc,CAACI,KAJR,eAKHF,OAAO,CAACE,KALL;AAKYU,MAAAA,UAAU,EAAE;AALxB,OATJ;AAgBLC,IAAAA,YAAY,EAAE;AACZC,MAAAA,IAAI,EAAE,QADM;AAEZV,MAAAA,KAAK,EAAE,4BAFK;AAGZE,MAAAA,KAAK,EAAE,KAHK;AAIZE,MAAAA,QAAQ,EAAEF,KAAK,IAAIG,OAAO,CAACC,GAAR,CAAYJ,KAAZ,CAJP;AAKZS,MAAAA,aAAa,EAAE,OALH;AAMZC,MAAAA,KAAK,EAAE;AANK;AAhBT;AADM,CAAf","sourcesContent":["import UnSelectedCard from '../../../../molecule/card/test/fixtures/selectable-false';\nimport SelectedCard from '../../../../molecule/card/test/fixtures/selectable-true';\nimport Article from '../../../../molecule/card/test/fixtures/article';\nimport Scorm from '../../../../molecule/card/test/fixtures/scorm';\n\nexport default {\n props: {\n search: {\n title: 'Search...',\n placeholder: 'Search...',\n value: 'from',\n description: 'Type to filter the courses',\n onChange: value => console.log(value)\n },\n 'courses-selection-aria-label': 'Courses results',\n courses: [\n SelectedCard.props,\n {...Scorm.props, isSelected: true},\n SelectedCard.props,\n UnSelectedCard.props,\n {...Article.props, isSelected: false}\n ],\n switchButton: {\n type: 'switch',\n title: 'Show selected courses only',\n value: false,\n onChange: value => console.log(value),\n titlePosition: 'right',\n theme: 'coorpmanager'\n }\n }\n};\n"],"file":"filtered.js"}
@@ -25,7 +25,15 @@ export default {
25
25
  isSelected: false
26
26
  }), _extends({}, Scorm.props, {
27
27
  isSelected: false
28
- })]
28
+ })],
29
+ switchButton: {
30
+ type: 'switch',
31
+ title: 'Show selected courses only',
32
+ value: false,
33
+ onChange: value => console.log(value),
34
+ titlePosition: 'right',
35
+ theme: 'coorpmanager'
36
+ }
29
37
  }
30
38
  };
31
39
  //# sourceMappingURL=sorted-selected.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/organism/course-selection/test/fixtures/sorted-selected.js"],"names":["UnSelectedCard","SelectedCard","Article","Scorm","ExternalContent","props","search","title","placeholder","value","description","onChange","console","log","courses","isSelected"],"mappings":";;AAAA,OAAOA,cAAP,MAA2B,0DAA3B;AACA,OAAOC,YAAP,MAAyB,yDAAzB;AACA,OAAOC,OAAP,MAAoB,iDAApB;AACA,OAAOC,KAAP,MAAkB,+CAAlB;AACA,OAAOC,eAAP,MAA4B,0DAA5B;AAEA,eAAe;AACbC,EAAAA,KAAK,EAAE;AACLC,IAAAA,MAAM,EAAE;AACNC,MAAAA,KAAK,EAAE,WADD;AAENC,MAAAA,WAAW,EAAE,WAFP;AAGNC,MAAAA,KAAK,EAAE,EAHD;AAINC,MAAAA,WAAW,EAAE,4BAJP;AAKNC,MAAAA,QAAQ,EAAEF,KAAK,IAAIG,OAAO,CAACC,GAAR,CAAYJ,KAAZ;AALb,KADH;AAQL,oCAAgC,iBAR3B;AASLK,IAAAA,OAAO,EAAE,CACPb,YAAY,CAACI,KADN,eAEHF,KAAK,CAACE,KAFH;AAEUU,MAAAA,UAAU,EAAE;AAFtB,QAGPd,YAAY,CAACI,KAHN,EAIPL,cAAc,CAACK,KAJR,eAKHH,OAAO,CAACG,KALL;AAKYU,MAAAA,UAAU,EAAE;AALxB,qBAMHf,cAAc,CAACK,KANZ;AAMmBU,MAAAA,UAAU,EAAE;AAN/B,qBAOHX,eAAe,CAACC,KAPb;AAOoBU,MAAAA,UAAU,EAAE;AAPhC,qBAQHZ,KAAK,CAACE,KARH;AAQUU,MAAAA,UAAU,EAAE;AARtB;AATJ;AADM,CAAf","sourcesContent":["import UnSelectedCard from '../../../../molecule/card/test/fixtures/selectable-false';\nimport SelectedCard from '../../../../molecule/card/test/fixtures/selectable-true';\nimport Article from '../../../../molecule/card/test/fixtures/article';\nimport Scorm from '../../../../molecule/card/test/fixtures/scorm';\nimport ExternalContent from '../../../../molecule/card/test/fixtures/external-content';\n\nexport default {\n props: {\n search: {\n title: 'Search...',\n placeholder: 'Search...',\n value: '',\n description: 'Type to filter the courses',\n onChange: value => console.log(value)\n },\n 'courses-selection-aria-label': 'Courses results',\n courses: [\n SelectedCard.props,\n {...Scorm.props, isSelected: true},\n SelectedCard.props,\n UnSelectedCard.props,\n {...Article.props, isSelected: false},\n {...UnSelectedCard.props, isSelected: false},\n {...ExternalContent.props, isSelected: false},\n {...Scorm.props, isSelected: false}\n ]\n }\n};\n"],"file":"sorted-selected.js"}
1
+ {"version":3,"sources":["../../../../../src/organism/course-selection/test/fixtures/sorted-selected.js"],"names":["UnSelectedCard","SelectedCard","Article","Scorm","ExternalContent","props","search","title","placeholder","value","description","onChange","console","log","courses","isSelected","switchButton","type","titlePosition","theme"],"mappings":";;AAAA,OAAOA,cAAP,MAA2B,0DAA3B;AACA,OAAOC,YAAP,MAAyB,yDAAzB;AACA,OAAOC,OAAP,MAAoB,iDAApB;AACA,OAAOC,KAAP,MAAkB,+CAAlB;AACA,OAAOC,eAAP,MAA4B,0DAA5B;AAEA,eAAe;AACbC,EAAAA,KAAK,EAAE;AACLC,IAAAA,MAAM,EAAE;AACNC,MAAAA,KAAK,EAAE,WADD;AAENC,MAAAA,WAAW,EAAE,WAFP;AAGNC,MAAAA,KAAK,EAAE,EAHD;AAINC,MAAAA,WAAW,EAAE,4BAJP;AAKNC,MAAAA,QAAQ,EAAEF,KAAK,IAAIG,OAAO,CAACC,GAAR,CAAYJ,KAAZ;AALb,KADH;AAQL,oCAAgC,iBAR3B;AASLK,IAAAA,OAAO,EAAE,CACPb,YAAY,CAACI,KADN,eAEHF,KAAK,CAACE,KAFH;AAEUU,MAAAA,UAAU,EAAE;AAFtB,QAGPd,YAAY,CAACI,KAHN,EAIPL,cAAc,CAACK,KAJR,eAKHH,OAAO,CAACG,KALL;AAKYU,MAAAA,UAAU,EAAE;AALxB,qBAMHf,cAAc,CAACK,KANZ;AAMmBU,MAAAA,UAAU,EAAE;AAN/B,qBAOHX,eAAe,CAACC,KAPb;AAOoBU,MAAAA,UAAU,EAAE;AAPhC,qBAQHZ,KAAK,CAACE,KARH;AAQUU,MAAAA,UAAU,EAAE;AARtB,OATJ;AAmBLC,IAAAA,YAAY,EAAE;AACZC,MAAAA,IAAI,EAAE,QADM;AAEZV,MAAAA,KAAK,EAAE,4BAFK;AAGZE,MAAAA,KAAK,EAAE,KAHK;AAIZE,MAAAA,QAAQ,EAAEF,KAAK,IAAIG,OAAO,CAACC,GAAR,CAAYJ,KAAZ,CAJP;AAKZS,MAAAA,aAAa,EAAE,OALH;AAMZC,MAAAA,KAAK,EAAE;AANK;AAnBT;AADM,CAAf","sourcesContent":["import UnSelectedCard from '../../../../molecule/card/test/fixtures/selectable-false';\nimport SelectedCard from '../../../../molecule/card/test/fixtures/selectable-true';\nimport Article from '../../../../molecule/card/test/fixtures/article';\nimport Scorm from '../../../../molecule/card/test/fixtures/scorm';\nimport ExternalContent from '../../../../molecule/card/test/fixtures/external-content';\n\nexport default {\n props: {\n search: {\n title: 'Search...',\n placeholder: 'Search...',\n value: '',\n description: 'Type to filter the courses',\n onChange: value => console.log(value)\n },\n 'courses-selection-aria-label': 'Courses results',\n courses: [\n SelectedCard.props,\n {...Scorm.props, isSelected: true},\n SelectedCard.props,\n UnSelectedCard.props,\n {...Article.props, isSelected: false},\n {...UnSelectedCard.props, isSelected: false},\n {...ExternalContent.props, isSelected: false},\n {...Scorm.props, isSelected: false}\n ],\n switchButton: {\n type: 'switch',\n title: 'Show selected courses only',\n value: false,\n onChange: value => console.log(value),\n titlePosition: 'right',\n theme: 'coorpmanager'\n }\n }\n};\n"],"file":"sorted-selected.js"}
@@ -0,0 +1,23 @@
1
+ import SelectedCard from '../../../../molecule/card/test/fixtures/selectable-true';
2
+ export default {
3
+ props: {
4
+ search: {
5
+ title: 'Search...',
6
+ placeholder: 'Search...',
7
+ value: 'from mass maket to one',
8
+ description: 'Type to filter the courses',
9
+ onChange: value => console.log(value)
10
+ },
11
+ 'courses-selection-aria-label': 'Courses results',
12
+ courses: [SelectedCard.props, SelectedCard.props],
13
+ switchButton: {
14
+ type: 'switch',
15
+ title: 'Show selected courses only',
16
+ value: true,
17
+ onChange: value => console.log(value),
18
+ titlePosition: 'right',
19
+ theme: 'coorpmanager'
20
+ }
21
+ }
22
+ };
23
+ //# sourceMappingURL=switch-activated.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../src/organism/course-selection/test/fixtures/switch-activated.js"],"names":["SelectedCard","props","search","title","placeholder","value","description","onChange","console","log","courses","switchButton","type","titlePosition","theme"],"mappings":"AAAA,OAAOA,YAAP,MAAyB,yDAAzB;AAEA,eAAe;AACbC,EAAAA,KAAK,EAAE;AACLC,IAAAA,MAAM,EAAE;AACNC,MAAAA,KAAK,EAAE,WADD;AAENC,MAAAA,WAAW,EAAE,WAFP;AAGNC,MAAAA,KAAK,EAAE,wBAHD;AAINC,MAAAA,WAAW,EAAE,4BAJP;AAKNC,MAAAA,QAAQ,EAAEF,KAAK,IAAIG,OAAO,CAACC,GAAR,CAAYJ,KAAZ;AALb,KADH;AAQL,oCAAgC,iBAR3B;AASLK,IAAAA,OAAO,EAAE,CAACV,YAAY,CAACC,KAAd,EAAqBD,YAAY,CAACC,KAAlC,CATJ;AAULU,IAAAA,YAAY,EAAE;AACZC,MAAAA,IAAI,EAAE,QADM;AAEZT,MAAAA,KAAK,EAAE,4BAFK;AAGZE,MAAAA,KAAK,EAAE,IAHK;AAIZE,MAAAA,QAAQ,EAAEF,KAAK,IAAIG,OAAO,CAACC,GAAR,CAAYJ,KAAZ,CAJP;AAKZQ,MAAAA,aAAa,EAAE,OALH;AAMZC,MAAAA,KAAK,EAAE;AANK;AAVT;AADM,CAAf","sourcesContent":["import SelectedCard from '../../../../molecule/card/test/fixtures/selectable-true';\n\nexport default {\n props: {\n search: {\n title: 'Search...',\n placeholder: 'Search...',\n value: 'from mass maket to one',\n description: 'Type to filter the courses',\n onChange: value => console.log(value)\n },\n 'courses-selection-aria-label': 'Courses results',\n courses: [SelectedCard.props, SelectedCard.props],\n switchButton: {\n type: 'switch',\n title: 'Show selected courses only',\n value: true,\n onChange: value => console.log(value),\n titlePosition: 'right',\n theme: 'coorpmanager'\n }\n }\n};\n"],"file":"switch-activated.js"}
@@ -25,7 +25,15 @@ export default {
25
25
  isSelected: false
26
26
  }), _extends({}, Scorm.props, {
27
27
  isSelected: false
28
- })]
28
+ })],
29
+ switchButton: {
30
+ type: 'switch',
31
+ title: 'Show selected courses only',
32
+ value: false,
33
+ onChange: value => console.log(value),
34
+ titlePosition: 'right',
35
+ theme: 'coorpmanager'
36
+ }
29
37
  }
30
38
  };
31
39
  //# sourceMappingURL=unsorted-selected.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/organism/course-selection/test/fixtures/unsorted-selected.js"],"names":["UnSelectedCard","SelectedCard","Article","Scorm","ExternalContent","props","search","title","placeholder","value","description","onChange","console","log","courses","isSelected"],"mappings":";;AAAA,OAAOA,cAAP,MAA2B,0DAA3B;AACA,OAAOC,YAAP,MAAyB,yDAAzB;AACA,OAAOC,OAAP,MAAoB,iDAApB;AACA,OAAOC,KAAP,MAAkB,+CAAlB;AACA,OAAOC,eAAP,MAA4B,0DAA5B;AAEA,eAAe;AACbC,EAAAA,KAAK,EAAE;AACLC,IAAAA,MAAM,EAAE;AACNC,MAAAA,KAAK,EAAE,WADD;AAENC,MAAAA,WAAW,EAAE,WAFP;AAGNC,MAAAA,KAAK,EAAE,EAHD;AAINC,MAAAA,WAAW,EAAE,4BAJP;AAKNC,MAAAA,QAAQ,EAAEF,KAAK,IAAIG,OAAO,CAACC,GAAR,CAAYJ,KAAZ;AALb,KADH;AAQL,oCAAgC,iBAR3B;AASLK,IAAAA,OAAO,EAAE,CACPb,YAAY,CAACI,KADN,EAEPL,cAAc,CAACK,KAFR,eAGHH,OAAO,CAACG,KAHL;AAGYU,MAAAA,UAAU,EAAE;AAHxB,QAIPd,YAAY,CAACI,KAJN,eAKHF,KAAK,CAACE,KALH;AAKUU,MAAAA,UAAU,EAAE;AALtB,qBAMHf,cAAc,CAACK,KANZ;AAMmBU,MAAAA,UAAU,EAAE;AAN/B,qBAOHX,eAAe,CAACC,KAPb;AAOoBU,MAAAA,UAAU,EAAE;AAPhC,qBAQHZ,KAAK,CAACE,KARH;AAQUU,MAAAA,UAAU,EAAE;AARtB;AATJ;AADM,CAAf","sourcesContent":["import UnSelectedCard from '../../../../molecule/card/test/fixtures/selectable-false';\nimport SelectedCard from '../../../../molecule/card/test/fixtures/selectable-true';\nimport Article from '../../../../molecule/card/test/fixtures/article';\nimport Scorm from '../../../../molecule/card/test/fixtures/scorm';\nimport ExternalContent from '../../../../molecule/card/test/fixtures/external-content';\n\nexport default {\n props: {\n search: {\n title: 'Search...',\n placeholder: 'Search...',\n value: '',\n description: 'Type to filter the courses',\n onChange: value => console.log(value)\n },\n 'courses-selection-aria-label': 'Courses results',\n courses: [\n SelectedCard.props,\n UnSelectedCard.props,\n {...Article.props, isSelected: false},\n SelectedCard.props,\n {...Scorm.props, isSelected: true},\n {...UnSelectedCard.props, isSelected: false},\n {...ExternalContent.props, isSelected: false},\n {...Scorm.props, isSelected: false}\n ]\n }\n};\n"],"file":"unsorted-selected.js"}
1
+ {"version":3,"sources":["../../../../../src/organism/course-selection/test/fixtures/unsorted-selected.js"],"names":["UnSelectedCard","SelectedCard","Article","Scorm","ExternalContent","props","search","title","placeholder","value","description","onChange","console","log","courses","isSelected","switchButton","type","titlePosition","theme"],"mappings":";;AAAA,OAAOA,cAAP,MAA2B,0DAA3B;AACA,OAAOC,YAAP,MAAyB,yDAAzB;AACA,OAAOC,OAAP,MAAoB,iDAApB;AACA,OAAOC,KAAP,MAAkB,+CAAlB;AACA,OAAOC,eAAP,MAA4B,0DAA5B;AAEA,eAAe;AACbC,EAAAA,KAAK,EAAE;AACLC,IAAAA,MAAM,EAAE;AACNC,MAAAA,KAAK,EAAE,WADD;AAENC,MAAAA,WAAW,EAAE,WAFP;AAGNC,MAAAA,KAAK,EAAE,EAHD;AAINC,MAAAA,WAAW,EAAE,4BAJP;AAKNC,MAAAA,QAAQ,EAAEF,KAAK,IAAIG,OAAO,CAACC,GAAR,CAAYJ,KAAZ;AALb,KADH;AAQL,oCAAgC,iBAR3B;AASLK,IAAAA,OAAO,EAAE,CACPb,YAAY,CAACI,KADN,EAEPL,cAAc,CAACK,KAFR,eAGHH,OAAO,CAACG,KAHL;AAGYU,MAAAA,UAAU,EAAE;AAHxB,QAIPd,YAAY,CAACI,KAJN,eAKHF,KAAK,CAACE,KALH;AAKUU,MAAAA,UAAU,EAAE;AALtB,qBAMHf,cAAc,CAACK,KANZ;AAMmBU,MAAAA,UAAU,EAAE;AAN/B,qBAOHX,eAAe,CAACC,KAPb;AAOoBU,MAAAA,UAAU,EAAE;AAPhC,qBAQHZ,KAAK,CAACE,KARH;AAQUU,MAAAA,UAAU,EAAE;AARtB,OATJ;AAmBLC,IAAAA,YAAY,EAAE;AACZC,MAAAA,IAAI,EAAE,QADM;AAEZV,MAAAA,KAAK,EAAE,4BAFK;AAGZE,MAAAA,KAAK,EAAE,KAHK;AAIZE,MAAAA,QAAQ,EAAEF,KAAK,IAAIG,OAAO,CAACC,GAAR,CAAYJ,KAAZ,CAJP;AAKZS,MAAAA,aAAa,EAAE,OALH;AAMZC,MAAAA,KAAK,EAAE;AANK;AAnBT;AADM,CAAf","sourcesContent":["import UnSelectedCard from '../../../../molecule/card/test/fixtures/selectable-false';\nimport SelectedCard from '../../../../molecule/card/test/fixtures/selectable-true';\nimport Article from '../../../../molecule/card/test/fixtures/article';\nimport Scorm from '../../../../molecule/card/test/fixtures/scorm';\nimport ExternalContent from '../../../../molecule/card/test/fixtures/external-content';\n\nexport default {\n props: {\n search: {\n title: 'Search...',\n placeholder: 'Search...',\n value: '',\n description: 'Type to filter the courses',\n onChange: value => console.log(value)\n },\n 'courses-selection-aria-label': 'Courses results',\n courses: [\n SelectedCard.props,\n UnSelectedCard.props,\n {...Article.props, isSelected: false},\n SelectedCard.props,\n {...Scorm.props, isSelected: true},\n {...UnSelectedCard.props, isSelected: false},\n {...ExternalContent.props, isSelected: false},\n {...Scorm.props, isSelected: false}\n ],\n switchButton: {\n type: 'switch',\n title: 'Show selected courses only',\n value: false,\n onChange: value => console.log(value),\n titlePosition: 'right',\n theme: 'coorpmanager'\n }\n }\n};\n"],"file":"unsorted-selected.js"}
@@ -6,6 +6,7 @@ import fixtureDefault from './fixtures/default';
6
6
  import fixtureEmpty from './fixtures/empty';
7
7
  import fixtureFiltered from './fixtures/filtered';
8
8
  import fixtureSortedSelected from './fixtures/sorted-selected';
9
+ import fixtureSwitchActivated from './fixtures/switch-activated';
9
10
  import fixtureUnsortedSelected from './fixtures/unsorted-selected';
10
11
  test('Organism › OrganismCourseSelection > should have valid propTypes', t => {
11
12
  t.pass();
@@ -17,5 +18,6 @@ test('Organism › OrganismCourseSelection › Default › should be rendered',
17
18
  test('Organism › OrganismCourseSelection › Empty › should be rendered', renderComponentMacro, OrganismCourseSelection, fixtureEmpty);
18
19
  test('Organism › OrganismCourseSelection › Filtered › should be rendered', renderComponentMacro, OrganismCourseSelection, fixtureFiltered);
19
20
  test('Organism › OrganismCourseSelection › SortedSelected › should be rendered', renderComponentMacro, OrganismCourseSelection, fixtureSortedSelected);
21
+ test('Organism › OrganismCourseSelection › SwitchActivated › should be rendered', renderComponentMacro, OrganismCourseSelection, fixtureSwitchActivated);
20
22
  test('Organism › OrganismCourseSelection › UnsortedSelected › should be rendered', renderComponentMacro, OrganismCourseSelection, fixtureUnsortedSelected);
21
23
  //# sourceMappingURL=fixtures.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/organism/course-selection/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","OrganismCourseSelection","fixtureDefault","fixtureEmpty","fixtureFiltered","fixtureSortedSelected","fixtureUnsortedSelected","t","pass","propTypes","value","key","not","undefined"],"mappings":"AAAA,OAAOA,IAAP,MAAiB,KAAjB;AACA,OAAOC,OAAP,MAAoB,gBAApB;AACA,OAAOC,oBAAP,MAAiC,wCAAjC;AACA,OAAOC,uBAAP,MAAoC,IAApC;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,YAAP,MAAyB,kBAAzB;AACA,OAAOC,eAAP,MAA4B,qBAA5B;AACA,OAAOC,qBAAP,MAAkC,4BAAlC;AACA,OAAOC,uBAAP,MAAoC,8BAApC;AAEAR,IAAI,CAAC,kEAAD,EAAqES,CAAC,IAAI;AAC5EA,EAAAA,CAAC,CAACC,IAAF;AACAT,EAAAA,OAAO,CAACE,uBAAuB,CAACQ,SAAzB,EAAoC,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACzDJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,4DAA2DF,GAAI,mEAAxF;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAb,IAAI,CAAC,mEAAD,EAAsEE,oBAAtE,EAA4FC,uBAA5F,EAAqHC,cAArH,CAAJ;AACAJ,IAAI,CAAC,iEAAD,EAAoEE,oBAApE,EAA0FC,uBAA1F,EAAmHE,YAAnH,CAAJ;AACAL,IAAI,CAAC,oEAAD,EAAuEE,oBAAvE,EAA6FC,uBAA7F,EAAsHG,eAAtH,CAAJ;AACAN,IAAI,CAAC,0EAAD,EAA6EE,oBAA7E,EAAmGC,uBAAnG,EAA4HI,qBAA5H,CAAJ;AACAP,IAAI,CAAC,4EAAD,EAA+EE,oBAA/E,EAAqGC,uBAArG,EAA8HK,uBAA9H,CAAJ","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 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 › UnsortedSelected › should be rendered', renderComponentMacro, OrganismCourseSelection, fixtureUnsortedSelected);\n"],"file":"fixtures.js"}
1
+ {"version":3,"sources":["../../../../src/organism/course-selection/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","OrganismCourseSelection","fixtureDefault","fixtureEmpty","fixtureFiltered","fixtureSortedSelected","fixtureSwitchActivated","fixtureUnsortedSelected","t","pass","propTypes","value","key","not","undefined"],"mappings":"AAAA,OAAOA,IAAP,MAAiB,KAAjB;AACA,OAAOC,OAAP,MAAoB,gBAApB;AACA,OAAOC,oBAAP,MAAiC,wCAAjC;AACA,OAAOC,uBAAP,MAAoC,IAApC;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,YAAP,MAAyB,kBAAzB;AACA,OAAOC,eAAP,MAA4B,qBAA5B;AACA,OAAOC,qBAAP,MAAkC,4BAAlC;AACA,OAAOC,sBAAP,MAAmC,6BAAnC;AACA,OAAOC,uBAAP,MAAoC,8BAApC;AAEAT,IAAI,CAAC,kEAAD,EAAqEU,CAAC,IAAI;AAC5EA,EAAAA,CAAC,CAACC,IAAF;AACAV,EAAAA,OAAO,CAACE,uBAAuB,CAACS,SAAzB,EAAoC,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACzDJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,4DAA2DF,GAAI,mEAAxF;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAd,IAAI,CAAC,mEAAD,EAAsEE,oBAAtE,EAA4FC,uBAA5F,EAAqHC,cAArH,CAAJ;AACAJ,IAAI,CAAC,iEAAD,EAAoEE,oBAApE,EAA0FC,uBAA1F,EAAmHE,YAAnH,CAAJ;AACAL,IAAI,CAAC,oEAAD,EAAuEE,oBAAvE,EAA6FC,uBAA7F,EAAsHG,eAAtH,CAAJ;AACAN,IAAI,CAAC,0EAAD,EAA6EE,oBAA7E,EAAmGC,uBAAnG,EAA4HI,qBAA5H,CAAJ;AACAP,IAAI,CAAC,2EAAD,EAA8EE,oBAA9E,EAAoGC,uBAApG,EAA6HK,sBAA7H,CAAJ;AACAR,IAAI,CAAC,4EAAD,EAA+EE,oBAA/E,EAAqGC,uBAArG,EAA8HM,uBAA9H,CAAJ","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"}
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
 
3
3
  exports.__esModule = true;
4
- exports.default = exports.deleteButtonProps = exports.actionButtonProps = void 0;
4
+ exports.deleteButtonProps = exports.default = exports.actionButtonProps = void 0;
5
5
  const actionButtonProps = {
6
6
  'data-name': 'menu-publish-button',
7
7
  label: 'Publish',