@coorpacademy/components 11.19.2-alpha.14 → 11.19.2-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/atom/title/style.css +1 -1
- package/es/molecule/card/index.d.ts.map +1 -1
- package/es/molecule/card/index.js +2 -6
- package/es/molecule/card/index.js.map +1 -1
- package/es/molecule/card/style.css +2 -2
- package/es/molecule/cm-popin/index.d.ts.map +1 -1
- package/es/molecule/cm-popin/index.js +3 -20
- package/es/molecule/cm-popin/index.js.map +1 -1
- package/es/molecule/cm-popin/style.css +0 -26
- package/es/molecule/title-and-checkbox-wrapper/index.d.ts +46 -0
- package/es/molecule/title-and-checkbox-wrapper/index.d.ts.map +1 -1
- package/es/molecule/title-and-checkbox-wrapper/index.js +15 -3
- package/es/molecule/title-and-checkbox-wrapper/index.js.map +1 -1
- package/es/organism/rewards-form/index.d.ts +46 -0
- package/es/organism/select-opponents/index.d.ts +82 -26
- package/es/organism/select-opponents/index.d.ts.map +1 -1
- package/es/organism/select-opponents/index.js +3 -3
- package/es/organism/select-opponents/index.js.map +1 -1
- package/es/organism/select-opponents/style.css +6 -0
- package/es/organism/select-opponents/types.d.ts +90 -28
- package/es/organism/select-opponents/types.d.ts.map +1 -1
- package/es/organism/select-opponents/types.js +2 -2
- package/es/organism/select-opponents/types.js.map +1 -1
- package/es/organism/title-and-input/index.d.ts +82 -26
- package/es/organism/title-and-input/index.d.ts.map +1 -1
- package/es/organism/title-and-input/types.d.ts +82 -26
- package/es/organism/title-and-input/types.d.ts.map +1 -1
- package/es/organism/wizard-contents/index.d.ts +46 -0
- package/es/template/common/dashboard/index.d.ts.map +1 -1
- package/es/template/common/dashboard/index.js.map +1 -1
- package/es/template/common/dashboard/style.css +0 -4
- package/es/template/common/search-page/index.d.ts.map +1 -1
- package/es/template/common/search-page/index.js +2 -4
- package/es/template/common/search-page/index.js.map +1 -1
- package/es/template/common/search-page/style.css +0 -4
- package/lib/atom/title/style.css +1 -1
- package/lib/molecule/card/index.d.ts.map +1 -1
- package/lib/molecule/card/index.js +2 -6
- package/lib/molecule/card/index.js.map +1 -1
- package/lib/molecule/card/style.css +2 -2
- package/lib/molecule/cm-popin/index.d.ts.map +1 -1
- package/lib/molecule/cm-popin/index.js +3 -24
- package/lib/molecule/cm-popin/index.js.map +1 -1
- package/lib/molecule/cm-popin/style.css +0 -26
- package/lib/molecule/title-and-checkbox-wrapper/index.d.ts +46 -0
- package/lib/molecule/title-and-checkbox-wrapper/index.d.ts.map +1 -1
- package/lib/molecule/title-and-checkbox-wrapper/index.js +17 -3
- package/lib/molecule/title-and-checkbox-wrapper/index.js.map +1 -1
- package/lib/organism/rewards-form/index.d.ts +46 -0
- package/lib/organism/select-opponents/index.d.ts +82 -26
- package/lib/organism/select-opponents/index.d.ts.map +1 -1
- package/lib/organism/select-opponents/index.js +3 -3
- package/lib/organism/select-opponents/index.js.map +1 -1
- package/lib/organism/select-opponents/style.css +6 -0
- package/lib/organism/select-opponents/types.d.ts +90 -28
- package/lib/organism/select-opponents/types.d.ts.map +1 -1
- package/lib/organism/select-opponents/types.js +2 -2
- package/lib/organism/select-opponents/types.js.map +1 -1
- package/lib/organism/title-and-input/index.d.ts +82 -26
- package/lib/organism/title-and-input/index.d.ts.map +1 -1
- package/lib/organism/title-and-input/types.d.ts +82 -26
- package/lib/organism/title-and-input/types.d.ts.map +1 -1
- package/lib/organism/wizard-contents/index.d.ts +46 -0
- package/lib/template/common/dashboard/index.d.ts.map +1 -1
- package/lib/template/common/dashboard/index.js.map +1 -1
- package/lib/template/common/dashboard/style.css +0 -4
- package/lib/template/common/search-page/index.d.ts.map +1 -1
- package/lib/template/common/search-page/index.js +2 -8
- package/lib/template/common/search-page/index.js.map +1 -1
- package/lib/template/common/search-page/style.css +0 -4
- package/locales/.mtslconfig.json +1 -0
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["IconType","lockedContent","style","lockIcon","fileZipped","filesListIconContainer","filesListIcon","CMPopin","props","content","mode","firstButton","secondButton","onClose","header","icon","backgroundImageUrl","descriptionText","thirdButton","cookieTitle","descriptionBtnTxt","listBtnSwicth","items","logo","AlertDiamond","WindowUpload","MoonRocket","CheckCircle1","LogoComponent","backgroundImageStyle","backgroundImage","backgroundSize","nodeRef","useRef","useEffect","closePopin","e","current","contains","target","document","addEventListener","removeEventListener","renderHeader","title","headerIcon","TopTitleIcon","headerContent","headerBackground","cookieHeader","cookieIconContainer","cookieIcon","getClassBtnSwitch","index","btnList","firstBtnSwitchContainer","length","lastBtnSwitchContainer","singleSwitchContainer","renderBtnSwitch","map","convert","cap","el","type","value","onChange","titlePosition","theme","details","requiredSelection","disabled","id","dataName","renderItems","list","isEmpty","itemsContainer","filesListContainer","wrapperPopinStyle","classNames","popinCookie","popinFilesList","popinItems","popin","background","popinHeader","cookieTitleContainer","titleContainer","contentSection","message","__html","descriptionBtn","buttonContainer","largeButton","button","label","handleOnclick","customStyle","propTypes"],"sources":["../../../src/molecule/cm-popin/index.js"],"sourcesContent":["// import React from 'react';\nimport React, {useRef, useEffect} from 'react';\nimport {\n NovaSolidInterfaceFeedbackInterfaceAlertDiamond as AlertDiamond,\n NovaSolidApplicationsWindowUpload3 as WindowUpload,\n NovaLineSettingsCookie as Cookie,\n NovaSolidSpaceMoonRocket as MoonRocket,\n NovaCompositionCoorpacademyPadlock as LockIcon,\n NovaLineStatusCheckCircle1 as CheckCircle1,\n NovaSolidFilesBasicFileLines as FileLinesIcon\n} from '@coorpacademy/nova-icons';\nimport map from 'lodash/fp/map';\nimport isEmpty from 'lodash/fp/isEmpty';\nimport classNames from 'classnames';\nimport Cta from '../../atom/button-link';\nimport ButtonLinkIconOnly from '../../atom/button-link-icon-only';\nimport InputSwitch from '../../atom/input-switch';\nimport Title from '../../atom/title';\nimport CardsGrid from '../../organism/cards-grid';\nimport ListItems from '../../organism/list-items';\nimport style from './style.css';\nimport propTypes from './types';\n\nconst IconType = {\n lockedContent: <LockIcon className={style.lockIcon} />,\n fileZipped: (\n <div className={style.filesListIconContainer}>\n <FileLinesIcon className={style.filesListIcon} />\n </div>\n )\n};\n\nconst CMPopin = props => {\n const {\n content,\n mode = 'alert',\n firstButton,\n secondButton,\n onClose,\n header,\n icon,\n backgroundImageUrl,\n descriptionText,\n thirdButton,\n cookieTitle,\n descriptionBtnTxt,\n listBtnSwicth,\n items\n } = props;\n const logo = {\n AlertDiamond,\n WindowUpload,\n MoonRocket,\n CheckCircle1\n };\n const LogoComponent = logo[icon];\n\n const backgroundImageStyle = backgroundImageUrl\n ? {\n backgroundImage: `url(${backgroundImageUrl})`,\n backgroundSize: 'cover'\n }\n : null;\n const nodeRef = useRef(null);\n useEffect(() => {\n if (mode === 'items') {\n const closePopin = e => {\n if (nodeRef && nodeRef.current && !nodeRef.current.contains(e.target)) {\n onClose();\n }\n };\n document.addEventListener('click', closePopin);\n return () => {\n document.removeEventListener('click', closePopin);\n };\n }\n }, [mode, onClose]);\n const renderHeader = () => {\n if (header) {\n const {title, headerIcon, backgroundImage} = header;\n const TopTitleIcon = IconType[headerIcon];\n\n return (\n <>\n {title ? (\n <div className={style.headerContent}>\n {TopTitleIcon}\n <Title {...title} />\n </div>\n ) : null}\n {backgroundImage ? (\n <img className={style.headerBackground} src={backgroundImage} />\n ) : null}\n </>\n );\n }\n\n if (mode === 'cookie')\n return (\n <div className={style.cookieHeader}>\n <div className={style.cookieIconContainer}>\n <Cookie className={style.cookieIcon} />\n </div>\n <div className={style.cookieTitle}>{cookieTitle}</div>\n </div>\n );\n\n return null;\n };\n\n const getClassBtnSwitch = (index, btnList) => {\n switch (index) {\n case 0:\n return style.firstBtnSwitchContainer;\n case btnList.length - 1:\n return style.lastBtnSwitchContainer;\n default:\n return style.singleSwitchContainer;\n }\n };\n\n const renderBtnSwitch = () => {\n return map.convert({cap: false})((el, index) => {\n const {\n type,\n title,\n value,\n onChange,\n titlePosition,\n theme,\n details,\n requiredSelection,\n disabled,\n id,\n 'data-name': dataName\n } = el;\n return (\n <div key={index} className={getClassBtnSwitch(index, listBtnSwicth)}>\n <InputSwitch\n {...{\n type,\n title,\n value,\n onChange,\n titlePosition,\n theme,\n details,\n requiredSelection,\n disabled,\n id,\n 'data-name': dataName\n }}\n />\n </div>\n );\n })(listBtnSwicth);\n };\n\n const renderItems = () => {\n const {type, list} = items;\n if (isEmpty(list)) return null;\n\n if (type === 'content')\n return (\n <div className={style.itemsContainer} data-name={'cm-popin-cards'}>\n <CardsGrid {...list} />\n </div>\n );\n if (type === 'list')\n return (\n <div className={style.filesListContainer}>\n <ListItems {...list} />\n </div>\n );\n\n return null;\n };\n\n const wrapperPopinStyle = classNames(\n mode === 'cookie' && style.popinCookie,\n mode === 'list' && style.popinFilesList,\n mode === 'items' && style.popinItems,\n style.popin\n );\n return (\n <div\n className={mode !== 'cookie' ? style.background : null}\n style={backgroundImageStyle}\n data-name={'cm-popin-container'}\n >\n <div className={wrapperPopinStyle} ref={nodeRef}>\n <header className={style.popinHeader}>\n {renderHeader()}\n {onClose ? (\n <ButtonLinkIconOnly\n onClick={onClose}\n data-name={'close-icon'}\n aria-label={'close-icon'}\n size=\"small\"\n icon=\"close\"\n />\n ) : null}\n </header>\n {mode !== 'items' && mode !== 'list' ? (\n <div\n className={\n mode === 'cookie' || mode === 'information'\n ? style.cookieTitleContainer\n : style.titleContainer\n }\n >\n <div className={style.contentSection}>\n {LogoComponent ? <LogoComponent className={style.icon} /> : null}\n {content ? (\n <p\n className={mode === 'alert' ? style.content : style.message}\n data-name={'cm-popin-content'}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: content}}\n />\n ) : null}\n </div>\n {descriptionText ? (\n <p\n className={style.descriptionText}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: descriptionText}}\n />\n ) : null}\n </div>\n ) : null}\n {descriptionBtnTxt ? <div className={style.descriptionBtn}>{descriptionBtnTxt}</div> : null}\n {!isEmpty(items) ? renderItems() : null}\n {renderBtnSwitch()}\n {firstButton || secondButton || thirdButton ? (\n <div className={style.buttonContainer}>\n {firstButton ? (\n <div className={firstButton.largeButton ? style.largeButton : style.button}>\n <Cta\n label={firstButton.label}\n onClick={firstButton.handleOnclick}\n data-name={'cm-popin-cta'}\n aria-label={firstButton['aria-label']}\n type={firstButton.type}\n customStyle={firstButton.customStyle}\n />\n </div>\n ) : null}\n {secondButton ? (\n <div className={secondButton.largeButton ? style.largeButton : style.button}>\n <Cta\n label={secondButton.label}\n onClick={secondButton.handleOnclick}\n data-name={`cm-popin-cta-${secondButton.type}`}\n aria-label={secondButton['aria-label']}\n type={secondButton.type}\n customStyle={secondButton.customStyle}\n />\n </div>\n ) : null}\n {thirdButton ? (\n <div className={thirdButton.largeButton ? style.largeButton : style.button}>\n <Cta\n label={thirdButton.label}\n onClick={thirdButton.handleOnclick}\n data-name={`cm-popin-cta-${thirdButton.type}`}\n aria-label={thirdButton['aria-label']}\n type={thirdButton.type}\n customStyle={thirdButton.customStyle}\n />\n </div>\n ) : null}\n </div>\n ) : null}\n </div>\n </div>\n );\n};\n\nCMPopin.propTypes = propTypes;\n\nexport default CMPopin;\n"],"mappings":";;;;;AACA;;AACA;;AASA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;AArBA;AAuBA,MAAMA,QAAQ,GAAG;EACfC,aAAa,eAAE,6BAAC,6CAAD;IAAU,SAAS,EAAEC,cAAA,CAAMC;EAA3B,EADA;EAEfC,UAAU,eACR;IAAK,SAAS,EAAEF,cAAA,CAAMG;EAAtB,gBACE,6BAAC,uCAAD;IAAe,SAAS,EAAEH,cAAA,CAAMI;EAAhC,EADF;AAHa,CAAjB;;AASA,MAAMC,OAAO,GAAGC,KAAK,IAAI;EACvB,MAAM;IACJC,OADI;IAEJC,IAAI,GAAG,OAFH;IAGJC,WAHI;IAIJC,YAJI;IAKJC,OALI;IAMJC,MANI;IAOJC,IAPI;IAQJC,kBARI;IASJC,eAT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ACE,KAAK,EAAEpF,WAAW,CAACqF,KADrB;IAEE,OAAO,EAAErF,WAAW,CAACsF,aAFvB;IAGE,aAAW,cAHb;IAIE,cAAYtF,WAAW,CAAC,YAAD,CAJzB;IAKE,IAAI,EAAEA,WAAW,CAACqD,IALpB;IAME,WAAW,EAAErD,WAAW,CAACuF;EAN3B,EADF,CADU,GAWR,IAZN,EAaGtF,YAAY,gBACX;IAAK,SAAS,EAAEA,YAAY,CAACkF,WAAb,GAA2B5F,cAAA,CAAM4F,WAAjC,GAA+C5F,cAAA,CAAM6F;EAArE,gBACE,6BAAC,mBAAD;IACE,KAAK,EAAEnF,YAAY,CAACoF,KADtB;IAEE,OAAO,EAAEpF,YAAY,CAACqF,aAFxB;IAGE,aAAY,gBAAerF,YAAY,CAACoD,IAAK,EAH/C;IAIE,cAAYpD,YAAY,CAAC,YAAD,CAJ1B;IAKE,IAAI,EAAEA,YAAY,CAACoD,IALrB;IAME,WAAW,EAAEpD,YAAY,CAACsF;EAN5B,EADF,CADW,GAWT,IAxBN,EAyBGhF,WAAW,gBACV;IAAK,SAAS,EAAEA,WAAW,CAAC4E,WAAZ,GAA0B5F,cAAA,CAAM4F,WAAhC,GAA8C5F,cAAA,CAAM6F;EAApE,gBACE,6BAAC,mBAAD;IACE,KAAK,EAAE7E,WAAW,CAAC8E,KADrB;IAEE,OAAO,EAAE9E,WAAW,CAAC+E,aAFvB;IAGE,aAAY,gBAAe/E,WAAW,CAAC8C,IAAK,EAH9C;IAIE,cAAY9C,WAAW,CAAC,YAAD,CAJzB;IAKE,IAAI,EAAEA,WAAW,CAAC8C,IALpB;IAME,WAAW,EAAE9C,WAAW,CAACgF;EAN3B,EADF,CADU,GAWR,IApCN,CADD,GAuCG,IAnFN,CALF,CADF;AA6FD,CArPD;;AAuPA3F,OAAO,CAAC4F,SAAR,2CAAoBA,cAApB;eAEe5F,O"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["IconType","lockedContent","style","lockIcon","fileZipped","filesListIconContainer","filesListIcon","CMPopin","props","content","mode","firstButton","secondButton","onClose","header","icon","backgroundImageUrl","descriptionText","thirdButton","cookieTitle","descriptionBtnTxt","listBtnSwicth","items","logo","AlertDiamond","WindowUpload","MoonRocket","CheckCircle1","LogoComponent","backgroundImageStyle","backgroundImage","backgroundSize","renderHeader","title","headerIcon","TopTitleIcon","headerContent","headerBackground","cookieHeader","cookieIconContainer","cookieIcon","getClassBtnSwitch","index","btnList","firstBtnSwitchContainer","length","lastBtnSwitchContainer","singleSwitchContainer","renderBtnSwitch","map","convert","cap","el","type","value","onChange","titlePosition","theme","details","requiredSelection","disabled","id","dataName","renderItems","list","isEmpty","itemsContainer","filesListContainer","wrapperPopinStyle","classNames","popinCookie","popinFilesList","popin","background","popinHeader","cookieTitleContainer","titleContainer","contentSection","message","__html","descriptionBtn","buttonContainer","largeButton","button","label","handleOnclick","customStyle","propTypes"],"sources":["../../../src/molecule/cm-popin/index.js"],"sourcesContent":["import React from 'react';\nimport {\n NovaSolidInterfaceFeedbackInterfaceAlertDiamond as AlertDiamond,\n NovaSolidApplicationsWindowUpload3 as WindowUpload,\n NovaLineSettingsCookie as Cookie,\n NovaSolidSpaceMoonRocket as MoonRocket,\n NovaCompositionCoorpacademyPadlock as LockIcon,\n NovaLineStatusCheckCircle1 as CheckCircle1,\n NovaSolidFilesBasicFileLines as FileLinesIcon\n} from '@coorpacademy/nova-icons';\nimport map from 'lodash/fp/map';\nimport isEmpty from 'lodash/fp/isEmpty';\nimport classNames from 'classnames';\nimport Cta from '../../atom/button-link';\nimport ButtonLinkIconOnly from '../../atom/button-link-icon-only';\nimport InputSwitch from '../../atom/input-switch';\nimport Title from '../../atom/title';\nimport CardsGrid from '../../organism/cards-grid';\nimport ListItems from '../../organism/list-items';\nimport style from './style.css';\nimport propTypes from './types';\n\nconst IconType = {\n lockedContent: <LockIcon className={style.lockIcon} />,\n fileZipped: (\n <div className={style.filesListIconContainer}>\n <FileLinesIcon className={style.filesListIcon} />\n </div>\n )\n};\n\nconst CMPopin = props => {\n const {\n content,\n mode = 'alert',\n firstButton,\n secondButton,\n onClose,\n header,\n icon,\n backgroundImageUrl,\n descriptionText,\n thirdButton,\n cookieTitle,\n descriptionBtnTxt,\n listBtnSwicth,\n items\n } = props;\n const logo = {\n AlertDiamond,\n WindowUpload,\n MoonRocket,\n CheckCircle1\n };\n const LogoComponent = logo[icon];\n\n const backgroundImageStyle = backgroundImageUrl\n ? {\n backgroundImage: `url(${backgroundImageUrl})`,\n backgroundSize: 'cover'\n }\n : null;\n\n const renderHeader = () => {\n if (header) {\n const {title, headerIcon, backgroundImage} = header;\n const TopTitleIcon = IconType[headerIcon];\n\n return (\n <>\n {title ? (\n <div className={style.headerContent}>\n {TopTitleIcon}\n <Title {...title} />\n </div>\n ) : null}\n {backgroundImage ? (\n <img className={style.headerBackground} src={backgroundImage} />\n ) : null}\n </>\n );\n }\n\n if (mode === 'cookie')\n return (\n <div className={style.cookieHeader}>\n <div className={style.cookieIconContainer}>\n <Cookie className={style.cookieIcon} />\n </div>\n <div className={style.cookieTitle}>{cookieTitle}</div>\n </div>\n );\n\n return null;\n };\n\n const getClassBtnSwitch = (index, btnList) => {\n switch (index) {\n case 0:\n return style.firstBtnSwitchContainer;\n case btnList.length - 1:\n return style.lastBtnSwitchContainer;\n default:\n return style.singleSwitchContainer;\n }\n };\n\n const renderBtnSwitch = () => {\n return map.convert({cap: false})((el, index) => {\n const {\n type,\n title,\n value,\n onChange,\n titlePosition,\n theme,\n details,\n requiredSelection,\n disabled,\n id,\n 'data-name': dataName\n } = el;\n return (\n <div key={index} className={getClassBtnSwitch(index, listBtnSwicth)}>\n <InputSwitch\n {...{\n type,\n title,\n value,\n onChange,\n titlePosition,\n theme,\n details,\n requiredSelection,\n disabled,\n id,\n 'data-name': dataName\n }}\n />\n </div>\n );\n })(listBtnSwicth);\n };\n\n const renderItems = () => {\n const {type, list} = items;\n if (isEmpty(list)) return null;\n\n if (type === 'content')\n return (\n <div className={style.itemsContainer} data-name={'cm-popin-cards'}>\n <CardsGrid {...list} />\n </div>\n );\n if (type === 'list')\n return (\n <div className={style.filesListContainer}>\n <ListItems {...list} />\n </div>\n );\n\n return null;\n };\n\n const wrapperPopinStyle = classNames(\n mode === 'cookie' && style.popinCookie,\n mode === 'list' && style.popinFilesList,\n style.popin\n );\n\n return (\n <div\n className={mode !== 'cookie' ? style.background : null}\n style={backgroundImageStyle}\n data-name={'cm-popin-container'}\n >\n <div className={wrapperPopinStyle}>\n <header className={style.popinHeader}>\n {renderHeader()}\n {onClose ? (\n <ButtonLinkIconOnly\n onClick={onClose}\n data-name={'close-icon'}\n aria-label={'close-icon'}\n size=\"small\"\n icon=\"close\"\n />\n ) : null}\n </header>\n {mode !== 'items' && mode !== 'list' ? (\n <div\n className={\n mode === 'cookie' || mode === 'information'\n ? style.cookieTitleContainer\n : style.titleContainer\n }\n >\n <div className={style.contentSection}>\n {LogoComponent ? <LogoComponent className={style.icon} /> : null}\n {content ? (\n <p\n className={mode === 'alert' ? style.content : style.message}\n data-name={'cm-popin-content'}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: content}}\n />\n ) : null}\n </div>\n {descriptionText ? (\n <p\n className={style.descriptionText}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: descriptionText}}\n />\n ) : null}\n </div>\n ) : null}\n {descriptionBtnTxt ? <div className={style.descriptionBtn}>{descriptionBtnTxt}</div> : null}\n {!isEmpty(items) ? renderItems() : null}\n {renderBtnSwitch()}\n {firstButton || secondButton || thirdButton ? (\n <div className={style.buttonContainer}>\n {firstButton ? (\n <div className={firstButton.largeButton ? style.largeButton : style.button}>\n <Cta\n label={firstButton.label}\n onClick={firstButton.handleOnclick}\n data-name={'cm-popin-cta'}\n aria-label={firstButton['aria-label']}\n type={firstButton.type}\n customStyle={firstButton.customStyle}\n />\n </div>\n ) : null}\n {secondButton ? (\n <div className={secondButton.largeButton ? style.largeButton : style.button}>\n <Cta\n label={secondButton.label}\n onClick={secondButton.handleOnclick}\n data-name={`cm-popin-cta-${secondButton.type}`}\n aria-label={secondButton['aria-label']}\n type={secondButton.type}\n customStyle={secondButton.customStyle}\n />\n </div>\n ) : null}\n {thirdButton ? (\n <div className={thirdButton.largeButton ? style.largeButton : style.button}>\n <Cta\n label={thirdButton.label}\n onClick={thirdButton.handleOnclick}\n data-name={`cm-popin-cta-${thirdButton.type}`}\n aria-label={thirdButton['aria-label']}\n type={thirdButton.type}\n customStyle={thirdButton.customStyle}\n />\n </div>\n ) : null}\n </div>\n ) : null}\n </div>\n </div>\n );\n};\n\nCMPopin.propTypes = propTypes;\n\nexport default CMPopin;\n"],"mappings":";;;;;AAAA;;AACA;;AASA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,MAAMA,QAAQ,GAAG;EACfC,aAAa,eAAE,6BAAC,6CAAD;IAAU,SAAS,EAAEC,cAAA,CAAMC;EAA3B,EADA;EAEfC,UAAU,eACR;IAAK,SAAS,EAAEF,cAAA,CAAMG;EAAtB,gBACE,6BAAC,uCAAD;IAAe,SAAS,EAAEH,cAAA,CAAMI;EAAhC,EADF;AAHa,CAAjB;;AASA,MAAMC,OAAO,GAAGC,KAAK,IAAI;EACvB,MAAM;IACJC,OADI;IAEJC,IAAI,GAAG,OAFH;IAGJC,WAHI;IAIJC,YAJI;IAKJC,OALI;IAMJC,MANI;IAOJC,IAPI;IAQJC,kBARI;IASJC,eATI;IAUJC,WAVI;IAWJC,WAXI;IAYJC,iBAZI;IAaJC,aAbI;IAcJC;EAdI,IAeFd,KAfJ;EAgBA,MAAMe,IAAI,GAAG;IACXC,YAAY,EAAZA,0DADW;IAEXC,YAAY,EAAZA,6CAFW;IAGXC,UAAU,EAAVA,mCAHW;IAIXC,YAAY,EAAZA;EAJW,CAAb;EAMA,MAAMC,aAAa,GAAGL,IAAI,CAACR,IAAD,CAA1B;EAEA,MAAMc,oBAAoB,GAAGb,kBAAkB,GAC3C;IACEc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D,CAJzB;IAKE,IAAI,EAAEA,WAAW,CAACmC,IALpB;IAME,WAAW,EAAEnC,WAAW,CAACoE;EAN3B,EADF,CADU,GAWR,IApCN,CADD,GAuCG,IAnFN,CALF,CADF;AA6FD,CAxOD;;AA0OA/E,OAAO,CAACgF,SAAR,2CAAoBA,cAApB;eAEehF,O"}
|
|
@@ -60,11 +60,6 @@
|
|
|
60
60
|
animation: popup 0.7s;
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
.popinItems {
|
|
64
|
-
padding: 0;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
|
|
68
63
|
.message {
|
|
69
64
|
display: flex;
|
|
70
65
|
flex-direction: column;
|
|
@@ -156,16 +151,6 @@
|
|
|
156
151
|
border-bottom: 1px solid cm_grey_100;
|
|
157
152
|
}
|
|
158
153
|
|
|
159
|
-
.popinItems .headerContent {
|
|
160
|
-
padding: 24px;
|
|
161
|
-
width: 612px;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
.popinItems .popinHeader button {
|
|
165
|
-
margin-top: 12px;
|
|
166
|
-
margin-right: 12px;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
154
|
|
|
170
155
|
.lockIcon {
|
|
171
156
|
height: 48px;
|
|
@@ -331,9 +316,6 @@ a {
|
|
|
331
316
|
max-height: 369px;
|
|
332
317
|
overflow-y: auto;
|
|
333
318
|
width: 100%;
|
|
334
|
-
border-top: 1px solid cm_grey_100;
|
|
335
|
-
border-bottom-left-radius: 16px;
|
|
336
|
-
border-bottom-right-radius: 16px;
|
|
337
319
|
}
|
|
338
320
|
|
|
339
321
|
/* ---------- FILES DETAILS ---------- */
|
|
@@ -399,10 +381,6 @@ a {
|
|
|
399
381
|
padding: 0px 0px 8px 0px
|
|
400
382
|
}
|
|
401
383
|
|
|
402
|
-
.lockIcon {
|
|
403
|
-
min-width: 48px;
|
|
404
|
-
}
|
|
405
|
-
|
|
406
384
|
.popinCookie .largeButton {
|
|
407
385
|
padding: 8px 0px 0px 0px;
|
|
408
386
|
}
|
|
@@ -439,10 +417,6 @@ a {
|
|
|
439
417
|
width: 100%;
|
|
440
418
|
}
|
|
441
419
|
|
|
442
|
-
.lockIcon {
|
|
443
|
-
min-width: 48px;
|
|
444
|
-
}
|
|
445
|
-
|
|
446
420
|
.titleContainer {
|
|
447
421
|
width: 100%;
|
|
448
422
|
margin: 0px 16px;
|
|
@@ -11,6 +11,7 @@ declare namespace TitleAndCheckBoxWrapper {
|
|
|
11
11
|
'data-name': PropTypes.Requireable<string>;
|
|
12
12
|
}>>;
|
|
13
13
|
const sectionTitle: PropTypes.Requireable<PropTypes.InferProps<{
|
|
14
|
+
removeMargin: PropTypes.Requireable<boolean>;
|
|
14
15
|
title: PropTypes.Requireable<string>;
|
|
15
16
|
subtitle: PropTypes.Requireable<string>;
|
|
16
17
|
type: PropTypes.Requireable<string>;
|
|
@@ -71,6 +72,51 @@ declare namespace TitleAndCheckBoxWrapper {
|
|
|
71
72
|
multiple: PropTypes.Requireable<boolean>;
|
|
72
73
|
}> | null | undefined)[]>;
|
|
73
74
|
'data-name': PropTypes.Requireable<string>;
|
|
75
|
+
}> | PropTypes.InferProps<{
|
|
76
|
+
childType: PropTypes.Requireable<string>;
|
|
77
|
+
name: PropTypes.Requireable<string>;
|
|
78
|
+
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
79
|
+
onReset: PropTypes.Requireable<(...args: any[]) => any>;
|
|
80
|
+
filesTypes: (props: any, propName: any, componentName: any) => Error | null;
|
|
81
|
+
error: PropTypes.Requireable<string>;
|
|
82
|
+
buttonAriaLabel: PropTypes.Requireable<string>;
|
|
83
|
+
errorButtonLabel: PropTypes.Requireable<string>;
|
|
84
|
+
labelLink: PropTypes.Requireable<string>;
|
|
85
|
+
hrefLink: PropTypes.Requireable<string>;
|
|
86
|
+
title: PropTypes.Requireable<string>;
|
|
87
|
+
description: PropTypes.Requireable<string>;
|
|
88
|
+
uploadLabel: PropTypes.Requireable<string>;
|
|
89
|
+
previewLabel: PropTypes.Requireable<string>;
|
|
90
|
+
previewContent: PropTypes.Requireable<PropTypes.InferProps<{
|
|
91
|
+
type: PropTypes.Requireable<string>;
|
|
92
|
+
src: PropTypes.Requireable<string>;
|
|
93
|
+
label: PropTypes.Requireable<string>;
|
|
94
|
+
}>>;
|
|
95
|
+
loading: PropTypes.Requireable<boolean>;
|
|
96
|
+
modified: PropTypes.Requireable<boolean>;
|
|
97
|
+
disabled: PropTypes.Requireable<boolean>;
|
|
98
|
+
children: PropTypes.Requireable<(...args: any[]) => any>;
|
|
99
|
+
pdfButtonLabel: PropTypes.Requireable<string>;
|
|
100
|
+
pdfButtonAriaLabel: PropTypes.Requireable<string>;
|
|
101
|
+
multiple: PropTypes.Requireable<boolean>;
|
|
102
|
+
}> | PropTypes.InferProps<{
|
|
103
|
+
childType: PropTypes.Requireable<string>;
|
|
104
|
+
title: PropTypes.Requireable<string>;
|
|
105
|
+
placeholder: PropTypes.Requireable<string>;
|
|
106
|
+
description: PropTypes.Requireable<string>;
|
|
107
|
+
hint: PropTypes.Requireable<string>;
|
|
108
|
+
options: PropTypes.Requireable<NonNullable<PropTypes.InferProps<{
|
|
109
|
+
selected: PropTypes.Validator<boolean>;
|
|
110
|
+
name: PropTypes.Validator<string>;
|
|
111
|
+
value: PropTypes.Requireable<string>;
|
|
112
|
+
}>>[]>;
|
|
113
|
+
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
114
|
+
onError: PropTypes.Requireable<(...args: any[]) => any>;
|
|
115
|
+
multiple: PropTypes.Requireable<boolean>;
|
|
116
|
+
modified: PropTypes.Requireable<boolean>;
|
|
117
|
+
disabled: PropTypes.Requireable<boolean>;
|
|
118
|
+
error: PropTypes.Requireable<string>;
|
|
119
|
+
theme: PropTypes.Requireable<string>;
|
|
74
120
|
}> | null | undefined>>;
|
|
75
121
|
}
|
|
76
122
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/title-and-checkbox-wrapper/index.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/title-and-checkbox-wrapper/index.js"],"names":[],"mappings":";AAiBA,kEAuBC"}
|
|
@@ -3,12 +3,18 @@
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports.default = void 0;
|
|
5
5
|
|
|
6
|
+
var _isUndefined2 = _interopRequireDefault(require("lodash/fp/isUndefined"));
|
|
7
|
+
|
|
6
8
|
var _react = _interopRequireDefault(require("react"));
|
|
7
9
|
|
|
8
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
11
|
|
|
12
|
+
var _inputFileDraggable = _interopRequireDefault(require("../../atom/input-file-draggable"));
|
|
13
|
+
|
|
10
14
|
var _inputTextWithTitle = _interopRequireDefault(require("../../atom/input-text-with-title"));
|
|
11
15
|
|
|
16
|
+
var _selectMultiple = _interopRequireDefault(require("../select-multiple"));
|
|
17
|
+
|
|
12
18
|
var _checkboxWithTitle = _interopRequireDefault(require("../../atom/checkbox-with-title"));
|
|
13
19
|
|
|
14
20
|
var _title = _interopRequireDefault(require("../../atom/title"));
|
|
@@ -23,7 +29,9 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
|
|
|
23
29
|
|
|
24
30
|
const CHILD = {
|
|
25
31
|
'input-text': _inputTextWithTitle.default,
|
|
26
|
-
'drag-and-drop-wrapper': _dragAndDropWrapper.default
|
|
32
|
+
'drag-and-drop-wrapper': _dragAndDropWrapper.default,
|
|
33
|
+
'image-upload': _inputFileDraggable.default,
|
|
34
|
+
'select-multiple': _selectMultiple.default
|
|
27
35
|
};
|
|
28
36
|
|
|
29
37
|
const TitleAndCheckBoxWrapper = props => {
|
|
@@ -38,17 +46,23 @@ const TitleAndCheckBoxWrapper = props => {
|
|
|
38
46
|
}, /*#__PURE__*/_react.default.createElement(_title.default, _extends({}, sectionTitle, {
|
|
39
47
|
type: 'form-group'
|
|
40
48
|
}))) : null, /*#__PURE__*/_react.default.createElement("div", {
|
|
41
|
-
className: checkboxWithTitle || sectionTitle ? _style.default.child : null
|
|
49
|
+
className: checkboxWithTitle || sectionTitle && (0, _isUndefined2.default)(sectionTitle.removeMargin) ? _style.default.child : null
|
|
42
50
|
}, /*#__PURE__*/_react.default.createElement(Child, child)));
|
|
43
51
|
};
|
|
44
52
|
|
|
45
53
|
TitleAndCheckBoxWrapper.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
46
54
|
checkboxWithTitle: _propTypes.default.shape(_checkboxWithTitle.default.propTypes),
|
|
47
|
-
sectionTitle: _propTypes.default.shape(_title.default.propTypes
|
|
55
|
+
sectionTitle: _propTypes.default.shape(_extends({}, _title.default.propTypes, {
|
|
56
|
+
removeMargin: _propTypes.default.bool
|
|
57
|
+
})),
|
|
48
58
|
child: _propTypes.default.oneOfType([_propTypes.default.shape(_extends({}, _inputTextWithTitle.default.propTypes, {
|
|
49
59
|
childType: _propTypes.default.oneOf(['input-text'])
|
|
50
60
|
})), _propTypes.default.shape(_extends({}, _dragAndDropWrapper.default.propTypes, {
|
|
51
61
|
childType: _propTypes.default.oneOf(['drag-and-drop-wrapper'])
|
|
62
|
+
})), _propTypes.default.shape(_extends({}, _inputFileDraggable.default.propTypes, {
|
|
63
|
+
childType: _propTypes.default.oneOf(['image-upload'])
|
|
64
|
+
})), _propTypes.default.shape(_extends({}, _selectMultiple.default.propTypes, {
|
|
65
|
+
childType: _propTypes.default.oneOf(['select-multiple'])
|
|
52
66
|
}))])
|
|
53
67
|
} : {};
|
|
54
68
|
var _default = TitleAndCheckBoxWrapper;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["CHILD","InputTextWithTitle","DragAndDropWrapper","TitleAndCheckBoxWrapper","props","checkboxWithTitle","child","sectionTitle","Child","childType","style","propTypes","PropTypes","shape","CheckboxWithTitle","Title","oneOfType","oneOf"],"sources":["../../../src/molecule/title-and-checkbox-wrapper/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport InputTextWithTitle from '../../atom/input-text-with-title';\nimport CheckboxWithTitle from '../../atom/checkbox-with-title';\nimport Title from '../../atom/title';\nimport DragAndDropWrapper from '../drag-and-drop-wrapper';\nimport style from './style.css';\n\nconst CHILD = {\n 'input-text': InputTextWithTitle,\n 'drag-and-drop-wrapper': DragAndDropWrapper\n};\nconst TitleAndCheckBoxWrapper = props => {\n const {checkboxWithTitle, child, sectionTitle} = props;\n\n const Child = CHILD[child.childType];\n return (\n <div>\n {checkboxWithTitle ? <CheckboxWithTitle {...checkboxWithTitle} /> : null}\n {sectionTitle ? (\n <div className={style.sectionTitle}>\n <Title {...sectionTitle} type={'form-group'} />\n </div>\n ) : null}\n <div
|
|
1
|
+
{"version":3,"file":"index.js","names":["CHILD","InputTextWithTitle","DragAndDropWrapper","InputFileDraggable","SelectMultiple","TitleAndCheckBoxWrapper","props","checkboxWithTitle","child","sectionTitle","Child","childType","style","removeMargin","propTypes","PropTypes","shape","CheckboxWithTitle","Title","bool","oneOfType","oneOf"],"sources":["../../../src/molecule/title-and-checkbox-wrapper/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {isUndefined} from 'lodash/fp';\nimport InputFileDraggable from '../../atom/input-file-draggable';\nimport InputTextWithTitle from '../../atom/input-text-with-title';\nimport SelectMultiple from '../select-multiple';\nimport CheckboxWithTitle from '../../atom/checkbox-with-title';\nimport Title from '../../atom/title';\nimport DragAndDropWrapper from '../drag-and-drop-wrapper';\nimport style from './style.css';\n\nconst CHILD = {\n 'input-text': InputTextWithTitle,\n 'drag-and-drop-wrapper': DragAndDropWrapper,\n 'image-upload': InputFileDraggable,\n 'select-multiple': SelectMultiple\n};\nconst TitleAndCheckBoxWrapper = props => {\n const {checkboxWithTitle, child, sectionTitle} = props;\n\n const Child = CHILD[child.childType];\n return (\n <div>\n {checkboxWithTitle ? <CheckboxWithTitle {...checkboxWithTitle} /> : null}\n {sectionTitle ? (\n <div className={style.sectionTitle}>\n <Title {...sectionTitle} type={'form-group'} />\n </div>\n ) : null}\n <div\n className={\n checkboxWithTitle || (sectionTitle && isUndefined(sectionTitle.removeMargin))\n ? style.child\n : null\n }\n >\n <Child {...child} />\n </div>\n </div>\n );\n};\n\nTitleAndCheckBoxWrapper.propTypes = {\n checkboxWithTitle: PropTypes.shape(CheckboxWithTitle.propTypes),\n sectionTitle: PropTypes.shape({...Title.propTypes, removeMargin: PropTypes.bool}),\n child: PropTypes.oneOfType([\n PropTypes.shape({\n ...InputTextWithTitle.propTypes,\n childType: PropTypes.oneOf(['input-text'])\n }),\n PropTypes.shape({\n ...DragAndDropWrapper.propTypes,\n childType: PropTypes.oneOf(['drag-and-drop-wrapper'])\n }),\n PropTypes.shape({\n ...InputFileDraggable.propTypes,\n childType: PropTypes.oneOf(['image-upload'])\n }),\n PropTypes.shape({\n ...SelectMultiple.propTypes,\n childType: PropTypes.oneOf(['select-multiple'])\n })\n ])\n};\nexport default TitleAndCheckBoxWrapper;\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;AAEA,MAAMA,KAAK,GAAG;EACZ,cAAcC,2BADF;EAEZ,yBAAyBC,2BAFb;EAGZ,gBAAgBC,2BAHJ;EAIZ,mBAAmBC;AAJP,CAAd;;AAMA,MAAMC,uBAAuB,GAAGC,KAAK,IAAI;EACvC,MAAM;IAACC,iBAAD;IAAoBC,KAApB;IAA2BC;EAA3B,IAA2CH,KAAjD;EAEA,MAAMI,KAAK,GAAGV,KAAK,CAACQ,KAAK,CAACG,SAAP,CAAnB;EACA,oBACE,0CACGJ,iBAAiB,gBAAG,6BAAC,0BAAD,EAAuBA,iBAAvB,CAAH,GAAkD,IADtE,EAEGE,YAAY,gBACX;IAAK,SAAS,EAAEG,cAAA,CAAMH;EAAtB,gBACE,6BAAC,cAAD,eAAWA,YAAX;IAAyB,IAAI,EAAE;EAA/B,GADF,CADW,GAIT,IANN,eAOE;IACE,SAAS,EACPF,iBAAiB,IAAKE,YAAY,IAAI,2BAAYA,YAAY,CAACI,YAAzB,CAAtC,GACID,cAAA,CAAMJ,KADV,GAEI;EAJR,gBAOE,6BAAC,KAAD,EAAWA,KAAX,CAPF,CAPF,CADF;AAmBD,CAvBD;;AAyBAH,uBAAuB,CAACS,SAAxB,2CAAoC;EAClCP,iBAAiB,EAAEQ,kBAAA,CAAUC,KAAV,CAAgBC,0BAAA,CAAkBH,SAAlC,CADe;EAElCL,YAAY,EAAEM,kBAAA,CAAUC,KAAV,cAAoBE,cAAA,CAAMJ,SAA1B;IAAqCD,YAAY,EAAEE,kBAAA,CAAUI;EAA7D,GAFoB;EAGlCX,KAAK,EAAEO,kBAAA,CAAUK,SAAV,CAAoB,CACzBL,kBAAA,CAAUC,KAAV,cACKf,2BAAA,CAAmBa,SADxB;IAEEH,SAAS,EAAEI,kBAAA,CAAUM,KAAV,CAAgB,CAAC,YAAD,CAAhB;EAFb,GADyB,EAKzBN,kBAAA,CAAUC,KAAV,cACKd,2BAAA,CAAmBY,SADxB;IAEEH,SAAS,EAAEI,kBAAA,CAAUM,KAAV,CAAgB,CAAC,uBAAD,CAAhB;EAFb,GALyB,EASzBN,kBAAA,CAAUC,KAAV,cACKb,2BAAA,CAAmBW,SADxB;IAEEH,SAAS,EAAEI,kBAAA,CAAUM,KAAV,CAAgB,CAAC,cAAD,CAAhB;EAFb,GATyB,EAazBN,kBAAA,CAAUC,KAAV,cACKZ,uBAAA,CAAeU,SADpB;IAEEH,SAAS,EAAEI,kBAAA,CAAUM,KAAV,CAAgB,CAAC,iBAAD,CAAhB;EAFb,GAbyB,CAApB;AAH2B,CAApC;eAsBehB,uB"}
|
|
@@ -14,6 +14,7 @@ declare namespace RewardsForm {
|
|
|
14
14
|
'data-name': PropTypes.Requireable<string>;
|
|
15
15
|
}>>;
|
|
16
16
|
sectionTitle: PropTypes.Requireable<PropTypes.InferProps<{
|
|
17
|
+
removeMargin: PropTypes.Requireable<boolean>;
|
|
17
18
|
title: PropTypes.Requireable<string>;
|
|
18
19
|
subtitle: PropTypes.Requireable<string>;
|
|
19
20
|
type: PropTypes.Requireable<string>;
|
|
@@ -74,6 +75,51 @@ declare namespace RewardsForm {
|
|
|
74
75
|
multiple: PropTypes.Requireable<boolean>;
|
|
75
76
|
}> | null | undefined)[]>;
|
|
76
77
|
'data-name': PropTypes.Requireable<string>;
|
|
78
|
+
}> | PropTypes.InferProps<{
|
|
79
|
+
childType: PropTypes.Requireable<string>;
|
|
80
|
+
name: PropTypes.Requireable<string>;
|
|
81
|
+
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
82
|
+
onReset: PropTypes.Requireable<(...args: any[]) => any>;
|
|
83
|
+
filesTypes: (props: any, propName: any, componentName: any) => Error | null;
|
|
84
|
+
error: PropTypes.Requireable<string>;
|
|
85
|
+
buttonAriaLabel: PropTypes.Requireable<string>;
|
|
86
|
+
errorButtonLabel: PropTypes.Requireable<string>;
|
|
87
|
+
labelLink: PropTypes.Requireable<string>;
|
|
88
|
+
hrefLink: PropTypes.Requireable<string>;
|
|
89
|
+
title: PropTypes.Requireable<string>;
|
|
90
|
+
description: PropTypes.Requireable<string>;
|
|
91
|
+
uploadLabel: PropTypes.Requireable<string>;
|
|
92
|
+
previewLabel: PropTypes.Requireable<string>;
|
|
93
|
+
previewContent: PropTypes.Requireable<PropTypes.InferProps<{
|
|
94
|
+
type: PropTypes.Requireable<string>;
|
|
95
|
+
src: PropTypes.Requireable<string>;
|
|
96
|
+
label: PropTypes.Requireable<string>;
|
|
97
|
+
}>>;
|
|
98
|
+
loading: PropTypes.Requireable<boolean>;
|
|
99
|
+
modified: PropTypes.Requireable<boolean>;
|
|
100
|
+
disabled: PropTypes.Requireable<boolean>;
|
|
101
|
+
children: PropTypes.Requireable<(...args: any[]) => any>;
|
|
102
|
+
pdfButtonLabel: PropTypes.Requireable<string>;
|
|
103
|
+
pdfButtonAriaLabel: PropTypes.Requireable<string>;
|
|
104
|
+
multiple: PropTypes.Requireable<boolean>;
|
|
105
|
+
}> | PropTypes.InferProps<{
|
|
106
|
+
childType: PropTypes.Requireable<string>;
|
|
107
|
+
title: PropTypes.Requireable<string>;
|
|
108
|
+
placeholder: PropTypes.Requireable<string>;
|
|
109
|
+
description: PropTypes.Requireable<string>;
|
|
110
|
+
hint: PropTypes.Requireable<string>;
|
|
111
|
+
options: PropTypes.Requireable<NonNullable<PropTypes.InferProps<{
|
|
112
|
+
selected: PropTypes.Validator<boolean>;
|
|
113
|
+
name: PropTypes.Validator<string>;
|
|
114
|
+
value: PropTypes.Requireable<string>;
|
|
115
|
+
}>>[]>;
|
|
116
|
+
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
117
|
+
onError: PropTypes.Requireable<(...args: any[]) => any>;
|
|
118
|
+
multiple: PropTypes.Requireable<boolean>;
|
|
119
|
+
modified: PropTypes.Requireable<boolean>;
|
|
120
|
+
disabled: PropTypes.Requireable<boolean>;
|
|
121
|
+
error: PropTypes.Requireable<string>;
|
|
122
|
+
theme: PropTypes.Requireable<string>;
|
|
77
123
|
}> | null | undefined>>;
|
|
78
124
|
}> | null | undefined)[]>;
|
|
79
125
|
}
|
|
@@ -4,39 +4,78 @@ declare const SelectOpponents: {
|
|
|
4
4
|
(props: SelectOpponentsProps): JSX.Element;
|
|
5
5
|
propTypes: {
|
|
6
6
|
items: import("prop-types").Requireable<(import("prop-types").InferProps<{
|
|
7
|
-
|
|
8
|
-
title: import("prop-types").
|
|
9
|
-
title: import("prop-types").Requireable<string>;
|
|
10
|
-
subtitle: import("prop-types").Requireable<string>;
|
|
11
|
-
type: import("prop-types").Requireable<string>;
|
|
12
|
-
'data-name': import("prop-types").Requireable<string>;
|
|
13
|
-
titleSize: import("prop-types").Requireable<string>;
|
|
14
|
-
subtitleSize: import("prop-types").Requireable<string>;
|
|
15
|
-
}>>>;
|
|
7
|
+
checkboxWithTitle: import("prop-types").Requireable<import("prop-types").InferProps<{
|
|
8
|
+
title: import("prop-types").Requireable<string>;
|
|
16
9
|
name: import("prop-types").Requireable<string>;
|
|
17
10
|
checked: import("prop-types").Requireable<boolean>;
|
|
18
|
-
onChange: import("prop-types").
|
|
11
|
+
onChange: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
19
12
|
'aria-label': import("prop-types").Requireable<string>;
|
|
20
13
|
'data-name': import("prop-types").Requireable<string>;
|
|
21
14
|
}>>;
|
|
22
|
-
|
|
15
|
+
sectionTitle: import("prop-types").Requireable<import("prop-types").InferProps<{
|
|
16
|
+
removeMargin: import("prop-types").Requireable<boolean>;
|
|
23
17
|
title: import("prop-types").Requireable<string>;
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
18
|
+
subtitle: import("prop-types").Requireable<string>;
|
|
19
|
+
type: import("prop-types").Requireable<string>;
|
|
20
|
+
'data-name': import("prop-types").Requireable<string>;
|
|
21
|
+
titleSize: import("prop-types").Requireable<string>;
|
|
22
|
+
subtitleSize: import("prop-types").Requireable<string>;
|
|
23
|
+
}>>;
|
|
24
|
+
child: import("prop-types").Requireable<NonNullable<import("prop-types").InferProps<{
|
|
25
|
+
childType: import("prop-types").Requireable<string>;
|
|
26
|
+
inputText: import("prop-types").Requireable<import("prop-types").InferProps<{
|
|
27
|
+
theme: import("prop-types").Requireable<string>;
|
|
28
|
+
size: import("prop-types").Requireable<string>;
|
|
29
|
+
autoFocus: import("prop-types").Requireable<boolean>;
|
|
30
|
+
title: import("prop-types").Requireable<string>;
|
|
31
|
+
placeholder: import("prop-types").Requireable<string>;
|
|
32
|
+
defaultValue: import("prop-types").Requireable<string>;
|
|
33
|
+
disabled: import("prop-types").Requireable<boolean>;
|
|
30
34
|
value: import("prop-types").Requireable<string>;
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
35
|
+
hint: import("prop-types").Requireable<string>;
|
|
36
|
+
error: import("prop-types").Requireable<string>;
|
|
37
|
+
onChange: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
38
|
+
description: import("prop-types").Requireable<string>;
|
|
39
|
+
modified: import("prop-types").Requireable<boolean>;
|
|
40
|
+
valid: import("prop-types").Requireable<boolean>;
|
|
41
|
+
'aria-label': import("prop-types").Requireable<string>;
|
|
42
|
+
'data-name': import("prop-types").Requireable<string>;
|
|
43
|
+
}>>;
|
|
44
|
+
title: import("prop-types").Requireable<string>;
|
|
45
|
+
'aria-label': import("prop-types").Requireable<string>;
|
|
46
|
+
'data-name': import("prop-types").Requireable<string>;
|
|
47
|
+
}> | import("prop-types").InferProps<{
|
|
48
|
+
childType: import("prop-types").Requireable<string>;
|
|
49
|
+
list: import("prop-types").Requireable<(import("prop-types").InferProps<{
|
|
50
|
+
name: import("prop-types").Requireable<string>;
|
|
51
|
+
onChange: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
52
|
+
onReset: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
53
|
+
filesTypes: (props: any, propName: any, componentName: any) => Error | null;
|
|
54
|
+
error: import("prop-types").Requireable<string>;
|
|
55
|
+
buttonAriaLabel: import("prop-types").Requireable<string>;
|
|
56
|
+
errorButtonLabel: import("prop-types").Requireable<string>;
|
|
57
|
+
labelLink: import("prop-types").Requireable<string>;
|
|
58
|
+
hrefLink: import("prop-types").Requireable<string>;
|
|
59
|
+
title: import("prop-types").Requireable<string>;
|
|
60
|
+
description: import("prop-types").Requireable<string>;
|
|
61
|
+
uploadLabel: import("prop-types").Requireable<string>;
|
|
62
|
+
previewLabel: import("prop-types").Requireable<string>;
|
|
63
|
+
previewContent: import("prop-types").Requireable<import("prop-types").InferProps<{
|
|
64
|
+
type: import("prop-types").Requireable<string>;
|
|
65
|
+
src: import("prop-types").Requireable<string>;
|
|
66
|
+
label: import("prop-types").Requireable<string>;
|
|
67
|
+
}>>;
|
|
68
|
+
loading: import("prop-types").Requireable<boolean>;
|
|
69
|
+
modified: import("prop-types").Requireable<boolean>;
|
|
70
|
+
disabled: import("prop-types").Requireable<boolean>;
|
|
71
|
+
children: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
72
|
+
pdfButtonLabel: import("prop-types").Requireable<string>;
|
|
73
|
+
pdfButtonAriaLabel: import("prop-types").Requireable<string>;
|
|
74
|
+
multiple: import("prop-types").Requireable<boolean>;
|
|
75
|
+
}> | null | undefined)[]>;
|
|
76
|
+
'data-name': import("prop-types").Requireable<string>;
|
|
39
77
|
}> | import("prop-types").InferProps<{
|
|
78
|
+
childType: import("prop-types").Requireable<string>;
|
|
40
79
|
name: import("prop-types").Requireable<string>;
|
|
41
80
|
onChange: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
42
81
|
onReset: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
@@ -62,8 +101,25 @@ declare const SelectOpponents: {
|
|
|
62
101
|
pdfButtonLabel: import("prop-types").Requireable<string>;
|
|
63
102
|
pdfButtonAriaLabel: import("prop-types").Requireable<string>;
|
|
64
103
|
multiple: import("prop-types").Requireable<boolean>;
|
|
104
|
+
}> | import("prop-types").InferProps<{
|
|
105
|
+
childType: import("prop-types").Requireable<string>;
|
|
106
|
+
title: import("prop-types").Requireable<string>;
|
|
107
|
+
placeholder: import("prop-types").Requireable<string>;
|
|
108
|
+
description: import("prop-types").Requireable<string>;
|
|
109
|
+
hint: import("prop-types").Requireable<string>;
|
|
110
|
+
options: import("prop-types").Requireable<NonNullable<import("prop-types").InferProps<{
|
|
111
|
+
selected: import("prop-types").Validator<boolean>;
|
|
112
|
+
name: import("prop-types").Validator<string>;
|
|
113
|
+
value: import("prop-types").Requireable<string>;
|
|
114
|
+
}>>[]>;
|
|
115
|
+
onChange: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
116
|
+
onError: import("prop-types").Requireable<(...args: any[]) => any>;
|
|
117
|
+
multiple: import("prop-types").Requireable<boolean>;
|
|
118
|
+
modified: import("prop-types").Requireable<boolean>;
|
|
119
|
+
disabled: import("prop-types").Requireable<boolean>;
|
|
120
|
+
error: import("prop-types").Requireable<string>;
|
|
121
|
+
theme: import("prop-types").Requireable<string>;
|
|
65
122
|
}> | null | undefined>>;
|
|
66
|
-
childType: import("prop-types").Requireable<string>;
|
|
67
123
|
}> | null | undefined)[]>;
|
|
68
124
|
};
|
|
69
125
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/select-opponents/index.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/select-opponents/index.tsx"],"names":[],"mappings":";AAGA,OAAkB,EAAC,oBAAoB,EAA+B,MAAM,SAAS,CAAC;AAMtF,QAAA,MAAM,eAAe;YAAW,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgBnD,CAAC;AAIF,eAAe,eAAe,CAAC"}
|
|
@@ -7,7 +7,7 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
7
7
|
|
|
8
8
|
var _map = _interopRequireDefault(require("lodash/fp/map"));
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _titleAndCheckboxWrapper = _interopRequireDefault(require("../../molecule/title-and-checkbox-wrapper"));
|
|
11
11
|
|
|
12
12
|
var _types = _interopRequireDefault(require("./types"));
|
|
13
13
|
|
|
@@ -29,8 +29,8 @@ const SelectOpponents = props => {
|
|
|
29
29
|
}, mapWithIndex((item, key) => {
|
|
30
30
|
return /*#__PURE__*/_react.default.createElement("li", {
|
|
31
31
|
key: `select-opponents-item-${key}`,
|
|
32
|
-
className: _style.default.item
|
|
33
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
32
|
+
className: item.child.childType === 'image-upload' ? _style.default.itemImageUpload : _style.default.item
|
|
33
|
+
}, /*#__PURE__*/_react.default.createElement(_titleAndCheckboxWrapper.default, item));
|
|
34
34
|
}, items));
|
|
35
35
|
};
|
|
36
36
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["mapWithIndex","map","convert","cap","SelectOpponents","props","items","style","container","item","key","propTypes"],"sources":["../../../src/organism/select-opponents/index.tsx"],"sourcesContent":["import React from 'react';\nimport map from 'lodash/fp/map';\nimport
|
|
1
|
+
{"version":3,"file":"index.js","names":["mapWithIndex","map","convert","cap","SelectOpponents","props","items","style","container","item","key","child","childType","itemImageUpload","propTypes"],"sources":["../../../src/organism/select-opponents/index.tsx"],"sourcesContent":["import React from 'react';\nimport map from 'lodash/fp/map';\nimport TitleAndCheckBoxWrapper from '../../molecule/title-and-checkbox-wrapper';\nimport propTypes, {SelectOpponentsProps, TitleAndCheckBoxWrapperProps} from './types';\nimport style from './style.css';\n\n// @ts-expect-error (need to get the index)\nconst mapWithIndex = map.convert({cap: false});\n\nconst SelectOpponents = (props: SelectOpponentsProps) => {\n const {items} = props;\n return (\n <ul className={style.container}>\n {mapWithIndex((item: TitleAndCheckBoxWrapperProps, key: number) => {\n return (\n <li\n key={`select-opponents-item-${key}`}\n className={item.child.childType === 'image-upload' ? style.itemImageUpload : style.item}\n >\n <TitleAndCheckBoxWrapper {...item} />\n </li>\n );\n }, items)}\n </ul>\n );\n};\n\nSelectOpponents.propTypes = propTypes;\n\nexport default SelectOpponents;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;;;AAEA;AACA,MAAMA,YAAY,GAAGC,YAAA,CAAIC,OAAJ,CAAY;EAACC,GAAG,EAAE;AAAN,CAAZ,CAArB;;AAEA,MAAMC,eAAe,GAAIC,KAAD,IAAiC;EACvD,MAAM;IAACC;EAAD,IAAUD,KAAhB;EACA,oBACE;IAAI,SAAS,EAAEE,cAAA,CAAMC;EAArB,GACGR,YAAY,CAAC,CAACS,IAAD,EAAqCC,GAArC,KAAqD;IACjE,oBACE;MACE,GAAG,EAAG,yBAAwBA,GAAI,EADpC;MAEE,SAAS,EAAED,IAAI,CAACE,KAAL,CAAWC,SAAX,KAAyB,cAAzB,GAA0CL,cAAA,CAAMM,eAAhD,GAAkEN,cAAA,CAAME;IAFrF,gBAIE,6BAAC,gCAAD,EAA6BA,IAA7B,CAJF,CADF;EAQD,CATY,EASVH,KATU,CADf,CADF;AAcD,CAhBD;;AAkBAF,eAAe,CAACU,SAAhB,2CAA4BA,cAA5B;eAEeV,e"}
|