@coorpacademy/components 10.24.4 → 10.24.5
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/provider/index.d.ts +1 -1
- package/es/atom/provider/web-context.js +1 -1
- package/es/atom/provider/web-context.js.map +1 -1
- package/es/hoc/animation-scheduler/index.js +3 -3
- package/es/hoc/animation-scheduler/index.js.map +1 -1
- package/es/hoc/swapper/index.js +1 -1
- package/es/hoc/swapper/index.js.map +1 -1
- package/es/hoc/transition/index.js +1 -1
- package/es/hoc/transition/index.js.map +1 -1
- package/es/molecule/add-to-my-list/index.js +1 -1
- package/es/molecule/add-to-my-list/index.js.map +1 -1
- package/es/molecule/answer/prop-types.d.ts +6 -6
- package/es/molecule/card/index.js +1 -1
- package/es/molecule/card/index.js.map +1 -1
- package/es/molecule/cm-popin/index.js.map +1 -1
- package/es/molecule/dashboard/battle-request-list/index.js +1 -1
- package/es/molecule/dashboard/battle-request-list/index.js.map +1 -1
- package/es/molecule/dashboard/news-list/index.js +1 -1
- package/es/molecule/dashboard/news-list/index.js.map +1 -1
- package/es/molecule/dashboard/review-banner/index.js +1 -1
- package/es/molecule/dashboard/review-banner/index.js.map +1 -1
- package/es/molecule/dashboard/start-battle/index.js +1 -1
- package/es/molecule/dashboard/start-battle/index.js.map +1 -1
- package/es/molecule/share/index.js +1 -1
- package/es/molecule/share/index.js.map +1 -1
- package/es/organism/review-slide/prop-types.d.ts +8 -8
- package/es/organism/review-stacked-slides/index.js +6 -3
- package/es/organism/review-stacked-slides/index.js.map +1 -1
- package/es/organism/review-stacked-slides/index.native.js +6 -3
- package/es/organism/review-stacked-slides/index.native.js.map +1 -1
- package/es/organism/review-stacked-slides/prop-types.d.ts +22 -22
- package/es/template/app-player/popin-end/summary.css +1 -1
- package/es/template/app-player/popin-end/summary.js +4 -3
- package/es/template/app-player/popin-end/summary.js.map +1 -1
- package/es/template/app-review/player/prop-types.d.ts +22 -22
- package/es/template/app-review/template-context.js +1 -1
- package/es/template/app-review/template-context.js.map +1 -1
- package/es/template/common/dashboard/index.js +1 -1
- package/es/template/common/dashboard/index.js.map +1 -1
- package/lib/atom/provider/index.d.ts +1 -1
- package/lib/atom/provider/web-context.js +1 -1
- package/lib/atom/provider/web-context.js.map +1 -1
- package/lib/hoc/animation-scheduler/index.js +3 -3
- package/lib/hoc/animation-scheduler/index.js.map +1 -1
- package/lib/hoc/swapper/index.js +1 -1
- package/lib/hoc/swapper/index.js.map +1 -1
- package/lib/hoc/transition/index.js +1 -1
- package/lib/hoc/transition/index.js.map +1 -1
- package/lib/molecule/add-to-my-list/index.js +1 -1
- package/lib/molecule/add-to-my-list/index.js.map +1 -1
- package/lib/molecule/answer/prop-types.d.ts +6 -6
- package/lib/molecule/card/index.js +1 -1
- package/lib/molecule/card/index.js.map +1 -1
- package/lib/molecule/cm-popin/index.js.map +1 -1
- package/lib/molecule/dashboard/battle-request-list/index.js +1 -1
- package/lib/molecule/dashboard/battle-request-list/index.js.map +1 -1
- package/lib/molecule/dashboard/news-list/index.js +1 -1
- package/lib/molecule/dashboard/news-list/index.js.map +1 -1
- package/lib/molecule/dashboard/review-banner/index.js +1 -1
- package/lib/molecule/dashboard/review-banner/index.js.map +1 -1
- package/lib/molecule/dashboard/start-battle/index.js +1 -1
- package/lib/molecule/dashboard/start-battle/index.js.map +1 -1
- package/lib/molecule/share/index.js +1 -1
- package/lib/molecule/share/index.js.map +1 -1
- package/lib/organism/review-slide/prop-types.d.ts +8 -8
- package/lib/organism/review-stacked-slides/index.js +6 -3
- package/lib/organism/review-stacked-slides/index.js.map +1 -1
- package/lib/organism/review-stacked-slides/index.native.js +6 -3
- package/lib/organism/review-stacked-slides/index.native.js.map +1 -1
- package/lib/organism/review-stacked-slides/prop-types.d.ts +22 -22
- package/lib/template/app-player/popin-end/summary.css +1 -1
- package/lib/template/app-player/popin-end/summary.js +4 -3
- package/lib/template/app-player/popin-end/summary.js.map +1 -1
- package/lib/template/app-review/player/prop-types.d.ts +22 -22
- package/lib/template/app-review/template-context.js +1 -1
- package/lib/template/app-review/template-context.js.map +1 -1
- package/lib/template/common/dashboard/index.js +1 -1
- package/lib/template/common/dashboard/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["CMPopin","props","content","mode","firstButton","secondButton","onClose","header","icon","backgroundImageUrl","descriptionText","thirdButton","cookieTitle","descriptionBtnTxt","listBtnSwicth","logo","AlertDiamond","WindowUpload","MoonRocket","LogoComponent","backgroundImageStyle","backgroundImage","backgroundSize","renderHeader","style","headerBackground","cookieHeader","cookieIconContainer","cookieIcon","getClassBtnSwitch","index","btnList","firstBtnSwitchContainer","length","lastBtnSwitchContainer","singleSwitchContainer","renderBtnSwitch","map","convert","cap","el","type","title","value","onChange","titlePosition","theme","details","requiredSelection","disabled","id","dataName","background","popinCookie","popin","popinHeader","titleContainer","contentSection","message","__html","descriptionBtn","buttonContainer","largeButton","button","label","handleOnclick","customStyle","propTypes","PropTypes","string","oneOf","shape","func","bool","Cta","arrayOf","InputSwitch"],"sources":["../../../src/molecule/cm-popin/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {\n NovaSolidInterfaceFeedbackInterfaceAlertDiamond as AlertDiamond,\n NovaSolidApplicationsWindowUpload3 as WindowUpload,\n NovaLineSettingsCookie as Cookie,\n NovaSolidSpaceMoonRocket as MoonRocket\n} from '@coorpacademy/nova-icons';\nimport map from 'lodash/fp/map';\nimport Cta from '../../atom/button-link';\nimport ButtonLinkIconOnly from '../../atom/button-link-icon-only';\nimport InputSwitch from '../../atom/input-switch';\nimport style from './style.css';\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 } = props;\n\n const logo = {\n AlertDiamond,\n WindowUpload,\n MoonRocket\n };\n const LogoComponent = logo[icon];\n\n const backgroundImageStyle = backgroundImageUrl\n ? {\n backgroundImage: `url(${backgroundImageUrl})`,\n backgroundSize: 'cover'\n }\n : null;\n const renderHeader = () => {\n if (header) return <img className={style.headerBackground} src={header} />;\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 return null;\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 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 return (\n <div\n className={mode !== 'cookie' ? style.background : null}\n style={backgroundImageStyle}\n data-name={'cm-popin-container'}\n >\n <div className={mode === 'cookie' ? style.popinCookie : style.popin}>\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 <div className={style.titleContainer}>\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 {descriptionBtnTxt ? <div className={style.descriptionBtn}>{descriptionBtnTxt}</div> : null}\n {renderBtnSwitch()}\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 />\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 </div>\n </div>\n );\n};\n\nCMPopin.propTypes = {\n content: PropTypes.string,\n mode: PropTypes.oneOf(['alert', 'information', 'cookie']),\n header: PropTypes.string,\n firstButton: PropTypes.shape({\n label: PropTypes.string,\n handleOnclick: PropTypes.func,\n 'aria-label': PropTypes.string,\n largeButton: PropTypes.bool,\n type: PropTypes.oneOf(['dangerous', 'primary', 'secondary', 'tertiary']),\n customStyle: Cta.propTypes.customStyle\n }),\n secondButton: PropTypes.shape({\n label: PropTypes.string,\n handleOnclick: PropTypes.func,\n type: PropTypes.oneOf(['dangerous', 'primary', 'secondary']),\n 'aria-label': PropTypes.string,\n largeButton: PropTypes.bool,\n customStyle: Cta.propTypes.customStyle\n }),\n thirdButton: PropTypes.shape({\n label: PropTypes.string,\n handleOnclick: PropTypes.func,\n type: PropTypes.oneOf(['dangerous', 'primary', 'secondary']),\n 'aria-label': PropTypes.string,\n largeButton: PropTypes.bool,\n customStyle: Cta.propTypes.customStyle\n }),\n onClose: PropTypes.func,\n icon: PropTypes.string,\n backgroundImageUrl: PropTypes.string,\n descriptionText: PropTypes.string,\n cookieTitle: PropTypes.string,\n descriptionBtnTxt: PropTypes.string,\n listBtnSwicth: PropTypes.arrayOf(PropTypes.shape(InputSwitch.propTypes))\n};\n\nexport default CMPopin;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AAMA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,MAAMA,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;EAbI,IAcFb,KAdJ;EAgBA,MAAMc,IAAI,GAAG;IACXC,YAAY,EAAZA,0DADW;IAEXC,YAAY,EAAZA,6CAFW;IAGXC,UAAU,EAAVA;EAHW,CAAb;EAKA,MAAMC,aAAa,GAAGJ,IAAI,CAACP,IAAD,CAA1B;EAEA,MAAMY,oBAAoB,GAAGX,kBAAkB,GAC3C;IACEY,eAAe,EAAG,OAAMZ,kBAAmB,GAD7C;IAEEa,cAAc,EAAE;EAFlB,CAD2C,GAK3C,IALJ;;EAMA,MAAMC,YAAY,GAAG,MAAM;IACzB,IAAIhB,MAAJ,EAAY,oBAAO;MAAK,SAAS,EAAEiB,cAAA,CAAMC,gBAAtB;MAAwC,GAAG,EAAElB;IAA7C,EAAP;IACZ,IAAIJ,IAAI,KAAK,QAAb,EACE,oBACE;MAAK,SAAS,EAAEqB,cAAA,CAAME;IAAtB,gBACE;MAAK,SAAS,EAAEF,cAAA,CAAMG;IAAtB,gBACE,6BAAC,iCAAD;MAAQ,SAAS,EAAEH,cAAA,CAAMI;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AI,EAAE4D,kBAAA,CAAUC,MA7BE;EA8BlB5D,kBAAkB,EAAE2D,kBAAA,CAAUC,MA9BZ;EA+BlB3D,eAAe,EAAE0D,kBAAA,CAAUC,MA/BT;EAgClBzD,WAAW,EAAEwD,kBAAA,CAAUC,MAhCL;EAiClBxD,iBAAiB,EAAEuD,kBAAA,CAAUC,MAjCX;EAkClBvD,aAAa,EAAEsD,kBAAA,CAAUO,OAAV,CAAkBP,kBAAA,CAAUG,KAAV,CAAgBK,oBAAA,CAAYT,SAA5B,CAAlB;AAlCG,CAApB;eAqCenE,O"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["CMPopin","props","content","mode","firstButton","secondButton","onClose","header","icon","backgroundImageUrl","descriptionText","thirdButton","cookieTitle","descriptionBtnTxt","listBtnSwicth","logo","AlertDiamond","WindowUpload","MoonRocket","LogoComponent","backgroundImageStyle","backgroundImage","backgroundSize","renderHeader","style","headerBackground","cookieHeader","cookieIconContainer","cookieIcon","getClassBtnSwitch","index","btnList","firstBtnSwitchContainer","length","lastBtnSwitchContainer","singleSwitchContainer","renderBtnSwitch","map","convert","cap","el","type","title","value","onChange","titlePosition","theme","details","requiredSelection","disabled","id","dataName","background","popinCookie","popin","popinHeader","titleContainer","contentSection","message","__html","descriptionBtn","buttonContainer","largeButton","button","label","handleOnclick","customStyle","propTypes","PropTypes","string","oneOf","shape","func","bool","Cta","arrayOf","InputSwitch"],"sources":["../../../src/molecule/cm-popin/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {\n NovaSolidInterfaceFeedbackInterfaceAlertDiamond as AlertDiamond,\n NovaSolidApplicationsWindowUpload3 as WindowUpload,\n NovaLineSettingsCookie as Cookie,\n NovaSolidSpaceMoonRocket as MoonRocket\n} from '@coorpacademy/nova-icons';\nimport map from 'lodash/fp/map';\nimport Cta from '../../atom/button-link';\nimport ButtonLinkIconOnly from '../../atom/button-link-icon-only';\nimport InputSwitch from '../../atom/input-switch';\nimport style from './style.css';\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 } = props;\n\n const logo = {\n AlertDiamond,\n WindowUpload,\n MoonRocket\n };\n const LogoComponent = logo[icon];\n\n const backgroundImageStyle = backgroundImageUrl\n ? {\n backgroundImage: `url(${backgroundImageUrl})`,\n backgroundSize: 'cover'\n }\n : null;\n const renderHeader = () => {\n if (header) return <img className={style.headerBackground} src={header} />;\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 return null;\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 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 return (\n <div\n className={mode !== 'cookie' ? style.background : null}\n style={backgroundImageStyle}\n data-name={'cm-popin-container'}\n >\n <div className={mode === 'cookie' ? style.popinCookie : style.popin}>\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 <div className={style.titleContainer}>\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 {descriptionBtnTxt ? <div className={style.descriptionBtn}>{descriptionBtnTxt}</div> : null}\n {renderBtnSwitch()}\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 />\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 </div>\n </div>\n );\n};\n\nCMPopin.propTypes = {\n content: PropTypes.string,\n mode: PropTypes.oneOf(['alert', 'information', 'cookie']),\n header: PropTypes.string,\n firstButton: PropTypes.shape({\n label: PropTypes.string,\n handleOnclick: PropTypes.func,\n 'aria-label': PropTypes.string,\n largeButton: PropTypes.bool,\n type: PropTypes.oneOf(['dangerous', 'primary', 'secondary', 'tertiary']),\n customStyle: Cta.propTypes.customStyle\n }),\n secondButton: PropTypes.shape({\n label: PropTypes.string,\n handleOnclick: PropTypes.func,\n type: PropTypes.oneOf(['dangerous', 'primary', 'secondary']),\n 'aria-label': PropTypes.string,\n largeButton: PropTypes.bool,\n customStyle: Cta.propTypes.customStyle\n }),\n thirdButton: PropTypes.shape({\n label: PropTypes.string,\n handleOnclick: PropTypes.func,\n type: PropTypes.oneOf(['dangerous', 'primary', 'secondary']),\n 'aria-label': PropTypes.string,\n largeButton: PropTypes.bool,\n customStyle: Cta.propTypes.customStyle\n }),\n onClose: PropTypes.func,\n icon: PropTypes.string,\n backgroundImageUrl: PropTypes.string,\n descriptionText: PropTypes.string,\n cookieTitle: PropTypes.string,\n descriptionBtnTxt: PropTypes.string,\n listBtnSwicth: PropTypes.arrayOf(PropTypes.shape(InputSwitch.propTypes))\n};\n\nexport default CMPopin;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AAMA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,MAAMA,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;EAbI,IAcFb,KAdJ;EAgBA,MAAMc,IAAI,GAAG;IACXC,YAAY,EAAZA,0DADW;IAEXC,YAAY,EAAZA,6CAFW;IAGXC,UAAU,EAAVA;EAHW,CAAb;EAKA,MAAMC,aAAa,GAAGJ,IAAI,CAACP,IAAD,CAA1B;EAEA,MAAMY,oBAAoB,GAAGX,kBAAkB,GAC3C;IACEY,eAAe,EAAG,OAAMZ,kBAAmB,GAD7C;IAEEa,cAAc,EAAE;EAFlB,CAD2C,GAK3C,IALJ;;EAMA,MAAMC,YAAY,GAAG,MAAM;IACzB,IAAIhB,MAAJ,EAAY,oBAAO;MAAK,SAAS,EAAEiB,cAAA,CAAMC,gBAAtB;MAAwC,GAAG,EAAEl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,kBAAA,CAAUC,MAJG;IAK3BP,WAAW,EAAEM,kBAAA,CAAUK,IALI;IAM3BP,WAAW,EAAEQ,mBAAA,CAAIP,SAAJ,CAAcD;EANA,CAAhB,CApBK;EA4BlB5D,OAAO,EAAE8D,kBAAA,CAAUI,IA5BD;EA6BlBhE,IAAI,EAAE4D,kBAAA,CAAUC,MA7BE;EA8BlB5D,kBAAkB,EAAE2D,kBAAA,CAAUC,MA9BZ;EA+BlB3D,eAAe,EAAE0D,kBAAA,CAAUC,MA/BT;EAgClBzD,WAAW,EAAEwD,kBAAA,CAAUC,MAhCL;EAiClBxD,iBAAiB,EAAEuD,kBAAA,CAAUC,MAjCX;EAkClBvD,aAAa,EAAEsD,kBAAA,CAAUO,OAAV,CAAkBP,kBAAA,CAAUG,KAAV,CAAgBK,oBAAA,CAAYT,SAA5B,CAAlB;AAlCG,CAApB;eAqCenE,O"}
|
|
@@ -13,7 +13,7 @@ var _style = _interopRequireDefault(require("./style.css"));
|
|
|
13
13
|
|
|
14
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
15
|
|
|
16
|
-
const BattleRequestList =
|
|
16
|
+
const BattleRequestList = _react.default.memo(function BattleRequestList(props) {
|
|
17
17
|
const {
|
|
18
18
|
requests
|
|
19
19
|
} = props;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["BattleRequestList","React","memo","props","requests","cards","map","request","key","style","card","list","propTypes","PropTypes","arrayOf","shape","BattleRequest"],"sources":["../../../../src/molecule/dashboard/battle-request-list/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport BattleRequest from '../../battle-request';\nimport style from './style.css';\n\nconst BattleRequestList = React.memo(function BattleRequestList(props) {\n const {requests} = props;\n\n const cards = requests.map((request, key) => {\n return (\n <div className={style.card} key={key}>\n <BattleRequest {...request} />\n </div>\n );\n });\n\n return (\n <div className={style.list} data-name=\"battle-request-list\">\n {cards}\n </div>\n );\n});\n\nBattleRequestList.propTypes = {\n requests: PropTypes.arrayOf(PropTypes.shape(BattleRequest.propTypes))\n};\n\nexport default BattleRequestList;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;;;AAEA,MAAMA,iBAAiB,
|
|
1
|
+
{"version":3,"file":"index.js","names":["BattleRequestList","React","memo","props","requests","cards","map","request","key","style","card","list","propTypes","PropTypes","arrayOf","shape","BattleRequest"],"sources":["../../../../src/molecule/dashboard/battle-request-list/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport BattleRequest from '../../battle-request';\nimport style from './style.css';\n\nconst BattleRequestList = React.memo(function BattleRequestList(props) {\n const {requests} = props;\n\n const cards = requests.map((request, key) => {\n return (\n <div className={style.card} key={key}>\n <BattleRequest {...request} />\n </div>\n );\n });\n\n return (\n <div className={style.list} data-name=\"battle-request-list\">\n {cards}\n </div>\n );\n});\n\nBattleRequestList.propTypes = {\n requests: PropTypes.arrayOf(PropTypes.shape(BattleRequest.propTypes))\n};\n\nexport default BattleRequestList;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;;;AAEA,MAAMA,iBAAiB,GAAGC,cAAA,CAAMC,IAAN,CAAW,SAASF,iBAAT,CAA2BG,KAA3B,EAAkC;EACrE,MAAM;IAACC;EAAD,IAAaD,KAAnB;EAEA,MAAME,KAAK,GAAGD,QAAQ,CAACE,GAAT,CAAa,CAACC,OAAD,EAAUC,GAAV,KAAkB;IAC3C,oBACE;MAAK,SAAS,EAAEC,cAAA,CAAMC,IAAtB;MAA4B,GAAG,EAAEF;IAAjC,gBACE,6BAAC,sBAAD,EAAmBD,OAAnB,CADF,CADF;EAKD,CANa,CAAd;EAQA,oBACE;IAAK,SAAS,EAAEE,cAAA,CAAME,IAAtB;IAA4B,aAAU;EAAtC,GACGN,KADH,CADF;AAKD,CAhByB,CAA1B;;AAkBAL,iBAAiB,CAACY,SAAlB,2CAA8B;EAC5BR,QAAQ,EAAES,kBAAA,CAAUC,OAAV,CAAkBD,kBAAA,CAAUE,KAAV,CAAgBC,sBAAA,CAAcJ,SAA9B,CAAlB;AADkB,CAA9B;eAIeZ,iB"}
|
|
@@ -15,7 +15,7 @@ var _style = _interopRequireDefault(require("./style.css"));
|
|
|
15
15
|
|
|
16
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
17
|
|
|
18
|
-
const NewsList =
|
|
18
|
+
const NewsList = _react.default.memo(function NewsList(props) {
|
|
19
19
|
const {
|
|
20
20
|
title,
|
|
21
21
|
news,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["NewsList","React","memo","props","title","news","more","loading","loadingView","style","loader","moreView","onClick","label","cardsView","map","nws","key","card","wrapper","list","propTypes","PropTypes","string","arrayOf","shape","News","func","bool"],"sources":["../../../../src/molecule/dashboard/news-list/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport News from '../../news';\nimport Loader from '../../../atom/loader';\nimport style from './style.css';\n\nconst NewsList = React.memo(function NewsList(props) {\n const {title, news, more, loading = false} = props;\n\n const loadingView = (\n <div className={style.loader}>\n <Loader />\n </div>\n );\n\n const moreView = more ? (\n // eslint-disable-next-line react/jsx-handler-names\n <div className={style.more} onClick={more.onClick}>\n {more.label}\n </div>\n ) : null;\n\n const cardsView = news.map((nws, key) => {\n return (\n <div className={style.card} key={key}>\n <News {...nws} />\n </div>\n );\n });\n\n return (\n <div className={style.wrapper} data-name=\"news-list\">\n <div className={style.list}>\n <div className={style.title}>{title}</div>\n {cardsView}\n {loading ? loadingView : moreView}\n </div>\n </div>\n );\n});\n\nNewsList.propTypes = {\n title: PropTypes.string,\n news: PropTypes.arrayOf(PropTypes.shape(News.propTypes)),\n more: PropTypes.shape({\n label: PropTypes.string,\n onClick: PropTypes.func\n }),\n loading: PropTypes.bool\n};\n\nexport default NewsList;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,MAAMA,QAAQ,
|
|
1
|
+
{"version":3,"file":"index.js","names":["NewsList","React","memo","props","title","news","more","loading","loadingView","style","loader","moreView","onClick","label","cardsView","map","nws","key","card","wrapper","list","propTypes","PropTypes","string","arrayOf","shape","News","func","bool"],"sources":["../../../../src/molecule/dashboard/news-list/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport News from '../../news';\nimport Loader from '../../../atom/loader';\nimport style from './style.css';\n\nconst NewsList = React.memo(function NewsList(props) {\n const {title, news, more, loading = false} = props;\n\n const loadingView = (\n <div className={style.loader}>\n <Loader />\n </div>\n );\n\n const moreView = more ? (\n // eslint-disable-next-line react/jsx-handler-names\n <div className={style.more} onClick={more.onClick}>\n {more.label}\n </div>\n ) : null;\n\n const cardsView = news.map((nws, key) => {\n return (\n <div className={style.card} key={key}>\n <News {...nws} />\n </div>\n );\n });\n\n return (\n <div className={style.wrapper} data-name=\"news-list\">\n <div className={style.list}>\n <div className={style.title}>{title}</div>\n {cardsView}\n {loading ? loadingView : moreView}\n </div>\n </div>\n );\n});\n\nNewsList.propTypes = {\n title: PropTypes.string,\n news: PropTypes.arrayOf(PropTypes.shape(News.propTypes)),\n more: PropTypes.shape({\n label: PropTypes.string,\n onClick: PropTypes.func\n }),\n loading: PropTypes.bool\n};\n\nexport default NewsList;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,MAAMA,QAAQ,GAAGC,cAAA,CAAMC,IAAN,CAAW,SAASF,QAAT,CAAkBG,KAAlB,EAAyB;EACnD,MAAM;IAACC,KAAD;IAAQC,IAAR;IAAcC,IAAd;IAAoBC,OAAO,GAAG;EAA9B,IAAuCJ,KAA7C;;EAEA,MAAMK,WAAW,gBACf;IAAK,SAAS,EAAEC,cAAA,CAAMC;EAAtB,gBACE,6BAAC,eAAD,OADF,CADF;;EAMA,MAAMC,QAAQ,GAAGL,IAAI;EAAA;EACnB;EACA;IAAK,SAAS,EAAEG,cAAA,CAAMH,IAAtB;IAA4B,OAAO,EAAEA,IAAI,CAACM;EAA1C,GACGN,IAAI,CAACO,KADR,CAFmB,GAKjB,IALJ;EAOA,MAAMC,SAAS,GAAGT,IAAI,CAACU,GAAL,CAAS,CAACC,GAAD,EAAMC,GAAN,KAAc;IACvC,oBACE;MAAK,SAAS,EAAER,cAAA,CAAMS,IAAtB;MAA4B,GAAG,EAAED;IAAjC,gBACE,6BAAC,aAAD,EAAUD,GAAV,CADF,CADF;EAKD,CANiB,CAAlB;EAQA,oBACE;IAAK,SAAS,EAAEP,cAAA,CAAMU,OAAtB;IAA+B,aAAU;EAAzC,gBACE;IAAK,SAAS,EAAEV,cAAA,CAAMW;EAAtB,gBACE;IAAK,SAAS,EAAEX,cAAA,CAAML;EAAtB,GAA8BA,KAA9B,CADF,EAEGU,SAFH,EAGGP,OAAO,GAAGC,WAAH,GAAiBG,QAH3B,CADF,CADF;AASD,CAjCgB,CAAjB;;AAmCAX,QAAQ,CAACqB,SAAT,2CAAqB;EACnBjB,KAAK,EAAEkB,kBAAA,CAAUC,MADE;EAEnBlB,IAAI,EAAEiB,kBAAA,CAAUE,OAAV,CAAkBF,kBAAA,CAAUG,KAAV,CAAgBC,aAAA,CAAKL,SAArB,CAAlB,CAFa;EAGnBf,IAAI,EAAEgB,kBAAA,CAAUG,KAAV,CAAgB;IACpBZ,KAAK,EAAES,kBAAA,CAAUC,MADG;IAEpBX,OAAO,EAAEU,kBAAA,CAAUK;EAFC,CAAhB,CAHa;EAOnBpB,OAAO,EAAEe,kBAAA,CAAUM;AAPA,CAArB;eAUe5B,Q"}
|
|
@@ -15,7 +15,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
15
15
|
|
|
16
16
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
17
17
|
|
|
18
|
-
const ReviewBanner =
|
|
18
|
+
const ReviewBanner = _react.default.memo(function ReviewBanner(props) {
|
|
19
19
|
const {
|
|
20
20
|
title,
|
|
21
21
|
subtitle,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["ReviewBanner","React","memo","props","title","subtitle","cta","buttonProps","type","style","root","container","banner","left","image","middle","right","propTypes","PropTypes","string","shape","onClick","func","label"],"sources":["../../../../src/molecule/dashboard/review-banner/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport ButtonLink from '../../../atom/button-link';\nimport style from './style.css';\n\nconst ReviewBanner = React.memo(function ReviewBanner(props) {\n const {title, subtitle, cta} = props;\n\n const buttonProps = {\n ...cta,\n type: 'primary'\n };\n\n return (\n <div className={style.root} data-name=\"start-review-banner\">\n <div className={style.container}>\n <div className={style.banner}>\n <div className={style.left} role=\"img\" aria-label=\"Left image container\">\n <img\n className={style.image}\n src=\"https://static.coorpacademy.com/site/book.png\"\n alt=\"Book image\"\n />\n </div>\n <div className={style.middle}>\n <span className={style.title} data-name=\"review-banner-title\" aria-label=\"{title}\">\n {title}\n </span>\n <span\n className={style.subtitle}\n data-name=\"review-banner-subtitle\"\n aria-label=\"{subtitle}\"\n >\n {subtitle}\n </span>\n <ButtonLink {...buttonProps} className={style.cta} />\n </div>\n <div className={style.right} role=\"img\" aria-label=\"Rigth image container\">\n <img\n className={style.image}\n src=\"https://static.coorpacademy.com/site/dumbell.png\"\n alt=\"Dumbbell image\"\n />\n </div>\n </div>\n </div>\n </div>\n );\n});\n\nReviewBanner.propTypes = {\n title: PropTypes.string,\n subtitle: PropTypes.string,\n cta: PropTypes.shape({\n onClick: PropTypes.func,\n label: PropTypes.string\n })\n};\n\nexport default ReviewBanner;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;;;;;AAEA,MAAMA,YAAY,
|
|
1
|
+
{"version":3,"file":"index.js","names":["ReviewBanner","React","memo","props","title","subtitle","cta","buttonProps","type","style","root","container","banner","left","image","middle","right","propTypes","PropTypes","string","shape","onClick","func","label"],"sources":["../../../../src/molecule/dashboard/review-banner/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport ButtonLink from '../../../atom/button-link';\nimport style from './style.css';\n\nconst ReviewBanner = React.memo(function ReviewBanner(props) {\n const {title, subtitle, cta} = props;\n\n const buttonProps = {\n ...cta,\n type: 'primary'\n };\n\n return (\n <div className={style.root} data-name=\"start-review-banner\">\n <div className={style.container}>\n <div className={style.banner}>\n <div className={style.left} role=\"img\" aria-label=\"Left image container\">\n <img\n className={style.image}\n src=\"https://static.coorpacademy.com/site/book.png\"\n alt=\"Book image\"\n />\n </div>\n <div className={style.middle}>\n <span className={style.title} data-name=\"review-banner-title\" aria-label=\"{title}\">\n {title}\n </span>\n <span\n className={style.subtitle}\n data-name=\"review-banner-subtitle\"\n aria-label=\"{subtitle}\"\n >\n {subtitle}\n </span>\n <ButtonLink {...buttonProps} className={style.cta} />\n </div>\n <div className={style.right} role=\"img\" aria-label=\"Rigth image container\">\n <img\n className={style.image}\n src=\"https://static.coorpacademy.com/site/dumbell.png\"\n alt=\"Dumbbell image\"\n />\n </div>\n </div>\n </div>\n </div>\n );\n});\n\nReviewBanner.propTypes = {\n title: PropTypes.string,\n subtitle: PropTypes.string,\n cta: PropTypes.shape({\n onClick: PropTypes.func,\n label: PropTypes.string\n })\n};\n\nexport default ReviewBanner;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;;;;;AAEA,MAAMA,YAAY,GAAGC,cAAA,CAAMC,IAAN,CAAW,SAASF,YAAT,CAAsBG,KAAtB,EAA6B;EAC3D,MAAM;IAACC,KAAD;IAAQC,QAAR;IAAkBC;EAAlB,IAAyBH,KAA/B;;EAEA,MAAMI,WAAW,gBACZD,GADY;IAEfE,IAAI,EAAE;EAFS,EAAjB;;EAKA,oBACE;IAAK,SAAS,EAAEC,cAAA,CAAMC,IAAtB;IAA4B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
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
19
|
|
|
20
|
-
const StartBattle =
|
|
20
|
+
const StartBattle = _react.default.memo(function StartBattle(props) {
|
|
21
21
|
const {
|
|
22
22
|
startBattleText,
|
|
23
23
|
becomeAChampionText,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["StartBattle","React","memo","props","startBattleText","becomeAChampionText","challengeText","onClick","href","style","root","container","wrapper","start","leftFlashes","bigFlashLeft","smallFlashLeft","middle","becomeText","smallFlashLeftMobile","smallFlashRightMobile","button","rightFlashes","bigFlashRight","smallFlashRight","contextTypes","skin","Provider","childContextTypes","propTypes","PropTypes","string","func"],"sources":["../../../../src/molecule/dashboard/start-battle/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {\n NovaCompositionCoorpacademyBigFlashRight as FlashRight,\n NovaCompositionCoorpacademyBigFlashLeft as FlashLeft\n} from '@coorpacademy/nova-icons';\nimport Provider from '../../../atom/provider';\nimport Link from '../../../atom/link';\nimport style from './style.css';\n\nconst StartBattle = React.memo(function StartBattle(props) {\n const {startBattleText, becomeAChampionText, challengeText, onClick, href} = props;\n\n return (\n <div className={style.root} data-name=\"start-battle\">\n <div className={style.container}>\n <div className={style.wrapper}>\n <div className={style.start}>\n <div className={style.leftFlashes}>\n <FlashLeft className={style.bigFlashLeft} />\n <FlashLeft className={style.smallFlashLeft} />\n </div>\n <div className={style.middle}>\n <div className={style.becomeText}>\n <FlashLeft className={style.smallFlashLeftMobile} />\n {becomeAChampionText}\n <FlashRight className={style.smallFlashRightMobile} />\n </div>\n <div className={style.challengeText}>{challengeText}</div>\n <Link className={style.button} onClick={onClick} href={href}>\n {startBattleText}\n </Link>\n </div>\n <div className={style.rightFlashes}>\n <FlashRight className={style.bigFlashRight} />\n <FlashRight className={style.smallFlashRight} />\n </div>\n </div>\n </div>\n </div>\n </div>\n );\n});\n\nStartBattle.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nStartBattle.propTypes = {\n startBattleText: PropTypes.string,\n becomeAChampionText: PropTypes.string,\n challengeText: PropTypes.string,\n onClick: PropTypes.func,\n href: PropTypes.string\n};\n\nexport default StartBattle;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AAIA;;AACA;;AACA;;;;AAEA,MAAMA,WAAW,
|
|
1
|
+
{"version":3,"file":"index.js","names":["StartBattle","React","memo","props","startBattleText","becomeAChampionText","challengeText","onClick","href","style","root","container","wrapper","start","leftFlashes","bigFlashLeft","smallFlashLeft","middle","becomeText","smallFlashLeftMobile","smallFlashRightMobile","button","rightFlashes","bigFlashRight","smallFlashRight","contextTypes","skin","Provider","childContextTypes","propTypes","PropTypes","string","func"],"sources":["../../../../src/molecule/dashboard/start-battle/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {\n NovaCompositionCoorpacademyBigFlashRight as FlashRight,\n NovaCompositionCoorpacademyBigFlashLeft as FlashLeft\n} from '@coorpacademy/nova-icons';\nimport Provider from '../../../atom/provider';\nimport Link from '../../../atom/link';\nimport style from './style.css';\n\nconst StartBattle = React.memo(function StartBattle(props) {\n const {startBattleText, becomeAChampionText, challengeText, onClick, href} = props;\n\n return (\n <div className={style.root} data-name=\"start-battle\">\n <div className={style.container}>\n <div className={style.wrapper}>\n <div className={style.start}>\n <div className={style.leftFlashes}>\n <FlashLeft className={style.bigFlashLeft} />\n <FlashLeft className={style.smallFlashLeft} />\n </div>\n <div className={style.middle}>\n <div className={style.becomeText}>\n <FlashLeft className={style.smallFlashLeftMobile} />\n {becomeAChampionText}\n <FlashRight className={style.smallFlashRightMobile} />\n </div>\n <div className={style.challengeText}>{challengeText}</div>\n <Link className={style.button} onClick={onClick} href={href}>\n {startBattleText}\n </Link>\n </div>\n <div className={style.rightFlashes}>\n <FlashRight className={style.bigFlashRight} />\n <FlashRight className={style.smallFlashRight} />\n </div>\n </div>\n </div>\n </div>\n </div>\n );\n});\n\nStartBattle.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nStartBattle.propTypes = {\n startBattleText: PropTypes.string,\n becomeAChampionText: PropTypes.string,\n challengeText: PropTypes.string,\n onClick: PropTypes.func,\n href: PropTypes.string\n};\n\nexport default StartBattle;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AAIA;;AACA;;AACA;;;;AAEA,MAAMA,WAAW,GAAGC,cAAA,CAAMC,IAAN,CAAW,SAASF,WAAT,CAAqBG,KAArB,EAA4B;EACzD,MAAM;IAACC,eAAD;IAAkBC,mBAAlB;IAAuCC,aAAvC;IAAsDC,OAAtD;IAA+DC;EAA/D,IAAuEL,KAA7E;EAEA,oBACE;IAAK,SAAS,EAAEM,cAAA,CAAMC,IAAtB;IAA4B,aAAU;EAAtC,gBACE;IAAK,SAAS,EAAED,cAAA,CAAME;EAAtB,gBACE;IAAK,SAAS,EAAEF,cAAA,CAAMG;EAAtB,gBACE;IAAK,SAAS,EAAEH,cAAA,CAAMI;EAAtB,gBACE;IAAK,SAAS,EAAEJ,cAAA,CAAMK;EAAtB,gBACE,6BAAC,kDAAD;IAAW,SAAS,EAAEL,cAAA,CAAMM;EAA5B,EADF,eAEE,6BAAC,kDAAD;IAAW,SAAS,EAAEN,cAAA,CAAMO;EAA5B,EAFF,CADF,eAKE;IAAK,SAAS,EAAEP,cAAA,CAAMQ;EAAtB,gBACE;IAAK,SAAS,EAAER,cAAA,CAAMS;EAAtB,gBACE,6BAAC,kDAAD;IAAW,SAAS,EAAET,cAAA,CAAMU;EAA5B,EADF,EAEGd,mBAFH,eAGE,6BAAC,mDAAD;IAAY,SAAS,EAAEI,cAAA,CAAMW;EAA7B,EAHF,CADF,eAME;IAAK,SAAS,EAAEX,cAAA,CAAMH;EAAtB,GAAsCA,aAAtC,CANF,eAOE,6BAAC,aAAD;IAAM,SAAS,EAAEG,cAAA,CAAMY,MAAvB;IAA+B,OAAO,EAAEd,OAAxC;IAAiD,IAAI,EAAEC;EAAvD,GACGJ,eADH,CAPF,CALF,eAgBE;IAAK,SAAS,EAAEK,cAAA,CAAMa;EAAtB,gBACE,6BAAC,mDAAD;IAAY,SAAS,EAAEb,cAAA,CAAMc;EAA7B,EADF,eAEE,6BAAC,mDAAD;IAAY,SAAS,EAAEd,cAAA,CAAMe;EAA7B,EAFF,CAhBF,CADF,CADF,CADF,CADF;AA6BD,CAhCmB,CAApB;;AAkCAxB,WAAW,CAACyB,YAAZ,GAA2B;EACzBC,IAAI,EAAEC,iBAAA,CAASC,iBAAT,CAA2BF;AADR,CAA3B;AAIA1B,WAAW,CAAC6B,SAAZ,2CAAwB;EACtBzB,eAAe,EAAE0B,kBAAA,CAAUC,MADL;EAEtB1B,mBAAmB,EAAEyB,kBAAA,CAAUC,MAFT;EAGtBzB,aAAa,EAAEwB,kBAAA,CAAUC,MAHH;EAItBxB,OAAO,EAAEuB,kBAAA,CAAUE,IAJG;EAKtBxB,IAAI,EAAEsB,kBAAA,CAAUC;AALM,CAAxB;eAQe/B,W"}
|
|
@@ -55,7 +55,7 @@ const copyTextViaExecCommand = text => {
|
|
|
55
55
|
return status;
|
|
56
56
|
};
|
|
57
57
|
|
|
58
|
-
const StatusContext =
|
|
58
|
+
const StatusContext = _react.default.createContext(SHARE_STATUS.IDLE);
|
|
59
59
|
|
|
60
60
|
const ShareStatusProvider = ({
|
|
61
61
|
children
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["SHARE_STATUS","IDLE","ERROR","SUCCESS","copyTextViaExecCommand","text","textarea","document","createElement","style","border","padding","visibility","position","setAttribute","value","body","appendChild","status","select","setSelectionRange","length","execCommand","error","removeChild","StatusContext","React","createContext","ShareStatusProvider","children","setStatus","useState","useEffect","timeoutId","DURATION","setTimeout","clearTimeout","useMemo","ShareFeedback","successWording","errorWording","useContext","classnames","styles","feedback","errorFeedback","checkIcon","Share","wording","onClick","useCallback","browserSupportsClipboardWriteText","navigator","clipboard","writeText","copyStatus","container","cta","wrapper","shareIcon","propTypes","PropTypes","node","string"],"sources":["../../../src/molecule/share/index.js"],"sourcesContent":["import React, {useState, useMemo, useCallback, useContext, useEffect} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {\n NovaCompositionCoorpacademyCheck as CheckIcon,\n NovaCompositionCoorpacademyShare as ShareIcon,\n NovaCompositionCoorpacademyAttention as AttentionIcon\n} from '@coorpacademy/nova-icons';\nimport Link from '../../atom/link';\nimport styles from './style.css';\n\nconst SHARE_STATUS = {\n IDLE: 'IDLE',\n ERROR: 'ERROR',\n SUCCESS: 'SUCCESS'\n};\n\nconst copyTextViaExecCommand = text => {\n const textarea = document.createElement('textarea');\n\n textarea.style.border = '0';\n textarea.style.padding = '0';\n textarea.style.visibility = 'hidden';\n textarea.style.position = 'absolute';\n textarea.setAttribute('readonly', '');\n textarea.value = text;\n\n // Element.append is not supported on IE11 :/\n // eslint-disable-next-line unicorn/prefer-node-append\n document.body.appendChild(textarea);\n let status = SHARE_STATUS.IDLE;\n\n try {\n textarea.select();\n textarea.setSelectionRange(0, textarea.value.length);\n document.execCommand('copy');\n status = SHARE_STATUS.SUCCESS;\n } catch (error) {\n status = SHARE_STATUS.ERROR;\n }\n\n // Element.remove is not supported on IE11 :/\n // eslint-disable-next-line unicorn/prefer-node-remove\n document.body.removeChild(textarea);\n\n return status;\n};\n\nconst StatusContext = React.createContext(SHARE_STATUS.IDLE);\n\nexport const ShareStatusProvider = ({children}) => {\n const [status, setStatus] = useState(SHARE_STATUS.IDLE);\n useEffect(() => {\n let timeoutId;\n const DURATION = 3000;\n if (status !== SHARE_STATUS.IDLE) {\n timeoutId = setTimeout(() => setStatus(SHARE_STATUS.IDLE), DURATION);\n }\n return () => clearTimeout(timeoutId);\n }, [status]);\n\n const value = useMemo(() => [status, setStatus], [status]);\n\n return <StatusContext.Provider value={value}>{children}</StatusContext.Provider>;\n};\n\nexport const ShareFeedback = ({successWording, errorWording}) => {\n const [status] = useContext(StatusContext);\n if (status === SHARE_STATUS.IDLE) return null;\n\n return (\n <div\n className={classnames(styles.feedback, status === SHARE_STATUS.ERROR && styles.errorFeedback)}\n >\n {status === SHARE_STATUS.SUCCESS ? (\n <CheckIcon className={styles.checkIcon} width={13} height={13} />\n ) : (\n <AttentionIcon className={styles.checkIcon} width={13} height={13} />\n )}\n <p>{status === SHARE_STATUS.SUCCESS ? successWording : errorWording}</p>\n </div>\n );\n};\n\nconst Share = ({style, text, wording}) => {\n const [, setStatus] = useContext(StatusContext);\n const onClick = useCallback(async () => {\n const browserSupportsClipboardWriteText =\n 'clipboard' in navigator && 'writeText' in navigator.clipboard;\n if (browserSupportsClipboardWriteText) {\n try {\n await navigator.clipboard.writeText(text);\n setStatus(SHARE_STATUS.SUCCESS);\n } catch (error) {\n setStatus(SHARE_STATUS.ERROR);\n }\n return;\n } else {\n const copyStatus = copyTextViaExecCommand(text);\n setStatus(copyStatus);\n }\n return;\n }, [setStatus, text]);\n\n return (\n <div className={(styles.container, style)}>\n <Link onClick={onClick} className={styles.cta} data-name={'share-button'}>\n <div className={styles.wrapper}>\n <ShareIcon className={styles.shareIcon} width={18} height={18} />\n <p>{wording}</p>\n </div>\n </Link>\n </div>\n );\n};\n\nShareStatusProvider.propTypes = {\n children: PropTypes.node\n};\n\nShareFeedback.propTypes = {\n successWording: PropTypes.string,\n errorWording: PropTypes.string\n};\n\nShare.propTypes = {\n style: PropTypes.string,\n text: PropTypes.string,\n wording: PropTypes.string\n};\n\nexport default Share;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AAKA;;AACA;;;;;;;;AAEA,MAAMA,YAAY,GAAG;EACnBC,IAAI,EAAE,MADa;EAEnBC,KAAK,EAAE,OAFY;EAGnBC,OAAO,EAAE;AAHU,CAArB;;AAMA,MAAMC,sBAAsB,GAAGC,IAAI,IAAI;EACrC,MAAMC,QAAQ,GAAGC,QAAQ,CAACC,aAAT,CAAuB,UAAvB,CAAjB;EAEAF,QAAQ,CAACG,KAAT,CAAeC,MAAf,GAAwB,GAAxB;EACAJ,QAAQ,CAACG,KAAT,CAAeE,OAAf,GAAyB,GAAzB;EACAL,QAAQ,CAACG,KAAT,CAAeG,UAAf,GAA4B,QAA5B;EACAN,QAAQ,CAACG,KAAT,CAAeI,QAAf,GAA0B,UAA1B;EACAP,QAAQ,CAACQ,YAAT,CAAsB,UAAtB,EAAkC,EAAlC;EACAR,QAAQ,CAACS,KAAT,GAAiBV,IAAjB,CARqC,CAUrC;EACA;;EACAE,QAAQ,CAACS,IAAT,CAAcC,WAAd,CAA0BX,QAA1B;EACA,IAAIY,MAAM,GAAGlB,YAAY,CAACC,IAA1B;;EAEA,IAAI;IACFK,QAAQ,CAACa,MAAT;IACAb,QAAQ,CAACc,iBAAT,CAA2B,CAA3B,EAA8Bd,QAAQ,CAACS,KAAT,CAAeM,MAA7C;IACAd,QAAQ,CAACe,WAAT,CAAqB,MAArB;IACAJ,MAAM,GAAGlB,YAAY,CAACG,OAAtB;EACD,CALD,CAKE,OAAOoB,KAAP,EAAc;IACdL,MAAM,GAAGlB,YAAY,CAACE,KAAtB;EACD,CAtBoC,CAwBrC;EACA;;;EACAK,QAAQ,CAACS,IAAT,CAAcQ,WAAd,CAA0BlB,QAA1B;EAEA,OAAOY,MAAP;AACD,CA7BD;;AA+BA,MAAMO,aAAa,
|
|
1
|
+
{"version":3,"file":"index.js","names":["SHARE_STATUS","IDLE","ERROR","SUCCESS","copyTextViaExecCommand","text","textarea","document","createElement","style","border","padding","visibility","position","setAttribute","value","body","appendChild","status","select","setSelectionRange","length","execCommand","error","removeChild","StatusContext","React","createContext","ShareStatusProvider","children","setStatus","useState","useEffect","timeoutId","DURATION","setTimeout","clearTimeout","useMemo","ShareFeedback","successWording","errorWording","useContext","classnames","styles","feedback","errorFeedback","checkIcon","Share","wording","onClick","useCallback","browserSupportsClipboardWriteText","navigator","clipboard","writeText","copyStatus","container","cta","wrapper","shareIcon","propTypes","PropTypes","node","string"],"sources":["../../../src/molecule/share/index.js"],"sourcesContent":["import React, {useState, useMemo, useCallback, useContext, useEffect} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {\n NovaCompositionCoorpacademyCheck as CheckIcon,\n NovaCompositionCoorpacademyShare as ShareIcon,\n NovaCompositionCoorpacademyAttention as AttentionIcon\n} from '@coorpacademy/nova-icons';\nimport Link from '../../atom/link';\nimport styles from './style.css';\n\nconst SHARE_STATUS = {\n IDLE: 'IDLE',\n ERROR: 'ERROR',\n SUCCESS: 'SUCCESS'\n};\n\nconst copyTextViaExecCommand = text => {\n const textarea = document.createElement('textarea');\n\n textarea.style.border = '0';\n textarea.style.padding = '0';\n textarea.style.visibility = 'hidden';\n textarea.style.position = 'absolute';\n textarea.setAttribute('readonly', '');\n textarea.value = text;\n\n // Element.append is not supported on IE11 :/\n // eslint-disable-next-line unicorn/prefer-node-append\n document.body.appendChild(textarea);\n let status = SHARE_STATUS.IDLE;\n\n try {\n textarea.select();\n textarea.setSelectionRange(0, textarea.value.length);\n document.execCommand('copy');\n status = SHARE_STATUS.SUCCESS;\n } catch (error) {\n status = SHARE_STATUS.ERROR;\n }\n\n // Element.remove is not supported on IE11 :/\n // eslint-disable-next-line unicorn/prefer-node-remove\n document.body.removeChild(textarea);\n\n return status;\n};\n\nconst StatusContext = React.createContext(SHARE_STATUS.IDLE);\n\nexport const ShareStatusProvider = ({children}) => {\n const [status, setStatus] = useState(SHARE_STATUS.IDLE);\n useEffect(() => {\n let timeoutId;\n const DURATION = 3000;\n if (status !== SHARE_STATUS.IDLE) {\n timeoutId = setTimeout(() => setStatus(SHARE_STATUS.IDLE), DURATION);\n }\n return () => clearTimeout(timeoutId);\n }, [status]);\n\n const value = useMemo(() => [status, setStatus], [status]);\n\n return <StatusContext.Provider value={value}>{children}</StatusContext.Provider>;\n};\n\nexport const ShareFeedback = ({successWording, errorWording}) => {\n const [status] = useContext(StatusContext);\n if (status === SHARE_STATUS.IDLE) return null;\n\n return (\n <div\n className={classnames(styles.feedback, status === SHARE_STATUS.ERROR && styles.errorFeedback)}\n >\n {status === SHARE_STATUS.SUCCESS ? (\n <CheckIcon className={styles.checkIcon} width={13} height={13} />\n ) : (\n <AttentionIcon className={styles.checkIcon} width={13} height={13} />\n )}\n <p>{status === SHARE_STATUS.SUCCESS ? successWording : errorWording}</p>\n </div>\n );\n};\n\nconst Share = ({style, text, wording}) => {\n const [, setStatus] = useContext(StatusContext);\n const onClick = useCallback(async () => {\n const browserSupportsClipboardWriteText =\n 'clipboard' in navigator && 'writeText' in navigator.clipboard;\n if (browserSupportsClipboardWriteText) {\n try {\n await navigator.clipboard.writeText(text);\n setStatus(SHARE_STATUS.SUCCESS);\n } catch (error) {\n setStatus(SHARE_STATUS.ERROR);\n }\n return;\n } else {\n const copyStatus = copyTextViaExecCommand(text);\n setStatus(copyStatus);\n }\n return;\n }, [setStatus, text]);\n\n return (\n <div className={(styles.container, style)}>\n <Link onClick={onClick} className={styles.cta} data-name={'share-button'}>\n <div className={styles.wrapper}>\n <ShareIcon className={styles.shareIcon} width={18} height={18} />\n <p>{wording}</p>\n </div>\n </Link>\n </div>\n );\n};\n\nShareStatusProvider.propTypes = {\n children: PropTypes.node\n};\n\nShareFeedback.propTypes = {\n successWording: PropTypes.string,\n errorWording: PropTypes.string\n};\n\nShare.propTypes = {\n style: PropTypes.string,\n text: PropTypes.string,\n wording: PropTypes.string\n};\n\nexport default Share;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AAKA;;AACA;;;;;;;;AAEA,MAAMA,YAAY,GAAG;EACnBC,IAAI,EAAE,MADa;EAEnBC,KAAK,EAAE,OAFY;EAGnBC,OAAO,EAAE;AAHU,CAArB;;AAMA,MAAMC,sBAAsB,GAAGC,IAAI,IAAI;EACrC,MAAMC,QAAQ,GAAGC,QAAQ,CAACC,aAAT,CAAuB,UAAvB,CAAjB;EAEAF,QAAQ,CAACG,KAAT,CAAeC,MAAf,GAAwB,GAAxB;EACAJ,QAAQ,CAACG,KAAT,CAAeE,OAAf,GAAyB,GAAzB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EAGhBf,OAAO,EAAEa,kBAAA,CAAUE;AAHH,CAAlB;eAMehB,K"}
|
|
@@ -11,7 +11,7 @@ export declare const SlidePropsTypes: PropTypes.Requireable<PropTypes.InferProps
|
|
|
11
11
|
parentContentTitle: PropTypes.Requireable<string>;
|
|
12
12
|
questionText: PropTypes.Requireable<string>;
|
|
13
13
|
answerUI: PropTypes.Requireable<PropTypes.InferProps<{
|
|
14
|
-
model: PropTypes.Validator<
|
|
14
|
+
model: PropTypes.Validator<PropTypes.InferProps<{
|
|
15
15
|
type: PropTypes.Validator<string>;
|
|
16
16
|
answer: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
17
17
|
title: PropTypes.Validator<string>;
|
|
@@ -29,9 +29,9 @@ export declare const SlidePropsTypes: PropTypes.Requireable<PropTypes.InferProps
|
|
|
29
29
|
type: PropTypes.Requireable<string>;
|
|
30
30
|
name: PropTypes.Requireable<string>;
|
|
31
31
|
}> | null | undefined)[]>;
|
|
32
|
-
}
|
|
32
|
+
}>>;
|
|
33
33
|
help: PropTypes.Requireable<string>;
|
|
34
|
-
media: PropTypes.Requireable<
|
|
34
|
+
media: PropTypes.Requireable<PropTypes.InferProps<{
|
|
35
35
|
type: PropTypes.Validator<string>;
|
|
36
36
|
id: PropTypes.Requireable<string>;
|
|
37
37
|
width: PropTypes.Requireable<string>;
|
|
@@ -71,7 +71,7 @@ export declare const SlidePropsTypes: PropTypes.Requireable<PropTypes.InferProps
|
|
|
71
71
|
}> | PropTypes.InferProps<{
|
|
72
72
|
type: PropTypes.Validator<string>;
|
|
73
73
|
mediaUrl: PropTypes.Validator<string>;
|
|
74
|
-
}
|
|
74
|
+
}>>;
|
|
75
75
|
}>>;
|
|
76
76
|
}>>;
|
|
77
77
|
declare const propTypes: {
|
|
@@ -87,7 +87,7 @@ declare const propTypes: {
|
|
|
87
87
|
parentContentTitle: PropTypes.Requireable<string>;
|
|
88
88
|
questionText: PropTypes.Requireable<string>;
|
|
89
89
|
answerUI: PropTypes.Requireable<PropTypes.InferProps<{
|
|
90
|
-
model: PropTypes.Validator<
|
|
90
|
+
model: PropTypes.Validator<PropTypes.InferProps<{
|
|
91
91
|
type: PropTypes.Validator<string>;
|
|
92
92
|
answer: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
93
93
|
title: PropTypes.Validator<string>;
|
|
@@ -105,9 +105,9 @@ declare const propTypes: {
|
|
|
105
105
|
type: PropTypes.Requireable<string>;
|
|
106
106
|
name: PropTypes.Requireable<string>;
|
|
107
107
|
}> | null | undefined)[]>;
|
|
108
|
-
}
|
|
108
|
+
}>>;
|
|
109
109
|
help: PropTypes.Requireable<string>;
|
|
110
|
-
media: PropTypes.Requireable<
|
|
110
|
+
media: PropTypes.Requireable<PropTypes.InferProps<{
|
|
111
111
|
type: PropTypes.Validator<string>;
|
|
112
112
|
id: PropTypes.Requireable<string>;
|
|
113
113
|
width: PropTypes.Requireable<string>;
|
|
@@ -147,7 +147,7 @@ declare const propTypes: {
|
|
|
147
147
|
}> | PropTypes.InferProps<{
|
|
148
148
|
type: PropTypes.Validator<string>;
|
|
149
149
|
mediaUrl: PropTypes.Validator<string>;
|
|
150
|
-
}
|
|
150
|
+
}>>;
|
|
151
151
|
}>>;
|
|
152
152
|
}>>;
|
|
153
153
|
validateButton: PropTypes.Requireable<PropTypes.InferProps<{
|
|
@@ -17,6 +17,8 @@ var _style = _interopRequireDefault(require("./style.css"));
|
|
|
17
17
|
|
|
18
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
19
|
|
|
20
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
21
|
+
|
|
20
22
|
const TOTAL_SLIDES_STACK = 5;
|
|
21
23
|
exports.TOTAL_SLIDES_STACK = TOTAL_SLIDES_STACK;
|
|
22
24
|
const stylesByPosition = {
|
|
@@ -59,13 +61,14 @@ const StackedSlides = ({
|
|
|
59
61
|
key: `slide-${slideIndex}`,
|
|
60
62
|
"data-name": `slide-${slideIndex}`,
|
|
61
63
|
className: (0, _classnames.default)(_style.default.slideBase, getSlideAnimation(animationType, position), endReview ? _style.default.endReview : null)
|
|
62
|
-
}, /*#__PURE__*/_react.default.createElement(_reviewSlide.default, {
|
|
64
|
+
}, /*#__PURE__*/_react.default.createElement(_reviewSlide.default, _extends({
|
|
63
65
|
slideIndex: (0, _toString2.default)(slideIndex),
|
|
64
66
|
slide,
|
|
65
67
|
validateButton,
|
|
66
|
-
correctionPopinProps
|
|
68
|
+
correctionPopinProps
|
|
69
|
+
}, {
|
|
67
70
|
key: slideIndex
|
|
68
|
-
}));
|
|
71
|
+
})));
|
|
69
72
|
|
|
70
73
|
stackedSlides.push(slideView);
|
|
71
74
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["TOTAL_SLIDES_STACK","stylesByPosition","style","position0","position1","position2","position3","position4","getSlideAnimation","action","position","slideOutHideAndIn","slideOutAndIn","hiddenSlide","StackedSlides","slides","endReview","validateButton","correctionPopinProps","stackedSlides","slideIndex","slide","_toString","animationType","slideView","classnames","slideBase","push","stackedSlidesYAxisOverflowContainer","stackedSlidesContainer","propTypes"],"sources":["../../../src/organism/review-stacked-slides/index.js"],"sourcesContent":["import React from 'react';\nimport classnames from 'classnames';\nimport _toString from 'lodash/fp/toString';\nimport ReviewSlide from '../review-slide';\nimport propTypes from './prop-types';\nimport style from './style.css';\n\nexport const TOTAL_SLIDES_STACK = 5;\n\nconst stylesByPosition = {\n 0: style.position0,\n 1: style.position1,\n 2: style.position2,\n 3: style.position3,\n 4: style.position4\n};\n\nconst getSlideAnimation = (action, position) => {\n switch (action) {\n case 'unstack':\n return style.slideOutHideAndIn;\n case 'restack':\n return style.slideOutAndIn;\n default:\n return position < 0 ? style.hiddenSlide : stylesByPosition[position];\n }\n};\n\nconst StackedSlides = ({slides, endReview, validateButton, correctionPopinProps}) => {\n const stackedSlides = [];\n // eslint-disable-next-line fp/no-loops\n for (let slideIndex = 0; slideIndex < TOTAL_SLIDES_STACK; slideIndex++) {\n const slide = slides[_toString(slideIndex)];\n const {animationType, position} = slide;\n\n const slideView = (\n <div\n key={`slide-${slideIndex}`}\n data-name={`slide-${slideIndex}`}\n className={classnames(\n style.slideBase,\n getSlideAnimation(animationType, position),\n endReview ? style.endReview : null\n )}\n >\n <ReviewSlide\n {...{\n slideIndex: _toString(slideIndex),\n slide,\n validateButton,\n correctionPopinProps\n }}\n key={slideIndex}\n />\n </div>\n );\n stackedSlides.push(slideView);\n }\n\n return (\n <div\n key=\"stacked-slides-container-y-overflow\"\n className={style.stackedSlidesYAxisOverflowContainer}\n >\n <div\n key=\"stacked-slides-container\"\n data-name=\"stacked-slides-container\"\n className={style.stackedSlidesContainer}\n >\n {stackedSlides}\n </div>\n </div>\n );\n};\n\nStackedSlides.propTypes = propTypes;\n\nexport default StackedSlides;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA
|
|
1
|
+
{"version":3,"file":"index.js","names":["TOTAL_SLIDES_STACK","stylesByPosition","style","position0","position1","position2","position3","position4","getSlideAnimation","action","position","slideOutHideAndIn","slideOutAndIn","hiddenSlide","StackedSlides","slides","endReview","validateButton","correctionPopinProps","stackedSlides","slideIndex","slide","_toString","animationType","slideView","classnames","slideBase","push","stackedSlidesYAxisOverflowContainer","stackedSlidesContainer","propTypes"],"sources":["../../../src/organism/review-stacked-slides/index.js"],"sourcesContent":["import React from 'react';\nimport classnames from 'classnames';\nimport _toString from 'lodash/fp/toString';\nimport ReviewSlide from '../review-slide';\nimport propTypes from './prop-types';\nimport style from './style.css';\n\nexport const TOTAL_SLIDES_STACK = 5;\n\nconst stylesByPosition = {\n 0: style.position0,\n 1: style.position1,\n 2: style.position2,\n 3: style.position3,\n 4: style.position4\n};\n\nconst getSlideAnimation = (action, position) => {\n switch (action) {\n case 'unstack':\n return style.slideOutHideAndIn;\n case 'restack':\n return style.slideOutAndIn;\n default:\n return position < 0 ? style.hiddenSlide : stylesByPosition[position];\n }\n};\n\nconst StackedSlides = ({slides, endReview, validateButton, correctionPopinProps}) => {\n const stackedSlides = [];\n // eslint-disable-next-line fp/no-loops\n for (let slideIndex = 0; slideIndex < TOTAL_SLIDES_STACK; slideIndex++) {\n const slide = slides[_toString(slideIndex)];\n const {animationType, position} = slide;\n\n const slideView = (\n <div\n key={`slide-${slideIndex}`}\n data-name={`slide-${slideIndex}`}\n className={classnames(\n style.slideBase,\n getSlideAnimation(animationType, position),\n endReview ? style.endReview : null\n )}\n >\n <ReviewSlide\n {...{\n slideIndex: _toString(slideIndex),\n slide,\n validateButton,\n correctionPopinProps\n }}\n key={slideIndex}\n />\n </div>\n );\n stackedSlides.push(slideView);\n }\n\n return (\n <div\n key=\"stacked-slides-container-y-overflow\"\n className={style.stackedSlidesYAxisOverflowContainer}\n >\n <div\n key=\"stacked-slides-container\"\n data-name=\"stacked-slides-container\"\n className={style.stackedSlidesContainer}\n >\n {stackedSlides}\n </div>\n </div>\n );\n};\n\nStackedSlides.propTypes = propTypes;\n\nexport default StackedSlides;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;AAEO,MAAMA,kBAAkB,GAAG,CAA3B;;AAEP,MAAMC,gBAAgB,GAAG;EACvB,GAAGC,cAAA,CAAMC,SADc;EAEvB,GAAGD,cAAA,CAAME,SAFc;EAGvB,GAAGF,cAAA,CAAMG,SAHc;EAIvB,GAAGH,cAAA,CAAMI,SAJc;EAKvB,GAAGJ,cAAA,CAAMK;AALc,CAAzB;;AAQA,MAAMC,iBAAiB,GAAG,CAACC,MAAD,EAASC,QAAT,KAAsB;EAC9C,QAAQD,MAAR;IACE,KAAK,SAAL;MACE,OAAOP,cAAA,CAAMS,iBAAb;;IACF,KAAK,SAAL;MACE,OAAOT,cAAA,CAAMU,aAAb;;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
@@ -13,6 +13,8 @@ var _index = _interopRequireDefault(require("../review-slide/index.native"));
|
|
|
13
13
|
|
|
14
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
15
|
|
|
16
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
17
|
+
|
|
16
18
|
const TOTAL_SLIDES_STACK = 5;
|
|
17
19
|
exports.TOTAL_SLIDES_STACK = TOTAL_SLIDES_STACK;
|
|
18
20
|
|
|
@@ -34,14 +36,15 @@ const StackedSlides = props => {
|
|
|
34
36
|
const stackedSlides = indexes.map(slideIndex => {
|
|
35
37
|
const slide = slides[slideIndex]; // const {animationType, hidden, position} = slide;
|
|
36
38
|
|
|
37
|
-
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
39
|
+
return /*#__PURE__*/_react.default.createElement(_index.default, _extends({
|
|
38
40
|
num: Number.parseInt(slideIndex),
|
|
39
41
|
slideIndex,
|
|
40
42
|
slide,
|
|
41
43
|
validateButton,
|
|
42
|
-
correctionPopinProps
|
|
44
|
+
correctionPopinProps
|
|
45
|
+
}, {
|
|
43
46
|
key: slideIndex
|
|
44
|
-
});
|
|
47
|
+
}));
|
|
45
48
|
});
|
|
46
49
|
return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
47
50
|
style: style.slides
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.native.js","names":["TOTAL_SLIDES_STACK","style","StyleSheet","create","slides","flex","height","width","StackedSlides","props","validateButton","correctionPopinProps","indexes","keys","reverse","stackedSlides","map","slideIndex","slide","num","Number","parseInt"],"sources":["../../../src/organism/review-stacked-slides/index.native.tsx"],"sourcesContent":["import React from 'react';\nimport {StyleSheet, View} from 'react-native';\nimport keys from 'lodash/fp/keys';\nimport Slide from '../review-slide/index.native';\nimport {Props} from './prop-types';\n\nexport const TOTAL_SLIDES_STACK = 5;\n\nconst style = StyleSheet.create({\n slides: {\n flex: 1,\n height: '100%',\n width: '100%'\n }\n});\n\nconst StackedSlides = (props: Props) => {\n const {slides, validateButton, correctionPopinProps} = props;\n\n const indexes = keys(slides).reverse();\n const stackedSlides = indexes.map(slideIndex => {\n const slide = slides[slideIndex];\n // const {animationType, hidden, position} = slide;\n\n return (\n <Slide\n {...{\n num: Number.parseInt(slideIndex),\n slideIndex,\n slide,\n validateButton,\n correctionPopinProps\n }}\n key={slideIndex}\n />\n );\n });\n\n return <View style={style.slides}>{stackedSlides}</View>;\n};\n\nexport default StackedSlides;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA
|
|
1
|
+
{"version":3,"file":"index.native.js","names":["TOTAL_SLIDES_STACK","style","StyleSheet","create","slides","flex","height","width","StackedSlides","props","validateButton","correctionPopinProps","indexes","keys","reverse","stackedSlides","map","slideIndex","slide","num","Number","parseInt"],"sources":["../../../src/organism/review-stacked-slides/index.native.tsx"],"sourcesContent":["import React from 'react';\nimport {StyleSheet, View} from 'react-native';\nimport keys from 'lodash/fp/keys';\nimport Slide from '../review-slide/index.native';\nimport {Props} from './prop-types';\n\nexport const TOTAL_SLIDES_STACK = 5;\n\nconst style = StyleSheet.create({\n slides: {\n flex: 1,\n height: '100%',\n width: '100%'\n }\n});\n\nconst StackedSlides = (props: Props) => {\n const {slides, validateButton, correctionPopinProps} = props;\n\n const indexes = keys(slides).reverse();\n const stackedSlides = indexes.map(slideIndex => {\n const slide = slides[slideIndex];\n // const {animationType, hidden, position} = slide;\n\n return (\n <Slide\n {...{\n num: Number.parseInt(slideIndex),\n slideIndex,\n slide,\n validateButton,\n correctionPopinProps\n }}\n key={slideIndex}\n />\n );\n });\n\n return <View style={style.slides}>{stackedSlides}</View>;\n};\n\nexport default StackedSlides;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;;;;;AAGO,MAAMA,kBAAkB,GAAG,CAA3B;;;AAEP,MAAMC,KAAK,GAAGC,uBAAA,CAAWC,MAAX,CAAkB;EAC9BC,MAAM,EAAE;IACNC,IAAI,EAAE,CADA;IAENC,MAAM,EAAE,MAFF;IAGNC,KAAK,EAAE;EAHD;AADsB,CAAlB,CAAd;;AAQA,MAAMC,aAAa,GAAIC,KAAD,IAAkB;EACtC,MAAM;IAACL,MAAD;IAASM,cAAT;IAAyBC;EAAzB,IAAiDF,KAAvD;EAEA,MAAMG,OAAO,GAAG,IAAAC,aAAA,EAAKT,MAAL,EAAaU,OAAb,EAAhB;EACA,MAAMC,aAAa,GAAGH,OAAO,CAACI,GAAR,CAAYC,UAAU,IAAI;IAC9C,MAAMC,KAAK,GAAGd,MAAM,CAACa,UAAD,CAApB,CAD8C,CAE9C;;IAEA,oBACE,6BAAC,cAAD,WACM;MACFE,GAAG,EAAEC,MAAM,CAACC,QAAP,CAAgBJ,UAAhB,CADH;MAEFA,UAFE;MAGFC,KAHE;MAIFR,cAJE;MAKFC;IALE,CADN;MAQE,GAAG,EAAEM;IARP,GADF;EAYD,CAhBqB,CAAtB;EAkBA,oBAAO,6BAAC,iBAAD;IAAM,KAAK,EAAEhB,KAAK,CAACG;EAAnB,GAA4BW,aAA5B,CAAP;AACD,CAvBD;;eAyBeP,a"}
|
|
@@ -22,7 +22,7 @@ declare const propTypes: {
|
|
|
22
22
|
resultLabel: PropTypes.Requireable<string>;
|
|
23
23
|
type: PropTypes.Requireable<string>;
|
|
24
24
|
}>>;
|
|
25
|
-
slides: PropTypes.Validator<
|
|
25
|
+
slides: PropTypes.Validator<PropTypes.InferProps<{
|
|
26
26
|
'0': PropTypes.Requireable<PropTypes.InferProps<{
|
|
27
27
|
position: PropTypes.Requireable<number>;
|
|
28
28
|
loading: PropTypes.Requireable<boolean>;
|
|
@@ -34,7 +34,7 @@ declare const propTypes: {
|
|
|
34
34
|
parentContentTitle: PropTypes.Requireable<string>;
|
|
35
35
|
questionText: PropTypes.Requireable<string>;
|
|
36
36
|
answerUI: PropTypes.Requireable<PropTypes.InferProps<{
|
|
37
|
-
model: PropTypes.Validator<
|
|
37
|
+
model: PropTypes.Validator<PropTypes.InferProps<{
|
|
38
38
|
type: PropTypes.Validator<string>;
|
|
39
39
|
answer: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
40
40
|
title: PropTypes.Validator<string>;
|
|
@@ -52,9 +52,9 @@ declare const propTypes: {
|
|
|
52
52
|
type: PropTypes.Requireable<string>;
|
|
53
53
|
name: PropTypes.Requireable<string>;
|
|
54
54
|
}> | null | undefined)[]>;
|
|
55
|
-
}
|
|
55
|
+
}>>;
|
|
56
56
|
help: PropTypes.Requireable<string>;
|
|
57
|
-
media: PropTypes.Requireable<
|
|
57
|
+
media: PropTypes.Requireable<PropTypes.InferProps<{
|
|
58
58
|
type: PropTypes.Validator<string>;
|
|
59
59
|
id: PropTypes.Requireable<string>;
|
|
60
60
|
width: PropTypes.Requireable<string>;
|
|
@@ -94,7 +94,7 @@ declare const propTypes: {
|
|
|
94
94
|
}> | PropTypes.InferProps<{
|
|
95
95
|
type: PropTypes.Validator<string>;
|
|
96
96
|
mediaUrl: PropTypes.Validator<string>;
|
|
97
|
-
}
|
|
97
|
+
}>>;
|
|
98
98
|
}>>;
|
|
99
99
|
}>>;
|
|
100
100
|
'1': PropTypes.Requireable<PropTypes.InferProps<{
|
|
@@ -108,7 +108,7 @@ declare const propTypes: {
|
|
|
108
108
|
parentContentTitle: PropTypes.Requireable<string>;
|
|
109
109
|
questionText: PropTypes.Requireable<string>;
|
|
110
110
|
answerUI: PropTypes.Requireable<PropTypes.InferProps<{
|
|
111
|
-
model: PropTypes.Validator<
|
|
111
|
+
model: PropTypes.Validator<PropTypes.InferProps<{
|
|
112
112
|
type: PropTypes.Validator<string>;
|
|
113
113
|
answer: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
114
114
|
title: PropTypes.Validator<string>;
|
|
@@ -126,9 +126,9 @@ declare const propTypes: {
|
|
|
126
126
|
type: PropTypes.Requireable<string>;
|
|
127
127
|
name: PropTypes.Requireable<string>;
|
|
128
128
|
}> | null | undefined)[]>;
|
|
129
|
-
}
|
|
129
|
+
}>>;
|
|
130
130
|
help: PropTypes.Requireable<string>;
|
|
131
|
-
media: PropTypes.Requireable<
|
|
131
|
+
media: PropTypes.Requireable<PropTypes.InferProps<{
|
|
132
132
|
type: PropTypes.Validator<string>;
|
|
133
133
|
id: PropTypes.Requireable<string>;
|
|
134
134
|
width: PropTypes.Requireable<string>;
|
|
@@ -168,7 +168,7 @@ declare const propTypes: {
|
|
|
168
168
|
}> | PropTypes.InferProps<{
|
|
169
169
|
type: PropTypes.Validator<string>;
|
|
170
170
|
mediaUrl: PropTypes.Validator<string>;
|
|
171
|
-
}
|
|
171
|
+
}>>;
|
|
172
172
|
}>>;
|
|
173
173
|
}>>;
|
|
174
174
|
'2': PropTypes.Requireable<PropTypes.InferProps<{
|
|
@@ -182,7 +182,7 @@ declare const propTypes: {
|
|
|
182
182
|
parentContentTitle: PropTypes.Requireable<string>;
|
|
183
183
|
questionText: PropTypes.Requireable<string>;
|
|
184
184
|
answerUI: PropTypes.Requireable<PropTypes.InferProps<{
|
|
185
|
-
model: PropTypes.Validator<
|
|
185
|
+
model: PropTypes.Validator<PropTypes.InferProps<{
|
|
186
186
|
type: PropTypes.Validator<string>;
|
|
187
187
|
answer: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
188
188
|
title: PropTypes.Validator<string>;
|
|
@@ -200,9 +200,9 @@ declare const propTypes: {
|
|
|
200
200
|
type: PropTypes.Requireable<string>;
|
|
201
201
|
name: PropTypes.Requireable<string>;
|
|
202
202
|
}> | null | undefined)[]>;
|
|
203
|
-
}
|
|
203
|
+
}>>;
|
|
204
204
|
help: PropTypes.Requireable<string>;
|
|
205
|
-
media: PropTypes.Requireable<
|
|
205
|
+
media: PropTypes.Requireable<PropTypes.InferProps<{
|
|
206
206
|
type: PropTypes.Validator<string>;
|
|
207
207
|
id: PropTypes.Requireable<string>;
|
|
208
208
|
width: PropTypes.Requireable<string>;
|
|
@@ -242,7 +242,7 @@ declare const propTypes: {
|
|
|
242
242
|
}> | PropTypes.InferProps<{
|
|
243
243
|
type: PropTypes.Validator<string>;
|
|
244
244
|
mediaUrl: PropTypes.Validator<string>;
|
|
245
|
-
}
|
|
245
|
+
}>>;
|
|
246
246
|
}>>;
|
|
247
247
|
}>>;
|
|
248
248
|
'3': PropTypes.Requireable<PropTypes.InferProps<{
|
|
@@ -256,7 +256,7 @@ declare const propTypes: {
|
|
|
256
256
|
parentContentTitle: PropTypes.Requireable<string>;
|
|
257
257
|
questionText: PropTypes.Requireable<string>;
|
|
258
258
|
answerUI: PropTypes.Requireable<PropTypes.InferProps<{
|
|
259
|
-
model: PropTypes.Validator<
|
|
259
|
+
model: PropTypes.Validator<PropTypes.InferProps<{
|
|
260
260
|
type: PropTypes.Validator<string>;
|
|
261
261
|
answer: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
262
262
|
title: PropTypes.Validator<string>;
|
|
@@ -274,9 +274,9 @@ declare const propTypes: {
|
|
|
274
274
|
type: PropTypes.Requireable<string>;
|
|
275
275
|
name: PropTypes.Requireable<string>;
|
|
276
276
|
}> | null | undefined)[]>;
|
|
277
|
-
}
|
|
277
|
+
}>>;
|
|
278
278
|
help: PropTypes.Requireable<string>;
|
|
279
|
-
media: PropTypes.Requireable<
|
|
279
|
+
media: PropTypes.Requireable<PropTypes.InferProps<{
|
|
280
280
|
type: PropTypes.Validator<string>;
|
|
281
281
|
id: PropTypes.Requireable<string>;
|
|
282
282
|
width: PropTypes.Requireable<string>;
|
|
@@ -316,7 +316,7 @@ declare const propTypes: {
|
|
|
316
316
|
}> | PropTypes.InferProps<{
|
|
317
317
|
type: PropTypes.Validator<string>;
|
|
318
318
|
mediaUrl: PropTypes.Validator<string>;
|
|
319
|
-
}
|
|
319
|
+
}>>;
|
|
320
320
|
}>>;
|
|
321
321
|
}>>;
|
|
322
322
|
'4': PropTypes.Requireable<PropTypes.InferProps<{
|
|
@@ -330,7 +330,7 @@ declare const propTypes: {
|
|
|
330
330
|
parentContentTitle: PropTypes.Requireable<string>;
|
|
331
331
|
questionText: PropTypes.Requireable<string>;
|
|
332
332
|
answerUI: PropTypes.Requireable<PropTypes.InferProps<{
|
|
333
|
-
model: PropTypes.Validator<
|
|
333
|
+
model: PropTypes.Validator<PropTypes.InferProps<{
|
|
334
334
|
type: PropTypes.Validator<string>;
|
|
335
335
|
answer: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
336
336
|
title: PropTypes.Validator<string>;
|
|
@@ -348,9 +348,9 @@ declare const propTypes: {
|
|
|
348
348
|
type: PropTypes.Requireable<string>;
|
|
349
349
|
name: PropTypes.Requireable<string>;
|
|
350
350
|
}> | null | undefined)[]>;
|
|
351
|
-
}
|
|
351
|
+
}>>;
|
|
352
352
|
help: PropTypes.Requireable<string>;
|
|
353
|
-
media: PropTypes.Requireable<
|
|
353
|
+
media: PropTypes.Requireable<PropTypes.InferProps<{
|
|
354
354
|
type: PropTypes.Validator<string>;
|
|
355
355
|
id: PropTypes.Requireable<string>;
|
|
356
356
|
width: PropTypes.Requireable<string>;
|
|
@@ -390,10 +390,10 @@ declare const propTypes: {
|
|
|
390
390
|
}> | PropTypes.InferProps<{
|
|
391
391
|
type: PropTypes.Validator<string>;
|
|
392
392
|
mediaUrl: PropTypes.Validator<string>;
|
|
393
|
-
}
|
|
393
|
+
}>>;
|
|
394
394
|
}>>;
|
|
395
395
|
}>>;
|
|
396
|
-
}
|
|
396
|
+
}>>;
|
|
397
397
|
endReview: PropTypes.Requireable<boolean>;
|
|
398
398
|
};
|
|
399
399
|
export default propTypes;
|
|
@@ -331,7 +331,7 @@ const BackgroundScorm = props => {
|
|
|
331
331
|
className: _summary.default.organismPlayerResultContainerScorm
|
|
332
332
|
}, failed === false ? /*#__PURE__*/_react.default.createElement("div", {
|
|
333
333
|
className: _summary.default.animationContainer
|
|
334
|
-
}, /*#__PURE__*/_react.default.createElement(_lottieWrapper.default, {
|
|
334
|
+
}, /*#__PURE__*/_react.default.createElement(_lottieWrapper.default, _extends({
|
|
335
335
|
'aria-label': 'aria lottie',
|
|
336
336
|
'data-name': 'default-lottie',
|
|
337
337
|
className: undefined,
|
|
@@ -343,14 +343,15 @@ const BackgroundScorm = props => {
|
|
|
343
343
|
animationClassName: ''
|
|
344
344
|
},
|
|
345
345
|
ie11ImageBackup: 'https://static-staging.coorpacademy.com/animations/review/conffeti_congrats.svg',
|
|
346
|
-
animationControl: undefined
|
|
346
|
+
animationControl: undefined
|
|
347
|
+
}, {
|
|
347
348
|
loop: false,
|
|
348
349
|
animationControl: 'play',
|
|
349
350
|
autoplay: true,
|
|
350
351
|
"data-name": "lottie-wrapper",
|
|
351
352
|
className: _summary.default.lottie,
|
|
352
353
|
backupImageClassName: _summary.default.ie11Backup
|
|
353
|
-
})) : null, /*#__PURE__*/_react.default.createElement("div", {
|
|
354
|
+
}))) : null, /*#__PURE__*/_react.default.createElement("div", {
|
|
354
355
|
className: _summary.default.background
|
|
355
356
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
356
357
|
className: _summary.default.largeCircle
|