@coorpacademy/components 11.40.6-alpha.7 → 11.40.6-alpha.999.7
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/template/app-player/player/slides/header/index.d.ts.map +1 -1
- package/es/template/app-player/player/slides/header/index.js +2 -1
- package/es/template/app-player/player/slides/header/index.js.map +1 -1
- package/lib/template/app-player/player/slides/header/index.d.ts.map +1 -1
- package/lib/template/app-player/player/slides/header/index.js +2 -1
- package/lib/template/app-player/player/slides/header/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/template/app-player/player/slides/header/index.js"],"names":[],"mappings":";AAmFA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/template/app-player/player/slides/header/index.js"],"names":[],"mappings":";AAmFA,4EAiBC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _size from "lodash/fp/size";
|
|
1
2
|
import _upperCase from "lodash/fp/upperCase";
|
|
2
3
|
import _map from "lodash/fp/map";
|
|
3
4
|
import _isEmpty from "lodash/fp/isEmpty";
|
|
@@ -109,7 +110,7 @@ const SlidesHeader = (props = {}, context = undefined) => {
|
|
|
109
110
|
}) : null, type === HEADER_TYPE.MICROLEARNING ? /*#__PURE__*/React.createElement(Microlearning, {
|
|
110
111
|
content: content,
|
|
111
112
|
mode: mode
|
|
112
|
-
}) : null, _isEmpty(multiLang) ? null : /*#__PURE__*/React.createElement(ButtonMenuAction, buttonMenuActionProps(multiLang)), lives ? /*#__PURE__*/React.createElement(Lives, {
|
|
113
|
+
}) : null, _isEmpty(multiLang) || _size(multiLang.supportedLangs) <= 1 ? null : /*#__PURE__*/React.createElement(ButtonMenuAction, buttonMenuActionProps(multiLang)), lives ? /*#__PURE__*/React.createElement(Lives, {
|
|
113
114
|
count: lives.count
|
|
114
115
|
}) : null);
|
|
115
116
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","PropTypes","Link","ButtonMenuAction","COLORS","Learner","Microlearning","Lives","style","HEADER_TYPE","LEARNER","MICROLEARNING","STYLE_CHECKED","icon","position","faIcon","name","color","white","backgroundColor","cm_primary_blue","size","customStyle","padding","height","width","cm_blue_50","contentCustomStyle","justifyContent","buttonMenuActionProps","multiLangOptions","console","log","currentLang","supportedLangs","onClick","button","type","label","_upperCase","neutral_700","neutral_500","fontWeight","withChevron","menu","buttons","_map","code","disabled","menuWrapper","maxHeight","SlidesHeader","props","context","undefined","content","subcontent","lives","mode","multiLang","createElement","className","wrapper","_isEmpty","count","propTypes","process","env","NODE_ENV","oneOf","shape","href","title","string","isRequired","details","func","arrayOf"],"sources":["../../../../../../src/template/app-player/player/slides/header/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {isEmpty, map, upperCase} from 'lodash/fp';\nimport Link from '../../../../../atom/link';\nimport ButtonMenuAction from '../../../../../molecule/button-menu-action';\nimport {COLORS} from '../../../../../variables/colors';\nimport Learner from './learner';\nimport Microlearning from './microlearning';\nimport Lives from './lives';\nimport style from './style.css'; // eslint-disable-line css-modules/no-unused-class\n\nconst HEADER_TYPE = {\n LEARNER: 'learner',\n MICROLEARNING: 'microlearning'\n};\n\nconst STYLE_CHECKED = {\n icon: {\n position: 'right',\n faIcon: {\n name: 'check',\n color: COLORS.white,\n backgroundColor: COLORS.cm_primary_blue,\n size: 10,\n customStyle: {\n padding: '0px',\n height: '16px',\n width: '16px'\n }\n }\n },\n customStyle: {backgroundColor: COLORS.cm_blue_50},\n contentCustomStyle: {\n width: '100%',\n justifyContent: 'space-between'\n }\n};\n\nconst buttonMenuActionProps = multiLangOptions => {\n console.log('TCL ------> ~ buttonMenuActionProps ~ multiLangOptions:', multiLangOptions);\n const {currentLang = 'en', supportedLangs = [], onClick} = multiLangOptions;\n\n return {\n button: {\n type: 'text',\n label: upperCase(currentLang),\n 'aria-label': `${currentLang}-button`,\n 'data-name': 'button-multi-lang',\n onClick: () => null,\n icon: {\n position: 'left',\n faIcon: {\n name: 'globe',\n color: COLORS.neutral_700,\n size: 14\n }\n },\n customStyle: {\n width: 'fit-content',\n color: COLORS.neutral_500,\n fontWeight: 600\n },\n withChevron: true\n },\n menu: {\n buttons: map(\n ({code, label}) => ({\n ...(currentLang === code ? STYLE_CHECKED : {}),\n type: 'defaultLeft',\n onClick: () => onClick(code),\n label,\n 'data-name': `${code}-button`,\n disabled: false\n }),\n supportedLangs\n )\n },\n menuWrapper: {\n customStyle: {maxHeight: '248px', width: '209px'}\n }\n };\n};\n\nconst SlidesHeader = (props = {}, context = undefined) => {\n const {type, content, subcontent, lives, mode, multiLang} = props;\n console.log('TCL ------> ~ SlidesHeader ~ props:', props);\n console.log('TCL ------> ~ SlidesHeader ~ multiLang:', multiLang);\n\n return (\n <div data-name=\"slidesHeader\" className={style.wrapper}>\n {type === HEADER_TYPE.LEARNER ? (\n <Learner content={content} subcontent={subcontent} mode={mode} />\n ) : null}\n {type === HEADER_TYPE.MICROLEARNING ? <Microlearning content={content} mode={mode} /> : null}\n {isEmpty(multiLang) ? null : <ButtonMenuAction {...buttonMenuActionProps(multiLang)}
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","PropTypes","Link","ButtonMenuAction","COLORS","Learner","Microlearning","Lives","style","HEADER_TYPE","LEARNER","MICROLEARNING","STYLE_CHECKED","icon","position","faIcon","name","color","white","backgroundColor","cm_primary_blue","size","customStyle","padding","height","width","cm_blue_50","contentCustomStyle","justifyContent","buttonMenuActionProps","multiLangOptions","console","log","currentLang","supportedLangs","onClick","button","type","label","_upperCase","neutral_700","neutral_500","fontWeight","withChevron","menu","buttons","_map","code","disabled","menuWrapper","maxHeight","SlidesHeader","props","context","undefined","content","subcontent","lives","mode","multiLang","createElement","className","wrapper","_isEmpty","_size","count","propTypes","process","env","NODE_ENV","oneOf","shape","href","title","string","isRequired","details","func","arrayOf"],"sources":["../../../../../../src/template/app-player/player/slides/header/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {isEmpty, map, upperCase, size} from 'lodash/fp';\nimport Link from '../../../../../atom/link';\nimport ButtonMenuAction from '../../../../../molecule/button-menu-action';\nimport {COLORS} from '../../../../../variables/colors';\nimport Learner from './learner';\nimport Microlearning from './microlearning';\nimport Lives from './lives';\nimport style from './style.css'; // eslint-disable-line css-modules/no-unused-class\n\nconst HEADER_TYPE = {\n LEARNER: 'learner',\n MICROLEARNING: 'microlearning'\n};\n\nconst STYLE_CHECKED = {\n icon: {\n position: 'right',\n faIcon: {\n name: 'check',\n color: COLORS.white,\n backgroundColor: COLORS.cm_primary_blue,\n size: 10,\n customStyle: {\n padding: '0px',\n height: '16px',\n width: '16px'\n }\n }\n },\n customStyle: {backgroundColor: COLORS.cm_blue_50},\n contentCustomStyle: {\n width: '100%',\n justifyContent: 'space-between'\n }\n};\n\nconst buttonMenuActionProps = multiLangOptions => {\n console.log('TCL ------> ~ buttonMenuActionProps ~ multiLangOptions:', multiLangOptions);\n const {currentLang = 'en', supportedLangs = [], onClick} = multiLangOptions;\n\n return {\n button: {\n type: 'text',\n label: upperCase(currentLang),\n 'aria-label': `${currentLang}-button`,\n 'data-name': 'button-multi-lang',\n onClick: () => null,\n icon: {\n position: 'left',\n faIcon: {\n name: 'globe',\n color: COLORS.neutral_700,\n size: 14\n }\n },\n customStyle: {\n width: 'fit-content',\n color: COLORS.neutral_500,\n fontWeight: 600\n },\n withChevron: true\n },\n menu: {\n buttons: map(\n ({code, label}) => ({\n ...(currentLang === code ? STYLE_CHECKED : {}),\n type: 'defaultLeft',\n onClick: () => onClick(code),\n label,\n 'data-name': `${code}-button`,\n disabled: false\n }),\n supportedLangs\n )\n },\n menuWrapper: {\n customStyle: {maxHeight: '248px', width: '209px'}\n }\n };\n};\n\nconst SlidesHeader = (props = {}, context = undefined) => {\n const {type, content, subcontent, lives, mode, multiLang} = props;\n console.log('TCL ------> ~ SlidesHeader ~ props:', props);\n console.log('TCL ------> ~ SlidesHeader ~ multiLang:', multiLang);\n\n return (\n <div data-name=\"slidesHeader\" className={style.wrapper}>\n {type === HEADER_TYPE.LEARNER ? (\n <Learner content={content} subcontent={subcontent} mode={mode} />\n ) : null}\n {type === HEADER_TYPE.MICROLEARNING ? <Microlearning content={content} mode={mode} /> : null}\n {isEmpty(multiLang) || size(multiLang.supportedLangs) <= 1 ? null : (\n <ButtonMenuAction {...buttonMenuActionProps(multiLang)} />\n )}\n {lives ? <Lives count={lives.count} /> : null}\n </div>\n );\n};\n\nSlidesHeader.propTypes = {\n type: PropTypes.oneOf([HEADER_TYPE.LEARNER, HEADER_TYPE.MICROLEARNING]),\n content: PropTypes.shape({\n href: Link.propTypes.href,\n title: PropTypes.string.isRequired,\n details: PropTypes.string\n }),\n subcontent: PropTypes.shape({\n title: PropTypes.string,\n details: PropTypes.string\n }),\n lives: PropTypes.shape(Lives.propTypes),\n mode: PropTypes.string,\n multiLang: PropTypes.shape({\n onClick: PropTypes.func,\n currentLang: PropTypes.string,\n supportedLangs: PropTypes.arrayOf(\n PropTypes.shape({\n code: PropTypes.string.isRequired,\n label: PropTypes.string.isRequired\n })\n )\n })\n};\n\nexport default SlidesHeader;\n"],"mappings":";;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAElC,OAAOC,IAAI,MAAM,0BAA0B;AAC3C,OAAOC,gBAAgB,MAAM,4CAA4C;AACzE,SAAQC,MAAM,QAAO,iCAAiC;AACtD,OAAOC,OAAO,MAAM,WAAW;AAC/B,OAAOC,aAAa,MAAM,iBAAiB;AAC3C,OAAOC,KAAK,MAAM,SAAS;AAC3B,OAAOC,KAAK,MAAM,aAAa,CAAC,CAAC;;AAEjC,MAAMC,WAAW,GAAG;EAClBC,OAAO,EAAE,SAAS;EAClBC,aAAa,EAAE;AACjB,CAAC;AAED,MAAMC,aAAa,GAAG;EACpBC,IAAI,EAAE;I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,eAAexB,YAAY","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/template/app-player/player/slides/header/index.js"],"names":[],"mappings":";AAmFA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/template/app-player/player/slides/header/index.js"],"names":[],"mappings":";AAmFA,4EAiBC"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports.default = void 0;
|
|
5
|
+
var _size2 = _interopRequireDefault(require("lodash/fp/size"));
|
|
5
6
|
var _upperCase2 = _interopRequireDefault(require("lodash/fp/upperCase"));
|
|
6
7
|
var _map2 = _interopRequireDefault(require("lodash/fp/map"));
|
|
7
8
|
var _isEmpty2 = _interopRequireDefault(require("lodash/fp/isEmpty"));
|
|
@@ -115,7 +116,7 @@ const SlidesHeader = (props = {}, context = undefined) => {
|
|
|
115
116
|
}) : null, type === HEADER_TYPE.MICROLEARNING ? /*#__PURE__*/_react.default.createElement(_microlearning.default, {
|
|
116
117
|
content: content,
|
|
117
118
|
mode: mode
|
|
118
|
-
}) : null, (0, _isEmpty2.default)(multiLang) ? null : /*#__PURE__*/_react.default.createElement(_buttonMenuAction.default, buttonMenuActionProps(multiLang)), lives ? /*#__PURE__*/_react.default.createElement(_lives.default, {
|
|
119
|
+
}) : null, (0, _isEmpty2.default)(multiLang) || (0, _size2.default)(multiLang.supportedLangs) <= 1 ? null : /*#__PURE__*/_react.default.createElement(_buttonMenuAction.default, buttonMenuActionProps(multiLang)), lives ? /*#__PURE__*/_react.default.createElement(_lives.default, {
|
|
119
120
|
count: lives.count
|
|
120
121
|
}) : null);
|
|
121
122
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_react","_interopRequireDefault","require","_propTypes","_link","_buttonMenuAction","_colors","_learner","_microlearning","_lives","_style","e","__esModule","default","HEADER_TYPE","LEARNER","MICROLEARNING","STYLE_CHECKED","icon","position","faIcon","name","color","COLORS","white","backgroundColor","cm_primary_blue","size","customStyle","padding","height","width","cm_blue_50","contentCustomStyle","justifyContent","buttonMenuActionProps","multiLangOptions","console","log","currentLang","supportedLangs","onClick","button","type","label","_upperCase2","neutral_700","neutral_500","fontWeight","withChevron","menu","buttons","_map2","code","disabled","menuWrapper","maxHeight","SlidesHeader","props","context","undefined","content","subcontent","lives","mode","multiLang","createElement","className","style","wrapper","_isEmpty2","count","propTypes","process","env","NODE_ENV","PropTypes","oneOf","shape","href","Link","title","string","isRequired","details","Lives","func","arrayOf","_default","exports"],"sources":["../../../../../../src/template/app-player/player/slides/header/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {isEmpty, map, upperCase} from 'lodash/fp';\nimport Link from '../../../../../atom/link';\nimport ButtonMenuAction from '../../../../../molecule/button-menu-action';\nimport {COLORS} from '../../../../../variables/colors';\nimport Learner from './learner';\nimport Microlearning from './microlearning';\nimport Lives from './lives';\nimport style from './style.css'; // eslint-disable-line css-modules/no-unused-class\n\nconst HEADER_TYPE = {\n LEARNER: 'learner',\n MICROLEARNING: 'microlearning'\n};\n\nconst STYLE_CHECKED = {\n icon: {\n position: 'right',\n faIcon: {\n name: 'check',\n color: COLORS.white,\n backgroundColor: COLORS.cm_primary_blue,\n size: 10,\n customStyle: {\n padding: '0px',\n height: '16px',\n width: '16px'\n }\n }\n },\n customStyle: {backgroundColor: COLORS.cm_blue_50},\n contentCustomStyle: {\n width: '100%',\n justifyContent: 'space-between'\n }\n};\n\nconst buttonMenuActionProps = multiLangOptions => {\n console.log('TCL ------> ~ buttonMenuActionProps ~ multiLangOptions:', multiLangOptions);\n const {currentLang = 'en', supportedLangs = [], onClick} = multiLangOptions;\n\n return {\n button: {\n type: 'text',\n label: upperCase(currentLang),\n 'aria-label': `${currentLang}-button`,\n 'data-name': 'button-multi-lang',\n onClick: () => null,\n icon: {\n position: 'left',\n faIcon: {\n name: 'globe',\n color: COLORS.neutral_700,\n size: 14\n }\n },\n customStyle: {\n width: 'fit-content',\n color: COLORS.neutral_500,\n fontWeight: 600\n },\n withChevron: true\n },\n menu: {\n buttons: map(\n ({code, label}) => ({\n ...(currentLang === code ? STYLE_CHECKED : {}),\n type: 'defaultLeft',\n onClick: () => onClick(code),\n label,\n 'data-name': `${code}-button`,\n disabled: false\n }),\n supportedLangs\n )\n },\n menuWrapper: {\n customStyle: {maxHeight: '248px', width: '209px'}\n }\n };\n};\n\nconst SlidesHeader = (props = {}, context = undefined) => {\n const {type, content, subcontent, lives, mode, multiLang} = props;\n console.log('TCL ------> ~ SlidesHeader ~ props:', props);\n console.log('TCL ------> ~ SlidesHeader ~ multiLang:', multiLang);\n\n return (\n <div data-name=\"slidesHeader\" className={style.wrapper}>\n {type === HEADER_TYPE.LEARNER ? (\n <Learner content={content} subcontent={subcontent} mode={mode} />\n ) : null}\n {type === HEADER_TYPE.MICROLEARNING ? <Microlearning content={content} mode={mode} /> : null}\n {isEmpty(multiLang) ? null : <ButtonMenuAction {...buttonMenuActionProps(multiLang)}
|
|
1
|
+
{"version":3,"file":"index.js","names":["_react","_interopRequireDefault","require","_propTypes","_link","_buttonMenuAction","_colors","_learner","_microlearning","_lives","_style","e","__esModule","default","HEADER_TYPE","LEARNER","MICROLEARNING","STYLE_CHECKED","icon","position","faIcon","name","color","COLORS","white","backgroundColor","cm_primary_blue","size","customStyle","padding","height","width","cm_blue_50","contentCustomStyle","justifyContent","buttonMenuActionProps","multiLangOptions","console","log","currentLang","supportedLangs","onClick","button","type","label","_upperCase2","neutral_700","neutral_500","fontWeight","withChevron","menu","buttons","_map2","code","disabled","menuWrapper","maxHeight","SlidesHeader","props","context","undefined","content","subcontent","lives","mode","multiLang","createElement","className","style","wrapper","_isEmpty2","_size2","count","propTypes","process","env","NODE_ENV","PropTypes","oneOf","shape","href","Link","title","string","isRequired","details","Lives","func","arrayOf","_default","exports"],"sources":["../../../../../../src/template/app-player/player/slides/header/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {isEmpty, map, upperCase, size} from 'lodash/fp';\nimport Link from '../../../../../atom/link';\nimport ButtonMenuAction from '../../../../../molecule/button-menu-action';\nimport {COLORS} from '../../../../../variables/colors';\nimport Learner from './learner';\nimport Microlearning from './microlearning';\nimport Lives from './lives';\nimport style from './style.css'; // eslint-disable-line css-modules/no-unused-class\n\nconst HEADER_TYPE = {\n LEARNER: 'learner',\n MICROLEARNING: 'microlearning'\n};\n\nconst STYLE_CHECKED = {\n icon: {\n position: 'right',\n faIcon: {\n name: 'check',\n color: COLORS.white,\n backgroundColor: COLORS.cm_primary_blue,\n size: 10,\n customStyle: {\n padding: '0px',\n height: '16px',\n width: '16px'\n }\n }\n },\n customStyle: {backgroundColor: COLORS.cm_blue_50},\n contentCustomStyle: {\n width: '100%',\n justifyContent: 'space-between'\n }\n};\n\nconst buttonMenuActionProps = multiLangOptions => {\n console.log('TCL ------> ~ buttonMenuActionProps ~ multiLangOptions:', multiLangOptions);\n const {currentLang = 'en', supportedLangs = [], onClick} = multiLangOptions;\n\n return {\n button: {\n type: 'text',\n label: upperCase(currentLang),\n 'aria-label': `${currentLang}-button`,\n 'data-name': 'button-multi-lang',\n onClick: () => null,\n icon: {\n position: 'left',\n faIcon: {\n name: 'globe',\n color: COLORS.neutral_700,\n size: 14\n }\n },\n customStyle: {\n width: 'fit-content',\n color: COLORS.neutral_500,\n fontWeight: 600\n },\n withChevron: true\n },\n menu: {\n buttons: map(\n ({code, label}) => ({\n ...(currentLang === code ? STYLE_CHECKED : {}),\n type: 'defaultLeft',\n onClick: () => onClick(code),\n label,\n 'data-name': `${code}-button`,\n disabled: false\n }),\n supportedLangs\n )\n },\n menuWrapper: {\n customStyle: {maxHeight: '248px', width: '209px'}\n }\n };\n};\n\nconst SlidesHeader = (props = {}, context = undefined) => {\n const {type, content, subcontent, lives, mode, multiLang} = props;\n console.log('TCL ------> ~ SlidesHeader ~ props:', props);\n console.log('TCL ------> ~ SlidesHeader ~ multiLang:', multiLang);\n\n return (\n <div data-name=\"slidesHeader\" className={style.wrapper}>\n {type === HEADER_TYPE.LEARNER ? (\n <Learner content={content} subcontent={subcontent} mode={mode} />\n ) : null}\n {type === HEADER_TYPE.MICROLEARNING ? <Microlearning content={content} mode={mode} /> : null}\n {isEmpty(multiLang) || size(multiLang.supportedLangs) <= 1 ? null : (\n <ButtonMenuAction {...buttonMenuActionProps(multiLang)} />\n )}\n {lives ? <Lives count={lives.count} /> : null}\n </div>\n );\n};\n\nSlidesHeader.propTypes = {\n type: PropTypes.oneOf([HEADER_TYPE.LEARNER, HEADER_TYPE.MICROLEARNING]),\n content: PropTypes.shape({\n href: Link.propTypes.href,\n title: PropTypes.string.isRequired,\n details: PropTypes.string\n }),\n subcontent: PropTypes.shape({\n title: PropTypes.string,\n details: PropTypes.string\n }),\n lives: PropTypes.shape(Lives.propTypes),\n mode: PropTypes.string,\n multiLang: PropTypes.shape({\n onClick: PropTypes.func,\n currentLang: PropTypes.string,\n supportedLangs: PropTypes.arrayOf(\n PropTypes.shape({\n code: PropTypes.string.isRequired,\n label: PropTypes.string.isRequired\n })\n )\n })\n};\n\nexport default SlidesHeader;\n"],"mappings":";;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAF,sBAAA,CAAAC,OAAA;AAEA,IAAAE,KAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,iBAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA,IAAAM,cAAA,GAAAP,sBAAA,CAAAC,OAAA;AACA,IAAAO,MAAA,GAAAR,sBAAA,CAAAC,OAAA;AACA,IAAAQ,MAAA,GAAAT,sBAAA,CAAAC,OAAA;AAAgC,SAAAD,uBAAAU,CAAA,WAAAA,CAAA,IAAAA,CA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AAI,EAAEa,kBAAS,CAACM,MAAM;EACtBlB,SAAS,EAAEY,kBAAS,CAACE,KAAK,CAAC;IACzBtC,OAAO,EAAEoC,kBAAS,CAACU,IAAI;IACvBhD,WAAW,EAAEsC,kBAAS,CAACM,MAAM;IAC7B3C,cAAc,EAAEqC,kBAAS,CAACW,OAAO,CAC/BX,kBAAS,CAACE,KAAK,CAAC;MACd1B,IAAI,EAAEwB,kBAAS,CAACM,MAAM,CAACC,UAAU;MACjCxC,KAAK,EAAEiC,kBAAS,CAACM,MAAM,CAACC;IAC1B,CAAC,CACH;EACF,CAAC;AACH,CAAC;AAAC,IAAAK,QAAA,GAAAC,OAAA,CAAA7E,OAAA,GAEa4C,YAAY","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coorpacademy/components",
|
|
3
|
-
"version": "11.40.6-alpha.7+
|
|
3
|
+
"version": "11.40.6-alpha.999.7+00c1eee33",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -166,5 +166,5 @@
|
|
|
166
166
|
"last 2 versions",
|
|
167
167
|
"IE 11"
|
|
168
168
|
],
|
|
169
|
-
"gitHead": "
|
|
169
|
+
"gitHead": "00c1eee33c45cf39dc157749f88a0ad8de97cbf8"
|
|
170
170
|
}
|