@coorpacademy/components 10.3.25 → 10.3.29
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/clue/test/see-clue.js +33 -0
- package/es/atom/clue/test/see-clue.js.map +1 -1
- package/es/atom/content-badge/test/fixtures.js +2 -0
- package/es/atom/content-badge/test/fixtures.js.map +1 -1
- package/es/atom/input-switch/index.js +13 -6
- package/es/atom/input-switch/index.js.map +1 -1
- package/es/atom/input-switch/style.css +46 -0
- package/es/atom/input-switch/test/fixtures/cm-left.js +11 -0
- package/es/atom/input-switch/test/fixtures/cm-left.js.map +1 -0
- package/es/atom/input-switch/test/fixtures/cm-right-checked.js +11 -0
- package/es/atom/input-switch/test/fixtures/cm-right-checked.js.map +1 -0
- package/es/atom/input-switch/test/fixtures/cm-right-disabled.js +11 -0
- package/es/atom/input-switch/test/fixtures/cm-right-disabled.js.map +1 -0
- package/es/atom/input-switch/test/fixtures/cm-right-modified.js +12 -0
- package/es/atom/input-switch/test/fixtures/cm-right-modified.js.map +1 -0
- package/es/atom/input-switch/test/fixtures/cm-right.js +11 -0
- package/es/atom/input-switch/test/fixtures/cm-right.js.map +1 -0
- package/es/atom/input-switch/test/fixtures.js +10 -0
- package/es/atom/input-switch/test/fixtures.js.map +1 -1
- package/es/atom/loader/test/fixtures.js +2 -0
- package/es/atom/loader/test/fixtures.js.map +1 -1
- package/es/atom/provider/index.js +1 -1
- package/es/atom/provider/index.js.map +1 -1
- package/es/molecule/banner/test/fixtures.js +8 -0
- package/es/molecule/banner/test/fixtures.js.map +1 -1
- package/es/molecule/cm-popin/style.css +1 -0
- package/es/molecule/cockpit-popin/test/fixtures.js +17 -0
- package/es/molecule/cockpit-popin/test/fixtures.js.map +1 -0
- package/es/molecule/select-multiple/style.css +1 -0
- package/es/molecule/select-multiple/test/fixtures.js +8 -0
- package/es/molecule/select-multiple/test/fixtures.js.map +1 -1
- package/es/molecule/vertical-tabs/test/fixtures.js +2 -0
- package/es/molecule/vertical-tabs/test/fixtures.js.map +1 -1
- package/es/molecule/wizard-summary/index.js +30 -3
- package/es/molecule/wizard-summary/index.js.map +1 -1
- package/es/organism/content-translation/style.css +1 -0
- package/es/organism/content-translation/test/fixtures.js +15 -0
- package/es/organism/content-translation/test/fixtures.js.map +1 -0
- package/es/organism/course-selection/index.js +11 -6
- package/es/organism/course-selection/index.js.map +1 -1
- package/es/organism/course-selection/style.css +2 -1
- package/es/organism/course-selection/test/fixtures/default.js +10 -1
- package/es/organism/course-selection/test/fixtures/default.js.map +1 -1
- package/es/organism/course-selection/test/fixtures/empty.js +9 -0
- package/es/organism/course-selection/test/fixtures/empty.js.map +1 -1
- package/es/organism/course-selection/test/fixtures/filtered.js +9 -1
- package/es/organism/course-selection/test/fixtures/filtered.js.map +1 -1
- package/es/organism/course-selection/test/fixtures/sorted-selected.js +9 -1
- package/es/organism/course-selection/test/fixtures/sorted-selected.js.map +1 -1
- package/es/organism/course-selection/test/fixtures/switch-activated.js +23 -0
- package/es/organism/course-selection/test/fixtures/switch-activated.js.map +1 -0
- package/es/organism/course-selection/test/fixtures/unsorted-selected.js +9 -1
- package/es/organism/course-selection/test/fixtures/unsorted-selected.js.map +1 -1
- package/es/organism/course-selection/test/fixtures.js +2 -0
- package/es/organism/course-selection/test/fixtures.js.map +1 -1
- package/es/organism/list-item/test/fixtures.js +19 -0
- package/es/organism/list-item/test/fixtures.js.map +1 -0
- package/es/organism/list-items/test/fixtures/published.js +1 -1
- package/es/organism/list-items/test/fixtures/published.js.map +1 -1
- package/es/organism/list-items/test/fixtures.js +17 -0
- package/es/organism/list-items/test/fixtures.js.map +1 -0
- package/es/organism/search-and-chips-results/index.js +5 -3
- package/es/organism/search-and-chips-results/index.js.map +1 -1
- package/es/organism/search-and-chips-results/test/fixtures/default.js +1 -0
- package/es/organism/search-and-chips-results/test/fixtures/default.js.map +1 -1
- package/es/organism/wizard-contents/index.js +7 -3
- package/es/organism/wizard-contents/index.js.map +1 -1
- package/es/organism/wizard-contents/style.css +6 -0
- package/es/organism/wizard-contents/test/fixtures.js +21 -0
- package/es/organism/wizard-contents/test/fixtures.js.map +1 -0
- package/es/template/back-office/brand-update/test/fixtures.js +20 -2
- package/es/template/back-office/brand-update/test/fixtures.js.map +1 -1
- package/lib/atom/clue/test/see-clue.js +34 -0
- package/lib/atom/clue/test/see-clue.js.map +1 -1
- package/lib/atom/content-badge/test/fixtures.js +3 -0
- package/lib/atom/content-badge/test/fixtures.js.map +1 -1
- package/lib/atom/input-switch/index.js +13 -6
- package/lib/atom/input-switch/index.js.map +1 -1
- package/lib/atom/input-switch/style.css +46 -0
- package/lib/atom/input-switch/test/fixtures/cm-left.js +16 -0
- package/lib/atom/input-switch/test/fixtures/cm-left.js.map +1 -0
- package/lib/atom/input-switch/test/fixtures/cm-right-checked.js +16 -0
- package/lib/atom/input-switch/test/fixtures/cm-right-checked.js.map +1 -0
- package/lib/atom/input-switch/test/fixtures/cm-right-disabled.js +20 -0
- package/lib/atom/input-switch/test/fixtures/cm-right-disabled.js.map +1 -0
- package/lib/atom/input-switch/test/fixtures/cm-right-modified.js +17 -0
- package/lib/atom/input-switch/test/fixtures/cm-right-modified.js.map +1 -0
- package/lib/atom/input-switch/test/fixtures/cm-right.js +16 -0
- package/lib/atom/input-switch/test/fixtures/cm-right.js.map +1 -0
- package/lib/atom/input-switch/test/fixtures.js +15 -0
- package/lib/atom/input-switch/test/fixtures.js.map +1 -1
- package/lib/atom/loader/test/fixtures.js +3 -0
- package/lib/atom/loader/test/fixtures.js.map +1 -1
- package/lib/atom/provider/index.js +1 -1
- package/lib/atom/provider/index.js.map +1 -1
- package/lib/molecule/banner/test/fixtures.js +12 -0
- package/lib/molecule/banner/test/fixtures.js.map +1 -1
- package/lib/molecule/cm-popin/style.css +1 -0
- package/lib/molecule/cockpit-popin/test/fixtures.js +28 -0
- package/lib/molecule/cockpit-popin/test/fixtures.js.map +1 -0
- package/lib/molecule/select-multiple/style.css +1 -0
- package/lib/molecule/select-multiple/test/fixtures.js +12 -0
- package/lib/molecule/select-multiple/test/fixtures.js.map +1 -1
- package/lib/molecule/vertical-tabs/test/fixtures.js +3 -0
- package/lib/molecule/vertical-tabs/test/fixtures.js.map +1 -1
- package/lib/molecule/wizard-summary/index.js +29 -2
- package/lib/molecule/wizard-summary/index.js.map +1 -1
- package/lib/organism/content-translation/style.css +1 -0
- package/lib/organism/content-translation/test/fixtures.js +25 -0
- package/lib/organism/content-translation/test/fixtures.js.map +1 -0
- package/lib/organism/course-selection/index.js +12 -6
- package/lib/organism/course-selection/index.js.map +1 -1
- package/lib/organism/course-selection/style.css +2 -1
- package/lib/organism/course-selection/test/fixtures/default.js +10 -1
- package/lib/organism/course-selection/test/fixtures/default.js.map +1 -1
- package/lib/organism/course-selection/test/fixtures/empty.js +9 -0
- package/lib/organism/course-selection/test/fixtures/empty.js.map +1 -1
- package/lib/organism/course-selection/test/fixtures/filtered.js +9 -1
- package/lib/organism/course-selection/test/fixtures/filtered.js.map +1 -1
- package/lib/organism/course-selection/test/fixtures/sorted-selected.js +9 -1
- package/lib/organism/course-selection/test/fixtures/sorted-selected.js.map +1 -1
- package/lib/organism/course-selection/test/fixtures/switch-activated.js +32 -0
- package/lib/organism/course-selection/test/fixtures/switch-activated.js.map +1 -0
- package/lib/organism/course-selection/test/fixtures/unsorted-selected.js +9 -1
- package/lib/organism/course-selection/test/fixtures/unsorted-selected.js.map +1 -1
- package/lib/organism/course-selection/test/fixtures.js +3 -0
- package/lib/organism/course-selection/test/fixtures.js.map +1 -1
- package/lib/organism/list-item/test/fixtures.js +31 -0
- package/lib/organism/list-item/test/fixtures.js.map +1 -0
- package/lib/organism/list-items/test/fixtures/published.js +1 -1
- package/lib/organism/list-items/test/fixtures/published.js.map +1 -1
- package/lib/organism/list-items/test/fixtures.js +28 -0
- package/lib/organism/list-items/test/fixtures.js.map +1 -0
- package/lib/organism/search-and-chips-results/index.js +5 -3
- package/lib/organism/search-and-chips-results/index.js.map +1 -1
- package/lib/organism/search-and-chips-results/test/fixtures/default.js +1 -0
- package/lib/organism/search-and-chips-results/test/fixtures/default.js.map +1 -1
- package/lib/organism/wizard-contents/index.js +7 -3
- package/lib/organism/wizard-contents/index.js.map +1 -1
- package/lib/organism/wizard-contents/style.css +6 -0
- package/lib/organism/wizard-contents/test/fixtures.js +34 -0
- package/lib/organism/wizard-contents/test/fixtures.js.map +1 -0
- package/lib/template/back-office/brand-update/test/fixtures.js +30 -3
- package/lib/template/back-office/brand-update/test/fixtures.js.map +1 -1
- package/package.json +2 -2
- package/es/organism/playlist-translation/test/fixtures.js +0 -15
- package/es/organism/playlist-translation/test/fixtures.js.map +0 -1
- package/lib/organism/playlist-translation/test/fixtures.js +0 -25
- package/lib/organism/playlist-translation/test/fixtures.js.map +0 -1
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import test from 'ava';
|
|
2
|
+
import forEach from 'lodash/forEach';
|
|
3
|
+
import renderComponentMacro from '../../../test/helpers/render-component';
|
|
4
|
+
import OrganismListItems from '..';
|
|
5
|
+
import fixtureArchived from './fixtures/archived';
|
|
6
|
+
import fixtureDraft from './fixtures/draft';
|
|
7
|
+
import fixturePublished from './fixtures/published';
|
|
8
|
+
test('Organism › OrganismListItems > should have valid propTypes', t => {
|
|
9
|
+
t.pass();
|
|
10
|
+
forEach(OrganismListItems.propTypes, (value, key) => {
|
|
11
|
+
t.not(value, undefined, `PropType for "Organism.OrganismListItems.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
|
|
12
|
+
});
|
|
13
|
+
});
|
|
14
|
+
test('Organism › OrganismListItems › Archived › should be rendered', renderComponentMacro, OrganismListItems, fixtureArchived);
|
|
15
|
+
test('Organism › OrganismListItems › Draft › should be rendered', renderComponentMacro, OrganismListItems, fixtureDraft);
|
|
16
|
+
test('Organism › OrganismListItems › Published › should be rendered', renderComponentMacro, OrganismListItems, fixturePublished);
|
|
17
|
+
//# sourceMappingURL=fixtures.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/organism/list-items/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","OrganismListItems","fixtureArchived","fixtureDraft","fixturePublished","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,iBAAP,MAA8B,IAA9B;AACA,OAAOC,eAAP,MAA4B,qBAA5B;AACA,OAAOC,YAAP,MAAyB,kBAAzB;AACA,OAAOC,gBAAP,MAA6B,sBAA7B;AAEAN,IAAI,CAAC,4DAAD,EAA+DO,CAAC,IAAI;AACtEA,EAAAA,CAAC,CAACC,IAAF;AACAP,EAAAA,OAAO,CAACE,iBAAiB,CAACM,SAAnB,EAA8B,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACnDJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,sDAAqDF,GAAI,mEAAlF;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAX,IAAI,CAAC,8DAAD,EAAiEE,oBAAjE,EAAuFC,iBAAvF,EAA0GC,eAA1G,CAAJ;AACAJ,IAAI,CAAC,2DAAD,EAA8DE,oBAA9D,EAAoFC,iBAApF,EAAuGE,YAAvG,CAAJ;AACAL,IAAI,CAAC,+DAAD,EAAkEE,oBAAlE,EAAwFC,iBAAxF,EAA2GG,gBAA3G,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport OrganismListItems from '..';\nimport fixtureArchived from './fixtures/archived';\nimport fixtureDraft from './fixtures/draft';\nimport fixturePublished from './fixtures/published';\n\ntest('Organism › OrganismListItems > should have valid propTypes', t => {\n t.pass();\n forEach(OrganismListItems.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Organism.OrganismListItems.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Organism › OrganismListItems › Archived › should be rendered', renderComponentMacro, OrganismListItems, fixtureArchived);\ntest('Organism › OrganismListItems › Draft › should be rendered', renderComponentMacro, OrganismListItems, fixtureDraft);\ntest('Organism › OrganismListItems › Published › should be rendered', renderComponentMacro, OrganismListItems, fixturePublished);\n"],"file":"fixtures.js"}
|
|
@@ -10,8 +10,8 @@ import ButtonLink from '../../atom/button-link';
|
|
|
10
10
|
import Chips from '../../atom/chips';
|
|
11
11
|
import style from './style.css';
|
|
12
12
|
|
|
13
|
-
const buildResultView = (results, resultsAriaLabel, emptyMessages) => {
|
|
14
|
-
if (_isEmpty(results)) {
|
|
13
|
+
const buildResultView = (results, resultsAriaLabel, emptyMessages, isLoading) => {
|
|
14
|
+
if (!isLoading && _isEmpty(results)) {
|
|
15
15
|
return /*#__PURE__*/React.createElement(EmptySearchResult, emptyMessages);
|
|
16
16
|
}
|
|
17
17
|
|
|
@@ -33,6 +33,7 @@ const SearchAndChipsResults = props => {
|
|
|
33
33
|
selectAllButton,
|
|
34
34
|
results,
|
|
35
35
|
emptyMessages,
|
|
36
|
+
isLoading = false,
|
|
36
37
|
'results-aria-label': resultsAriaLabel
|
|
37
38
|
} = props;
|
|
38
39
|
const {
|
|
@@ -41,7 +42,7 @@ const SearchAndChipsResults = props => {
|
|
|
41
42
|
disabled = false,
|
|
42
43
|
'aria-label': ariaLabel
|
|
43
44
|
} = selectAllButton;
|
|
44
|
-
const resultView = buildResultView(results, resultsAriaLabel, emptyMessages);
|
|
45
|
+
const resultView = buildResultView(results, resultsAriaLabel, emptyMessages, isLoading);
|
|
45
46
|
const buttonProps = {
|
|
46
47
|
type: 'secondary',
|
|
47
48
|
label,
|
|
@@ -76,6 +77,7 @@ SearchAndChipsResults.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
76
77
|
disabled: PropTypes.bool,
|
|
77
78
|
'aria-label': PropTypes.string
|
|
78
79
|
}),
|
|
80
|
+
isLoading: PropTypes.bool,
|
|
79
81
|
search: PropTypes.shape(Search.PropTypes),
|
|
80
82
|
results: PropTypes.arrayOf(PropTypes.shape(Chips.propTypes)),
|
|
81
83
|
'results-aria-label': PropTypes.string,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/organism/search-and-chips-results/index.js"],"names":["React","PropTypes","EmptySearchResult","Search","ButtonLink","Chips","style","buildResultView","results","resultsAriaLabel","emptyMessages","items","map","result","index","SearchAndChipsResults","props","search","selectAllButton","onClick","label","disabled","ariaLabel","resultView","buttonProps","type","icon","position","container","header","button","resultContainer","propTypes","shape","string","func","bool","arrayOf","firstMessage","secondMessage"],"mappings":";;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,OAAOC,iBAAP,MAA8B,gCAA9B;AACA,OAAOC,MAAP,MAAmB,yBAAnB;AACA,OAAOC,UAAP,MAAuB,wBAAvB;AACA,OAAOC,KAAP,MAAkB,kBAAlB;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,eAAe,GAAG,CAACC,OAAD,EAAUC,gBAAV,EAA4BC,aAA5B,
|
|
1
|
+
{"version":3,"sources":["../../../src/organism/search-and-chips-results/index.js"],"names":["React","PropTypes","EmptySearchResult","Search","ButtonLink","Chips","style","buildResultView","results","resultsAriaLabel","emptyMessages","isLoading","items","map","result","index","SearchAndChipsResults","props","search","selectAllButton","onClick","label","disabled","ariaLabel","resultView","buttonProps","type","icon","position","container","header","button","resultContainer","propTypes","shape","string","func","bool","arrayOf","firstMessage","secondMessage"],"mappings":";;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,OAAOC,iBAAP,MAA8B,gCAA9B;AACA,OAAOC,MAAP,MAAmB,yBAAnB;AACA,OAAOC,UAAP,MAAuB,wBAAvB;AACA,OAAOC,KAAP,MAAkB,kBAAlB;AACA,OAAOC,KAAP,MAAkB,aAAlB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":["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 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}>{resultView}</div>\n </div>\n );\n};\n\nSearchAndChipsResults.propTypes = {\n selectAllButton: PropTypes.shape({\n label: PropTypes.string,\n onClick: PropTypes.func,\n disabled: PropTypes.bool,\n 'aria-label': PropTypes.string\n }),\n isLoading: PropTypes.bool,\n search: PropTypes.shape(Search.PropTypes),\n results: PropTypes.arrayOf(PropTypes.shape(Chips.propTypes)),\n 'results-aria-label': PropTypes.string,\n emptyMessages: PropTypes.shape({\n firstMessage: PropTypes.string,\n secondMessage: PropTypes.string\n })\n};\n\nexport default SearchAndChipsResults;\n"],"file":"index.js"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/organism/search-and-chips-results/test/fixtures/default.js"],"names":["props","selectAllButton","label","onClick","console","log","search","title","placeholder","value","description","onChange","results","text","information"],"mappings":"AAAA,eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,eAAe,EAAE;AACfC,MAAAA,KAAK,EAAE,YADQ;AAEfC,MAAAA,OAAO,EAAE,MAAMC,OAAO,CAACC,GAAR,CAAY,YAAZ;AAFA,KADZ;AAKLC,IAAAA,MAAM,EAAE;AACNC,MAAAA,KAAK,EAAE,WADD;AAENC,MAAAA,WAAW,EAAE,WAFP;AAGNC,MAAAA,KAAK,EAAE,EAHD;AAINC,MAAAA,WAAW,EAAE,gCAJP;AAKNC,MAAAA,QAAQ,EAAEF,KAAK,
|
|
1
|
+
{"version":3,"sources":["../../../../../src/organism/search-and-chips-results/test/fixtures/default.js"],"names":["props","selectAllButton","label","onClick","console","log","isLoading","search","title","placeholder","value","description","onChange","results","text","information"],"mappings":"AAAA,eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,eAAe,EAAE;AACfC,MAAAA,KAAK,EAAE,YADQ;AAEfC,MAAAA,OAAO,EAAE,MAAMC,OAAO,CAACC,GAAR,CAAY,YAAZ;AAFA,KADZ;AAKLC,IAAAA,SAAS,EAAE,KALN;AAMLC,IAAAA,MAAM,EAAE;AACNC,MAAAA,KAAK,EAAE,WADD;AAENC,MAAAA,WAAW,EAAE,WAFP;AAGNC,MAAAA,KAAK,EAAE,EAHD;AAINC,MAAAA,WAAW,EAAE,gCAJP;AAKNC,MAAAA,QAAQ,EAAEF,KAAK,IAAIN,OAAO,CAACC,GAAR,CAAYK,KAAZ;AALb,KANH;AAaL,0BAAsB,oBAbjB;AAcLG,IAAAA,OAAO,EAAE,CACP;AACEC,MAAAA,IAAI,EAAE,8CADR;AAEEC,MAAAA,WAAW,EAAE,aAFf;AAGEZ,MAAAA,OAAO,EAAE,MAAMC,OAAO,CAACC,GAAR,CAAY,oDAAZ;AAHjB,KADO,EAMP;AACES,MAAAA,IAAI,EAAE,cADR;AAEEC,MAAAA,WAAW,EAAE,WAFf;AAGEZ,MAAAA,OAAO,EAAE,MAAMC,OAAO,CAACC,GAAR,CAAY,oBAAZ;AAHjB,KANO,EAWP;AACES,MAAAA,IAAI,EAAE,GADR;AAEEC,MAAAA,WAAW,EAAE,KAFf;AAGEZ,MAAAA,OAAO,EAAE,MAAMC,OAAO,CAACC,GAAR,CAAY,SAAZ;AAHjB,KAXO,EAgBP;AACES,MAAAA,IAAI,EAAE,gDADR;AAEEC,MAAAA,WAAW,EAAE,UAFf;AAGEZ,MAAAA,OAAO,EAAE,MAAMC,OAAO,CAACC,GAAR,CAAY,sDAAZ;AAHjB,KAhBO,EAqBP;AACES,MAAAA,IAAI,EAAE,cADR;AAEEC,MAAAA,WAAW,EAAE,cAFf;AAGEZ,MAAAA,OAAO,EAAE,MAAMC,OAAO,CAACC,GAAR,CAAY,oBAAZ;AAHjB,KArBO,EA0BP;AACES,MAAAA,IAAI,EAAE,oCADR;AAEEC,MAAAA,WAAW,EAAE,WAFf;AAGEZ,MAAAA,OAAO,EAAE,MAAMC,OAAO,CAACC,GAAR,CAAY,0CAAZ;AAHjB,KA1BO,EA+BP;AACES,MAAAA,IAAI,EAAE,sBADR;AAEEC,MAAAA,WAAW,EAAE,YAFf;AAGEZ,MAAAA,OAAO,EAAE,MAAMC,OAAO,CAACC,GAAR,CAAY,4BAAZ;AAHjB,KA/BO;AAdJ;AADM,CAAf","sourcesContent":["export default {\n props: {\n selectAllButton: {\n label: 'Select All',\n onClick: () => console.log('Select All')\n },\n isLoading: false,\n search: {\n title: 'Search...',\n placeholder: 'Search...',\n value: '',\n description: 'Type to filter the populations',\n onChange: value => console.log(value)\n },\n 'results-aria-label': 'Population results',\n results: [\n {\n text: 'Population Human resourses filiale Singapour',\n information: '15739 users',\n onClick: () => console.log('click Population Human resourses filiale Singapour')\n },\n {\n text: 'Population 1',\n information: '345 users',\n onClick: () => console.log('click Population 1')\n },\n {\n text: 'P',\n information: '1 p',\n onClick: () => console.log('click P')\n },\n {\n text: 'Population managed by othes RH in some country',\n information: '10 users',\n onClick: () => console.log('click Population managed by othes RH in some country')\n },\n {\n text: 'Population 4',\n information: '106728 users',\n onClick: () => console.log('click Population 4')\n },\n {\n text: 'Population a long with a long name',\n information: '105 users',\n onClick: () => console.log('click Population a long with a long name')\n },\n {\n text: 'Result bit that long',\n information: '1067 users',\n onClick: () => console.log('click Result bit that long')\n }\n ]\n }\n};\n"],"file":"default.js"}
|
|
@@ -110,7 +110,9 @@ const WizardContents = props => {
|
|
|
110
110
|
previousStep
|
|
111
111
|
} = props;
|
|
112
112
|
const headerView = buildHeader(wizardHeader, steps);
|
|
113
|
-
const formView = buildForm(content)
|
|
113
|
+
const formView = buildForm(_extends(_extends({}, content), {}, {
|
|
114
|
+
isLoading
|
|
115
|
+
}));
|
|
114
116
|
const rightActionView = buildActionZone(previousStep, nextStep, 'right');
|
|
115
117
|
const footerActionView = buildActionZone(previousStep, nextStep, 'footer');
|
|
116
118
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -120,9 +122,11 @@ const WizardContents = props => {
|
|
|
120
122
|
className: style.leftSection
|
|
121
123
|
}, headerView, /*#__PURE__*/React.createElement("div", {
|
|
122
124
|
className: style.form
|
|
123
|
-
}, isLoading ? /*#__PURE__*/React.createElement(
|
|
125
|
+
}, isLoading ? /*#__PURE__*/React.createElement("div", {
|
|
126
|
+
className: style.loader
|
|
127
|
+
}, /*#__PURE__*/React.createElement(Loader, {
|
|
124
128
|
theme: "coorpmanager"
|
|
125
|
-
}) : formView)), /*#__PURE__*/React.createElement("div", {
|
|
129
|
+
})) : formView)), /*#__PURE__*/React.createElement("div", {
|
|
126
130
|
className: style.rightSection,
|
|
127
131
|
"data-name": "summary-right-section"
|
|
128
132
|
}, /*#__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","Loader","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,MAAP,MAAmB,mBAAnB;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,E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erB,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 Loader from '../../atom/loader';\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 }\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);\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}>{isLoading ? <Loader theme=\"coorpmanager\" /> : 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 ]),\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","Loader","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","loader","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,MAAP,MAAmB,mBAAnB;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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B,CADkB;AAExBnC,IAAAA,KAAK,EAAEhC,SAAS,CAAC+D,MAFO;AAGxBhD,IAAAA,OAAO,EAAEf,SAAS,CAACgE;AAHK,GAAhB;AAhCe,CAA3B;AAuCA,eAAetB,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 Loader from '../../atom/loader';\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 }\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}>\n {isLoading ? (\n <div className={style.loader}>\n <Loader theme=\"coorpmanager\" />\n </div>\n ) : (\n formView\n )}\n </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 ]),\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"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import test from 'ava';
|
|
2
|
+
import forEach from 'lodash/forEach';
|
|
3
|
+
import renderComponentMacro from '../../../test/helpers/render-component';
|
|
4
|
+
import OrganismWizardContents from '..';
|
|
5
|
+
import fixturePlaylistAddCoursesCreate from './fixtures/playlist-add-courses-create';
|
|
6
|
+
import fixturePlaylistGeneralSettingsCreate from './fixtures/playlist-general-settings-create';
|
|
7
|
+
import fixturePlaylistGeneralSettingsEdit from './fixtures/playlist-general-settings-edit';
|
|
8
|
+
import fixturePlaylistPopulationsCreate from './fixtures/playlist-populations-create';
|
|
9
|
+
import fixturePlaylistTranslateEdit from './fixtures/playlist-translate-edit';
|
|
10
|
+
test('Organism › OrganismWizardContents > should have valid propTypes', t => {
|
|
11
|
+
t.pass();
|
|
12
|
+
forEach(OrganismWizardContents.propTypes, (value, key) => {
|
|
13
|
+
t.not(value, undefined, `PropType for "Organism.OrganismWizardContents.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
|
|
14
|
+
});
|
|
15
|
+
});
|
|
16
|
+
test('Organism › OrganismWizardContents › PlaylistAddCoursesCreate › should be rendered', renderComponentMacro, OrganismWizardContents, fixturePlaylistAddCoursesCreate);
|
|
17
|
+
test('Organism › OrganismWizardContents › PlaylistGeneralSettingsCreate › should be rendered', renderComponentMacro, OrganismWizardContents, fixturePlaylistGeneralSettingsCreate);
|
|
18
|
+
test('Organism › OrganismWizardContents › PlaylistGeneralSettingsEdit › should be rendered', renderComponentMacro, OrganismWizardContents, fixturePlaylistGeneralSettingsEdit);
|
|
19
|
+
test('Organism › OrganismWizardContents › PlaylistPopulationsCreate › should be rendered', renderComponentMacro, OrganismWizardContents, fixturePlaylistPopulationsCreate);
|
|
20
|
+
test('Organism › OrganismWizardContents › PlaylistTranslateEdit › should be rendered', renderComponentMacro, OrganismWizardContents, fixturePlaylistTranslateEdit);
|
|
21
|
+
//# sourceMappingURL=fixtures.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/organism/wizard-contents/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","OrganismWizardContents","fixturePlaylistAddCoursesCreate","fixturePlaylistGeneralSettingsCreate","fixturePlaylistGeneralSettingsEdit","fixturePlaylistPopulationsCreate","fixturePlaylistTranslateEdit","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,sBAAP,MAAmC,IAAnC;AACA,OAAOC,+BAAP,MAA4C,wCAA5C;AACA,OAAOC,oCAAP,MAAiD,6CAAjD;AACA,OAAOC,kCAAP,MAA+C,2CAA/C;AACA,OAAOC,gCAAP,MAA6C,wCAA7C;AACA,OAAOC,4BAAP,MAAyC,oCAAzC;AAEAR,IAAI,CAAC,iEAAD,EAAoES,CAAC,IAAI;AAC3EA,EAAAA,CAAC,CAACC,IAAF;AACAT,EAAAA,OAAO,CAACE,sBAAsB,CAACQ,SAAxB,EAAmC,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACxDJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,2DAA0DF,GAAI,mEAAvF;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAb,IAAI,CAAC,mFAAD,EAAsFE,oBAAtF,EAA4GC,sBAA5G,EAAoIC,+BAApI,CAAJ;AACAJ,IAAI,CAAC,wFAAD,EAA2FE,oBAA3F,EAAiHC,sBAAjH,EAAyIE,oCAAzI,CAAJ;AACAL,IAAI,CAAC,sFAAD,EAAyFE,oBAAzF,EAA+GC,sBAA/G,EAAuIG,kCAAvI,CAAJ;AACAN,IAAI,CAAC,oFAAD,EAAuFE,oBAAvF,EAA6GC,sBAA7G,EAAqII,gCAArI,CAAJ;AACAP,IAAI,CAAC,gFAAD,EAAmFE,oBAAnF,EAAyGC,sBAAzG,EAAiIK,4BAAjI,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport OrganismWizardContents from '..';\nimport fixturePlaylistAddCoursesCreate from './fixtures/playlist-add-courses-create';\nimport fixturePlaylistGeneralSettingsCreate from './fixtures/playlist-general-settings-create';\nimport fixturePlaylistGeneralSettingsEdit from './fixtures/playlist-general-settings-edit';\nimport fixturePlaylistPopulationsCreate from './fixtures/playlist-populations-create';\nimport fixturePlaylistTranslateEdit from './fixtures/playlist-translate-edit';\n\ntest('Organism › OrganismWizardContents > should have valid propTypes', t => {\n t.pass();\n forEach(OrganismWizardContents.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Organism.OrganismWizardContents.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Organism › OrganismWizardContents › PlaylistAddCoursesCreate › should be rendered', renderComponentMacro, OrganismWizardContents, fixturePlaylistAddCoursesCreate);\ntest('Organism › OrganismWizardContents › PlaylistGeneralSettingsCreate › should be rendered', renderComponentMacro, OrganismWizardContents, fixturePlaylistGeneralSettingsCreate);\ntest('Organism › OrganismWizardContents › PlaylistGeneralSettingsEdit › should be rendered', renderComponentMacro, OrganismWizardContents, fixturePlaylistGeneralSettingsEdit);\ntest('Organism › OrganismWizardContents › PlaylistPopulationsCreate › should be rendered', renderComponentMacro, OrganismWizardContents, fixturePlaylistPopulationsCreate);\ntest('Organism › OrganismWizardContents › PlaylistTranslateEdit › should be rendered', renderComponentMacro, OrganismWizardContents, fixturePlaylistTranslateEdit);\n"],"file":"fixtures.js"}
|
|
@@ -11,6 +11,10 @@ import fixtureDashboardsAnalytics from './fixtures/dashboards-analytics';
|
|
|
11
11
|
import fixtureDefault from './fixtures/default';
|
|
12
12
|
import fixtureGeneralSettingsSuccess from './fixtures/general-settings-success';
|
|
13
13
|
import fixtureGeneralSettings from './fixtures/general-settings';
|
|
14
|
+
import fixtureListItemsArchived from './fixtures/list-items-archived';
|
|
15
|
+
import fixtureListItemsDraft from './fixtures/list-items-draft';
|
|
16
|
+
import fixtureListItemsPublishedWithPopin from './fixtures/list-items-published-with-popin';
|
|
17
|
+
import fixtureListItemsPublished from './fixtures/list-items-published';
|
|
14
18
|
import fixtureLmsError from './fixtures/lms-error';
|
|
15
19
|
import fixtureLmsModified from './fixtures/lms-modified';
|
|
16
20
|
import fixtureLmsSuccess from './fixtures/lms-success';
|
|
@@ -23,13 +27,18 @@ import fixtureLookandfeelSuccess from './fixtures/lookandfeel-success';
|
|
|
23
27
|
import fixtureLookandfeel from './fixtures/lookandfeel';
|
|
24
28
|
import fixtureManageusersEdit from './fixtures/manageusers-edit';
|
|
25
29
|
import fixtureManageusersList from './fixtures/manageusers-list';
|
|
26
|
-
import fixtureManageusers from './fixtures/manageusers';
|
|
27
30
|
import fixtureQuickAccess from './fixtures/quick-access';
|
|
28
31
|
import fixtureSsoActivate from './fixtures/sso-activate';
|
|
29
32
|
import fixtureSso from './fixtures/sso';
|
|
30
33
|
import fixtureUploadusersLoading from './fixtures/uploadusers-loading';
|
|
31
34
|
import fixtureUploadusersSuccessful from './fixtures/uploadusers-successful';
|
|
32
35
|
import fixtureUploadusers from './fixtures/uploadusers';
|
|
36
|
+
import fixtureWizardAddCoursesPlaylist from './fixtures/wizard-add-courses-playlist';
|
|
37
|
+
import fixtureWizardFormCreatePlaylist from './fixtures/wizard-form-create-playlist';
|
|
38
|
+
import fixtureWizardFormEditPlaylist from './fixtures/wizard-form-edit-playlist';
|
|
39
|
+
import fixtureWizardPopulationsPlaylistWithPopin from './fixtures/wizard-populations-playlist-with-popin';
|
|
40
|
+
import fixtureWizardPopulationsPlaylist from './fixtures/wizard-populations-playlist';
|
|
41
|
+
import fixtureWizardTranslatePlaylist from './fixtures/wizard-translate-playlist';
|
|
33
42
|
test('TemplateBackOffice › TemplateBackOfficeBrandUpdate > should have valid propTypes', t => {
|
|
34
43
|
t.pass();
|
|
35
44
|
forEach(TemplateBackOfficeBrandUpdate.propTypes, (value, key) => {
|
|
@@ -45,6 +54,10 @@ test('TemplateBackOffice › TemplateBackOfficeBrandUpdate › DashboardsAnalyti
|
|
|
45
54
|
test('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Default › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureDefault);
|
|
46
55
|
test('TemplateBackOffice › TemplateBackOfficeBrandUpdate › GeneralSettingsSuccess › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureGeneralSettingsSuccess);
|
|
47
56
|
test('TemplateBackOffice › TemplateBackOfficeBrandUpdate › GeneralSettings › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureGeneralSettings);
|
|
57
|
+
test('TemplateBackOffice › TemplateBackOfficeBrandUpdate › ListItemsArchived › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureListItemsArchived);
|
|
58
|
+
test('TemplateBackOffice › TemplateBackOfficeBrandUpdate › ListItemsDraft › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureListItemsDraft);
|
|
59
|
+
test('TemplateBackOffice › TemplateBackOfficeBrandUpdate › ListItemsPublishedWithPopin › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureListItemsPublishedWithPopin);
|
|
60
|
+
test('TemplateBackOffice › TemplateBackOfficeBrandUpdate › ListItemsPublished › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureListItemsPublished);
|
|
48
61
|
test('TemplateBackOffice › TemplateBackOfficeBrandUpdate › LmsError › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureLmsError);
|
|
49
62
|
test('TemplateBackOffice › TemplateBackOfficeBrandUpdate › LmsModified › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureLmsModified);
|
|
50
63
|
test('TemplateBackOffice › TemplateBackOfficeBrandUpdate › LmsSuccess › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureLmsSuccess);
|
|
@@ -57,11 +70,16 @@ test('TemplateBackOffice › TemplateBackOfficeBrandUpdate › LookandfeelSucces
|
|
|
57
70
|
test('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Lookandfeel › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureLookandfeel);
|
|
58
71
|
test('TemplateBackOffice › TemplateBackOfficeBrandUpdate › ManageusersEdit › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureManageusersEdit);
|
|
59
72
|
test('TemplateBackOffice › TemplateBackOfficeBrandUpdate › ManageusersList › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureManageusersList);
|
|
60
|
-
test('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Manageusers › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureManageusers);
|
|
61
73
|
test('TemplateBackOffice › TemplateBackOfficeBrandUpdate › QuickAccess › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureQuickAccess);
|
|
62
74
|
test('TemplateBackOffice › TemplateBackOfficeBrandUpdate › SsoActivate › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureSsoActivate);
|
|
63
75
|
test('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Sso › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureSso);
|
|
64
76
|
test('TemplateBackOffice › TemplateBackOfficeBrandUpdate › UploadusersLoading › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureUploadusersLoading);
|
|
65
77
|
test('TemplateBackOffice › TemplateBackOfficeBrandUpdate › UploadusersSuccessful › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureUploadusersSuccessful);
|
|
66
78
|
test('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Uploadusers › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureUploadusers);
|
|
79
|
+
test('TemplateBackOffice › TemplateBackOfficeBrandUpdate › WizardAddCoursesPlaylist › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureWizardAddCoursesPlaylist);
|
|
80
|
+
test('TemplateBackOffice › TemplateBackOfficeBrandUpdate › WizardFormCreatePlaylist › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureWizardFormCreatePlaylist);
|
|
81
|
+
test('TemplateBackOffice › TemplateBackOfficeBrandUpdate › WizardFormEditPlaylist › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureWizardFormEditPlaylist);
|
|
82
|
+
test('TemplateBackOffice › TemplateBackOfficeBrandUpdate › WizardPopulationsPlaylistWithPopin › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureWizardPopulationsPlaylistWithPopin);
|
|
83
|
+
test('TemplateBackOffice › TemplateBackOfficeBrandUpdate › WizardPopulationsPlaylist › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureWizardPopulationsPlaylist);
|
|
84
|
+
test('TemplateBackOffice › TemplateBackOfficeBrandUpdate › WizardTranslatePlaylist › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureWizardTranslatePlaylist);
|
|
67
85
|
//# sourceMappingURL=fixtures.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/template/back-office/brand-update/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","TemplateBackOfficeBrandUpdate","fixtureAnalytics","fixtureAnimations","fixtureCohortError","fixtureCohort","fixtureDashboard","fixtureDashboardsAnalytics","fixtureDefault","fixtureGeneralSettingsSuccess","fixtureGeneralSettings","fixtureLmsError","fixtureLmsModified","fixtureLmsSuccess","fixtureLms","fixtureLoader","fixtureLookandfeelError","fixtureLookandfeelModified","fixtureLookandfeelPending","fixtureLookandfeelSuccess","fixtureLookandfeel","fixtureManageusersEdit","fixtureManageusersList","fixtureManageusers","fixtureQuickAccess","fixtureSsoActivate","fixtureSso","fixtureUploadusersLoading","fixtureUploadusersSuccessful","fixtureUploadusers","t","pass","propTypes","value","key","not","undefined"],"mappings":"AAAA,OAAOA,IAAP,MAAiB,KAAjB;AACA,OAAOC,OAAP,MAAoB,gBAApB;AACA,OAAOC,oBAAP,MAAiC,2CAAjC;AACA,OAAOC,6BAAP,MAA0C,IAA1C;AACA,OAAOC,gBAAP,MAA6B,sBAA7B;AACA,OAAOC,iBAAP,MAA8B,uBAA9B;AACA,OAAOC,kBAAP,MAA+B,yBAA/B;AACA,OAAOC,aAAP,MAA0B,mBAA1B;AACA,OAAOC,gBAAP,MAA6B,sBAA7B;AACA,OAAOC,0BAAP,MAAuC,iCAAvC;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,6BAAP,MAA0C,qCAA1C;AACA,OAAOC,sBAAP,MAAmC,6BAAnC;AACA,OAAOC,eAAP,MAA4B,sBAA5B;AACA,OAAOC,kBAAP,MAA+B,yBAA/B;AACA,OAAOC,iBAAP,MAA8B,wBAA9B;AACA,OAAOC,UAAP,MAAuB,gBAAvB;AACA,OAAOC,aAAP,MAA0B,mBAA1B;AACA,OAAOC,uBAAP,MAAoC,8BAApC;AACA,OAAOC,0BAAP,MAAuC,iCAAvC;AACA,OAAOC,yBAAP,MAAsC,gCAAtC;AACA,OAAOC,yBAAP,MAAsC,gCAAtC;AACA,OAAOC,kBAAP,MAA+B,wBAA/B;AACA,OAAOC,sBAAP,MAAmC,6BAAnC;AACA,OAAOC,sBAAP,MAAmC,6BAAnC;AACA,OAAOC,kBAAP,MAA+B,wBAA/B;AACA,OAAOC,kBAAP,MAA+B,yBAA/B;AACA,O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,kBAA/I,CAAJ;AACA3B,IAAI,CAAC,+EAAD,EAAkFE,oBAAlF,EAAwGC,6BAAxG,EAAuIyB,UAAvI,CAAJ;AACA5B,IAAI,CAAC,8FAAD,EAAiGE,oBAAjG,EAAuHC,6BAAvH,EAAsJ0B,yBAAtJ,CAAJ;AACA7B,IAAI,CAAC,iGAAD,EAAoGE,oBAApG,EAA0HC,6BAA1H,EAAyJ2B,4BAAzJ,CAAJ;AACA9B,IAAI,CAAC,uFAAD,EAA0FE,oBAA1F,EAAgHC,6BAAhH,EAA+I4B,kBAA/I,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../../test/helpers/render-component';\nimport TemplateBackOfficeBrandUpdate from '..';\nimport fixtureAnalytics from './fixtures/analytics';\nimport fixtureAnimations from './fixtures/animations';\nimport fixtureCohortError from './fixtures/cohort-error';\nimport fixtureCohort from './fixtures/cohort';\nimport fixtureDashboard from './fixtures/dashboard';\nimport fixtureDashboardsAnalytics from './fixtures/dashboards-analytics';\nimport fixtureDefault from './fixtures/default';\nimport fixtureGeneralSettingsSuccess from './fixtures/general-settings-success';\nimport fixtureGeneralSettings from './fixtures/general-settings';\nimport fixtureLmsError from './fixtures/lms-error';\nimport fixtureLmsModified from './fixtures/lms-modified';\nimport fixtureLmsSuccess from './fixtures/lms-success';\nimport fixtureLms from './fixtures/lms';\nimport fixtureLoader from './fixtures/loader';\nimport fixtureLookandfeelError from './fixtures/lookandfeel-error';\nimport fixtureLookandfeelModified from './fixtures/lookandfeel-modified';\nimport fixtureLookandfeelPending from './fixtures/lookandfeel-pending';\nimport fixtureLookandfeelSuccess from './fixtures/lookandfeel-success';\nimport fixtureLookandfeel from './fixtures/lookandfeel';\nimport fixtureManageusersEdit from './fixtures/manageusers-edit';\nimport fixtureManageusersList from './fixtures/manageusers-list';\nimport fixtureManageusers from './fixtures/manageusers';\nimport fixtureQuickAccess from './fixtures/quick-access';\nimport fixtureSsoActivate from './fixtures/sso-activate';\nimport fixtureSso from './fixtures/sso';\nimport fixtureUploadusersLoading from './fixtures/uploadusers-loading';\nimport fixtureUploadusersSuccessful from './fixtures/uploadusers-successful';\nimport fixtureUploadusers from './fixtures/uploadusers';\n\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate > should have valid propTypes', t => {\n t.pass();\n forEach(TemplateBackOfficeBrandUpdate.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"TemplateBackOffice.TemplateBackOfficeBrandUpdate.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Analytics › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureAnalytics);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Animations › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureAnimations);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › CohortError › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureCohortError);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Cohort › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureCohort);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Dashboard › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureDashboard);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › DashboardsAnalytics › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureDashboardsAnalytics);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Default › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureDefault);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › GeneralSettingsSuccess › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureGeneralSettingsSuccess);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › GeneralSettings › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureGeneralSettings);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › LmsError › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureLmsError);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › LmsModified › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureLmsModified);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › LmsSuccess › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureLmsSuccess);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Lms › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureLms);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Loader › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureLoader);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › LookandfeelError › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureLookandfeelError);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › LookandfeelModified › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureLookandfeelModified);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › LookandfeelPending › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureLookandfeelPending);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › LookandfeelSuccess › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureLookandfeelSuccess);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Lookandfeel › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureLookandfeel);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › ManageusersEdit › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureManageusersEdit);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › ManageusersList › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureManageusersList);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Manageusers › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureManageusers);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › QuickAccess › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureQuickAccess);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › SsoActivate › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureSsoActivate);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Sso › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureSso);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › UploadusersLoading › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureUploadusersLoading);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › UploadusersSuccessful › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureUploadusersSuccessful);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Uploadusers › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureUploadusers);\n"],"file":"fixtures.js"}
|
|
1
|
+
{"version":3,"sources":["../../../../../src/template/back-office/brand-update/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","TemplateBackOfficeBrandUpdate","fixtureAnalytics","fixtureAnimations","fixtureCohortError","fixtureCohort","fixtureDashboard","fixtureDashboardsAnalytics","fixtureDefault","fixtureGeneralSettingsSuccess","fixtureGeneralSettings","fixtureListItemsArchived","fixtureListItemsDraft","fixtureListItemsPublishedWithPopin","fixtureListItemsPublished","fixtureLmsError","fixtureLmsModified","fixtureLmsSuccess","fixtureLms","fixtureLoader","fixtureLookandfeelError","fixtureLookandfeelModified","fixtureLookandfeelPending","fixtureLookandfeelSuccess","fixtureLookandfeel","fixtureManageusersEdit","fixtureManageusersList","fixtureQuickAccess","fixtureSsoActivate","fixtureSso","fixtureUploadusersLoading","fixtureUploadusersSuccessful","fixtureUploadusers","fixtureWizardAddCoursesPlaylist","fixtureWizardFormCreatePlaylist","fixtureWizardFormEditPlaylist","fixtureWizardPopulationsPlaylistWithPopin","fixtureWizardPopulationsPlaylist","fixtureWizardTranslatePlaylist","t","pass","propTypes","value","key","not","undefined"],"mappings":"AAAA,OAAOA,IAAP,MAAiB,KAAjB;AACA,OAAOC,OAAP,MAAoB,gBAApB;AACA,OAAOC,oBAAP,MAAiC,2CAAjC;AACA,OAAOC,6BAAP,MAA0C,IAA1C;AACA,OAAOC,gBAAP,MAA6B,sBAA7B;AACA,OAAOC,iBAAP,MAA8B,uBAA9B;AACA,OAAOC,kBAAP,MAA+B,yBAA/B;AACA,OAAOC,aAAP,MAA0B,mBAA1B;AACA,OAAOC,gBAAP,MAA6B,sBAA7B;AACA,OAAOC,0BAAP,MAAuC,iCAAvC;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,6BAAP,MAA0C,qCAA1C;AACA,OAAOC,sBAAP,MAAmC,6BAAnC;AACA,OAAOC,wBAAP,MAAqC,gCAArC;AACA,OAAOC,qBAAP,MAAkC,6BAAlC;AACA,OAAOC,kCAAP,MAA+C,4CAA/C;AACA,OAAOC,yBAAP,MAAsC,iCAAtC;AACA,OAAOC,eAAP,MAA4B,sBAA5B;AACA,OAAOC,kBAAP,MAA+B,yBAA/B;AACA,OAAOC,iBAAP,MAA8B,wBAA9B;AACA,OAAOC,UAAP,MAAuB,gBAAvB;AACA,OAAOC,aAAP,MAA0B,mBAA1B;AACA,OAAOC,uBAAP,MAAoC,8BAApC;AACA,OAAOC,0BAAP,MAAuC,iCAAvC;AACA,OAAOC,yBAAP,MAAsC,gCAAtC;AACA,OAAOC,yBAAP,MAAsC,gCAAtC;AACA,OAAOC,kBAAP,MAA+B,wBAA/B;AACA,OAAOC,sBAAP,MAAmC,6BAAnC;AACA,OAAOC,sBAAP,MAAmC,6BAAnC;AACA,OAAOC,kBAAP,MAA+B,yBAA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AA9H,EAA6JoC,gCAA7J,CAAJ;AACAvC,IAAI,CAAC,mGAAD,EAAsGE,oBAAtG,EAA4HC,6BAA5H,EAA2JqC,8BAA3J,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../../test/helpers/render-component';\nimport TemplateBackOfficeBrandUpdate from '..';\nimport fixtureAnalytics from './fixtures/analytics';\nimport fixtureAnimations from './fixtures/animations';\nimport fixtureCohortError from './fixtures/cohort-error';\nimport fixtureCohort from './fixtures/cohort';\nimport fixtureDashboard from './fixtures/dashboard';\nimport fixtureDashboardsAnalytics from './fixtures/dashboards-analytics';\nimport fixtureDefault from './fixtures/default';\nimport fixtureGeneralSettingsSuccess from './fixtures/general-settings-success';\nimport fixtureGeneralSettings from './fixtures/general-settings';\nimport fixtureListItemsArchived from './fixtures/list-items-archived';\nimport fixtureListItemsDraft from './fixtures/list-items-draft';\nimport fixtureListItemsPublishedWithPopin from './fixtures/list-items-published-with-popin';\nimport fixtureListItemsPublished from './fixtures/list-items-published';\nimport fixtureLmsError from './fixtures/lms-error';\nimport fixtureLmsModified from './fixtures/lms-modified';\nimport fixtureLmsSuccess from './fixtures/lms-success';\nimport fixtureLms from './fixtures/lms';\nimport fixtureLoader from './fixtures/loader';\nimport fixtureLookandfeelError from './fixtures/lookandfeel-error';\nimport fixtureLookandfeelModified from './fixtures/lookandfeel-modified';\nimport fixtureLookandfeelPending from './fixtures/lookandfeel-pending';\nimport fixtureLookandfeelSuccess from './fixtures/lookandfeel-success';\nimport fixtureLookandfeel from './fixtures/lookandfeel';\nimport fixtureManageusersEdit from './fixtures/manageusers-edit';\nimport fixtureManageusersList from './fixtures/manageusers-list';\nimport fixtureQuickAccess from './fixtures/quick-access';\nimport fixtureSsoActivate from './fixtures/sso-activate';\nimport fixtureSso from './fixtures/sso';\nimport fixtureUploadusersLoading from './fixtures/uploadusers-loading';\nimport fixtureUploadusersSuccessful from './fixtures/uploadusers-successful';\nimport fixtureUploadusers from './fixtures/uploadusers';\nimport fixtureWizardAddCoursesPlaylist from './fixtures/wizard-add-courses-playlist';\nimport fixtureWizardFormCreatePlaylist from './fixtures/wizard-form-create-playlist';\nimport fixtureWizardFormEditPlaylist from './fixtures/wizard-form-edit-playlist';\nimport fixtureWizardPopulationsPlaylistWithPopin from './fixtures/wizard-populations-playlist-with-popin';\nimport fixtureWizardPopulationsPlaylist from './fixtures/wizard-populations-playlist';\nimport fixtureWizardTranslatePlaylist from './fixtures/wizard-translate-playlist';\n\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate > should have valid propTypes', t => {\n t.pass();\n forEach(TemplateBackOfficeBrandUpdate.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"TemplateBackOffice.TemplateBackOfficeBrandUpdate.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Analytics › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureAnalytics);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Animations › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureAnimations);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › CohortError › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureCohortError);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Cohort › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureCohort);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Dashboard › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureDashboard);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › DashboardsAnalytics › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureDashboardsAnalytics);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Default › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureDefault);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › GeneralSettingsSuccess › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureGeneralSettingsSuccess);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › GeneralSettings › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureGeneralSettings);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › ListItemsArchived › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureListItemsArchived);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › ListItemsDraft › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureListItemsDraft);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › ListItemsPublishedWithPopin › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureListItemsPublishedWithPopin);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › ListItemsPublished › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureListItemsPublished);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › LmsError › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureLmsError);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › LmsModified › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureLmsModified);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › LmsSuccess › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureLmsSuccess);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Lms › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureLms);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Loader › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureLoader);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › LookandfeelError › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureLookandfeelError);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › LookandfeelModified › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureLookandfeelModified);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › LookandfeelPending › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureLookandfeelPending);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › LookandfeelSuccess › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureLookandfeelSuccess);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Lookandfeel › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureLookandfeel);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › ManageusersEdit › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureManageusersEdit);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › ManageusersList › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureManageusersList);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › QuickAccess › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureQuickAccess);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › SsoActivate › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureSsoActivate);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Sso › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureSso);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › UploadusersLoading › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureUploadusersLoading);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › UploadusersSuccessful › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureUploadusersSuccessful);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Uploadusers › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureUploadusers);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › WizardAddCoursesPlaylist › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureWizardAddCoursesPlaylist);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › WizardFormCreatePlaylist › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureWizardFormCreatePlaylist);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › WizardFormEditPlaylist › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureWizardFormEditPlaylist);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › WizardPopulationsPlaylistWithPopin › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureWizardPopulationsPlaylistWithPopin);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › WizardPopulationsPlaylist › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureWizardPopulationsPlaylist);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › WizardTranslatePlaylist › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureWizardTranslatePlaylist);\n"],"file":"fixtures.js"}
|
|
@@ -16,6 +16,8 @@ var _style = _interopRequireDefault(require("../style.css"));
|
|
|
16
16
|
|
|
17
17
|
var _ = _interopRequireDefault(require(".."));
|
|
18
18
|
|
|
19
|
+
var _provider = _interopRequireDefault(require("../../provider"));
|
|
20
|
+
|
|
19
21
|
var _default = _interopRequireDefault(require("./fixtures/default"));
|
|
20
22
|
|
|
21
23
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -76,4 +78,36 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
|
|
|
76
78
|
});
|
|
77
79
|
t.is(wrapper.find(clueTextStyle).text(), 'This is the new clue ...');
|
|
78
80
|
});
|
|
81
|
+
(0, _ava.default)('should clue color is the primary color if color is defined on skin', t => {
|
|
82
|
+
const context = {
|
|
83
|
+
skin: {
|
|
84
|
+
common: {
|
|
85
|
+
primary: '#FF0000'
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
translate: key => key
|
|
89
|
+
};
|
|
90
|
+
t.plan(1);
|
|
91
|
+
const backStyle = `.${(0, _replace2.default)(' ', '.', _style.default.back)}`;
|
|
92
|
+
const wrapper = (0, _enzyme.mount)( /*#__PURE__*/_react.default.createElement(_provider.default, context, /*#__PURE__*/_react.default.createElement(_.default, _default.default.props)));
|
|
93
|
+
t.deepEqual(wrapper.find(backStyle).get(0).props.style, {
|
|
94
|
+
backgroundColor: '#FF0000'
|
|
95
|
+
});
|
|
96
|
+
});
|
|
97
|
+
(0, _ava.default)('should clue color is the fallback primary color if color not defined on skin', t => {
|
|
98
|
+
const context = {
|
|
99
|
+
skin: {
|
|
100
|
+
common: {
|
|
101
|
+
secondary: '#FF0000'
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
translate: key => key
|
|
105
|
+
};
|
|
106
|
+
t.plan(1);
|
|
107
|
+
const backStyle = `.${(0, _replace2.default)(' ', '.', _style.default.back)}`;
|
|
108
|
+
const wrapper = (0, _enzyme.mount)( /*#__PURE__*/_react.default.createElement(_provider.default, context, /*#__PURE__*/_react.default.createElement(_.default, _default.default.props)));
|
|
109
|
+
t.deepEqual(wrapper.find(backStyle).get(0).props.style, {
|
|
110
|
+
backgroundColor: '#00B0FF'
|
|
111
|
+
});
|
|
112
|
+
});
|
|
79
113
|
//# sourceMappingURL=see-clue.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/atom/clue/test/see-clue.js"],"names":["adapter","Adapter","t","context","skin","translate","key","plan","clueCardStyle","style","clueCard","flipStyle","flip","loadingStyle","loading","backContentStyle","backContent","clueTextStyle","clueText","onClick","e","pass","wrapper","defaultFixture","props","is","find","exists","simulate","preventDefault","stopPropagation","setProps","text"],"mappings":";;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AAEA;;AACA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AAAA,CAAC,CAACuB,EAAF,CAAKH,OAAO,CAACI,IAAR,CAAab,YAAb,EAA2Bc,MAA3B,EAAL,EAA0C,KAA1C;AACAzB,EAAAA,CAAC,CAACuB,EAAF,CAAKH,OAAO,CAACI,IAAR,CAAaX,gBAAb,EAA+BY,MAA/B,EAAL,EAA8C,IAA9C;AAEAL,EAAAA,OAAO,CAACS,QAAR,CAAiB;AAACC,IAAAA,IAAI,EAAE;AAAP,GAAjB;AAEA9B,EAAAA,CAAC,CAACuB,EAAF,CAAKH,OAAO,CAACI,IAAR,CAAaT,aAAb,EAA4Be,IAA5B,EAAL,EAAyC,EAAzC;AAEAV,EAAAA,OAAO,CAACS,QAAR,CAAiB;AAACC,IAAAA,IAAI,EAAE;AAAP,GAAjB;AAEA9B,EAAAA,CAAC,CAACuB,EAAF,CAAKH,OAAO,CAACI,IAAR,CAAaT,aAAb,EAA4Be,IAA5B,EAAL,EAAyC,0BAAzC;AACD,CApDD","sourcesContent":["import browserEnv from 'browser-env';\nimport test from 'ava';\nimport React from 'react';\nimport {mount, configure} from 'enzyme';\nimport Adapter from 'enzyme-adapter-react-16';\nimport {replace} from 'lodash/fp';\nimport style from '../style.css'; // eslint-disable-line css-modules/no-unused-class\nimport Clue from '..';\nimport defaultFixture from './fixtures/default';\n\nbrowserEnv();\nconfigure({adapter: new Adapter()});\n\ntest('should See the clue', t => {\n const context = {\n skin: {},\n translate: key => key\n };\n t.plan(16);\n\n const clueCardStyle = `.${replace(' ', '.', style.clueCard)}`;\n const flipStyle = `.${replace(' ', '.', style.flip)}`;\n\n const loadingStyle = `.${replace(' ', '.', style.loading)}`;\n const backContentStyle = `.${replace(' ', '.', style.backContent)}`;\n\n const clueTextStyle = `.${replace(' ', '.', style.clueText)}`;\n\n const onClick = e => {\n t.pass();\n };\n\n const wrapper = mount(<Clue {...defaultFixture.props} onClick={onClick} />, {context});\n\n t.is(wrapper.find(clueCardStyle).exists(), true);\n t.is(wrapper.find(flipStyle).exists(), false);\n t.is(wrapper.find(loadingStyle).exists(), false);\n t.is(wrapper.find(backContentStyle).exists(), true);\n\n wrapper.find('a').simulate('click', {\n preventDefault: () => {},\n stopPropagation: () => {}\n });\n\n t.is(wrapper.find(clueCardStyle).exists(), true);\n t.is(wrapper.find(flipStyle).exists(), false);\n t.is(wrapper.find(loadingStyle).exists(), true);\n t.is(wrapper.find(backContentStyle).exists(), true);\n\n wrapper.setProps({text: 'This is the clue ...'});\n\n t.is(wrapper.find(clueTextStyle).text(), 'This is the clue ...');\n\n t.is(wrapper.find(clueCardStyle).exists(), true);\n t.is(wrapper.find(flipStyle).exists(), true);\n t.is(wrapper.find(loadingStyle).exists(), false);\n t.is(wrapper.find(backContentStyle).exists(), true);\n\n wrapper.setProps({text: ''});\n\n t.is(wrapper.find(clueTextStyle).text(), '');\n\n wrapper.setProps({text: 'This is the new clue ...'});\n\n t.is(wrapper.find(clueTextStyle).text(), 'This is the new clue ...');\n});\n"],"file":"see-clue.js"}
|
|
1
|
+
{"version":3,"sources":["../../../../src/atom/clue/test/see-clue.js"],"names":["adapter","Adapter","t","context","skin","translate","key","plan","clueCardStyle","style","clueCard","flipStyle","flip","loadingStyle","loading","backContentStyle","backContent","clueTextStyle","clueText","onClick","e","pass","wrapper","defaultFixture","props","is","find","exists","simulate","preventDefault","stopPropagation","setProps","text","common","primary","backStyle","back","deepEqual","get","backgroundColor","secondary"],"mappings":";;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AACA;;;;;;AAEA;AACA,uBAAU;AAACA,EAAAA,OAAO,EAAE,IAAIC,2BAAJ;AAAV,CAAV;AAEA,kBAAK,qBAAL,EAA4BC,CAAC,IAAI;AAC/B,QAAMC,OAAO,GAAG;AACdC,IAAAA,IAAI,EAAE,EADQ;AAEdC,IAAAA,SAAS,EAAEC,GAAG,IAAIA;AAFJ,GAAhB;AAIAJ,EAAAA,CAAC,CAACK,IAAF,CAAO,EAAP;AAEA,QAAMC,aAAa,GAAI,IAAG,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M4B,SAAS,GAAI,IAAG,uBAAQ,GAAR,EAAa,GAAb,EAAkB1B,eAAM2B,IAAxB,CAA8B,EAApD;AAEA,QAAMd,OAAO,GAAG,iCACd,6BAAC,iBAAD,EAAcnB,OAAd,eACE,6BAAC,SAAD,EAAUoB,iBAAeC,KAAzB,CADF,CADc,CAAhB;AAMAtB,EAAAA,CAAC,CAACmC,SAAF,CAAYf,OAAO,CAACI,IAAR,CAAaS,SAAb,EAAwBG,GAAxB,CAA4B,CAA5B,EAA+Bd,KAA/B,CAAqCf,KAAjD,EAAwD;AACtD8B,IAAAA,eAAe,EAAE;AADqC,GAAxD;AAGD,CArBD","sourcesContent":["import browserEnv from 'browser-env';\nimport test from 'ava';\nimport React from 'react';\nimport {mount, configure} from 'enzyme';\nimport Adapter from 'enzyme-adapter-react-16';\nimport {replace} from 'lodash/fp';\nimport style from '../style.css'; // eslint-disable-line css-modules/no-unused-class\nimport Clue from '..';\nimport Provider from '../../provider';\nimport defaultFixture from './fixtures/default';\n\nbrowserEnv();\nconfigure({adapter: new Adapter()});\n\ntest('should See the clue', t => {\n const context = {\n skin: {},\n translate: key => key\n };\n t.plan(16);\n\n const clueCardStyle = `.${replace(' ', '.', style.clueCard)}`;\n const flipStyle = `.${replace(' ', '.', style.flip)}`;\n\n const loadingStyle = `.${replace(' ', '.', style.loading)}`;\n const backContentStyle = `.${replace(' ', '.', style.backContent)}`;\n\n const clueTextStyle = `.${replace(' ', '.', style.clueText)}`;\n\n const onClick = e => {\n t.pass();\n };\n\n const wrapper = mount(<Clue {...defaultFixture.props} onClick={onClick} />, {context});\n\n t.is(wrapper.find(clueCardStyle).exists(), true);\n t.is(wrapper.find(flipStyle).exists(), false);\n t.is(wrapper.find(loadingStyle).exists(), false);\n t.is(wrapper.find(backContentStyle).exists(), true);\n\n wrapper.find('a').simulate('click', {\n preventDefault: () => {},\n stopPropagation: () => {}\n });\n\n t.is(wrapper.find(clueCardStyle).exists(), true);\n t.is(wrapper.find(flipStyle).exists(), false);\n t.is(wrapper.find(loadingStyle).exists(), true);\n t.is(wrapper.find(backContentStyle).exists(), true);\n\n wrapper.setProps({text: 'This is the clue ...'});\n\n t.is(wrapper.find(clueTextStyle).text(), 'This is the clue ...');\n\n t.is(wrapper.find(clueCardStyle).exists(), true);\n t.is(wrapper.find(flipStyle).exists(), true);\n t.is(wrapper.find(loadingStyle).exists(), false);\n t.is(wrapper.find(backContentStyle).exists(), true);\n\n wrapper.setProps({text: ''});\n\n t.is(wrapper.find(clueTextStyle).text(), '');\n\n wrapper.setProps({text: 'This is the new clue ...'});\n\n t.is(wrapper.find(clueTextStyle).text(), 'This is the new clue ...');\n});\n\ntest('should clue color is the primary color if color is defined on skin', t => {\n const context = {\n skin: {\n common: {\n primary: '#FF0000'\n }\n },\n translate: key => key\n };\n t.plan(1);\n const backStyle = `.${replace(' ', '.', style.back)}`;\n\n const wrapper = mount(\n <Provider {...context}>\n <Clue {...defaultFixture.props} />\n </Provider>\n );\n\n t.deepEqual(wrapper.find(backStyle).get(0).props.style, {\n backgroundColor: '#FF0000'\n });\n});\n\ntest('should clue color is the fallback primary color if color not defined on skin', t => {\n const context = {\n skin: {\n common: {\n secondary: '#FF0000'\n }\n },\n translate: key => key\n };\n t.plan(1);\n const backStyle = `.${replace(' ', '.', style.back)}`;\n\n const wrapper = mount(\n <Provider {...context}>\n <Clue {...defaultFixture.props} />\n </Provider>\n );\n\n t.deepEqual(wrapper.find(backStyle).get(0).props.style, {\n backgroundColor: '#00B0FF'\n });\n});\n"],"file":"see-clue.js"}
|
|
@@ -16,6 +16,8 @@ var _chapter = _interopRequireDefault(require("./fixtures/chapter"));
|
|
|
16
16
|
|
|
17
17
|
var _coach = _interopRequireDefault(require("./fixtures/coach"));
|
|
18
18
|
|
|
19
|
+
var _course = _interopRequireDefault(require("./fixtures/course"));
|
|
20
|
+
|
|
19
21
|
var _default = _interopRequireDefault(require("./fixtures/default"));
|
|
20
22
|
|
|
21
23
|
var _podcast = _interopRequireDefault(require("./fixtures/podcast"));
|
|
@@ -36,6 +38,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
36
38
|
(0, _ava.default)('Atom › AtomContentBadge › Article › should be rendered', _renderComponent.default, _.default, _article.default);
|
|
37
39
|
(0, _ava.default)('Atom › AtomContentBadge › Chapter › should be rendered', _renderComponent.default, _.default, _chapter.default);
|
|
38
40
|
(0, _ava.default)('Atom › AtomContentBadge › Coach › should be rendered', _renderComponent.default, _.default, _coach.default);
|
|
41
|
+
(0, _ava.default)('Atom › AtomContentBadge › Course › should be rendered', _renderComponent.default, _.default, _course.default);
|
|
39
42
|
(0, _ava.default)('Atom › AtomContentBadge › Default › should be rendered', _renderComponent.default, _.default, _default.default);
|
|
40
43
|
(0, _ava.default)('Atom › AtomContentBadge › Podcast › should be rendered', _renderComponent.default, _.default, _podcast.default);
|
|
41
44
|
(0, _ava.default)('Atom › AtomContentBadge › Scorm › should be rendered', _renderComponent.default, _.default, _scorm.default);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/atom/content-badge/test/fixtures.js"],"names":["t","pass","AtomContentBadge","propTypes","value","key","not","undefined","renderComponentMacro","fixtureAdvanced","fixtureArticle","fixtureChapter","fixtureCoach","fixtureDefault","fixturePodcast","fixtureScorm","fixtureVideo"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,uDAAL,EAA8DA,CAAC,IAAI;AACjEA,EAAAA,CAAC,CAACC,IAAF;AACA,wBAAQC,UAAiBC,SAAzB,EAAoC,CAACC,KAAD,EAAQC,GAAR,KAAgB;AAClDL,IAAAA,CAAC,CAACM,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,iDAAgDF,GAAI,mEAA7E;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,yDAAL,EAAgEG,wBAAhE,EAAsFN,SAAtF,EAAwGO,iBAAxG;AACA,kBAAK,wDAAL,EAA+DD,wBAA/D,EAAqFN,SAArF,EAAuGQ,gBAAvG;AACA,kBAAK,wDAAL,EAA+DF,wBAA/D,EAAqFN,SAArF,EAAuGS,gBAAvG;AACA,kBAAK,sDAAL,EAA6DH,wBAA7D,EAAmFN,SAAnF,EAAqGU,cAArG;AACA,kBAAK,wDAAL,EAA+
|
|
1
|
+
{"version":3,"sources":["../../../../src/atom/content-badge/test/fixtures.js"],"names":["t","pass","AtomContentBadge","propTypes","value","key","not","undefined","renderComponentMacro","fixtureAdvanced","fixtureArticle","fixtureChapter","fixtureCoach","fixtureCourse","fixtureDefault","fixturePodcast","fixtureScorm","fixtureVideo"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,uDAAL,EAA8DA,CAAC,IAAI;AACjEA,EAAAA,CAAC,CAACC,IAAF;AACA,wBAAQC,UAAiBC,SAAzB,EAAoC,CAACC,KAAD,EAAQC,GAAR,KAAgB;AAClDL,IAAAA,CAAC,CAACM,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,iDAAgDF,GAAI,mEAA7E;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,yDAAL,EAAgEG,wBAAhE,EAAsFN,SAAtF,EAAwGO,iBAAxG;AACA,kBAAK,wDAAL,EAA+DD,wBAA/D,EAAqFN,SAArF,EAAuGQ,gBAAvG;AACA,kBAAK,wDAAL,EAA+DF,wBAA/D,EAAqFN,SAArF,EAAuGS,gBAAvG;AACA,kBAAK,sDAAL,EAA6DH,wBAA7D,EAAmFN,SAAnF,EAAqGU,cAArG;AACA,kBAAK,uDAAL,EAA8DJ,wBAA9D,EAAoFN,SAApF,EAAsGW,eAAtG;AACA,kBAAK,wDAAL,EAA+DL,wBAA/D,EAAqFN,SAArF,EAAuGY,gBAAvG;AACA,kBAAK,wDAAL,EAA+DN,wBAA/D,EAAqFN,SAArF,EAAuGa,gBAAvG;AACA,kBAAK,sDAAL,EAA6DP,wBAA7D,EAAmFN,SAAnF,EAAqGc,cAArG;AACA,kBAAK,sDAAL,EAA6DR,wBAA7D,EAAmFN,SAAnF,EAAqGe,cAArG","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport AtomContentBadge from '..';\nimport fixtureAdvanced from './fixtures/advanced';\nimport fixtureArticle from './fixtures/article';\nimport fixtureChapter from './fixtures/chapter';\nimport fixtureCoach from './fixtures/coach';\nimport fixtureCourse from './fixtures/course';\nimport fixtureDefault from './fixtures/default';\nimport fixturePodcast from './fixtures/podcast';\nimport fixtureScorm from './fixtures/scorm';\nimport fixtureVideo from './fixtures/video';\n\ntest('Atom › AtomContentBadge > should have valid propTypes', t => {\n t.pass();\n forEach(AtomContentBadge.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Atom.AtomContentBadge.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Atom › AtomContentBadge › Advanced › should be rendered', renderComponentMacro, AtomContentBadge, fixtureAdvanced);\ntest('Atom › AtomContentBadge › Article › should be rendered', renderComponentMacro, AtomContentBadge, fixtureArticle);\ntest('Atom › AtomContentBadge › Chapter › should be rendered', renderComponentMacro, AtomContentBadge, fixtureChapter);\ntest('Atom › AtomContentBadge › Coach › should be rendered', renderComponentMacro, AtomContentBadge, fixtureCoach);\ntest('Atom › AtomContentBadge › Course › should be rendered', renderComponentMacro, AtomContentBadge, fixtureCourse);\ntest('Atom › AtomContentBadge › Default › should be rendered', renderComponentMacro, AtomContentBadge, fixtureDefault);\ntest('Atom › AtomContentBadge › Podcast › should be rendered', renderComponentMacro, AtomContentBadge, fixturePodcast);\ntest('Atom › AtomContentBadge › Scorm › should be rendered', renderComponentMacro, AtomContentBadge, fixtureScorm);\ntest('Atom › AtomContentBadge › Video › should be rendered', renderComponentMacro, AtomContentBadge, fixtureVideo);\n"],"file":"fixtures.js"}
|
|
@@ -30,7 +30,9 @@ const InputSwitch = props => {
|
|
|
30
30
|
disabled,
|
|
31
31
|
onChange = _noop2.default,
|
|
32
32
|
description,
|
|
33
|
-
modified = false
|
|
33
|
+
modified = false,
|
|
34
|
+
theme = 'default',
|
|
35
|
+
titlePosition = 'left'
|
|
34
36
|
} = props;
|
|
35
37
|
const idSwitch = id || (0, _uniqueId2.default)('input-switch-');
|
|
36
38
|
const isDisabled = disabled ? 'disabled' : '';
|
|
@@ -41,10 +43,13 @@ const InputSwitch = props => {
|
|
|
41
43
|
const descriptionView = description ? /*#__PURE__*/_react.default.createElement("div", {
|
|
42
44
|
className: _style.default.description
|
|
43
45
|
}, description) : null;
|
|
44
|
-
const
|
|
46
|
+
const defaultClass = theme === 'coorpmanager' ? _style.default.coorpmanager : _style.default.default;
|
|
47
|
+
const modifiedClass = theme === 'coorpmanager' ? _style.default.coorpmanagerModified : _style.default.modified;
|
|
48
|
+
const className = (0, _getClassState.default)(defaultClass, modifiedClass, null, modified);
|
|
45
49
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
46
|
-
className: className
|
|
47
|
-
|
|
50
|
+
className: className,
|
|
51
|
+
"data-name": `switch-input-${theme}`
|
|
52
|
+
}, titlePosition === 'left' ? titleView : null, /*#__PURE__*/_react.default.createElement("input", {
|
|
48
53
|
type: "checkbox",
|
|
49
54
|
id: idSwitch,
|
|
50
55
|
name: name,
|
|
@@ -54,7 +59,7 @@ const InputSwitch = props => {
|
|
|
54
59
|
className: _style.default.checkbox
|
|
55
60
|
}), /*#__PURE__*/_react.default.createElement("label", {
|
|
56
61
|
htmlFor: idSwitch
|
|
57
|
-
}), descriptionView);
|
|
62
|
+
}), titlePosition === 'right' ? titleView : null, descriptionView);
|
|
58
63
|
};
|
|
59
64
|
|
|
60
65
|
InputSwitch.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
@@ -65,7 +70,9 @@ InputSwitch.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
65
70
|
disabled: _propTypes.default.bool,
|
|
66
71
|
onChange: _propTypes.default.func,
|
|
67
72
|
description: _propTypes.default.string,
|
|
68
|
-
modified: _propTypes.default.bool
|
|
73
|
+
modified: _propTypes.default.bool,
|
|
74
|
+
titlePosition: _propTypes.default.oneOf(['right', 'left']),
|
|
75
|
+
theme: _propTypes.default.oneOf(['default', 'coorpmanager'])
|
|
69
76
|
} : {};
|
|
70
77
|
var _default = InputSwitch;
|
|
71
78
|
exports.default = _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/atom/input-switch/index.js"],"names":["InputSwitch","props","title","name","id","value","disabled","onChange","description","modified","idSwitch","isDisabled","handleChange","e","target","checked","titleView","style","descriptionView","
|
|
1
|
+
{"version":3,"sources":["../../../src/atom/input-switch/index.js"],"names":["InputSwitch","props","title","name","id","value","disabled","onChange","description","modified","theme","titlePosition","idSwitch","isDisabled","handleChange","e","target","checked","titleView","style","descriptionView","defaultClass","coorpmanager","default","modifiedClass","coorpmanagerModified","className","checkbox","propTypes","PropTypes","string","bool","func","oneOf"],"mappings":";;;;;;;;;AAAA;;AACA;;AAEA;;AACA;;;;;;;;AAEA,MAAMA,WAAW,GAAGC,KAAK,IAAI;AAC3B,QAAM;AACJC,IAAAA,KADI;AAEJC,IAAAA,IAFI;AAGJC,IAAAA,EAHI;AAIJC,IAAAA,KAJI;AAKJC,IAAAA,QALI;AAMJC,IAAAA,QAAQ,iBANJ;AAOJC,IAAAA,WAPI;AAQJC,IAAAA,QAAQ,GAAG,KARP;AASJC,IAAAA,KAAK,GAAG,SATJ;AAUJC,IAAAA,aAAa,GAAG;AAVZ,MAWFV,KAXJ;AAaA,QAAMW,QAAQ,GAAGR,EAAE,IAAI,wBAAS,eAAT,CAAvB;AACA,QAAMS,UAAU,GAAGP,QAAQ,GAAG,UAAH,GAAgB,EAA3C;AACA,QAAMQ,YAAY,GAAG,oBAAQ,MAAMC,CAAC,IAAIR,QAAQ,CAACQ,CAAC,CAACC,MAAF,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EAAEyB,mBAAUC,MAHQ;AAItBzB,EAAAA,KAAK,EAAEwB,mBAAUE,IAJK;AAKtBzB,EAAAA,QAAQ,EAAEuB,mBAAUE,IALE;AAMtBxB,EAAAA,QAAQ,EAAEsB,mBAAUG,IANE;AAOtBxB,EAAAA,WAAW,EAAEqB,mBAAUC,MAPD;AAQtBrB,EAAAA,QAAQ,EAAEoB,mBAAUE,IARE;AAStBpB,EAAAA,aAAa,EAAEkB,mBAAUI,KAAV,CAAgB,CAAC,OAAD,EAAU,MAAV,CAAhB,CATO;AAUtBvB,EAAAA,KAAK,EAAEmB,mBAAUI,KAAV,CAAgB,CAAC,SAAD,EAAY,cAAZ,CAAhB;AAVe,CAAxB;eAYejC,W","sourcesContent":["import React, {useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport {noop, uniqueId} from 'lodash/fp';\nimport getClassState from '../../util/get-class-state';\nimport style from './style.css';\n\nconst InputSwitch = props => {\n const {\n title,\n name,\n id,\n value,\n disabled,\n onChange = noop,\n description,\n modified = false,\n theme = 'default',\n titlePosition = 'left'\n } = props;\n\n const idSwitch = id || uniqueId('input-switch-');\n const isDisabled = disabled ? 'disabled' : '';\n const handleChange = useMemo(() => e => onChange(e.target.checked), [onChange]);\n\n const titleView = title ? <span className={style.title}>{`${title} `}</span> : null;\n\n const descriptionView = description ? (\n <div className={style.description}>{description}</div>\n ) : null;\n\n const defaultClass = theme === 'coorpmanager' ? style.coorpmanager : style.default;\n const modifiedClass = theme === 'coorpmanager' ? style.coorpmanagerModified : style.modified;\n const className = getClassState(defaultClass, modifiedClass, null, modified);\n\n return (\n <div className={className} data-name={`switch-input-${theme}`}>\n {titlePosition === 'left' ? titleView : null}\n <input\n type=\"checkbox\"\n id={idSwitch}\n name={name}\n onChange={handleChange}\n checked={value}\n disabled={isDisabled}\n className={style.checkbox}\n />\n <label htmlFor={idSwitch} />\n {titlePosition === 'right' ? titleView : null}\n {descriptionView}\n </div>\n );\n};\n\nInputSwitch.propTypes = {\n title: PropTypes.string,\n name: PropTypes.string,\n id: PropTypes.string,\n value: PropTypes.bool,\n disabled: PropTypes.bool,\n onChange: PropTypes.func,\n description: PropTypes.string,\n modified: PropTypes.bool,\n titlePosition: PropTypes.oneOf(['right', 'left']),\n theme: PropTypes.oneOf(['default', 'coorpmanager'])\n};\nexport default InputSwitch;\n"],"file":"index.js"}
|