@coorpacademy/components 11.11.14 → 11.11.15-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/atom/input-switch/style.css +2 -1
- package/es/atom/select/style.css +1 -1
- package/es/molecule/cm-popin/index.d.ts.map +1 -1
- package/es/molecule/cm-popin/index.js +3 -2
- package/es/molecule/cm-popin/index.js.map +1 -1
- package/es/molecule/filters/filters-wapper.css +0 -1
- package/es/organism/mooc-header/index.d.ts +0 -1
- package/es/organism/mooc-header/index.d.ts.map +1 -1
- package/es/organism/mooc-header/index.js +2 -9
- package/es/organism/mooc-header/index.js.map +1 -1
- package/es/organism/mooc-header/style.css +23 -23
- package/es/organism/review-slide/index.d.ts.map +1 -1
- package/es/organism/review-slide/index.js +3 -18
- package/es/organism/review-slide/index.js.map +1 -1
- package/es/template/external-course/index.d.ts +52 -0
- package/es/template/external-course/index.d.ts.map +1 -1
- package/es/template/external-course/index.js +10 -3
- package/es/template/external-course/index.js.map +1 -1
- package/es/template/external-course/style.css +1 -1
- package/lib/atom/input-switch/style.css +2 -1
- package/lib/atom/select/style.css +1 -1
- package/lib/molecule/cm-popin/index.d.ts.map +1 -1
- package/lib/molecule/cm-popin/index.js +2 -1
- package/lib/molecule/cm-popin/index.js.map +1 -1
- package/lib/molecule/filters/filters-wapper.css +0 -1
- package/lib/organism/mooc-header/index.d.ts +0 -1
- package/lib/organism/mooc-header/index.d.ts.map +1 -1
- package/lib/organism/mooc-header/index.js +2 -9
- package/lib/organism/mooc-header/index.js.map +1 -1
- package/lib/organism/mooc-header/style.css +23 -23
- package/lib/organism/review-slide/index.d.ts.map +1 -1
- package/lib/organism/review-slide/index.js +3 -18
- package/lib/organism/review-slide/index.js.map +1 -1
- package/lib/template/external-course/index.d.ts +52 -0
- package/lib/template/external-course/index.d.ts.map +1 -1
- package/lib/template/external-course/index.js +10 -3
- package/lib/template/external-course/index.js.map +1 -1
- package/lib/template/external-course/style.css +1 -1
- package/package.json +2 -2
- package/locales/.mtslconfig.json +0 -1
|
@@ -480,14 +480,36 @@
|
|
|
480
480
|
gap: 12px;
|
|
481
481
|
}
|
|
482
482
|
|
|
483
|
+
.setting:last-child {
|
|
484
|
+
font-family: 'Gilroy';
|
|
485
|
+
font-size: 13px;
|
|
486
|
+
font-weight: 600;
|
|
487
|
+
color: medium;
|
|
488
|
+
height: 40px;
|
|
489
|
+
border-top: 1px solid light;
|
|
490
|
+
display: flex;
|
|
491
|
+
justify-content: center;
|
|
492
|
+
align-items: center;
|
|
493
|
+
margin-top: 10px;
|
|
494
|
+
padding: 0 30px;
|
|
495
|
+
cursor: pointer;
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
.setting:last-child:hover {
|
|
499
|
+
color: dark;
|
|
500
|
+
}
|
|
501
|
+
|
|
483
502
|
.languageSelect {
|
|
484
503
|
width: 98%;
|
|
504
|
+
height: 30px;
|
|
485
505
|
}
|
|
486
506
|
|
|
487
|
-
.
|
|
507
|
+
.selectBoxes {
|
|
488
508
|
flex-direction: column;
|
|
489
509
|
height: 60px;
|
|
490
510
|
align-items: baseline;
|
|
511
|
+
margin-top: 15px;
|
|
512
|
+
margin-bottom: 10px;
|
|
491
513
|
}
|
|
492
514
|
|
|
493
515
|
.setting .label {
|
|
@@ -509,24 +531,6 @@
|
|
|
509
531
|
text-decoration: none;
|
|
510
532
|
}
|
|
511
533
|
|
|
512
|
-
.closeSettings {
|
|
513
|
-
font-family: 'Gilroy';
|
|
514
|
-
font-size: 13px;
|
|
515
|
-
font-weight: 600;
|
|
516
|
-
color: medium;
|
|
517
|
-
height: 40px;
|
|
518
|
-
border-top: 1px solid light;
|
|
519
|
-
display: flex;
|
|
520
|
-
justify-content: flex-end;
|
|
521
|
-
align-items: center;
|
|
522
|
-
padding: 0 30px;
|
|
523
|
-
cursor: pointer;
|
|
524
|
-
}
|
|
525
|
-
|
|
526
|
-
.closeSettings:hover {
|
|
527
|
-
color: dark;
|
|
528
|
-
}
|
|
529
|
-
|
|
530
534
|
.homeIcon {
|
|
531
535
|
min-width: 14px;
|
|
532
536
|
height: 14px;
|
|
@@ -834,8 +838,4 @@
|
|
|
834
838
|
.open .settings {
|
|
835
839
|
width: 100%;
|
|
836
840
|
}
|
|
837
|
-
|
|
838
|
-
.closeSettings {
|
|
839
|
-
display: none;
|
|
840
|
-
}
|
|
841
841
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/review-slide/index.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/organism/review-slide/index.js"],"names":[],"mappings":";AA+IA,0EAkDC"}
|
|
@@ -60,22 +60,7 @@ const CorrectionPopin = ({
|
|
|
60
60
|
information,
|
|
61
61
|
type: correctionPopinProps.type,
|
|
62
62
|
resultLabel: correctionPopinProps.resultLabel
|
|
63
|
-
};
|
|
64
|
-
// but that is on purpose to go to the next slide if you press enter when the correctionPopin is present
|
|
65
|
-
// istanbul ignore next
|
|
66
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
67
|
-
|
|
68
|
-
(0, _react.useEffect)(() => {
|
|
69
|
-
const keyDownHandler = event => {
|
|
70
|
-
if (event.key === 'Enter' || event.key === ' ') {
|
|
71
|
-
event.preventDefault();
|
|
72
|
-
onClick();
|
|
73
|
-
document.removeEventListener('keydown', keyDownHandler);
|
|
74
|
-
}
|
|
75
|
-
};
|
|
76
|
-
|
|
77
|
-
document.addEventListener('keydown', keyDownHandler);
|
|
78
|
-
}, []);
|
|
63
|
+
};
|
|
79
64
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
80
65
|
className: (0, _classnames.default)(_style.default.correctionPopinWrapper, animateCorrectionPopin ? _style.default.popinAnimation : null)
|
|
81
66
|
}, /*#__PURE__*/_react.default.createElement(_reviewCorrectionPopin.default, _correctionPopinProps));
|
|
@@ -115,12 +100,12 @@ const ValidateButton = ({
|
|
|
115
100
|
|
|
116
101
|
(0, _react.useEffect)(() => {
|
|
117
102
|
const keyDownHandler = event => {
|
|
118
|
-
if (event.key === 'Enter' || event.key === ' ') {
|
|
103
|
+
if (event.key === 'Enter' || event.key === ' ' && disabled) {
|
|
119
104
|
event.preventDefault();
|
|
120
105
|
}
|
|
121
106
|
};
|
|
122
107
|
|
|
123
|
-
|
|
108
|
+
document.addEventListener('keydown', keyDownHandler);
|
|
124
109
|
return () => {
|
|
125
110
|
document.removeEventListener('keydown', keyDownHandler);
|
|
126
111
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["CorrectionPopin","correctionPopinProps","slideIndex","showCorrectionPopin","animateCorrectionPopin","klf","getOr","information","label","message","next","get","onClick","_correctionPopinProps","type","resultLabel","useEffect","keyDownHandler","event","key","preventDefault","document","removeEventListener","addEventListener","classnames","style","correctionPopinWrapper","popinAnimation","propTypes","PropTypes","string","bool","ValidateButton","validateButton","primarySkinColor","ariaLabel","disabled","validateButtonProps","className","customStyle","backgroundColor","validateButtonWrapper","QuestionContainer","props","answerUI","questionText","questionOrigin","disableContent","slideContentContainer","disabledSlideContent","question","__html","help","answerContainer","shape","slide","ReviewSlide","legacyContext","skin","GetSkinFromContext","translate","GetTranslateFromContext","validateariaLabel","useMemo","loading","loadingAriaLabel","parentContentTitle","disabledContent","loader","contextTypes","Provider","childContextTypes"],"sources":["../../../src/organism/review-slide/index.js"],"sourcesContent":["import React, {useMemo, useEffect} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport get from 'lodash/fp/get';\nimport getOr from 'lodash/fp/getOr';\nimport Answer from '../../molecule/answer';\nimport ButtonLink from '../../atom/button-link';\nimport Loader from '../../atom/loader';\nimport ReviewCorrectionPopin from '../../molecule/review-correction-popin';\nimport Provider, {GetSkinFromContext, GetTranslateFromContext} from '../../atom/provider';\nimport propTypes from './prop-types';\nimport style from './style.css';\n\nconst CorrectionPopin = ({\n correctionPopinProps,\n slideIndex,\n showCorrectionPopin,\n animateCorrectionPopin\n}) => {\n if (!showCorrectionPopin) return null;\n\n const klf = getOr({}, 'klf', correctionPopinProps);\n const information = getOr({label: '', message: ''}, 'information', correctionPopinProps);\n const next = get('next', correctionPopinProps);\n const onClick = get(['next', 'onClick'], correctionPopinProps);\n\n const _correctionPopinProps = {\n next: {\n onClick,\n label: next && next.label,\n 'data-name': `next-question-button-${slideIndex}`,\n 'aria-label': next && next['aria-label']\n },\n klf,\n information,\n type: correctionPopinProps.type,\n resultLabel: correctionPopinProps.resultLabel\n };\n\n // there is an error of eslint here because this useEffect will be only there when the correctionPopin will be there\n // but that is on purpose to go to the next slide if you press enter when the correctionPopin is present\n // istanbul ignore next\n // eslint-disable-next-line react-hooks/rules-of-hooks\n useEffect(() => {\n const keyDownHandler = event => {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n onClick();\n document.removeEventListener('keydown', keyDownHandler);\n }\n };\n document.addEventListener('keydown', keyDownHandler);\n }, []);\n\n return (\n <div\n className={classnames(\n style.correctionPopinWrapper,\n animateCorrectionPopin ? style.popinAnimation : null\n )}\n >\n <ReviewCorrectionPopin {..._correctionPopinProps} />\n </div>\n );\n};\n\nCorrectionPopin.propTypes = {\n slideIndex: PropTypes.string,\n showCorrectionPopin: PropTypes.bool,\n animateCorrectionPopin: PropTypes.bool,\n correctionPopinProps: propTypes.correctionPopinProps\n};\n\nconst ValidateButton = ({slideIndex, validateButton, primarySkinColor, ariaLabel}) => {\n const {label, onClick, disabled} = validateButton;\n const validateButtonProps = {\n type: 'primary',\n label,\n 'aria-label': ariaLabel,\n 'data-name': `slide-validate-button-${slideIndex}`,\n onClick,\n disabled,\n className: style.validateButton,\n customStyle: {\n backgroundColor: primarySkinColor\n }\n };\n\n /* istanbul ignore next */\n useEffect(() => {\n const keyDownHandler = event => {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n }\n };\n if (disabled) document.addEventListener('keydown', keyDownHandler);\n return () => {\n document.removeEventListener('keydown', keyDownHandler);\n };\n }, [disabled]);\n\n return (\n <div key=\"button-wrapper\" className={style.validateButtonWrapper}>\n <ButtonLink {...validateButtonProps} />\n </div>\n );\n};\n\nValidateButton.propTypes = {\n slideIndex: PropTypes.string,\n validateButton: propTypes.validateButton,\n primarySkinColor: PropTypes.string,\n ariaLabel: PropTypes.string\n};\n\nconst QuestionContainer = props => {\n const {answerUI, questionText, questionOrigin, disableContent} = props;\n if (!answerUI || !questionText) return null;\n\n return (\n <div\n key=\"content-container\"\n data-testid=\"content-container\"\n className={classnames(\n style.slideContentContainer,\n disableContent ? style.disabledSlideContent : null\n )}\n >\n <div key=\"from-course\" className={style.questionOrigin}>\n {questionOrigin}\n </div>\n <div\n key=\"title\"\n data-testid=\"slide-question\"\n className={style.question}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: questionText}}\n />\n <div\n key=\"help\"\n className={style.help}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: get('help', answerUI)}}\n />\n <div key=\"answer-container\" className={style.answerContainer}>\n <Answer {...answerUI} key=\"answer\" />\n </div>\n </div>\n );\n};\n\nQuestionContainer.propTypes = {\n answerUI: PropTypes.shape(propTypes.slide.answerUI),\n questionText: PropTypes.string,\n questionOrigin: PropTypes.string,\n disableContent: PropTypes.bool\n};\n\nconst ReviewSlide = (props, legacyContext) => {\n const {slide, validateButton, correctionPopinProps, slideIndex = '0'} = props;\n\n const skin = GetSkinFromContext(legacyContext);\n const translate = GetTranslateFromContext(legacyContext);\n\n const validateariaLabel = translate('validate_aria_label');\n const primarySkinColor = useMemo(() => getOr('#00B0FF', 'common.primary', skin), [skin]);\n const {\n loading,\n loadingAriaLabel,\n parentContentTitle,\n questionText,\n disabledContent,\n answerUI,\n showCorrectionPopin,\n animateCorrectionPopin\n } = slide;\n\n return (\n <div data-testid=\"review-slide\" className={style.slide}>\n {loading ? (\n <Loader className={style.loader} theme=\"default\" aria-label={loadingAriaLabel} />\n ) : (\n <>\n <QuestionContainer\n questionOrigin={parentContentTitle}\n questionText={questionText}\n answerUI={answerUI}\n disableContent={disabledContent}\n key=\"question-container\"\n />\n <ValidateButton\n slideIndex={slideIndex}\n validateButton={validateButton}\n primarySkinColor={primarySkinColor}\n key=\"validate-button\"\n ariaLabel={validateariaLabel}\n />\n <CorrectionPopin\n correctionPopinProps={correctionPopinProps}\n slideIndex={slideIndex}\n showCorrectionPopin={showCorrectionPopin}\n animateCorrectionPopin={animateCorrectionPopin}\n key=\"correction-popin\"\n />\n </>\n )}\n </div>\n );\n};\n\nReviewSlide.propTypes = propTypes;\n\nReviewSlide.contextTypes = {\n skin: Provider.childContextTypes.skin,\n translate: Provider.childContextTypes.translate\n};\n\nexport default ReviewSlide;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,eAAe,GAAG,CAAC;EACvBC,oBADuB;EAEvBC,UAFuB;EAGvBC,mBAHuB;EAIvBC;AAJuB,CAAD,KAKlB;EACJ,IAAI,CAACD,mBAAL,EAA0B,OAAO,IAAP;EAE1B,MAAME,GAAG,GAAG,IAAAC,cAAA,EAAM,EAAN,EAAU,KAAV,EAAiBL,oBAAjB,CAAZ;EACA,MAAMM,WAAW,GAAG,IAAAD,cAAA,EAAM;IAACE,KAAK,EAAE,EAAR;IAAYC,OAAO,EAAE;EAArB,CAAN,EAAgC,aAAhC,EAA+CR,oBAA/C,CAApB;EACA,MAAMS,IAAI,GAAG,IAAAC,YAAA,EAAI,MAAJ,EAAYV,oBAAZ,CAAb;EACA,MAAMW,OAAO,GAAG,IAAAD,YAAA,EAAI,CAAC,MAAD,EAAS,SAAT,CAAJ,EAAyBV,oBAAzB,CAAhB;EAEA,MAAMY,qBAAqB,GAAG;IAC5BH,IAAI,EAAE;MACJE,OADI;MAEJJ,KAAK,EAAEE,IAAI,IAAIA,IAAI,CAACF,KAFhB;MAGJ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T,CAA2Bb,IADR;EAEzBE,SAAS,EAAEU,iBAAA,CAASC,iBAAT,CAA2BX;AAFb,CAA3B;eAKeJ,W"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["CorrectionPopin","correctionPopinProps","slideIndex","showCorrectionPopin","animateCorrectionPopin","klf","getOr","information","label","message","next","get","onClick","_correctionPopinProps","type","resultLabel","classnames","style","correctionPopinWrapper","popinAnimation","propTypes","PropTypes","string","bool","ValidateButton","validateButton","primarySkinColor","ariaLabel","disabled","validateButtonProps","className","customStyle","backgroundColor","useEffect","keyDownHandler","event","key","preventDefault","document","addEventListener","removeEventListener","validateButtonWrapper","QuestionContainer","props","answerUI","questionText","questionOrigin","disableContent","slideContentContainer","disabledSlideContent","question","__html","help","answerContainer","shape","slide","ReviewSlide","legacyContext","skin","GetSkinFromContext","translate","GetTranslateFromContext","validateariaLabel","useMemo","loading","loadingAriaLabel","parentContentTitle","disabledContent","loader","contextTypes","Provider","childContextTypes"],"sources":["../../../src/organism/review-slide/index.js"],"sourcesContent":["import React, {useMemo, useEffect} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport get from 'lodash/fp/get';\nimport getOr from 'lodash/fp/getOr';\nimport Answer from '../../molecule/answer';\nimport ButtonLink from '../../atom/button-link';\nimport Loader from '../../atom/loader';\nimport ReviewCorrectionPopin from '../../molecule/review-correction-popin';\nimport Provider, {GetSkinFromContext, GetTranslateFromContext} from '../../atom/provider';\nimport propTypes from './prop-types';\nimport style from './style.css';\n\nconst CorrectionPopin = ({\n correctionPopinProps,\n slideIndex,\n showCorrectionPopin,\n animateCorrectionPopin\n}) => {\n if (!showCorrectionPopin) return null;\n\n const klf = getOr({}, 'klf', correctionPopinProps);\n const information = getOr({label: '', message: ''}, 'information', correctionPopinProps);\n const next = get('next', correctionPopinProps);\n const onClick = get(['next', 'onClick'], correctionPopinProps);\n\n const _correctionPopinProps = {\n next: {\n onClick,\n label: next && next.label,\n 'data-name': `next-question-button-${slideIndex}`,\n 'aria-label': next && next['aria-label']\n },\n klf,\n information,\n type: correctionPopinProps.type,\n resultLabel: correctionPopinProps.resultLabel\n };\n\n return (\n <div\n className={classnames(\n style.correctionPopinWrapper,\n animateCorrectionPopin ? style.popinAnimation : null\n )}\n >\n <ReviewCorrectionPopin {..._correctionPopinProps} />\n </div>\n );\n};\n\nCorrectionPopin.propTypes = {\n slideIndex: PropTypes.string,\n showCorrectionPopin: PropTypes.bool,\n animateCorrectionPopin: PropTypes.bool,\n correctionPopinProps: propTypes.correctionPopinProps\n};\n\nconst ValidateButton = ({slideIndex, validateButton, primarySkinColor, ariaLabel}) => {\n const {label, onClick, disabled} = validateButton;\n const validateButtonProps = {\n type: 'primary',\n label,\n 'aria-label': ariaLabel,\n 'data-name': `slide-validate-button-${slideIndex}`,\n onClick,\n disabled,\n className: style.validateButton,\n customStyle: {\n backgroundColor: primarySkinColor\n }\n };\n\n /* istanbul ignore next */\n useEffect(() => {\n const keyDownHandler = event => {\n if (event.key === 'Enter' || (event.key === ' ' && disabled)) {\n event.preventDefault();\n }\n };\n document.addEventListener('keydown', keyDownHandler);\n return () => {\n document.removeEventListener('keydown', keyDownHandler);\n };\n }, [disabled]);\n\n return (\n <div key=\"button-wrapper\" className={style.validateButtonWrapper}>\n <ButtonLink {...validateButtonProps} />\n </div>\n );\n};\n\nValidateButton.propTypes = {\n slideIndex: PropTypes.string,\n validateButton: propTypes.validateButton,\n primarySkinColor: PropTypes.string,\n ariaLabel: PropTypes.string\n};\n\nconst QuestionContainer = props => {\n const {answerUI, questionText, questionOrigin, disableContent} = props;\n if (!answerUI || !questionText) return null;\n\n return (\n <div\n key=\"content-container\"\n data-testid=\"content-container\"\n className={classnames(\n style.slideContentContainer,\n disableContent ? style.disabledSlideContent : null\n )}\n >\n <div key=\"from-course\" className={style.questionOrigin}>\n {questionOrigin}\n </div>\n <div\n key=\"title\"\n data-testid=\"slide-question\"\n className={style.question}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: questionText}}\n />\n <div\n key=\"help\"\n className={style.help}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: get('help', answerUI)}}\n />\n <div key=\"answer-container\" className={style.answerContainer}>\n <Answer {...answerUI} key=\"answer\" />\n </div>\n </div>\n );\n};\n\nQuestionContainer.propTypes = {\n answerUI: PropTypes.shape(propTypes.slide.answerUI),\n questionText: PropTypes.string,\n questionOrigin: PropTypes.string,\n disableContent: PropTypes.bool\n};\n\nconst ReviewSlide = (props, legacyContext) => {\n const {slide, validateButton, correctionPopinProps, slideIndex = '0'} = props;\n\n const skin = GetSkinFromContext(legacyContext);\n const translate = GetTranslateFromContext(legacyContext);\n\n const validateariaLabel = translate('validate_aria_label');\n const primarySkinColor = useMemo(() => getOr('#00B0FF', 'common.primary', skin), [skin]);\n const {\n loading,\n loadingAriaLabel,\n parentContentTitle,\n questionText,\n disabledContent,\n answerUI,\n showCorrectionPopin,\n animateCorrectionPopin\n } = slide;\n\n return (\n <div data-testid=\"review-slide\" className={style.slide}>\n {loading ? (\n <Loader className={style.loader} theme=\"default\" aria-label={loadingAriaLabel} />\n ) : (\n <>\n <QuestionContainer\n questionOrigin={parentContentTitle}\n questionText={questionText}\n answerUI={answerUI}\n disableContent={disabledContent}\n key=\"question-container\"\n />\n <ValidateButton\n slideIndex={slideIndex}\n validateButton={validateButton}\n primarySkinColor={primarySkinColor}\n key=\"validate-button\"\n ariaLabel={validateariaLabel}\n />\n <CorrectionPopin\n correctionPopinProps={correctionPopinProps}\n slideIndex={slideIndex}\n showCorrectionPopin={showCorrectionPopin}\n animateCorrectionPopin={animateCorrectionPopin}\n key=\"correction-popin\"\n />\n </>\n )}\n </div>\n );\n};\n\nReviewSlide.propTypes = propTypes;\n\nReviewSlide.contextTypes = {\n skin: Provider.childContextTypes.skin,\n translate: Provider.childContextTypes.translate\n};\n\nexport default ReviewSlide;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAC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6BAAC,eAAD;IACE,oBAAoB,EAAE7D,oBADxB;IAEE,UAAU,EAAEC,UAFd;IAGE,mBAAmB,EAAEC,mBAHvB;IAIE,sBAAsB,EAAEC,sBAJ1B;IAKE,GAAG,EAAC;EALN,EAfF,CAJJ,CADF;AA+BD,CAlDD;;AAoDAoD,WAAW,CAACpC,SAAZ,2CAAwBA,mBAAxB;AAEAoC,WAAW,CAACa,YAAZ,GAA2B;EACzBX,IAAI,EAAEY,iBAAA,CAASC,iBAAT,CAA2Bb,IADR;EAEzBE,SAAS,EAAEU,iBAAA,CAASC,iBAAT,CAA2BX;AAFb,CAA3B;eAKeJ,W"}
|
|
@@ -21,6 +21,58 @@ 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
|
+
}>>;
|
|
24
76
|
};
|
|
25
77
|
static contextTypes: {
|
|
26
78
|
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":";AAoBA;IACE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAsBE;IAEF;;;;;;;;;;;;;;;;;;;;;;MAEE;IAmIu8c,wBAA8C;IAAA,sCAAyJ;IAjIhpd,+CAKE;IAEF,sBAsHC;CACF"}
|
|
@@ -35,10 +35,14 @@ var _button = _interopRequireDefault(require("../../atom/button"));
|
|
|
35
35
|
|
|
36
36
|
var _externalContentViewer = _interopRequireDefault(require("../../molecule/external-content-viewer"));
|
|
37
37
|
|
|
38
|
+
var _cmPopin = _interopRequireDefault(require("../../molecule/cm-popin"));
|
|
39
|
+
|
|
38
40
|
var _style = _interopRequireDefault(require("./style.css"));
|
|
39
41
|
|
|
40
42
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
41
43
|
|
|
44
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
45
|
+
|
|
42
46
|
const defaultWrapperStyle = {
|
|
43
47
|
default: _style.default.default,
|
|
44
48
|
cockpit: _style.default.defaultCockpit,
|
|
@@ -68,7 +72,8 @@ class ExternalCourse extends _react.default.Component {
|
|
|
68
72
|
loading,
|
|
69
73
|
backgroundImageUrl,
|
|
70
74
|
contentType,
|
|
71
|
-
mode = 'default'
|
|
75
|
+
mode = 'default',
|
|
76
|
+
closePopin
|
|
72
77
|
} = this.props;
|
|
73
78
|
const {
|
|
74
79
|
skin
|
|
@@ -137,9 +142,10 @@ class ExternalCourse extends _react.default.Component {
|
|
|
137
142
|
}, warningButton, completeButton, (0, _isNil2.default)(warning) ? null : /*#__PURE__*/_react.default.createElement("div", {
|
|
138
143
|
className: _style.default.rightSection
|
|
139
144
|
})) : null;
|
|
145
|
+
const popin = !(0, _isNil2.default)(closePopin) ? /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_cmPopin.default, closePopin)) : null;
|
|
140
146
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
141
147
|
className: defaultWrapperStyle[mode]
|
|
142
|
-
}, header, mainContentSlot, footer);
|
|
148
|
+
}, header, popin, mainContentSlot, footer);
|
|
143
149
|
}
|
|
144
150
|
|
|
145
151
|
}
|
|
@@ -167,7 +173,8 @@ ExternalCourse.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
167
173
|
loading: _propTypes.default.bool,
|
|
168
174
|
backgroundImageUrl: _propTypes.default.string,
|
|
169
175
|
contentType: _propTypes.default.string,
|
|
170
|
-
mode: _propTypes.default.string
|
|
176
|
+
mode: _propTypes.default.string,
|
|
177
|
+
closePopin: _propTypes.default.shape(_extends({}, _cmPopin.default.propTypes))
|
|
171
178
|
} : {};
|
|
172
179
|
var _default = ExternalCourse;
|
|
173
180
|
exports.default = _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["defaultWrapperStyle","default","style","cockpit","defaultCockpit","mobile","ExternalCourse","React","Component","handleOnClick","field","e","stopPropagation","preventDefault","onClick","render","name","type","url","warning","complete","quit","loading","backgroundImageUrl","contentType","mode","props","skin","context","primary","IconType","EXTERNAL_CONTENT_ICONS","icon","IconColor","color","mainContentSlot","loader","completeButton","disabled","label","backgroundColor","convert","cursor","classnames","completeCta","warningButton","leftSection","iconLabel","link","iconQuestion","quitButton","quitCta","titleSection","title","oval","iconHeader","innerHTML","__html","header","rightSection","footer","contextTypes","Provider","childContextTypes","propTypes","PropTypes","string","oneOf","isRequired","shape","func","bool"],"sources":["../../../src/template/external-course/index.js"],"sourcesContent":["import React from 'react';\nimport {NovaSolidInterfaceFeedbackInterfaceQuestionMark as QuestionIcon} from '@coorpacademy/nova-icons';\nimport {convert} from 'css-color-function';\nimport classnames from 'classnames';\nimport {get, getOr, keys, identity, isNil, isEmpty} from 'lodash/fp';\nimport PropTypes from 'prop-types';\nimport {EXTERNAL_CONTENT_ICONS} from '../../util/external-content';\nimport Provider from '../../atom/provider';\nimport Loader from '../../atom/loader';\nimport Button from '../../atom/button';\nimport ExternalContentViewer from '../../molecule/external-content-viewer';\nimport style from './style.css';\n\nconst defaultWrapperStyle = {\n default: style.default,\n cockpit: style.defaultCockpit,\n mobile: style.default\n};\n\nclass ExternalCourse extends React.Component {\n static propTypes = {\n name: PropTypes.string,\n type: PropTypes.oneOf(keys(EXTERNAL_CONTENT_ICONS)),\n url: PropTypes.string.isRequired,\n quit: PropTypes.shape({\n label: PropTypes.string.isRequired,\n onClick: PropTypes.func\n }),\n complete: PropTypes.shape({\n label: PropTypes.string.isRequired,\n disabled: PropTypes.bool,\n onClick: PropTypes.func\n }),\n warning: PropTypes.shape({\n label: PropTypes.string.isRequired,\n onClick: PropTypes.func\n }),\n loading: PropTypes.bool,\n backgroundImageUrl: PropTypes.string,\n contentType: PropTypes.string,\n mode: PropTypes.string\n };\n\n static contextTypes = {\n skin: Provider.childContextTypes.skin\n };\n\n handleOnClick = field => e => {\n e.stopPropagation();\n e.preventDefault();\n const onClick = get('onClick', field);\n return onClick && onClick(e);\n };\n\n render() {\n const {\n name,\n type,\n url,\n warning,\n complete,\n quit,\n loading,\n backgroundImageUrl,\n contentType,\n mode = 'default'\n } = this.props;\n const {skin} = this.context;\n const primary = getOr('#00B0FF', 'common.primary', skin);\n const IconType = EXTERNAL_CONTENT_ICONS[type].icon;\n const IconColor = EXTERNAL_CONTENT_ICONS[type].color;\n\n const mainContentSlot = loading ? (\n <div className={style.loader}>\n <Loader />\n </div>\n ) : (\n <ExternalContentViewer\n url={url}\n mode={mode}\n backgroundImageUrl={backgroundImageUrl}\n contentType={contentType}\n />\n );\n\n const completeButton = !isNil(complete) ? (\n <Button\n type=\"button\"\n disabled={loading ? true : complete.disabled}\n onClick={loading ? identity : this.handleOnClick(complete)}\n submitValue={complete.label}\n style={{\n backgroundColor:\n complete.disabled || loading ? convert(`color(${primary} a(-50%))`) : primary,\n cursor: loading ? 'progress' : 'pointer'\n }}\n className={classnames(\n style.completeCta,\n complete.disabled || loading ? style.disabled : null,\n loading ? style.loading : null\n )}\n />\n ) : null;\n\n const warningButton = !isNil(warning) ? (\n <div className={style.leftSection}>\n <div\n onClick={this.handleOnClick(warning)}\n className={classnames(style.iconLabel, style.link)}\n >\n <QuestionIcon className={style.iconQuestion} width={24} height={24} />\n <span>{warning.label}</span>\n </div>\n </div>\n ) : null;\n\n const quitButton = !isNil(quit) ? (\n <div className={style.leftSection}>\n <span\n className={classnames(style.quitCta, loading ? style.loading : null)}\n onClick={loading ? identity : this.handleOnClick(quit)}\n >\n {quit.label}\n </span>\n </div>\n ) : null;\n\n const titleSection = !isNil(name) ? (\n <div className={classnames(style.iconLabel, style.title)}>\n <div className={style.oval} style={{backgroundColor: IconColor}}>\n <IconType className={style.iconHeader} />\n </div>\n <span\n className={style.innerHTML}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: name}}\n />\n </div>\n ) : null;\n\n const header =\n !isNil(quit) || !isEmpty(name) ? (\n <div className={style.header}>\n {quitButton}\n {titleSection}\n {isNil(quit) ? null : <div className={style.rightSection} />}\n </div>\n ) : null;\n\n const footer =\n !isNil(warning) || !isNil(complete) ? (\n <div className={style.footer}>\n {warningButton}\n {completeButton}\n {isNil(warning) ? null : <div className={style.rightSection} />}\n </div>\n ) : null;\n\n return (\n <div className={def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W,EAAEyC,kBAAA,CAAUC,MAnBN;EAoBjBzC,IAAI,EAAEwC,kBAAA,CAAUC;AApBC,C;eAoJN5D,c"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["defaultWrapperStyle","default","style","cockpit","defaultCockpit","mobile","ExternalCourse","React","Component","handleOnClick","field","e","stopPropagation","preventDefault","onClick","render","name","type","url","warning","complete","quit","loading","backgroundImageUrl","contentType","mode","closePopin","props","skin","context","primary","IconType","EXTERNAL_CONTENT_ICONS","icon","IconColor","color","mainContentSlot","loader","completeButton","disabled","label","backgroundColor","convert","cursor","classnames","completeCta","warningButton","leftSection","iconLabel","link","iconQuestion","quitButton","quitCta","titleSection","title","oval","iconHeader","innerHTML","__html","header","rightSection","footer","popin","contextTypes","Provider","childContextTypes","propTypes","PropTypes","string","oneOf","isRequired","shape","func","bool","CmPopin"],"sources":["../../../src/template/external-course/index.js"],"sourcesContent":["import React from 'react';\nimport {NovaSolidInterfaceFeedbackInterfaceQuestionMark as QuestionIcon} from '@coorpacademy/nova-icons';\nimport {convert} from 'css-color-function';\nimport classnames from 'classnames';\nimport {get, getOr, keys, identity, isNil, isEmpty} from 'lodash/fp';\nimport PropTypes from 'prop-types';\nimport {EXTERNAL_CONTENT_ICONS} from '../../util/external-content';\nimport Provider from '../../atom/provider';\nimport Loader from '../../atom/loader';\nimport Button from '../../atom/button';\nimport ExternalContentViewer from '../../molecule/external-content-viewer';\nimport CmPopin from '../../molecule/cm-popin';\nimport style from './style.css';\n\nconst defaultWrapperStyle = {\n default: style.default,\n cockpit: style.defaultCockpit,\n mobile: style.default\n};\n\nclass ExternalCourse extends React.Component {\n static propTypes = {\n name: PropTypes.string,\n type: PropTypes.oneOf(keys(EXTERNAL_CONTENT_ICONS)),\n url: PropTypes.string.isRequired,\n quit: PropTypes.shape({\n label: PropTypes.string.isRequired,\n onClick: PropTypes.func\n }),\n complete: PropTypes.shape({\n label: PropTypes.string.isRequired,\n disabled: PropTypes.bool,\n onClick: PropTypes.func\n }),\n warning: PropTypes.shape({\n label: PropTypes.string.isRequired,\n onClick: PropTypes.func\n }),\n loading: PropTypes.bool,\n backgroundImageUrl: PropTypes.string,\n contentType: PropTypes.string,\n mode: PropTypes.string,\n closePopin: PropTypes.shape({...CmPopin.propTypes})\n };\n\n static contextTypes = {\n skin: Provider.childContextTypes.skin\n };\n\n handleOnClick = field => e => {\n e.stopPropagation();\n e.preventDefault();\n const onClick = get('onClick', field);\n return onClick && onClick(e);\n };\n\n render() {\n const {\n name,\n type,\n url,\n warning,\n complete,\n quit,\n loading,\n backgroundImageUrl,\n contentType,\n mode = 'default',\n closePopin\n } = this.props;\n const {skin} = this.context;\n const primary = getOr('#00B0FF', 'common.primary', skin);\n const IconType = EXTERNAL_CONTENT_ICONS[type].icon;\n const IconColor = EXTERNAL_CONTENT_ICONS[type].color;\n\n const mainContentSlot = loading ? (\n <div className={style.loader}>\n <Loader />\n </div>\n ) : (\n <ExternalContentViewer\n url={url}\n mode={mode}\n backgroundImageUrl={backgroundImageUrl}\n contentType={contentType}\n />\n );\n const completeButton = !isNil(complete) ? (\n <Button\n type=\"button\"\n disabled={loading ? true : complete.disabled}\n onClick={loading ? identity : this.handleOnClick(complete)}\n submitValue={complete.label}\n style={{\n backgroundColor:\n complete.disabled || loading ? convert(`color(${primary} a(-50%))`) : primary,\n cursor: loading ? 'progress' : 'pointer'\n }}\n className={classnames(\n style.completeCta,\n complete.disabled || loading ? style.disabled : null,\n loading ? style.loading : null\n )}\n />\n ) : null;\n\n const warningButton = !isNil(warning) ? (\n <div className={style.leftSection}>\n <div\n onClick={this.handleOnClick(warning)}\n className={classnames(style.iconLabel, style.link)}\n >\n <QuestionIcon className={style.iconQuestion} width={24} height={24} />\n <span>{warning.label}</span>\n </div>\n </div>\n ) : null;\n\n const quitButton = !isNil(quit) ? (\n <div className={style.leftSection}>\n <span\n className={classnames(style.quitCta, loading ? style.loading : null)}\n onClick={loading ? identity : this.handleOnClick(quit)}\n >\n {quit.label}\n </span>\n </div>\n ) : null;\n\n const titleSection = !isNil(name) ? (\n <div className={classnames(style.iconLabel, style.title)}>\n <div className={style.oval} style={{backgroundColor: IconColor}}>\n <IconType className={style.iconHeader} />\n </div>\n <span\n className={style.innerHTML}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: name}}\n />\n </div>\n ) : null;\n\n const header =\n !isNil(quit) || !isEmpty(name) ? (\n <div className={style.header}>\n {quitButton}\n {titleSection}\n {isNil(quit) ? null : <div className={style.rightSection} />}\n </div>\n ) : null;\n\n const footer =\n !isNil(warning) || !isNil(complete) ? (\n <div className={style.footer}>\n {warningButton}\n {completeButton}\n {isNil(warning) ? null : <div className={style.rightSection} />}\n </div>\n ) : null;\n\n const popin = !isNil(closePopin) ? (\n <div>\n <CmPopin {...closePopin} />\n </div>\n ) : null;\n\n return (\n <div className={defaultWrapperStyle[mode]}>\n {header}\n {popin}\n {mainContentSlot}\n {footer}\n </div>\n );\n }\n}\n\nexport default ExternalCourse;\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;AAEA,MAAMA,mBAAmB,GAAG;EAC1BC,OAAO,EAAEC,cAAA,CAAMD,OADW;EAE1BE,OAAO,EAAED,cAAA,CAAME,cAFW;EAG1BC,MAAM,EAAEH,cAAA,CAAMD;AAHY,CAA5B;;AAMA,MAAMK,cAAN,SAA6BC,cAAA,CAAMC,SAAnC,CAA6C;EAAA;IAAA;;IAAA,KA6B3CC,aA7B2C,GA6B3BC,KAAK,IAAIC,CAAC,IAAI;MAC5BA,CAAC,CAACC,eAAF;MACAD,CAAC,CAACE,cAAF;MACA,MAAMC,OAAO,GAAG,mBAAI,SAAJ,EAAeJ,KAAf,CAAhB;MACA,OAAOI,OAAO,IAAIA,OAAO,CAACH,CAAD,CAAzB;IACD,CAlC0C;EAAA;;EAoC3CI,MAAM,GAAG;IACP,MAAM;MACJC,IADI;MAEJC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AAUC,MAAV,CAAiBE,UAHL;EAIjBjD,IAAI,EAAE8C,kBAAA,CAAUI,KAAV,CAAgB;IACpB/B,KAAK,EAAE2B,kBAAA,CAAUC,MAAV,CAAiBE,UADJ;IAEpBxD,OAAO,EAAEqD,kBAAA,CAAUK;EAFC,CAAhB,CAJW;EAQjBpD,QAAQ,EAAE+C,kBAAA,CAAUI,KAAV,CAAgB;IACxB/B,KAAK,EAAE2B,kBAAA,CAAUC,MAAV,CAAiBE,UADA;IAExB/B,QAAQ,EAAE4B,kBAAA,CAAUM,IAFI;IAGxB3D,OAAO,EAAEqD,kBAAA,CAAUK;EAHK,CAAhB,CARO;EAajBrD,OAAO,EAAEgD,kBAAA,CAAUI,KAAV,CAAgB;IACvB/B,KAAK,EAAE2B,kBAAA,CAAUC,MAAV,CAAiBE,UADD;IAEvBxD,OAAO,EAAEqD,kBAAA,CAAUK;EAFI,CAAhB,CAbQ;EAiBjBlD,OAAO,EAAE6C,kBAAA,CAAUM,IAjBF;EAkBjBlD,kBAAkB,EAAE4C,kBAAA,CAAUC,MAlBb;EAmBjB5C,WAAW,EAAE2C,kBAAA,CAAUC,MAnBN;EAoBjB3C,IAAI,EAAE0C,kBAAA,CAAUC,MApBC;EAqBjB1C,UAAU,EAAEyC,kBAAA,CAAUI,KAAV,cAAoBG,gBAAA,CAAQR,SAA5B;AArBK,C;eA4JN5D,c"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coorpacademy/components",
|
|
3
|
-
"version": "11.11.
|
|
3
|
+
"version": "11.11.15-alpha.4+63f3c654c4",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -165,5 +165,5 @@
|
|
|
165
165
|
"last 2 versions",
|
|
166
166
|
"IE 11"
|
|
167
167
|
],
|
|
168
|
-
"gitHead": "
|
|
168
|
+
"gitHead": "63f3c654c440ce0e602449a1fa9debeba595a557"
|
|
169
169
|
}
|
package/locales/.mtslconfig.json
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"ignore_dirs":[]}
|