@coorpacademy/components 10.13.2 → 10.13.3-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/atom/drag-and-drop/index.js +39 -36
- package/es/atom/drag-and-drop/index.js.map +1 -1
- package/es/atom/drag-and-drop/style.css +110 -75
- package/es/atom/drag-and-drop/test/fixtures/default.js +3 -3
- package/es/atom/drag-and-drop/test/fixtures/default.js.map +1 -1
- package/es/atom/drag-and-drop/test/fixtures/loading.js +2 -1
- package/es/atom/drag-and-drop/test/fixtures/loading.js.map +1 -1
- package/es/atom/drag-and-drop/test/fixtures/with-children.js +1 -0
- package/es/atom/drag-and-drop/test/fixtures/with-children.js.map +1 -1
- package/es/atom/drag-and-drop/test/fixtures/with-image.js +2 -1
- package/es/atom/drag-and-drop/test/fixtures/with-image.js.map +1 -1
- package/es/atom/drag-and-drop/test/fixtures/with-video.js +3 -1
- package/es/atom/drag-and-drop/test/fixtures/with-video.js.map +1 -1
- package/es/atom/drag-and-drop/test/fixtures/withLongDescription.js +9 -0
- package/es/atom/drag-and-drop/test/fixtures/withLongDescription.js.map +1 -0
- package/es/atom/drag-and-drop/test/fixtures.js +2 -0
- package/es/atom/drag-and-drop/test/fixtures.js.map +1 -1
- package/es/atom/loader/style.css +7 -3
- package/es/atom/review-header-step-item/test/fixtures.js +19 -0
- package/es/atom/review-header-step-item/test/fixtures.js.map +1 -0
- package/es/molecule/course-sections/index.js +4 -1
- package/es/molecule/course-sections/index.js.map +1 -1
- package/es/molecule/course-sections/style.css +14 -1
- package/es/molecule/review-header-steps/test/fixtures.js +23 -0
- package/es/molecule/review-header-steps/test/fixtures.js.map +1 -0
- package/es/organism/course-selection/index.js +2 -1
- package/es/organism/course-selection/index.js.map +1 -1
- package/es/organism/course-selection/style.css +12 -3
- package/es/organism/course-selection/test/fixtures/loading.js +9 -0
- package/es/organism/course-selection/test/fixtures/loading.js.map +1 -0
- package/es/organism/course-selection/test/fixtures.js +2 -0
- package/es/organism/course-selection/test/fixtures.js.map +1 -1
- package/es/organism/search-and-chips-results/index.js +2 -1
- package/es/organism/search-and-chips-results/index.js.map +1 -1
- package/es/organism/search-and-chips-results/style.css +10 -3
- package/es/organism/search-and-chips-results/test/fixtures/loading.js +9 -0
- package/es/organism/search-and-chips-results/test/fixtures/loading.js.map +1 -0
- package/es/organism/search-and-chips-results/test/fixtures.js +2 -0
- package/es/organism/search-and-chips-results/test/fixtures.js.map +1 -1
- package/es/template/back-office/brand-update/index.js +5 -2
- package/es/template/back-office/brand-update/index.js.map +1 -1
- package/es/template/back-office/brand-update/style.css +10 -1
- package/es/util/button-icons.js +3 -2
- package/es/util/button-icons.js.map +1 -1
- package/lib/atom/drag-and-drop/index.js +39 -34
- package/lib/atom/drag-and-drop/index.js.map +1 -1
- package/lib/atom/drag-and-drop/style.css +110 -75
- package/lib/atom/drag-and-drop/test/fixtures/default.js +3 -3
- package/lib/atom/drag-and-drop/test/fixtures/default.js.map +1 -1
- package/lib/atom/drag-and-drop/test/fixtures/loading.js +2 -1
- package/lib/atom/drag-and-drop/test/fixtures/loading.js.map +1 -1
- package/lib/atom/drag-and-drop/test/fixtures/with-children.js +1 -0
- package/lib/atom/drag-and-drop/test/fixtures/with-children.js.map +1 -1
- package/lib/atom/drag-and-drop/test/fixtures/with-image.js +2 -1
- package/lib/atom/drag-and-drop/test/fixtures/with-image.js.map +1 -1
- package/lib/atom/drag-and-drop/test/fixtures/with-video.js +3 -1
- package/lib/atom/drag-and-drop/test/fixtures/with-video.js.map +1 -1
- package/lib/atom/drag-and-drop/test/fixtures/withLongDescription.js +18 -0
- package/lib/atom/drag-and-drop/test/fixtures/withLongDescription.js.map +1 -0
- package/lib/atom/drag-and-drop/test/fixtures.js +3 -0
- package/lib/atom/drag-and-drop/test/fixtures.js.map +1 -1
- package/lib/atom/loader/style.css +7 -3
- package/lib/atom/review-header-step-item/test/fixtures.js +31 -0
- package/lib/atom/review-header-step-item/test/fixtures.js.map +1 -0
- package/lib/molecule/course-sections/index.js +4 -1
- package/lib/molecule/course-sections/index.js.map +1 -1
- package/lib/molecule/course-sections/style.css +14 -1
- package/lib/molecule/review-header-steps/test/fixtures.js +37 -0
- package/lib/molecule/review-header-steps/test/fixtures.js.map +1 -0
- package/lib/organism/course-selection/index.js +2 -1
- package/lib/organism/course-selection/index.js.map +1 -1
- package/lib/organism/course-selection/style.css +12 -3
- package/lib/organism/course-selection/test/fixtures/loading.js +19 -0
- package/lib/organism/course-selection/test/fixtures/loading.js.map +1 -0
- package/lib/organism/course-selection/test/fixtures.js +3 -0
- package/lib/organism/course-selection/test/fixtures.js.map +1 -1
- package/lib/organism/search-and-chips-results/index.js +2 -1
- package/lib/organism/search-and-chips-results/index.js.map +1 -1
- package/lib/organism/search-and-chips-results/style.css +10 -3
- package/lib/organism/search-and-chips-results/test/fixtures/loading.js +19 -0
- package/lib/organism/search-and-chips-results/test/fixtures/loading.js.map +1 -0
- package/lib/organism/search-and-chips-results/test/fixtures.js +3 -0
- package/lib/organism/search-and-chips-results/test/fixtures.js.map +1 -1
- package/lib/template/back-office/brand-update/index.js +5 -2
- package/lib/template/back-office/brand-update/index.js.map +1 -1
- package/lib/template/back-office/brand-update/style.css +10 -1
- package/lib/util/button-icons.js +2 -1
- package/lib/util/button-icons.js.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _ava = _interopRequireDefault(require("ava"));
|
|
4
|
+
|
|
5
|
+
var _forEach = _interopRequireDefault(require("lodash/forEach"));
|
|
6
|
+
|
|
7
|
+
var _renderComponent = _interopRequireDefault(require("../../../test/helpers/render-component"));
|
|
8
|
+
|
|
9
|
+
var _ = _interopRequireDefault(require(".."));
|
|
10
|
+
|
|
11
|
+
var _current = _interopRequireDefault(require("./fixtures/current"));
|
|
12
|
+
|
|
13
|
+
var _default = _interopRequireDefault(require("./fixtures/default"));
|
|
14
|
+
|
|
15
|
+
var _right = _interopRequireDefault(require("./fixtures/right"));
|
|
16
|
+
|
|
17
|
+
var _wrong = _interopRequireDefault(require("./fixtures/wrong"));
|
|
18
|
+
|
|
19
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
20
|
+
|
|
21
|
+
(0, _ava.default)('Atom › AtomReviewHeaderStepItem > should have valid propTypes', t => {
|
|
22
|
+
t.pass();
|
|
23
|
+
(0, _forEach.default)(_.default.propTypes, (value, key) => {
|
|
24
|
+
t.not(value, undefined, `PropType for "Atom.AtomReviewHeaderStepItem.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
(0, _ava.default)('Atom › AtomReviewHeaderStepItem › Current › should be rendered', _renderComponent.default, _.default, _current.default);
|
|
28
|
+
(0, _ava.default)('Atom › AtomReviewHeaderStepItem › Default › should be rendered', _renderComponent.default, _.default, _default.default);
|
|
29
|
+
(0, _ava.default)('Atom › AtomReviewHeaderStepItem › Right › should be rendered', _renderComponent.default, _.default, _right.default);
|
|
30
|
+
(0, _ava.default)('Atom › AtomReviewHeaderStepItem › Wrong › should be rendered', _renderComponent.default, _.default, _wrong.default);
|
|
31
|
+
//# sourceMappingURL=fixtures.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/atom/review-header-step-item/test/fixtures.js"],"names":["t","pass","AtomReviewHeaderStepItem","propTypes","value","key","not","undefined","renderComponentMacro","fixtureCurrent","fixtureDefault","fixtureRight","fixtureWrong"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,+DAAL,EAAsEA,CAAC,IAAI;AACzEA,EAAAA,CAAC,CAACC,IAAF;AACA,wBAAQC,UAAyBC,SAAjC,EAA4C,CAACC,KAAD,EAAQC,GAAR,KAAgB;AAC1DL,IAAAA,CAAC,CAACM,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,yDAAwDF,GAAI,mEAArF;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,gEAAL,EAAuEG,wBAAvE,EAA6FN,SAA7F,EAAuHO,gBAAvH;AACA,kBAAK,gEAAL,EAAuED,wBAAvE,EAA6FN,SAA7F,EAAuHQ,gBAAvH;AACA,kBAAK,8DAAL,EAAqEF,wBAArE,EAA2FN,SAA3F,EAAqHS,cAArH;AACA,kBAAK,8DAAL,EAAqEH,wBAArE,EAA2FN,SAA3F,EAAqHU,cAArH","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport AtomReviewHeaderStepItem from '..';\nimport fixtureCurrent from './fixtures/current';\nimport fixtureDefault from './fixtures/default';\nimport fixtureRight from './fixtures/right';\nimport fixtureWrong from './fixtures/wrong';\n\ntest('Atom › AtomReviewHeaderStepItem > should have valid propTypes', t => {\n t.pass();\n forEach(AtomReviewHeaderStepItem.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Atom.AtomReviewHeaderStepItem.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Atom › AtomReviewHeaderStepItem › Current › should be rendered', renderComponentMacro, AtomReviewHeaderStepItem, fixtureCurrent);\ntest('Atom › AtomReviewHeaderStepItem › Default › should be rendered', renderComponentMacro, AtomReviewHeaderStepItem, fixtureDefault);\ntest('Atom › AtomReviewHeaderStepItem › Right › should be rendered', renderComponentMacro, AtomReviewHeaderStepItem, fixtureRight);\ntest('Atom › AtomReviewHeaderStepItem › Wrong › should be rendered', renderComponentMacro, AtomReviewHeaderStepItem, fixtureWrong);\n"],"file":"fixtures.js"}
|
|
@@ -21,7 +21,10 @@ 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",
|
|
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,
|
|
25
28
|
theme: "coorpmanager"
|
|
26
29
|
}));
|
|
27
30
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/molecule/course-sections/index.js"],"names":["Loading","CourseSections","sections","onDrop","isLoading","title","mandatoryCoursesInput","inputTitle","
|
|
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"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _ava = _interopRequireDefault(require("ava"));
|
|
4
|
+
|
|
5
|
+
var _forEach = _interopRequireDefault(require("lodash/forEach"));
|
|
6
|
+
|
|
7
|
+
var _renderComponent = _interopRequireDefault(require("../../../test/helpers/render-component"));
|
|
8
|
+
|
|
9
|
+
var _ = _interopRequireDefault(require(".."));
|
|
10
|
+
|
|
11
|
+
var _allQuestionsOk = _interopRequireDefault(require("./fixtures/all-questions-ok"));
|
|
12
|
+
|
|
13
|
+
var _currentQuestionNoAswered = _interopRequireDefault(require("./fixtures/current-question-no-aswered"));
|
|
14
|
+
|
|
15
|
+
var _currentQuestionWrong = _interopRequireDefault(require("./fixtures/current-question-wrong"));
|
|
16
|
+
|
|
17
|
+
var _firstQuestionCurrentRight = _interopRequireDefault(require("./fixtures/first-question-current-right"));
|
|
18
|
+
|
|
19
|
+
var _noAnsweredQuestion = _interopRequireDefault(require("./fixtures/no-answered-question"));
|
|
20
|
+
|
|
21
|
+
var _questionToRepeat = _interopRequireDefault(require("./fixtures/question-to-repeat"));
|
|
22
|
+
|
|
23
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
24
|
+
|
|
25
|
+
(0, _ava.default)('Molecule › MoleculeReviewHeaderSteps > should have valid propTypes', t => {
|
|
26
|
+
t.pass();
|
|
27
|
+
(0, _forEach.default)(_.default.propTypes, (value, key) => {
|
|
28
|
+
t.not(value, undefined, `PropType for "Molecule.MoleculeReviewHeaderSteps.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
(0, _ava.default)('Molecule › MoleculeReviewHeaderSteps › AllQuestionsOk › should be rendered', _renderComponent.default, _.default, _allQuestionsOk.default);
|
|
32
|
+
(0, _ava.default)('Molecule › MoleculeReviewHeaderSteps › CurrentQuestionNoAswered › should be rendered', _renderComponent.default, _.default, _currentQuestionNoAswered.default);
|
|
33
|
+
(0, _ava.default)('Molecule › MoleculeReviewHeaderSteps › CurrentQuestionWrong › should be rendered', _renderComponent.default, _.default, _currentQuestionWrong.default);
|
|
34
|
+
(0, _ava.default)('Molecule › MoleculeReviewHeaderSteps › FirstQuestionCurrentRight › should be rendered', _renderComponent.default, _.default, _firstQuestionCurrentRight.default);
|
|
35
|
+
(0, _ava.default)('Molecule › MoleculeReviewHeaderSteps › NoAnsweredQuestion › should be rendered', _renderComponent.default, _.default, _noAnsweredQuestion.default);
|
|
36
|
+
(0, _ava.default)('Molecule › MoleculeReviewHeaderSteps › QuestionToRepeat › should be rendered', _renderComponent.default, _.default, _questionToRepeat.default);
|
|
37
|
+
//# sourceMappingURL=fixtures.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/molecule/review-header-steps/test/fixtures.js"],"names":["t","pass","MoleculeReviewHeaderSteps","propTypes","value","key","not","undefined","renderComponentMacro","fixtureAllQuestionsOk","fixtureCurrentQuestionNoAswered","fixtureCurrentQuestionWrong","fixtureFirstQuestionCurrentRight","fixtureNoAnsweredQuestion","fixtureQuestionToRepeat"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,oEAAL,EAA2EA,CAAC,IAAI;AAC9EA,EAAAA,CAAC,CAACC,IAAF;AACA,wBAAQC,UAA0BC,SAAlC,EAA6C,CAACC,KAAD,EAAQC,GAAR,KAAgB;AAC3DL,IAAAA,CAAC,CAACM,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,8DAA6DF,GAAI,mEAA1F;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,4EAAL,EAAmFG,wBAAnF,EAAyGN,SAAzG,EAAoIO,uBAApI;AACA,kBAAK,sFAAL,EAA6FD,wBAA7F,EAAmHN,SAAnH,EAA8IQ,iCAA9I;AACA,kBAAK,kFAAL,EAAyFF,wBAAzF,EAA+GN,SAA/G,EAA0IS,6BAA1I;AACA,kBAAK,uFAAL,EAA8FH,wBAA9F,EAAoHN,SAApH,EAA+IU,kCAA/I;AACA,kBAAK,gFAAL,EAAuFJ,wBAAvF,EAA6GN,SAA7G,EAAwIW,2BAAxI;AACA,kBAAK,8EAAL,EAAqFL,wBAArF,EAA2GN,SAA3G,EAAsIY,yBAAtI","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport MoleculeReviewHeaderSteps from '..';\nimport fixtureAllQuestionsOk from './fixtures/all-questions-ok';\nimport fixtureCurrentQuestionNoAswered from './fixtures/current-question-no-aswered';\nimport fixtureCurrentQuestionWrong from './fixtures/current-question-wrong';\nimport fixtureFirstQuestionCurrentRight from './fixtures/first-question-current-right';\nimport fixtureNoAnsweredQuestion from './fixtures/no-answered-question';\nimport fixtureQuestionToRepeat from './fixtures/question-to-repeat';\n\ntest('Molecule › MoleculeReviewHeaderSteps > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeReviewHeaderSteps.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Molecule.MoleculeReviewHeaderSteps.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Molecule › MoleculeReviewHeaderSteps › AllQuestionsOk › should be rendered', renderComponentMacro, MoleculeReviewHeaderSteps, fixtureAllQuestionsOk);\ntest('Molecule › MoleculeReviewHeaderSteps › CurrentQuestionNoAswered › should be rendered', renderComponentMacro, MoleculeReviewHeaderSteps, fixtureCurrentQuestionNoAswered);\ntest('Molecule › MoleculeReviewHeaderSteps › CurrentQuestionWrong › should be rendered', renderComponentMacro, MoleculeReviewHeaderSteps, fixtureCurrentQuestionWrong);\ntest('Molecule › MoleculeReviewHeaderSteps › FirstQuestionCurrentRight › should be rendered', renderComponentMacro, MoleculeReviewHeaderSteps, fixtureFirstQuestionCurrentRight);\ntest('Molecule › MoleculeReviewHeaderSteps › NoAnsweredQuestion › should be rendered', renderComponentMacro, MoleculeReviewHeaderSteps, fixtureNoAnsweredQuestion);\ntest('Molecule › MoleculeReviewHeaderSteps › QuestionToRepeat › should be rendered', renderComponentMacro, MoleculeReviewHeaderSteps, fixtureQuestionToRepeat);\n"],"file":"fixtures.js"}
|
|
@@ -75,8 +75,9 @@ 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.
|
|
78
|
+
className: _style.default.loaderContainer
|
|
79
79
|
}, /*#__PURE__*/_react.default.createElement(_loader.default, {
|
|
80
|
+
className: _style.default.loader,
|
|
80
81
|
theme: "coorpmanager"
|
|
81
82
|
})) : resultView));
|
|
82
83
|
};
|
|
@@ -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","loader","propTypes","PropTypes","shape","Search","bool","SelectMultiple","arrayOf","Card","string","firstMessage","secondMessage","InputSwitch"],"mappings":";;;;;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C,oBAAD,eAAYA,MAAZ;AAAoB,IAAA,KAAK,EAAC;AAA1B,KADF,CADF,eAIE;AAAK,IAAA,SAAS,EAAEJ,eAAMU;AAAtB,kBACE,6BAAC,uBAAD,EAAoBL,iBAApB,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;
|
|
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,CAACC,IAAD,EAAOC,KAAP,KAAiB;AACzC,UAAMC,KAAK,GAAG,mBAAI,OAAJ,EAAaF,IAAb,CAAd;AACA,UAAMG,IAAI,GAAG,mBAAI,MAAJ,EAAYH,IAAZ,CAAb;AACA,wBACE;AAAI,MAAA,SAAS,EAAEI,eAAMC,KAArB;AAA4B,MAAA,GAAG,EAAG,QAAOJ,KAAM,EAA/C;AAAkD,mBAAY,GAAEE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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"}
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
@value cm_grey_900 from colors;
|
|
5
5
|
|
|
6
6
|
.container {
|
|
7
|
+
height: 100%;
|
|
7
8
|
width: 100%;
|
|
8
9
|
}
|
|
9
10
|
|
|
@@ -26,6 +27,7 @@
|
|
|
26
27
|
|
|
27
28
|
.cardsContainer {
|
|
28
29
|
margin: 24px 0 0 0;
|
|
30
|
+
height: 100%;
|
|
29
31
|
width: 100%;
|
|
30
32
|
}
|
|
31
33
|
|
|
@@ -34,8 +36,15 @@
|
|
|
34
36
|
margin: 0 16px 16px 0px;
|
|
35
37
|
}
|
|
36
38
|
|
|
37
|
-
.
|
|
38
|
-
position: relative;
|
|
39
|
-
min-height: 50vh;
|
|
39
|
+
.loaderContainer {
|
|
40
40
|
width: 100%;
|
|
41
|
+
height: 50vh;
|
|
42
|
+
display: flex;
|
|
43
|
+
align-items: center;
|
|
44
|
+
justify-content: center;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.loader {
|
|
48
|
+
height: 60px;
|
|
49
|
+
width: 60px;
|
|
41
50
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.default = void 0;
|
|
5
|
+
|
|
6
|
+
var _default2 = _interopRequireDefault(require("./default"));
|
|
7
|
+
|
|
8
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
9
|
+
|
|
10
|
+
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); }
|
|
11
|
+
|
|
12
|
+
var _default = _extends(_extends({}, _default2.default), {}, {
|
|
13
|
+
props: _extends(_extends({}, _default2.default.props), {}, {
|
|
14
|
+
isLoading: true
|
|
15
|
+
})
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
exports.default = _default;
|
|
19
|
+
//# sourceMappingURL=loading.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/organism/course-selection/test/fixtures/loading.js"],"names":["props","isLoading"],"mappings":";;;;;AAAA;;;;;;qCAGOA,iB;AACHA,EAAAA,KAAK,wBACEA,kBAAMA,KADR;AAEDC,IAAAA,SAAS,EAAE;AAFV","sourcesContent":["import props from './default';\n\nexport default {\n ...props,\n props: {\n ...props.props,\n isLoading: true\n }\n}\n"],"file":"loading.js"}
|
|
@@ -14,6 +14,8 @@ 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
|
+
|
|
17
19
|
var _sortedSelected = _interopRequireDefault(require("./fixtures/sorted-selected"));
|
|
18
20
|
|
|
19
21
|
var _switchActivated = _interopRequireDefault(require("./fixtures/switch-activated"));
|
|
@@ -31,6 +33,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
31
33
|
(0, _ava.default)('Organism › OrganismCourseSelection › Default › should be rendered', _renderComponent.default, _.default, _default.default);
|
|
32
34
|
(0, _ava.default)('Organism › OrganismCourseSelection › Empty › should be rendered', _renderComponent.default, _.default, _empty.default);
|
|
33
35
|
(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);
|
|
34
37
|
(0, _ava.default)('Organism › OrganismCourseSelection › SortedSelected › should be rendered', _renderComponent.default, _.default, _sortedSelected.default);
|
|
35
38
|
(0, _ava.default)('Organism › OrganismCourseSelection › SwitchActivated › should be rendered', _renderComponent.default, _.default, _switchActivated.default);
|
|
36
39
|
(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","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,
|
|
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"}
|
|
@@ -83,8 +83,9 @@ 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.
|
|
86
|
+
className: _style.default.loaderContainer
|
|
87
87
|
}, /*#__PURE__*/_react.default.createElement(_loader.default, {
|
|
88
|
+
className: _style.default.loader,
|
|
88
89
|
theme: "coorpmanager"
|
|
89
90
|
})) : resultView));
|
|
90
91
|
};
|
|
@@ -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","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;AAIJE,IAAAA,aAJI;AAKJC,IAAAA,SAAS,GAAG,KALR;AAMJ,0BAAsBF;AANlB,MAOFS,KAPJ;AASA,QAAM;AAACG,IAAAA,OAAD;AAAUC,IAAAA,KAAV;AAAiBC,IAAAA,QAAQ,GAAG,KAA5B;AAAmC,kBAAcC;AAAjD,MAA8DJ,eAApE;AACA,QAAMK,UAAU,GAAGlB,eAAe,CAACC,OAAD,EAAUC,gBAAV,EAA4BC,aAA5B,EAA2CC,SAA3C,CAAlC;AACA,QAAMe,WAAW,GAAG;AAClBC,IAAAA,IAAI,EAAE,WADY;AAElBL,IAAAA,KAFkB;AAGlB,kBAAcE,SAHI;AAIlB,iBAAc,mBAJI;AAKlBI,IAAAA,IAAI,EAAE;AACJC,MAAAA,QAAQ,EAAE,OADN;AAEJF,MAAAA,IAAI,EAAE;AAFF,KALY;AASlBN,IAAAA,OATkB;AAUlBE,IAAAA;AAVkB,GAApB;AAaA,sBACE;AAAK,IAAA,SAAS,EAAEP,eAAMc;AAAtB,kBACE;AAAK,IAAA,SAAS,EAAEd,eAAMe;AAAtB,kBACE;AAAK,IAAA,SAAS,EAAEf,eAAMgB;AAAtB,kBACE,6BAAC,mBAAD,EAAgBN,WAAhB,CADF,CADF,eAIE;AAAK,IAAA,SAAS,EAAEV,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;
|
|
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,eA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AAlC;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"}
|
|
@@ -34,8 +34,15 @@
|
|
|
34
34
|
margin: 0 16px 16px 0px;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
.
|
|
38
|
-
position: relative;
|
|
39
|
-
min-height: 50vh;
|
|
37
|
+
.loaderContainer {
|
|
40
38
|
width: 100%;
|
|
39
|
+
height: 50vh;
|
|
40
|
+
display: flex;
|
|
41
|
+
align-items: center;
|
|
42
|
+
justify-content: center;
|
|
41
43
|
}
|
|
44
|
+
|
|
45
|
+
.loader {
|
|
46
|
+
height: 60px;
|
|
47
|
+
width: 60px;
|
|
48
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.default = void 0;
|
|
5
|
+
|
|
6
|
+
var _default2 = _interopRequireDefault(require("./default"));
|
|
7
|
+
|
|
8
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
9
|
+
|
|
10
|
+
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); }
|
|
11
|
+
|
|
12
|
+
var _default = _extends(_extends({}, _default2.default), {}, {
|
|
13
|
+
props: _extends(_extends({}, _default2.default.props), {}, {
|
|
14
|
+
isLoading: true
|
|
15
|
+
})
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
exports.default = _default;
|
|
19
|
+
//# sourceMappingURL=loading.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/organism/search-and-chips-results/test/fixtures/loading.js"],"names":["props","isLoading"],"mappings":";;;;;AAAA;;;;;;qCAGOA,iB;AACHA,EAAAA,KAAK,wBACEA,kBAAMA,KADR;AAEDC,IAAAA,SAAS,EAAE;AAFV","sourcesContent":["import props from './default';\n\nexport default {\n ...props,\n props: {\n ...props.props,\n isLoading: true\n }\n}\n"],"file":"loading.js"}
|
|
@@ -14,6 +14,8 @@ 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
|
+
|
|
17
19
|
var _sortedSelected = _interopRequireDefault(require("./fixtures/sorted-selected"));
|
|
18
20
|
|
|
19
21
|
var _unsortedSelected = _interopRequireDefault(require("./fixtures/unsorted-selected"));
|
|
@@ -29,6 +31,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
29
31
|
(0, _ava.default)('Organism › OrganismSearchAndChipsResults › Default › should be rendered', _renderComponent.default, _.default, _default.default);
|
|
30
32
|
(0, _ava.default)('Organism › OrganismSearchAndChipsResults › Empty › should be rendered', _renderComponent.default, _.default, _empty.default);
|
|
31
33
|
(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);
|
|
32
35
|
(0, _ava.default)('Organism › OrganismSearchAndChipsResults › SortedSelected › should be rendered', _renderComponent.default, _.default, _sortedSelected.default);
|
|
33
36
|
(0, _ava.default)('Organism › OrganismSearchAndChipsResults › UnsortedSelected › should be rendered', _renderComponent.default, _.default, _unsortedSelected.default);
|
|
34
37
|
//# 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","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,
|
|
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"}
|
|
@@ -146,7 +146,10 @@ const buildTabs = items => {
|
|
|
146
146
|
|
|
147
147
|
const buildContentView = content => {
|
|
148
148
|
if (!content) {
|
|
149
|
-
return /*#__PURE__*/_react.default.createElement("div",
|
|
149
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
150
|
+
className: _style.default.loaderContainer
|
|
151
|
+
}, /*#__PURE__*/_react.default.createElement(_loader.default, {
|
|
152
|
+
className: _style.default.loader,
|
|
150
153
|
theme: "coorpmanager"
|
|
151
154
|
}));
|
|
152
155
|
}
|
|
@@ -202,7 +205,7 @@ const BrandUpdate = props => {
|
|
|
202
205
|
const contentView = buildContentView(content);
|
|
203
206
|
const detailsView = buildDetailsView(details);
|
|
204
207
|
const popinView = buildPopin(popin);
|
|
205
|
-
const contentStyle = (0, _classnames.default)([_style.default.content, !(0, _isEmpty.default)(notifications) && _style.default.contentWithNotifications
|
|
208
|
+
const contentStyle = (0, _classnames.default)([_style.default.content, !(0, _isEmpty.default)(notifications) && _style.default.contentWithNotifications]);
|
|
206
209
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
207
210
|
className: _style.default.container
|
|
208
211
|
}, /*#__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","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;;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,GAAG,EAAED,MAAM,CAACE;AAAjB,GACGF,MAAM,CAACG,IAAP,KAAgB,UAAhB,gBACC,6BAAC,qBAAD,eACMH,MADN;AAEE,EAAA,MAAM,EAAEV,QAAQ,CAACU,MAAM,CAACI,QAAR,CAFlB;AAGE,EAAA,SAAS,EAAE,KAHb;AAIE,EAAA,MAAM,EAAE;AAJV,GADD,gBAQC,6BAAC,iBAAD,eAAcJ,MAAd;AAAsB,EAAA,MAAM,EAAEV,QAAQ,CAACU,MAAM,CAACI,QAAR,CAAtC;AAAyD,EAAA,SAAS,EAAE;AAApE,GATJ,CADF,EAaGR,QAbH,CADF,C,CAgBA;;;AACA,MAAMS,mBAAmB,GAAG,CAACC,IAAD,EAAOC,KAAP,EAAcC,WAAd,KAA8B;AACxD,QAAMC,aAAa,GAAGF,KAAK,CAACV,GAAN,CAAU,CAAC;AAACa,IAAAA,GAAD;AAAMR,IAAAA,KAAN;AAAaS,IAAAA,IAAb;AAAmBP,IAAAA,QAAnB;AAA6BD,IAAAA,IAAI,GAAG;AAApC,GAAD,EAAmDS,KAAnD,MAA8D;AAC5FV,IAAAA,KAD4F;AAE5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V,mBAAUE,KAAV,uBACKY,wBAAef,SADpB;AAEE5C,IAAAA,GAAG,EAAE6C,mBAAUK,MAFjB;AAGEzD,IAAAA,IAAI,EAAEoD,mBAAUU,KAAV,CAAgB,CAAC,MAAD,CAAhB;AAHR,KArB2B,EA0B3BV,mBAAUE,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"}
|
|
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,GAAG,EAAED,MAAM,CAACE;AAAjB,GACGF,MAAM,CAACG,IAAP,KAAgB,UAAhB,gBACC,6BAAC,qBAAD,eACMH,MADN;AAEE,EAAA,MAAM,EAAEV,QAAQ,CAACU,MAAM,CAACI,QAAR,CAFlB;AAGE,EAAA,SAAS,EAAE,KAHb;AAIE,EAAA,MAAM,EAAE;AAJV,GADD,gBAQC,6BAAC,iBAAD,eAAcJ,MAAd;AAAsB,EAAA,MAAM,EAAEV,QAAQ,CAACU,MAAM,CAACI,QAAR,CAAtC;AAAyD,EAAA,SAAS,EAAE;AAApE,GATJ,CADF,EAaGR,QAbH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EenC,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"}
|
|
@@ -18,8 +18,17 @@
|
|
|
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
|
+
|
|
21
29
|
.loader {
|
|
22
|
-
height:
|
|
30
|
+
height: 60px;
|
|
31
|
+
width: 60px;
|
|
23
32
|
}
|
|
24
33
|
|
|
25
34
|
.left {
|
package/lib/util/button-icons.js
CHANGED
|
@@ -19,7 +19,8 @@ const ICONS = {
|
|
|
19
19
|
logout: _novaIcons.NovaSolidLoginLogout1,
|
|
20
20
|
publish: _novaIcons.NovaSolidApplicationsWindowUpload3,
|
|
21
21
|
save: _novaIcons.NovaSolidComputersSdCard,
|
|
22
|
-
see: _novaIcons.NovaCompositionCoorpacademyEye
|
|
22
|
+
see: _novaIcons.NovaCompositionCoorpacademyEye,
|
|
23
|
+
folders: _novaIcons.NovaSolidFilesFoldersFolders
|
|
23
24
|
};
|
|
24
25
|
exports.ICONS = ICONS;
|
|
25
26
|
//# 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"],"mappings":";;;;;AAAA;;
|
|
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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coorpacademy/components",
|
|
3
|
-
"version": "10.13.
|
|
3
|
+
"version": "10.13.3-alpha.4+d981ffe6e",
|
|
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": "
|
|
122
|
+
"gitHead": "d981ffe6ed1784246bf5f631f614ec1dd42aa68e"
|
|
123
123
|
}
|