@coorpacademy/components 10.6.1 → 10.8.0
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/button-link/index.js +10 -3
- package/es/atom/button-link/index.js.map +1 -1
- package/es/atom/tag/index.js +1 -1
- package/es/atom/tag/index.js.map +1 -1
- package/es/molecule/cockpit-popin/test/fixtures.js +17 -0
- package/es/molecule/cockpit-popin/test/fixtures.js.map +1 -0
- package/es/molecule/course-section/style.css +2 -2
- package/es/molecule/dashboard/review-banner/test/fixtures.js +13 -0
- package/es/molecule/dashboard/review-banner/test/fixtures.js.map +1 -0
- package/es/molecule/review-correction-popin/index.js +103 -0
- package/es/molecule/review-correction-popin/index.js.map +1 -0
- package/es/molecule/review-correction-popin/style.css +315 -0
- package/es/molecule/review-correction-popin/test/fixtures/right.js +17 -0
- package/es/molecule/review-correction-popin/test/fixtures/right.js.map +1 -0
- package/es/molecule/review-correction-popin/test/fixtures/wrong.js +19 -0
- package/es/molecule/review-correction-popin/test/fixtures/wrong.js.map +1 -0
- package/es/molecule/review-correction-popin/test/fixtures.js +15 -0
- package/es/molecule/review-correction-popin/test/fixtures.js.map +1 -0
- package/es/molecule/search/test/fixtures.js +15 -0
- package/es/molecule/search/test/fixtures.js.map +1 -0
- package/es/organism/list-items/index.js +2 -2
- package/es/organism/list-items/index.js.map +1 -1
- package/es/organism/wizard-contents/index.js +2 -2
- package/es/organism/wizard-contents/index.js.map +1 -1
- package/es/template/back-office/brand-list/index.js +16 -3
- package/es/template/back-office/brand-list/index.js.map +1 -1
- package/es/template/back-office/brand-list/style.css +11 -5
- package/es/template/back-office/brand-list/test/fixtures/default.js +3 -3
- package/es/template/back-office/brand-list/test/fixtures/default.js.map +1 -1
- package/es/template/back-office/brand-list/test/fixtures/rh.js +23 -1
- package/es/template/back-office/brand-list/test/fixtures/rh.js.map +1 -1
- package/es/util/button-icons.js +2 -1
- package/es/util/button-icons.js.map +1 -1
- package/lib/atom/button-link/index.js +11 -3
- package/lib/atom/button-link/index.js.map +1 -1
- package/lib/atom/tag/index.js +1 -1
- package/lib/atom/tag/index.js.map +1 -1
- package/lib/molecule/cockpit-popin/test/fixtures.js +28 -0
- package/lib/molecule/cockpit-popin/test/fixtures.js.map +1 -0
- package/lib/molecule/course-section/style.css +2 -2
- package/lib/molecule/dashboard/review-banner/test/fixtures.js +22 -0
- package/lib/molecule/dashboard/review-banner/test/fixtures.js.map +1 -0
- package/lib/molecule/review-correction-popin/index.js +116 -0
- package/lib/molecule/review-correction-popin/index.js.map +1 -0
- package/lib/molecule/review-correction-popin/style.css +315 -0
- package/lib/molecule/review-correction-popin/test/fixtures/right.js +22 -0
- package/lib/molecule/review-correction-popin/test/fixtures/right.js.map +1 -0
- package/lib/molecule/review-correction-popin/test/fixtures/wrong.js +24 -0
- package/lib/molecule/review-correction-popin/test/fixtures/wrong.js.map +1 -0
- package/lib/molecule/review-correction-popin/test/fixtures.js +25 -0
- package/lib/molecule/review-correction-popin/test/fixtures.js.map +1 -0
- package/lib/molecule/search/test/fixtures.js +25 -0
- package/lib/molecule/search/test/fixtures.js.map +1 -0
- package/lib/organism/list-items/index.js +2 -2
- package/lib/organism/list-items/index.js.map +1 -1
- package/lib/organism/wizard-contents/index.js +2 -2
- package/lib/organism/wizard-contents/index.js.map +1 -1
- package/lib/template/back-office/brand-list/index.js +17 -3
- package/lib/template/back-office/brand-list/index.js.map +1 -1
- package/lib/template/back-office/brand-list/style.css +11 -5
- package/lib/template/back-office/brand-list/test/fixtures/default.js +3 -3
- package/lib/template/back-office/brand-list/test/fixtures/default.js.map +1 -1
- package/lib/template/back-office/brand-list/test/fixtures/rh.js +23 -1
- package/lib/template/back-office/brand-list/test/fixtures/rh.js.map +1 -1
- package/lib/util/button-icons.js +1 -0
- package/lib/util/button-icons.js.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/molecule/review-correction-popin/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","MoleculeReviewCorrectionPopin","fixtureRight","fixtureWrong","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,6BAAP,MAA0C,IAA1C;AACA,OAAOC,YAAP,MAAyB,kBAAzB;AACA,OAAOC,YAAP,MAAyB,kBAAzB;AAEAL,IAAI,CAAC,wEAAD,EAA2EM,CAAC,IAAI;AAClFA,EAAAA,CAAC,CAACC,IAAF;AACAN,EAAAA,OAAO,CAACE,6BAA6B,CAACK,SAA/B,EAA0C,CAACC,KAAD,EAAQC,GAAR,KAAgB;AAC/DJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,kEAAiEF,GAAI,mEAA9F;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAV,IAAI,CAAC,uEAAD,EAA0EE,oBAA1E,EAAgGC,6BAAhG,EAA+HC,YAA/H,CAAJ;AACAJ,IAAI,CAAC,uEAAD,EAA0EE,oBAA1E,EAAgGC,6BAAhG,EAA+HE,YAA/H,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport MoleculeReviewCorrectionPopin from '..';\nimport fixtureRight from './fixtures/right';\nimport fixtureWrong from './fixtures/wrong';\n\ntest('Molecule › MoleculeReviewCorrectionPopin > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeReviewCorrectionPopin.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Molecule.MoleculeReviewCorrectionPopin.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Molecule › MoleculeReviewCorrectionPopin › Right › should be rendered', renderComponentMacro, MoleculeReviewCorrectionPopin, fixtureRight);\ntest('Molecule › MoleculeReviewCorrectionPopin › Wrong › should be rendered', renderComponentMacro, MoleculeReviewCorrectionPopin, fixtureWrong);\n"],"file":"fixtures.js"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import test from 'ava';
|
|
2
|
+
import forEach from 'lodash/forEach';
|
|
3
|
+
import renderComponentMacro from '../../../test/helpers/render-component';
|
|
4
|
+
import MoleculeSearch from '..';
|
|
5
|
+
import fixtureDefault from './fixtures/default';
|
|
6
|
+
import fixtureWithValue from './fixtures/with-value';
|
|
7
|
+
test('Molecule › MoleculeSearch > should have valid propTypes', t => {
|
|
8
|
+
t.pass();
|
|
9
|
+
forEach(MoleculeSearch.propTypes, (value, key) => {
|
|
10
|
+
t.not(value, undefined, `PropType for "Molecule.MoleculeSearch.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
|
|
11
|
+
});
|
|
12
|
+
});
|
|
13
|
+
test('Molecule › MoleculeSearch › Default › should be rendered', renderComponentMacro, MoleculeSearch, fixtureDefault);
|
|
14
|
+
test('Molecule › MoleculeSearch › WithValue › should be rendered', renderComponentMacro, MoleculeSearch, fixtureWithValue);
|
|
15
|
+
//# sourceMappingURL=fixtures.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/molecule/search/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","MoleculeSearch","fixtureDefault","fixtureWithValue","t","pass","propTypes","value","key","not","undefined"],"mappings":"AAAA,OAAOA,IAAP,MAAiB,KAAjB;AACA,OAAOC,OAAP,MAAoB,gBAApB;AACA,OAAOC,oBAAP,MAAiC,wCAAjC;AACA,OAAOC,cAAP,MAA2B,IAA3B;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,gBAAP,MAA6B,uBAA7B;AAEAL,IAAI,CAAC,yDAAD,EAA4DM,CAAC,IAAI;AACnEA,EAAAA,CAAC,CAACC,IAAF;AACAN,EAAAA,OAAO,CAACE,cAAc,CAACK,SAAhB,EAA2B,CAACC,KAAD,EAAQC,GAAR,KAAgB;AAChDJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,mDAAkDF,GAAI,mEAA/E;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAV,IAAI,CAAC,0DAAD,EAA6DE,oBAA7D,EAAmFC,cAAnF,EAAmGC,cAAnG,CAAJ;AACAJ,IAAI,CAAC,4DAAD,EAA+DE,oBAA/D,EAAqFC,cAArF,EAAqGE,gBAArG,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport MoleculeSearch from '..';\nimport fixtureDefault from './fixtures/default';\nimport fixtureWithValue from './fixtures/with-value';\n\ntest('Molecule › MoleculeSearch > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeSearch.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Molecule.MoleculeSearch.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Molecule › MoleculeSearch › Default › should be rendered', renderComponentMacro, MoleculeSearch, fixtureDefault);\ntest('Molecule › MoleculeSearch › WithValue › should be rendered', renderComponentMacro, MoleculeSearch, fixtureWithValue);\n"],"file":"fixtures.js"}
|
|
@@ -14,7 +14,7 @@ const ListItems = ({
|
|
|
14
14
|
const itemsView = items.map((item, index) => /*#__PURE__*/React.createElement("li", {
|
|
15
15
|
key: item.id,
|
|
16
16
|
className: style.item,
|
|
17
|
-
"data-name": `
|
|
17
|
+
"data-name": `content-${index}`
|
|
18
18
|
}, /*#__PURE__*/React.createElement(ListItem, item)));
|
|
19
19
|
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
20
20
|
className: style.header
|
|
@@ -29,7 +29,7 @@ const ListItems = ({
|
|
|
29
29
|
}, /*#__PURE__*/React.createElement(ButtonLink, buttonLink))), /*#__PURE__*/React.createElement("ul", {
|
|
30
30
|
className: style.list,
|
|
31
31
|
"aria-label": ariaLabel,
|
|
32
|
-
"data-name": '
|
|
32
|
+
"data-name": 'content-list'
|
|
33
33
|
}, itemsView));
|
|
34
34
|
};
|
|
35
35
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/organism/list-items/index.js"],"names":["React","PropTypes","ListItem","Title","ButtonLink","style","ListItems","title","buttonLink","items","ariaLabel","itemsView","map","item","index","id","header","buttonCreate","list","propTypes","string","shape","arrayOf"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,QAAP,MAAqB,cAArB;AACA,OAAOC,KAAP,MAAkB,kBAAlB;AACA,OAAOC,UAAP,MAAuB,wBAAvB;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,SAAS,GAAG,CAAC;AAACC,EAAAA,KAAD;AAAQC,EAAAA,UAAR;AAAoBC,EAAAA,KAApB;AAA2B,gBAAcC;AAAzC,CAAD,KAAyD;AACzE,QAAMC,SAAS,GAAGF,KAAK,CAACG,GAAN,CAAU,CAACC,IAAD,EAAOC,KAAP,kBAC1B;AAAI,IAAA,GAAG,EAAED,IAAI,CAACE,EAAd;AAAkB,IAAA,SAAS,EAAEV,KAAK,CAACQ,IAAnC;AAAyC,iBAAY,
|
|
1
|
+
{"version":3,"sources":["../../../src/organism/list-items/index.js"],"names":["React","PropTypes","ListItem","Title","ButtonLink","style","ListItems","title","buttonLink","items","ariaLabel","itemsView","map","item","index","id","header","buttonCreate","list","propTypes","string","shape","arrayOf"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,QAAP,MAAqB,cAArB;AACA,OAAOC,KAAP,MAAkB,kBAAlB;AACA,OAAOC,UAAP,MAAuB,wBAAvB;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,SAAS,GAAG,CAAC;AAACC,EAAAA,KAAD;AAAQC,EAAAA,UAAR;AAAoBC,EAAAA,KAApB;AAA2B,gBAAcC;AAAzC,CAAD,KAAyD;AACzE,QAAMC,SAAS,GAAGF,KAAK,CAACG,GAAN,CAAU,CAACC,IAAD,EAAOC,KAAP,kBAC1B;AAAI,IAAA,GAAG,EAAED,IAAI,CAACE,EAAd;AAAkB,IAAA,SAAS,EAAEV,KAAK,CAACQ,IAAnC;AAAyC,iBAAY,WAAUC,KAAM;AAArE,kBACE,oBAAC,QAAD,EAAcD,IAAd,CADF,CADgB,CAAlB;AAMA,sBACE,8CACE;AAAK,IAAA,SAAS,EAAER,KAAK,CAACW;AAAtB,kBACE;AAAK,IAAA,SAAS,EAAEX,KAAK,CAACE;AAAtB,kBACE,oBAAC,KAAD;AAAO,IAAA,KAAK,EAAEA,KAAd;AAAqB,IAAA,IAAI,EAAE,YAA3B;AAAyC,iBAAW;AAApD,IADF,CADF,eAIE;AAAK,IAAA,SAAS,EAAEF,KAAK,CAACY;AAAtB,kBACE,oBAAC,UAAD,EAAgBT,UAAhB,CADF,CAJF,CADF,eASE;AAAI,IAAA,SAAS,EAAEH,KAAK,CAACa,IAArB;AAA2B,kBAAYR,SAAvC;AAAkD,iBAAW;AAA7D,KACGC,SADH,CATF,CADF;AAeD,CAtBD;;AAwBAL,SAAS,CAACa,SAAV,2CAAsB;AACpB,gBAAclB,SAAS,CAACmB,MADJ;AAEpBZ,EAAAA,UAAU,EAAEP,SAAS,CAACoB,KAAV,CAAgBjB,UAAU,CAACe,SAA3B,CAFQ;AAGpBV,EAAAA,KAAK,EAAER,SAAS,CAACqB,OAAV,CAAkBrB,SAAS,CAACoB,KAAV,CAAgBnB,QAAQ,CAACiB,SAAzB,CAAlB,CAHa;AAIpBZ,EAAAA,KAAK,EAAEN,SAAS,CAACmB;AAJG,CAAtB;AAOA,eAAed,SAAf","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport ListItem from '../list-item';\nimport Title from '../../atom/title';\nimport ButtonLink from '../../atom/button-link';\nimport style from './style.css';\n\nconst ListItems = ({title, buttonLink, items, 'aria-label': ariaLabel}) => {\n const itemsView = items.map((item, index) => (\n <li key={item.id} className={style.item} data-name={`content-${index}`}>\n <ListItem {...item} />\n </li>\n ));\n\n return (\n <div>\n <div className={style.header}>\n <div className={style.title}>\n <Title title={title} type={'form-group'} data-name={'list-title'} />\n </div>\n <div className={style.buttonCreate}>\n <ButtonLink {...buttonLink} />\n </div>\n </div>\n <ul className={style.list} aria-label={ariaLabel} data-name={'content-list'}>\n {itemsView}\n </ul>\n </div>\n );\n};\n\nListItems.propTypes = {\n 'aria-label': PropTypes.string,\n buttonLink: PropTypes.shape(ButtonLink.propTypes),\n items: PropTypes.arrayOf(PropTypes.shape(ListItem.propTypes)),\n title: PropTypes.string\n};\n\nexport default ListItems;\n"],"file":"index.js"}
|
|
@@ -30,7 +30,7 @@ const buildHeader = (wizardHeader, steps) => {
|
|
|
30
30
|
className: style.header
|
|
31
31
|
}, /*#__PURE__*/React.createElement(ButtonLinkIconOnly, buttonCloseIcon), /*#__PURE__*/React.createElement("div", {
|
|
32
32
|
className: style.headerTitle,
|
|
33
|
-
"data-name": '
|
|
33
|
+
"data-name": 'content-title'
|
|
34
34
|
}, title)), /*#__PURE__*/React.createElement(WizardSteps, {
|
|
35
35
|
steps: steps
|
|
36
36
|
}));
|
|
@@ -120,7 +120,7 @@ const WizardContents = props => {
|
|
|
120
120
|
const footerActionView = buildActionZone(previousStep, nextStep, 'footer');
|
|
121
121
|
return /*#__PURE__*/React.createElement("div", {
|
|
122
122
|
className: style.container,
|
|
123
|
-
"data-name": "
|
|
123
|
+
"data-name": "content-summary"
|
|
124
124
|
}, /*#__PURE__*/React.createElement("div", {
|
|
125
125
|
className: style.leftSection
|
|
126
126
|
}, headerView, /*#__PURE__*/React.createElement("div", {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/organism/wizard-contents/index.js"],"names":["React","getOr","PropTypes","ButtonLink","ButtonLinkIconOnly","WizardSteps","WizardSummary","BrandForm","ContentTranslate","OrganismSearchAndChipsResults","CourseSelection","CourseSections","style","buildHeader","wizardHeader","steps","title","onClick","buttonCloseIcon","size","icon","header","headerTitle","buildForm","content","type","buildButton","step","side","ICONS","previous","position","next","publish","label","buttonProps","buildActionZone","previousStep","nextStep","previousButton","nextStepType","nextButton","actionZone","button","WizardContents","props","isLoading","summary","headerView","formView","rightActionView","footerActionView","container","leftSection","form","rightSection","stickySection","summaryZone","footer","summaryFooter","actionFooter","propTypes","bool","shape","string","func","isRequired","oneOfType","oneOf"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,KAAP,MAAkB,iBAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,UAAP,MAAuB,wBAAvB;AACA,OAAOC,kBAAP,MAA+B,kCAA/B;AACA,OAAOC,WAAP,MAAwB,yBAAxB;AACA,OAAOC,aAAP,MAA0B,+BAA1B;AACA,OAAOC,SAAP,MAAsB,eAAtB;AACA,OAAOC,gBAAP,MAA6B,wBAA7B;AACA,OAAOC,6BAAP,MAA0C,6BAA1C;AACA,OAAOC,eAAP,MAA4B,qBAA5B;AACA,OAAOC,cAAP,MAA2B,gCAA3B;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,WAAW,GAAG,CAACC,YAAD,EAAeC,KAAf,KAAyB;AAC3C,QAAM;AAACC,IAAAA,KAAD;AAAQC,IAAAA;AAAR,MAAmBH,YAAzB;AAEA,QAAMI,eAAe,GAAG;AACtBC,IAAAA,IAAI,EAAE,OADgB;AAEtB,iBAAa,cAFS;AAGtB,kBAAc,cAHQ;AAItBC,IAAAA,IAAI,EAAE,OAJgB;AAKtBH,IAAAA;AALsB,GAAxB;AAQA,sBACE,8CACE;AAAK,IAAA,SAAS,EAAEL,KAAK,CAACS;AAAtB,kBACE,oBAAC,kBAAD,EAAwBH,eAAxB,CADF,eAEE;AAAK,IAAA,SAAS,EAAEN,KAAK,CAACU,WAAtB;AAAmC,iBAAW;AA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AGxB/C,IAAAA,OAAO,EAAEf,SAAS,CAAC+D;AAHK,GAAhB;AApCe,CAA3B;AA2CA,eAAerB,cAAf","sourcesContent":["import React from 'react';\nimport getOr from 'lodash/fp/getOr';\nimport PropTypes from 'prop-types';\nimport ButtonLink from '../../atom/button-link';\nimport ButtonLinkIconOnly from '../../atom/button-link-icon-only';\nimport WizardSteps from '../../atom/wizard-steps';\nimport WizardSummary from '../../molecule/wizard-summary';\nimport BrandForm from '../brand-form';\nimport ContentTranslate from '../content-translation';\nimport OrganismSearchAndChipsResults from '../search-and-chips-results';\nimport CourseSelection from '../course-selection';\nimport CourseSections from '../../molecule/course-sections';\nimport style from './style.css';\n\nconst buildHeader = (wizardHeader, steps) => {\n const {title, onClick} = wizardHeader;\n\n const buttonCloseIcon = {\n size: 'small',\n 'data-name': 'close-button',\n 'aria-label': 'close button',\n icon: 'close',\n onClick\n };\n\n return (\n <div>\n <div className={style.header}>\n <ButtonLinkIconOnly {...buttonCloseIcon} />\n <div className={style.headerTitle} data-name={'custom-playlist-title'}>\n {title}\n </div>\n </div>\n <WizardSteps steps={steps} />\n </div>\n );\n};\n\nconst buildForm = content => {\n const {type} = content;\n switch (type) {\n case 'form':\n return <BrandForm {...content} />;\n case 'translate':\n return <ContentTranslate {...content} />;\n case 'populations':\n return <OrganismSearchAndChipsResults {...content} />;\n case 'courses':\n return <CourseSelection {...content} />;\n case 'organize-courses':\n return <CourseSections {...content} />;\n }\n};\n\nconst buildButton = (type, step, side) => {\n const ICONS = {\n previous: {\n position: 'left',\n type: 'chevron-left'\n },\n next: {\n position: 'right',\n type: 'chevron-right'\n },\n publish: {\n position: 'left',\n type: 'publish'\n }\n };\n\n const {label, onClick} = step;\n const buttonProps = {\n type: type === 'previous' ? 'secondary' : 'primary',\n 'aria-label': `${type} step button`,\n 'data-name': `${type}-step-button-${side}`,\n icon: ICONS[type],\n label,\n onClick\n };\n\n return <ButtonLink {...buttonProps} />;\n};\n\nconst buildActionZone = (previousStep, nextStep, side) => {\n const previousButton = previousStep ? buildButton('previous', previousStep, side) : null;\n const nextStepType = getOr('next', 'type', nextStep);\n const nextButton = nextStep ? buildButton(nextStepType, nextStep, side) : null;\n return (\n <div className={style.actionZone}>\n <div className={style.button}>{previousButton}</div>\n <div className={style.button}>{nextButton}</div>\n </div>\n );\n};\n\nconst WizardContents = props => {\n const {isLoading, wizardHeader, steps, summary, content, nextStep, previousStep} = props;\n const headerView = buildHeader(wizardHeader, steps);\n const formView = buildForm({...content, isLoading});\n const rightActionView = buildActionZone(previousStep, nextStep, 'right');\n const footerActionView = buildActionZone(previousStep, nextStep, 'footer');\n\n return (\n <div className={style.container} data-name=\"custom-playlist-summary\">\n <div className={style.leftSection}>\n {headerView}\n <div className={style.form}>{formView}</div>\n </div>\n <div className={style.rightSection} data-name=\"summary-right-section\">\n <div className={style.stickySection}>\n <div className={style.summaryZone} data-name=\"summary-zone\">\n <WizardSummary {...summary} side={'right'} />\n </div>\n {rightActionView}\n </div>\n </div>\n <div className={style.footer} data-name=\"summary-footer-section\">\n <div className={style.summaryFooter}>\n <WizardSummary {...summary} side={'footer'} />\n </div>\n <div className={style.actionFooter}>{footerActionView}</div>\n </div>\n </div>\n );\n};\n\nWizardContents.propTypes = {\n isLoading: PropTypes.bool,\n wizardHeader: PropTypes.shape({\n title: PropTypes.string,\n onClick: PropTypes.func\n }).isRequired,\n steps: WizardSteps.propTypes.steps,\n summary: PropTypes.shape({\n ...WizardSummary.propTypes\n }).isRequired,\n content: PropTypes.oneOfType([\n PropTypes.shape({\n ...BrandForm.propTypes,\n type: PropTypes.oneOf(['form'])\n }),\n PropTypes.shape({\n ...ContentTranslate.propTypes,\n type: PropTypes.oneOf(['translate'])\n }),\n PropTypes.shape({\n ...OrganismSearchAndChipsResults.propTypes,\n type: PropTypes.oneOf(['populations'])\n }),\n PropTypes.shape({\n ...CourseSelection.propTypes,\n type: PropTypes.oneOf(['courses'])\n }),\n PropTypes.shape({\n ...CourseSections.propTypes,\n type: PropTypes.oneOf(['organize-courses'])\n })\n ]),\n previousStep: PropTypes.shape({\n label: PropTypes.string,\n onClick: PropTypes.func\n }),\n nextStep: PropTypes.shape({\n type: PropTypes.oneOf(['next', 'publish']),\n label: PropTypes.string,\n onClick: PropTypes.func\n })\n};\n\nexport default WizardContents;\n"],"file":"index.js"}
|
|
1
|
+
{"version":3,"sources":["../../../src/organism/wizard-contents/index.js"],"names":["React","getOr","PropTypes","ButtonLink","ButtonLinkIconOnly","WizardSteps","WizardSummary","BrandForm","ContentTranslate","OrganismSearchAndChipsResults","CourseSelection","CourseSections","style","buildHeader","wizardHeader","steps","title","onClick","buttonCloseIcon","size","icon","header","headerTitle","buildForm","content","type","buildButton","step","side","ICONS","previous","position","next","publish","label","buttonProps","buildActionZone","previousStep","nextStep","previousButton","nextStepType","nextButton","actionZone","button","WizardContents","props","isLoading","summary","headerView","formView","rightActionView","footerActionView","container","leftSection","form","rightSection","stickySection","summaryZone","footer","summaryFooter","actionFooter","propTypes","bool","shape","string","func","isRequired","oneOfType","oneOf"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,KAAP,MAAkB,iBAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,UAAP,MAAuB,wBAAvB;AACA,OAAOC,kBAAP,MAA+B,kCAA/B;AACA,OAAOC,WAAP,MAAwB,yBAAxB;AACA,OAAOC,aAAP,MAA0B,+BAA1B;AACA,OAAOC,SAAP,MAAsB,eAAtB;AACA,OAAOC,gBAAP,MAA6B,wBAA7B;AACA,OAAOC,6BAAP,MAA0C,6BAA1C;AACA,OAAOC,eAAP,MAA4B,qBAA5B;AACA,OAAOC,cAAP,MAA2B,gCAA3B;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,WAAW,GAAG,CAACC,YAAD,EAAeC,KAAf,KAAyB;AAC3C,QAAM;AAACC,IAAAA,KAAD;AAAQC,IAAAA;AAAR,MAAmBH,YAAzB;AAEA,QAAMI,eAA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7B,IAAAA,KAAK,EAAEhC,SAAS,CAAC8D,MADW;AAE5B/C,IAAAA,OAAO,EAAEf,SAAS,CAAC+D;AAFS,GAAhB,CAhCW;AAoCzB3B,EAAAA,QAAQ,EAAEpC,SAAS,CAAC6D,KAAV,CAAgB;AACxBtC,IAAAA,IAAI,EAAEvB,SAAS,CAACkE,KAAV,CAAgB,CAAC,MAAD,EAAS,SAAT,CAAhB,CADkB;AAExBlC,IAAAA,KAAK,EAAEhC,SAAS,CAAC8D,MAFO;AAGxB/C,IAAAA,OAAO,EAAEf,SAAS,CAAC+D;AAHK,GAAhB;AApCe,CAA3B;AA2CA,eAAerB,cAAf","sourcesContent":["import React from 'react';\nimport getOr from 'lodash/fp/getOr';\nimport PropTypes from 'prop-types';\nimport ButtonLink from '../../atom/button-link';\nimport ButtonLinkIconOnly from '../../atom/button-link-icon-only';\nimport WizardSteps from '../../atom/wizard-steps';\nimport WizardSummary from '../../molecule/wizard-summary';\nimport BrandForm from '../brand-form';\nimport ContentTranslate from '../content-translation';\nimport OrganismSearchAndChipsResults from '../search-and-chips-results';\nimport CourseSelection from '../course-selection';\nimport CourseSections from '../../molecule/course-sections';\nimport style from './style.css';\n\nconst buildHeader = (wizardHeader, steps) => {\n const {title, onClick} = wizardHeader;\n\n const buttonCloseIcon = {\n size: 'small',\n 'data-name': 'close-button',\n 'aria-label': 'close button',\n icon: 'close',\n onClick\n };\n\n return (\n <div>\n <div className={style.header}>\n <ButtonLinkIconOnly {...buttonCloseIcon} />\n <div className={style.headerTitle} data-name={'content-title'}>\n {title}\n </div>\n </div>\n <WizardSteps steps={steps} />\n </div>\n );\n};\n\nconst buildForm = content => {\n const {type} = content;\n switch (type) {\n case 'form':\n return <BrandForm {...content} />;\n case 'translate':\n return <ContentTranslate {...content} />;\n case 'populations':\n return <OrganismSearchAndChipsResults {...content} />;\n case 'courses':\n return <CourseSelection {...content} />;\n case 'organize-courses':\n return <CourseSections {...content} />;\n }\n};\n\nconst buildButton = (type, step, side) => {\n const ICONS = {\n previous: {\n position: 'left',\n type: 'chevron-left'\n },\n next: {\n position: 'right',\n type: 'chevron-right'\n },\n publish: {\n position: 'left',\n type: 'publish'\n }\n };\n\n const {label, onClick} = step;\n const buttonProps = {\n type: type === 'previous' ? 'secondary' : 'primary',\n 'aria-label': `${type} step button`,\n 'data-name': `${type}-step-button-${side}`,\n icon: ICONS[type],\n label,\n onClick\n };\n\n return <ButtonLink {...buttonProps} />;\n};\n\nconst buildActionZone = (previousStep, nextStep, side) => {\n const previousButton = previousStep ? buildButton('previous', previousStep, side) : null;\n const nextStepType = getOr('next', 'type', nextStep);\n const nextButton = nextStep ? buildButton(nextStepType, nextStep, side) : null;\n return (\n <div className={style.actionZone}>\n <div className={style.button}>{previousButton}</div>\n <div className={style.button}>{nextButton}</div>\n </div>\n );\n};\n\nconst WizardContents = props => {\n const {isLoading, wizardHeader, steps, summary, content, nextStep, previousStep} = props;\n const headerView = buildHeader(wizardHeader, steps);\n const formView = buildForm({...content, isLoading});\n const rightActionView = buildActionZone(previousStep, nextStep, 'right');\n const footerActionView = buildActionZone(previousStep, nextStep, 'footer');\n\n return (\n <div className={style.container} data-name=\"content-summary\">\n <div className={style.leftSection}>\n {headerView}\n <div className={style.form}>{formView}</div>\n </div>\n <div className={style.rightSection} data-name=\"summary-right-section\">\n <div className={style.stickySection}>\n <div className={style.summaryZone} data-name=\"summary-zone\">\n <WizardSummary {...summary} side={'right'} />\n </div>\n {rightActionView}\n </div>\n </div>\n <div className={style.footer} data-name=\"summary-footer-section\">\n <div className={style.summaryFooter}>\n <WizardSummary {...summary} side={'footer'} />\n </div>\n <div className={style.actionFooter}>{footerActionView}</div>\n </div>\n </div>\n );\n};\n\nWizardContents.propTypes = {\n isLoading: PropTypes.bool,\n wizardHeader: PropTypes.shape({\n title: PropTypes.string,\n onClick: PropTypes.func\n }).isRequired,\n steps: WizardSteps.propTypes.steps,\n summary: PropTypes.shape({\n ...WizardSummary.propTypes\n }).isRequired,\n content: PropTypes.oneOfType([\n PropTypes.shape({\n ...BrandForm.propTypes,\n type: PropTypes.oneOf(['form'])\n }),\n PropTypes.shape({\n ...ContentTranslate.propTypes,\n type: PropTypes.oneOf(['translate'])\n }),\n PropTypes.shape({\n ...OrganismSearchAndChipsResults.propTypes,\n type: PropTypes.oneOf(['populations'])\n }),\n PropTypes.shape({\n ...CourseSelection.propTypes,\n type: PropTypes.oneOf(['courses'])\n }),\n PropTypes.shape({\n ...CourseSections.propTypes,\n type: PropTypes.oneOf(['organize-courses'])\n })\n ]),\n previousStep: PropTypes.shape({\n label: PropTypes.string,\n onClick: PropTypes.func\n }),\n nextStep: PropTypes.shape({\n type: PropTypes.oneOf(['next', 'publish']),\n label: PropTypes.string,\n onClick: PropTypes.func\n })\n};\n\nexport default WizardContents;\n"],"file":"index.js"}
|
|
@@ -1,11 +1,14 @@
|
|
|
1
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
2
|
|
|
3
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
4
|
+
|
|
3
5
|
import React from 'react';
|
|
4
6
|
import PropTypes from 'prop-types';
|
|
5
7
|
import GridList from '../../../organism/grid-list';
|
|
6
8
|
import BrandCard from '../../../molecule/brand-card';
|
|
7
9
|
import BrandCardCreate from '../../../molecule/brand-card-create';
|
|
8
10
|
import Search from '../../../atom/input-search';
|
|
11
|
+
import Select from '../../../molecule/select-multiple';
|
|
9
12
|
import RadioGroup from '../../../atom/radio-group';
|
|
10
13
|
import Layout from '../layout';
|
|
11
14
|
import style from './style.css';
|
|
@@ -13,9 +16,13 @@ const BrandList = Layout(props => {
|
|
|
13
16
|
const {
|
|
14
17
|
brands = [],
|
|
15
18
|
create,
|
|
16
|
-
search
|
|
19
|
+
search: {
|
|
20
|
+
select
|
|
21
|
+
} = {},
|
|
17
22
|
filter
|
|
18
|
-
} = props
|
|
23
|
+
} = props,
|
|
24
|
+
search = _objectWithoutPropertiesLoose(props.search, ["select"]);
|
|
25
|
+
|
|
19
26
|
const brandCards = brands.map((brand, index) => {
|
|
20
27
|
return /*#__PURE__*/React.createElement("div", {
|
|
21
28
|
key: brand.title,
|
|
@@ -35,10 +42,16 @@ const BrandList = Layout(props => {
|
|
|
35
42
|
}, filter ? /*#__PURE__*/React.createElement("div", {
|
|
36
43
|
className: style.filterBar
|
|
37
44
|
}, /*#__PURE__*/React.createElement(RadioGroup, filter)) : null, /*#__PURE__*/React.createElement("div", {
|
|
45
|
+
className: style.filters
|
|
46
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
38
47
|
className: style.searchBar
|
|
39
48
|
}, /*#__PURE__*/React.createElement(Search, _extends({}, search, {
|
|
40
49
|
theme: "coorpmanager"
|
|
41
|
-
}))), /*#__PURE__*/React.createElement("div", {
|
|
50
|
+
}))), select ? /*#__PURE__*/React.createElement("div", {
|
|
51
|
+
className: style.provider
|
|
52
|
+
}, /*#__PURE__*/React.createElement(Select, _extends({}, select, {
|
|
53
|
+
theme: "coorpmanager"
|
|
54
|
+
}))) : null), /*#__PURE__*/React.createElement("div", {
|
|
42
55
|
className: style.wrapper
|
|
43
56
|
}, /*#__PURE__*/React.createElement(GridList, null, brandCards)));
|
|
44
57
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/template/back-office/brand-list/index.js"],"names":["React","PropTypes","GridList","BrandCard","BrandCardCreate","Search","RadioGroup","Layout","style","BrandList","props","brands","create","search","filter","brandCards","map","brand","index","title","push","container","filterBar","searchBar","wrapper","propTypes","arrayOf","shape"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../../src/template/back-office/brand-list/index.js"],"names":["React","PropTypes","GridList","BrandCard","BrandCardCreate","Search","Select","RadioGroup","Layout","style","BrandList","props","brands","create","search","select","filter","brandCards","map","brand","index","title","push","container","filterBar","filters","searchBar","provider","wrapper","propTypes","arrayOf","shape"],"mappings":";;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,QAAP,MAAqB,6BAArB;AACA,OAAOC,SAAP,MAAsB,8BAAtB;AACA,OAAOC,eAAP,MAA4B,qCAA5B;AACA,OAAOC,MAAP,MAAmB,4BAAnB;AACA,OAAOC,MAAP,MAAmB,mCAAnB;AACA,OAAOC,UAAP,MAAuB,2BAAvB;AACA,OAAOC,MAAP,MAAmB,WAAnB;AACA,OAAOC,KAAP,MAAkB,aAAlB;AAEA,MAAMC,SAAS,GAAGF,MAAM,CAACG,KAAK,IAAI;AAChC,QAAM;AAACC,IAAAA,MAAM,GAAG,EAAV;AAAcC,IAAAA,MAAd;AAAsBC,IAAAA,MAAM,EAAE;AAACC,MAAAA;AAAD,QAAsB,EAApD;AAAwDC,IAAAA;AAAxD,MAAkEL,KAAxE;AAAA,QAAgDG,MAAhD,iCAAwEH,KAAxE,CAA4BG,MAA5B;;AAEA,QAAMG,UAAU,GAAGL,MAAM,CAACM,GAAP,CAAW,CAACC,KAAD,EAAQC,KAAR,KAAkB;AAC9C,wBACE;AAAK,MAAA,GAAG,EAAED,KAAK,CAACE,KAAhB;AAAuB,MAAA,SAAS,EAAEZ,KAAK,CAACU;AAAxC,oBACE,oBAAC,SAAD,EAAeA,KAAf,CADF,CADF;AAKD,GANkB,CAAnB;;AAQA,MAAIN,MAAJ,EAAY;AACVI,IAAAA,UAAU,CAACK,IAAX,eACE;AAAK,MAAA,GAAG,EAAC,KAAT;AAAe,MAAA,SAAS,EAAEb,KAAK,CAACU;AAAhC,oBACE,oBAAC,eAAD,EAAqBN,MAArB,CADF,CADF;AAKD;;AAED,sBACE;AAAK,IAAA,SAAS,EAAEJ,KAAK,CAACc;AAAtB,KACGP,MAAM,gBACL;AAAK,IAAA,SAAS,EAAEP,KAAK,CAACe;AAAtB,kBACE,oBAAC,UAAD,EAAgBR,MAAhB,CADF,CADK,GAIH,IALN,eAME;AAAK,IAAA,SAAS,EAAEP,KAAK,CAACgB;AAAtB,kBACE;AAAK,IAAA,SAAS,EAAEhB,KAAK,CAACiB;AAAtB,kBACE,oBAAC,MAAD,eAAYZ,MAAZ;AAAoB,IAAA,KAAK,EAAC;AAA1B,KADF,CADF,EAIGC,MAAM,gBACL;AAAK,IAAA,SAAS,EAAEN,KAAK,CAACkB;AAAtB,kBACE,oBAAC,MAAD,eAAYZ,MAAZ;AAAoB,IAAA,KAAK,EAAC;AAA1B,KADF,CADK,GAIH,IARN,CANF,eAgBE;AAAK,IAAA,SAAS,EAAEN,KAAK,CAACmB;AAAtB,kBACE,oBAAC,QAAD,QAAWX,UAAX,CADF,CAhBF,CADF;AAsBD,CAzCuB,CAAxB;AA2CAP,SAAS,CAACmB,SAAV,2CAAsB;AACpBjB,EAAAA,MAAM,EAAEX,SAAS,CAAC6B,OAAV,CAAkB7B,SAAS,CAAC8B,KAAV,CAAgB5B,SAAS,CAAC0B,SAA1B,CAAlB,CADY;AAEpBb,EAAAA,MAAM,EAAEf,SAAS,CAAC8B,KAAV,CAAgBxB,UAAU,CAACsB,SAA3B,CAFY;AAGpBf,EAAAA,MAAM,EAAEb,SAAS,CAAC8B,KAAV,CAAgB1B,MAAM,CAACwB,SAAvB,CAHY;AAIpBhB,EAAAA,MAAM,EAAEZ,SAAS,CAAC8B,KAAV,CAAgB3B,eAAe,CAACyB,SAAhC;AAJY,CAAtB;AAOA,eAAenB,SAAf","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport GridList from '../../../organism/grid-list';\nimport BrandCard from '../../../molecule/brand-card';\nimport BrandCardCreate from '../../../molecule/brand-card-create';\nimport Search from '../../../atom/input-search';\nimport Select from '../../../molecule/select-multiple';\nimport RadioGroup from '../../../atom/radio-group';\nimport Layout from '../layout';\nimport style from './style.css';\n\nconst BrandList = Layout(props => {\n const {brands = [], create, search: {select, ...search} = {}, filter} = props;\n\n const brandCards = brands.map((brand, index) => {\n return (\n <div key={brand.title} className={style.brand}>\n <BrandCard {...brand} />\n </div>\n );\n });\n\n if (create) {\n brandCards.push(\n <div key=\"new\" className={style.brand}>\n <BrandCardCreate {...create} />\n </div>\n );\n }\n\n return (\n <div className={style.container}>\n {filter ? (\n <div className={style.filterBar}>\n <RadioGroup {...filter} />\n </div>\n ) : null}\n <div className={style.filters}>\n <div className={style.searchBar}>\n <Search {...search} theme=\"coorpmanager\" />\n </div>\n {select ? (\n <div className={style.provider}>\n <Select {...select} theme=\"coorpmanager\" />\n </div>\n ) : null}\n </div>\n <div className={style.wrapper}>\n <GridList>{brandCards}</GridList>\n </div>\n </div>\n );\n});\n\nBrandList.propTypes = {\n brands: PropTypes.arrayOf(PropTypes.shape(BrandCard.propTypes)),\n filter: PropTypes.shape(RadioGroup.propTypes),\n search: PropTypes.shape(Search.propTypes),\n create: PropTypes.shape(BrandCardCreate.propTypes)\n};\n\nexport default BrandList;\n"],"file":"index.js"}
|
|
@@ -18,16 +18,23 @@
|
|
|
18
18
|
margin: 0 10px 20px;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
+
.filters {
|
|
22
|
+
display: flex;
|
|
23
|
+
max-width: 600px;
|
|
24
|
+
margin: auto;
|
|
25
|
+
padding: 0 10px;
|
|
26
|
+
}
|
|
27
|
+
|
|
21
28
|
.searchBar {
|
|
22
29
|
width: 800px;
|
|
23
30
|
height: 100px;
|
|
24
31
|
margin: auto;
|
|
25
|
-
|
|
32
|
+
flex: 1 1 100%;
|
|
33
|
+
margin-right: 20px;
|
|
26
34
|
}
|
|
27
35
|
|
|
28
|
-
.
|
|
29
|
-
|
|
30
|
-
border-radius: 2px;
|
|
36
|
+
.provider {
|
|
37
|
+
flex: 0 1 300px;
|
|
31
38
|
}
|
|
32
39
|
|
|
33
40
|
.filterBar {
|
|
@@ -54,7 +61,6 @@
|
|
|
54
61
|
|
|
55
62
|
.searchBar {
|
|
56
63
|
width: auto;
|
|
57
|
-
margin: 0 30px;
|
|
58
64
|
box-sizing: content-box;
|
|
59
65
|
}
|
|
60
66
|
|
|
@@ -23,10 +23,10 @@ export default {
|
|
|
23
23
|
checked: false,
|
|
24
24
|
label: 'Customer platforms'
|
|
25
25
|
}, {
|
|
26
|
-
name: '
|
|
27
|
-
value: '
|
|
26
|
+
name: 'other',
|
|
27
|
+
value: 'other',
|
|
28
28
|
checked: true,
|
|
29
|
-
label: '
|
|
29
|
+
label: 'other platforms'
|
|
30
30
|
}],
|
|
31
31
|
theme: 'coorpmanager',
|
|
32
32
|
onChange: value => console.log(value)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../src/template/back-office/brand-list/test/fixtures/default.js"],"names":["BrandCard","Header","props","header","isHome","brands","search","value","placeholder","onChange","filter","list","name","checked","label","theme","console","log","create","edit","editHref"],"mappings":";;AAAA,OAAOA,SAAP,MAAsB,0DAAtB;AACA,OAAOC,MAAP,MAAmB,4DAAnB;AAEA,MAAM;AAACC,EAAAA;AAAD,IAAUF,SAAhB;AAEA,eAAe;AACbE,EAAAA,KAAK,EAAE;AACLC,IAAAA,MAAM,wBAAMF,MAAM,CAACC,KAAb;AAAoBE,MAAAA,MAAM,EAAE;AAA5B,MADD;AAELC,IAAAA,MAAM,EAAE,CAACH,KAAD,EAAQA,KAAR,EAAeA,KAAf,EAAsBA,KAAtB,EAA6BA,KAA7B,CAFH;AAGLI,IAAAA,MAAM,EAAE;AACNC,MAAAA,KAAK,EAAE,EADD;AAENC,MAAAA,WAAW,EAAE,cAFP;AAGNC,MAAAA,QAAQ,EAAE,MAAM,CAAE;AAHZ,KAHH;AAQLC,IAAAA,MAAM,EAAE;AACNC,MAAAA,IAAI,EAAE,CACJ;AACEC,QAAAA,IAAI,EAAE,UADR;AAEEL,QAAAA,KAAK,EAAE,UAFT;AAGEM,QAAAA,OAAO,EAAE,KAHX;AAIEC,QAAAA,KAAK,EAAE;AAJT,OADI,EAOJ;AACEF,QAAAA,IAAI,EAAE,
|
|
1
|
+
{"version":3,"sources":["../../../../../../src/template/back-office/brand-list/test/fixtures/default.js"],"names":["BrandCard","Header","props","header","isHome","brands","search","value","placeholder","onChange","filter","list","name","checked","label","theme","console","log","create","edit","editHref"],"mappings":";;AAAA,OAAOA,SAAP,MAAsB,0DAAtB;AACA,OAAOC,MAAP,MAAmB,4DAAnB;AAEA,MAAM;AAACC,EAAAA;AAAD,IAAUF,SAAhB;AAEA,eAAe;AACbE,EAAAA,KAAK,EAAE;AACLC,IAAAA,MAAM,wBAAMF,MAAM,CAACC,KAAb;AAAoBE,MAAAA,MAAM,EAAE;AAA5B,MADD;AAELC,IAAAA,MAAM,EAAE,CAACH,KAAD,EAAQA,KAAR,EAAeA,KAAf,EAAsBA,KAAtB,EAA6BA,KAA7B,CAFH;AAGLI,IAAAA,MAAM,EAAE;AACNC,MAAAA,KAAK,EAAE,EADD;AAENC,MAAAA,WAAW,EAAE,cAFP;AAGNC,MAAAA,QAAQ,EAAE,MAAM,CAAE;AAHZ,KAHH;AAQLC,IAAAA,MAAM,EAAE;AACNC,MAAAA,IAAI,EAAE,CACJ;AACEC,QAAAA,IAAI,EAAE,UADR;AAEEL,QAAAA,KAAK,EAAE,UAFT;AAGEM,QAAAA,OAAO,EAAE,KAHX;AAIEC,QAAAA,KAAK,EAAE;AAJT,OADI,EAOJ;AACEF,QAAAA,IAAI,EAAE,OADR;AAEEL,QAAAA,KAAK,EAAE,OAFT;AAGEM,QAAAA,OAAO,EAAE,IAHX;AAIEC,QAAAA,KAAK,EAAE;AAJT,OAPI,CADA;AAeNC,MAAAA,KAAK,EAAE,cAfD;AAgBNN,MAAAA,QAAQ,EAAEF,KAAK,IAAIS,OAAO,CAACC,GAAR,CAAYV,KAAZ;AAhBb,KARH;AA0BLW,IAAAA,MAAM,EAAE;AACNC,MAAAA,IAAI,EAAE,uBADA;AAENC,MAAAA,QAAQ,EAAE;AAFJ;AA1BH;AADM,CAAf","sourcesContent":["import BrandCard from '../../../../../molecule/brand-card/test/fixtures/default';\nimport Header from '../../../../../organism/setup-header/test/fixtures/default';\n\nconst {props} = BrandCard;\n\nexport default {\n props: {\n header: {...Header.props, isHome: true},\n brands: [props, props, props, props, props],\n search: {\n value: '',\n placeholder: 'Search brand',\n onChange: () => {}\n },\n filter: {\n list: [\n {\n name: 'customer',\n value: 'customer',\n checked: false,\n label: 'Customer platforms'\n },\n {\n name: 'other',\n value: 'other',\n checked: true,\n label: 'other platforms'\n }\n ],\n theme: 'coorpmanager',\n onChange: value => console.log(value)\n },\n create: {\n edit: 'Create a new platform',\n editHref: '#'\n }\n }\n};\n"],"file":"default.js"}
|
|
@@ -3,7 +3,29 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
|
|
|
3
3
|
import Default from './default';
|
|
4
4
|
export default {
|
|
5
5
|
props: _extends(_extends({}, Default.props), {}, {
|
|
6
|
-
create: null
|
|
6
|
+
create: null,
|
|
7
|
+
search: _extends(_extends({}, Default.props.search), {}, {
|
|
8
|
+
select: {
|
|
9
|
+
placeholder: 'Provider',
|
|
10
|
+
title: 'Provider',
|
|
11
|
+
description: 'You should select a provider',
|
|
12
|
+
multiple: false,
|
|
13
|
+
disabled: false,
|
|
14
|
+
error: '',
|
|
15
|
+
hint: '',
|
|
16
|
+
options: [{
|
|
17
|
+
name: 'Team platforms',
|
|
18
|
+
value: 'smb',
|
|
19
|
+
selected: false
|
|
20
|
+
}, {
|
|
21
|
+
name: 'Forvia platforms',
|
|
22
|
+
value: 'forvia-partners',
|
|
23
|
+
selected: true
|
|
24
|
+
}],
|
|
25
|
+
onChange: value => console.log('onChange', value),
|
|
26
|
+
onError: () => false
|
|
27
|
+
}
|
|
28
|
+
})
|
|
7
29
|
})
|
|
8
30
|
};
|
|
9
31
|
//# sourceMappingURL=rh.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../src/template/back-office/brand-list/test/fixtures/rh.js"],"names":["Default","props","create"],"mappings":";;AAAA,OAAOA,OAAP,MAAoB,WAApB;AAEA,eAAe;AACbC,EAAAA,KAAK,wBACAD,OAAO,CAACC,KADR;AAEHC,IAAAA,MAAM,EAAE;
|
|
1
|
+
{"version":3,"sources":["../../../../../../src/template/back-office/brand-list/test/fixtures/rh.js"],"names":["Default","props","create","search","select","placeholder","title","description","multiple","disabled","error","hint","options","name","value","selected","onChange","console","log","onError"],"mappings":";;AAAA,OAAOA,OAAP,MAAoB,WAApB;AAEA,eAAe;AACbC,EAAAA,KAAK,wBACAD,OAAO,CAACC,KADR;AAEHC,IAAAA,MAAM,EAAE,IAFL;AAGHC,IAAAA,MAAM,wBACDH,OAAO,CAACC,KAAR,CAAcE,MADb;AAEJC,MAAAA,MAAM,EAAE;AACNC,QAAAA,WAAW,EAAE,UADP;AAENC,QAAAA,KAAK,EAAE,UAFD;AAGNC,QAAAA,WAAW,EAAE,8BAHP;AAINC,QAAAA,QAAQ,EAAE,KAJJ;AAKNC,QAAAA,QAAQ,EAAE,KALJ;AAMNC,QAAAA,KAAK,EAAE,EAND;AAONC,QAAAA,IAAI,EAAE,EAPA;AAQNC,QAAAA,OAAO,EAAE,CACP;AACEC,UAAAA,IAAI,EAAE,gBADR;AAEEC,UAAAA,KAAK,EAAE,KAFT;AAGEC,UAAAA,QAAQ,EAAE;AAHZ,SADO,EAMP;AACEF,UAAAA,IAAI,EAAE,kBADR;AAEEC,UAAAA,KAAK,EAAE,iBAFT;AAGEC,UAAAA,QAAQ,EAAE;AAHZ,SANO,CARH;AAoBNC,QAAAA,QAAQ,EAAEF,KAAK,IAAIG,OAAO,CAACC,GAAR,CAAY,UAAZ,EAAwBJ,KAAxB,CApBb;AAqBNK,QAAAA,OAAO,EAAE,MAAM;AArBT;AAFJ;AAHH;AADQ,CAAf","sourcesContent":["import Default from './default';\n\nexport default {\n props: {\n ...Default.props,\n create: null,\n search: {\n ...Default.props.search,\n select: {\n placeholder: 'Provider',\n title: 'Provider',\n description: 'You should select a provider',\n multiple: false,\n disabled: false,\n error: '',\n hint: '',\n options: [\n {\n name: 'Team platforms',\n value: 'smb',\n selected: false\n },\n {\n name: 'Forvia platforms',\n value: 'forvia-partners',\n selected: true\n }\n ],\n onChange: value => console.log('onChange', value),\n onError: () => false\n }\n }\n }\n};\n"],"file":"rh.js"}
|
package/es/util/button-icons.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { NovaSolidRemoveAddAddCircle1 as AddIcon, NovaCompositionCoorpacademyAnalytics as AnalyticsIcon, NovaSolidContentEditionBin as BinIcon, NovaCompositionCoorpacademyBulletPoint as BulletPointIcon, NovaCompositionNavigationArrowLeft as ChevronLeftIcon, NovaCompositionNavigationArrowRight as ChevronRightIcon, NovaSolidStatusClose as CloseIcon, NovaSolidContentEditionPencilWrite as EditIcon, NovaCompositionCoorpacademyEye as EyeIcon, NovaSolidContentContentViewModule1 as ListIcon, NovaSolidLoginLogout1 as LogoutIcon, NovaSolidApplicationsWindowUpload3 as PublishIcon, NovaSolidComputersSdCard as SaveIcon } from '@coorpacademy/nova-icons';
|
|
1
|
+
import { NovaSolidRemoveAddAddCircle1 as AddIcon, NovaCompositionCoorpacademyAnalytics as AnalyticsIcon, NovaSolidContentEditionBin as BinIcon, NovaCompositionCoorpacademyBulletPoint as BulletPointIcon, NovaCompositionNavigationArrowLeft as ChevronLeftIcon, NovaCompositionNavigationArrowRight as ChevronRightIcon, NovaSolidStatusClose as CloseIcon, NovaSolidContentEditionPencilWrite as EditIcon, NovaCompositionCoorpacademyEye as EyeIcon, NovaSolidContentContentViewModule1 as ListIcon, NovaSolidLoginLogout1 as LogoutIcon, NovaSolidApplicationsWindowUpload3 as PublishIcon, NovaSolidComputersSdCard as SaveIcon, NovaLineLoginKey1 as KlfIcon } from '@coorpacademy/nova-icons';
|
|
2
2
|
export const ICONS = {
|
|
3
3
|
add: AddIcon,
|
|
4
4
|
analytics: AnalyticsIcon,
|
|
@@ -8,6 +8,7 @@ export const ICONS = {
|
|
|
8
8
|
'chevron-right': ChevronRightIcon,
|
|
9
9
|
close: CloseIcon,
|
|
10
10
|
edit: EditIcon,
|
|
11
|
+
key: KlfIcon,
|
|
11
12
|
list: ListIcon,
|
|
12
13
|
logout: LogoutIcon,
|
|
13
14
|
publish: PublishIcon,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/util/button-icons.js"],"names":["NovaSolidRemoveAddAddCircle1","AddIcon","NovaCompositionCoorpacademyAnalytics","AnalyticsIcon","NovaSolidContentEditionBin","BinIcon","NovaCompositionCoorpacademyBulletPoint","BulletPointIcon","NovaCompositionNavigationArrowLeft","ChevronLeftIcon","NovaCompositionNavigationArrowRight","ChevronRightIcon","NovaSolidStatusClose","CloseIcon","NovaSolidContentEditionPencilWrite","EditIcon","NovaCompositionCoorpacademyEye","EyeIcon","NovaSolidContentContentViewModule1","ListIcon","NovaSolidLoginLogout1","LogoutIcon","NovaSolidApplicationsWindowUpload3","PublishIcon","NovaSolidComputersSdCard","SaveIcon","ICONS","add","analytics","bin","close","edit","list","logout","publish","save","see"],"mappings":"AAAA,SACEA,4BAA4B,IAAIC,OADlC,EAEEC,oCAAoC,IAAIC,aAF1C,EAGEC,0BAA0B,IAAIC,OAHhC,EAIEC,sCAAsC,IAAIC,eAJ5C,EAKEC,kCAAkC,IAAIC,eALxC,EAMEC,mCAAmC,IAAIC,gBANzC,EAOEC,oBAAoB,IAAIC,SAP1B,EAQEC,kCAAkC,IAAIC,QARxC,EASEC,8BAA8B,IAAIC,OATpC,EAUEC,kCAAkC,IAAIC,QAVxC,EAWEC,qBAAqB,IAAIC,UAX3B,EAYEC,kCAAkC,IAAIC,WAZxC,EAaEC,wBAAwB,IAAIC,QAb9B,
|
|
1
|
+
{"version":3,"sources":["../../src/util/button-icons.js"],"names":["NovaSolidRemoveAddAddCircle1","AddIcon","NovaCompositionCoorpacademyAnalytics","AnalyticsIcon","NovaSolidContentEditionBin","BinIcon","NovaCompositionCoorpacademyBulletPoint","BulletPointIcon","NovaCompositionNavigationArrowLeft","ChevronLeftIcon","NovaCompositionNavigationArrowRight","ChevronRightIcon","NovaSolidStatusClose","CloseIcon","NovaSolidContentEditionPencilWrite","EditIcon","NovaCompositionCoorpacademyEye","EyeIcon","NovaSolidContentContentViewModule1","ListIcon","NovaSolidLoginLogout1","LogoutIcon","NovaSolidApplicationsWindowUpload3","PublishIcon","NovaSolidComputersSdCard","SaveIcon","NovaLineLoginKey1","KlfIcon","ICONS","add","analytics","bin","close","edit","key","list","logout","publish","save","see"],"mappings":"AAAA,SACEA,4BAA4B,IAAIC,OADlC,EAEEC,oCAAoC,IAAIC,aAF1C,EAGEC,0BAA0B,IAAIC,OAHhC,EAIEC,sCAAsC,IAAIC,eAJ5C,EAKEC,kCAAkC,IAAIC,eALxC,EAMEC,mCAAmC,IAAIC,gBANzC,EAOEC,oBAAoB,IAAIC,SAP1B,EAQEC,kCAAkC,IAAIC,QARxC,EASEC,8BAA8B,IAAIC,OATpC,EAUEC,kCAAkC,IAAIC,QAVxC,EAWEC,qBAAqB,IAAIC,UAX3B,EAYEC,kCAAkC,IAAIC,WAZxC,EAaEC,wBAAwB,IAAIC,QAb9B,EAcEC,iBAAiB,IAAIC,OAdvB,QAeO,0BAfP;AAiBA,OAAO,MAAMC,KAAK,GAAG;AACnBC,EAAAA,GAAG,EAAE5B,OADc;AAEnB6B,EAAAA,SAAS,EAAE3B,aAFQ;AAGnB4B,EAAAA,GAAG,EAAE1B,OAHc;AAInB,kBAAgBE,eAJG;AAKnB,kBAAgBE,eALG;AAMnB,mBAAiBE,gBANE;AAOnBqB,EAAAA,KAAK,EAAEnB,SAPY;AAQnBoB,EAAAA,IAAI,EAAElB,QARa;AASnBmB,EAAAA,GAAG,EAAEP,OATc;AAUnBQ,EAAAA,IAAI,EAAEhB,QAVa;AAWnBiB,EAAAA,MAAM,EAAEf,UAXW;AAYnBgB,EAAAA,OAAO,EAAEd,WAZU;AAanBe,EAAAA,IAAI,EAAEb,QAba;AAcnBc,EAAAA,GAAG,EAAEtB;AAdc,CAAd","sourcesContent":["import {\n NovaSolidRemoveAddAddCircle1 as AddIcon,\n NovaCompositionCoorpacademyAnalytics as AnalyticsIcon,\n NovaSolidContentEditionBin as BinIcon,\n NovaCompositionCoorpacademyBulletPoint as BulletPointIcon,\n NovaCompositionNavigationArrowLeft as ChevronLeftIcon,\n NovaCompositionNavigationArrowRight as ChevronRightIcon,\n NovaSolidStatusClose as CloseIcon,\n NovaSolidContentEditionPencilWrite as EditIcon,\n NovaCompositionCoorpacademyEye as EyeIcon,\n NovaSolidContentContentViewModule1 as ListIcon,\n NovaSolidLoginLogout1 as LogoutIcon,\n NovaSolidApplicationsWindowUpload3 as PublishIcon,\n NovaSolidComputersSdCard as SaveIcon,\n NovaLineLoginKey1 as KlfIcon\n} from '@coorpacademy/nova-icons';\n\nexport const ICONS = {\n add: AddIcon,\n analytics: AnalyticsIcon,\n bin: BinIcon,\n 'bullet-point': BulletPointIcon,\n 'chevron-left': ChevronLeftIcon,\n 'chevron-right': ChevronRightIcon,\n close: CloseIcon,\n edit: EditIcon,\n key: KlfIcon,\n list: ListIcon,\n logout: LogoutIcon,\n publish: PublishIcon,\n save: SaveIcon,\n see: EyeIcon\n};\n"],"file":"button-icons.js"}
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports.default = void 0;
|
|
5
5
|
|
|
6
|
+
var _noop2 = _interopRequireDefault(require("lodash/fp/noop"));
|
|
7
|
+
|
|
6
8
|
var _keys2 = _interopRequireDefault(require("lodash/fp/keys"));
|
|
7
9
|
|
|
8
10
|
var _getOr2 = _interopRequireDefault(require("lodash/fp/getOr"));
|
|
@@ -62,14 +64,17 @@ const ButtonLink = props => {
|
|
|
62
64
|
'data-name': dataName,
|
|
63
65
|
'aria-label': ariaLabel,
|
|
64
66
|
link,
|
|
65
|
-
onClick
|
|
67
|
+
onClick = _noop2.default,
|
|
68
|
+
className,
|
|
69
|
+
customStyle
|
|
66
70
|
} = props;
|
|
67
71
|
const contentView = getButtonContent(icon, label);
|
|
68
|
-
const styleButton = (0, _classnames.default)(_style.default.button, type === 'primary' && _style.default.primary, type === 'secondary' && _style.default.secondary, type === 'tertiary' && _style.default.tertiary, type === 'text' && _style.default.text, type === 'dangerous' && _style.default.dangerous, link && _style.default.link, disabled && _style.default.disabled);
|
|
72
|
+
const styleButton = (0, _classnames.default)(className, _style.default.button, type === 'primary' && _style.default.primary, type === 'secondary' && _style.default.secondary, type === 'tertiary' && _style.default.tertiary, type === 'text' && _style.default.text, type === 'dangerous' && _style.default.dangerous, link && _style.default.link, disabled && _style.default.disabled);
|
|
69
73
|
const handleOnClick = (0, _react.useCallback)(() => onClick(), [onClick]);
|
|
70
74
|
|
|
71
75
|
if (link) {
|
|
72
76
|
return /*#__PURE__*/_react.default.createElement(_link.default, _extends({}, link, {
|
|
77
|
+
style: customStyle,
|
|
73
78
|
className: styleButton,
|
|
74
79
|
"data-name": dataName,
|
|
75
80
|
"aria-label": ariaLabel || label,
|
|
@@ -82,6 +87,7 @@ const ButtonLink = props => {
|
|
|
82
87
|
"aria-label": ariaLabel || label,
|
|
83
88
|
title: ariaLabel || label,
|
|
84
89
|
"data-name": dataName,
|
|
90
|
+
style: customStyle,
|
|
85
91
|
className: styleButton,
|
|
86
92
|
onClick: handleOnClick
|
|
87
93
|
}, contentView);
|
|
@@ -102,7 +108,9 @@ ButtonLink.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
102
108
|
download: _propTypes.default.bool,
|
|
103
109
|
target: _propTypes.default.oneOf(['_self', '_blank', '_parent', '_top'])
|
|
104
110
|
}),
|
|
105
|
-
disabled: _propTypes.default.bool
|
|
111
|
+
disabled: _propTypes.default.bool,
|
|
112
|
+
className: _propTypes.default.string,
|
|
113
|
+
customStyle: _propTypes.default.shape({})
|
|
106
114
|
} : {};
|
|
107
115
|
var _default = ButtonLink;
|
|
108
116
|
exports.default = _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/atom/button-link/index.js"],"names":["getButtonContent","icon","label","type","position","Icon","ICONS","style","buttonContent","ButtonLink","props","disabled","dataName","ariaLabel","link","onClick","contentView","styleButton","button","primary","secondary","tertiary","text","dangerous","handleOnClick","propTypes","PropTypes","oneOf","string","shape","func","href","download","bool","target"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../src/atom/button-link/index.js"],"names":["getButtonContent","icon","label","type","position","Icon","ICONS","style","buttonContent","ButtonLink","props","disabled","dataName","ariaLabel","link","onClick","className","customStyle","contentView","styleButton","button","primary","secondary","tertiary","text","dangerous","handleOnClick","propTypes","PropTypes","oneOf","string","shape","func","href","download","bool","target"],"mappings":";;;;;;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,gBAAgB,GAAG,CAACC,IAAD,EAAOC,KAAP,KAAiB;AACxC,QAAM;AAACC,IAAAA,IAAD;AAAOC,IAAAA;AAAP,MAAmBH,IAAzB;AACA,QAAMI,IAAI,GAAG,qBAAM,IAAN,EAAYF,IAAZ,EAAkBG,kBAAlB,CAAb;;AAEA,MAAI,CAACD,IAAL,EAAW;AACT,wBACE;AAAK,MAAA,SAAS,EAAEE,eAAMC;AAAtB,oBACE;AAAM,MAAA,SAAS,EAAED,eAAML;AAAvB,OAA+BA,KAA/B,CADF,CADF;AAKD;;AAED,sBACE;AAAK,IAAA,SAAS,EAAEK,eAAMC;AAAtB,KACGJ,QAAQ,KAAK,MAAb,gBAAsB,6BAAC,IAAD;AAAM,IAAA,SAAS,EAAEG,eAAMN;AAAvB,IAAtB,GAAwD,IAD3D,eAEE;AAAM,IAAA,SAAS,EAAEM,eAAML;AAAvB,KAA+BA,KAA/B,CAFF,EAGGE,QAAQ,KAAK,OAAb,gBAAuB,6BAAC,IAAD;AAAM,IAAA,SA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/fp';\nimport classnames from 'classnames';\nimport Link from '../link';\nimport {ICONS} from '../../util/button-icons';\nimport style from './style.css';\n\nconst getButtonContent = (icon, label) => {\n const {type, position} = icon;\n const Icon = getOr(null, type, ICONS);\n\n if (!Icon) {\n return (\n <div className={style.buttonContent}>\n <span className={style.label}>{label}</span>\n </div>\n );\n }\n\n return (\n <div className={style.buttonContent}>\n {position === 'left' ? <Icon className={style.icon} /> : null}\n <span className={style.label}>{label}</span>\n {position === 'right' ? <Icon className={style.icon} /> : null}\n </div>\n );\n};\n\nconst ButtonLink = props => {\n const {\n type,\n label,\n disabled,\n icon = {},\n 'data-name': dataName,\n 'aria-label': ariaLabel,\n link,\n onClick = noop,\n className,\n customStyle\n } = props;\n const contentView = getButtonContent(icon, label);\n const styleButton = classnames(\n className,\n style.button,\n type === 'primary' && style.primary,\n type === 'secondary' && style.secondary,\n type === 'tertiary' && style.tertiary,\n type === 'text' && style.text,\n type === 'dangerous' && style.dangerous,\n link && style.link,\n disabled && style.disabled\n );\n\n const handleOnClick = useCallback(() => onClick(), [onClick]);\n\n if (link) {\n return (\n <Link\n {...link}\n style={customStyle}\n className={styleButton}\n data-name={dataName}\n aria-label={ariaLabel || label}\n title={ariaLabel || label}\n >\n {contentView}\n </Link>\n );\n }\n\n return (\n <button\n type=\"button\"\n aria-label={ariaLabel || label}\n title={ariaLabel || label}\n data-name={dataName}\n style={customStyle}\n className={styleButton}\n onClick={handleOnClick}\n >\n {contentView}\n </button>\n );\n};\n\nButtonLink.propTypes = {\n type: PropTypes.oneOf(['primary', 'secondary', 'tertiary', 'text', 'dangerous']),\n label: PropTypes.string,\n 'aria-label': PropTypes.string,\n 'data-name': PropTypes.string,\n icon: PropTypes.shape({\n position: PropTypes.oneOf(['right', 'left']),\n type: PropTypes.oneOf(keys(ICONS))\n }),\n onClick: PropTypes.func,\n link: PropTypes.shape({\n href: PropTypes.string,\n download: PropTypes.bool,\n target: PropTypes.oneOf(['_self', '_blank', '_parent', '_top'])\n }),\n disabled: PropTypes.bool,\n className: PropTypes.string,\n customStyle: PropTypes.shape({})\n};\n\nexport default ButtonLink;\n"],"file":"index.js"}
|
package/lib/atom/tag/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/atom/tag/index.js"],"names":["TAG_STYLES","default","style","published","revised","archived","draft","Tag","props","label","type","propTypes","PropTypes","string","oneOf"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;;;AAEA,MAAMA,UAAU,GAAG;AACjBC,EAAAA,OAAO,EAAEC,eAAMD,OADE;AAEjBE,EAAAA,SAAS,EAAED,eAAMC,SAFA;AAGjBC,EAAAA,OAAO,EAAEF,eAAME,OAHE;AAIjBC,EAAAA,QAAQ,EAAEH,eAAMG,QAJC;AAKjBC,EAAAA,KAAK,EAAEJ,eAAMI;AALI,CAAnB;;AAQA,MAAMC,GAAG,GAAGC,KAAK,IAAI;AACnB,QAAM;AAACC,IAAAA,KAAD;AAAQC,IAAAA,IAAI,GAAG;AAAf,MAA4BF,KAAlC;AAEA,sBACE;AAAM,IAAA,SAAS,EAAER,UAAU,CAACU,IAAD,CAA3B;AAAmC,iBAAY,
|
|
1
|
+
{"version":3,"sources":["../../../src/atom/tag/index.js"],"names":["TAG_STYLES","default","style","published","revised","archived","draft","Tag","props","label","type","propTypes","PropTypes","string","oneOf"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;;;AAEA,MAAMA,UAAU,GAAG;AACjBC,EAAAA,OAAO,EAAEC,eAAMD,OADE;AAEjBE,EAAAA,SAAS,EAAED,eAAMC,SAFA;AAGjBC,EAAAA,OAAO,EAAEF,eAAME,OAHE;AAIjBC,EAAAA,QAAQ,EAAEH,eAAMG,QAJC;AAKjBC,EAAAA,KAAK,EAAEJ,eAAMI;AALI,CAAnB;;AAQA,MAAMC,GAAG,GAAGC,KAAK,IAAI;AACnB,QAAM;AAACC,IAAAA,KAAD;AAAQC,IAAAA,IAAI,GAAG;AAAf,MAA4BF,KAAlC;AAEA,sBACE;AAAM,IAAA,SAAS,EAAER,UAAU,CAACU,IAAD,CAA3B;AAAmC,iBAAY,eAAcD,KAAM;AAAnE,KACGA,KADH,CADF;AAKD,CARD;;AAUAF,GAAG,CAACI,SAAJ,2CAAgB;AACdF,EAAAA,KAAK,EAAEG,mBAAUC,MADH;AAEdH,EAAAA,IAAI,EAAEE,mBAAUE,KAAV,CAAgB,oBAAKd,UAAL,CAAhB;AAFQ,CAAhB;eAKeO,G","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {keys} from 'lodash/fp';\nimport style from './style.css';\n\nconst TAG_STYLES = {\n default: style.default,\n published: style.published,\n revised: style.revised,\n archived: style.archived,\n draft: style.draft\n};\n\nconst Tag = props => {\n const {label, type = 'default'} = props;\n\n return (\n <span className={TAG_STYLES[type]} data-name={`content-tag-${label}`}>\n {label}\n </span>\n );\n};\n\nTag.propTypes = {\n label: PropTypes.string,\n type: PropTypes.oneOf(keys(TAG_STYLES))\n};\n\nexport default Tag;\n"],"file":"index.js"}
|
|
@@ -0,0 +1,28 @@
|
|
|
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 _default = _interopRequireDefault(require("./fixtures/default"));
|
|
12
|
+
|
|
13
|
+
var _loading = _interopRequireDefault(require("./fixtures/loading"));
|
|
14
|
+
|
|
15
|
+
var _videoTranslate = _interopRequireDefault(require("./fixtures/video-translate"));
|
|
16
|
+
|
|
17
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
18
|
+
|
|
19
|
+
(0, _ava.default)('Molecule › MoleculeCockpitPopin > should have valid propTypes', t => {
|
|
20
|
+
t.pass();
|
|
21
|
+
(0, _forEach.default)(_.default.propTypes, (value, key) => {
|
|
22
|
+
t.not(value, undefined, `PropType for "Molecule.MoleculeCockpitPopin.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
(0, _ava.default)('Molecule › MoleculeCockpitPopin › Default › should be rendered', _renderComponent.default, _.default, _default.default);
|
|
26
|
+
(0, _ava.default)('Molecule › MoleculeCockpitPopin › Loading › should be rendered', _renderComponent.default, _.default, _loading.default);
|
|
27
|
+
(0, _ava.default)('Molecule › MoleculeCockpitPopin › VideoTranslate › should be rendered', _renderComponent.default, _.default, _videoTranslate.default);
|
|
28
|
+
//# sourceMappingURL=fixtures.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/molecule/cockpit-popin/test/fixtures.js"],"names":["t","pass","MoleculeCockpitPopin","propTypes","value","key","not","undefined","renderComponentMacro","fixtureDefault","fixtureLoading","fixtureVideoTranslate"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,+DAAL,EAAsEA,CAAC,IAAI;AACzEA,EAAAA,CAAC,CAACC,IAAF;AACA,wBAAQC,UAAqBC,SAA7B,EAAwC,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACtDL,IAAAA,CAAC,CAACM,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,yDAAwDF,GAAI,mEAArF;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,gEAAL,EAAuEG,wBAAvE,EAA6FN,SAA7F,EAAmHO,gBAAnH;AACA,kBAAK,gEAAL,EAAuED,wBAAvE,EAA6FN,SAA7F,EAAmHQ,gBAAnH;AACA,kBAAK,uEAAL,EAA8EF,wBAA9E,EAAoGN,SAApG,EAA0HS,uBAA1H","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport MoleculeCockpitPopin from '..';\nimport fixtureDefault from './fixtures/default';\nimport fixtureLoading from './fixtures/loading';\nimport fixtureVideoTranslate from './fixtures/video-translate';\n\ntest('Molecule › MoleculeCockpitPopin > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeCockpitPopin.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Molecule.MoleculeCockpitPopin.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Molecule › MoleculeCockpitPopin › Default › should be rendered', renderComponentMacro, MoleculeCockpitPopin, fixtureDefault);\ntest('Molecule › MoleculeCockpitPopin › Loading › should be rendered', renderComponentMacro, MoleculeCockpitPopin, fixtureLoading);\ntest('Molecule › MoleculeCockpitPopin › VideoTranslate › should be rendered', renderComponentMacro, MoleculeCockpitPopin, fixtureVideoTranslate);\n"],"file":"fixtures.js"}
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
border-radius: 7px;
|
|
11
11
|
display: flex;
|
|
12
12
|
font-size: 14px;
|
|
13
|
-
justify-content: start;
|
|
13
|
+
justify-content: flex-start;
|
|
14
14
|
margin-top: 8px;
|
|
15
15
|
padding: 8px 16px;
|
|
16
16
|
border-radius: 7px;
|
|
@@ -63,4 +63,4 @@
|
|
|
63
63
|
.containerImage {
|
|
64
64
|
min-height: 56px;
|
|
65
65
|
min-width: 56px;
|
|
66
|
-
}
|
|
66
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
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 _default = _interopRequireDefault(require("./fixtures/default"));
|
|
12
|
+
|
|
13
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
|
+
|
|
15
|
+
(0, _ava.default)('MoleculeDashboard › MoleculeDashboardReviewBanner > should have valid propTypes', t => {
|
|
16
|
+
t.pass();
|
|
17
|
+
(0, _forEach.default)(_.default.propTypes, (value, key) => {
|
|
18
|
+
t.not(value, undefined, `PropType for "MoleculeDashboard.MoleculeDashboardReviewBanner.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
(0, _ava.default)('MoleculeDashboard › MoleculeDashboardReviewBanner › Default › should be rendered', _renderComponent.default, _.default, _default.default);
|
|
22
|
+
//# sourceMappingURL=fixtures.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/molecule/dashboard/review-banner/test/fixtures.js"],"names":["t","pass","MoleculeDashboardReviewBanner","propTypes","value","key","not","undefined","renderComponentMacro","fixtureDefault"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,iFAAL,EAAwFA,CAAC,IAAI;AAC3FA,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,2EAA0EF,GAAI,mEAAvG;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,kFAAL,EAAyFG,wBAAzF,EAA+GN,SAA/G,EAA8IO,gBAA9I","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../../test/helpers/render-component';\nimport MoleculeDashboardReviewBanner from '..';\nimport fixtureDefault from './fixtures/default';\n\ntest('MoleculeDashboard › MoleculeDashboardReviewBanner > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeDashboardReviewBanner.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"MoleculeDashboard.MoleculeDashboardReviewBanner.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('MoleculeDashboard › MoleculeDashboardReviewBanner › Default › should be rendered', renderComponentMacro, MoleculeDashboardReviewBanner, fixtureDefault);\n"],"file":"fixtures.js"}
|