@coorpacademy/components 11.2.7-alpha.3 → 11.2.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/atom/review-presentation/index.d.ts.map +1 -1
- package/es/atom/review-presentation/index.js +5 -9
- package/es/atom/review-presentation/index.js.map +1 -1
- package/es/atom/review-presentation/prop-types.d.ts +0 -8
- package/es/atom/review-presentation/prop-types.d.ts.map +1 -1
- package/es/atom/review-presentation/prop-types.js +1 -2
- package/es/atom/review-presentation/prop-types.js.map +1 -1
- package/es/molecule/filters/index.d.ts +2 -0
- package/es/molecule/filters/index.d.ts.map +1 -1
- package/es/molecule/filters/index.js +10 -4
- package/es/molecule/filters/index.js.map +1 -1
- package/es/organism/mooc-footer/index.d.ts +1 -0
- package/es/organism/mooc-footer/index.d.ts.map +1 -1
- package/es/organism/mooc-footer/index.js +3 -1
- package/es/organism/mooc-footer/index.js.map +1 -1
- package/es/organism/mooc-header/index.d.ts.map +1 -1
- package/es/organism/mooc-header/index.js +4 -3
- package/es/organism/mooc-header/index.js.map +1 -1
- package/es/organism/review-congrats/index.native.d.ts.map +1 -1
- package/es/organism/review-congrats/index.native.js +5 -4
- package/es/organism/review-congrats/index.native.js.map +1 -1
- package/es/organism/review-slide/index.native.d.ts.map +1 -1
- package/es/organism/review-slide/index.native.js +3 -1
- package/es/organism/review-slide/index.native.js.map +1 -1
- package/es/organism/review-stacked-slides/index.native.d.ts +0 -1
- package/es/organism/review-stacked-slides/index.native.d.ts.map +1 -1
- package/es/organism/review-stacked-slides/index.native.js +37 -32
- package/es/organism/review-stacked-slides/index.native.js.map +1 -1
- package/es/template/activity/stars-summary.css +2 -0
- package/es/template/activity/stars-summary.js +2 -2
- package/es/template/activity/stars-summary.js.map +1 -1
- package/es/template/app-review/index.d.ts +0 -4
- package/es/template/app-review/index.d.ts.map +1 -1
- package/es/template/app-review/prop-types.d.ts +0 -4
- package/es/template/app-review/prop-types.d.ts.map +1 -1
- package/es/template/common/search-page/index.d.ts +4 -0
- package/es/template/common/search-page/index.d.ts.map +1 -1
- package/es/template/common/search-page/index.js +10 -3
- package/es/template/common/search-page/index.js.map +1 -1
- package/es/template/review-dashboard-skills/index.d.ts +0 -4
- package/lib/atom/review-presentation/index.d.ts.map +1 -1
- package/lib/atom/review-presentation/index.js +5 -9
- package/lib/atom/review-presentation/index.js.map +1 -1
- package/lib/atom/review-presentation/prop-types.d.ts +0 -8
- package/lib/atom/review-presentation/prop-types.d.ts.map +1 -1
- package/lib/atom/review-presentation/prop-types.js +1 -2
- package/lib/atom/review-presentation/prop-types.js.map +1 -1
- package/lib/molecule/filters/index.d.ts +2 -0
- package/lib/molecule/filters/index.d.ts.map +1 -1
- package/lib/molecule/filters/index.js +10 -4
- package/lib/molecule/filters/index.js.map +1 -1
- package/lib/organism/mooc-footer/index.d.ts +1 -0
- package/lib/organism/mooc-footer/index.d.ts.map +1 -1
- package/lib/organism/mooc-footer/index.js +3 -1
- package/lib/organism/mooc-footer/index.js.map +1 -1
- package/lib/organism/mooc-header/index.d.ts.map +1 -1
- package/lib/organism/mooc-header/index.js +4 -3
- package/lib/organism/mooc-header/index.js.map +1 -1
- package/lib/organism/review-congrats/index.native.d.ts.map +1 -1
- package/lib/organism/review-congrats/index.native.js +5 -4
- package/lib/organism/review-congrats/index.native.js.map +1 -1
- package/lib/organism/review-slide/index.native.d.ts.map +1 -1
- package/lib/organism/review-slide/index.native.js +3 -1
- package/lib/organism/review-slide/index.native.js.map +1 -1
- package/lib/organism/review-stacked-slides/index.native.d.ts +0 -1
- package/lib/organism/review-stacked-slides/index.native.d.ts.map +1 -1
- package/lib/organism/review-stacked-slides/index.native.js +38 -34
- package/lib/organism/review-stacked-slides/index.native.js.map +1 -1
- package/lib/template/activity/stars-summary.css +2 -0
- package/lib/template/activity/stars-summary.js +2 -2
- package/lib/template/activity/stars-summary.js.map +1 -1
- package/lib/template/app-review/index.d.ts +0 -4
- package/lib/template/app-review/index.d.ts.map +1 -1
- package/lib/template/app-review/prop-types.d.ts +0 -4
- package/lib/template/app-review/prop-types.d.ts.map +1 -1
- package/lib/template/common/search-page/index.d.ts +4 -0
- package/lib/template/common/search-page/index.d.ts.map +1 -1
- package/lib/template/common/search-page/index.js +10 -3
- package/lib/template/common/search-page/index.js.map +1 -1
- package/lib/template/review-dashboard-skills/index.d.ts +0 -4
- package/locales/.mtslconfig.json +1 -0
- package/package.json +2 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
|
-
exports.default =
|
|
4
|
+
exports.default = void 0;
|
|
5
5
|
|
|
6
6
|
var _react = _interopRequireWildcard(require("react"));
|
|
7
7
|
|
|
@@ -19,9 +19,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
19
19
|
|
|
20
20
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
21
21
|
|
|
22
|
-
const TOTAL_SLIDES_STACK = 5;
|
|
23
|
-
exports.TOTAL_SLIDES_STACK = TOTAL_SLIDES_STACK;
|
|
24
|
-
|
|
25
22
|
const style = _reactNative.StyleSheet.create({
|
|
26
23
|
slides: {
|
|
27
24
|
flex: 1,
|
|
@@ -29,19 +26,6 @@ const style = _reactNative.StyleSheet.create({
|
|
|
29
26
|
width: '100%'
|
|
30
27
|
}
|
|
31
28
|
});
|
|
32
|
-
|
|
33
|
-
const FakeSlide = ({
|
|
34
|
-
position,
|
|
35
|
-
validateButton
|
|
36
|
-
}) => /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
37
|
-
num: position,
|
|
38
|
-
slide: {
|
|
39
|
-
loading: true,
|
|
40
|
-
position
|
|
41
|
-
},
|
|
42
|
-
slideIndex: `${position}`,
|
|
43
|
-
validateButton: validateButton
|
|
44
|
-
});
|
|
45
29
|
/*
|
|
46
30
|
- slides are ordered to be played from left to right: [0,1,2,3]
|
|
47
31
|
- slides are piled on the view, so we need to reverse the order:
|
|
@@ -60,7 +44,8 @@ const StackedSlides = props => {
|
|
|
60
44
|
correctionPopinProps
|
|
61
45
|
} = props;
|
|
62
46
|
const [unstacked, setUnstacked] = (0, _react.useState)([]);
|
|
63
|
-
const [
|
|
47
|
+
const [restacking, setRestacking] = (0, _react.useState)(null);
|
|
48
|
+
const [restackingDone, setRestackingDone] = (0, _react.useState)(false);
|
|
64
49
|
const hideSlides = (0, _reactNativeAnimation.useTranslateY)({
|
|
65
50
|
fromValue: 0,
|
|
66
51
|
toValue: windowHeight,
|
|
@@ -72,6 +57,12 @@ const StackedSlides = props => {
|
|
|
72
57
|
duration: 500,
|
|
73
58
|
easing: _reactNative.Easing.cubic
|
|
74
59
|
});
|
|
60
|
+
const restackTranslation = (0, _reactNativeAnimation.useTranslateY)({
|
|
61
|
+
toValue: 0,
|
|
62
|
+
fromValue: -windowHeight,
|
|
63
|
+
duration: 1200,
|
|
64
|
+
easing: _reactNative.Easing.out(_reactNative.Easing.cubic)
|
|
65
|
+
});
|
|
75
66
|
(0, _react.useEffect)(() => {
|
|
76
67
|
if (endReview) {
|
|
77
68
|
hideSlides.start();
|
|
@@ -81,10 +72,12 @@ const StackedSlides = props => {
|
|
|
81
72
|
const unstackingSlide = (0, _keys.default)(slides).find(k => slides[k].animationType === 'unstack');
|
|
82
73
|
const remainingKeys = (0, _keys.default)(slides).filter(k => slides[k].position >= 0 && !slides[k].animationType);
|
|
83
74
|
const orderedKeys = remainingKeys.sort((k1, k2) => slides[k2].position > slides[k1].position ? 1 : -1);
|
|
84
|
-
const
|
|
75
|
+
const animatedFrontSlide = unstackingSlide || (restackingSlide && restacking === null ? restackingSlide : undefined);
|
|
76
|
+
const animatedRestackedSlide = restacking !== null;
|
|
85
77
|
(0, _react.useEffect)(() => {
|
|
86
|
-
if (
|
|
87
|
-
|
|
78
|
+
if (restacking !== null && orderedKeys.includes(restacking)) {
|
|
79
|
+
setRestacking(null);
|
|
80
|
+
setRestackingDone(false);
|
|
88
81
|
} // this effect is required only when the list orderedKeys changes
|
|
89
82
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
90
83
|
|
|
@@ -99,18 +92,24 @@ const StackedSlides = props => {
|
|
|
99
92
|
}
|
|
100
93
|
}, [unstackingSlide, unstacked, setUnstacked, translateDown]);
|
|
101
94
|
(0, _react.useEffect)(() => {
|
|
102
|
-
const
|
|
95
|
+
const startRestacking = !restackingDone && restackingSlide && restacking !== restackingSlide;
|
|
103
96
|
|
|
104
|
-
if (
|
|
97
|
+
if (startRestacking) {
|
|
105
98
|
translateDown.start(() => {
|
|
106
|
-
|
|
99
|
+
setRestacking(restackingSlide);
|
|
100
|
+
restackTranslation.start(() => {
|
|
101
|
+
setRestackingDone(true);
|
|
102
|
+
});
|
|
107
103
|
});
|
|
108
|
-
}
|
|
109
|
-
|
|
104
|
+
} // this effect is required only to trigger the restack animation when a new restackingSlide is set
|
|
105
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
106
|
+
|
|
107
|
+
}, [restackingSlide, restacking]);
|
|
110
108
|
const stackedSlides = orderedKeys.map((slideIndex, index) => {
|
|
111
109
|
const slide = slides[slideIndex];
|
|
110
|
+
const num = orderedKeys.length - index;
|
|
112
111
|
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
113
|
-
num
|
|
112
|
+
num,
|
|
114
113
|
slideIndex,
|
|
115
114
|
slide,
|
|
116
115
|
validateButton,
|
|
@@ -119,23 +118,28 @@ const StackedSlides = props => {
|
|
|
119
118
|
});
|
|
120
119
|
});
|
|
121
120
|
|
|
122
|
-
if (
|
|
121
|
+
if (animatedFrontSlide) {
|
|
123
122
|
stackedSlides.push( /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
124
123
|
num: 0,
|
|
125
|
-
slideIndex:
|
|
126
|
-
slide: slides[
|
|
124
|
+
slideIndex: animatedFrontSlide,
|
|
125
|
+
slide: slides[animatedFrontSlide],
|
|
127
126
|
validateButton,
|
|
128
127
|
correctionPopinProps,
|
|
129
128
|
animatedStyle: [translateDown.animatedStyle],
|
|
130
|
-
key:
|
|
129
|
+
key: animatedFrontSlide
|
|
131
130
|
}));
|
|
132
131
|
}
|
|
133
132
|
|
|
134
133
|
return /*#__PURE__*/_react.default.createElement(_reactNative.Animated.View, {
|
|
135
134
|
style: [style.slides, hideSlides.animatedStyle]
|
|
136
|
-
},
|
|
137
|
-
|
|
138
|
-
|
|
135
|
+
}, animatedRestackedSlide ? /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
136
|
+
num: orderedKeys.length + 1,
|
|
137
|
+
slideIndex: restacking,
|
|
138
|
+
slide: slides[restacking],
|
|
139
|
+
validateButton,
|
|
140
|
+
correctionPopinProps,
|
|
141
|
+
animatedStyle: [restackTranslation.animatedStyle],
|
|
142
|
+
key: restacking
|
|
139
143
|
}) : null, stackedSlides);
|
|
140
144
|
};
|
|
141
145
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.native.js","names":["
|
|
1
|
+
{"version":3,"file":"index.native.js","names":["style","StyleSheet","create","slides","flex","height","width","StackedSlides","props","windowHeight","useWindowDimensions","endReview","validateButton","correctionPopinProps","unstacked","setUnstacked","useState","restacking","setRestacking","restackingDone","setRestackingDone","hideSlides","useTranslateY","fromValue","toValue","duration","translateDown","easing","Easing","cubic","restackTranslation","out","useEffect","start","restackingSlide","keys","find","k","animationType","unstackingSlide","remainingKeys","filter","position","orderedKeys","sort","k1","k2","animatedFrontSlide","undefined","animatedRestackedSlide","includes","toString","unstacking","startRestacking","stackedSlides","map","slideIndex","index","slide","num","length","push","animatedStyle"],"sources":["../../../src/organism/review-stacked-slides/index.native.tsx"],"sourcesContent":["import React, {useEffect, useState} from 'react';\nimport {Animated, Easing, StyleSheet, useWindowDimensions} from 'react-native';\nimport keys from 'lodash/fp/keys';\nimport {useTranslateY} from '@coorpacademy/react-native-animation';\nimport Slide from '../review-slide/index.native';\nimport type {ReviewStackProps} from './prop-types';\n\nconst style = StyleSheet.create({\n slides: {\n flex: 1,\n height: '100%',\n width: '100%'\n }\n});\n\n/*\n - slides are ordered to be played from left to right: [0,1,2,3]\n - slides are piled on the view, so we need to reverse the order:\n -> it's like our eye is looking from the right [3,2,1,0] <-- oO\n*/\nconst StackedSlides = (props: ReviewStackProps) => {\n const {height: windowHeight} = useWindowDimensions();\n const {endReview, slides, validateButton, correctionPopinProps} = props;\n const [unstacked, setUnstacked] = useState<string[]>([]);\n const [restacking, setRestacking] = useState<string | null>(null);\n const [restackingDone, setRestackingDone] = useState<boolean>(false);\n\n const hideSlides = useTranslateY({\n fromValue: 0,\n toValue: windowHeight,\n duration: 800\n });\n\n const translateDown = useTranslateY({\n fromValue: 0,\n toValue: windowHeight - 100,\n duration: 500,\n easing: Easing.cubic\n });\n\n const restackTranslation = useTranslateY({\n toValue: 0,\n fromValue: -windowHeight,\n duration: 1200,\n easing: Easing.out(Easing.cubic)\n });\n\n useEffect(() => {\n if (endReview) {\n hideSlides.start();\n }\n }, [endReview, hideSlides]);\n\n const restackingSlide = keys(slides).find(k => slides[k].animationType === 'restack');\n const unstackingSlide = keys(slides).find(k => slides[k].animationType === 'unstack');\n\n const remainingKeys = keys(slides).filter(\n k => slides[k].position >= 0 && !slides[k].animationType\n );\n\n const orderedKeys = remainingKeys.sort((k1, k2) =>\n slides[k2].position > slides[k1].position ? 1 : -1\n );\n\n const animatedFrontSlide =\n unstackingSlide || (restackingSlide && restacking === null ? restackingSlide : undefined);\n\n const animatedRestackedSlide = restacking !== null;\n\n useEffect(() => {\n if (restacking !== null && orderedKeys.includes(restacking)) {\n setRestacking(null);\n setRestackingDone(false);\n }\n // this effect is required only when the list orderedKeys changes\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [orderedKeys.toString()]);\n\n useEffect(() => {\n const unstacking = unstackingSlide && !unstacked.includes(unstackingSlide);\n\n if (unstacking) {\n translateDown.start(() => {\n setUnstacked([...unstacked, unstackingSlide]);\n });\n }\n }, [unstackingSlide, unstacked, setUnstacked, translateDown]);\n\n useEffect(() => {\n const startRestacking = !restackingDone && restackingSlide && restacking !== restackingSlide;\n\n if (startRestacking) {\n translateDown.start(() => {\n setRestacking(restackingSlide);\n restackTranslation.start(() => {\n setRestackingDone(true);\n });\n });\n }\n // this effect is required only to trigger the restack animation when a new restackingSlide is set\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [restackingSlide, restacking]);\n\n const stackedSlides = orderedKeys.map((slideIndex, index) => {\n const slide = slides[slideIndex];\n const num = orderedKeys.length - index;\n\n return (\n <Slide\n {...{\n num,\n slideIndex,\n slide,\n validateButton,\n correctionPopinProps\n }}\n key={slideIndex}\n />\n );\n });\n\n if (animatedFrontSlide) {\n stackedSlides.push(\n <Slide\n {...{\n num: 0,\n slideIndex: animatedFrontSlide,\n slide: slides[animatedFrontSlide],\n validateButton,\n correctionPopinProps\n }}\n animatedStyle={[translateDown.animatedStyle]}\n key={animatedFrontSlide}\n />\n );\n }\n\n return (\n <Animated.View style={[style.slides, hideSlides.animatedStyle]}>\n {animatedRestackedSlide ? (\n <Slide\n {...{\n num: orderedKeys.length + 1,\n slideIndex: restacking,\n slide: slides[restacking],\n validateButton,\n correctionPopinProps\n }}\n animatedStyle={[restackTranslation.animatedStyle]}\n key={restacking}\n />\n ) : null}\n {stackedSlides}\n </Animated.View>\n );\n};\n\nexport default StackedSlides;\n"],"mappings":";;;;;A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MAEIF,GAAG,EAAE,CAFT;MAGIH,UAAU,EAAET,kBAHhB;MAIIW,KAAK,EAAEvD,MAAM,CAAC4C,kBAAD,CAJjB;MAKInC,cALJ;MAMIC,oBANJ;MAQE,aAAa,EAAE,CAACa,aAAa,CAACoC,aAAf,CARjB;MASE,GAAG,EAAEf;IATP,EADF;EAaD;;EAED,oBACE,6BAAC,qBAAD,CAAU,IAAV;IAAe,KAAK,EAAE,CAAC/C,KAAK,CAACG,MAAP,EAAekB,UAAU,CAACyC,aAA1B;EAAtB,GACGb,sBAAsB,gBACrB,6BAAC,cAAD;IAEIU,GAAG,EAAEhB,WAAW,CAACiB,MAAZ,GAAqB,CAF9B;IAGIJ,UAAU,EAAEvC,UAHhB;IAIIyC,KAAK,EAAEvD,MAAM,CAACc,UAAD,CAJjB;IAKIL,cALJ;IAMIC,oBANJ;IAQE,aAAa,EAAE,CAACiB,kBAAkB,CAACgC,aAApB,CARjB;IASE,GAAG,EAAE7C;EATP,EADqB,GAYnB,IAbN,EAcGqC,aAdH,CADF;AAkBD,CAvID;;eAyIe/C,a"}
|
|
@@ -40,7 +40,7 @@ const EngineTab = ({
|
|
|
40
40
|
type
|
|
41
41
|
} = engine;
|
|
42
42
|
const state = engineIndex < firstItem ? 'hidden' : 'active';
|
|
43
|
-
return /*#__PURE__*/_react.default.createElement("
|
|
43
|
+
return /*#__PURE__*/_react.default.createElement("li", {
|
|
44
44
|
className: _starsSummary.default[state],
|
|
45
45
|
key: type,
|
|
46
46
|
"data-name": `${type}_total_${state}`
|
|
@@ -154,7 +154,7 @@ class StarsSummary extends _react.default.Component {
|
|
|
154
154
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
155
155
|
"data-name": "myStars-wrapper",
|
|
156
156
|
className: _starsSummary.default.myStarsWrapper
|
|
157
|
-
}, /*#__PURE__*/_react.default.createElement("
|
|
157
|
+
}, /*#__PURE__*/_react.default.createElement("ul", {
|
|
158
158
|
className: _starsSummary.default.allStars,
|
|
159
159
|
"data-name": "engineList"
|
|
160
160
|
}, /*#__PURE__*/_react.default.createElement(EngineTabs, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stars-summary.js","names":["EngineTab","engine","engineIndex","firstItem","type","state","style","hidden","active","propTypes","PropTypes","shape","EngineStars","number","EngineTabs","engines","useMemo","convert","cap","index","arrayOf","StarsSummary","React","Component","constructor","props","totalItems","length","handleOnLeft","bind","handleOnRight","scrollTo","page","setState","render","total","skin","context","dark","primary","leftArrowView","circle","left","rightArrowView","right","myStars","myStarsWrapper","allStars","footerSummaryStars","backgroundColor","totalStars","label","stars","iconBubble","iconHeader","navigationLeft","navigationRight","contextTypes","Provider","childContextTypes","string","isRequired"],"sources":["../../../src/template/activity/stars-summary.js"],"sourcesContent":["import React, {useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport {get, getOr, isEmpty, map} from 'lodash/fp';\nimport {\n NovaCompositionNavigationArrowLeft as ArrowLeft,\n NovaCompositionNavigationArrowRight as ArrowRight,\n NovaCompositionCoorpacademyStar as StarIcon\n} from '@coorpacademy/nova-icons';\nimport Provider from '../../atom/provider';\nimport EngineStars from './engine-stars';\nimport style from './stars-summary.css';\n\nconst EngineTab = ({engine, engineIndex, firstItem}) => {\n const {type} = engine;\n const state = engineIndex < firstItem ? 'hidden' : 'active';\n return (\n <
|
|
1
|
+
{"version":3,"file":"stars-summary.js","names":["EngineTab","engine","engineIndex","firstItem","type","state","style","hidden","active","propTypes","PropTypes","shape","EngineStars","number","EngineTabs","engines","useMemo","convert","cap","index","arrayOf","StarsSummary","React","Component","constructor","props","totalItems","length","handleOnLeft","bind","handleOnRight","scrollTo","page","setState","render","total","skin","context","dark","primary","leftArrowView","circle","left","rightArrowView","right","myStars","myStarsWrapper","allStars","footerSummaryStars","backgroundColor","totalStars","label","stars","iconBubble","iconHeader","navigationLeft","navigationRight","contextTypes","Provider","childContextTypes","string","isRequired"],"sources":["../../../src/template/activity/stars-summary.js"],"sourcesContent":["import React, {useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport {get, getOr, isEmpty, map} from 'lodash/fp';\nimport {\n NovaCompositionNavigationArrowLeft as ArrowLeft,\n NovaCompositionNavigationArrowRight as ArrowRight,\n NovaCompositionCoorpacademyStar as StarIcon\n} from '@coorpacademy/nova-icons';\nimport Provider from '../../atom/provider';\nimport EngineStars from './engine-stars';\nimport style from './stars-summary.css';\n\nconst EngineTab = ({engine, engineIndex, firstItem}) => {\n const {type} = engine;\n const state = engineIndex < firstItem ? 'hidden' : 'active';\n return (\n <li className={style[state]} key={type} data-name={`${type}_total_${state}`}>\n <EngineStars {...engine} className={engineIndex < firstItem ? style.hidden : style.active} />\n </li>\n );\n};\nEngineTab.propTypes = {\n engine: PropTypes.shape(EngineStars.propTypes),\n engineIndex: PropTypes.number,\n firstItem: PropTypes.number\n};\n\nconst EngineTabs = ({engines, firstItem}) => {\n return useMemo(\n () =>\n map.convert({cap: false})(\n (engine, index) => (\n <EngineTab\n engine={engine}\n key={`engineTab_${index}`}\n firstItem={firstItem}\n engineIndex={index}\n />\n ),\n engines\n ),\n [engines, firstItem]\n );\n};\n\nEngineTabs.propTypes = {\n engines: PropTypes.arrayOf(PropTypes.shape(EngineStars.propTypes)),\n firstItem: PropTypes.number\n};\n\nclass StarsSummary extends React.Component {\n static propTypes = {\n total: PropTypes.shape({\n label: PropTypes.string.isRequired,\n stars: PropTypes.number.isRequired\n }).isRequired,\n engines: PropTypes.arrayOf(PropTypes.shape(EngineStars.propTypes))\n };\n\n static contextTypes = {\n skin: Provider.childContextTypes.skin\n };\n\n constructor(props) {\n super(props);\n\n const {engines = []} = props;\n this.state = {\n firstItem: 0,\n totalItems: engines.length\n };\n\n this.handleOnLeft = this.handleOnLeft.bind(this);\n this.handleOnRight = this.handleOnRight.bind(this);\n this.scrollTo = this.scrollTo.bind(this);\n }\n\n handleOnLeft() {\n const {firstItem} = this.state;\n this.scrollTo(firstItem - 1);\n }\n\n handleOnRight() {\n const {firstItem} = this.state;\n this.scrollTo(firstItem + 1);\n }\n\n scrollTo(page) {\n this.setState({\n firstItem: page\n });\n }\n\n render() {\n const {total, engines = []} = this.props;\n const {skin} = this.context;\n const {firstItem, totalItems} = this.state;\n const dark = getOr('#90A4AE', 'common.dark', skin);\n const primary = get('common.primary', skin);\n\n if (isEmpty(engines)) {\n return null;\n }\n const leftArrowView =\n totalItems > 6 && firstItem > 0 ? (\n <div className={style.circle} onClick={this.handleOnLeft} data-name=\"left-arrow\">\n <ArrowLeft color={dark} className={style.left} width={10} height={10} />\n </div>\n ) : null;\n\n const rightArrowView =\n totalItems > 6 && firstItem < totalItems - 6 ? (\n <div className={style.circle} onClick={this.handleOnRight} data-name=\"right-arrow\">\n <ArrowRight color={dark} className={style.right} width={10} height={10} />\n </div>\n ) : null;\n\n return (\n <div data-name=\"myStars\" className={style.myStars}>\n <div data-name=\"myStars-wrapper\" className={style.myStarsWrapper}>\n <ul className={style.allStars} data-name=\"engineList\">\n <EngineTabs engines={engines} firstItem={firstItem} />\n </ul>\n <div\n className={style.footerSummaryStars}\n style={{\n backgroundColor: primary\n }}\n >\n <div className={style.totalStars}>\n <span>{total.label}</span>\n <p data-name=\"star-counter\">{total.stars}</p>\n <div className={style.iconBubble}>\n <StarIcon className={style.iconHeader} color={primary} />\n </div>\n </div>\n <div className={style.navigationLeft}>{leftArrowView}</div>\n <div className={style.navigationRight}>{rightArrowView}</div>\n </div>\n </div>\n </div>\n );\n }\n}\n\nexport default StarsSummary;\n"],"mappings":";;;;;;;;;;;;;AAAA;;AACA;;AAEA;;AAKA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,SAAS,GAAG,CAAC;EAACC,MAAD;EAASC,WAAT;EAAsBC;AAAtB,CAAD,KAAsC;EACtD,MAAM;IAACC;EAAD,IAASH,MAAf;EACA,MAAMI,KAAK,GAAGH,WAAW,GAAGC,SAAd,GAA0B,QAA1B,GAAqC,QAAnD;EACA,oBACE;IAAI,SAAS,EAAEG,qBAAA,CAAMD,KAAN,C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AAuCf,aAAvC,CAbF,eAcE;MAAK,SAAS,EAAElC,qBAAA,CAAMkD;IAAtB,GAAwCb,cAAxC,CAdF,CAJF,CADF,CADF;EAyBD;;AA5FwC;;AAArCtB,Y,CASGoC,Y,GAAe;EACpBrB,IAAI,EAAEsB,iBAAA,CAASC,iBAAT,CAA2BvB;AADb,C;AATlBf,Y,CACGZ,S,2CAAY;EACjB0B,KAAK,EAAEzB,kBAAA,CAAUC,KAAV,CAAgB;IACrBwC,KAAK,EAAEzC,kBAAA,CAAUkD,MAAV,CAAiBC,UADH;IAErBT,KAAK,EAAE1C,kBAAA,CAAUG,MAAV,CAAiBgD;EAFH,CAAhB,EAGJA,UAJc;EAKjB9C,OAAO,EAAEL,kBAAA,CAAUU,OAAV,CAAkBV,kBAAA,CAAUC,KAAV,CAAgBC,oBAAA,CAAYH,SAA5B,CAAlB;AALQ,C;eA8FNY,Y"}
|
|
@@ -12,22 +12,18 @@ declare const AppReview: {
|
|
|
12
12
|
skills: import("prop-types").Requireable<import("prop-types").InferProps<{
|
|
13
13
|
text: import("prop-types").Requireable<string>;
|
|
14
14
|
tooltipText: import("prop-types").Requireable<string>;
|
|
15
|
-
moreDetailsAreaLabel: import("prop-types").Requireable<string>;
|
|
16
15
|
}>>;
|
|
17
16
|
questions: import("prop-types").Requireable<import("prop-types").InferProps<{
|
|
18
17
|
text: import("prop-types").Requireable<string>;
|
|
19
18
|
tooltipText: import("prop-types").Requireable<string>;
|
|
20
|
-
moreDetailsAreaLabel: import("prop-types").Requireable<string>;
|
|
21
19
|
}>>;
|
|
22
20
|
lifes: import("prop-types").Requireable<import("prop-types").InferProps<{
|
|
23
21
|
text: import("prop-types").Requireable<string>;
|
|
24
22
|
tooltipText: import("prop-types").Requireable<string>;
|
|
25
|
-
moreDetailsAreaLabel: import("prop-types").Requireable<string>;
|
|
26
23
|
}>>;
|
|
27
24
|
allright: import("prop-types").Requireable<import("prop-types").InferProps<{
|
|
28
25
|
text: import("prop-types").Requireable<string>;
|
|
29
26
|
tooltipText: import("prop-types").Requireable<string>;
|
|
30
|
-
moreDetailsAreaLabel: import("prop-types").Requireable<string>;
|
|
31
27
|
}>>;
|
|
32
28
|
}>>;
|
|
33
29
|
}>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/template/app-review/index.tsx"],"names":[],"mappings":";AAKA,OAAkB,EAAC,cAAc,EAAC,MAAM,cAAc,CAAC;AAEvD,QAAA,MAAM,SAAS;+CAA4C,cAAc
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/template/app-review/index.tsx"],"names":[],"mappings":";AAKA,OAAkB,EAAC,cAAc,EAAC,MAAM,cAAc,CAAC;AAEvD,QAAA,MAAM,SAAS;+CAA4C,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAWxE,CAAC;AAIF,eAAe,SAAS,CAAC"}
|
|
@@ -20,22 +20,18 @@ declare const propTypes: {
|
|
|
20
20
|
skills: PropTypes.Requireable<PropTypes.InferProps<{
|
|
21
21
|
text: PropTypes.Requireable<string>;
|
|
22
22
|
tooltipText: PropTypes.Requireable<string>;
|
|
23
|
-
moreDetailsAreaLabel: PropTypes.Requireable<string>;
|
|
24
23
|
}>>;
|
|
25
24
|
questions: PropTypes.Requireable<PropTypes.InferProps<{
|
|
26
25
|
text: PropTypes.Requireable<string>;
|
|
27
26
|
tooltipText: PropTypes.Requireable<string>;
|
|
28
|
-
moreDetailsAreaLabel: PropTypes.Requireable<string>;
|
|
29
27
|
}>>;
|
|
30
28
|
lifes: PropTypes.Requireable<PropTypes.InferProps<{
|
|
31
29
|
text: PropTypes.Requireable<string>;
|
|
32
30
|
tooltipText: PropTypes.Requireable<string>;
|
|
33
|
-
moreDetailsAreaLabel: PropTypes.Requireable<string>;
|
|
34
31
|
}>>;
|
|
35
32
|
allright: PropTypes.Requireable<PropTypes.InferProps<{
|
|
36
33
|
text: PropTypes.Requireable<string>;
|
|
37
34
|
tooltipText: PropTypes.Requireable<string>;
|
|
38
|
-
moreDetailsAreaLabel: PropTypes.Requireable<string>;
|
|
39
35
|
}>>;
|
|
40
36
|
}>>;
|
|
41
37
|
}>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prop-types.d.ts","sourceRoot":"","sources":["../../../src/template/app-review/prop-types.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,UAAU,MAAM,cAAc,CAAC;AAGtC,OAAO,EAAC,iBAAiB,EAAC,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAC,iBAAiB,EAAC,MAAM,qBAAqB,CAAC;AAEtD,oBAAY,QAAQ,GAAG,QAAQ,GAAG,YAAY,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAErE,oBAAY,cAAc,GAAG;IAC3B,QAAQ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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKd,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -62,6 +62,8 @@ declare namespace SearchPage {
|
|
|
62
62
|
onSearch: PropTypes.Requireable<(...args: any[]) => any>;
|
|
63
63
|
onToggleFilters: PropTypes.Requireable<(...args: any[]) => any>;
|
|
64
64
|
onToggleSorts: PropTypes.Requireable<(...args: any[]) => any>;
|
|
65
|
+
moreSortAriaLabel: PropTypes.Requireable<string>;
|
|
66
|
+
moreFilterAriaLabel: PropTypes.Requireable<string>;
|
|
65
67
|
}>>;
|
|
66
68
|
const cards: PropTypes.Requireable<PropTypes.InferProps<{
|
|
67
69
|
list: PropTypes.Requireable<(PropTypes.InferProps<any> | null | undefined)[]>;
|
|
@@ -96,6 +98,8 @@ declare namespace SearchPage {
|
|
|
96
98
|
showMoreOnRightAriaLabel: PropTypes.Requireable<string>;
|
|
97
99
|
}>>;
|
|
98
100
|
}>>;
|
|
101
|
+
const moreSortAriaLabel: PropTypes.Requireable<string>;
|
|
102
|
+
const moreFilterAriaLabel: PropTypes.Requireable<string>;
|
|
99
103
|
}
|
|
100
104
|
}
|
|
101
105
|
import PropTypes from "prop-types";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/template/common/search-page/index.js"],"names":[],"mappings":";AAUA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/template/common/search-page/index.js"],"names":[],"mappings":";AAUA,mEAgDC"}
|
|
@@ -34,7 +34,9 @@ const SearchPage = (props, context) => {
|
|
|
34
34
|
cards,
|
|
35
35
|
noresultsfound,
|
|
36
36
|
clearFilters,
|
|
37
|
-
recommendations
|
|
37
|
+
recommendations,
|
|
38
|
+
moreSortAriaLabel,
|
|
39
|
+
moreFilterAriaLabel
|
|
38
40
|
} = props;
|
|
39
41
|
const {
|
|
40
42
|
skin
|
|
@@ -53,7 +55,10 @@ const SearchPage = (props, context) => {
|
|
|
53
55
|
},
|
|
54
56
|
type: "link"
|
|
55
57
|
}))), recommendationsView) : /*#__PURE__*/_react.default.createElement(_cardsGrid.default, cards);
|
|
56
|
-
return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_filters.default,
|
|
58
|
+
return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_filters.default, _extends({}, searchFilters, {
|
|
59
|
+
moreSortAriaLabel: moreSortAriaLabel,
|
|
60
|
+
moreFilterAriaLabel: moreFilterAriaLabel
|
|
61
|
+
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
57
62
|
"data-name": "searchResult",
|
|
58
63
|
className: _style.default.cardsWrapper
|
|
59
64
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -70,7 +75,9 @@ SearchPage.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
70
75
|
searchFilters: _propTypes.default.shape(_filters.default.propTypes),
|
|
71
76
|
cards: _propTypes.default.shape(_cardsGrid.default.propTypes),
|
|
72
77
|
clearFilters: _propTypes.default.shape(_button.default.propTypes),
|
|
73
|
-
recommendations: _propTypes.default.shape(_cardsList.default.propTypes)
|
|
78
|
+
recommendations: _propTypes.default.shape(_cardsList.default.propTypes),
|
|
79
|
+
moreSortAriaLabel: _propTypes.default.string,
|
|
80
|
+
moreFilterAriaLabel: _propTypes.default.string
|
|
74
81
|
} : {};
|
|
75
82
|
var _default = SearchPage;
|
|
76
83
|
exports.default = _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["SearchPage","props","context","title","searchFilters","cards","noresultsfound","clearFilters","recommendations","skin","defaultColor","recommendationsView","cardsView","list","style","noresults","noresultstxt","clear","background","cardsWrapper","contextTypes","Provider","childContextTypes","propTypes","PropTypes","string","shape","Filters","CardsGrid","Button","CardsList"],"sources":["../../../../src/template/common/search-page/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {getOr, isEmpty} from 'lodash/fp';\nimport Provider from '../../../atom/provider';\nimport Button from '../../../atom/button';\nimport Filters from '../../../molecule/filters';\nimport CardsGrid from '../../../organism/cards-grid';\nimport CardsList from '../../../molecule/dashboard/cards-list';\nimport style from './style.css';\n\nconst SearchPage = (props, context) => {\n const {title
|
|
1
|
+
{"version":3,"file":"index.js","names":["SearchPage","props","context","title","searchFilters","cards","noresultsfound","clearFilters","recommendations","moreSortAriaLabel","moreFilterAriaLabel","skin","defaultColor","recommendationsView","cardsView","list","style","noresults","noresultstxt","clear","background","cardsWrapper","contextTypes","Provider","childContextTypes","propTypes","PropTypes","string","shape","Filters","CardsGrid","Button","CardsList"],"sources":["../../../../src/template/common/search-page/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {getOr, isEmpty} from 'lodash/fp';\nimport Provider from '../../../atom/provider';\nimport Button from '../../../atom/button';\nimport Filters from '../../../molecule/filters';\nimport CardsGrid from '../../../organism/cards-grid';\nimport CardsList from '../../../molecule/dashboard/cards-list';\nimport style from './style.css';\n\nconst SearchPage = (props, context) => {\n const {\n title,\n searchFilters,\n cards,\n noresultsfound,\n clearFilters,\n recommendations,\n moreSortAriaLabel,\n moreFilterAriaLabel\n } = props;\n\n const {skin} = context;\n const defaultColor = getOr('#00B0FF', 'common.primary', skin);\n\n const recommendationsView = isEmpty(recommendations) ? null : <CardsList {...recommendations} />;\n\n const cardsView = isEmpty(cards.list) ? (\n <div>\n <div className={style.noresults}>\n <div className={style.noresultstxt}>{noresultsfound}</div>\n <Button\n {...clearFilters}\n data-name=\"searchPageClear\"\n className={style.clear}\n style={{background: defaultColor}}\n type=\"link\"\n />\n </div>\n {recommendationsView}\n </div>\n ) : (\n <CardsGrid {...cards} />\n );\n\n return (\n <div>\n <Filters\n {...searchFilters}\n moreSortAriaLabel={moreSortAriaLabel}\n moreFilterAriaLabel={moreFilterAriaLabel}\n />\n <div data-name=\"searchResult\" className={style.cardsWrapper}>\n <div className={style.title}>{title}</div>\n {cardsView}\n </div>\n </div>\n );\n};\n\nSearchPage.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nSearchPage.propTypes = {\n noresultsfound: PropTypes.string,\n title: PropTypes.string,\n searchFilters: PropTypes.shape(Filters.propTypes),\n cards: PropTypes.shape(CardsGrid.propTypes),\n clearFilters: PropTypes.shape(Button.propTypes),\n recommendations: PropTypes.shape(CardsList.propTypes),\n moreSortAriaLabel: PropTypes.string,\n moreFilterAriaLabel: PropTypes.string\n};\n\nexport default SearchPage;\n"],"mappings":";;;;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;AAEA,MAAMA,UAAU,GAAG,CAACC,KAAD,EAAQC,OAAR,KAAoB;EACrC,MAAM;IACJC,KADI;IAEJC,aAFI;IAGJC,KAHI;IAIJC,cAJI;IAKJC,YALI;IAMJC,eANI;IAOJC,iBAPI;IAQJC;EARI,IASFT,KATJ;EAWA,MAAM;IAACU;EAAD,IAAST,OAAf;EACA,MAAMU,YAAY,GAAG,qBAAM,SAAN,EAAiB,gBAAjB,EAAmCD,IAAnC,CAArB;EAEA,MAAME,mBAAmB,GAAG,uBAAQL,eAAR,IAA2B,IAA3B,gBAAkC,6BAAC,kBAAD,EAAeA,eAAf,CAA9D;EAEA,MAAMM,SAAS,GAAG,uBAAQT,KAAK,CAACU,IAAd,iBA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BAAA,CAAUC;AARV,CAAvB;eAWe3B,U"}
|
|
@@ -11,22 +11,18 @@ declare namespace ReviewDashboardSkills {
|
|
|
11
11
|
skills: PropTypes.Requireable<PropTypes.InferProps<{
|
|
12
12
|
text: PropTypes.Requireable<string>;
|
|
13
13
|
tooltipText: PropTypes.Requireable<string>;
|
|
14
|
-
moreDetailsAreaLabel: PropTypes.Requireable<string>;
|
|
15
14
|
}>>;
|
|
16
15
|
questions: PropTypes.Requireable<PropTypes.InferProps<{
|
|
17
16
|
text: PropTypes.Requireable<string>;
|
|
18
17
|
tooltipText: PropTypes.Requireable<string>;
|
|
19
|
-
moreDetailsAreaLabel: PropTypes.Requireable<string>;
|
|
20
18
|
}>>;
|
|
21
19
|
lifes: PropTypes.Requireable<PropTypes.InferProps<{
|
|
22
20
|
text: PropTypes.Requireable<string>;
|
|
23
21
|
tooltipText: PropTypes.Requireable<string>;
|
|
24
|
-
moreDetailsAreaLabel: PropTypes.Requireable<string>;
|
|
25
22
|
}>>;
|
|
26
23
|
allright: PropTypes.Requireable<PropTypes.InferProps<{
|
|
27
24
|
text: PropTypes.Requireable<string>;
|
|
28
25
|
tooltipText: PropTypes.Requireable<string>;
|
|
29
|
-
moreDetailsAreaLabel: PropTypes.Requireable<string>;
|
|
30
26
|
}>>;
|
|
31
27
|
}>>;
|
|
32
28
|
}>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"ignore_dirs":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coorpacademy/components",
|
|
3
|
-
"version": "11.2.7
|
|
3
|
+
"version": "11.2.7",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -159,5 +159,5 @@
|
|
|
159
159
|
"last 2 versions",
|
|
160
160
|
"IE 11"
|
|
161
161
|
],
|
|
162
|
-
"gitHead": "
|
|
162
|
+
"gitHead": "59ef4c9b320af26fd9f25764770e75c927d43d2e"
|
|
163
163
|
}
|