@coorpacademy/player-web 3.19.25-alpha.13 → 3.19.25-alpha.16
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/map-state-to-props/error-popin.js +3 -1
- package/es/map-state-to-props/error-popin.js.map +1 -1
- package/es/map-state-to-props/test/popin-error.js +35 -1
- package/es/map-state-to-props/test/popin-error.js.map +1 -1
- package/lib/map-state-to-props/error-popin.js +2 -1
- package/lib/map-state-to-props/error-popin.js.map +1 -1
- package/lib/map-state-to-props/test/popin-error.js +35 -1
- package/lib/map-state-to-props/test/popin-error.js.map +1 -1
- package/package.json +4 -4
|
@@ -9,7 +9,9 @@ const mapStateToErrorPopinProps = ({
|
|
|
9
9
|
return state => {
|
|
10
10
|
const isFailure = _pipe(_get('data'), _values, _some('isFailure'))(state);
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
const isContentFailure = _pipe(_get('data.contents'), _values, _some('isFailure'))(state);
|
|
13
|
+
|
|
14
|
+
if (isFailure || isContentFailure) return {
|
|
13
15
|
content: 'An unexpected error has occurred',
|
|
14
16
|
icon: 'AlertDiamond',
|
|
15
17
|
mode: 'alert',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/map-state-to-props/error-popin.js"],"names":["mapStateToErrorPopinProps","dispatch","state","isFailure","content","icon","mode","descriptionText","firstButton","largeButton","label","type","handleOnclick","window","location","reload"],"mappings":";;;;;AAEA,MAAMA,yBAAyB,GAAG,CAAC;AAACC,EAAAA;AAAD,CAAD,KAAgB;AAChD,SAAOC,KAAK,IAAI;AACd,UAAMC,SAAS,GAAG,MAAK,KAAI,MAAJ,CAAL,WAA0B,MAAK,WAAL,CAA1B,EAA6CD,KAA7C,CAAlB;;AACA,QAAIC,
|
|
1
|
+
{"version":3,"sources":["../../src/map-state-to-props/error-popin.js"],"names":["mapStateToErrorPopinProps","dispatch","state","isFailure","isContentFailure","content","icon","mode","descriptionText","firstButton","largeButton","label","type","handleOnclick","window","location","reload"],"mappings":";;;;;AAEA,MAAMA,yBAAyB,GAAG,CAAC;AAACC,EAAAA;AAAD,CAAD,KAAgB;AAChD,SAAOC,KAAK,IAAI;AACd,UAAMC,SAAS,GAAG,MAAK,KAAI,MAAJ,CAAL,WAA0B,MAAK,WAAL,CAA1B,EAA6CD,KAA7C,CAAlB;;AACA,UAAME,gBAAgB,GAAG,MAAK,KAAI,eAAJ,CAAL,WAAmC,MAAK,WAAL,CAAnC,EAAsDF,KAAtD,CAAzB;;AACA,QAAIC,SAAS,IAAIC,gBAAjB,EACE,OAAO;AACLC,MAAAA,OAAO,EAAE,kCADJ;AAELC,MAAAA,IAAI,EAAE,cAFD;AAGLC,MAAAA,IAAI,EAAE,OAHD;AAILC,MAAAA,eAAe,EAAE,sCAJZ;AAKLC,MAAAA,WAAW,EAAE;AACXC,QAAAA,WAAW,EAAE,IADF;AAEXC,QAAAA,KAAK,EAAE,QAFI;AAGXC,QAAAA,IAAI,EAAE,SAHK;AAIX,sBAAc,QAJH;AAKXC,QAAAA,aAAa,EAAE,MAAMC,MAAM,CAACC,QAAP,CAAgBC,MAAhB;AALV;AALR,KAAP;AAaF;AACD,GAlBD;AAmBD,CApBD;;AAsBA,eAAehB,yBAAf","sourcesContent":["import {some, get, pipe, values} from 'lodash/fp';\n\nconst mapStateToErrorPopinProps = ({dispatch}) => {\n return state => {\n const isFailure = pipe(get('data'), values, some('isFailure'))(state);\n const isContentFailure = pipe(get('data.contents'), values, some('isFailure'))(state);\n if (isFailure || isContentFailure)\n return {\n content: 'An unexpected error has occurred',\n icon: 'AlertDiamond',\n mode: 'alert',\n descriptionText: 'Please reload the page and try again',\n firstButton: {\n largeButton: true,\n label: 'Reload',\n type: 'primary',\n 'aria-label': 'Reload',\n handleOnclick: () => window.location.reload()\n }\n };\n return;\n };\n};\n\nexport default mapStateToErrorPopinProps;\n"],"file":"error-popin.js"}
|
|
@@ -2,7 +2,7 @@ import _omit from "lodash/fp/omit";
|
|
|
2
2
|
import _identity from "lodash/fp/identity";
|
|
3
3
|
import test from 'ava';
|
|
4
4
|
import mapStateToErrorPopinProps from '../error-popin';
|
|
5
|
-
test('should retourn error popin props
|
|
5
|
+
test('should retourn error popin props if any call fails', t => {
|
|
6
6
|
t.plan(2);
|
|
7
7
|
global.window = {
|
|
8
8
|
location: {
|
|
@@ -34,6 +34,40 @@ test('should retourn error popin props is isFailure', t => {
|
|
|
34
34
|
});
|
|
35
35
|
props.firstButton.handleOnclick();
|
|
36
36
|
});
|
|
37
|
+
test('should retourn error popin props if content calls fail', t => {
|
|
38
|
+
t.plan(2);
|
|
39
|
+
global.window = {
|
|
40
|
+
location: {
|
|
41
|
+
reload: () => {
|
|
42
|
+
t.pass();
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
const props = mapStateToErrorPopinProps({
|
|
47
|
+
dispatch: _identity
|
|
48
|
+
})({
|
|
49
|
+
data: {
|
|
50
|
+
contents: {
|
|
51
|
+
level: {
|
|
52
|
+
isFailure: true
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
t.deepEqual(_omit('firstButton.handleOnclick', props), {
|
|
58
|
+
content: 'An unexpected error has occurred',
|
|
59
|
+
icon: 'AlertDiamond',
|
|
60
|
+
mode: 'alert',
|
|
61
|
+
descriptionText: 'Please reload the page and try again',
|
|
62
|
+
firstButton: {
|
|
63
|
+
largeButton: true,
|
|
64
|
+
label: 'Reload',
|
|
65
|
+
type: 'primary',
|
|
66
|
+
'aria-label': 'Reload'
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
props.firstButton.handleOnclick();
|
|
70
|
+
});
|
|
37
71
|
test('should not retourn error popin props', t => {
|
|
38
72
|
const props = mapStateToErrorPopinProps({
|
|
39
73
|
dispatch: _identity
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/map-state-to-props/test/popin-error.js"],"names":["test","mapStateToErrorPopinProps","t","plan","global","window","location","reload","pass","props","dispatch","data","progressions","isFailure","deepEqual","content","icon","mode","descriptionText","firstButton","largeButton","label","type","handleOnclick","is","undefined"],"mappings":";;AAAA,OAAOA,IAAP,MAAiB,KAAjB;AAIA,OAAOC,yBAAP,MAAsC,gBAAtC;AAEAD,IAAI,CAAC
|
|
1
|
+
{"version":3,"sources":["../../../src/map-state-to-props/test/popin-error.js"],"names":["test","mapStateToErrorPopinProps","t","plan","global","window","location","reload","pass","props","dispatch","data","progressions","isFailure","deepEqual","content","icon","mode","descriptionText","firstButton","largeButton","label","type","handleOnclick","contents","level","is","undefined"],"mappings":";;AAAA,OAAOA,IAAP,MAAiB,KAAjB;AAIA,OAAOC,yBAAP,MAAsC,gBAAtC;AAEAD,IAAI,CAAC,oDAAD,EAAuDE,CAAC,IAAI;AAC9DA,EAAAA,CAAC,CAACC,IAAF,CAAO,CAAP;AACAC,EAAAA,MAAM,CAACC,MAAP,GAAgB;AACdC,IAAAA,QAAQ,EAAE;AACRC,MAAAA,MAAM,EAAE,MAAM;AACZL,QAAAA,CAAC,CAACM,IAAF;AACD;AAHO;AADI,GAAhB;AAOA,QAAMC,KAAK,GAAGR,yBAAyB,CAAC;AAACS,IAAAA,QAAQ;AAAT,GAAD,CAAzB,CAAgD;AAC5DC,IAAAA,IAAI,EAAE;AACJC,MAAAA,YAAY,EAAE;AACZC,QAAAA,SAAS,EAAE;AADC;AADV;AADsD,GAAhD,CAAd;AAQAX,EAAAA,CAAC,CAACY,SAAF,CAAY,MAAK,2BAAL,EAAkCL,KAAlC,CAAZ,EAAsD;AACpDM,IAAAA,OAAO,EAAE,kCAD2C;AAEpDC,IAAAA,IAAI,EAAE,cAF8C;AAGpDC,IAAAA,IAAI,EAAE,OAH8C;AAIpDC,IAAAA,eAAe,EAAE,sCAJmC;AAKpDC,IAAAA,WAAW,EAAE;AACXC,MAAAA,WAAW,EAAE,IADF;AAEXC,MAAAA,KAAK,EAAE,QAFI;AAGXC,MAAAA,I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L,EAAYkB,SAAZ;AACD,CAJG,CAAJ","sourcesContent":["import test from 'ava';\n\nimport {identity, omit} from 'lodash/fp';\n\nimport mapStateToErrorPopinProps from '../error-popin';\n\ntest('should retourn error popin props if any call fails', t => {\n t.plan(2);\n global.window = {\n location: {\n reload: () => {\n t.pass();\n }\n }\n };\n const props = mapStateToErrorPopinProps({dispatch: identity})({\n data: {\n progressions: {\n isFailure: true\n }\n }\n });\n\n t.deepEqual(omit('firstButton.handleOnclick', props), {\n content: 'An unexpected error has occurred',\n icon: 'AlertDiamond',\n mode: 'alert',\n descriptionText: 'Please reload the page and try again',\n firstButton: {\n largeButton: true,\n label: 'Reload',\n type: 'primary',\n 'aria-label': 'Reload'\n }\n });\n props.firstButton.handleOnclick();\n});\n\ntest('should retourn error popin props if content calls fail', t => {\n t.plan(2);\n global.window = {\n location: {\n reload: () => {\n t.pass();\n }\n }\n };\n const props = mapStateToErrorPopinProps({dispatch: identity})({\n data: {\n contents: {\n level: { isFailure: true}\n }\n }\n });\n\n t.deepEqual(omit('firstButton.handleOnclick', props), {\n content: 'An unexpected error has occurred',\n icon: 'AlertDiamond',\n mode: 'alert',\n descriptionText: 'Please reload the page and try again',\n firstButton: {\n largeButton: true,\n label: 'Reload',\n type: 'primary',\n 'aria-label': 'Reload'\n }\n });\n props.firstButton.handleOnclick();\n});\n\n\ntest('should not retourn error popin props', t => {\n const props = mapStateToErrorPopinProps({dispatch: identity})({});\n\n t.is(props, undefined);\n});\n"],"file":"popin-error.js"}
|
|
@@ -18,7 +18,8 @@ const mapStateToErrorPopinProps = ({
|
|
|
18
18
|
}) => {
|
|
19
19
|
return state => {
|
|
20
20
|
const isFailure = (0, _pipe2.default)((0, _get2.default)('data'), _values2.default, (0, _some2.default)('isFailure'))(state);
|
|
21
|
-
|
|
21
|
+
const isContentFailure = (0, _pipe2.default)((0, _get2.default)('data.contents'), _values2.default, (0, _some2.default)('isFailure'))(state);
|
|
22
|
+
if (isFailure || isContentFailure) return {
|
|
22
23
|
content: 'An unexpected error has occurred',
|
|
23
24
|
icon: 'AlertDiamond',
|
|
24
25
|
mode: 'alert',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/map-state-to-props/error-popin.js"],"names":["mapStateToErrorPopinProps","dispatch","state","isFailure","content","icon","mode","descriptionText","firstButton","largeButton","label","type","handleOnclick","window","location","reload"],"mappings":";;;;;;;;;;;;;;;AAEA,MAAMA,yBAAyB,GAAG,CAAC;AAACC,EAAAA;AAAD,CAAD,KAAgB;AAChD,SAAOC,KAAK,IAAI;AACd,UAAMC,SAAS,GAAG,oBAAK,mBAAI,MAAJ,CAAL,oBAA0B,oBAAK,WAAL,CAA1B,EAA6CD,KAA7C,CAAlB;AACA,QAAIC,
|
|
1
|
+
{"version":3,"sources":["../../src/map-state-to-props/error-popin.js"],"names":["mapStateToErrorPopinProps","dispatch","state","isFailure","isContentFailure","content","icon","mode","descriptionText","firstButton","largeButton","label","type","handleOnclick","window","location","reload"],"mappings":";;;;;;;;;;;;;;;AAEA,MAAMA,yBAAyB,GAAG,CAAC;AAACC,EAAAA;AAAD,CAAD,KAAgB;AAChD,SAAOC,KAAK,IAAI;AACd,UAAMC,SAAS,GAAG,oBAAK,mBAAI,MAAJ,CAAL,oBAA0B,oBAAK,WAAL,CAA1B,EAA6CD,KAA7C,CAAlB;AACA,UAAME,gBAAgB,GAAG,oBAAK,mBAAI,eAAJ,CAAL,oBAAmC,oBAAK,WAAL,CAAnC,EAAsDF,KAAtD,CAAzB;AACA,QAAIC,SAAS,IAAIC,gBAAjB,EACE,OAAO;AACLC,MAAAA,OAAO,EAAE,kCADJ;AAELC,MAAAA,IAAI,EAAE,cAFD;AAGLC,MAAAA,IAAI,EAAE,OAHD;AAILC,MAAAA,eAAe,EAAE,sCAJZ;AAKLC,MAAAA,WAAW,EAAE;AACXC,QAAAA,WAAW,EAAE,IADF;AAEXC,QAAAA,KAAK,EAAE,QAFI;AAGXC,QAAAA,IAAI,EAAE,SAHK;AAIX,sBAAc,QAJH;AAKXC,QAAAA,aAAa,EAAE,MAAMC,MAAM,CAACC,QAAP,CAAgBC,MAAhB;AALV;AALR,KAAP;AAaF;AACD,GAlBD;AAmBD,CApBD;;eAsBehB,yB","sourcesContent":["import {some, get, pipe, values} from 'lodash/fp';\n\nconst mapStateToErrorPopinProps = ({dispatch}) => {\n return state => {\n const isFailure = pipe(get('data'), values, some('isFailure'))(state);\n const isContentFailure = pipe(get('data.contents'), values, some('isFailure'))(state);\n if (isFailure || isContentFailure)\n return {\n content: 'An unexpected error has occurred',\n icon: 'AlertDiamond',\n mode: 'alert',\n descriptionText: 'Please reload the page and try again',\n firstButton: {\n largeButton: true,\n label: 'Reload',\n type: 'primary',\n 'aria-label': 'Reload',\n handleOnclick: () => window.location.reload()\n }\n };\n return;\n };\n};\n\nexport default mapStateToErrorPopinProps;\n"],"file":"error-popin.js"}
|
|
@@ -10,7 +10,7 @@ var _errorPopin = _interopRequireDefault(require("../error-popin"));
|
|
|
10
10
|
|
|
11
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
12
|
|
|
13
|
-
(0, _ava.default)('should retourn error popin props
|
|
13
|
+
(0, _ava.default)('should retourn error popin props if any call fails', t => {
|
|
14
14
|
t.plan(2);
|
|
15
15
|
global.window = {
|
|
16
16
|
location: {
|
|
@@ -42,6 +42,40 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
42
42
|
});
|
|
43
43
|
props.firstButton.handleOnclick();
|
|
44
44
|
});
|
|
45
|
+
(0, _ava.default)('should retourn error popin props if content calls fail', t => {
|
|
46
|
+
t.plan(2);
|
|
47
|
+
global.window = {
|
|
48
|
+
location: {
|
|
49
|
+
reload: () => {
|
|
50
|
+
t.pass();
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
const props = (0, _errorPopin.default)({
|
|
55
|
+
dispatch: _identity2.default
|
|
56
|
+
})({
|
|
57
|
+
data: {
|
|
58
|
+
contents: {
|
|
59
|
+
level: {
|
|
60
|
+
isFailure: true
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
t.deepEqual((0, _omit2.default)('firstButton.handleOnclick', props), {
|
|
66
|
+
content: 'An unexpected error has occurred',
|
|
67
|
+
icon: 'AlertDiamond',
|
|
68
|
+
mode: 'alert',
|
|
69
|
+
descriptionText: 'Please reload the page and try again',
|
|
70
|
+
firstButton: {
|
|
71
|
+
largeButton: true,
|
|
72
|
+
label: 'Reload',
|
|
73
|
+
type: 'primary',
|
|
74
|
+
'aria-label': 'Reload'
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
props.firstButton.handleOnclick();
|
|
78
|
+
});
|
|
45
79
|
(0, _ava.default)('should not retourn error popin props', t => {
|
|
46
80
|
const props = (0, _errorPopin.default)({
|
|
47
81
|
dispatch: _identity2.default
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/map-state-to-props/test/popin-error.js"],"names":["t","plan","global","window","location","reload","pass","props","dispatch","data","progressions","isFailure","deepEqual","content","icon","mode","descriptionText","firstButton","largeButton","label","type","handleOnclick","is","undefined"],"mappings":";;;;;;AAAA;;AAIA;;;;AAEA,kBAAK
|
|
1
|
+
{"version":3,"sources":["../../../src/map-state-to-props/test/popin-error.js"],"names":["t","plan","global","window","location","reload","pass","props","dispatch","data","progressions","isFailure","deepEqual","content","icon","mode","descriptionText","firstButton","largeButton","label","type","handleOnclick","contents","level","is","undefined"],"mappings":";;;;;;AAAA;;AAIA;;;;AAEA,kBAAK,oDAAL,EAA2DA,CAAC,IAAI;AAC9DA,EAAAA,CAAC,CAACC,IAAF,CAAO,CAAP;AACAC,EAAAA,MAAM,CAACC,MAAP,GAAgB;AACdC,IAAAA,QAAQ,EAAE;AACRC,MAAAA,MAAM,EAAE,MAAM;AACZL,QAAAA,CAAC,CAACM,IAAF;AACD;AAHO;AADI,GAAhB;A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DC,IAAAA,IAAI,EAAE,OAH8C;AAIpDC,IAAAA,eAAe,EAAE,sCAJmC;AAKpDC,IAAAA,WAAW,EAAE;AACXC,MAAAA,WAAW,EAAE,IADF;AAEXC,MAAAA,KAAK,EAAE,QAFI;AAGXC,MAAAA,IAAI,EAAE,SAHK;AAIX,oBAAc;AAJH;AALuC,GAAtD;AAYAb,EAAAA,KAAK,CAACU,WAAN,CAAkBI,aAAlB;AACD,CA9BD;AAiCA,kBAAK,sCAAL,EAA6CrB,CAAC,IAAI;AAChD,QAAMO,KAAK,GAAG,yBAA0B;AAACC,IAAAA,QAAQ;AAAT,GAA1B,EAAgD,EAAhD,CAAd;AAEAR,EAAAA,CAAC,CAACwB,EAAF,CAAKjB,KAAL,EAAYkB,SAAZ;AACD,CAJD","sourcesContent":["import test from 'ava';\n\nimport {identity, omit} from 'lodash/fp';\n\nimport mapStateToErrorPopinProps from '../error-popin';\n\ntest('should retourn error popin props if any call fails', t => {\n t.plan(2);\n global.window = {\n location: {\n reload: () => {\n t.pass();\n }\n }\n };\n const props = mapStateToErrorPopinProps({dispatch: identity})({\n data: {\n progressions: {\n isFailure: true\n }\n }\n });\n\n t.deepEqual(omit('firstButton.handleOnclick', props), {\n content: 'An unexpected error has occurred',\n icon: 'AlertDiamond',\n mode: 'alert',\n descriptionText: 'Please reload the page and try again',\n firstButton: {\n largeButton: true,\n label: 'Reload',\n type: 'primary',\n 'aria-label': 'Reload'\n }\n });\n props.firstButton.handleOnclick();\n});\n\ntest('should retourn error popin props if content calls fail', t => {\n t.plan(2);\n global.window = {\n location: {\n reload: () => {\n t.pass();\n }\n }\n };\n const props = mapStateToErrorPopinProps({dispatch: identity})({\n data: {\n contents: {\n level: { isFailure: true}\n }\n }\n });\n\n t.deepEqual(omit('firstButton.handleOnclick', props), {\n content: 'An unexpected error has occurred',\n icon: 'AlertDiamond',\n mode: 'alert',\n descriptionText: 'Please reload the page and try again',\n firstButton: {\n largeButton: true,\n label: 'Reload',\n type: 'primary',\n 'aria-label': 'Reload'\n }\n });\n props.firstButton.handleOnclick();\n});\n\n\ntest('should not retourn error popin props', t => {\n const props = mapStateToErrorPopinProps({dispatch: identity})({});\n\n t.is(props, undefined);\n});\n"],"file":"popin-error.js"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coorpacademy/player-web",
|
|
3
|
-
"version": "3.19.25-alpha.
|
|
3
|
+
"version": "3.19.25-alpha.16+979312a0a",
|
|
4
4
|
"description": "CoorpAcademy web slide-player",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -60,14 +60,14 @@
|
|
|
60
60
|
"react-dom": "^17.0.2"
|
|
61
61
|
},
|
|
62
62
|
"dependencies": {
|
|
63
|
-
"@coorpacademy/components": "10.22.
|
|
63
|
+
"@coorpacademy/components": "10.22.25-alpha.16+979312a0a",
|
|
64
64
|
"@coorpacademy/player-services": "5.2.16",
|
|
65
|
-
"@coorpacademy/player-store": "4.2.19-alpha.
|
|
65
|
+
"@coorpacademy/player-store": "4.2.19-alpha.135+979312a0a",
|
|
66
66
|
"@coorpacademy/progression-engine": "11.4.1",
|
|
67
67
|
"@coorpacademy/redux-task": "1.1.5",
|
|
68
68
|
"@coorpacademy/translate": "6.1.5",
|
|
69
69
|
"@coorpacademy/webpack-config": "10.0.4",
|
|
70
70
|
"lodash": "^4.17.21"
|
|
71
71
|
},
|
|
72
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "979312a0adf811d29dd0f18ceef61194e2b2c69d"
|
|
73
73
|
}
|