@coorpacademy/components 10.1.14 → 10.1.15
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/molecule/banner/test/fixtures.js +0 -8
- package/es/molecule/banner/test/fixtures.js.map +1 -1
- package/es/molecule/search/test/fixtures.js +15 -0
- package/es/molecule/search/test/fixtures.js.map +1 -0
- package/es/molecule/select-multiple/index.js +4 -6
- package/es/molecule/select-multiple/index.js.map +1 -1
- package/es/molecule/select-multiple/style.css +3 -2
- package/es/molecule/select-multiple/test/fixtures/checked-cm-theme-disabled.js +32 -0
- package/es/molecule/select-multiple/test/fixtures/checked-cm-theme-disabled.js.map +1 -0
- package/es/molecule/select-multiple/test/fixtures/checked-cm-theme-error.js +32 -0
- package/es/molecule/select-multiple/test/fixtures/checked-cm-theme-error.js.map +1 -0
- package/es/molecule/select-multiple/test/fixtures/checked-cm-theme.js +1 -1
- package/es/molecule/select-multiple/test/fixtures/checked-cm-theme.js.map +1 -1
- package/es/molecule/select-multiple/test/fixtures.js +0 -4
- package/es/molecule/select-multiple/test/fixtures.js.map +1 -1
- package/es/organism/brand-form/test/fixtures/wizard-playlists.js +26 -0
- package/es/organism/brand-form/test/fixtures/wizard-playlists.js.map +1 -1
- package/es/template/back-office/brand-update/test/fixtures.js +2 -0
- package/es/template/back-office/brand-update/test/fixtures.js.map +1 -1
- package/lib/molecule/banner/test/fixtures.js +0 -12
- package/lib/molecule/banner/test/fixtures.js.map +1 -1
- package/lib/molecule/search/test/fixtures.js +25 -0
- package/lib/molecule/search/test/fixtures.js.map +1 -0
- package/lib/molecule/select-multiple/index.js +4 -6
- package/lib/molecule/select-multiple/index.js.map +1 -1
- package/lib/molecule/select-multiple/style.css +3 -2
- package/lib/molecule/select-multiple/test/fixtures/checked-cm-theme-disabled.js +37 -0
- package/lib/molecule/select-multiple/test/fixtures/checked-cm-theme-disabled.js.map +1 -0
- package/lib/molecule/select-multiple/test/fixtures/checked-cm-theme-error.js +37 -0
- package/lib/molecule/select-multiple/test/fixtures/checked-cm-theme-error.js.map +1 -0
- package/lib/molecule/select-multiple/test/fixtures/checked-cm-theme.js +1 -1
- package/lib/molecule/select-multiple/test/fixtures/checked-cm-theme.js.map +1 -1
- package/lib/molecule/select-multiple/test/fixtures.js +0 -6
- package/lib/molecule/select-multiple/test/fixtures.js.map +1 -1
- package/lib/organism/brand-form/test/fixtures/wizard-playlists.js +26 -0
- package/lib/organism/brand-form/test/fixtures/wizard-playlists.js.map +1 -1
- package/lib/template/back-office/brand-update/test/fixtures.js +3 -0
- package/lib/template/back-office/brand-update/test/fixtures.js.map +1 -1
- package/package.json +2 -2
- package/es/organism/list-item/test/fixtures.js +0 -19
- package/es/organism/list-item/test/fixtures.js.map +0 -1
- package/lib/organism/list-item/test/fixtures.js +0 -31
- package/lib/organism/list-item/test/fixtures.js.map +0 -1
|
@@ -4,10 +4,6 @@ import renderComponentMacro from '../../../test/helpers/render-component';
|
|
|
4
4
|
import MoleculeBanner from '..';
|
|
5
5
|
import fixtureDefault from './fixtures/default';
|
|
6
6
|
import fixtureErrorBanner from './fixtures/error-banner';
|
|
7
|
-
import fixtureErrorTemporaryBanner from './fixtures/error-temporary-banner';
|
|
8
|
-
import fixtureSuccessBanner from './fixtures/success-banner';
|
|
9
|
-
import fixtureSuccessTemporaryBanner from './fixtures/success-temporary-banner';
|
|
10
|
-
import fixtureWarningTemporaryBanner from './fixtures/warning-temporary-banner';
|
|
11
7
|
test('Molecule › MoleculeBanner > should have valid propTypes', t => {
|
|
12
8
|
t.pass();
|
|
13
9
|
forEach(MoleculeBanner.propTypes, (value, key) => {
|
|
@@ -16,8 +12,4 @@ test('Molecule › MoleculeBanner > should have valid propTypes', t => {
|
|
|
16
12
|
});
|
|
17
13
|
test('Molecule › MoleculeBanner › Default › should be rendered', renderComponentMacro, MoleculeBanner, fixtureDefault);
|
|
18
14
|
test('Molecule › MoleculeBanner › ErrorBanner › should be rendered', renderComponentMacro, MoleculeBanner, fixtureErrorBanner);
|
|
19
|
-
test('Molecule › MoleculeBanner › ErrorTemporaryBanner › should be rendered', renderComponentMacro, MoleculeBanner, fixtureErrorTemporaryBanner);
|
|
20
|
-
test('Molecule › MoleculeBanner › SuccessBanner › should be rendered', renderComponentMacro, MoleculeBanner, fixtureSuccessBanner);
|
|
21
|
-
test('Molecule › MoleculeBanner › SuccessTemporaryBanner › should be rendered', renderComponentMacro, MoleculeBanner, fixtureSuccessTemporaryBanner);
|
|
22
|
-
test('Molecule › MoleculeBanner › WarningTemporaryBanner › should be rendered', renderComponentMacro, MoleculeBanner, fixtureWarningTemporaryBanner);
|
|
23
15
|
//# sourceMappingURL=fixtures.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/molecule/banner/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","MoleculeBanner","fixtureDefault","fixtureErrorBanner","
|
|
1
|
+
{"version":3,"sources":["../../../../src/molecule/banner/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","MoleculeBanner","fixtureDefault","fixtureErrorBanner","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,kBAAP,MAA+B,yBAA/B;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,8DAAD,EAAiEE,oBAAjE,EAAuFC,cAAvF,EAAuGE,kBAAvG,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport MoleculeBanner from '..';\nimport fixtureDefault from './fixtures/default';\nimport fixtureErrorBanner from './fixtures/error-banner';\n\ntest('Molecule › MoleculeBanner > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeBanner.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Molecule.MoleculeBanner.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Molecule › MoleculeBanner › Default › should be rendered', renderComponentMacro, MoleculeBanner, fixtureDefault);\ntest('Molecule › MoleculeBanner › ErrorBanner › should be rendered', renderComponentMacro, MoleculeBanner, fixtureErrorBanner);\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"}
|
|
@@ -53,7 +53,7 @@ const CMMultipleView = ({
|
|
|
53
53
|
return onChange(_extends(_extends({}, choice), {}, {
|
|
54
54
|
selected: checked
|
|
55
55
|
}));
|
|
56
|
-
}, [onChange, choice]);
|
|
56
|
+
}, [onChange, choice, multiple]);
|
|
57
57
|
return multiple ? /*#__PURE__*/React.createElement("div", {
|
|
58
58
|
className: style.item
|
|
59
59
|
}, /*#__PURE__*/React.createElement(Checkbox, {
|
|
@@ -95,13 +95,11 @@ const SelectMultiple = ({
|
|
|
95
95
|
const black = _get('common.black', skin);
|
|
96
96
|
|
|
97
97
|
const handleOnClick = useCallback(e => {
|
|
98
|
+
if (disabled) return;
|
|
98
99
|
e.preventDefault();
|
|
99
100
|
e.stopPropagation();
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
updateIsOpened(prev => !prev);
|
|
103
|
-
}
|
|
104
|
-
}, []);
|
|
101
|
+
updateIsOpened(prev => !prev);
|
|
102
|
+
}, [disabled]);
|
|
105
103
|
const closeHandle = useCallback(e => {
|
|
106
104
|
if (nodeRef && nodeRef.current && !nodeRef.current.contains(e.target)) {
|
|
107
105
|
updateIsOpened(false);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/molecule/select-multiple/index.js"],"names":["React","useState","useEffect","useRef","useCallback","PropTypes","classnames","NovaCompositionNavigationArrowDown","ArrowDown","NovaSolidStatusClose","ErrorIcon","NovaCompositionCoorpacademyInformationIcon","InfoIcon","TitledCheckbox","Provider","Checkbox","getClassState","style","themeStyle","setup","cockpit","sidebar","coorpmanager","useChoices","options","choicesRef","getChoices","current","setChoices","choice","choices","i","selected","filter","c","CMMultipleView","multiple","onChange","handleChange","checked","item","name","SelectMultiple","title","theme","placeholder","description","hint","onError","modified","required","error","disabled","skin","isOpened","updateIsOpened","nodeRef","defaultColor","black","handleOnClick","e","preventDefault","stopPropagation","prev","closeHandle","contains","target","document","addEventListener","removeEventListener","isCMTheme","lines","convert","cap","selection","_title","isActive","titleView","titleWithSelection","noValue","active","infoIconWrapper","infoIcon","descriptionLabel","hintView","__html","mainClass","default","showPlaceholder","behaviourClassName","errorIconView","errorIcon","select","noselection","iconsWrapper","flex","clicked","arrow","down","activeChoices","list","contextTypes","childContextTypes","propTypes","bool","func","string","arrayOf","oneOf"],"mappings":";;;;;;;;;;;AAAA,OAAOA,KAAP,IAAeC,QAAf,EAAyBC,SAAzB,EAAoCC,MAApC,EAA4CC,WAA5C,QAA8D,OAA9D;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AAEA,SACEC,kCAAkC,IAAIC,SADxC,EAEEC,oBAAoB,IAAIC,SAF1B,EAGEC,0CAA0C,IAAIC,QAHhD,QAIO,0BAJP;AAKA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,QAAP,MAAqB,qBAArB;AACA,OAAOC,QAAP,MAAqB,2BAArB;AACA,OAAOC,aAAP,MAA0B,4BAA1B;AACA,OAAOC,KAAP,MAAkB,aAAlB;AAEA,MAAMC,UAAU,GAAG;AACjBC,EAAAA,KAAK,EAAEF,KAAK,CAACE,KADI;AAEjBC,EAAAA,OAAO,EAAEH,KAAK,CAACG,OAFE;AAGjBC,EAAAA,OAAO,EAAEJ,KAAK,CAACI,OAHE;AAIjBC,EAAAA,YAAY,EAAEL,KAAK,CAACK;AAJH,CAAnB;AAOA,OAAO,MAAMC,UAAU,GAAGC,OAAO,IAAI;AACnC,QAAMC,UAAU,GAAGtB,MAAM,CAACqB,OAAD,CAAzB;;AAEA,QAAME,UAAU,GAAG,MAAM;AACvB,WAAOD,UAAU,CAACE,OAAlB;AACD,GAFD;;AAIA,QAAMC,UAAU,GAAGC,MAAM,IAAI;AAC3B,UAAMC,OAAO,GAAG,KAAK,IAAGD,MAAM,CAACE,CAAE,YAAjB,EAA8B,CAACF,MAAM,CAACG,QAAtC,EAAgDN,U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,QAAQ,EAAE/B,SAAS,CAACmG,IARK;AASzBvD,EAAAA,QAAQ,EAAE5C,SAAS,CAACmG,IATK;AAUzBpD,EAAAA,QAAQ,EAAE/C,SAAS,CAACmG,IAVK;AAWzBtD,EAAAA,QAAQ,EAAE7C,SAAS,CAACmG,IAXK;AAYzBrD,EAAAA,KAAK,EAAE9C,SAAS,CAACqG,MAZQ;AAazB9D,EAAAA,KAAK,EAAEvC,SAAS,CAACuG,KAAV,CAAgB,MAAK1F,UAAL,CAAhB;AAbkB,CAA3B;AAgBA,eAAewB,cAAf","sourcesContent":["import React, {useState, useEffect, useRef, useCallback} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {map, pipe, join, filter, get, set, keys, isEmpty} from 'lodash/fp';\nimport {\n NovaCompositionNavigationArrowDown as ArrowDown,\n NovaSolidStatusClose as ErrorIcon,\n NovaCompositionCoorpacademyInformationIcon as InfoIcon\n} from '@coorpacademy/nova-icons';\nimport TitledCheckbox from '../titled-checkbox';\nimport Provider from '../../atom/provider';\nimport Checkbox from '../../atom/input-checkbox';\nimport getClassState from '../../util/get-class-state';\nimport style from './style.css';\n\nconst themeStyle = {\n setup: style.setup,\n cockpit: style.cockpit,\n sidebar: style.sidebar,\n coorpmanager: style.coorpmanager\n};\n\nexport const useChoices = options => {\n const choicesRef = useRef(options);\n\n const getChoices = () => {\n return choicesRef.current;\n };\n\n const setChoices = choice => {\n const choices = set(`[${choice.i}].selected`, !choice.selected, getChoices());\n\n choicesRef.current = choices.filter(c => c.selected);\n };\n\n return [getChoices, setChoices];\n};\n\nconst CMMultipleView = ({multiple, choice, onChange}) => {\n const handleChange = useCallback(\n checked => {\n if (!multiple) {\n return onChange(choice);\n }\n return onChange({...choice, selected: checked});\n },\n [onChange, choice]\n );\n\n return multiple ? (\n <div className={style.item}>\n <Checkbox\n titleStyle=\"inherit\"\n checked={choice.selected}\n onChange={handleChange}\n noLabelMargins\n title={choice.name}\n />\n </div>\n ) : (\n <span className={style.item} onClick={handleChange} title={choice.name}>\n {choice.name}\n </span>\n );\n};\n\nconst SelectMultiple = (\n {\n title,\n options,\n theme,\n placeholder,\n description,\n hint,\n multiple,\n onChange,\n onError,\n modified = false,\n required = false,\n error = '',\n disabled = false\n },\n {skin}\n) => {\n const [isOpened, updateIsOpened] = useState(false);\n const [getChoices, setChoices] = useChoices(options);\n const nodeRef = useRef(null);\n\n const defaultColor = get('common.primary', skin);\n const black = get('common.black', skin);\n\n const handleOnClick = useCallback(e => {\n e.preventDefault();\n e.stopPropagation();\n\n if (!disabled) {\n updateIsOpened(prev => !prev);\n }\n }, []);\n\n const closeHandle = useCallback(e => {\n if (nodeRef && nodeRef.current && !nodeRef.current.contains(e.target)) {\n updateIsOpened(false);\n }\n }, []);\n\n const handleChange = useCallback(\n choice => {\n // if multiple prop is turned on\n // we return all selected choices\n if (multiple) {\n setChoices(choice);\n\n return onChange(getChoices());\n }\n\n return onChange(choice);\n },\n [setChoices, multiple, onChange]\n );\n\n useEffect(() => {\n document.addEventListener('click', closeHandle);\n document.addEventListener('touchstart', closeHandle);\n\n return () => {\n document.removeEventListener('click', closeHandle);\n document.removeEventListener('touchstart', closeHandle);\n };\n }, [closeHandle]);\n\n const isCMTheme = theme === 'coorpmanager';\n\n const lines = map.convert({cap: false})((choice, i) => {\n return (\n <li key={i} className={style.choice}>\n {isCMTheme ? (\n <CMMultipleView multiple={multiple} choice={{...choice, i}} onChange={handleChange} />\n ) : (\n <TitledCheckbox\n onToggle={handleChange}\n choice={{...choice, i}}\n background={defaultColor}\n />\n )}\n </li>\n );\n }, options);\n\n const selection = pipe(filter({selected: true}), map('name'), join(', '))(options);\n\n const _title = title && `${title}${required ? ' *' : ''}`;\n\n const isActive = isOpened === true;\n\n const titleView = title ? (\n <span\n className={classnames(\n style.title,\n isCMTheme && selection && style.titleWithSelection,\n isCMTheme && isEmpty(selection) && style.noValue,\n isActive && style.active\n )}\n >\n {_title}\n {isCMTheme ? (\n <div className={style.infoIconWrapper}>\n <InfoIcon className={style.infoIcon} />\n <div className={style.descriptionLabel}>{description}</div>\n </div>\n ) : null}\n </span>\n ) : null;\n\n const hintView =\n isCMTheme && !isActive ? (\n <div\n className={style.hint}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: error || hint}}\n />\n ) : null;\n\n const mainClass = theme ? themeStyle[theme] : style.default;\n const showPlaceholder = isCMTheme && isActive;\n const behaviourClassName = getClassState(\n style.default,\n style.modified,\n style.error,\n modified,\n error\n );\n\n const errorIconView = error ? <ErrorIcon onClick={onError} className={style.errorIcon} /> : null;\n\n return (\n <div\n className={classnames(mainClass, behaviourClassName, disabled && style.disabled)}\n ref={nodeRef}\n >\n <label>\n {!isCMTheme && titleView}\n <div className={style.select} title={selection || placeholder} onClick={handleOnClick}>\n {isCMTheme && titleView}\n <span\n className={classnames(\n style.selection,\n isCMTheme && isEmpty(selection) && style.noselection\n )}\n >\n {selection || !isCMTheme || (showPlaceholder && placeholder) || null}\n </span>\n {isCMTheme ? (\n <div className={style.iconsWrapper}>\n <div className={style.flex}>{errorIconView}</div>\n <div className={classnames(style.flex, isActive && style.clicked)}>\n <ArrowDown\n color={black}\n className={classnames(style.arrow, {[style.down]: isActive})}\n />\n </div>\n </div>\n ) : (\n <ArrowDown\n color={black}\n className={classnames(style.arrow, {[style.down]: isActive})}\n />\n )}\n </div>\n <div className={classnames(style.choices, isActive && style.activeChoices)}>\n <ul className={style.list}>{lines}</ul>\n </div>\n </label>\n {!isCMTheme ? <div className={style.description}>{description}</div> : null}\n {hintView}\n </div>\n );\n};\n\nSelectMultiple.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nCMMultipleView.propTypes = {\n multiple: PropTypes.bool,\n choice: TitledCheckbox.propTypes.choice,\n onChange: PropTypes.func\n};\n\nSelectMultiple.propTypes = {\n title: PropTypes.string,\n placeholder: PropTypes.string,\n description: PropTypes.string,\n hint: PropTypes.string,\n options: PropTypes.arrayOf(TitledCheckbox.propTypes.choice),\n onChange: PropTypes.func,\n onError: PropTypes.func,\n multiple: PropTypes.bool,\n modified: PropTypes.bool,\n disabled: PropTypes.bool,\n required: PropTypes.bool,\n error: PropTypes.string,\n theme: PropTypes.oneOf(keys(themeStyle))\n};\n\nexport default SelectMultiple;\n"],"file":"index.js"}
|
|
1
|
+
{"version":3,"sources":["../../../src/molecule/select-multiple/index.js"],"names":["React","useState","useEffect","useRef","useCallback","PropTypes","classnames","NovaCompositionNavigationArrowDown","ArrowDown","NovaSolidStatusClose","ErrorIcon","NovaCompositionCoorpacademyInformationIcon","InfoIcon","TitledCheckbox","Provider","Checkbox","getClassState","style","themeStyle","setup","cockpit","sidebar","coorpmanager","useChoices","options","choicesRef","getChoices","current","setChoices","choice","choices","i","selected","filter","c","CMMultipleView","multiple","onChange","handleChange","checked","item","name","SelectMultiple","title","theme","placeholder","description","hint","onError","modified","required","error","disabled","skin","isOpened","updateIsOpened","nodeRef","defaultColor","black","handleOnClick","e","preventDefault","stopPropagation","prev","closeHandle","contains","target","document","addEventListener","removeEventListener","isCMTheme","lines","convert","cap","selection","_title","isActive","titleView","titleWithSelection","noValue","active","infoIconWrapper","infoIcon","descriptionLabel","hintView","__html","mainClass","default","showPlaceholder","behaviourClassName","errorIconView","errorIcon","select","noselection","iconsWrapper","flex","clicked","arrow","down","activeChoices","list","contextTypes","childContextTypes","propTypes","bool","func","string","arrayOf","oneOf"],"mappings":";;;;;;;;;;;AAAA,OAAOA,KAAP,IAAeC,QAAf,EAAyBC,SAAzB,EAAoCC,MAApC,EAA4CC,WAA5C,QAA8D,OAA9D;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AAEA,SACEC,kCAAkC,IAAIC,SADxC,EAEEC,oBAAoB,IAAIC,SAF1B,EAGEC,0CAA0C,IAAIC,QAHhD,QAIO,0BAJP;AAKA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,QAAP,MAAqB,qBAArB;AACA,OAAOC,QAAP,M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2CAA2B;AACzBnE,EAAAA,QAAQ,EAAE/B,SAAS,CAACmG,IADK;AAEzB3E,EAAAA,MAAM,EAAEhB,cAAc,CAAC0F,SAAf,CAAyB1E,MAFR;AAGzBQ,EAAAA,QAAQ,EAAEhC,SAAS,CAACoG;AAHK,CAA3B;AAMA/D,cAAc,CAAC6D,SAAf,2CAA2B;AACzB5D,EAAAA,KAAK,EAAEtC,SAAS,CAACqG,MADQ;AAEzB7D,EAAAA,WAAW,EAAExC,SAAS,CAACqG,MAFE;AAGzB5D,EAAAA,WAAW,EAAEzC,SAAS,CAACqG,MAHE;AAIzB3D,EAAAA,IAAI,EAAE1C,SAAS,CAACqG,MAJS;AAKzBlF,EAAAA,OAAO,EAAEnB,SAAS,CAACsG,OAAV,CAAkB9F,cAAc,CAAC0F,SAAf,CAAyB1E,MAA3C,CALgB;AAMzBQ,EAAAA,QAAQ,EAAEhC,SAAS,CAACoG,IANK;AAOzBzD,EAAAA,OAAO,EAAE3C,SAAS,CAACoG,IAPM;AAQzBrE,EAAAA,QAAQ,EAAE/B,SAAS,CAACmG,IARK;AASzBvD,EAAAA,QAAQ,EAAE5C,SAAS,CAACmG,IATK;AAUzBpD,EAAAA,QAAQ,EAAE/C,SAAS,CAACmG,IAVK;AAWzBtD,EAAAA,QAAQ,EAAE7C,SAAS,CAACmG,IAXK;AAYzBrD,EAAAA,KAAK,EAAE9C,SAAS,CAACqG,MAZQ;AAazB9D,EAAAA,KAAK,EAAEvC,SAAS,CAACuG,KAAV,CAAgB,MAAK1F,UAAL,CAAhB;AAbkB,CAA3B;AAgBA,eAAewB,cAAf","sourcesContent":["import React, {useState, useEffect, useRef, useCallback} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {map, pipe, join, filter, get, set, keys, isEmpty} from 'lodash/fp';\nimport {\n NovaCompositionNavigationArrowDown as ArrowDown,\n NovaSolidStatusClose as ErrorIcon,\n NovaCompositionCoorpacademyInformationIcon as InfoIcon\n} from '@coorpacademy/nova-icons';\nimport TitledCheckbox from '../titled-checkbox';\nimport Provider from '../../atom/provider';\nimport Checkbox from '../../atom/input-checkbox';\nimport getClassState from '../../util/get-class-state';\nimport style from './style.css';\n\nconst themeStyle = {\n setup: style.setup,\n cockpit: style.cockpit,\n sidebar: style.sidebar,\n coorpmanager: style.coorpmanager\n};\n\nexport const useChoices = options => {\n const choicesRef = useRef(options);\n\n const getChoices = () => {\n return choicesRef.current;\n };\n\n const setChoices = choice => {\n const choices = set(`[${choice.i}].selected`, !choice.selected, getChoices());\n\n choicesRef.current = choices.filter(c => c.selected);\n };\n\n return [getChoices, setChoices];\n};\n\nconst CMMultipleView = ({multiple, choice, onChange}) => {\n const handleChange = useCallback(\n checked => {\n if (!multiple) {\n return onChange(choice);\n }\n return onChange({...choice, selected: checked});\n },\n [onChange, choice, multiple]\n );\n\n return multiple ? (\n <div className={style.item}>\n <Checkbox\n titleStyle=\"inherit\"\n checked={choice.selected}\n onChange={handleChange}\n noLabelMargins\n title={choice.name}\n />\n </div>\n ) : (\n <span className={style.item} onClick={handleChange} title={choice.name}>\n {choice.name}\n </span>\n );\n};\n\nconst SelectMultiple = (\n {\n title,\n options,\n theme,\n placeholder,\n description,\n hint,\n multiple,\n onChange,\n onError,\n modified = false,\n required = false,\n error = '',\n disabled = false\n },\n {skin}\n) => {\n const [isOpened, updateIsOpened] = useState(false);\n const [getChoices, setChoices] = useChoices(options);\n const nodeRef = useRef(null);\n\n const defaultColor = get('common.primary', skin);\n const black = get('common.black', skin);\n\n const handleOnClick = useCallback(\n e => {\n if (disabled) return;\n\n e.preventDefault();\n e.stopPropagation();\n\n updateIsOpened(prev => !prev);\n },\n [disabled]\n );\n\n const closeHandle = useCallback(e => {\n if (nodeRef && nodeRef.current && !nodeRef.current.contains(e.target)) {\n updateIsOpened(false);\n }\n }, []);\n\n const handleChange = useCallback(\n choice => {\n // if multiple prop is turned on\n // we return all selected choices\n if (multiple) {\n setChoices(choice);\n\n return onChange(getChoices());\n }\n\n return onChange(choice);\n },\n [setChoices, multiple, onChange]\n );\n\n useEffect(() => {\n document.addEventListener('click', closeHandle);\n document.addEventListener('touchstart', closeHandle);\n\n return () => {\n document.removeEventListener('click', closeHandle);\n document.removeEventListener('touchstart', closeHandle);\n };\n }, [closeHandle]);\n\n const isCMTheme = theme === 'coorpmanager';\n\n const lines = map.convert({cap: false})((choice, i) => {\n return (\n <li key={i} className={style.choice}>\n {isCMTheme ? (\n <CMMultipleView multiple={multiple} choice={{...choice, i}} onChange={handleChange} />\n ) : (\n <TitledCheckbox\n onToggle={handleChange}\n choice={{...choice, i}}\n background={defaultColor}\n />\n )}\n </li>\n );\n }, options);\n\n const selection = pipe(filter({selected: true}), map('name'), join(', '))(options);\n\n const _title = title && `${title}${required ? ' *' : ''}`;\n\n const isActive = isOpened === true;\n\n const titleView = title ? (\n <span\n className={classnames(\n style.title,\n isCMTheme && selection && style.titleWithSelection,\n isCMTheme && isEmpty(selection) && style.noValue,\n isActive && style.active\n )}\n >\n {_title}\n {isCMTheme ? (\n <div className={style.infoIconWrapper}>\n <InfoIcon className={style.infoIcon} />\n <div className={style.descriptionLabel}>{description}</div>\n </div>\n ) : null}\n </span>\n ) : null;\n\n const hintView =\n isCMTheme && !isActive ? (\n <div\n className={style.hint}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: error || hint}}\n />\n ) : null;\n\n const mainClass = theme ? themeStyle[theme] : style.default;\n const showPlaceholder = isCMTheme && isActive;\n const behaviourClassName = getClassState(\n style.default,\n style.modified,\n style.error,\n modified,\n error\n );\n\n const errorIconView = error ? <ErrorIcon onClick={onError} className={style.errorIcon} /> : null;\n\n return (\n <div\n className={classnames(mainClass, behaviourClassName, disabled && style.disabled)}\n ref={nodeRef}\n >\n <label>\n {!isCMTheme && titleView}\n <div className={style.select} title={selection || placeholder} onClick={handleOnClick}>\n {isCMTheme && titleView}\n <span\n className={classnames(\n style.selection,\n isCMTheme && isEmpty(selection) && style.noselection\n )}\n >\n {selection || !isCMTheme || (showPlaceholder && placeholder) || null}\n </span>\n {isCMTheme ? (\n <div className={style.iconsWrapper}>\n <div className={style.flex}>{errorIconView}</div>\n <div className={classnames(style.flex, isActive && style.clicked)}>\n <ArrowDown\n color={black}\n className={classnames(style.arrow, {[style.down]: isActive})}\n />\n </div>\n </div>\n ) : (\n <ArrowDown\n color={black}\n className={classnames(style.arrow, {[style.down]: isActive})}\n />\n )}\n </div>\n <div className={classnames(style.choices, isActive && style.activeChoices)}>\n <ul className={style.list}>{lines}</ul>\n </div>\n </label>\n {!isCMTheme ? <div className={style.description}>{description}</div> : null}\n {hintView}\n </div>\n );\n};\n\nSelectMultiple.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nCMMultipleView.propTypes = {\n multiple: PropTypes.bool,\n choice: TitledCheckbox.propTypes.choice,\n onChange: PropTypes.func\n};\n\nSelectMultiple.propTypes = {\n title: PropTypes.string,\n placeholder: PropTypes.string,\n description: PropTypes.string,\n hint: PropTypes.string,\n options: PropTypes.arrayOf(TitledCheckbox.propTypes.choice),\n onChange: PropTypes.func,\n onError: PropTypes.func,\n multiple: PropTypes.bool,\n modified: PropTypes.bool,\n disabled: PropTypes.bool,\n required: PropTypes.bool,\n error: PropTypes.string,\n theme: PropTypes.oneOf(keys(themeStyle))\n};\n\nexport default SelectMultiple;\n"],"file":"index.js"}
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
border: 1px solid light;
|
|
77
77
|
user-select: none;
|
|
78
78
|
overflow: scroll;
|
|
79
|
-
max-height:
|
|
79
|
+
max-height: 0;
|
|
80
80
|
transition: all 0.25s linear;
|
|
81
81
|
opacity: 1;
|
|
82
82
|
}
|
|
@@ -104,7 +104,6 @@
|
|
|
104
104
|
display: block;
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
-
|
|
108
107
|
.arrow {
|
|
109
108
|
position: absolute;
|
|
110
109
|
right: 10px;
|
|
@@ -188,6 +187,7 @@
|
|
|
188
187
|
display: inline-flex;
|
|
189
188
|
align-items: center;
|
|
190
189
|
}
|
|
190
|
+
|
|
191
191
|
/*
|
|
192
192
|
cockpit theme
|
|
193
193
|
*/
|
|
@@ -232,6 +232,7 @@
|
|
|
232
232
|
color: black;
|
|
233
233
|
height: 44px;
|
|
234
234
|
padding: 11px 85px 11px 16px;
|
|
235
|
+
background-color: cm_grey_100;
|
|
235
236
|
}
|
|
236
237
|
|
|
237
238
|
.coorpmanager .select .title {
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
props: {
|
|
3
|
+
theme: 'coorpmanager',
|
|
4
|
+
placeholder: 'Select language(s)',
|
|
5
|
+
title: 'Input Name',
|
|
6
|
+
description: 'You should select a language',
|
|
7
|
+
multiple: false,
|
|
8
|
+
disabled: true,
|
|
9
|
+
error: '',
|
|
10
|
+
hint: 'Hint',
|
|
11
|
+
options: [{
|
|
12
|
+
name: '🇬🇧 English',
|
|
13
|
+
value: 'en',
|
|
14
|
+
selected: true
|
|
15
|
+
}, {
|
|
16
|
+
name: '🇩🇪 German',
|
|
17
|
+
value: 'de',
|
|
18
|
+
selected: false
|
|
19
|
+
}, {
|
|
20
|
+
name: '🇹🇭 Thai',
|
|
21
|
+
value: 'th',
|
|
22
|
+
selected: false
|
|
23
|
+
}, {
|
|
24
|
+
name: '🇪🇸 Spanish',
|
|
25
|
+
value: 'es',
|
|
26
|
+
selected: false
|
|
27
|
+
}],
|
|
28
|
+
onChange: value => console.log('onChange', value),
|
|
29
|
+
onError: () => true
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=checked-cm-theme-disabled.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/molecule/select-multiple/test/fixtures/checked-cm-theme-disabled.js"],"names":["props","theme","placeholder","title","description","multiple","disabled","error","hint","options","name","value","selected","onChange","console","log","onError"],"mappings":"AAAA,eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,KAAK,EAAE,cADF;AAELC,IAAAA,WAAW,EAAE,oBAFR;AAGLC,IAAAA,KAAK,EAAE,YAHF;AAILC,IAAAA,WAAW,EAAE,8BAJR;AAKLC,IAAAA,QAAQ,EAAE,KALL;AAMLC,IAAAA,QAAQ,EAAE,IANL;AAOLC,IAAAA,KAAK,EAAE,EAPF;AAQLC,IAAAA,IAAI,EAAE,MARD;AASLC,IAAAA,OAAO,EAAE,CACP;AACEC,MAAAA,IAAI,EAAE,cADR;AAEEC,MAAAA,KAAK,EAAE,IAFT;AAGEC,MAAAA,QAAQ,EAAE;AAHZ,KADO,EAMP;AACEF,MAAAA,IAAI,EAAE,aADR;AAEEC,MAAAA,KAAK,EAAE,IAFT;AAGEC,MAAAA,QAAQ,EAAE;AAHZ,KANO,EAWP;AACEF,MAAAA,IAAI,EAAE,WADR;AAEEC,MAAAA,KAAK,EAAE,IAFT;AAGEC,MAAAA,QAAQ,EAAE;AAHZ,KAXO,EAgBP;AACEF,MAAAA,IAAI,EAAE,cADR;AAEEC,MAAAA,KAAK,EAAE,IAFT;AAGEC,MAAAA,QAAQ,EAAE;AAHZ,KAhBO,CATJ;AA+BLC,IAAAA,QAAQ,EAAEF,KAAK,IAAIG,OAAO,CAACC,GAAR,CAAY,UAAZ,EAAwBJ,KAAxB,CA/Bd;AAgCLK,IAAAA,OAAO,EAAE,MAAM;AAhCV;AADM,CAAf","sourcesContent":["export default {\n props: {\n theme: 'coorpmanager',\n placeholder: 'Select language(s)',\n title: 'Input Name',\n description: 'You should select a language',\n multiple: false,\n disabled: true,\n error: '',\n hint: 'Hint',\n options: [\n {\n name: '🇬🇧 English',\n value: 'en',\n selected: true\n },\n {\n name: '🇩🇪 German',\n value: 'de',\n selected: false\n },\n {\n name: '🇹🇭 Thai',\n value: 'th',\n selected: false\n },\n {\n name: '🇪🇸 Spanish',\n value: 'es',\n selected: false\n }\n ],\n onChange: value => console.log('onChange', value),\n onError: () => true\n }\n};\n"],"file":"checked-cm-theme-disabled.js"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
props: {
|
|
3
|
+
theme: 'coorpmanager',
|
|
4
|
+
placeholder: 'Select language(s)',
|
|
5
|
+
title: 'Input Name',
|
|
6
|
+
description: 'You should select a language',
|
|
7
|
+
multiple: false,
|
|
8
|
+
disabled: true,
|
|
9
|
+
error: 'Select at least one',
|
|
10
|
+
hint: 'Hint',
|
|
11
|
+
options: [{
|
|
12
|
+
name: '🇬🇧 English',
|
|
13
|
+
value: 'en',
|
|
14
|
+
selected: true
|
|
15
|
+
}, {
|
|
16
|
+
name: '🇩🇪 German',
|
|
17
|
+
value: 'de',
|
|
18
|
+
selected: false
|
|
19
|
+
}, {
|
|
20
|
+
name: '🇹🇭 Thai',
|
|
21
|
+
value: 'th',
|
|
22
|
+
selected: false
|
|
23
|
+
}, {
|
|
24
|
+
name: '🇪🇸 Spanish',
|
|
25
|
+
value: 'es',
|
|
26
|
+
selected: false
|
|
27
|
+
}],
|
|
28
|
+
onChange: value => console.log('onChange', value),
|
|
29
|
+
onError: () => true
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=checked-cm-theme-error.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/molecule/select-multiple/test/fixtures/checked-cm-theme-error.js"],"names":["props","theme","placeholder","title","description","multiple","disabled","error","hint","options","name","value","selected","onChange","console","log","onError"],"mappings":"AAAA,eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,KAAK,EAAE,cADF;AAELC,IAAAA,WAAW,EAAE,oBAFR;AAGLC,IAAAA,KAAK,EAAE,YAHF;AAILC,IAAAA,WAAW,EAAE,8BAJR;AAKLC,IAAAA,QAAQ,EAAE,KALL;AAMLC,IAAAA,QAAQ,EAAE,IANL;AAOLC,IAAAA,KAAK,EAAE,qBAPF;AAQLC,IAAAA,IAAI,EAAE,MARD;AASLC,IAAAA,OAAO,EAAE,CACP;AACEC,MAAAA,IAAI,EAAE,cADR;AAEEC,MAAAA,KAAK,EAAE,IAFT;AAGEC,MAAAA,QAAQ,EAAE;AAHZ,KADO,EAMP;AACEF,MAAAA,IAAI,EAAE,aADR;AAEEC,MAAAA,KAAK,EAAE,IAFT;AAGEC,MAAAA,QAAQ,EAAE;AAHZ,KANO,EAWP;AACEF,MAAAA,IAAI,EAAE,WADR;AAEEC,MAAAA,KAAK,EAAE,IAFT;AAGEC,MAAAA,QAAQ,EAAE;AAHZ,KAXO,EAgBP;AACEF,MAAAA,IAAI,EAAE,cADR;AAEEC,MAAAA,KAAK,EAAE,IAFT;AAGEC,MAAAA,QAAQ,EAAE;AAHZ,KAhBO,CATJ;AA+BLC,IAAAA,QAAQ,EAAEF,KAAK,IAAIG,OAAO,CAACC,GAAR,CAAY,UAAZ,EAAwBJ,KAAxB,CA/Bd;AAgCLK,IAAAA,OAAO,EAAE,MAAM;AAhCV;AADM,CAAf","sourcesContent":["export default {\n props: {\n theme: 'coorpmanager',\n placeholder: 'Select language(s)',\n title: 'Input Name',\n description: 'You should select a language',\n multiple: false,\n disabled: true,\n error: 'Select at least one',\n hint: 'Hint',\n options: [\n {\n name: '🇬🇧 English',\n value: 'en',\n selected: true\n },\n {\n name: '🇩🇪 German',\n value: 'de',\n selected: false\n },\n {\n name: '🇹🇭 Thai',\n value: 'th',\n selected: false\n },\n {\n name: '🇪🇸 Spanish',\n value: 'es',\n selected: false\n }\n ],\n onChange: value => console.log('onChange', value),\n onError: () => true\n }\n};\n"],"file":"checked-cm-theme-error.js"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/molecule/select-multiple/test/fixtures/checked-cm-theme.js"],"names":["props","theme","placeholder","title","description","multiple","disabled","error","hint","options","name","value","selected","onChange","onError"],"mappings":"AAAA,eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,KAAK,EAAE,cADF;AAELC,IAAAA,WAAW,EAAE,oBAFR;AAGLC,IAAAA,KAAK,EAAE,YAHF;AAILC,IAAAA,WAAW,EAAE,8BAJR;AAKLC,IAAAA,QAAQ,EAAE,KALL;AAMLC,IAAAA,QAAQ,EAAE,
|
|
1
|
+
{"version":3,"sources":["../../../../../src/molecule/select-multiple/test/fixtures/checked-cm-theme.js"],"names":["props","theme","placeholder","title","description","multiple","disabled","error","hint","options","name","value","selected","onChange","onError"],"mappings":"AAAA,eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,KAAK,EAAE,cADF;AAELC,IAAAA,WAAW,EAAE,oBAFR;AAGLC,IAAAA,KAAK,EAAE,YAHF;AAILC,IAAAA,WAAW,EAAE,8BAJR;AAKLC,IAAAA,QAAQ,EAAE,KALL;AAMLC,IAAAA,QAAQ,EAAE,IANL;AAOLC,IAAAA,KAAK,EAAE,EAPF;AAQLC,IAAAA,IAAI,EAAE,MARD;AASLC,IAAAA,OAAO,EAAE,CACP;AACEC,MAAAA,IAAI,EAAE,cADR;AAEEC,MAAAA,KAAK,EAAE,IAFT;AAGEC,MAAAA,QAAQ,EAAE;AAHZ,KADO,EAMP;AACEF,MAAAA,IAAI,EAAE,aADR;AAEEC,MAAAA,KAAK,EAAE,IAFT;AAGEC,MAAAA,QAAQ,EAAE;AAHZ,KANO,EAWP;AACEF,MAAAA,IAAI,EAAE,WADR;AAEEC,MAAAA,KAAK,EAAE,IAFT;AAGEC,MAAAA,QAAQ,EAAE;AAHZ,KAXO,EAgBP;AACEF,MAAAA,IAAI,EAAE,cADR;AAEEC,MAAAA,KAAK,EAAE,IAFT;AAGEC,MAAAA,QAAQ,EAAE;AAHZ,KAhBO,CATJ;AA+BLC,IAAAA,QAAQ,EAAE,MAAM,IA/BX;AAgCLC,IAAAA,OAAO,EAAE,MAAM;AAhCV;AADM,CAAf","sourcesContent":["export default {\n props: {\n theme: 'coorpmanager',\n placeholder: 'Select language(s)',\n title: 'Input Name',\n description: 'You should select a language',\n multiple: false,\n disabled: true,\n error: '',\n hint: 'Hint',\n options: [\n {\n name: '🇬🇧 English',\n value: 'en',\n selected: true\n },\n {\n name: '🇩🇪 German',\n value: 'de',\n selected: false\n },\n {\n name: '🇹🇭 Thai',\n value: 'th',\n selected: false\n },\n {\n name: '🇪🇸 Spanish',\n value: 'es',\n selected: false\n }\n ],\n onChange: () => true,\n onError: () => true\n }\n};\n"],"file":"checked-cm-theme.js"}
|
|
@@ -2,8 +2,6 @@ import test from 'ava';
|
|
|
2
2
|
import forEach from 'lodash/forEach';
|
|
3
3
|
import renderComponentMacro from '../../../test/helpers/render-component';
|
|
4
4
|
import MoleculeSelectMultiple from '..';
|
|
5
|
-
import fixtureCheckedCmThemeMultiple from './fixtures/checked-cm-theme-multiple';
|
|
6
|
-
import fixtureCheckedCmTheme from './fixtures/checked-cm-theme';
|
|
7
5
|
import fixtureCheckedCockpitTheme from './fixtures/checked-cockpit-theme';
|
|
8
6
|
import fixtureCheckedSetupTheme from './fixtures/checked-setup-theme';
|
|
9
7
|
import fixtureChecked from './fixtures/checked';
|
|
@@ -16,8 +14,6 @@ test('Molecule › MoleculeSelectMultiple > should have valid propTypes', t => {
|
|
|
16
14
|
t.not(value, undefined, `PropType for "Molecule.MoleculeSelectMultiple.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
|
|
17
15
|
});
|
|
18
16
|
});
|
|
19
|
-
test('Molecule › MoleculeSelectMultiple › CheckedCmThemeMultiple › should be rendered', renderComponentMacro, MoleculeSelectMultiple, fixtureCheckedCmThemeMultiple);
|
|
20
|
-
test('Molecule › MoleculeSelectMultiple › CheckedCmTheme › should be rendered', renderComponentMacro, MoleculeSelectMultiple, fixtureCheckedCmTheme);
|
|
21
17
|
test('Molecule › MoleculeSelectMultiple › CheckedCockpitTheme › should be rendered', renderComponentMacro, MoleculeSelectMultiple, fixtureCheckedCockpitTheme);
|
|
22
18
|
test('Molecule › MoleculeSelectMultiple › CheckedSetupTheme › should be rendered', renderComponentMacro, MoleculeSelectMultiple, fixtureCheckedSetupTheme);
|
|
23
19
|
test('Molecule › MoleculeSelectMultiple › Checked › should be rendered', renderComponentMacro, MoleculeSelectMultiple, fixtureChecked);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/molecule/select-multiple/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","MoleculeSelectMultiple","
|
|
1
|
+
{"version":3,"sources":["../../../../src/molecule/select-multiple/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","MoleculeSelectMultiple","fixtureCheckedCockpitTheme","fixtureCheckedSetupTheme","fixtureChecked","fixtureDefault","fixtureSetupThemeError","fixtureSetupTheme","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,0BAAP,MAAuC,kCAAvC;AACA,OAAOC,wBAAP,MAAqC,gCAArC;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,sBAAP,MAAmC,8BAAnC;AACA,OAAOC,iBAAP,MAA8B,wBAA9B;AAEAT,IAAI,CAAC,iEAAD,EAAoEU,CAAC,IAAI;AAC3EA,EAAAA,CAAC,CAACC,IAAF;AACAV,EAAAA,OAAO,CAACE,sBAAsB,CAACS,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;AAOAd,IAAI,CAAC,8EAAD,EAAiFE,oBAAjF,EAAuGC,sBAAvG,EAA+HC,0BAA/H,CAAJ;AACAJ,IAAI,CAAC,4EAAD,EAA+EE,oBAA/E,EAAqGC,sBAArG,EAA6HE,wBAA7H,CAAJ;AACAL,IAAI,CAAC,kEAAD,EAAqEE,oBAArE,EAA2FC,sBAA3F,EAAmHG,cAAnH,CAAJ;AACAN,IAAI,CAAC,kEAAD,EAAqEE,oBAArE,EAA2FC,sBAA3F,EAAmHI,cAAnH,CAAJ;AACAP,IAAI,CAAC,0EAAD,EAA6EE,oBAA7E,EAAmGC,sBAAnG,EAA2HK,sBAA3H,CAAJ;AACAR,IAAI,CAAC,qEAAD,EAAwEE,oBAAxE,EAA8FC,sBAA9F,EAAsHM,iBAAtH,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport MoleculeSelectMultiple from '..';\nimport fixtureCheckedCockpitTheme from './fixtures/checked-cockpit-theme';\nimport fixtureCheckedSetupTheme from './fixtures/checked-setup-theme';\nimport fixtureChecked from './fixtures/checked';\nimport fixtureDefault from './fixtures/default';\nimport fixtureSetupThemeError from './fixtures/setup-theme-error';\nimport fixtureSetupTheme from './fixtures/setup-theme';\n\ntest('Molecule › MoleculeSelectMultiple > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeSelectMultiple.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Molecule.MoleculeSelectMultiple.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Molecule › MoleculeSelectMultiple › CheckedCockpitTheme › should be rendered', renderComponentMacro, MoleculeSelectMultiple, fixtureCheckedCockpitTheme);\ntest('Molecule › MoleculeSelectMultiple › CheckedSetupTheme › should be rendered', renderComponentMacro, MoleculeSelectMultiple, fixtureCheckedSetupTheme);\ntest('Molecule › MoleculeSelectMultiple › Checked › should be rendered', renderComponentMacro, MoleculeSelectMultiple, fixtureChecked);\ntest('Molecule › MoleculeSelectMultiple › Default › should be rendered', renderComponentMacro, MoleculeSelectMultiple, fixtureDefault);\ntest('Molecule › MoleculeSelectMultiple › SetupThemeError › should be rendered', renderComponentMacro, MoleculeSelectMultiple, fixtureSetupThemeError);\ntest('Molecule › MoleculeSelectMultiple › SetupTheme › should be rendered', renderComponentMacro, MoleculeSelectMultiple, fixtureSetupTheme);\n"],"file":"fixtures.js"}
|
|
@@ -2,6 +2,32 @@ export default {
|
|
|
2
2
|
props: {
|
|
3
3
|
groups: [{
|
|
4
4
|
fields: [{
|
|
5
|
+
type: 'selectMultiple',
|
|
6
|
+
title: 'Languages',
|
|
7
|
+
placeholder: 'Language selection',
|
|
8
|
+
description: 'This is the tooltip text',
|
|
9
|
+
theme: 'coorpmanager',
|
|
10
|
+
hint: '15 / 30 characters',
|
|
11
|
+
size: 'default',
|
|
12
|
+
options: [{
|
|
13
|
+
name: '🇬🇧 English',
|
|
14
|
+
value: 'en',
|
|
15
|
+
selected: true
|
|
16
|
+
}, {
|
|
17
|
+
name: '🇩🇪 German',
|
|
18
|
+
value: 'de',
|
|
19
|
+
selected: false
|
|
20
|
+
}, {
|
|
21
|
+
name: '🇹🇭 Thai',
|
|
22
|
+
value: 'th',
|
|
23
|
+
selected: false
|
|
24
|
+
}, {
|
|
25
|
+
name: '🇪🇸 Spanish',
|
|
26
|
+
value: 'es',
|
|
27
|
+
selected: false
|
|
28
|
+
}],
|
|
29
|
+
multiple: false
|
|
30
|
+
}, {
|
|
5
31
|
type: 'text',
|
|
6
32
|
title: 'Playlist name',
|
|
7
33
|
placeholder: 'Playlist name',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/organism/brand-form/test/fixtures/wizard-playlists.js"],"names":["props","groups","fields","type","title","placeholder","description","theme","hint","value","
|
|
1
|
+
{"version":3,"sources":["../../../../../src/organism/brand-form/test/fixtures/wizard-playlists.js"],"names":["props","groups","fields","type","title","placeholder","description","theme","hint","size","options","name","value","selected","multiple"],"mappings":"AAAA,eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,MAAM,EAAE,CACN;AACEC,MAAAA,MAAM,EAAE,CACN;AACEC,QAAAA,IAAI,EAAE,gBADR;AAEEC,QAAAA,KAAK,EAAE,WAFT;AAGEC,QAA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ourcesContent":["export default {\n props: {\n groups: [\n {\n fields: [\n {\n type: 'selectMultiple',\n title: 'Languages',\n placeholder: 'Language selection',\n description: 'This is the tooltip text',\n theme: 'coorpmanager',\n hint: '15 / 30 characters',\n size: 'default',\n options: [\n {\n name: '🇬🇧 English',\n value: 'en',\n selected: true\n },\n {\n name: '🇩🇪 German',\n value: 'de',\n selected: false\n },\n {\n name: '🇹🇭 Thai',\n value: 'th',\n selected: false\n },\n {\n name: '🇪🇸 Spanish',\n value: 'es',\n selected: false\n }\n ],\n multiple: false\n },\n {\n type: 'text',\n title: 'Playlist name',\n placeholder: 'Playlist name',\n description: 'This is the tooltip text',\n theme: 'coorpmanager',\n hint: '15 / 30 characters',\n value: 'Marketing expert',\n size: 'default'\n },\n {\n type: 'textarea',\n title: 'Description',\n placeholder: 'Description',\n description: 'This is the tooltip text',\n theme: 'coorpmanager',\n hint: '80 / 200 characters',\n size: 'medium',\n value:\n 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis fermentum sem ac fermentum luctus. Integer eu dui magna. Donec ut tristique dui. Vestibulum non accumsan tellus. Donec luctus erat vitae aliquet viverra. Mauris malesuada tortor quis viverra vestibulum. Nullam laoreet porta massa vitae porta.'\n }\n ]\n }\n ]\n }\n};\n"],"file":"wizard-playlists.js"}
|
|
@@ -23,6 +23,7 @@ import fixtureLookandfeelSuccess from './fixtures/lookandfeel-success';
|
|
|
23
23
|
import fixtureLookandfeel from './fixtures/lookandfeel';
|
|
24
24
|
import fixtureManageusersEdit from './fixtures/manageusers-edit';
|
|
25
25
|
import fixtureManageusersList from './fixtures/manageusers-list';
|
|
26
|
+
import fixtureManageusers from './fixtures/manageusers';
|
|
26
27
|
import fixtureQuickAccess from './fixtures/quick-access';
|
|
27
28
|
import fixtureSsoActivate from './fixtures/sso-activate';
|
|
28
29
|
import fixtureSso from './fixtures/sso';
|
|
@@ -56,6 +57,7 @@ test('TemplateBackOffice › TemplateBackOfficeBrandUpdate › LookandfeelSucces
|
|
|
56
57
|
test('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Lookandfeel › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureLookandfeel);
|
|
57
58
|
test('TemplateBackOffice › TemplateBackOfficeBrandUpdate › ManageusersEdit › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureManageusersEdit);
|
|
58
59
|
test('TemplateBackOffice › TemplateBackOfficeBrandUpdate › ManageusersList › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureManageusersList);
|
|
60
|
+
test('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Manageusers › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureManageusers);
|
|
59
61
|
test('TemplateBackOffice › TemplateBackOfficeBrandUpdate › QuickAccess › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureQuickAccess);
|
|
60
62
|
test('TemplateBackOffice › TemplateBackOfficeBrandUpdate › SsoActivate › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureSsoActivate);
|
|
61
63
|
test('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Sso › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureSso);
|
|
@@ -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","fixtureQuickAccess","fixtureSsoActivate","fixtureSso","fixtureUploadusersLoading","fixtureUploadusersSuccessful","f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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 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 › 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","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,O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AgHC,6BAAhH,EAA+ImB,kBAA/I,CAAJ;AACAtB,IAAI,CAAC,2FAAD,EAA8FE,oBAA9F,EAAoHC,6BAApH,EAAmJoB,sBAAnJ,CAAJ;AACAvB,IAAI,CAAC,2FAAD,EAA8FE,oBAA9F,EAAoHC,6BAApH,EAAmJqB,sBAAnJ,CAAJ;AACAxB,IAAI,CAAC,uFAAD,EAA0FE,oBAA1F,EAAgHC,6BAAhH,EAA+IsB,kBAA/I,CAAJ;AACAzB,IAAI,CAAC,uFAAD,EAA0FE,oBAA1F,EAAgHC,6BAAhH,EAA+IuB,kBAA/I,CAAJ;AACA1B,IAAI,CAAC,uFAAD,EAA0FE,oBAA1F,EAAgHC,6BAAhH,EAA+IwB,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"}
|
|
@@ -12,14 +12,6 @@ var _default = _interopRequireDefault(require("./fixtures/default"));
|
|
|
12
12
|
|
|
13
13
|
var _errorBanner = _interopRequireDefault(require("./fixtures/error-banner"));
|
|
14
14
|
|
|
15
|
-
var _errorTemporaryBanner = _interopRequireDefault(require("./fixtures/error-temporary-banner"));
|
|
16
|
-
|
|
17
|
-
var _successBanner = _interopRequireDefault(require("./fixtures/success-banner"));
|
|
18
|
-
|
|
19
|
-
var _successTemporaryBanner = _interopRequireDefault(require("./fixtures/success-temporary-banner"));
|
|
20
|
-
|
|
21
|
-
var _warningTemporaryBanner = _interopRequireDefault(require("./fixtures/warning-temporary-banner"));
|
|
22
|
-
|
|
23
15
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
24
16
|
|
|
25
17
|
(0, _ava.default)('Molecule › MoleculeBanner > should have valid propTypes', t => {
|
|
@@ -30,8 +22,4 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
30
22
|
});
|
|
31
23
|
(0, _ava.default)('Molecule › MoleculeBanner › Default › should be rendered', _renderComponent.default, _.default, _default.default);
|
|
32
24
|
(0, _ava.default)('Molecule › MoleculeBanner › ErrorBanner › should be rendered', _renderComponent.default, _.default, _errorBanner.default);
|
|
33
|
-
(0, _ava.default)('Molecule › MoleculeBanner › ErrorTemporaryBanner › should be rendered', _renderComponent.default, _.default, _errorTemporaryBanner.default);
|
|
34
|
-
(0, _ava.default)('Molecule › MoleculeBanner › SuccessBanner › should be rendered', _renderComponent.default, _.default, _successBanner.default);
|
|
35
|
-
(0, _ava.default)('Molecule › MoleculeBanner › SuccessTemporaryBanner › should be rendered', _renderComponent.default, _.default, _successTemporaryBanner.default);
|
|
36
|
-
(0, _ava.default)('Molecule › MoleculeBanner › WarningTemporaryBanner › should be rendered', _renderComponent.default, _.default, _warningTemporaryBanner.default);
|
|
37
25
|
//# sourceMappingURL=fixtures.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/molecule/banner/test/fixtures.js"],"names":["t","pass","MoleculeBanner","propTypes","value","key","not","undefined","renderComponentMacro","fixtureDefault","fixtureErrorBanner"
|
|
1
|
+
{"version":3,"sources":["../../../../src/molecule/banner/test/fixtures.js"],"names":["t","pass","MoleculeBanner","propTypes","value","key","not","undefined","renderComponentMacro","fixtureDefault","fixtureErrorBanner"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,yDAAL,EAAgEA,CAAC,IAAI;AACnEA,EAAAA,CAAC,CAACC,IAAF;AACA,wBAAQC,UAAeC,SAAvB,EAAkC,CAACC,KAAD,EAAQC,GAAR,KAAgB;AAChDL,IAAAA,CAAC,CAACM,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,mDAAkDF,GAAI,mEAA/E;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,0DAAL,EAAiEG,wBAAjE,EAAuFN,SAAvF,EAAuGO,gBAAvG;AACA,kBAAK,8DAAL,EAAqED,wBAArE,EAA2FN,SAA3F,EAA2GQ,oBAA3G","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport MoleculeBanner from '..';\nimport fixtureDefault from './fixtures/default';\nimport fixtureErrorBanner from './fixtures/error-banner';\n\ntest('Molecule › MoleculeBanner > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeBanner.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Molecule.MoleculeBanner.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Molecule › MoleculeBanner › Default › should be rendered', renderComponentMacro, MoleculeBanner, fixtureDefault);\ntest('Molecule › MoleculeBanner › ErrorBanner › should be rendered', renderComponentMacro, MoleculeBanner, fixtureErrorBanner);\n"],"file":"fixtures.js"}
|
|
@@ -0,0 +1,25 @@
|
|
|
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 _withValue = _interopRequireDefault(require("./fixtures/with-value"));
|
|
14
|
+
|
|
15
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
|
+
|
|
17
|
+
(0, _ava.default)('Molecule › MoleculeSearch > should have valid propTypes', t => {
|
|
18
|
+
t.pass();
|
|
19
|
+
(0, _forEach.default)(_.default.propTypes, (value, key) => {
|
|
20
|
+
t.not(value, undefined, `PropType for "Molecule.MoleculeSearch.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
(0, _ava.default)('Molecule › MoleculeSearch › Default › should be rendered', _renderComponent.default, _.default, _default.default);
|
|
24
|
+
(0, _ava.default)('Molecule › MoleculeSearch › WithValue › should be rendered', _renderComponent.default, _.default, _withValue.default);
|
|
25
|
+
//# sourceMappingURL=fixtures.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/molecule/search/test/fixtures.js"],"names":["t","pass","MoleculeSearch","propTypes","value","key","not","undefined","renderComponentMacro","fixtureDefault","fixtureWithValue"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,yDAAL,EAAgEA,CAAC,IAAI;AACnEA,EAAAA,CAAC,CAACC,IAAF;AACA,wBAAQC,UAAeC,SAAvB,EAAkC,CAACC,KAAD,EAAQC,GAAR,KAAgB;AAChDL,IAAAA,CAAC,CAACM,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,mDAAkDF,GAAI,mEAA/E;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,0DAAL,EAAiEG,wBAAjE,EAAuFN,SAAvF,EAAuGO,gBAAvG;AACA,kBAAK,4DAAL,EAAmED,wBAAnE,EAAyFN,SAAzF,EAAyGQ,kBAAzG","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"}
|
|
@@ -82,7 +82,7 @@ const CMMultipleView = ({
|
|
|
82
82
|
return onChange(_extends(_extends({}, choice), {}, {
|
|
83
83
|
selected: checked
|
|
84
84
|
}));
|
|
85
|
-
}, [onChange, choice]);
|
|
85
|
+
}, [onChange, choice, multiple]);
|
|
86
86
|
return multiple ? /*#__PURE__*/_react.default.createElement("div", {
|
|
87
87
|
className: _style.default.item
|
|
88
88
|
}, /*#__PURE__*/_react.default.createElement(_inputCheckbox.default, {
|
|
@@ -121,13 +121,11 @@ const SelectMultiple = ({
|
|
|
121
121
|
const defaultColor = (0, _get2.default)('common.primary', skin);
|
|
122
122
|
const black = (0, _get2.default)('common.black', skin);
|
|
123
123
|
const handleOnClick = (0, _react.useCallback)(e => {
|
|
124
|
+
if (disabled) return;
|
|
124
125
|
e.preventDefault();
|
|
125
126
|
e.stopPropagation();
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
updateIsOpened(prev => !prev);
|
|
129
|
-
}
|
|
130
|
-
}, []);
|
|
127
|
+
updateIsOpened(prev => !prev);
|
|
128
|
+
}, [disabled]);
|
|
131
129
|
const closeHandle = (0, _react.useCallback)(e => {
|
|
132
130
|
if (nodeRef && nodeRef.current && !nodeRef.current.contains(e.target)) {
|
|
133
131
|
updateIsOpened(false);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/molecule/select-multiple/index.js"],"names":["themeStyle","setup","style","cockpit","sidebar","coorpmanager","useChoices","options","choicesRef","getChoices","current","setChoices","choice","choices","i","selected","filter","c","CMMultipleView","multiple","onChange","handleChange","checked","item","name","SelectMultiple","title","theme","placeholder","description","hint","onError","modified","required","error","disabled","skin","isOpened","updateIsOpened","nodeRef","defaultColor","black","handleOnClick","e","preventDefault","stopPropagation","prev","closeHandle","contains","target","document","addEventListener","removeEventListener","isCMTheme","lines","convert","cap","selection","_title","isActive","titleView","titleWithSelection","noValue","active","infoIconWrapper","infoIcon","descriptionLabel","hintView","__html","mainClass","default","showPlaceholder","behaviourClassName","errorIconView","errorIcon","select","noselection","iconsWrapper","flex","clicked","arrow","down","activeChoices","list","contextTypes","Provider","childContextTypes","propTypes","PropTypes","bool","TitledCheckbox","func","string","arrayOf","oneOf"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AAEA;;AAKA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,UAAU,GAAG;AACjBC,EAAAA,KAAK,EAAEC,eAAMD,KADI;AAEjBE,EAAAA,OAAO,EAAED,eAAMC,OAFE;AAGjBC,EAAAA,OAAO,EAAEF,eAAME,OAHE;AAIjBC,EAAAA,YAAY,EAAEH,eAAMG;AAJH,CAAnB;;AAOO,MAAMC,UAAU,GAAGC,OAAO,IAAI;AACnC,QAAMC,UAAU,GAAG,mBAAOD,OAAP,CAAnB;;AAEA,QAAME,UAAU,GAAG,MAAM;AACvB,WAAOD,UAAU,CAACE,OAAlB;AACD,GAFD;;AAIA,QAAMC,UAAU,GAAGC,MAAM,I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;AAazBjE,EAAAA,KAAK,EAAE6D,mBAAUM,KAAV,CAAgB,oBAAK9F,UAAL,CAAhB;AAbkB,CAA3B;eAgBeyB,c","sourcesContent":["import React, {useState, useEffect, useRef, useCallback} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {map, pipe, join, filter, get, set, keys, isEmpty} from 'lodash/fp';\nimport {\n NovaCompositionNavigationArrowDown as ArrowDown,\n NovaSolidStatusClose as ErrorIcon,\n NovaCompositionCoorpacademyInformationIcon as InfoIcon\n} from '@coorpacademy/nova-icons';\nimport TitledCheckbox from '../titled-checkbox';\nimport Provider from '../../atom/provider';\nimport Checkbox from '../../atom/input-checkbox';\nimport getClassState from '../../util/get-class-state';\nimport style from './style.css';\n\nconst themeStyle = {\n setup: style.setup,\n cockpit: style.cockpit,\n sidebar: style.sidebar,\n coorpmanager: style.coorpmanager\n};\n\nexport const useChoices = options => {\n const choicesRef = useRef(options);\n\n const getChoices = () => {\n return choicesRef.current;\n };\n\n const setChoices = choice => {\n const choices = set(`[${choice.i}].selected`, !choice.selected, getChoices());\n\n choicesRef.current = choices.filter(c => c.selected);\n };\n\n return [getChoices, setChoices];\n};\n\nconst CMMultipleView = ({multiple, choice, onChange}) => {\n const handleChange = useCallback(\n checked => {\n if (!multiple) {\n return onChange(choice);\n }\n return onChange({...choice, selected: checked});\n },\n [onChange, choice]\n );\n\n return multiple ? (\n <div className={style.item}>\n <Checkbox\n titleStyle=\"inherit\"\n checked={choice.selected}\n onChange={handleChange}\n noLabelMargins\n title={choice.name}\n />\n </div>\n ) : (\n <span className={style.item} onClick={handleChange} title={choice.name}>\n {choice.name}\n </span>\n );\n};\n\nconst SelectMultiple = (\n {\n title,\n options,\n theme,\n placeholder,\n description,\n hint,\n multiple,\n onChange,\n onError,\n modified = false,\n required = false,\n error = '',\n disabled = false\n },\n {skin}\n) => {\n const [isOpened, updateIsOpened] = useState(false);\n const [getChoices, setChoices] = useChoices(options);\n const nodeRef = useRef(null);\n\n const defaultColor = get('common.primary', skin);\n const black = get('common.black', skin);\n\n const handleOnClick = useCallback(e => {\n e.preventDefault();\n e.stopPropagation();\n\n if (!disabled) {\n updateIsOpened(prev => !prev);\n }\n }, []);\n\n const closeHandle = useCallback(e => {\n if (nodeRef && nodeRef.current && !nodeRef.current.contains(e.target)) {\n updateIsOpened(false);\n }\n }, []);\n\n const handleChange = useCallback(\n choice => {\n // if multiple prop is turned on\n // we return all selected choices\n if (multiple) {\n setChoices(choice);\n\n return onChange(getChoices());\n }\n\n return onChange(choice);\n },\n [setChoices, multiple, onChange]\n );\n\n useEffect(() => {\n document.addEventListener('click', closeHandle);\n document.addEventListener('touchstart', closeHandle);\n\n return () => {\n document.removeEventListener('click', closeHandle);\n document.removeEventListener('touchstart', closeHandle);\n };\n }, [closeHandle]);\n\n const isCMTheme = theme === 'coorpmanager';\n\n const lines = map.convert({cap: false})((choice, i) => {\n return (\n <li key={i} className={style.choice}>\n {isCMTheme ? (\n <CMMultipleView multiple={multiple} choice={{...choice, i}} onChange={handleChange} />\n ) : (\n <TitledCheckbox\n onToggle={handleChange}\n choice={{...choice, i}}\n background={defaultColor}\n />\n )}\n </li>\n );\n }, options);\n\n const selection = pipe(filter({selected: true}), map('name'), join(', '))(options);\n\n const _title = title && `${title}${required ? ' *' : ''}`;\n\n const isActive = isOpened === true;\n\n const titleView = title ? (\n <span\n className={classnames(\n style.title,\n isCMTheme && selection && style.titleWithSelection,\n isCMTheme && isEmpty(selection) && style.noValue,\n isActive && style.active\n )}\n >\n {_title}\n {isCMTheme ? (\n <div className={style.infoIconWrapper}>\n <InfoIcon className={style.infoIcon} />\n <div className={style.descriptionLabel}>{description}</div>\n </div>\n ) : null}\n </span>\n ) : null;\n\n const hintView =\n isCMTheme && !isActive ? (\n <div\n className={style.hint}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: error || hint}}\n />\n ) : null;\n\n const mainClass = theme ? themeStyle[theme] : style.default;\n const showPlaceholder = isCMTheme && isActive;\n const behaviourClassName = getClassState(\n style.default,\n style.modified,\n style.error,\n modified,\n error\n );\n\n const errorIconView = error ? <ErrorIcon onClick={onError} className={style.errorIcon} /> : null;\n\n return (\n <div\n className={classnames(mainClass, behaviourClassName, disabled && style.disabled)}\n ref={nodeRef}\n >\n <label>\n {!isCMTheme && titleView}\n <div className={style.select} title={selection || placeholder} onClick={handleOnClick}>\n {isCMTheme && titleView}\n <span\n className={classnames(\n style.selection,\n isCMTheme && isEmpty(selection) && style.noselection\n )}\n >\n {selection || !isCMTheme || (showPlaceholder && placeholder) || null}\n </span>\n {isCMTheme ? (\n <div className={style.iconsWrapper}>\n <div className={style.flex}>{errorIconView}</div>\n <div className={classnames(style.flex, isActive && style.clicked)}>\n <ArrowDown\n color={black}\n className={classnames(style.arrow, {[style.down]: isActive})}\n />\n </div>\n </div>\n ) : (\n <ArrowDown\n color={black}\n className={classnames(style.arrow, {[style.down]: isActive})}\n />\n )}\n </div>\n <div className={classnames(style.choices, isActive && style.activeChoices)}>\n <ul className={style.list}>{lines}</ul>\n </div>\n </label>\n {!isCMTheme ? <div className={style.description}>{description}</div> : null}\n {hintView}\n </div>\n );\n};\n\nSelectMultiple.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nCMMultipleView.propTypes = {\n multiple: PropTypes.bool,\n choice: TitledCheckbox.propTypes.choice,\n onChange: PropTypes.func\n};\n\nSelectMultiple.propTypes = {\n title: PropTypes.string,\n placeholder: PropTypes.string,\n description: PropTypes.string,\n hint: PropTypes.string,\n options: PropTypes.arrayOf(TitledCheckbox.propTypes.choice),\n onChange: PropTypes.func,\n onError: PropTypes.func,\n multiple: PropTypes.bool,\n modified: PropTypes.bool,\n disabled: PropTypes.bool,\n required: PropTypes.bool,\n error: PropTypes.string,\n theme: PropTypes.oneOf(keys(themeStyle))\n};\n\nexport default SelectMultiple;\n"],"file":"index.js"}
|
|
1
|
+
{"version":3,"sources":["../../../src/molecule/select-multiple/index.js"],"names":["themeStyle","setup","style","cockpit","sidebar","coorpmanager","useChoices","options","choicesRef","getChoices","current","setChoices","choice","choices","i","selected","filter","c","CMMultipleView","multiple","onChange","handleChange","checked","item","name","SelectMultiple","title","theme","placeholder","description","hint","onError","modified","required","error","disabled","skin","isOpened","updateIsOpened","nodeRef","defaultColor","black","handleOnClick","e","preventDefault","stopPropagation","prev","closeHandle","contains","target","document","addEventListener","removeEventListener","isCMTheme","lines","convert","cap","selection","_title","isActive","titleView","titleWithSelection","noValue","active","infoIconWrapper","infoIcon","descriptionLabel","hintView","__html","mainClass","default","showPlaceholder","behaviourClassName","errorIconView","errorIcon","select","noselection","iconsWrapper","flex","clicked","arrow","down","activeChoices","list","contextTypes","Provider","childContextTypes","propTypes","PropTypes","bool","TitledCheckbox","func","string","arrayOf","oneOf"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AAEA;;AAKA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,UAAU,GAAG;AACjBC,EAAAA,KAAK,EAAEC,eAAMD,KADI;AAEjBE,EAAAA,OAAO,EAAED,eAAMC,OAFE;AAGjBC,EAAAA,OAAO,EAAEF,eAAME,OAHE;AAIjBC,EAAAA,YAAY,EAAEH,eAAMG;AAJH,CAAnB;;AAOO,MAAMC,UAAU,GAAGC,OAAO,IAAI;AACnC,QAAMC,UAAU,GAAG,mBAAOD,OAAP,CAAnB;;AAEA,QAAME,UAAU,GAAG,MAAM;AACvB,WAAOD,UAAU,CAACE,OAAlB;AACD,GAFD;;AAIA,QAAMC,UAAU,GAAGC,MAAM,IAAI;AAC3B,UAAMC,OAAO,GAAG,mBAAK,IAAGD,MAAM,CAACE,CAAE,YAAjB,EAA8B,CAACF,MAAM,CAACG,QAAtC,EAAgDN,UAAU,EAA1D,CAAhB;AAEAD,IAAAA,UAAU,CAACE,OAAX,GAAqBG,OAAO,CAACG,MAAR,CAAeC,CAAC,IAAIA,CAAC,CAACF,QAAtB,CAArB;AACD,GAJD;;AAMA,S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ApC,CAAb,GAAsE,IArCzE,EAsCGsC,QAtCH,CADF;AA0CD,CA9KD;;AAgLA1C,cAAc,CAAC2D,YAAf,GAA8B;AAC5BhD,EAAAA,IAAI,EAAEiD,kBAASC,iBAAT,CAA2BlD;AADL,CAA9B;AAIAlB,cAAc,CAACqE,SAAf,2CAA2B;AACzBpE,EAAAA,QAAQ,EAAEqE,mBAAUC,IADK;AAEzB7E,EAAAA,MAAM,EAAE8E,wBAAeH,SAAf,CAAyB3E,MAFR;AAGzBQ,EAAAA,QAAQ,EAAEoE,mBAAUG;AAHK,CAA3B;AAMAlE,cAAc,CAAC8D,SAAf,2CAA2B;AACzB7D,EAAAA,KAAK,EAAE8D,mBAAUI,MADQ;AAEzBhE,EAAAA,WAAW,EAAE4D,mBAAUI,MAFE;AAGzB/D,EAAAA,WAAW,EAAE2D,mBAAUI,MAHE;AAIzB9D,EAAAA,IAAI,EAAE0D,mBAAUI,MAJS;AAKzBrF,EAAAA,OAAO,EAAEiF,mBAAUK,OAAV,CAAkBH,wBAAeH,SAAf,CAAyB3E,MAA3C,CALgB;AAMzBQ,EAAAA,QAAQ,EAAEoE,mBAAUG,IANK;AAOzB5D,EAAAA,OAAO,EAAEyD,mBAAUG,IAPM;AAQzBxE,EAAAA,QAAQ,EAAEqE,mBAAUC,IARK;AASzBzD,EAAAA,QAAQ,EAAEwD,mBAAUC,IATK;AAUzBtD,EAAAA,QAAQ,EAAEqD,mBAAUC,IAVK;AAWzBxD,EAAAA,QAAQ,EAAEuD,mBAAUC,IAXK;AAYzBvD,EAAAA,KAAK,EAAEsD,mBAAUI,MAZQ;AAazBjE,EAAAA,KAAK,EAAE6D,mBAAUM,KAAV,CAAgB,oBAAK9F,UAAL,CAAhB;AAbkB,CAA3B;eAgBeyB,c","sourcesContent":["import React, {useState, useEffect, useRef, useCallback} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {map, pipe, join, filter, get, set, keys, isEmpty} from 'lodash/fp';\nimport {\n NovaCompositionNavigationArrowDown as ArrowDown,\n NovaSolidStatusClose as ErrorIcon,\n NovaCompositionCoorpacademyInformationIcon as InfoIcon\n} from '@coorpacademy/nova-icons';\nimport TitledCheckbox from '../titled-checkbox';\nimport Provider from '../../atom/provider';\nimport Checkbox from '../../atom/input-checkbox';\nimport getClassState from '../../util/get-class-state';\nimport style from './style.css';\n\nconst themeStyle = {\n setup: style.setup,\n cockpit: style.cockpit,\n sidebar: style.sidebar,\n coorpmanager: style.coorpmanager\n};\n\nexport const useChoices = options => {\n const choicesRef = useRef(options);\n\n const getChoices = () => {\n return choicesRef.current;\n };\n\n const setChoices = choice => {\n const choices = set(`[${choice.i}].selected`, !choice.selected, getChoices());\n\n choicesRef.current = choices.filter(c => c.selected);\n };\n\n return [getChoices, setChoices];\n};\n\nconst CMMultipleView = ({multiple, choice, onChange}) => {\n const handleChange = useCallback(\n checked => {\n if (!multiple) {\n return onChange(choice);\n }\n return onChange({...choice, selected: checked});\n },\n [onChange, choice, multiple]\n );\n\n return multiple ? (\n <div className={style.item}>\n <Checkbox\n titleStyle=\"inherit\"\n checked={choice.selected}\n onChange={handleChange}\n noLabelMargins\n title={choice.name}\n />\n </div>\n ) : (\n <span className={style.item} onClick={handleChange} title={choice.name}>\n {choice.name}\n </span>\n );\n};\n\nconst SelectMultiple = (\n {\n title,\n options,\n theme,\n placeholder,\n description,\n hint,\n multiple,\n onChange,\n onError,\n modified = false,\n required = false,\n error = '',\n disabled = false\n },\n {skin}\n) => {\n const [isOpened, updateIsOpened] = useState(false);\n const [getChoices, setChoices] = useChoices(options);\n const nodeRef = useRef(null);\n\n const defaultColor = get('common.primary', skin);\n const black = get('common.black', skin);\n\n const handleOnClick = useCallback(\n e => {\n if (disabled) return;\n\n e.preventDefault();\n e.stopPropagation();\n\n updateIsOpened(prev => !prev);\n },\n [disabled]\n );\n\n const closeHandle = useCallback(e => {\n if (nodeRef && nodeRef.current && !nodeRef.current.contains(e.target)) {\n updateIsOpened(false);\n }\n }, []);\n\n const handleChange = useCallback(\n choice => {\n // if multiple prop is turned on\n // we return all selected choices\n if (multiple) {\n setChoices(choice);\n\n return onChange(getChoices());\n }\n\n return onChange(choice);\n },\n [setChoices, multiple, onChange]\n );\n\n useEffect(() => {\n document.addEventListener('click', closeHandle);\n document.addEventListener('touchstart', closeHandle);\n\n return () => {\n document.removeEventListener('click', closeHandle);\n document.removeEventListener('touchstart', closeHandle);\n };\n }, [closeHandle]);\n\n const isCMTheme = theme === 'coorpmanager';\n\n const lines = map.convert({cap: false})((choice, i) => {\n return (\n <li key={i} className={style.choice}>\n {isCMTheme ? (\n <CMMultipleView multiple={multiple} choice={{...choice, i}} onChange={handleChange} />\n ) : (\n <TitledCheckbox\n onToggle={handleChange}\n choice={{...choice, i}}\n background={defaultColor}\n />\n )}\n </li>\n );\n }, options);\n\n const selection = pipe(filter({selected: true}), map('name'), join(', '))(options);\n\n const _title = title && `${title}${required ? ' *' : ''}`;\n\n const isActive = isOpened === true;\n\n const titleView = title ? (\n <span\n className={classnames(\n style.title,\n isCMTheme && selection && style.titleWithSelection,\n isCMTheme && isEmpty(selection) && style.noValue,\n isActive && style.active\n )}\n >\n {_title}\n {isCMTheme ? (\n <div className={style.infoIconWrapper}>\n <InfoIcon className={style.infoIcon} />\n <div className={style.descriptionLabel}>{description}</div>\n </div>\n ) : null}\n </span>\n ) : null;\n\n const hintView =\n isCMTheme && !isActive ? (\n <div\n className={style.hint}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: error || hint}}\n />\n ) : null;\n\n const mainClass = theme ? themeStyle[theme] : style.default;\n const showPlaceholder = isCMTheme && isActive;\n const behaviourClassName = getClassState(\n style.default,\n style.modified,\n style.error,\n modified,\n error\n );\n\n const errorIconView = error ? <ErrorIcon onClick={onError} className={style.errorIcon} /> : null;\n\n return (\n <div\n className={classnames(mainClass, behaviourClassName, disabled && style.disabled)}\n ref={nodeRef}\n >\n <label>\n {!isCMTheme && titleView}\n <div className={style.select} title={selection || placeholder} onClick={handleOnClick}>\n {isCMTheme && titleView}\n <span\n className={classnames(\n style.selection,\n isCMTheme && isEmpty(selection) && style.noselection\n )}\n >\n {selection || !isCMTheme || (showPlaceholder && placeholder) || null}\n </span>\n {isCMTheme ? (\n <div className={style.iconsWrapper}>\n <div className={style.flex}>{errorIconView}</div>\n <div className={classnames(style.flex, isActive && style.clicked)}>\n <ArrowDown\n color={black}\n className={classnames(style.arrow, {[style.down]: isActive})}\n />\n </div>\n </div>\n ) : (\n <ArrowDown\n color={black}\n className={classnames(style.arrow, {[style.down]: isActive})}\n />\n )}\n </div>\n <div className={classnames(style.choices, isActive && style.activeChoices)}>\n <ul className={style.list}>{lines}</ul>\n </div>\n </label>\n {!isCMTheme ? <div className={style.description}>{description}</div> : null}\n {hintView}\n </div>\n );\n};\n\nSelectMultiple.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nCMMultipleView.propTypes = {\n multiple: PropTypes.bool,\n choice: TitledCheckbox.propTypes.choice,\n onChange: PropTypes.func\n};\n\nSelectMultiple.propTypes = {\n title: PropTypes.string,\n placeholder: PropTypes.string,\n description: PropTypes.string,\n hint: PropTypes.string,\n options: PropTypes.arrayOf(TitledCheckbox.propTypes.choice),\n onChange: PropTypes.func,\n onError: PropTypes.func,\n multiple: PropTypes.bool,\n modified: PropTypes.bool,\n disabled: PropTypes.bool,\n required: PropTypes.bool,\n error: PropTypes.string,\n theme: PropTypes.oneOf(keys(themeStyle))\n};\n\nexport default SelectMultiple;\n"],"file":"index.js"}
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
border: 1px solid light;
|
|
77
77
|
user-select: none;
|
|
78
78
|
overflow: scroll;
|
|
79
|
-
max-height:
|
|
79
|
+
max-height: 0;
|
|
80
80
|
transition: all 0.25s linear;
|
|
81
81
|
opacity: 1;
|
|
82
82
|
}
|
|
@@ -104,7 +104,6 @@
|
|
|
104
104
|
display: block;
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
-
|
|
108
107
|
.arrow {
|
|
109
108
|
position: absolute;
|
|
110
109
|
right: 10px;
|
|
@@ -188,6 +187,7 @@
|
|
|
188
187
|
display: inline-flex;
|
|
189
188
|
align-items: center;
|
|
190
189
|
}
|
|
190
|
+
|
|
191
191
|
/*
|
|
192
192
|
cockpit theme
|
|
193
193
|
*/
|
|
@@ -232,6 +232,7 @@
|
|
|
232
232
|
color: black;
|
|
233
233
|
height: 44px;
|
|
234
234
|
padding: 11px 85px 11px 16px;
|
|
235
|
+
background-color: cm_grey_100;
|
|
235
236
|
}
|
|
236
237
|
|
|
237
238
|
.coorpmanager .select .title {
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.default = void 0;
|
|
5
|
+
var _default = {
|
|
6
|
+
props: {
|
|
7
|
+
theme: 'coorpmanager',
|
|
8
|
+
placeholder: 'Select language(s)',
|
|
9
|
+
title: 'Input Name',
|
|
10
|
+
description: 'You should select a language',
|
|
11
|
+
multiple: false,
|
|
12
|
+
disabled: true,
|
|
13
|
+
error: '',
|
|
14
|
+
hint: 'Hint',
|
|
15
|
+
options: [{
|
|
16
|
+
name: '🇬🇧 English',
|
|
17
|
+
value: 'en',
|
|
18
|
+
selected: true
|
|
19
|
+
}, {
|
|
20
|
+
name: '🇩🇪 German',
|
|
21
|
+
value: 'de',
|
|
22
|
+
selected: false
|
|
23
|
+
}, {
|
|
24
|
+
name: '🇹🇭 Thai',
|
|
25
|
+
value: 'th',
|
|
26
|
+
selected: false
|
|
27
|
+
}, {
|
|
28
|
+
name: '🇪🇸 Spanish',
|
|
29
|
+
value: 'es',
|
|
30
|
+
selected: false
|
|
31
|
+
}],
|
|
32
|
+
onChange: value => console.log('onChange', value),
|
|
33
|
+
onError: () => true
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
exports.default = _default;
|
|
37
|
+
//# sourceMappingURL=checked-cm-theme-disabled.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/molecule/select-multiple/test/fixtures/checked-cm-theme-disabled.js"],"names":["props","theme","placeholder","title","description","multiple","disabled","error","hint","options","name","value","selected","onChange","console","log","onError"],"mappings":";;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,KAAK,EAAE,cADF;AAELC,IAAAA,WAAW,EAAE,oBAFR;AAGLC,IAAAA,KAAK,EAAE,YAHF;AAILC,IAAAA,WAAW,EAAE,8BAJR;AAKLC,IAAAA,QAAQ,EAAE,KALL;AAMLC,IAAAA,QAAQ,EAAE,IANL;AAOLC,IAAAA,KAAK,EAAE,EAPF;AAQLC,IAAAA,IAAI,EAAE,MARD;AASLC,IAAAA,OAAO,EAAE,CACP;AACEC,MAAAA,IAAI,EAAE,cADR;AAEEC,MAAAA,KAAK,EAAE,IAFT;AAGEC,MAAAA,QAAQ,EAAE;AAHZ,KADO,EAMP;AACEF,MAAAA,IAAI,EAAE,aADR;AAEEC,MAAAA,KAAK,EAAE,IAFT;AAGEC,MAAAA,QAAQ,EAAE;AAHZ,KANO,EAWP;AACEF,MAAAA,IAAI,EAAE,WADR;AAEEC,MAAAA,KAAK,EAAE,IAFT;AAGEC,MAAAA,QAAQ,EAAE;AAHZ,KAXO,EAgBP;AACEF,MAAAA,IAAI,EAAE,cADR;AAEEC,MAAAA,KAAK,EAAE,IAFT;AAGEC,MAAAA,QAAQ,EAAE;AAHZ,KAhBO,CATJ;AA+BLC,IAAAA,QAAQ,EAAEF,KAAK,IAAIG,OAAO,CAACC,GAAR,CAAY,UAAZ,EAAwBJ,KAAxB,CA/Bd;AAgCLK,IAAAA,OAAO,EAAE,MAAM;AAhCV;AADM,C","sourcesContent":["export default {\n props: {\n theme: 'coorpmanager',\n placeholder: 'Select language(s)',\n title: 'Input Name',\n description: 'You should select a language',\n multiple: false,\n disabled: true,\n error: '',\n hint: 'Hint',\n options: [\n {\n name: '🇬🇧 English',\n value: 'en',\n selected: true\n },\n {\n name: '🇩🇪 German',\n value: 'de',\n selected: false\n },\n {\n name: '🇹🇭 Thai',\n value: 'th',\n selected: false\n },\n {\n name: '🇪🇸 Spanish',\n value: 'es',\n selected: false\n }\n ],\n onChange: value => console.log('onChange', value),\n onError: () => true\n }\n};\n"],"file":"checked-cm-theme-disabled.js"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.default = void 0;
|
|
5
|
+
var _default = {
|
|
6
|
+
props: {
|
|
7
|
+
theme: 'coorpmanager',
|
|
8
|
+
placeholder: 'Select language(s)',
|
|
9
|
+
title: 'Input Name',
|
|
10
|
+
description: 'You should select a language',
|
|
11
|
+
multiple: false,
|
|
12
|
+
disabled: true,
|
|
13
|
+
error: 'Select at least one',
|
|
14
|
+
hint: 'Hint',
|
|
15
|
+
options: [{
|
|
16
|
+
name: '🇬🇧 English',
|
|
17
|
+
value: 'en',
|
|
18
|
+
selected: true
|
|
19
|
+
}, {
|
|
20
|
+
name: '🇩🇪 German',
|
|
21
|
+
value: 'de',
|
|
22
|
+
selected: false
|
|
23
|
+
}, {
|
|
24
|
+
name: '🇹🇭 Thai',
|
|
25
|
+
value: 'th',
|
|
26
|
+
selected: false
|
|
27
|
+
}, {
|
|
28
|
+
name: '🇪🇸 Spanish',
|
|
29
|
+
value: 'es',
|
|
30
|
+
selected: false
|
|
31
|
+
}],
|
|
32
|
+
onChange: value => console.log('onChange', value),
|
|
33
|
+
onError: () => true
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
exports.default = _default;
|
|
37
|
+
//# sourceMappingURL=checked-cm-theme-error.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/molecule/select-multiple/test/fixtures/checked-cm-theme-error.js"],"names":["props","theme","placeholder","title","description","multiple","disabled","error","hint","options","name","value","selected","onChange","console","log","onError"],"mappings":";;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,KAAK,EAAE,cADF;AAELC,IAAAA,WAAW,EAAE,oBAFR;AAGLC,IAAAA,KAAK,EAAE,YAHF;AAILC,IAAAA,WAAW,EAAE,8BAJR;AAKLC,IAAAA,QAAQ,EAAE,KALL;AAMLC,IAAAA,QAAQ,EAAE,IANL;AAOLC,IAAAA,KAAK,EAAE,qBAPF;AAQLC,IAAAA,IAAI,EAAE,MARD;AASLC,IAAAA,OAAO,EAAE,CACP;AACEC,MAAAA,IAAI,EAAE,cADR;AAEEC,MAAAA,KAAK,EAAE,IAFT;AAGEC,MAAAA,QAAQ,EAAE;AAHZ,KADO,EAMP;AACEF,MAAAA,IAAI,EAAE,aADR;AAEEC,MAAAA,KAAK,EAAE,IAFT;AAGEC,MAAAA,QAAQ,EAAE;AAHZ,KANO,EAWP;AACEF,MAAAA,IAAI,EAAE,WADR;AAEEC,MAAAA,KAAK,EAAE,IAFT;AAGEC,MAAAA,QAAQ,EAAE;AAHZ,KAXO,EAgBP;AACEF,MAAAA,IAAI,EAAE,cADR;AAEEC,MAAAA,KAAK,EAAE,IAFT;AAGEC,MAAAA,QAAQ,EAAE;AAHZ,KAhBO,CATJ;AA+BLC,IAAAA,QAAQ,EAAEF,KAAK,IAAIG,OAAO,CAACC,GAAR,CAAY,UAAZ,EAAwBJ,KAAxB,CA/Bd;AAgCLK,IAAAA,OAAO,EAAE,MAAM;AAhCV;AADM,C","sourcesContent":["export default {\n props: {\n theme: 'coorpmanager',\n placeholder: 'Select language(s)',\n title: 'Input Name',\n description: 'You should select a language',\n multiple: false,\n disabled: true,\n error: 'Select at least one',\n hint: 'Hint',\n options: [\n {\n name: '🇬🇧 English',\n value: 'en',\n selected: true\n },\n {\n name: '🇩🇪 German',\n value: 'de',\n selected: false\n },\n {\n name: '🇹🇭 Thai',\n value: 'th',\n selected: false\n },\n {\n name: '🇪🇸 Spanish',\n value: 'es',\n selected: false\n }\n ],\n onChange: value => console.log('onChange', value),\n onError: () => true\n }\n};\n"],"file":"checked-cm-theme-error.js"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/molecule/select-multiple/test/fixtures/checked-cm-theme.js"],"names":["props","theme","placeholder","title","description","multiple","disabled","error","hint","options","name","value","selected","onChange","onError"],"mappings":";;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,KAAK,EAAE,cADF;AAELC,IAAAA,WAAW,EAAE,oBAFR;AAGLC,IAAAA,KAAK,EAAE,YAHF;AAILC,IAAAA,WAAW,EAAE,8BAJR;AAKLC,IAAAA,QAAQ,EAAE,KALL;AAMLC,IAAAA,QAAQ,EAAE,
|
|
1
|
+
{"version":3,"sources":["../../../../../src/molecule/select-multiple/test/fixtures/checked-cm-theme.js"],"names":["props","theme","placeholder","title","description","multiple","disabled","error","hint","options","name","value","selected","onChange","onError"],"mappings":";;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,KAAK,EAAE,cADF;AAELC,IAAAA,WAAW,EAAE,oBAFR;AAGLC,IAAAA,KAAK,EAAE,YAHF;AAILC,IAAAA,WAAW,EAAE,8BAJR;AAKLC,IAAAA,QAAQ,EAAE,KALL;AAMLC,IAAAA,QAAQ,EAAE,IANL;AAOLC,IAAAA,KAAK,EAAE,EAPF;AAQLC,IAAAA,IAAI,EAAE,MARD;AASLC,IAAAA,OAAO,EAAE,CACP;AACEC,MAAAA,IAAI,EAAE,cADR;AAEEC,MAAAA,KAAK,EAAE,IAFT;AAGEC,MAAAA,QAAQ,EAAE;AAHZ,KADO,EAMP;AACEF,MAAAA,IAAI,EAAE,aADR;AAEEC,MAAAA,KAAK,EAAE,IAFT;AAGEC,MAAAA,QAAQ,EAAE;AAHZ,KANO,EAWP;AACEF,MAAAA,IAAI,EAAE,WADR;AAEEC,MAAAA,KAAK,EAAE,IAFT;AAGEC,MAAAA,QAAQ,EAAE;AAHZ,KAXO,EAgBP;AACEF,MAAAA,IAAI,EAAE,cADR;AAEEC,MAAAA,KAAK,EAAE,IAFT;AAGEC,MAAAA,QAAQ,EAAE;AAHZ,KAhBO,CATJ;AA+BLC,IAAAA,QAAQ,EAAE,MAAM,IA/BX;AAgCLC,IAAAA,OAAO,EAAE,MAAM;AAhCV;AADM,C","sourcesContent":["export default {\n props: {\n theme: 'coorpmanager',\n placeholder: 'Select language(s)',\n title: 'Input Name',\n description: 'You should select a language',\n multiple: false,\n disabled: true,\n error: '',\n hint: 'Hint',\n options: [\n {\n name: '🇬🇧 English',\n value: 'en',\n selected: true\n },\n {\n name: '🇩🇪 German',\n value: 'de',\n selected: false\n },\n {\n name: '🇹🇭 Thai',\n value: 'th',\n selected: false\n },\n {\n name: '🇪🇸 Spanish',\n value: 'es',\n selected: false\n }\n ],\n onChange: () => true,\n onError: () => true\n }\n};\n"],"file":"checked-cm-theme.js"}
|
|
@@ -8,10 +8,6 @@ var _renderComponent = _interopRequireDefault(require("../../../test/helpers/ren
|
|
|
8
8
|
|
|
9
9
|
var _ = _interopRequireDefault(require(".."));
|
|
10
10
|
|
|
11
|
-
var _checkedCmThemeMultiple = _interopRequireDefault(require("./fixtures/checked-cm-theme-multiple"));
|
|
12
|
-
|
|
13
|
-
var _checkedCmTheme = _interopRequireDefault(require("./fixtures/checked-cm-theme"));
|
|
14
|
-
|
|
15
11
|
var _checkedCockpitTheme = _interopRequireDefault(require("./fixtures/checked-cockpit-theme"));
|
|
16
12
|
|
|
17
13
|
var _checkedSetupTheme = _interopRequireDefault(require("./fixtures/checked-setup-theme"));
|
|
@@ -32,8 +28,6 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
32
28
|
t.not(value, undefined, `PropType for "Molecule.MoleculeSelectMultiple.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
|
|
33
29
|
});
|
|
34
30
|
});
|
|
35
|
-
(0, _ava.default)('Molecule › MoleculeSelectMultiple › CheckedCmThemeMultiple › should be rendered', _renderComponent.default, _.default, _checkedCmThemeMultiple.default);
|
|
36
|
-
(0, _ava.default)('Molecule › MoleculeSelectMultiple › CheckedCmTheme › should be rendered', _renderComponent.default, _.default, _checkedCmTheme.default);
|
|
37
31
|
(0, _ava.default)('Molecule › MoleculeSelectMultiple › CheckedCockpitTheme › should be rendered', _renderComponent.default, _.default, _checkedCockpitTheme.default);
|
|
38
32
|
(0, _ava.default)('Molecule › MoleculeSelectMultiple › CheckedSetupTheme › should be rendered', _renderComponent.default, _.default, _checkedSetupTheme.default);
|
|
39
33
|
(0, _ava.default)('Molecule › MoleculeSelectMultiple › Checked › should be rendered', _renderComponent.default, _.default, _checked.default);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/molecule/select-multiple/test/fixtures.js"],"names":["t","pass","MoleculeSelectMultiple","propTypes","value","key","not","undefined","renderComponentMacro","
|
|
1
|
+
{"version":3,"sources":["../../../../src/molecule/select-multiple/test/fixtures.js"],"names":["t","pass","MoleculeSelectMultiple","propTypes","value","key","not","undefined","renderComponentMacro","fixtureCheckedCockpitTheme","fixtureCheckedSetupTheme","fixtureChecked","fixtureDefault","fixtureSetupThemeError","fixtureSetupTheme"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,iEAAL,EAAwEA,CAAC,IAAI;AAC3EA,EAAAA,CAAC,CAACC,IAAF;AACA,wBAAQC,UAAuBC,SAA/B,EAA0C,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACxDL,IAAAA,CAAC,CAACM,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,2DAA0DF,GAAI,mEAAvF;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,8EAAL,EAAqFG,wBAArF,EAA2GN,SAA3G,EAAmIO,4BAAnI;AACA,kBAAK,4EAAL,EAAmFD,wBAAnF,EAAyGN,SAAzG,EAAiIQ,0BAAjI;AACA,kBAAK,kEAAL,EAAyEF,wBAAzE,EAA+FN,SAA/F,EAAuHS,gBAAvH;AACA,kBAAK,kEAAL,EAAyEH,wBAAzE,EAA+FN,SAA/F,EAAuHU,gBAAvH;AACA,kBAAK,0EAAL,EAAiFJ,wBAAjF,EAAuGN,SAAvG,EAA+HW,wBAA/H;AACA,kBAAK,qEAAL,EAA4EL,wBAA5E,EAAkGN,SAAlG,EAA0HY,mBAA1H","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport MoleculeSelectMultiple from '..';\nimport fixtureCheckedCockpitTheme from './fixtures/checked-cockpit-theme';\nimport fixtureCheckedSetupTheme from './fixtures/checked-setup-theme';\nimport fixtureChecked from './fixtures/checked';\nimport fixtureDefault from './fixtures/default';\nimport fixtureSetupThemeError from './fixtures/setup-theme-error';\nimport fixtureSetupTheme from './fixtures/setup-theme';\n\ntest('Molecule › MoleculeSelectMultiple > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeSelectMultiple.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Molecule.MoleculeSelectMultiple.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Molecule › MoleculeSelectMultiple › CheckedCockpitTheme › should be rendered', renderComponentMacro, MoleculeSelectMultiple, fixtureCheckedCockpitTheme);\ntest('Molecule › MoleculeSelectMultiple › CheckedSetupTheme › should be rendered', renderComponentMacro, MoleculeSelectMultiple, fixtureCheckedSetupTheme);\ntest('Molecule › MoleculeSelectMultiple › Checked › should be rendered', renderComponentMacro, MoleculeSelectMultiple, fixtureChecked);\ntest('Molecule › MoleculeSelectMultiple › Default › should be rendered', renderComponentMacro, MoleculeSelectMultiple, fixtureDefault);\ntest('Molecule › MoleculeSelectMultiple › SetupThemeError › should be rendered', renderComponentMacro, MoleculeSelectMultiple, fixtureSetupThemeError);\ntest('Molecule › MoleculeSelectMultiple › SetupTheme › should be rendered', renderComponentMacro, MoleculeSelectMultiple, fixtureSetupTheme);\n"],"file":"fixtures.js"}
|
|
@@ -6,6 +6,32 @@ var _default = {
|
|
|
6
6
|
props: {
|
|
7
7
|
groups: [{
|
|
8
8
|
fields: [{
|
|
9
|
+
type: 'selectMultiple',
|
|
10
|
+
title: 'Languages',
|
|
11
|
+
placeholder: 'Language selection',
|
|
12
|
+
description: 'This is the tooltip text',
|
|
13
|
+
theme: 'coorpmanager',
|
|
14
|
+
hint: '15 / 30 characters',
|
|
15
|
+
size: 'default',
|
|
16
|
+
options: [{
|
|
17
|
+
name: '🇬🇧 English',
|
|
18
|
+
value: 'en',
|
|
19
|
+
selected: true
|
|
20
|
+
}, {
|
|
21
|
+
name: '🇩🇪 German',
|
|
22
|
+
value: 'de',
|
|
23
|
+
selected: false
|
|
24
|
+
}, {
|
|
25
|
+
name: '🇹🇭 Thai',
|
|
26
|
+
value: 'th',
|
|
27
|
+
selected: false
|
|
28
|
+
}, {
|
|
29
|
+
name: '🇪🇸 Spanish',
|
|
30
|
+
value: 'es',
|
|
31
|
+
selected: false
|
|
32
|
+
}],
|
|
33
|
+
multiple: false
|
|
34
|
+
}, {
|
|
9
35
|
type: 'text',
|
|
10
36
|
title: 'Playlist name',
|
|
11
37
|
placeholder: 'Playlist name',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/organism/brand-form/test/fixtures/wizard-playlists.js"],"names":["props","groups","fields","type","title","placeholder","description","theme","hint","value","
|
|
1
|
+
{"version":3,"sources":["../../../../../src/organism/brand-form/test/fixtures/wizard-playlists.js"],"names":["props","groups","fields","type","title","placeholder","description","theme","hint","size","options","name","value","selected","multiple"],"mappings":";;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,MAAM,EAAE,CACN;AACEC,MAAAA,MAAM,EAAE,CACN;AACEC,QAAAA,IAAI,EAAE,gBADR;AAEEC,QAAAA,KAAK,EAAE,WAFT;AAGEC,QAAAA,WAAW,EAAE,oBAHf;AAIEC,QAAAA,WAAW,EAAE,0BAJf;AAKEC,QAAAA,KAAK,EAAE,cALT;AAMEC,QAAAA,IAAI,EAAE,oBANR;AAOEC,QAAAA,IAAI,EAAE,SAPR;AAQEC,QAAAA,OAAO,EAAE,CACP;AACEC,UAAAA,IAAI,EAAE,cADR;AAEEC,UAAAA,KAAK,EAAE,IAFT;AAGEC,UAAAA,QAAQ,EAAE;AAHZ,SADO,EAMP;AACEF,UAAAA,IAAI,EAAE,aADR;AAEEC,UAAAA,KAAK,EAAE,IAFT;AAGEC,UAAAA,QAAQ,EAAE;AAHZ,SANO,EAWP;AACEF,UAAAA,IAAI,EAAE,WADR;AAEEC,UAAAA,KAAK,EAAE,IAFT;AAGEC,UAAAA,QAAQ,EAAE;AAHZ,SAXO,EAgBP;AACEF,UAAAA,IAAI,EAAE,cADR;AAEEC,UAAAA,KAAK,EAAE,IAFT;AAGEC,UAAAA,QAAQ,EAAE;AAHZ,SAhBO,CARX;AA8BEC,QAAAA,QAAQ,EAAE;AA9BZ,OADM,EAiCN;AACEX,QAAAA,IAAI,EAAE,MADR;AAEEC,QAAAA,KAAK,EAAE,eAFT;AAGEC,QAAAA,WAAW,EAAE,eAHf;AAIEC,QAAAA,WAAW,EAAE,0BAJf;AAKEC,QAAAA,KAAK,EAAE,cALT;AAMEC,QAAAA,IAAI,EAAE,oBANR;AAOEI,QAAAA,KAAK,EAAE,kBAPT;AAQEH,QAAAA,IAAI,EAAE;AARR,OAjCM,EA2CN;AACEN,QAAAA,IAAI,EAAE,UADR;AAEEC,QAAAA,KAAK,EAAE,aAFT;AAGEC,QAAAA,WAAW,EAAE,aAHf;AAIEC,QAAAA,WAAW,EAAE,0BAJf;AAKEC,QAAAA,KAAK,EAAE,cALT;AAMEC,QAAAA,IAAI,EAAE,qBANR;AAOEC,QAAAA,IAAI,EAAE,QAPR;AAQEG,QAAAA,KAAK,EACH;AATJ,OA3CM;AADV,KADM;AADH;AADM,C","sourcesContent":["export default {\n props: {\n groups: [\n {\n fields: [\n {\n type: 'selectMultiple',\n title: 'Languages',\n placeholder: 'Language selection',\n description: 'This is the tooltip text',\n theme: 'coorpmanager',\n hint: '15 / 30 characters',\n size: 'default',\n options: [\n {\n name: '🇬🇧 English',\n value: 'en',\n selected: true\n },\n {\n name: '🇩🇪 German',\n value: 'de',\n selected: false\n },\n {\n name: '🇹🇭 Thai',\n value: 'th',\n selected: false\n },\n {\n name: '🇪🇸 Spanish',\n value: 'es',\n selected: false\n }\n ],\n multiple: false\n },\n {\n type: 'text',\n title: 'Playlist name',\n placeholder: 'Playlist name',\n description: 'This is the tooltip text',\n theme: 'coorpmanager',\n hint: '15 / 30 characters',\n value: 'Marketing expert',\n size: 'default'\n },\n {\n type: 'textarea',\n title: 'Description',\n placeholder: 'Description',\n description: 'This is the tooltip text',\n theme: 'coorpmanager',\n hint: '80 / 200 characters',\n size: 'medium',\n value:\n 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis fermentum sem ac fermentum luctus. Integer eu dui magna. Donec ut tristique dui. Vestibulum non accumsan tellus. Donec luctus erat vitae aliquet viverra. Mauris malesuada tortor quis viverra vestibulum. Nullam laoreet porta massa vitae porta.'\n }\n ]\n }\n ]\n }\n};\n"],"file":"wizard-playlists.js"}
|
|
@@ -50,6 +50,8 @@ var _manageusersEdit = _interopRequireDefault(require("./fixtures/manageusers-ed
|
|
|
50
50
|
|
|
51
51
|
var _manageusersList = _interopRequireDefault(require("./fixtures/manageusers-list"));
|
|
52
52
|
|
|
53
|
+
var _manageusers = _interopRequireDefault(require("./fixtures/manageusers"));
|
|
54
|
+
|
|
53
55
|
var _quickAccess = _interopRequireDefault(require("./fixtures/quick-access"));
|
|
54
56
|
|
|
55
57
|
var _ssoActivate = _interopRequireDefault(require("./fixtures/sso-activate"));
|
|
@@ -91,6 +93,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
91
93
|
(0, _ava.default)('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Lookandfeel › should be rendered', _renderComponent.default, _.default, _lookandfeel.default);
|
|
92
94
|
(0, _ava.default)('TemplateBackOffice › TemplateBackOfficeBrandUpdate › ManageusersEdit › should be rendered', _renderComponent.default, _.default, _manageusersEdit.default);
|
|
93
95
|
(0, _ava.default)('TemplateBackOffice › TemplateBackOfficeBrandUpdate › ManageusersList › should be rendered', _renderComponent.default, _.default, _manageusersList.default);
|
|
96
|
+
(0, _ava.default)('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Manageusers › should be rendered', _renderComponent.default, _.default, _manageusers.default);
|
|
94
97
|
(0, _ava.default)('TemplateBackOffice › TemplateBackOfficeBrandUpdate › QuickAccess › should be rendered', _renderComponent.default, _.default, _quickAccess.default);
|
|
95
98
|
(0, _ava.default)('TemplateBackOffice › TemplateBackOfficeBrandUpdate › SsoActivate › should be rendered', _renderComponent.default, _.default, _ssoActivate.default);
|
|
96
99
|
(0, _ava.default)('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Sso › should be rendered', _renderComponent.default, _.default, _sso.default);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/template/back-office/brand-update/test/fixtures.js"],"names":["t","pass","TemplateBackOfficeBrandUpdate","propTypes","value","key","not","undefined","renderComponentMacro","fixtureAnalytics","fixtureAnimations","fixtureCohortError","fixtureCohort","fixtureDashboard","fixtureDashboardsAnalytics","fixtureDefault","fixtureGeneralSettingsSuccess","fixtureGeneralSettings","fixtureLmsError","fixtureLmsModified","fixtureLmsSuccess","fixtureLms","fixtureLoader","fixtureLookandfeelError","fixtureLookandfeelModified","fixtureLookandfeelPending","fixtureLookandfeelSuccess","fixtureLookandfeel","fixtureManageusersEdit","fixtureManageusersList","fixtureQuickAccess","fixtureSsoActivate","fixtureSso","fixtureUploadusersLoading","fixtureUploadusersSuccessful","fixtureUploadusers"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;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L,EAAyFb,wBAAzF,EAA+GN,SAA/G,EAA8IoB,eAA9I;AACA,kBAAK,4FAAL,EAAmGd,wBAAnG,EAAyHN,SAAzH,EAAwJqB,yBAAxJ;AACA,kBAAK,+FAAL,EAAsGf,wBAAtG,EAA4HN,SAA5H,EAA2JsB,4BAA3J;AACA,kBAAK,8FAAL,EAAqGhB,wBAArG,EAA2HN,SAA3H,EAA0JuB,2BAA1J;AACA,kBAAK,8FAAL,EAAqGjB,wBAArG,EAA2HN,SAA3H,EAA0JwB,2BAA1J;AACA,kBAAK,uFAAL,EAA8FlB,wBAA9F,EAAoHN,SAApH,EAAmJyB,oBAAnJ;AACA,kBAAK,2FAAL,EAAkGnB,wBAAlG,EAAwHN,SAAxH,EAAuJ0B,wBAAvJ;AACA,kBAAK,2FAAL,EAAkGpB,wBAAlG,EAAwHN,SAAxH,EAAuJ2B,wBAAvJ;AACA,kBAAK,uFAAL,EAA8FrB,wBAA9F,EAAoHN,SAApH,EAAmJ4B,oBAAnJ;AACA,kBAAK,uFAAL,EAA8FtB,wBAA9F,EAAoHN,SAApH,EAAmJ6B,oBAAnJ;AACA,kBAAK,+EAAL,EAAsFvB,wBAAtF,EAA4GN,SAA5G,EAA2I8B,YAA3I;AACA,kBAAK,8FAAL,EAAqGxB,wBAArG,EAA2HN,SAA3H,EAA0J+B,2BAA1J;AACA,kBAAK,iGAAL,EAAwGzB,wBAAxG,EAA8HN,SAA9H,EAA6JgC,8BAA7J;AACA,kBAAK,uFAAL,EAA8F1B,wBAA9F,EAAoHN,SAApH,EAAmJiC,oBAAnJ","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 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 › 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":["t","pass","TemplateBackOfficeBrandUpdate","propTypes","value","key","not","undefined","renderComponentMacro","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"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,kFAAL,EAAyFA,CAAC,IAAI;AAC5FA,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,4EAA2EF,GAAI,mEAAxG;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,qFAAL,EAA4FG,wBAA5F,EAAkHN,SAAlH,EAAiJO,kBAAjJ;AACA,kBAAK,sFAAL,EAA6FD,wBAA7F,EAAmHN,SAAnH,EAAkJQ,mBAAlJ;AACA,kBAAK,uFAAL,EAA8FF,wBAA9F,EAAoHN,SAApH,EAAmJS,oBAAnJ;AACA,kBAAK,kFAAL,EAAyFH,wBAAzF,EAA+GN,SAA/G,EAA8IU,eAA9I;AACA,k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oHN,SAApH,EAAmJ4B,oBAAnJ;AACA,kBAAK,uFAAL,EAA8FtB,wBAA9F,EAAoHN,SAApH,EAAmJ6B,oBAAnJ;AACA,kBAAK,uFAAL,EAA8FvB,wBAA9F,EAAoHN,SAApH,EAAmJ8B,oBAAnJ;AACA,kBAAK,+EAAL,EAAsFxB,wBAAtF,EAA4GN,SAA5G,EAA2I+B,YAA3I;AACA,kBAAK,8FAAL,EAAqGzB,wBAArG,EAA2HN,SAA3H,EAA0JgC,2BAA1J;AACA,kBAAK,iGAAL,EAAwG1B,wBAAxG,EAA8HN,SAA9H,EAA6JiC,8BAA7J;AACA,kBAAK,uFAAL,EAA8F3B,wBAA9F,EAAoHN,SAApH,EAAmJkC,oBAAnJ","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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coorpacademy/components",
|
|
3
|
-
"version": "10.1.
|
|
3
|
+
"version": "10.1.15",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -118,5 +118,5 @@
|
|
|
118
118
|
"webpack-hot-middleware": "^2.25.0"
|
|
119
119
|
},
|
|
120
120
|
"author": "CoorpAcademy",
|
|
121
|
-
"gitHead": "
|
|
121
|
+
"gitHead": "4ebe60a6de6b79c65dddaf49bed3ac9d0cddb95e"
|
|
122
122
|
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import test from 'ava';
|
|
2
|
-
import forEach from 'lodash/forEach';
|
|
3
|
-
import renderComponentMacro from '../../../test/helpers/render-component';
|
|
4
|
-
import OrganismListItem from '..';
|
|
5
|
-
import fixtureArchived from './fixtures/archived';
|
|
6
|
-
import fixtureDraft from './fixtures/draft';
|
|
7
|
-
import fixturePublished from './fixtures/published';
|
|
8
|
-
import fixtureRevised from './fixtures/revised';
|
|
9
|
-
test('Organism › OrganismListItem > should have valid propTypes', t => {
|
|
10
|
-
t.pass();
|
|
11
|
-
forEach(OrganismListItem.propTypes, (value, key) => {
|
|
12
|
-
t.not(value, undefined, `PropType for "Organism.OrganismListItem.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
|
|
13
|
-
});
|
|
14
|
-
});
|
|
15
|
-
test('Organism › OrganismListItem › Archived › should be rendered', renderComponentMacro, OrganismListItem, fixtureArchived);
|
|
16
|
-
test('Organism › OrganismListItem › Draft › should be rendered', renderComponentMacro, OrganismListItem, fixtureDraft);
|
|
17
|
-
test('Organism › OrganismListItem › Published › should be rendered', renderComponentMacro, OrganismListItem, fixturePublished);
|
|
18
|
-
test('Organism › OrganismListItem › Revised › should be rendered', renderComponentMacro, OrganismListItem, fixtureRevised);
|
|
19
|
-
//# sourceMappingURL=fixtures.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/organism/list-item/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","OrganismListItem","fixtureArchived","fixtureDraft","fixturePublished","fixtureRevised","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,gBAAP,MAA6B,IAA7B;AACA,OAAOC,eAAP,MAA4B,qBAA5B;AACA,OAAOC,YAAP,MAAyB,kBAAzB;AACA,OAAOC,gBAAP,MAA6B,sBAA7B;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AAEAP,IAAI,CAAC,2DAAD,EAA8DQ,CAAC,IAAI;AACrEA,EAAAA,CAAC,CAACC,IAAF;AACAR,EAAAA,OAAO,CAACE,gBAAgB,CAACO,SAAlB,EAA6B,CAACC,KAAD,EAAQC,GAAR,KAAgB;AAClDJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,qDAAoDF,GAAI,mEAAjF;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAZ,IAAI,CAAC,6DAAD,EAAgEE,oBAAhE,EAAsFC,gBAAtF,EAAwGC,eAAxG,CAAJ;AACAJ,IAAI,CAAC,0DAAD,EAA6DE,oBAA7D,EAAmFC,gBAAnF,EAAqGE,YAArG,CAAJ;AACAL,IAAI,CAAC,8DAAD,EAAiEE,oBAAjE,EAAuFC,gBAAvF,EAAyGG,gBAAzG,CAAJ;AACAN,IAAI,CAAC,4DAAD,EAA+DE,oBAA/D,EAAqFC,gBAArF,EAAuGI,cAAvG,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport OrganismListItem from '..';\nimport fixtureArchived from './fixtures/archived';\nimport fixtureDraft from './fixtures/draft';\nimport fixturePublished from './fixtures/published';\nimport fixtureRevised from './fixtures/revised';\n\ntest('Organism › OrganismListItem > should have valid propTypes', t => {\n t.pass();\n forEach(OrganismListItem.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Organism.OrganismListItem.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Organism › OrganismListItem › Archived › should be rendered', renderComponentMacro, OrganismListItem, fixtureArchived);\ntest('Organism › OrganismListItem › Draft › should be rendered', renderComponentMacro, OrganismListItem, fixtureDraft);\ntest('Organism › OrganismListItem › Published › should be rendered', renderComponentMacro, OrganismListItem, fixturePublished);\ntest('Organism › OrganismListItem › Revised › should be rendered', renderComponentMacro, OrganismListItem, fixtureRevised);\n"],"file":"fixtures.js"}
|
|
@@ -1,31 +0,0 @@
|
|
|
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 _archived = _interopRequireDefault(require("./fixtures/archived"));
|
|
12
|
-
|
|
13
|
-
var _draft = _interopRequireDefault(require("./fixtures/draft"));
|
|
14
|
-
|
|
15
|
-
var _published = _interopRequireDefault(require("./fixtures/published"));
|
|
16
|
-
|
|
17
|
-
var _revised = _interopRequireDefault(require("./fixtures/revised"));
|
|
18
|
-
|
|
19
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
20
|
-
|
|
21
|
-
(0, _ava.default)('Organism › OrganismListItem > should have valid propTypes', t => {
|
|
22
|
-
t.pass();
|
|
23
|
-
(0, _forEach.default)(_.default.propTypes, (value, key) => {
|
|
24
|
-
t.not(value, undefined, `PropType for "Organism.OrganismListItem.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
|
|
25
|
-
});
|
|
26
|
-
});
|
|
27
|
-
(0, _ava.default)('Organism › OrganismListItem › Archived › should be rendered', _renderComponent.default, _.default, _archived.default);
|
|
28
|
-
(0, _ava.default)('Organism › OrganismListItem › Draft › should be rendered', _renderComponent.default, _.default, _draft.default);
|
|
29
|
-
(0, _ava.default)('Organism › OrganismListItem › Published › should be rendered', _renderComponent.default, _.default, _published.default);
|
|
30
|
-
(0, _ava.default)('Organism › OrganismListItem › Revised › should be rendered', _renderComponent.default, _.default, _revised.default);
|
|
31
|
-
//# sourceMappingURL=fixtures.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/organism/list-item/test/fixtures.js"],"names":["t","pass","OrganismListItem","propTypes","value","key","not","undefined","renderComponentMacro","fixtureArchived","fixtureDraft","fixturePublished","fixtureRevised"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,2DAAL,EAAkEA,CAAC,IAAI;AACrEA,EAAAA,CAAC,CAACC,IAAF;AACA,wBAAQC,UAAiBC,SAAzB,EAAoC,CAACC,KAAD,EAAQC,GAAR,KAAgB;AAClDL,IAAAA,CAAC,CAACM,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,qDAAoDF,GAAI,mEAAjF;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,6DAAL,EAAoEG,wBAApE,EAA0FN,SAA1F,EAA4GO,iBAA5G;AACA,kBAAK,0DAAL,EAAiED,wBAAjE,EAAuFN,SAAvF,EAAyGQ,cAAzG;AACA,kBAAK,8DAAL,EAAqEF,wBAArE,EAA2FN,SAA3F,EAA6GS,kBAA7G;AACA,kBAAK,4DAAL,EAAmEH,wBAAnE,EAAyFN,SAAzF,EAA2GU,gBAA3G","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport OrganismListItem from '..';\nimport fixtureArchived from './fixtures/archived';\nimport fixtureDraft from './fixtures/draft';\nimport fixturePublished from './fixtures/published';\nimport fixtureRevised from './fixtures/revised';\n\ntest('Organism › OrganismListItem > should have valid propTypes', t => {\n t.pass();\n forEach(OrganismListItem.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Organism.OrganismListItem.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Organism › OrganismListItem › Archived › should be rendered', renderComponentMacro, OrganismListItem, fixtureArchived);\ntest('Organism › OrganismListItem › Draft › should be rendered', renderComponentMacro, OrganismListItem, fixtureDraft);\ntest('Organism › OrganismListItem › Published › should be rendered', renderComponentMacro, OrganismListItem, fixturePublished);\ntest('Organism › OrganismListItem › Revised › should be rendered', renderComponentMacro, OrganismListItem, fixtureRevised);\n"],"file":"fixtures.js"}
|