@coorpacademy/components 10.23.2 → 10.23.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/molecule/cm-popin/index.js +13 -7
- package/es/molecule/cm-popin/index.js.map +1 -1
- package/es/molecule/cm-popin/style.css +67 -5
- package/es/molecule/feedback/style.css +1 -1
- package/es/organism/review-slide/style.css +11 -1
- package/es/template/app-player/popin-end/summary.css +28 -8
- package/es/template/app-player/popin-end/summary.js +11 -7
- package/es/template/app-player/popin-end/summary.js.map +1 -1
- package/es/template/app-player/popin-header/index.js +12 -9
- package/es/template/app-player/popin-header/index.js.map +1 -1
- package/es/template/app-player/popin-header/style.css +10 -2
- package/lib/molecule/cm-popin/index.js +12 -6
- package/lib/molecule/cm-popin/index.js.map +1 -1
- package/lib/molecule/cm-popin/style.css +67 -5
- package/lib/molecule/feedback/style.css +1 -1
- package/lib/organism/review-slide/style.css +11 -1
- package/lib/template/app-player/popin-end/summary.css +28 -8
- package/lib/template/app-player/popin-end/summary.js +11 -7
- package/lib/template/app-player/popin-end/summary.js.map +1 -1
- package/lib/template/app-player/popin-header/index.js +12 -9
- package/lib/template/app-player/popin-header/index.js.map +1 -1
- package/lib/template/app-player/popin-header/style.css +10 -2
- package/package.json +3 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import { NovaSolidInterfaceFeedbackInterfaceAlertDiamond as AlertDiamond, NovaSolidApplicationsWindowUpload3 as WindowUpload, NovaLineSettingsCookie as Cookie } from '@coorpacademy/nova-icons';
|
|
3
|
+
import { NovaSolidInterfaceFeedbackInterfaceAlertDiamond as AlertDiamond, NovaSolidApplicationsWindowUpload3 as WindowUpload, NovaLineSettingsCookie as Cookie, NovaSolidSpaceMoonRocket as MoonRocket } from '@coorpacademy/nova-icons';
|
|
4
4
|
import map from 'lodash/fp/map';
|
|
5
5
|
import Cta from '../../atom/button-link';
|
|
6
6
|
import ButtonLinkIconOnly from '../../atom/button-link-icon-only';
|
|
@@ -25,7 +25,8 @@ const CMPopin = props => {
|
|
|
25
25
|
} = props;
|
|
26
26
|
const logo = {
|
|
27
27
|
AlertDiamond,
|
|
28
|
-
WindowUpload
|
|
28
|
+
WindowUpload,
|
|
29
|
+
MoonRocket
|
|
29
30
|
};
|
|
30
31
|
const LogoComponent = logo[icon];
|
|
31
32
|
const backgroundImageStyle = backgroundImageUrl ? {
|
|
@@ -143,7 +144,8 @@ const CMPopin = props => {
|
|
|
143
144
|
onClick: firstButton.handleOnclick,
|
|
144
145
|
"data-name": 'cm-popin-cta',
|
|
145
146
|
"aria-label": firstButton['aria-label'],
|
|
146
|
-
type: firstButton.type
|
|
147
|
+
type: firstButton.type,
|
|
148
|
+
customStyle: firstButton.customStyle
|
|
147
149
|
})) : null, secondButton ? /*#__PURE__*/React.createElement("div", {
|
|
148
150
|
className: secondButton.largeButton ? style.largeButton : style.button
|
|
149
151
|
}, /*#__PURE__*/React.createElement(Cta, {
|
|
@@ -159,7 +161,8 @@ const CMPopin = props => {
|
|
|
159
161
|
onClick: thirdButton.handleOnclick,
|
|
160
162
|
"data-name": `cm-popin-cta-${thirdButton.type}`,
|
|
161
163
|
"aria-label": thirdButton['aria-label'],
|
|
162
|
-
type: thirdButton.type
|
|
164
|
+
type: thirdButton.type,
|
|
165
|
+
customStyle: thirdButton.customStyle
|
|
163
166
|
})) : null)));
|
|
164
167
|
};
|
|
165
168
|
|
|
@@ -172,21 +175,24 @@ CMPopin.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
172
175
|
handleOnclick: PropTypes.func,
|
|
173
176
|
'aria-label': PropTypes.string,
|
|
174
177
|
largeButton: PropTypes.bool,
|
|
175
|
-
type: PropTypes.oneOf(['dangerous', 'primary', 'secondary'])
|
|
178
|
+
type: PropTypes.oneOf(['dangerous', 'primary', 'secondary', 'tertiary']),
|
|
179
|
+
customStyle: PropTypes.object
|
|
176
180
|
}),
|
|
177
181
|
secondButton: PropTypes.shape({
|
|
178
182
|
label: PropTypes.string,
|
|
179
183
|
handleOnclick: PropTypes.func,
|
|
180
184
|
type: PropTypes.oneOf(['dangerous', 'primary', 'secondary']),
|
|
181
185
|
'aria-label': PropTypes.string,
|
|
182
|
-
largeButton: PropTypes.boolean
|
|
186
|
+
largeButton: PropTypes.boolean,
|
|
187
|
+
customStyle: PropTypes.object
|
|
183
188
|
}),
|
|
184
189
|
thirdButton: PropTypes.shape({
|
|
185
190
|
label: PropTypes.string,
|
|
186
191
|
handleOnclick: PropTypes.func,
|
|
187
192
|
type: PropTypes.oneOf(['dangerous', 'primary', 'secondary']),
|
|
188
193
|
'aria-label': PropTypes.string,
|
|
189
|
-
largeButton: PropTypes.boolean
|
|
194
|
+
largeButton: PropTypes.boolean,
|
|
195
|
+
customStyle: PropTypes.object
|
|
190
196
|
}),
|
|
191
197
|
onClose: PropTypes.func,
|
|
192
198
|
icon: PropTypes.string,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/molecule/cm-popin/index.js"],"names":["React","PropTypes","NovaSolidInterfaceFeedbackInterfaceAlertDiamond","AlertDiamond","NovaSolidApplicationsWindowUpload3","WindowUpload","NovaLineSettingsCookie","Cookie","map","Cta","ButtonLinkIconOnly","InputSwitch","style","CMPopin","props","content","mode","firstButton","secondButton","onClose","header","icon","backgroundImageUrl","descriptionText","thirdButton","cookieTitle","descriptionBtnTxt","listBtnSwicth","logo","LogoComponent","backgroundImageStyle","backgroundImage","backgroundSize","renderHeader","headerBackground","cookieHeader","cookieIconContainer","cookieIcon","getClassBtnSwitch","index","btnList","firstBtnSwitchContainer","length","lastBtnSwitchContainer","singleSwitchContainer","renderBtnSwitch","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","propTypes","string","oneOf","shape","func","bool","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,SAAS,CAAC6E,IAFE;AAG3B7B,IAAAA,IAAI,EAAEhD,SAAS,CAAC2E,KAAV,CAAgB,CAAC,WAAD,EAAc,SAAd,EAAyB,WAAzB,CAAhB,CAHqB;AAI3B,kBAAc3E,SAAS,CAAC0E,MAJG;AAK3BL,IAAAA,WAAW,EAAErE,SAAS,CAAC+E;AALI,GAAhB,CAlBK;AAyBlB7D,EAAAA,OAAO,EAAElB,SAAS,CAAC6E,IAzBD;AA0BlBzD,EAAAA,IAAI,EAAEpB,SAAS,CAAC0E,MA1BE;AA2BlBrD,EAAAA,kBAAkB,EAAErB,SAAS,CAAC0E,MA3BZ;AA4BlBpD,EAAAA,eAAe,EAAEtB,SAAS,CAAC0E,MA5BT;AA6BlBlD,EAAAA,WAAW,EAAExB,SAAS,CAAC0E,MA7BL;AA8BlBjD,EAAAA,iBAAiB,EAAEzB,SAAS,CAAC0E,MA9BX;AA+BlBhD,EAAAA,aAAa,EAAE1B,SAAS,CAACgF,OAAV,CAAkBhF,SAAS,CAAC4E,KAAV,CAAgBlE,WAAW,CAAC+D,SAA5B,CAAlB;AA/BG,CAApB;AAkCA,eAAe7D,OAAf","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {\n NovaSolidInterfaceFeedbackInterfaceAlertDiamond as AlertDiamond,\n NovaSolidApplicationsWindowUpload3 as WindowUpload,\n NovaLineSettingsCookie as Cookie\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 };\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 />\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 />\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'])\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.boolean\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.boolean\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"],"file":"index.js"}
|
|
1
|
+
{"version":3,"sources":["../../../src/molecule/cm-popin/index.js"],"names":["React","PropTypes","NovaSolidInterfaceFeedbackInterfaceAlertDiamond","AlertDiamond","NovaSolidApplicationsWindowUpload3","WindowUpload","NovaLineSettingsCookie","Cookie","NovaSolidSpaceMoonRocket","MoonRocket","map","Cta","ButtonLinkIconOnly","InputSwitch","style","CMPopin","props","content","mode","firstButton","secondButton","onClose","header","icon","backgroundImageUrl","descriptionText","thirdButton","cookieTitle","descriptionBtnTxt","listBtnSwicth","logo","LogoComponent","backgroundImageStyle","backgroundImage","backgroundSize","renderHeader","headerBackground","cookieHeader","cookieIconContainer","cookieIcon","getClassBtnSwitch","index","btnList","firstBtnSwitchContainer","length","lastBtnSwitchContainer","singleSwitchContainer","renderBtnSwitch","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","string","oneOf","shape","func","bool","object","boolean","arrayOf"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,SACEC,+CAA+C,IAAIC,YADrD,EAEEC,kCAAkC,IAAIC,YAFxC,EAGEC,sBAAsB,IAAIC,MAH5B,EAIEC,wBAAwB,IAAIC,UAJ9B,QAKO,0BALP;AAMA,OAAOC,GAAP,MAAgB,eAAhB;AACA,OAAOC,GAAP,MAAgB,wBAAhB;AACA,OAAOC,kBAAP,MAA+B,kCAA/B;AACA,OAAOC,WAAP,MAAwB,yBAAxB;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,OAAO,GAAGC,KAAK,IAAI;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AAA,WAAW,EAAEvE,SAAS,CAACmF,OALI;AAM3BR,IAAAA,WAAW,EAAE3E,SAAS,CAACkF;AANI,GAAhB,CApBK;AA4BlB9D,EAAAA,OAAO,EAAEpB,SAAS,CAACgF,IA5BD;AA6BlB1D,EAAAA,IAAI,EAAEtB,SAAS,CAAC6E,MA7BE;AA8BlBtD,EAAAA,kBAAkB,EAAEvB,SAAS,CAAC6E,MA9BZ;AA+BlBrD,EAAAA,eAAe,EAAExB,SAAS,CAAC6E,MA/BT;AAgClBnD,EAAAA,WAAW,EAAE1B,SAAS,CAAC6E,MAhCL;AAiClBlD,EAAAA,iBAAiB,EAAE3B,SAAS,CAAC6E,MAjCX;AAkClBjD,EAAAA,aAAa,EAAE5B,SAAS,CAACoF,OAAV,CAAkBpF,SAAS,CAAC+E,KAAV,CAAgBnE,WAAW,CAACgE,SAA5B,CAAlB;AAlCG,CAApB;AAqCA,eAAe9D,OAAf","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: PropTypes.object\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.boolean,\n customStyle: PropTypes.object\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.boolean,\n customStyle: PropTypes.object\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"],"file":"index.js"}
|
|
@@ -114,6 +114,7 @@
|
|
|
114
114
|
}
|
|
115
115
|
|
|
116
116
|
.button {
|
|
117
|
+
min-width: max-content;
|
|
117
118
|
width: 160px;
|
|
118
119
|
padding: 8px;
|
|
119
120
|
}
|
|
@@ -267,7 +268,31 @@ a {
|
|
|
267
268
|
.popinCookie .largeButton {
|
|
268
269
|
padding: 0px 8px 0px 0px
|
|
269
270
|
}
|
|
271
|
+
|
|
270
272
|
@media tablet {
|
|
273
|
+
.popin {
|
|
274
|
+
position: fixed;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
.popin {
|
|
278
|
+
width: 80%;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
.buttonContainer {
|
|
282
|
+
display: flex;
|
|
283
|
+
flex-wrap: wrap-reverse;
|
|
284
|
+
margin: 48px 24px 32px 24px;
|
|
285
|
+
width: 85%;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
.button {
|
|
289
|
+
width: 100%;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
.titleContainer {
|
|
293
|
+
width: 85%;
|
|
294
|
+
}
|
|
295
|
+
|
|
271
296
|
.popinCookie {
|
|
272
297
|
position: fixed;
|
|
273
298
|
bottom: 10px;
|
|
@@ -281,15 +306,52 @@ a {
|
|
|
281
306
|
width: 100%;
|
|
282
307
|
padding: 0px 0px 8px 0px
|
|
283
308
|
}
|
|
284
|
-
|
|
285
|
-
flex-wrap: wrap;
|
|
286
|
-
margin-top: 40px;
|
|
287
|
-
}
|
|
309
|
+
|
|
288
310
|
.popinCookie .largeButton {
|
|
289
311
|
padding: 8px 0px 0px 0px
|
|
290
312
|
}
|
|
291
313
|
.popinCookie .message {
|
|
292
314
|
padding: 24px 24px 0px 24px
|
|
293
315
|
}
|
|
294
|
-
|
|
316
|
+
|
|
317
|
+
@media mobile {
|
|
318
|
+
.popin {
|
|
319
|
+
position: fixed;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
.popin {
|
|
323
|
+
width: 80%;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
.buttonContainer {
|
|
327
|
+
display: flex;
|
|
328
|
+
margin: 48px 24px 32px 24px;
|
|
329
|
+
width: 85%;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
.button {
|
|
333
|
+
width: 100%;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
.titleContainer {
|
|
337
|
+
width: 85%;
|
|
338
|
+
}
|
|
339
|
+
}
|
|
295
340
|
}
|
|
341
|
+
|
|
342
|
+
/* ie11 style */
|
|
343
|
+
_:-ms-fullscreen,
|
|
344
|
+
.popinHeader
|
|
345
|
+
button {
|
|
346
|
+
position: relative;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
_:-ms-fullscreen,
|
|
350
|
+
.descriptionText {
|
|
351
|
+
width: 85%;
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
_:-ms-fullscreen,
|
|
355
|
+
.button {
|
|
356
|
+
width: 40%;
|
|
357
|
+
}
|
|
@@ -139,7 +139,17 @@ _:-ms-fullscreen, :root .correctionPopinWrapper {
|
|
|
139
139
|
}
|
|
140
140
|
|
|
141
141
|
.disabledSlideContent {
|
|
142
|
-
|
|
142
|
+
position: inherit;
|
|
143
|
+
}
|
|
144
|
+
.disabledSlideContent::after {
|
|
145
|
+
content: '';
|
|
146
|
+
top: 0px;
|
|
147
|
+
left: 0px;
|
|
148
|
+
bottom: 0px;
|
|
149
|
+
right: 0px;
|
|
150
|
+
position:absolute;
|
|
151
|
+
opacity: 0;
|
|
152
|
+
pointer-events: fill;
|
|
143
153
|
}
|
|
144
154
|
|
|
145
155
|
@media tablet {
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
@value colors: '../../../variables/colors.css';
|
|
5
5
|
@value xtraLightGrey from colors;
|
|
6
6
|
@value grey from colors;
|
|
7
|
+
@value cm_grey_75 from colors;
|
|
7
8
|
@value medium from colors;
|
|
8
9
|
@value white from colors;
|
|
9
10
|
@value light from colors;
|
|
@@ -259,31 +260,55 @@
|
|
|
259
260
|
display: flex;
|
|
260
261
|
justify-content: center;
|
|
261
262
|
align-items: center;
|
|
263
|
+
position: absolute;
|
|
262
264
|
}
|
|
263
265
|
|
|
264
266
|
.smallCircle {
|
|
267
|
+
top: -68px;
|
|
268
|
+
left: calc(50vw - 50vh - 68px);
|
|
265
269
|
height: calc(100vh + 136px);
|
|
266
270
|
width: calc(100vh + 136px);
|
|
267
271
|
composes: circle;
|
|
268
272
|
}
|
|
269
273
|
.mediumCircle {
|
|
274
|
+
top: -193px;
|
|
275
|
+
left: calc(50vw - 50vh - 193px);
|
|
270
276
|
height: calc(100vh + 386px);
|
|
271
277
|
width: calc(100vh + 386px);
|
|
272
278
|
composes: circle;
|
|
273
279
|
}
|
|
274
280
|
.largeCircle {
|
|
281
|
+
top: -318px;
|
|
282
|
+
left: calc(50vw - 50vh - 318px);
|
|
275
283
|
height: calc(100vh + 636px);
|
|
276
284
|
width: calc(100vh + 636px);
|
|
277
285
|
composes: circle;
|
|
278
286
|
}
|
|
287
|
+
.background {
|
|
288
|
+
position: absolute;
|
|
289
|
+
top: 0px;
|
|
290
|
+
bottom: 0px;
|
|
291
|
+
left: 0px;
|
|
292
|
+
right: 0px;
|
|
293
|
+
}
|
|
279
294
|
.organismPlayerResultContainerScorm {
|
|
280
|
-
height:
|
|
295
|
+
height: 100%;
|
|
296
|
+
min-height: calc(100vh - 60px);
|
|
281
297
|
width: 100%;
|
|
282
298
|
display: flex;
|
|
283
299
|
justify-content: center;
|
|
284
300
|
align-items: center;
|
|
301
|
+
position: relative;
|
|
285
302
|
overflow: hidden;
|
|
286
303
|
}
|
|
304
|
+
.content {
|
|
305
|
+
border: 1px solid cm_grey_75;
|
|
306
|
+
position: relative;
|
|
307
|
+
padding: 0px;
|
|
308
|
+
margin: 0px;
|
|
309
|
+
max-width: 885px;
|
|
310
|
+
margin: 50px 0px;
|
|
311
|
+
}
|
|
287
312
|
.lottie {
|
|
288
313
|
display: flex;
|
|
289
314
|
height: 135%;
|
|
@@ -296,6 +321,7 @@
|
|
|
296
321
|
position: absolute;
|
|
297
322
|
z-index: 1;
|
|
298
323
|
width: 100%;
|
|
324
|
+
top: 0px;
|
|
299
325
|
}
|
|
300
326
|
.ie11Backup {
|
|
301
327
|
position: relative;
|
|
@@ -320,14 +346,8 @@
|
|
|
320
346
|
}
|
|
321
347
|
}
|
|
322
348
|
@media tablet {
|
|
323
|
-
.organismPlayerResultContainerScorm {
|
|
324
|
-
height: 100%;
|
|
325
|
-
}
|
|
326
349
|
.largeCircle , .mediumCircle, .smallCircle {
|
|
327
|
-
|
|
328
|
-
height: 100%;
|
|
329
|
-
width: 100%;
|
|
330
|
-
border-radius: 0;
|
|
350
|
+
display: none;
|
|
331
351
|
}
|
|
332
352
|
}
|
|
333
353
|
|
|
@@ -276,10 +276,10 @@ const Summary = (props, context) => {
|
|
|
276
276
|
|
|
277
277
|
const primary = _getOr('#f0f', 'common.primary', skin);
|
|
278
278
|
|
|
279
|
-
const commentView = comment && header ? /*#__PURE__*/React.createElement("div", {
|
|
279
|
+
const commentView = mode !== 'scorm' && comment && header ? /*#__PURE__*/React.createElement("div", {
|
|
280
280
|
className: style.discussionWrapper
|
|
281
281
|
}, /*#__PURE__*/React.createElement(CommentSection, comment)) : null;
|
|
282
|
-
const footerView = footer && header ? /*#__PURE__*/React.createElement(Footer, _extends({}, footer, {
|
|
282
|
+
const footerView = mode !== 'scorm' && footer && header ? /*#__PURE__*/React.createElement(Footer, _extends({}, footer, {
|
|
283
283
|
color: primary
|
|
284
284
|
})) : null;
|
|
285
285
|
const feedbackView = feedback ? /*#__PURE__*/React.createElement(Feedback, _extends({}, feedback, {
|
|
@@ -307,7 +307,7 @@ const BackgroundScorm = props => {
|
|
|
307
307
|
className: style.organismPlayerResultContainerScorm
|
|
308
308
|
}, /*#__PURE__*/React.createElement("div", {
|
|
309
309
|
className: style.animationContainer
|
|
310
|
-
},
|
|
310
|
+
}, failed === false ? /*#__PURE__*/React.createElement(AtomLottieWrapper, _extends({
|
|
311
311
|
'aria-label': 'aria lottie',
|
|
312
312
|
'data-name': 'default-lottie',
|
|
313
313
|
className: undefined,
|
|
@@ -327,13 +327,17 @@ const BackgroundScorm = props => {
|
|
|
327
327
|
"data-name": "lottie-wrapper",
|
|
328
328
|
className: style.lottie,
|
|
329
329
|
backupImageClassName: style.ie11Backup
|
|
330
|
-
})) : null), /*#__PURE__*/React.createElement("div",
|
|
331
|
-
className: style.
|
|
330
|
+
})) : null), /*#__PURE__*/React.createElement("div", {
|
|
331
|
+
className: style.background
|
|
332
332
|
}, /*#__PURE__*/React.createElement("div", {
|
|
333
|
+
className: style.largeCircle
|
|
334
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
333
335
|
className: style.mediumCircle
|
|
334
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
336
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
335
337
|
className: style.smallCircle
|
|
336
|
-
},
|
|
338
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
339
|
+
className: style.content
|
|
340
|
+
}, children));
|
|
337
341
|
return children;
|
|
338
342
|
};
|
|
339
343
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/template/app-player/popin-end/summary.js"],"names":["React","PropTypes","classnames","NovaSolidStatusCheckCircle2","CheckIcon","Provider","Button","Link","Discussion","Loader","Card","Feedback","CardsList","PopinHeader","AtomLottieWrapper","style","Header","props","SimpleAction","color","prefix","title","button","buttonTitle","linkProps","simpleWrapper","simpleTexts","simplePrefix","simpleTitle","innerHTML","__html","backgroundColor","simpleButton","propTypes","string","shape","NextCourse","card","nextCourseWrapper","nextCourseTexts","nextCoursePrefix","nextCourseTitle","nextCourseCard","Subscribe","description","subscribeWrapper","subscribeTexts","subscribeDescription","subscribeTitle","subscribeButtonWrapper","subscribeButton","submitValue","actions","simple","subscribe","nextCourse","Action","type","actionProps","Type","oneOf","CardsLoader","loaderWrapper","CommentConfirmation","context","onClick","commentSectionTitle","confirmationLinkText","skin","dark","commentSection","commentSectionIconWrapper","commentSectionIcon","commentSectionTexts","commentSectionLink","node","children","contextTypes","childContextTypes","CommentSection","isSent","edition","confirmation","bool","Cards","cards","cardsWrapper","Footer","footer","Summary","header","recommendation","comment","action","feedback","mode","primary","commentView","discussionWrapper","footerView","feedbackView","failed","summaryWrapper","BackgroundScorm","organismPlayerResultContainerScorm","animationContainer","className","undefined","animationSrc","loop","autoplay","rendererSettings","hideOnTransparent","animationClassName","ie11ImageBackup","animationControl","lottie","ie11Backup","largeCircle","mediumCircle","smallCircle","href","url","func","isRequired"],"mappings":";;;;;;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,OAAOC,UAAP,MAAuB,YAAvB;AACA,SAAQC,2BAA2B,IAAIC,SAAvC,QAAuD,0BAAvD;AACA,OAAOC,QAAP,MAAqB,wBAArB;AACA,OAAOC,MAAP,MAAmB,sBAAnB;AACA,OAAOC,IAAP,MAAiB,oBAAjB;AACA,OAAOC,UAAP,MAAuB,8BAAvB;AACA,OAAOC,MAAP,MAAmB,sBAAnB;AACA,OAAOC,IAAP,MAAiB,wBAAjB;AACA,OAAOC,QAAP,MAAqB,4BAArB;AACA,OAAOC,SAAP,MAAsB,wCAAtB;AACA,OAAOC,WAAP,MAAwB,iBAAxB;AACA,OAAOC,iBAAP,MAA8B,8BAA9B;AACA,OAAOC,KAAP,MAAkB,eAAlB;;AAEA,MAAMC,MAAM,GAAGC,KAAK,iBAAI,oBAAC,WAAD,EAAiBA,KAAjB,CAAxB;;AAEA,MAAMC,YAAY,GAAG,CAAC;AAACC,EAAAA,KAAD;AAAQC,EAAAA,MAA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5C,QAApC,CADF,CADF,CADF,CA7BF,CADF;AAuCF,SAAOA,QAAP;AACD,CA3CD;;AA6CAa,OAAO,CAACZ,YAAR,GAAuB;AACrBT,EAAAA,IAAI,EAAE/D,QAAQ,CAACyE,iBAAT,CAA2BV;AADZ,CAAvB;AAIAqB,OAAO,CAACxD,SAAR,2CAAoB;AAClByD,EAAAA,MAAM,EAAEzF,SAAS,CAACkC,KAAV,CAAgBtB,WAAW,CAACoB,SAA5B,CADU;AAElBuD,EAAAA,MAAM,EAAEvF,SAAS,CAACkC,KAAV,CAAgB;AACtBd,IAAAA,KAAK,EAAEpB,SAAS,CAACiC,MADK;AAEtBuF,IAAAA,IAAI,EAAExH,SAAS,CAACyH,GAFM;AAGtBzD,IAAAA,OAAO,EAAEhE,SAAS,CAAC0H;AAHG,GAAhB,CAFU;AAOlB/B,EAAAA,OAAO,EAAE3F,SAAS,CAACkC,KAAV,CAAgB4C,cAAc,CAAC9C,SAA/B,CAPS;AAQlB4D,EAAAA,MAAM,EAAE5F,SAAS,CAACkC,KAAV,CAAgB;AACtBsB,IAAAA,IAAI,EAAExD,SAAS,CAAC2D,KAAV,CAAgB,MAAKR,OAAL,CAAhB,EAA+BwE;AADf,GAAhB,CARU;AAWlBjC,EAAAA,cAAc,EAAE1F,SAAS,CAACkC,KAAV,CAAgBvB,SAAS,CAACqB,SAA1B,CAXE;AAYlB6D,EAAAA,QAAQ,EAAE7F,SAAS,CAACkC,KAAV,CAAgBxB,QAAQ,CAACsB,SAAzB,CAZQ;AAalB8D,EAAAA,IAAI,EAAE9F,SAAS,CAAC2D,KAAV,CAAgB,CAAC,OAAD,EAAU,SAAV,CAAhB;AAbY,CAApB;AAgBA,eAAe6B,OAAf","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {get, getOr, keys, isEmpty} from 'lodash/fp';\nimport classnames from 'classnames';\nimport {NovaSolidStatusCheckCircle2 as CheckIcon} from '@coorpacademy/nova-icons';\nimport Provider from '../../../atom/provider';\nimport Button from '../../../atom/button';\nimport Link from '../../../atom/link';\nimport Discussion from '../../../organism/discussion';\nimport Loader from '../../../atom/loader';\nimport Card from '../../../molecule/card';\nimport Feedback from '../../../molecule/feedback';\nimport CardsList from '../../../molecule/dashboard/cards-list';\nimport PopinHeader from '../popin-header';\nimport AtomLottieWrapper from '../../../atom/lottie-wrapper';\nimport style from './summary.css';\n\nconst Header = props => <PopinHeader {...props} />;\n\nconst SimpleAction = ({color, prefix, title, button}) => {\n const {title: buttonTitle, ...linkProps} = button;\n return (\n <div data-name=\"simpleAction\" className={style.simpleWrapper}>\n <div className={style.simpleTexts}>\n <span data-name=\"simplePrefix\" className={style.simplePrefix}>\n {prefix}\n </span>\n <span\n data-name=\"simpleTitle\"\n className={classnames(style.simpleTitle, style.innerHTML)}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: title}}\n />\n </div>\n <Button\n {...linkProps}\n type=\"link\"\n style={{\n backgroundColor: color\n }}\n className={style.simpleButton}\n submitValue={buttonTitle}\n />\n </div>\n );\n};\nSimpleAction.propTypes = {\n color: PropTypes.string,\n prefix: PropTypes.string,\n title: PropTypes.string,\n button: PropTypes.shape(Button.propTypes)\n};\n\nconst NextCourse = ({title, prefix, card}) => (\n <div data-name=\"nextCourse\" className={style.nextCourseWrapper}>\n <div className={style.nextCourseTexts}>\n <div className={style.nextCoursePrefix}>{prefix}</div>\n <div\n className={classnames(style.nextCourseTitle, style.innerHTML)}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: title}}\n />\n </div>\n <div className={style.nextCourseCard}>\n <Card {...card} dataName={'popin-end-next-course'} />\n </div>\n </div>\n);\nNextCourse.propTypes = {\n title: PropTypes.string,\n prefix: PropTypes.string,\n card: PropTypes.shape(CardsList.propTypes)\n};\n\nconst Subscribe = ({title, description, button, card}) => {\n const {title: buttonTitle, ...linkProps} = button;\n return (\n <div className={style.subscribeWrapper}>\n <div className={style.subscribeTexts}>\n <div className={style.subscribeDescription}>{description}</div>\n <div\n className={classnames(style.subscribeTitle, style.innerHTML)}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: title}}\n />\n <div className={style.subscribeButtonWrapper}>\n <Button\n {...linkProps}\n type=\"link\"\n className={style.subscribeButton}\n submitValue={buttonTitle}\n />\n </div>\n </div>\n <div>\n <Card {...card} dataName={'popin-end-subscribe'} />\n </div>\n </div>\n );\n};\n\nSubscribe.propTypes = {\n ...Button.propTypes.propTypes,\n title: Button.propTypes.submitValue\n};\n\nconst actions = {\n simple: SimpleAction,\n subscribe: Subscribe,\n nextCourse: NextCourse\n};\n\nconst Action = props => {\n const {type, ...actionProps} = props;\n const Type = get(type, actions);\n\n return Type ? <Type {...actionProps} /> : null;\n};\n\nAction.propTypes = {\n type: PropTypes.oneOf(keys(actions))\n};\n\nconst CardsLoader = () => (\n <div className={style.loaderWrapper}>\n <Loader />\n </div>\n);\n\nconst CommentConfirmation = (props, context) => {\n const {onClick, commentSectionTitle, confirmationLinkText} = props;\n const {skin} = context;\n const dark = get('common.dark', skin);\n\n return (\n <div className={style.commentSection}>\n <div className={style.commentSectionIconWrapper}>\n <CheckIcon className={style.commentSectionIcon} color={dark} />\n </div>\n <div className={style.commentSectionTexts}>\n <p>{commentSectionTitle}</p>\n <Link onClick={onClick} className={style.commentSectionLink}>\n {confirmationLinkText}\n </Link>\n </div>\n </div>\n );\n};\n\nCommentConfirmation.propTypes = {\n commentSectionTitle: PropTypes.node,\n confirmationLinkText: Link.propTypes.children,\n onClick: Link.propTypes.onClick\n};\n\nCommentConfirmation.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nconst CommentSection = props => {\n const {isSent, edition, confirmation} = props;\n if (isSent) {\n const {onClick, commentSectionTitle, confirmationLinkText} = confirmation;\n return (\n <CommentConfirmation\n onClick={onClick}\n commentSectionTitle={commentSectionTitle}\n confirmationLinkText={confirmationLinkText}\n />\n );\n }\n\n return <Discussion {...edition} />;\n};\n\nCommentSection.propTypes = {\n isSent: PropTypes.bool,\n edition: PropTypes.shape(Discussion.propTypes),\n confirmation: PropTypes.shape(CommentConfirmation.propTypes)\n};\n\nconst Cards = props => {\n const {cards} = props;\n\n return get('cards', props) === null ? (\n <CardsLoader />\n ) : (\n (isEmpty(cards) ? null : (\n <div className={style.cardsWrapper}>\n <CardsList {...props} dataName={'popin-end-recommendation'} />\n </div>\n )) || null\n );\n};\n\nCards.propTypes = CardsList.propTypes;\n\nconst Footer = ({title, color, ...linkProps}) => (\n <Link\n {...linkProps}\n style={{\n color\n }}\n className={style.footer}\n data-name=\"nextLink\"\n data-popin=\"popinEnd\"\n data-next=\"home\"\n >\n {title}\n </Link>\n);\n\nFooter.propTypes = {\n ...Link.propTypes,\n title: Link.propTypes.children,\n color: PropTypes.string\n};\n\nconst Summary = (props, context) => {\n const {header, recommendation, comment, footer, action, feedback, mode} = props;\n const {skin} = context;\n const primary = getOr('#f0f', 'common.primary', skin);\n const commentView =\n comment && header ? (\n <div className={style.discussionWrapper}>\n <CommentSection {...comment} />\n </div>\n ) : null;\n const footerView = footer && header ? <Footer {...footer} color={primary} /> : null;\n const feedbackView = feedback ? <Feedback {...feedback} mode={mode} /> : null;\n\n return (\n <BackgroundScorm mode={mode} failed={header.failed}>\n <div className={mode !== 'scorm' ? style.summaryWrapper : null}>\n <Header {...header} mode={mode} />\n {feedbackView}\n <Action {...action} color={primary} />\n <Cards {...recommendation} />\n {commentView}\n {footerView}\n </div>\n </BackgroundScorm>\n );\n};\n\nconst BackgroundScorm = props => {\n const {mode = 'default', children, failed} = props;\n if (mode === 'scorm')\n return (\n <div className={style.organismPlayerResultContainerScorm}>\n <div className={style.animationContainer}>\n {!failed ? (\n <AtomLottieWrapper\n {...{\n 'aria-label': 'aria lottie',\n 'data-name': 'default-lottie',\n className: undefined,\n animationSrc:\n 'https://static-staging.coorpacademy.com/animations/review/confetti.json',\n loop: undefined,\n autoplay: true,\n rendererSettings: {\n hideOnTransparent: false,\n animationClassName: ''\n },\n ie11ImageBackup:\n 'https://static-staging.coorpacademy.com/animations/review/conffeti_congrats.svg',\n animationControl: undefined\n }}\n loop={false}\n animationControl={'play'}\n autoplay\n data-name=\"lottie-wrapper\"\n className={style.lottie}\n backupImageClassName={style.ie11Backup}\n />\n ) : null}\n </div>\n <div>\n <div className={style.largeCircle}>\n <div className={style.mediumCircle}>\n <div className={style.smallCircle}>{children}</div>\n </div>\n </div>\n </div>\n </div>\n );\n return children;\n};\n\nSummary.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nSummary.propTypes = {\n header: PropTypes.shape(PopinHeader.propTypes),\n footer: PropTypes.shape({\n title: PropTypes.string,\n href: PropTypes.url,\n onClick: PropTypes.func\n }),\n comment: PropTypes.shape(CommentSection.propTypes),\n action: PropTypes.shape({\n type: PropTypes.oneOf(keys(actions)).isRequired\n }),\n recommendation: PropTypes.shape(CardsList.propTypes),\n feedback: PropTypes.shape(Feedback.propTypes),\n mode: PropTypes.oneOf(['scorm', 'default'])\n};\n\nexport default Summary;\n"],"file":"summary.js"}
|
|
1
|
+
{"version":3,"sources":["../../../../src/template/app-player/popin-end/summary.js"],"names":["React","PropTypes","classnames","NovaSolidStatusCheckCircle2","CheckIcon","Provider","Button","Link","Discussion","Loader","Card","Feedback","CardsList","PopinHeader","AtomLottieWrapper","style","Header","props","SimpleAction","color","prefix","title","button","buttonTitle","linkProps","simpleWrapper","simpleTexts","simplePrefix","simpleTitle","innerHTML","__html","backgroundColor","simpleButton","propTypes","string","shape","NextCourse","card","nextCourseWrapper","nextCourseTexts","nextCoursePrefix","nextCourseTitle","nextCourseCard","Subscribe","description","subscribeWrapper","subscribeTexts","subscribeDescription","subscribeTitle","subscribeButtonWrapper","subscribeButton","submitValue","actions","simple","subscribe","nextCourse","Action","type","actionProps","Type","oneOf","CardsLoader","loaderWrapper","CommentConfirmation","context","onClick","commentSectionTitle","confirmationLinkText","skin","dark","commentSection","commentSectionIconWrapper","commentSectionIcon","commentSectionTexts","commentSectionLink","node","children","contextTypes","childContextTypes","CommentSection","isSent","edition","confirmation","bool","Cards","cards","cardsWrapper","Footer","footer","Summary","header","recommendation","comment","action","feedback","mode","primary","commentView","discussionWrapper","footerView","feedbackView","failed","summaryWrapper","BackgroundScorm","organismPlayerResultContainerScorm","animationContainer","className","undefined","animationSrc","loop","autoplay","rendererSettings","hideOnTransparent","animationClassName","ie11ImageBackup","animationControl","lottie","ie11Backup","background","largeCircle","mediumCircle","smallCircle","content","href","url","func","isRequired"],"mappings":";;;;;;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,OAAOC,UAAP,MAAuB,YAAvB;AACA,SAAQC,2BAA2B,IAAIC,SAAvC,QAAuD,0BAAvD;AACA,OAAOC,QAAP,MAAqB,wBAArB;AACA,OAAOC,MAAP,MAAmB,sBAAnB;AACA,OAAOC,IAAP,MAAiB,oBAAjB;AACA,OAAOC,UAAP,MAAuB,8BAAvB;AACA,OAAOC,MAAP,MAAmB,sBAAnB;AACA,OAAOC,IAAP,MAAiB,wBAAjB;AACA,OAAOC,QAAP,MAAqB,4BAArB;AACA,OAAOC,SAAP,MAAsB,wCAAtB;AACA,OAAOC,WAAP,MAAwB,iBAAxB;AACA,OAAOC,iBAAP,MAA8B,8BAA9B;AACA,OAAOC,KAAP,MAAkB,eAAlB;;AAEA,MAAMC,MAAM,GAAGC,KAAK,iBAAI,oBAAC,WAAD,EAAiBA,KAAjB,CAAxB;;AAEA,MAAMC,YAAY,GAAG,CAAC;AAACC,EAAAA,KAAD;AAAQC,EAAAA,MAAR;AAAgBC,EAAAA,KAAhB;AAAuBC,EAAAA;AAAvB,CAAD,KAAoC;AACvD,QAAM;AAACD,IAAAA,KAAK,EAAEE;AAAR,MAAqCD,MAA3C;AAAA,QAA8BE,SAA9B,iCAA2CF,MAA3C;;AACA,sBACE;AAAK,iBAAU,cAAf;AAA8B,IAAA,SAAS,EAAEP,KAAK,CAACU;AAA/C,kBACE;AAAK,IAAA,S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,OAAO,CAACZ,YAAR,GAAuB;AACrBT,EAAAA,IAAI,EAAE/D,QAAQ,CAACyE,iBAAT,CAA2BV;AADZ,CAAvB;AAIAqB,OAAO,CAACxD,SAAR,2CAAoB;AAClByD,EAAAA,MAAM,EAAEzF,SAAS,CAACkC,KAAV,CAAgBtB,WAAW,CAACoB,SAA5B,CADU;AAElBuD,EAAAA,MAAM,EAAEvF,SAAS,CAACkC,KAAV,CAAgB;AACtBd,IAAAA,KAAK,EAAEpB,SAAS,CAACiC,MADK;AAEtByF,IAAAA,IAAI,EAAE1H,SAAS,CAAC2H,GAFM;AAGtB3D,IAAAA,OAAO,EAAEhE,SAAS,CAAC4H;AAHG,GAAhB,CAFU;AAOlBjC,EAAAA,OAAO,EAAE3F,SAAS,CAACkC,KAAV,CAAgB4C,cAAc,CAAC9C,SAA/B,CAPS;AAQlB4D,EAAAA,MAAM,EAAE5F,SAAS,CAACkC,KAAV,CAAgB;AACtBsB,IAAAA,IAAI,EAAExD,SAAS,CAAC2D,KAAV,CAAgB,MAAKR,OAAL,CAAhB,EAA+B0E;AADf,GAAhB,CARU;AAWlBnC,EAAAA,cAAc,EAAE1F,SAAS,CAACkC,KAAV,CAAgBvB,SAAS,CAACqB,SAA1B,CAXE;AAYlB6D,EAAAA,QAAQ,EAAE7F,SAAS,CAACkC,KAAV,CAAgBxB,QAAQ,CAACsB,SAAzB,CAZQ;AAalB8D,EAAAA,IAAI,EAAE9F,SAAS,CAAC2D,KAAV,CAAgB,CAAC,OAAD,EAAU,SAAV,CAAhB;AAbY,CAApB;AAgBA,eAAe6B,OAAf","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {get, getOr, keys, isEmpty} from 'lodash/fp';\nimport classnames from 'classnames';\nimport {NovaSolidStatusCheckCircle2 as CheckIcon} from '@coorpacademy/nova-icons';\nimport Provider from '../../../atom/provider';\nimport Button from '../../../atom/button';\nimport Link from '../../../atom/link';\nimport Discussion from '../../../organism/discussion';\nimport Loader from '../../../atom/loader';\nimport Card from '../../../molecule/card';\nimport Feedback from '../../../molecule/feedback';\nimport CardsList from '../../../molecule/dashboard/cards-list';\nimport PopinHeader from '../popin-header';\nimport AtomLottieWrapper from '../../../atom/lottie-wrapper';\nimport style from './summary.css';\n\nconst Header = props => <PopinHeader {...props} />;\n\nconst SimpleAction = ({color, prefix, title, button}) => {\n const {title: buttonTitle, ...linkProps} = button;\n return (\n <div data-name=\"simpleAction\" className={style.simpleWrapper}>\n <div className={style.simpleTexts}>\n <span data-name=\"simplePrefix\" className={style.simplePrefix}>\n {prefix}\n </span>\n <span\n data-name=\"simpleTitle\"\n className={classnames(style.simpleTitle, style.innerHTML)}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: title}}\n />\n </div>\n <Button\n {...linkProps}\n type=\"link\"\n style={{\n backgroundColor: color\n }}\n className={style.simpleButton}\n submitValue={buttonTitle}\n />\n </div>\n );\n};\nSimpleAction.propTypes = {\n color: PropTypes.string,\n prefix: PropTypes.string,\n title: PropTypes.string,\n button: PropTypes.shape(Button.propTypes)\n};\n\nconst NextCourse = ({title, prefix, card}) => (\n <div data-name=\"nextCourse\" className={style.nextCourseWrapper}>\n <div className={style.nextCourseTexts}>\n <div className={style.nextCoursePrefix}>{prefix}</div>\n <div\n className={classnames(style.nextCourseTitle, style.innerHTML)}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: title}}\n />\n </div>\n <div className={style.nextCourseCard}>\n <Card {...card} dataName={'popin-end-next-course'} />\n </div>\n </div>\n);\nNextCourse.propTypes = {\n title: PropTypes.string,\n prefix: PropTypes.string,\n card: PropTypes.shape(CardsList.propTypes)\n};\n\nconst Subscribe = ({title, description, button, card}) => {\n const {title: buttonTitle, ...linkProps} = button;\n return (\n <div className={style.subscribeWrapper}>\n <div className={style.subscribeTexts}>\n <div className={style.subscribeDescription}>{description}</div>\n <div\n className={classnames(style.subscribeTitle, style.innerHTML)}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: title}}\n />\n <div className={style.subscribeButtonWrapper}>\n <Button\n {...linkProps}\n type=\"link\"\n className={style.subscribeButton}\n submitValue={buttonTitle}\n />\n </div>\n </div>\n <div>\n <Card {...card} dataName={'popin-end-subscribe'} />\n </div>\n </div>\n );\n};\n\nSubscribe.propTypes = {\n ...Button.propTypes.propTypes,\n title: Button.propTypes.submitValue\n};\n\nconst actions = {\n simple: SimpleAction,\n subscribe: Subscribe,\n nextCourse: NextCourse\n};\n\nconst Action = props => {\n const {type, ...actionProps} = props;\n const Type = get(type, actions);\n\n return Type ? <Type {...actionProps} /> : null;\n};\n\nAction.propTypes = {\n type: PropTypes.oneOf(keys(actions))\n};\n\nconst CardsLoader = () => (\n <div className={style.loaderWrapper}>\n <Loader />\n </div>\n);\n\nconst CommentConfirmation = (props, context) => {\n const {onClick, commentSectionTitle, confirmationLinkText} = props;\n const {skin} = context;\n const dark = get('common.dark', skin);\n\n return (\n <div className={style.commentSection}>\n <div className={style.commentSectionIconWrapper}>\n <CheckIcon className={style.commentSectionIcon} color={dark} />\n </div>\n <div className={style.commentSectionTexts}>\n <p>{commentSectionTitle}</p>\n <Link onClick={onClick} className={style.commentSectionLink}>\n {confirmationLinkText}\n </Link>\n </div>\n </div>\n );\n};\n\nCommentConfirmation.propTypes = {\n commentSectionTitle: PropTypes.node,\n confirmationLinkText: Link.propTypes.children,\n onClick: Link.propTypes.onClick\n};\n\nCommentConfirmation.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nconst CommentSection = props => {\n const {isSent, edition, confirmation} = props;\n if (isSent) {\n const {onClick, commentSectionTitle, confirmationLinkText} = confirmation;\n return (\n <CommentConfirmation\n onClick={onClick}\n commentSectionTitle={commentSectionTitle}\n confirmationLinkText={confirmationLinkText}\n />\n );\n }\n\n return <Discussion {...edition} />;\n};\n\nCommentSection.propTypes = {\n isSent: PropTypes.bool,\n edition: PropTypes.shape(Discussion.propTypes),\n confirmation: PropTypes.shape(CommentConfirmation.propTypes)\n};\n\nconst Cards = props => {\n const {cards} = props;\n\n return get('cards', props) === null ? (\n <CardsLoader />\n ) : (\n (isEmpty(cards) ? null : (\n <div className={style.cardsWrapper}>\n <CardsList {...props} dataName={'popin-end-recommendation'} />\n </div>\n )) || null\n );\n};\n\nCards.propTypes = CardsList.propTypes;\n\nconst Footer = ({title, color, ...linkProps}) => (\n <Link\n {...linkProps}\n style={{\n color\n }}\n className={style.footer}\n data-name=\"nextLink\"\n data-popin=\"popinEnd\"\n data-next=\"home\"\n >\n {title}\n </Link>\n);\n\nFooter.propTypes = {\n ...Link.propTypes,\n title: Link.propTypes.children,\n color: PropTypes.string\n};\n\nconst Summary = (props, context) => {\n const {header, recommendation, comment, footer, action, feedback, mode} = props;\n const {skin} = context;\n const primary = getOr('#f0f', 'common.primary', skin);\n const commentView =\n mode !== 'scorm' && comment && header ? (\n <div className={style.discussionWrapper}>\n <CommentSection {...comment} />\n </div>\n ) : null;\n const footerView =\n mode !== 'scorm' && footer && header ? <Footer {...footer} color={primary} /> : null;\n const feedbackView = feedback ? <Feedback {...feedback} mode={mode} /> : null;\n\n return (\n <BackgroundScorm mode={mode} failed={header.failed}>\n <div className={mode !== 'scorm' ? style.summaryWrapper : null}>\n <Header {...header} mode={mode} />\n {feedbackView}\n <Action {...action} color={primary} />\n <Cards {...recommendation} />\n {commentView}\n {footerView}\n </div>\n </BackgroundScorm>\n );\n};\n\nconst BackgroundScorm = props => {\n const {mode = 'default', children, failed} = props;\n if (mode === 'scorm')\n return (\n <div className={style.organismPlayerResultContainerScorm}>\n <div className={style.animationContainer}>\n {failed === false ? (\n <AtomLottieWrapper\n {...{\n 'aria-label': 'aria lottie',\n 'data-name': 'default-lottie',\n className: undefined,\n animationSrc:\n 'https://static-staging.coorpacademy.com/animations/review/confetti.json',\n loop: undefined,\n autoplay: true,\n rendererSettings: {\n hideOnTransparent: false,\n animationClassName: ''\n },\n ie11ImageBackup:\n 'https://static-staging.coorpacademy.com/animations/review/conffeti_congrats.svg',\n animationControl: undefined\n }}\n loop={false}\n animationControl={'play'}\n autoplay\n data-name=\"lottie-wrapper\"\n className={style.lottie}\n backupImageClassName={style.ie11Backup}\n />\n ) : null}\n </div>\n <div className={style.background}>\n <div className={style.largeCircle} />\n <div className={style.mediumCircle} />\n <div className={style.smallCircle} />\n </div>\n <div className={style.content}>{children}</div>\n </div>\n );\n return children;\n};\n\nSummary.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nSummary.propTypes = {\n header: PropTypes.shape(PopinHeader.propTypes),\n footer: PropTypes.shape({\n title: PropTypes.string,\n href: PropTypes.url,\n onClick: PropTypes.func\n }),\n comment: PropTypes.shape(CommentSection.propTypes),\n action: PropTypes.shape({\n type: PropTypes.oneOf(keys(actions)).isRequired\n }),\n recommendation: PropTypes.shape(CardsList.propTypes),\n feedback: PropTypes.shape(Feedback.propTypes),\n mode: PropTypes.oneOf(['scorm', 'default'])\n};\n\nexport default Summary;\n"],"file":"summary.js"}
|
|
@@ -274,7 +274,7 @@ const CorrectionPart = props => {
|
|
|
274
274
|
return /*#__PURE__*/React.createElement("div", {
|
|
275
275
|
"data-name": "correctionSection",
|
|
276
276
|
className: className
|
|
277
|
-
}, mode === 'scorm' && renderIconStatusScorm(failed), /*#__PURE__*/React.createElement("div", {
|
|
277
|
+
}, mode === 'scorm' && !isLoading && renderIconStatusScorm(failed), /*#__PURE__*/React.createElement("div", {
|
|
278
278
|
className: buildDefaultOrScormStyle(style.titlesWrapper, mode, style.titlesWrapperScorm, failed)
|
|
279
279
|
}, isLoading ? /*#__PURE__*/React.createElement(Loader, null) : null, /*#__PURE__*/React.createElement("h1", {
|
|
280
280
|
"data-name": "title",
|
|
@@ -287,7 +287,7 @@ const CorrectionPart = props => {
|
|
|
287
287
|
className: buildDefaultOrScormStyle(style.subtitle, mode, style.resultSubtitleScorm, failed, style.statusPlayerResultFailScorm)
|
|
288
288
|
}, subtitle), failed && !_isEmpty(corrections) ? /*#__PURE__*/React.createElement(AnswersCorrection, {
|
|
289
289
|
corrections: corrections
|
|
290
|
-
}) : null), /*#__PURE__*/React.createElement(IconsPart, props));
|
|
290
|
+
}) : null), mode !== 'scorm' ? /*#__PURE__*/React.createElement(IconsPart, props) : null);
|
|
291
291
|
};
|
|
292
292
|
|
|
293
293
|
CorrectionPart.propTypes = process.env.NODE_ENV !== "production" ? _extends(_extends({}, IconsPart.propTypes), {}, {
|
|
@@ -307,7 +307,8 @@ const NextQuestionPart = (props, context) => {
|
|
|
307
307
|
extraLifeGranted,
|
|
308
308
|
gameOver,
|
|
309
309
|
failed = false,
|
|
310
|
-
lives = 0
|
|
310
|
+
lives = 0,
|
|
311
|
+
mode
|
|
311
312
|
} = props;
|
|
312
313
|
|
|
313
314
|
const _ref = cta || {},
|
|
@@ -357,7 +358,7 @@ const NextQuestionPart = (props, context) => {
|
|
|
357
358
|
__html: nextStepTitle
|
|
358
359
|
}
|
|
359
360
|
}) : null;
|
|
360
|
-
return /*#__PURE__*/React.createElement(Link, _extends({}, linkProps, {
|
|
361
|
+
return mode !== 'scorm' ? /*#__PURE__*/React.createElement(Link, _extends({}, linkProps, {
|
|
361
362
|
className: classnames(style.nextSection, getLinkStyle({
|
|
362
363
|
gameOver,
|
|
363
364
|
extraLifeGranted
|
|
@@ -372,7 +373,7 @@ const NextQuestionPart = (props, context) => {
|
|
|
372
373
|
}, title, /*#__PURE__*/React.createElement(ArrowRight, {
|
|
373
374
|
color: "inherit",
|
|
374
375
|
className: style.nextButtonIcon
|
|
375
|
-
})), nextStep));
|
|
376
|
+
})), nextStep)) : null;
|
|
376
377
|
};
|
|
377
378
|
|
|
378
379
|
NextQuestionPart.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
@@ -385,7 +386,8 @@ NextQuestionPart.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
385
386
|
extraLifeGranted: PropTypes.bool,
|
|
386
387
|
gameOver: PropTypes.bool,
|
|
387
388
|
failed: PropTypes.bool,
|
|
388
|
-
lives: PropTypes.number
|
|
389
|
+
lives: PropTypes.number,
|
|
390
|
+
mode: PropTypes.string
|
|
389
391
|
} : {};
|
|
390
392
|
|
|
391
393
|
const PopinHeader = (props, context) => {
|
|
@@ -411,14 +413,15 @@ const PopinHeader = (props, context) => {
|
|
|
411
413
|
extraLifeGranted: extraLifeGranted,
|
|
412
414
|
failed: failed,
|
|
413
415
|
gameOver: gameOver,
|
|
414
|
-
lives: lives
|
|
416
|
+
lives: lives,
|
|
417
|
+
mode: mode
|
|
415
418
|
}) : null;
|
|
416
419
|
return /*#__PURE__*/React.createElement("div", {
|
|
417
|
-
className: cta ? style.header : style.headerWithoutCTA,
|
|
420
|
+
className: classnames(mode === 'scorm' && style.scorm, cta ? mode !== 'scorm' && style.header : mode !== 'scorm' && style.headerWithoutCTA),
|
|
418
421
|
"data-name": "popinHeader",
|
|
419
422
|
"data-state": state
|
|
420
423
|
}, /*#__PURE__*/React.createElement("div", {
|
|
421
|
-
className: mode !== 'scorm'
|
|
424
|
+
className: mode !== 'scorm' && style.headerTitle
|
|
422
425
|
}, /*#__PURE__*/React.createElement(CorrectionPart, {
|
|
423
426
|
title: title,
|
|
424
427
|
subtitle: subtitle,
|