@coorpacademy/components 11.13.7-alpha.12 → 11.13.7-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/molecule/cm-popin/index.d.ts.map +1 -1
- package/es/molecule/cm-popin/index.js +2 -3
- package/es/molecule/cm-popin/index.js.map +1 -1
- package/es/molecule/cm-popin/style.css +38 -50
- package/es/molecule/discipline-header/index.d.ts +2 -0
- package/es/molecule/discipline-header/index.d.ts.map +1 -1
- package/es/molecule/discipline-header/index.js +28 -9
- package/es/molecule/discipline-header/index.js.map +1 -1
- package/es/molecule/discipline-header/style.css +40 -7
- package/es/template/common/discipline/index.d.ts.map +1 -1
- package/es/template/common/discipline/index.js +6 -2
- package/es/template/common/discipline/index.js.map +1 -1
- package/es/template/external-course/index.d.ts +0 -52
- package/es/template/external-course/index.d.ts.map +1 -1
- package/es/template/external-course/index.js +3 -10
- package/es/template/external-course/index.js.map +1 -1
- package/es/template/external-course/style.css +1 -1
- package/lib/molecule/cm-popin/index.d.ts.map +1 -1
- package/lib/molecule/cm-popin/index.js +1 -2
- package/lib/molecule/cm-popin/index.js.map +1 -1
- package/lib/molecule/cm-popin/style.css +38 -50
- package/lib/molecule/discipline-header/index.d.ts +2 -0
- package/lib/molecule/discipline-header/index.d.ts.map +1 -1
- package/lib/molecule/discipline-header/index.js +29 -9
- package/lib/molecule/discipline-header/index.js.map +1 -1
- package/lib/molecule/discipline-header/style.css +40 -7
- package/lib/template/common/discipline/index.d.ts.map +1 -1
- package/lib/template/common/discipline/index.js +6 -2
- package/lib/template/common/discipline/index.js.map +1 -1
- package/lib/template/external-course/index.d.ts +0 -52
- package/lib/template/external-course/index.d.ts.map +1 -1
- package/lib/template/external-course/index.js +3 -10
- package/lib/template/external-course/index.js.map +1 -1
- package/lib/template/external-course/style.css +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/cm-popin/index.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/cm-popin/index.js"],"names":[],"mappings":";AAcA,kDAiLC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { NovaSolidInterfaceFeedbackInterfaceAlertDiamond as AlertDiamond, NovaSolidApplicationsWindowUpload3 as WindowUpload, NovaLineSettingsCookie as Cookie, NovaSolidSpaceMoonRocket as MoonRocket
|
|
2
|
+
import { NovaSolidInterfaceFeedbackInterfaceAlertDiamond as AlertDiamond, NovaSolidApplicationsWindowUpload3 as WindowUpload, NovaLineSettingsCookie as Cookie, NovaSolidSpaceMoonRocket as MoonRocket } from '@coorpacademy/nova-icons';
|
|
3
3
|
import map from 'lodash/fp/map';
|
|
4
4
|
import Cta from '../../atom/button-link';
|
|
5
5
|
import ButtonLinkIconOnly from '../../atom/button-link-icon-only';
|
|
@@ -26,8 +26,7 @@ const CMPopin = props => {
|
|
|
26
26
|
const logo = {
|
|
27
27
|
AlertDiamond,
|
|
28
28
|
WindowUpload,
|
|
29
|
-
MoonRocket
|
|
30
|
-
CheckCircle1
|
|
29
|
+
MoonRocket
|
|
31
30
|
};
|
|
32
31
|
const LogoComponent = logo[icon];
|
|
33
32
|
const backgroundImageStyle = backgroundImageUrl ? {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","NovaSolidInterfaceFeedbackInterfaceAlertDiamond","AlertDiamond","NovaSolidApplicationsWindowUpload3","WindowUpload","NovaLineSettingsCookie","Cookie","NovaSolidSpaceMoonRocket","MoonRocket","NovaLineStatusCheckCircle1","CheckCircle1","map","Cta","ButtonLinkIconOnly","InputSwitch","style","propTypes","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","cookieTitleContainer","titleContainer","contentSection","message","__html","descriptionBtn","buttonContainer","largeButton","button","label","handleOnclick","customStyle"],"sources":["../../../src/molecule/cm-popin/index.js"],"sourcesContent":["import React from 'react';\nimport {\n NovaSolidInterfaceFeedbackInterfaceAlertDiamond as AlertDiamond,\n NovaSolidApplicationsWindowUpload3 as WindowUpload,\n NovaLineSettingsCookie as Cookie,\n NovaSolidSpaceMoonRocket as MoonRocket,\n NovaLineStatusCheckCircle1 as CheckCircle1\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';\nimport propTypes from './types';\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 CheckCircle1\n };\n const LogoComponent = logo[icon];\n\n const backgroundImageStyle = backgroundImageUrl\n ? {\n backgroundImage: `url(${backgroundImageUrl})`,\n backgroundSize: 'cover'\n }\n : null;\n const 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\n className={\n mode === 'cookie' || mode === 'information'\n ? style.cookieTitleContainer\n : style.titleContainer\n }\n >\n <div className={style.contentSection}>\n {LogoComponent ? <LogoComponent className={style.icon} /> : null}\n {content ? (\n <p\n className={mode === 'alert' ? style.content : style.message}\n data-name={'cm-popin-content'}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: content}}\n />\n ) : null}\n </div>\n {descriptionText ? (\n <p\n className={style.descriptionText}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: descriptionText}}\n />\n ) : null}\n </div>\n {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 customStyle={secondButton.customStyle}\n />\n </div>\n ) : null}\n {thirdButton ? (\n <div className={thirdButton.largeButton ? style.largeButton : style.button}>\n <Cta\n label={thirdButton.label}\n onClick={thirdButton.handleOnclick}\n data-name={`cm-popin-cta-${thirdButton.type}`}\n aria-label={thirdButton['aria-label']}\n type={thirdButton.type}\n customStyle={thirdButton.customStyle}\n />\n </div>\n ) : null}\n </div>\n </div>\n </div>\n );\n};\n\nCMPopin.propTypes = propTypes;\n\nexport default CMPopin;\n"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SACEC,+CAA+C,IAAIC,YADrD,EAEEC,kCAAkC,IAAIC,YAFxC,EAGEC,sBAAsB,IAAIC,MAH5B,EAIEC,wBAAwB,IAAIC,UAJ9B,EAKEC,0BAA0B,IAAIC,YALhC,QAMO,0BANP;AAOA,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;AACA,OAAOC,SAAP,MAAsB,SAAtB;;AAEA,MAAMC,OAAO,GAAGC,KAAK,IAAI;EACvB,MAAM;IACJC,OADI;IAEJC,IAAI,GAAG,OAFH;IAGJC,WAHI;IAIJC,YAJI;IAKJC,OALI;IAMJC,MANI;IAOJC,IAPI;IAQJC,kBARI;IASJC,eATI;IAUJC,WAVI;IAWJC,WAXI;IAYJC,iBAZI;IAaJC;EAbI,IAcFb,KAdJ;EAgBA,MAAMc,IAAI,GAAG;IACX9B,YADW;IAEXE,YAFW;IAGXI,UAHW;IAIXE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A0B5D,KAAK,CAAC4D,WAAhC,GAA8C5D,KAAK,CAAC6D;EAApE,gBACE,oBAAC,GAAD;IACE,KAAK,EAAEhD,WAAW,CAACiD,KADrB;IAEE,OAAO,EAAEjD,WAAW,CAACkD,aAFvB;IAGE,aAAY,gBAAelD,WAAW,CAACyB,IAAK,EAH9C;IAIE,cAAYzB,WAAW,CAAC,YAAD,CAJzB;IAKE,IAAI,EAAEA,WAAW,CAACyB,IALpB;IAME,WAAW,EAAEzB,WAAW,CAACmD;EAN3B,EADF,CADU,GAWR,IApCN,CAzCF,CALF,CADF;AAwFD,CAlLD;;AAoLA9D,OAAO,CAACD,SAAR,2CAAoBA,SAApB;AAEA,eAAeC,OAAf"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","NovaSolidInterfaceFeedbackInterfaceAlertDiamond","AlertDiamond","NovaSolidApplicationsWindowUpload3","WindowUpload","NovaLineSettingsCookie","Cookie","NovaSolidSpaceMoonRocket","MoonRocket","map","Cta","ButtonLinkIconOnly","InputSwitch","style","propTypes","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","cookieTitleContainer","titleContainer","contentSection","message","__html","descriptionBtn","buttonContainer","largeButton","button","label","handleOnclick","customStyle"],"sources":["../../../src/molecule/cm-popin/index.js"],"sourcesContent":["import React from 'react';\nimport {\n NovaSolidInterfaceFeedbackInterfaceAlertDiamond as AlertDiamond,\n NovaSolidApplicationsWindowUpload3 as WindowUpload,\n NovaLineSettingsCookie as Cookie,\n NovaSolidSpaceMoonRocket as MoonRocket\n} 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';\nimport propTypes from './types';\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\n className={\n mode === 'cookie' || mode === 'information'\n ? style.cookieTitleContainer\n : style.titleContainer\n }\n >\n <div className={style.contentSection}>\n {LogoComponent ? <LogoComponent className={style.icon} /> : null}\n {content ? (\n <p\n className={mode === 'alert' ? style.content : style.message}\n data-name={'cm-popin-content'}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: content}}\n />\n ) : null}\n </div>\n {descriptionText ? (\n <p\n className={style.descriptionText}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: descriptionText}}\n />\n ) : null}\n </div>\n {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 customStyle={secondButton.customStyle}\n />\n </div>\n ) : null}\n {thirdButton ? (\n <div className={thirdButton.largeButton ? style.largeButton : style.button}>\n <Cta\n label={thirdButton.label}\n onClick={thirdButton.handleOnclick}\n data-name={`cm-popin-cta-${thirdButton.type}`}\n aria-label={thirdButton['aria-label']}\n type={thirdButton.type}\n customStyle={thirdButton.customStyle}\n />\n </div>\n ) : null}\n </div>\n </div>\n </div>\n );\n};\n\nCMPopin.propTypes = propTypes;\n\nexport default CMPopin;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width: 500px;
|
|
51
51
|
flex-grow: 0;
|
|
52
52
|
margin: 16px;
|
|
53
53
|
padding: 16px 16px 20px 16px;
|
|
@@ -114,12 +114,12 @@
|
|
|
114
114
|
|
|
115
115
|
.button {
|
|
116
116
|
min-width: max-content;
|
|
117
|
-
width:
|
|
117
|
+
width: 160px;
|
|
118
118
|
padding: 8px;
|
|
119
119
|
}
|
|
120
120
|
|
|
121
121
|
.largeButton {
|
|
122
|
-
width:
|
|
122
|
+
width: 100%;
|
|
123
123
|
padding: 8px;
|
|
124
124
|
}
|
|
125
125
|
|
|
@@ -150,11 +150,6 @@
|
|
|
150
150
|
margin-top: 0px;
|
|
151
151
|
}
|
|
152
152
|
|
|
153
|
-
.descriptionText, .content, .message {
|
|
154
|
-
margin-left: 32px;
|
|
155
|
-
margin-right: 32px;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
153
|
.cookieTitleContainer {
|
|
159
154
|
align-items: center;
|
|
160
155
|
display: flex;
|
|
@@ -283,21 +278,29 @@ a {
|
|
|
283
278
|
}
|
|
284
279
|
|
|
285
280
|
@media tablet {
|
|
281
|
+
.popin {
|
|
282
|
+
position: fixed;
|
|
283
|
+
}
|
|
284
|
+
|
|
286
285
|
.popin {
|
|
287
286
|
width: 80%;
|
|
288
|
-
overflow: hidden;
|
|
289
287
|
}
|
|
290
288
|
|
|
291
289
|
.buttonContainer {
|
|
292
290
|
display: flex;
|
|
293
291
|
flex-wrap: wrap-reverse;
|
|
294
|
-
margin:
|
|
292
|
+
margin: 48px 24px 32px 24px;
|
|
293
|
+
width: 85%;
|
|
295
294
|
}
|
|
296
295
|
|
|
297
|
-
.
|
|
296
|
+
.button {
|
|
298
297
|
width: 100%;
|
|
299
298
|
}
|
|
300
299
|
|
|
300
|
+
.titleContainer {
|
|
301
|
+
width: 85%;
|
|
302
|
+
}
|
|
303
|
+
|
|
301
304
|
.popinCookie {
|
|
302
305
|
position: fixed;
|
|
303
306
|
bottom: 10px;
|
|
@@ -313,50 +316,34 @@ a {
|
|
|
313
316
|
}
|
|
314
317
|
|
|
315
318
|
.popinCookie .largeButton {
|
|
316
|
-
padding: 8px 0px 0px 0px
|
|
319
|
+
padding: 8px 0px 0px 0px
|
|
317
320
|
}
|
|
318
321
|
.popinCookie .message {
|
|
319
322
|
padding: 24px 24px 0px 24px
|
|
320
323
|
}
|
|
321
324
|
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
width: 100%;
|
|
345
|
-
}
|
|
346
|
-
|
|
347
|
-
.titleContainer {
|
|
348
|
-
width: 100%;
|
|
349
|
-
margin-left: 16px;
|
|
350
|
-
margin-right: 16px;
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
.content, .message, .descriptionText {
|
|
354
|
-
margin-left: 16px;
|
|
355
|
-
margin-right: 16px;
|
|
356
|
-
}
|
|
357
|
-
.largeButton {
|
|
358
|
-
margin-left: 32px;
|
|
359
|
-
margin-right: 32px;
|
|
325
|
+
@media mobile {
|
|
326
|
+
.popin {
|
|
327
|
+
position: fixed;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
.popin {
|
|
331
|
+
width: 80%;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
.buttonContainer {
|
|
335
|
+
display: flex;
|
|
336
|
+
margin: 48px 24px 32px 24px;
|
|
337
|
+
width: 85%;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
.button {
|
|
341
|
+
width: 100%;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
.titleContainer {
|
|
345
|
+
width: 85%;
|
|
346
|
+
}
|
|
360
347
|
}
|
|
361
348
|
}
|
|
362
349
|
|
|
@@ -368,6 +355,7 @@ button {
|
|
|
368
355
|
}
|
|
369
356
|
|
|
370
357
|
_:-ms-fullscreen,
|
|
358
|
+
.descriptionText,
|
|
371
359
|
.buttonContainer {
|
|
372
360
|
width: 85%;
|
|
373
361
|
}
|
|
@@ -39,6 +39,8 @@ declare class DisciplineHeader extends React.Component<any, any, any> {
|
|
|
39
39
|
}>>;
|
|
40
40
|
mimeType: PropTypes.Validator<string>;
|
|
41
41
|
}>>;
|
|
42
|
+
lastUpdated: PropTypes.Requireable<string>;
|
|
43
|
+
invertedLanguage: PropTypes.Requireable<boolean>;
|
|
42
44
|
};
|
|
43
45
|
static contextTypes: {
|
|
44
46
|
translate: PropTypes.Requireable<(...args: any[]) => any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/discipline-header/index.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/discipline-header/index.js"],"names":[],"mappings":";AA4BA;IACE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAOE;IAEF;;MAEE;IAEF,wBAQC;IANC;;;MAGC;IAKH,4BAIC;IAED,yBAEC;IAED,sBAuDC;CACF"}
|
|
@@ -3,6 +3,7 @@ import PropTypes from 'prop-types';
|
|
|
3
3
|
import get from 'lodash/fp/get';
|
|
4
4
|
import getOr from 'lodash/fp/getOr';
|
|
5
5
|
import classnames from 'classnames';
|
|
6
|
+
import { NovaSolidSynchronizeSynchronize3 as SyncIcon } from '@coorpacademy/nova-icons';
|
|
6
7
|
import VideoPlayer from '../video-player';
|
|
7
8
|
import Picture from '../../atom/picture';
|
|
8
9
|
import style from './style.css';
|
|
@@ -65,7 +66,9 @@ class DisciplineHeader extends React.Component {
|
|
|
65
66
|
image,
|
|
66
67
|
title,
|
|
67
68
|
description,
|
|
68
|
-
video
|
|
69
|
+
video,
|
|
70
|
+
lastUpdated,
|
|
71
|
+
invertedLanguage
|
|
69
72
|
} = this.props;
|
|
70
73
|
const {
|
|
71
74
|
fullDisplay,
|
|
@@ -74,19 +77,23 @@ class DisciplineHeader extends React.Component {
|
|
|
74
77
|
const {
|
|
75
78
|
translate
|
|
76
79
|
} = this.context;
|
|
77
|
-
const
|
|
80
|
+
const maxHeightCourseInfos = 209;
|
|
81
|
+
const hasMediaContent = image || video;
|
|
78
82
|
const toggleLabel = fullDisplay ? translate('See less') : translate('Show more');
|
|
79
|
-
const
|
|
83
|
+
const shortCourseText = offsetHeightShowMore <= maxHeightCourseInfos;
|
|
84
|
+
const courseSeeMoreButtonStyle = shortCourseText ? style.showMoreHidden : style.showMore;
|
|
80
85
|
return /*#__PURE__*/React.createElement("div", {
|
|
81
86
|
"data-name": "disciplineHeader",
|
|
82
87
|
className: style.wrapper
|
|
83
|
-
},
|
|
88
|
+
}, hasMediaContent ? /*#__PURE__*/React.createElement("div", {
|
|
84
89
|
className: style.imgWrapper
|
|
85
90
|
}, /*#__PURE__*/React.createElement(Preview, {
|
|
86
91
|
image: image,
|
|
87
92
|
video: video
|
|
88
93
|
})) : null, /*#__PURE__*/React.createElement("div", {
|
|
89
94
|
className: style.courseWrapper
|
|
95
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
96
|
+
className: fullDisplay ? style.courseTextWrapperFull : style.courseTextWrapperShort
|
|
90
97
|
}, /*#__PURE__*/React.createElement("div", {
|
|
91
98
|
"data-name": "title",
|
|
92
99
|
className: classnames(style.title, style.innerHTML) // eslint-disable-next-line react/no-danger
|
|
@@ -95,8 +102,6 @@ class DisciplineHeader extends React.Component {
|
|
|
95
102
|
__html: title
|
|
96
103
|
}
|
|
97
104
|
}), /*#__PURE__*/React.createElement("div", {
|
|
98
|
-
className: fullDisplay ? style.desc : style.shortDesc
|
|
99
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
100
105
|
className: style.innerHTML // eslint-disable-next-line react/no-danger
|
|
101
106
|
,
|
|
102
107
|
dangerouslySetInnerHTML: {
|
|
@@ -104,9 +109,21 @@ class DisciplineHeader extends React.Component {
|
|
|
104
109
|
},
|
|
105
110
|
ref: this.setHandle
|
|
106
111
|
})), /*#__PURE__*/React.createElement("div", {
|
|
107
|
-
className:
|
|
112
|
+
className: invertedLanguage ? style.invertedLanguage : null
|
|
113
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
114
|
+
className: courseSeeMoreButtonStyle,
|
|
108
115
|
onClick: this.handleToggleDisplay
|
|
109
|
-
}, toggleLabel)
|
|
116
|
+
}, toggleLabel), lastUpdated ? /*#__PURE__*/React.createElement("div", {
|
|
117
|
+
className: classnames(style.lastUpdatedWrapper, shortCourseText ? style.lastUpdatedWrapperShort : null)
|
|
118
|
+
}, /*#__PURE__*/React.createElement(SyncIcon, {
|
|
119
|
+
className: style.syncIcon
|
|
120
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
121
|
+
className: classnames(style.lastUpdatedText, style.innerHTML) // eslint-disable-next-line react/no-danger
|
|
122
|
+
,
|
|
123
|
+
dangerouslySetInnerHTML: {
|
|
124
|
+
__html: lastUpdated
|
|
125
|
+
}
|
|
126
|
+
})) : null)));
|
|
110
127
|
}
|
|
111
128
|
|
|
112
129
|
}
|
|
@@ -118,7 +135,9 @@ DisciplineHeader.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
118
135
|
title: PropTypes.string,
|
|
119
136
|
description: PropTypes.string,
|
|
120
137
|
image: Preview.propTypes.image,
|
|
121
|
-
video: Preview.propTypes.video
|
|
138
|
+
video: Preview.propTypes.video,
|
|
139
|
+
lastUpdated: PropTypes.string,
|
|
140
|
+
invertedLanguage: PropTypes.bool
|
|
122
141
|
} : {};
|
|
123
142
|
export default DisciplineHeader;
|
|
124
143
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","PropTypes","get","getOr","classnames","VideoPlayer","Picture","style","Preview","image","video","mimeType","id","jwpOptions","propTypes","src","shape","DisciplineHeader","Component","constructor","props","state","fullDisplay","offsetHeightShowMore","handleToggleDisplay","bind","setHandle","setState","prevState","el","render","title","description","translate","context","
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","PropTypes","get","getOr","classnames","NovaSolidSynchronizeSynchronize3","SyncIcon","VideoPlayer","Picture","style","Preview","image","video","mimeType","id","jwpOptions","propTypes","src","shape","DisciplineHeader","Component","constructor","props","state","fullDisplay","offsetHeightShowMore","handleToggleDisplay","bind","setHandle","setState","prevState","el","render","title","description","lastUpdated","invertedLanguage","translate","context","maxHeightCourseInfos","hasMediaContent","toggleLabel","shortCourseText","courseSeeMoreButtonStyle","showMoreHidden","showMore","wrapper","imgWrapper","courseWrapper","courseTextWrapperFull","courseTextWrapperShort","innerHTML","__html","lastUpdatedWrapper","lastUpdatedWrapperShort","syncIcon","lastUpdatedText","contextTypes","func","string","bool"],"sources":["../../../src/molecule/discipline-header/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport get from 'lodash/fp/get';\nimport getOr from 'lodash/fp/getOr';\nimport classnames from 'classnames';\nimport {NovaSolidSynchronizeSynchronize3 as SyncIcon} from '@coorpacademy/nova-icons';\nimport VideoPlayer from '../video-player';\nimport Picture from '../../atom/picture';\nimport style from './style.css';\n\nconst Preview = ({image, video}) => {\n const mimeType = get('mimeType', video);\n const id = get('id', video);\n const jwpOptions = get('jwpOptions', video);\n if (id) {\n return <VideoPlayer mimeType={mimeType} id={id} width=\"380px\" height=\"250px\" />;\n } else if (jwpOptions) {\n return <VideoPlayer {...video} />;\n } else {\n return <Picture className={style.image} src={image} />;\n }\n};\n\nPreview.propTypes = {\n image: Picture.propTypes.src,\n video: PropTypes.shape(VideoPlayer.propTypes)\n};\n\nclass DisciplineHeader extends React.Component {\n static propTypes = {\n title: PropTypes.string,\n description: PropTypes.string,\n image: Preview.propTypes.image,\n video: Preview.propTypes.video,\n lastUpdated: PropTypes.string,\n invertedLanguage: PropTypes.bool\n };\n\n static contextTypes = {\n translate: PropTypes.func\n };\n\n constructor(props) {\n super(props);\n this.state = {\n fullDisplay: false,\n offsetHeightShowMore: 0\n };\n this.handleToggleDisplay = this.handleToggleDisplay.bind(this);\n this.setHandle = this.setHandle.bind(this);\n }\n\n handleToggleDisplay() {\n this.setState(prevState => ({\n fullDisplay: !prevState.fullDisplay\n }));\n }\n\n setHandle(el) {\n this.setState({offsetHeightShowMore: getOr(0, 'offsetHeight', el)});\n }\n\n render() {\n const {image, title, description, video, lastUpdated, invertedLanguage} = this.props;\n const {fullDisplay, offsetHeightShowMore} = this.state;\n const {translate} = this.context;\n const maxHeightCourseInfos = 209;\n const hasMediaContent = image || video;\n const toggleLabel = fullDisplay ? translate('See less') : translate('Show more');\n const shortCourseText = offsetHeightShowMore <= maxHeightCourseInfos;\n const courseSeeMoreButtonStyle = shortCourseText ? style.showMoreHidden : style.showMore;\n\n return (\n <div data-name=\"disciplineHeader\" className={style.wrapper}>\n {hasMediaContent ? (\n <div className={style.imgWrapper}>\n <Preview image={image} video={video} />\n </div>\n ) : null}\n <div className={style.courseWrapper}>\n <div className={fullDisplay ? style.courseTextWrapperFull : style.courseTextWrapperShort}>\n <div\n data-name=\"title\"\n className={classnames(style.title, style.innerHTML)}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: title}}\n />\n <div\n className={style.innerHTML}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: description}}\n ref={this.setHandle}\n />\n </div>\n <div className={invertedLanguage ? style.invertedLanguage : null}>\n <div className={courseSeeMoreButtonStyle} onClick={this.handleToggleDisplay}>\n {toggleLabel}\n </div>\n {lastUpdated ? (\n <div\n className={classnames(\n style.lastUpdatedWrapper,\n shortCourseText ? style.lastUpdatedWrapperShort : null\n )}\n >\n <SyncIcon className={style.syncIcon} />\n <div\n className={classnames(style.lastUpdatedText, style.innerHTML)}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: last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sC,Y,GAAe;EACpBpB,SAAS,EAAEpC,SAAS,CAACyD;AADD,C;AAVlBvC,gB,CACGH,S,2CAAY;EACjBiB,KAAK,EAAEhC,SAAS,CAAC0D,MADA;EAEjBzB,WAAW,EAAEjC,SAAS,CAAC0D,MAFN;EAGjBhD,KAAK,EAAED,OAAO,CAACM,SAAR,CAAkBL,KAHR;EAIjBC,KAAK,EAAEF,OAAO,CAACM,SAAR,CAAkBJ,KAJR;EAKjBuB,WAAW,EAAElC,SAAS,CAAC0D,MALN;EAMjBvB,gBAAgB,EAAEnC,SAAS,CAAC2D;AANX,C;AA2FrB,eAAezC,gBAAf"}
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
color: dark;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
.
|
|
48
|
+
.courseTextWrapperFull {
|
|
49
49
|
font-family: "Gilroy";
|
|
50
50
|
font-size: 15px;
|
|
51
51
|
color: black;
|
|
@@ -53,14 +53,14 @@
|
|
|
53
53
|
line-height: 22px;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
.
|
|
56
|
+
.courseTextWrapperFull a {
|
|
57
57
|
font-family: Gilroy;
|
|
58
58
|
font-weight: 600;
|
|
59
59
|
color: brand;
|
|
60
60
|
text-decoration: none;
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
.
|
|
63
|
+
.courseTextWrapperFull a:hover {
|
|
64
64
|
text-decoration: underline;
|
|
65
65
|
}
|
|
66
66
|
|
|
@@ -68,10 +68,42 @@
|
|
|
68
68
|
display: none;
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
+
.lastUpdatedWrapperShort {
|
|
72
|
+
/* This is required in case that the text is short to make sure that it
|
|
73
|
+
is stuck to the bottom at the same level to the media */
|
|
74
|
+
height: 28px;
|
|
75
|
+
align-items: flex-end;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.lastUpdatedWrapper {
|
|
79
|
+
display: flex;
|
|
80
|
+
margin-top: 8px;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.lastUpdatedText {
|
|
84
|
+
font-family: 'Gilroy';
|
|
85
|
+
font-style: normal;
|
|
86
|
+
font-weight: 600;
|
|
87
|
+
font-size: 12px;
|
|
88
|
+
line-height: 14px;
|
|
89
|
+
color: #536E7A;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.invertedLanguage {
|
|
93
|
+
float: right;
|
|
94
|
+
text-align: right;
|
|
95
|
+
align-items: right;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.syncIcon {
|
|
99
|
+
height: 13px;
|
|
100
|
+
color: #536E7A;
|
|
101
|
+
margin-right: 3px;
|
|
102
|
+
}
|
|
103
|
+
|
|
71
104
|
.showMore {
|
|
72
105
|
display: block;
|
|
73
106
|
font-size: 14px;
|
|
74
|
-
margin: 0 14px 0 0;
|
|
75
107
|
transition: all time ease-in-out;
|
|
76
108
|
cursor: pointer;
|
|
77
109
|
order: 1;
|
|
@@ -85,9 +117,9 @@
|
|
|
85
117
|
opacity: 0.8;
|
|
86
118
|
}
|
|
87
119
|
|
|
88
|
-
.
|
|
89
|
-
composes:
|
|
90
|
-
height:
|
|
120
|
+
.courseTextWrapperShort {
|
|
121
|
+
composes: courseTextWrapperFull;
|
|
122
|
+
height: 213px;
|
|
91
123
|
overflow: hidden;
|
|
92
124
|
}
|
|
93
125
|
|
|
@@ -106,6 +138,7 @@
|
|
|
106
138
|
margin-top: 20px;
|
|
107
139
|
padding-left: 0;
|
|
108
140
|
}
|
|
141
|
+
|
|
109
142
|
}
|
|
110
143
|
|
|
111
144
|
.innerHTML {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/template/common/discipline/index.js"],"names":[],"mappings":";AAcA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/template/common/discipline/index.js"],"names":[],"mappings":";AAcA,mEAiKC"}
|
|
@@ -34,7 +34,9 @@ const Discipline = (props, context) => {
|
|
|
34
34
|
addToMyListText,
|
|
35
35
|
removeFromMyListText,
|
|
36
36
|
disableShare = false,
|
|
37
|
-
disableAddToMyList = false
|
|
37
|
+
disableAddToMyList = false,
|
|
38
|
+
lastUpdated,
|
|
39
|
+
invertedLanguage = false
|
|
38
40
|
} = props;
|
|
39
41
|
const authorSection = isEmpty(authors) ? null : /*#__PURE__*/React.createElement("div", {
|
|
40
42
|
className: style.partners
|
|
@@ -62,7 +64,9 @@ const Discipline = (props, context) => {
|
|
|
62
64
|
image: image,
|
|
63
65
|
video: video,
|
|
64
66
|
title: title,
|
|
65
|
-
description: description
|
|
67
|
+
description: description,
|
|
68
|
+
lastUpdated: lastUpdated,
|
|
69
|
+
invertedLanguage: invertedLanguage
|
|
66
70
|
}));
|
|
67
71
|
const discipline = /*#__PURE__*/React.createElement("div", {
|
|
68
72
|
"data-name": "discipline",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","isEmpty","PropTypes","DisciplineCTA","DisciplineHeader","DisciplinePartners","DisciplineScope","Share","ShareFeedback","ShareStatusProvider","AddToMyList","AddToMyListFeedback","AddToMyListStatusProvider","style","Discipline","props","context","selected","level","levels","changeLevel","image","title","video","authors","description","start","buy","startLabel","buyLabel","shareWording","shareText","shareSuccessWording","shareErrorWording","addToMyListButton","favorite","onFavoriteClick","addToMyListText","removeFromMyListText","disableShare","disableAddToMyList","authorSection","partners","disciplineCTA","disciplineContent","content","disciplineHeader","header","discipline","container","leftSection","mobileAuthorCtaSection","columnReverse","cta","addToMyListBtn","shareBtn","rightSection","stickySection","buttons","shareFeedBack","addToMyListFeedback","addToMyListProviderWrap","shareProviderWrap","propTypes","onClick","wording","text","successWording","errorWording","bool","contextTypes","translate","func"],"sources":["../../../../src/template/common/discipline/index.js"],"sourcesContent":["import React from 'react';\nimport isEmpty from 'lodash/fp/isEmpty';\nimport PropTypes from 'prop-types';\nimport DisciplineCTA from '../../../molecule/discipline-cta';\nimport DisciplineHeader from '../../../molecule/discipline-header';\nimport DisciplinePartners from '../../../molecule/discipline-partners';\nimport DisciplineScope from '../../../molecule/discipline-scope';\nimport Share, {ShareFeedback, ShareStatusProvider} from '../../../molecule/share';\nimport AddToMyList, {\n AddToMyListFeedback,\n AddToMyListStatusProvider\n} from '../../../molecule/add-to-my-list';\nimport style from './style.css';\n\nconst Discipline = (props, context) => {\n const {\n selected = 0,\n level,\n levels,\n changeLevel,\n image,\n title = '',\n video,\n authors = [],\n description = '',\n start,\n buy,\n startLabel,\n buyLabel,\n shareWording,\n shareText,\n shareSuccessWording,\n shareErrorWording,\n addToMyListButton,\n favorite,\n onFavoriteClick,\n addToMyListText,\n removeFromMyListText,\n disableShare = false,\n disableAddToMyList = false\n } = props;\n\n const authorSection = isEmpty(authors) ? null : (\n <div className={style.partners}>\n <DisciplinePartners authors={authors} />\n </div>\n );\n\n const disciplineCTA = (\n <DisciplineCTA\n type={'discipline'}\n start={start}\n buy={buy}\n startLabel={startLabel}\n buyLabel={buyLabel}\n />\n );\n\n const disciplineContent = (\n <div className={style.content}>\n <DisciplineScope content={level} levels={levels} selected={selected} onClick={changeLevel} />\n </div>\n );\n\n const disciplineHeader = (\n <div className={style.header}>\n <DisciplineHeader image={image} video={video} title={title} description={description} />\n </div>\n );\n\n const discipline = (\n <div data-name=\"discipline\" className={style.container} key=\"discipline\">\n <div className={style.leftSection}>\n {disciplineHeader}\n <div className={style.mobileAuthorCtaSection}>\n <div className={style.columnReverse}>\n <div className={style.cta}>{disciplineCTA}</div>\n {disableAddToMyList ? null : (\n <AddToMyList\n style={style.addToMyListBtn}\n addToMyListButton={addToMyListButton}\n favorite={favorite}\n onFavoriteClick={onFavoriteClick}\n key={'addToMyListTablet'}\n />\n )}\n {disableShare ? null : (\n <Share\n style={style.shareBtn}\n wording={shareWording}\n text={shareText}\n key={'shareTablet'}\n />\n )}\n </div>\n {authorSection}\n </div>\n {disciplineContent}\n </div>\n <div className={style.rightSection}>\n <div className={style.stickySection}>\n <div className={style.cta}>\n {disciplineCTA}\n {disableShare && disableAddToMyList ? null : (\n <div className={style.buttons}>\n {disableShare ? null : (\n <Share\n style={style.shareBtn}\n wording={shareWording}\n text={shareText}\n key={'shareDesktop'}\n />\n )}\n {disableAddToMyList ? null : (\n <AddToMyList\n style={style.addToMyListBtn}\n addToMyListButton={addToMyListButton}\n favorite={favorite}\n onFavoriteClick={onFavoriteClick}\n key={'addToMyListDesktop'}\n />\n )}\n </div>\n )}\n </div>\n {authorSection}\n </div>\n </div>\n </div>\n );\n\n const shareFeedBack = disableShare ? null : (\n <ShareFeedback\n errorWording={shareErrorWording}\n successWording={shareSuccessWording}\n key=\"shareFeedBack\"\n />\n );\n\n const addToMyListFeedback = disableAddToMyList ? null : (\n <AddToMyListFeedback\n addToMyListText={addToMyListText}\n removeFromMyListText={removeFromMyListText}\n favorite={favorite}\n />\n );\n\n const addToMyListProviderWrap = disableAddToMyList ? (\n <>\n {shareFeedBack}\n {discipline}\n </>\n ) : (\n <AddToMyListStatusProvider>\n {shareFeedBack}\n {addToMyListFeedback}\n {discipline}\n </AddToMyListStatusProvider>\n );\n const shareProviderWrap = disableShare ? (\n addToMyListProviderWrap\n ) : (\n <ShareStatusProvider>{addToMyListProviderWrap}</ShareStatusProvider>\n );\n\n return shareProviderWrap;\n};\n\nDiscipline.propTypes = {\n image: DisciplineHeader.propTypes.image,\n video: DisciplineHeader.propTypes.video,\n title: DisciplineHeader.propTypes.title,\n description: DisciplineHeader.propTypes.description,\n start: DisciplineCTA.propTypes.start,\n buy: DisciplineCTA.propTypes.buy,\n startLabel: DisciplineCTA.propTypes.startLabel,\n buyLabel: DisciplineCTA.propTypes.buyLabel,\n authors: DisciplinePartners.propTypes.authors,\n level: DisciplineScope.propTypes.content,\n levels: DisciplineScope.propTypes.levels,\n selected: DisciplineScope.propTypes.selected,\n changeLevel: DisciplineScope.propTypes.onClick,\n shareWording: Share.propTypes.wording,\n shareText: Share.propTypes.text,\n shareSuccessWording: ShareFeedback.propTypes.successWording,\n shareErrorWording: ShareFeedback.propTypes.errorWording,\n addToMyListText: AddToMyListFeedback.propTypes.addToMyListText,\n removeFromMyListText: AddToMyListFeedback.propTypes.removeFromMyListText,\n addToMyListButton: AddToMyList.propTypes.addToMyListButton,\n onFavoriteClick: AddToMyList.propTypes.onFavoriteClick,\n favorite: AddToMyList.propTypes.favorite,\n disableShare: PropTypes.bool,\n disableAddToMyList: PropTypes.bool\n};\n\nDiscipline.contextTypes = {\n translate: PropTypes.func\n};\n\nexport default Discipline;\n"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,aAAP,MAA0B,kCAA1B;AACA,OAAOC,gBAAP,MAA6B,qCAA7B;AACA,OAAOC,kBAAP,MAA+B,uCAA/B;AACA,OAAOC,eAAP,MAA4B,oCAA5B;AACA,OAAOC,KAAP,IAAeC,aAAf,EAA8BC,mBAA9B,QAAwD,yBAAxD;AACA,OAAOC,WAAP,IACEC,mBADF,EAEEC,yBAFF,QAGO,kCAHP;AAIA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,UAAU,GAAG,CAACC,KAAD,EAAQC,OAAR,KAAoB;EACrC,MAAM;IACJC,QAAQ,GAAG,CADP;IAEJC,KAFI;IAGJC,MAHI;IAIJC,WAJI;IAKJC,KALI;IAMJC,KAAK,GAAG,EANJ;IAOJC,KAPI;IAQJC,OAAO,GAAG,EARN;IASJC,WAAW,GAAG,EATV;IAUJC,KAVI;IAWJC,GAXI;IAYJC,UAZI;IAaJC,QAbI;IAcJC,YAdI;IAeJC,SAfI;IAgBJC,mBAhBI;IAiBJC,iBAjBI;IAkBJC,iBAlBI;IAmBJC,QAnBI;IAoBJC,eApBI;IAqBJC,eArBI;IAsBJC,oBAtBI;IAuBJC,YAAY,GAAG,KAvBX;IAwBJC,kBAAkB,GAAG;EAxBjB,IAyBFzB,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AgBrBlC,mBAAmB,EAAExB,aAAa,CAACuD,SAAd,CAAwBI,cAhBxB;EAiBrBlC,iBAAiB,EAAEzB,aAAa,CAACuD,SAAd,CAAwBK,YAjBtB;EAkBrB/B,eAAe,EAAE1B,mBAAmB,CAACoD,SAApB,CAA8B1B,eAlB1B;EAmBrBC,oBAAoB,EAAE3B,mBAAmB,CAACoD,SAApB,CAA8BzB,oBAnB/B;EAoBrBJ,iBAAiB,EAAExB,WAAW,CAACqD,SAAZ,CAAsB7B,iBApBpB;EAqBrBE,eAAe,EAAE1B,WAAW,CAACqD,SAAZ,CAAsB3B,eArBlB;EAsBrBD,QAAQ,EAAEzB,WAAW,CAACqD,SAAZ,CAAsB5B,QAtBX;EAuBrBI,YAAY,EAAErC,SAAS,CAACmE,IAvBH;EAwBrB7B,kBAAkB,EAAEtC,SAAS,CAACmE;AAxBT,CAAvB;AA2BAvD,UAAU,CAACwD,YAAX,GAA0B;EACxBC,SAAS,EAAErE,SAAS,CAACsE;AADG,CAA1B;AAIA,eAAe1D,UAAf"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","isEmpty","PropTypes","DisciplineCTA","DisciplineHeader","DisciplinePartners","DisciplineScope","Share","ShareFeedback","ShareStatusProvider","AddToMyList","AddToMyListFeedback","AddToMyListStatusProvider","style","Discipline","props","context","selected","level","levels","changeLevel","image","title","video","authors","description","start","buy","startLabel","buyLabel","shareWording","shareText","shareSuccessWording","shareErrorWording","addToMyListButton","favorite","onFavoriteClick","addToMyListText","removeFromMyListText","disableShare","disableAddToMyList","lastUpdated","invertedLanguage","authorSection","partners","disciplineCTA","disciplineContent","content","disciplineHeader","header","discipline","container","leftSection","mobileAuthorCtaSection","columnReverse","cta","addToMyListBtn","shareBtn","rightSection","stickySection","buttons","shareFeedBack","addToMyListFeedback","addToMyListProviderWrap","shareProviderWrap","propTypes","onClick","wording","text","successWording","errorWording","bool","contextTypes","translate","func"],"sources":["../../../../src/template/common/discipline/index.js"],"sourcesContent":["import React from 'react';\nimport isEmpty from 'lodash/fp/isEmpty';\nimport PropTypes from 'prop-types';\nimport DisciplineCTA from '../../../molecule/discipline-cta';\nimport DisciplineHeader from '../../../molecule/discipline-header';\nimport DisciplinePartners from '../../../molecule/discipline-partners';\nimport DisciplineScope from '../../../molecule/discipline-scope';\nimport Share, {ShareFeedback, ShareStatusProvider} from '../../../molecule/share';\nimport AddToMyList, {\n AddToMyListFeedback,\n AddToMyListStatusProvider\n} from '../../../molecule/add-to-my-list';\nimport style from './style.css';\n\nconst Discipline = (props, context) => {\n const {\n selected = 0,\n level,\n levels,\n changeLevel,\n image,\n title = '',\n video,\n authors = [],\n description = '',\n start,\n buy,\n startLabel,\n buyLabel,\n shareWording,\n shareText,\n shareSuccessWording,\n shareErrorWording,\n addToMyListButton,\n favorite,\n onFavoriteClick,\n addToMyListText,\n removeFromMyListText,\n disableShare = false,\n disableAddToMyList = false,\n lastUpdated,\n invertedLanguage = false\n } = props;\n\n const authorSection = isEmpty(authors) ? null : (\n <div className={style.partners}>\n <DisciplinePartners authors={authors} />\n </div>\n );\n\n const disciplineCTA = (\n <DisciplineCTA\n type={'discipline'}\n start={start}\n buy={buy}\n startLabel={startLabel}\n buyLabel={buyLabel}\n />\n );\n\n const disciplineContent = (\n <div className={style.content}>\n <DisciplineScope content={level} levels={levels} selected={selected} onClick={changeLevel} />\n </div>\n );\n\n const disciplineHeader = (\n <div className={style.header}>\n <DisciplineHeader\n image={image}\n video={video}\n title={title}\n description={description}\n lastUpdated={lastUpdated}\n invertedLanguage={invertedLanguage}\n />\n </div>\n );\n\n const discipline = (\n <div data-name=\"discipline\" className={style.container} key=\"discipline\">\n <div className={style.leftSection}>\n {disciplineHeader}\n <div className={style.mobileAuthorCtaSection}>\n <div className={style.columnReverse}>\n <div className={style.cta}>{disciplineCTA}</div>\n {disableAddToMyList ? null : (\n <AddToMyList\n style={style.addToMyListBtn}\n addToMyListButton={addToMyListButton}\n favorite={favorite}\n onFavoriteClick={onFavoriteClick}\n key={'addToMyListTablet'}\n />\n )}\n {disableShare ? null : (\n <Share\n style={style.shareBtn}\n wording={shareWording}\n text={shareText}\n key={'shareTablet'}\n />\n )}\n </div>\n {authorSection}\n </div>\n {disciplineContent}\n </div>\n <div className={style.rightSection}>\n <div className={style.stickySection}>\n <div className={style.cta}>\n {disciplineCTA}\n {disableShare && disableAddToMyList ? null : (\n <div className={style.buttons}>\n {disableShare ? null : (\n <Share\n style={style.shareBtn}\n wording={shareWording}\n text={shareText}\n key={'shareDesktop'}\n />\n )}\n {disableAddToMyList ? null : (\n <AddToMyList\n style={style.addToMyListBtn}\n addToMyListButton={addToMyListButton}\n favorite={favorite}\n onFavoriteClick={onFavoriteClick}\n key={'addToMyListDesktop'}\n />\n )}\n </div>\n )}\n </div>\n {authorSection}\n </div>\n </div>\n </div>\n );\n\n const shareFeedBack = disableShare ? null : (\n <ShareFeedback\n errorWording={shareErrorWording}\n successWording={shareSuccessWording}\n key=\"shareFeedBack\"\n />\n );\n\n const addToMyListFeedback = disableAddToMyList ? null : (\n <AddToMyListFeedback\n addToMyListText={addToMyListText}\n removeFromMyListText={removeFromMyListText}\n favorite={favorite}\n />\n );\n\n const addToMyListProviderWrap = disableAddToMyList ? (\n <>\n {shareFeedBack}\n {discipline}\n </>\n ) : (\n <AddToMyListStatusProvider>\n {shareFeedBack}\n {addToMyListFeedback}\n {discipline}\n </AddToMyListStatusProvider>\n );\n const shareProviderWrap = disableShare ? (\n addToMyListProviderWrap\n ) : (\n <ShareStatusProvider>{addToMyListProviderWrap}</ShareStatusProvider>\n );\n\n return shareProviderWrap;\n};\n\nDiscipline.propTypes = {\n image: DisciplineHeader.propTypes.image,\n video: DisciplineHeader.propTypes.video,\n title: DisciplineHeader.propTypes.title,\n description: DisciplineHeader.propTypes.description,\n start: DisciplineCTA.propTypes.start,\n buy: DisciplineCTA.propTypes.buy,\n startLabel: DisciplineCTA.propTypes.startLabel,\n buyLabel: DisciplineCTA.propTypes.buyLabel,\n authors: DisciplinePartners.propTypes.authors,\n level: DisciplineScope.propTypes.content,\n levels: DisciplineScope.propTypes.levels,\n selected: DisciplineScope.propTypes.selected,\n changeLevel: DisciplineScope.propTypes.onClick,\n shareWording: Share.propTypes.wording,\n shareText: Share.propTypes.text,\n shareSuccessWording: ShareFeedback.propTypes.successWording,\n shareErrorWording: ShareFeedback.propTypes.errorWording,\n addToMyListText: AddToMyListFeedback.propTypes.addToMyListText,\n removeFromMyListText: AddToMyListFeedback.propTypes.removeFromMyListText,\n addToMyListButton: AddToMyList.propTypes.addToMyListButton,\n onFavoriteClick: AddToMyList.propTypes.onFavoriteClick,\n favorite: AddToMyList.propTypes.favorite,\n disableShare: PropTypes.bool,\n disableAddToMyList: PropTypes.bool\n};\n\nDiscipline.contextTypes = {\n translate: PropTypes.func\n};\n\nexport default Discipline;\n"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,OAAP,MAAoB,mBAApB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,aAAP,MAA0B,kCAA1B;AACA,OAAOC,gBAAP,MAA6B,qCAA7B;AACA,OAAOC,kBAAP,MAA+B,uCAA/B;AACA,OAAOC,eAAP,MAA4B,oCAA5B;AACA,OAAOC,KAAP,IAAeC,aAAf,EAA8BC,mBAA9B,QAAwD,yBAAxD;AACA,OAAOC,WAAP,IACEC,mBADF,EAEEC,yBAFF,QAGO,kCAHP;AAIA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,UAAU,GAAG,CAACC,KAAD,EAAQC,OAAR,KAAoB;EACrC,MAAM;IACJC,QAAQ,GAAG,CADP;IAEJC,KAFI;IAGJC,MAHI;IAIJC,WAJI;IAKJC,KALI;IAMJC,KAAK,GAAG,EANJ;IAOJC,KAPI;IAQJC,OAAO,GAAG,EARN;IASJC,WAAW,GAAG,EATV;IAUJC,KAVI;IAWJC,GAXI;IAYJC,UAZI;IAaJC,QAbI;IAcJC,YAdI;IAeJC,SAfI;IAgBJC,mBAhBI;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AC2D,SAAhB,CAA0B9C,MAXb;EAYrBF,QAAQ,EAAEX,eAAe,CAAC2D,SAAhB,CAA0BhD,QAZf;EAarBG,WAAW,EAAEd,eAAe,CAAC2D,SAAhB,CAA0BC,OAblB;EAcrBpC,YAAY,EAAEvB,KAAK,CAAC0D,SAAN,CAAgBE,OAdT;EAerBpC,SAAS,EAAExB,KAAK,CAAC0D,SAAN,CAAgBG,IAfN;EAgBrBpC,mBAAmB,EAAExB,aAAa,CAACyD,SAAd,CAAwBI,cAhBxB;EAiBrBpC,iBAAiB,EAAEzB,aAAa,CAACyD,SAAd,CAAwBK,YAjBtB;EAkBrBjC,eAAe,EAAE1B,mBAAmB,CAACsD,SAApB,CAA8B5B,eAlB1B;EAmBrBC,oBAAoB,EAAE3B,mBAAmB,CAACsD,SAApB,CAA8B3B,oBAnB/B;EAoBrBJ,iBAAiB,EAAExB,WAAW,CAACuD,SAAZ,CAAsB/B,iBApBpB;EAqBrBE,eAAe,EAAE1B,WAAW,CAACuD,SAAZ,CAAsB7B,eArBlB;EAsBrBD,QAAQ,EAAEzB,WAAW,CAACuD,SAAZ,CAAsB9B,QAtBX;EAuBrBI,YAAY,EAAErC,SAAS,CAACqE,IAvBH;EAwBrB/B,kBAAkB,EAAEtC,SAAS,CAACqE;AAxBT,CAAvB;AA2BAzD,UAAU,CAAC0D,YAAX,GAA0B;EACxBC,SAAS,EAAEvE,SAAS,CAACwE;AADG,CAA1B;AAIA,eAAe5D,UAAf"}
|
|
@@ -21,58 +21,6 @@ declare class ExternalCourse extends React.Component<any, any, any> {
|
|
|
21
21
|
backgroundImageUrl: PropTypes.Requireable<string>;
|
|
22
22
|
contentType: PropTypes.Requireable<string>;
|
|
23
23
|
mode: PropTypes.Requireable<string>;
|
|
24
|
-
closePopin: PropTypes.Requireable<PropTypes.InferProps<{
|
|
25
|
-
content: PropTypes.Requireable<string>;
|
|
26
|
-
mode: PropTypes.Requireable<string>;
|
|
27
|
-
header: PropTypes.Requireable<string>;
|
|
28
|
-
firstButton: PropTypes.Requireable<PropTypes.InferProps<{
|
|
29
|
-
label: PropTypes.Requireable<string>;
|
|
30
|
-
handleOnclick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
31
|
-
'aria-label': PropTypes.Requireable<string>;
|
|
32
|
-
largeButton: PropTypes.Requireable<boolean>;
|
|
33
|
-
type: PropTypes.Requireable<string>;
|
|
34
|
-
customStyle: PropTypes.Requireable<PropTypes.InferProps<{}>>;
|
|
35
|
-
}>>;
|
|
36
|
-
secondButton: PropTypes.Requireable<PropTypes.InferProps<{
|
|
37
|
-
label: PropTypes.Requireable<string>;
|
|
38
|
-
handleOnclick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
39
|
-
type: PropTypes.Requireable<string>;
|
|
40
|
-
'aria-label': PropTypes.Requireable<string>;
|
|
41
|
-
largeButton: PropTypes.Requireable<boolean>;
|
|
42
|
-
customStyle: PropTypes.Requireable<PropTypes.InferProps<{}>>;
|
|
43
|
-
}>>;
|
|
44
|
-
thirdButton: PropTypes.Requireable<PropTypes.InferProps<{
|
|
45
|
-
label: PropTypes.Requireable<string>;
|
|
46
|
-
handleOnclick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
47
|
-
type: PropTypes.Requireable<string>;
|
|
48
|
-
'aria-label': PropTypes.Requireable<string>;
|
|
49
|
-
largeButton: PropTypes.Requireable<boolean>;
|
|
50
|
-
customStyle: PropTypes.Requireable<PropTypes.InferProps<{}>>;
|
|
51
|
-
}>>;
|
|
52
|
-
onClose: PropTypes.Requireable<(...args: any[]) => any>;
|
|
53
|
-
icon: PropTypes.Requireable<string>;
|
|
54
|
-
backgroundImageUrl: PropTypes.Requireable<string>;
|
|
55
|
-
descriptionText: PropTypes.Requireable<string>;
|
|
56
|
-
cookieTitle: PropTypes.Requireable<string>;
|
|
57
|
-
descriptionBtnTxt: PropTypes.Requireable<string>;
|
|
58
|
-
listBtnSwicth: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
59
|
-
title: PropTypes.Requireable<string>;
|
|
60
|
-
name: PropTypes.Requireable<string>;
|
|
61
|
-
id: PropTypes.Requireable<string>;
|
|
62
|
-
value: PropTypes.Requireable<boolean>;
|
|
63
|
-
disabled: PropTypes.Requireable<boolean>;
|
|
64
|
-
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
65
|
-
description: PropTypes.Requireable<string>;
|
|
66
|
-
'aria-labelledby': PropTypes.Requireable<string>;
|
|
67
|
-
'aria-label': PropTypes.Requireable<string>;
|
|
68
|
-
modified: PropTypes.Requireable<boolean>;
|
|
69
|
-
titlePosition: PropTypes.Requireable<string>;
|
|
70
|
-
theme: PropTypes.Requireable<string>;
|
|
71
|
-
details: PropTypes.Requireable<string>;
|
|
72
|
-
'data-name': PropTypes.Requireable<string>;
|
|
73
|
-
requiredSelection: PropTypes.Requireable<boolean>;
|
|
74
|
-
}> | null | undefined)[]>;
|
|
75
|
-
}>>;
|
|
76
24
|
};
|
|
77
25
|
static contextTypes: {
|
|
78
26
|
skin: PropTypes.Requireable<PropTypes.InferProps<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/template/external-course/index.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/template/external-course/index.js"],"names":[],"mappings":";AAmBA;IACE;;;;;;;;;;;;;;;;;;;;;MAqBE;IAEF;;;;;;;;;;;;;;;;;;;;;;MAEE;IA4Hqsd,wBAA8C;IAAA,sCAAyJ;IA1H94d,+CAKE;IAEF,sBA+GC;CACF"}
|