@gamelearn/arcade-components 2.5.11-hotfix-branched → 2.5.11
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/README.md +107 -107
- package/dist/components/auto-evaluation-component/components/AutoEvaluation.js +14 -25
- package/dist/components/cartel-component/components/CartelComponent.js +1 -1
- package/dist/components/comic-component/components/ComicComponent.js +1 -1
- package/dist/components/conversational-pro-component/components/ConversationalProComponent.js +1 -1
- package/dist/components/dialog-component/components/DialogComponent.js +2 -3
- package/dist/components/image-component/components/ImageComponent.js +1 -1
- package/dist/components/inventory-item/components/InventoryItem.js +7 -9
- package/dist/components/media-visor/components/MediaVisor.js +1 -1
- package/dist/components/notice-component/components/NoticeComponent.js +1 -1
- package/dist/components/pattern-component/components/PatternComponent.js +1 -1
- package/dist/components/pdf-component/components/PdfComponent.js +1 -1
- package/dist/components/survey-component/components/SurveyComponent.js +17 -21
- package/dist/components/video-visor/components/VideoControllers/SkipButton.js +1 -1
- package/dist/components/video-visor/components/VideoVisor.js +1 -1
- package/package.json +114 -114
package/README.md
CHANGED
|
@@ -1,107 +1,107 @@
|
|
|
1
|
-
# Arcade Components
|
|
2
|
-
> librería de componentes para Arcade (aka engine 2.0)
|
|
3
|
-
|
|
4
|
-
[](https://www.npmjs.com/package/arcade-components) [](https://standardjs.com)
|
|
5
|
-
|
|
6
|
-
## Install
|
|
7
|
-
|
|
8
|
-
```bash
|
|
9
|
-
yarn add @gamelearn/arcade-components
|
|
10
|
-
```
|
|
11
|
-
|
|
12
|
-
## Usage
|
|
13
|
-
##
|
|
14
|
-
|
|
15
|
-
```jsx
|
|
16
|
-
import React, { Component } from 'react';
|
|
17
|
-
|
|
18
|
-
import { Button } from 'arcade-components';
|
|
19
|
-
|
|
20
|
-
export default class App extends Component {
|
|
21
|
-
render() {
|
|
22
|
-
return (
|
|
23
|
-
<div>
|
|
24
|
-
<Button>Enjoy</Button>
|
|
25
|
-
</div>
|
|
26
|
-
);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
## Generar version hotfix para arcade/master-stg
|
|
33
|
-
|
|
34
|
-
Para generar una version hotfix nos vamos al commit que desplego la version que utiliza actualmente arcade/master-stg y creamos una rama sobre ella.
|
|
35
|
-
|
|
36
|
-
Generamos los cambios o hacemos cherrypick de ellos si ya estan creados y una vez terminemos con los cambios tendremos que cambiar la version del package.json a una tal que asi :
|
|
37
|
-
|
|
38
|
-
`"version": "1.3.5-fix-1",`
|
|
39
|
-
|
|
40
|
-
Habiendo cambiado ya la version para publicarla ejecutamos:
|
|
41
|
-
* `npm run publish-hotfix`
|
|
42
|
-
|
|
43
|
-
Una vez publicada en npm ir a la versión master de arcade y sustituir la versión de arcade-components.
|
|
44
|
-
|
|
45
|
-
## Available Scripts
|
|
46
|
-
|
|
47
|
-
Para ver Storybook en local
|
|
48
|
-
|
|
49
|
-
### `yarn start`
|
|
50
|
-
|
|
51
|
-
Para compilar la librería a dist
|
|
52
|
-
|
|
53
|
-
### `yarn compile`
|
|
54
|
-
|
|
55
|
-
Para dejar a babel observando cambios y ejecuntando auto-compilación puedes pasarle --watch
|
|
56
|
-
|
|
57
|
-
`yarn compile --watch`
|
|
58
|
-
|
|
59
|
-
### `yarn generate <componentName>`
|
|
60
|
-
|
|
61
|
-
Para añadir un componente nuevo se recomienda usar el generador automático que hara el scaffolding básico de dicho componente, coge el nombre como primer parámetro y si lo llamas sin parámetro te lo preguntará por el prompt.
|
|
62
|
-
|
|
63
|
-
`yarn generate`
|
|
64
|
-
|
|
65
|
-
## How to link arcade-components in other repos (WIP)
|
|
66
|
-
|
|
67
|
-
Para trabajar con arcade-components en local si necesidad de subir a git ni a npm no podemos trabajar con `yarn link` ya que da un error con los hooks de react.
|
|
68
|
-
|
|
69
|
-
Cómo solución alternativa podemos instalar `yalc` que permite publicar el paquete en local e importarlo desde `arcade`.
|
|
70
|
-
|
|
71
|
-
```bash
|
|
72
|
-
yarn global add yalc
|
|
73
|
-
```
|
|
74
|
-
Si teneis problemas instalándolo en global :
|
|
75
|
-
yarn global add yalc --prefix /usr/local
|
|
76
|
-
|
|
77
|
-
Para generar el paquete en el store local:
|
|
78
|
-
|
|
79
|
-
```bash
|
|
80
|
-
yarn
|
|
81
|
-
yarn compile
|
|
82
|
-
yalc publish o yarn yalc publish
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
Si queremos escuchar los cambios y que se vayan publicando en el store de yalc se puede hacer directamente con:
|
|
86
|
-
|
|
87
|
-
```bash
|
|
88
|
-
yarn watch
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
Después, en el repositorio de `arcade` tendremos que linkar el paquete generado de la siguiente forma:
|
|
92
|
-
|
|
93
|
-
```bash
|
|
94
|
-
yalc link @gamelearn/arcade-components
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
Y voilá, ya podremos trabajar con arcade y arcade-components en local sin publicar nada.
|
|
98
|
-
|
|
99
|
-
Una vez terminemos de trabajar con el paquete linkado en `arcade`, no nos olvidemos de borrar el link:
|
|
100
|
-
|
|
101
|
-
```bash
|
|
102
|
-
yalc remove --all
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
## License
|
|
106
|
-
|
|
107
|
-
UNLICENSED © [gamelearn](https://github.com/gamelearn)
|
|
1
|
+
# Arcade Components
|
|
2
|
+
> librería de componentes para Arcade (aka engine 2.0)
|
|
3
|
+
|
|
4
|
+
[](https://www.npmjs.com/package/arcade-components) [](https://standardjs.com)
|
|
5
|
+
|
|
6
|
+
## Install
|
|
7
|
+
|
|
8
|
+
```bash
|
|
9
|
+
yarn add @gamelearn/arcade-components
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Usage
|
|
13
|
+
##
|
|
14
|
+
|
|
15
|
+
```jsx
|
|
16
|
+
import React, { Component } from 'react';
|
|
17
|
+
|
|
18
|
+
import { Button } from 'arcade-components';
|
|
19
|
+
|
|
20
|
+
export default class App extends Component {
|
|
21
|
+
render() {
|
|
22
|
+
return (
|
|
23
|
+
<div>
|
|
24
|
+
<Button>Enjoy</Button>
|
|
25
|
+
</div>
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Generar version hotfix para arcade/master-stg
|
|
33
|
+
|
|
34
|
+
Para generar una version hotfix nos vamos al commit que desplego la version que utiliza actualmente arcade/master-stg y creamos una rama sobre ella.
|
|
35
|
+
|
|
36
|
+
Generamos los cambios o hacemos cherrypick de ellos si ya estan creados y una vez terminemos con los cambios tendremos que cambiar la version del package.json a una tal que asi :
|
|
37
|
+
|
|
38
|
+
`"version": "1.3.5-fix-1",`
|
|
39
|
+
|
|
40
|
+
Habiendo cambiado ya la version para publicarla ejecutamos:
|
|
41
|
+
* `npm run publish-hotfix`
|
|
42
|
+
|
|
43
|
+
Una vez publicada en npm ir a la versión master de arcade y sustituir la versión de arcade-components.
|
|
44
|
+
|
|
45
|
+
## Available Scripts
|
|
46
|
+
|
|
47
|
+
Para ver Storybook en local
|
|
48
|
+
|
|
49
|
+
### `yarn start`
|
|
50
|
+
|
|
51
|
+
Para compilar la librería a dist
|
|
52
|
+
|
|
53
|
+
### `yarn compile`
|
|
54
|
+
|
|
55
|
+
Para dejar a babel observando cambios y ejecuntando auto-compilación puedes pasarle --watch
|
|
56
|
+
|
|
57
|
+
`yarn compile --watch`
|
|
58
|
+
|
|
59
|
+
### `yarn generate <componentName>`
|
|
60
|
+
|
|
61
|
+
Para añadir un componente nuevo se recomienda usar el generador automático que hara el scaffolding básico de dicho componente, coge el nombre como primer parámetro y si lo llamas sin parámetro te lo preguntará por el prompt.
|
|
62
|
+
|
|
63
|
+
`yarn generate`
|
|
64
|
+
|
|
65
|
+
## How to link arcade-components in other repos (WIP)
|
|
66
|
+
|
|
67
|
+
Para trabajar con arcade-components en local si necesidad de subir a git ni a npm no podemos trabajar con `yarn link` ya que da un error con los hooks de react.
|
|
68
|
+
|
|
69
|
+
Cómo solución alternativa podemos instalar `yalc` que permite publicar el paquete en local e importarlo desde `arcade`.
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
yarn global add yalc
|
|
73
|
+
```
|
|
74
|
+
Si teneis problemas instalándolo en global :
|
|
75
|
+
yarn global add yalc --prefix /usr/local
|
|
76
|
+
|
|
77
|
+
Para generar el paquete en el store local:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
yarn
|
|
81
|
+
yarn compile
|
|
82
|
+
yalc publish o yarn yalc publish
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Si queremos escuchar los cambios y que se vayan publicando en el store de yalc se puede hacer directamente con:
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
yarn watch
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Después, en el repositorio de `arcade` tendremos que linkar el paquete generado de la siguiente forma:
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
yalc link @gamelearn/arcade-components
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
Y voilá, ya podremos trabajar con arcade y arcade-components en local sin publicar nada.
|
|
98
|
+
|
|
99
|
+
Una vez terminemos de trabajar con el paquete linkado en `arcade`, no nos olvidemos de borrar el link:
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
yalc remove --all
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
## License
|
|
106
|
+
|
|
107
|
+
UNLICENSED © [gamelearn](https://github.com/gamelearn)
|
|
@@ -56,35 +56,30 @@ var AutoEvaluation = function AutoEvaluation(_ref) {
|
|
|
56
56
|
emitEvent = _ref.emitEvent,
|
|
57
57
|
soundActions = _ref.soundActions;
|
|
58
58
|
|
|
59
|
-
var _useState = (0, _react.useState)(
|
|
59
|
+
var _useState = (0, _react.useState)('start'),
|
|
60
60
|
_useState2 = _slicedToArray(_useState, 2),
|
|
61
|
-
|
|
62
|
-
|
|
61
|
+
phase = _useState2[0],
|
|
62
|
+
setPhase = _useState2[1];
|
|
63
63
|
|
|
64
|
-
var _useState3 = (0, _react.useState)(
|
|
64
|
+
var _useState3 = (0, _react.useState)(false),
|
|
65
65
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
66
|
-
|
|
67
|
-
|
|
66
|
+
finish = _useState4[0],
|
|
67
|
+
setFinish = _useState4[1];
|
|
68
68
|
|
|
69
|
-
var _useState5 = (0, _react.useState)(
|
|
69
|
+
var _useState5 = (0, _react.useState)(0),
|
|
70
70
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
71
|
-
|
|
72
|
-
|
|
71
|
+
currentQuestion = _useState6[0],
|
|
72
|
+
setCurrentQuestion = _useState6[1];
|
|
73
73
|
|
|
74
|
-
var _useState7 = (0, _react.useState)(
|
|
75
|
-
_useState8 = _slicedToArray(_useState7, 2),
|
|
76
|
-
currentQuestion = _useState8[0],
|
|
77
|
-
setCurrentQuestion = _useState8[1];
|
|
78
|
-
|
|
79
|
-
var _useState9 = (0, _react.useState)({
|
|
74
|
+
var _useState7 = (0, _react.useState)({
|
|
80
75
|
current: {
|
|
81
76
|
questions: [],
|
|
82
77
|
type: type
|
|
83
78
|
}
|
|
84
79
|
}),
|
|
85
|
-
|
|
86
|
-
surveyData =
|
|
87
|
-
setSurveyData =
|
|
80
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
81
|
+
surveyData = _useState8[0],
|
|
82
|
+
setSurveyData = _useState8[1];
|
|
88
83
|
|
|
89
84
|
var _soundActions = _slicedToArray(soundActions, 1),
|
|
90
85
|
play = _soundActions[0];
|
|
@@ -187,16 +182,10 @@ var AutoEvaluation = function AutoEvaluation(_ref) {
|
|
|
187
182
|
|
|
188
183
|
return /*#__PURE__*/_react.default.createElement("li", {
|
|
189
184
|
key: "".concat(0 + i),
|
|
190
|
-
onTouchStart: function onTouchStart() {
|
|
191
|
-
setPointIsBeingTouched(i);
|
|
192
|
-
},
|
|
193
|
-
onTouchEnd: function onTouchEnd() {
|
|
194
|
-
setPointIsBeingTouched(null);
|
|
195
|
-
},
|
|
196
185
|
onClick: function onClick() {
|
|
197
186
|
handleNextQuestion(i, false);
|
|
198
187
|
},
|
|
199
|
-
className: "survey--points__item ".concat(((_surveyData$current$q2 = surveyData.current.questions[currentQuestion]) === null || _surveyData$current$q2 === void 0 ? void 0 : _surveyData$current$q2.answer) === i
|
|
188
|
+
className: "survey--points__item ".concat(((_surveyData$current$q2 = surveyData.current.questions[currentQuestion]) === null || _surveyData$current$q2 === void 0 ? void 0 : _surveyData$current$q2.answer) === i ? 'selected' : '')
|
|
200
189
|
}, i);
|
|
201
190
|
}))))), /*#__PURE__*/_react.default.createElement("div", {
|
|
202
191
|
className: "test--buttons next"
|
|
@@ -123,7 +123,7 @@ var CartelComponent = function CartelComponent(_ref) {
|
|
|
123
123
|
className: "position--absolute top right"
|
|
124
124
|
}, /*#__PURE__*/_react.default.createElement("button", {
|
|
125
125
|
type: "button",
|
|
126
|
-
className: "gat--btn__round
|
|
126
|
+
className: "gat--btn__round",
|
|
127
127
|
onClick: function onClick() {
|
|
128
128
|
return close();
|
|
129
129
|
}
|
|
@@ -186,7 +186,7 @@ var ComicComponent = function ComicComponent(_ref) {
|
|
|
186
186
|
className: "position--absolute top right"
|
|
187
187
|
}, /*#__PURE__*/_react.default.createElement("button", {
|
|
188
188
|
type: "button",
|
|
189
|
-
className: "gat--btn__round
|
|
189
|
+
className: "gat--btn__round",
|
|
190
190
|
"data-testid": "btn-cls",
|
|
191
191
|
onClick: function onClick() {
|
|
192
192
|
play('click-ui');
|
package/dist/components/conversational-pro-component/components/ConversationalProComponent.js
CHANGED
|
@@ -134,7 +134,7 @@ var ConversationProViewer = function ConversationProViewer(_ref) {
|
|
|
134
134
|
return edge.toId === lastNodeId;
|
|
135
135
|
});
|
|
136
136
|
var lastLine = lines.find(function (line) {
|
|
137
|
-
return line.id ===
|
|
137
|
+
return line.id === lastEdge.fromId;
|
|
138
138
|
});
|
|
139
139
|
return lastLine;
|
|
140
140
|
}, [edges, lines, lastNodeId]);
|
|
@@ -207,7 +207,7 @@ var DialogComponent = function DialogComponent(_ref) {
|
|
|
207
207
|
return edge.toId === lastNodeId;
|
|
208
208
|
});
|
|
209
209
|
var lastL = lines.find(function (l) {
|
|
210
|
-
return l.id ===
|
|
210
|
+
return l.id === lastEdge.fromId;
|
|
211
211
|
});
|
|
212
212
|
return lastL;
|
|
213
213
|
}, [edges, lines, lastNodeId]);
|
|
@@ -783,8 +783,7 @@ var DialogComponent = function DialogComponent(_ref) {
|
|
|
783
783
|
}) : null, /*#__PURE__*/_react.default.createElement(_arcadeThreeCore.HtmlPro, {
|
|
784
784
|
style: {
|
|
785
785
|
width: '100vw',
|
|
786
|
-
height: '100vh'
|
|
787
|
-
position: 'static'
|
|
786
|
+
height: '100vh'
|
|
788
787
|
},
|
|
789
788
|
portal: container ? {
|
|
790
789
|
current: container
|
|
@@ -81,7 +81,7 @@ var ImageComponent = function ImageComponent(_ref) {
|
|
|
81
81
|
className: !imgUrl ? 'position--absolute top right' : 'readings--image--closeBtn'
|
|
82
82
|
}, /*#__PURE__*/_react.default.createElement("button", {
|
|
83
83
|
type: "button",
|
|
84
|
-
className: "gat--btn__round
|
|
84
|
+
className: "gat--btn__round",
|
|
85
85
|
onClick: close
|
|
86
86
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
87
87
|
className: "icon-close"
|
|
@@ -73,21 +73,17 @@ var InventoryItem = function InventoryItem(_ref) {
|
|
|
73
73
|
className: "inventory--layer__info",
|
|
74
74
|
dir: "auto"
|
|
75
75
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
76
|
-
className: "inventory
|
|
76
|
+
className: "inventory--layer__info--popup fadeIn--animation"
|
|
77
77
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
78
|
-
className: "inventory
|
|
78
|
+
className: "inventory--info__close",
|
|
79
79
|
onClick: function onClick() {
|
|
80
80
|
playSound('click-ui');
|
|
81
81
|
onFinish();
|
|
82
82
|
}
|
|
83
83
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
84
84
|
className: "icon-close"
|
|
85
|
-
})), /*#__PURE__*/_react.default.createElement("
|
|
86
|
-
className: "inventory
|
|
87
|
-
}, name), description && /*#__PURE__*/_react.default.createElement("div", {
|
|
88
|
-
className: "inventory-popup__description"
|
|
89
|
-
}, description), /*#__PURE__*/_react.default.createElement("div", {
|
|
90
|
-
className: "inventory-popup__image"
|
|
85
|
+
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
86
|
+
className: "inventory--layer__info--image"
|
|
91
87
|
}, /*#__PURE__*/_react.default.createElement(_fiber.Canvas, {
|
|
92
88
|
style: {
|
|
93
89
|
height: '100%'
|
|
@@ -115,7 +111,9 @@ var InventoryItem = function InventoryItem(_ref) {
|
|
|
115
111
|
enablePan: false
|
|
116
112
|
}), /*#__PURE__*/_react.default.createElement(_drei.Preload, {
|
|
117
113
|
all: true
|
|
118
|
-
}))))
|
|
114
|
+
})))), /*#__PURE__*/_react.default.createElement("div", {
|
|
115
|
+
className: "inventory--layer__info--description"
|
|
116
|
+
}, /*#__PURE__*/_react.default.createElement("h1", null, name), /*#__PURE__*/_react.default.createElement("p", null, description))));
|
|
119
117
|
};
|
|
120
118
|
|
|
121
119
|
var _default = InventoryItem;
|
|
@@ -114,7 +114,7 @@ var VideoVisor = function VideoVisor(_ref) {
|
|
|
114
114
|
})) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
115
115
|
className: "position--absolute right top z-index1"
|
|
116
116
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
117
|
-
className: "gat--btn__round
|
|
117
|
+
className: "gat--btn__round",
|
|
118
118
|
onClick: endVideo
|
|
119
119
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
120
120
|
className: "icon-close"
|
|
@@ -41,7 +41,7 @@ var NoticeComponent = function NoticeComponent(_ref) {
|
|
|
41
41
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
42
42
|
className: "popup--layer"
|
|
43
43
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
44
|
-
className: "popup
|
|
44
|
+
className: "popup"
|
|
45
45
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
46
46
|
className: "popup--head__title"
|
|
47
47
|
}, title), /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -70,7 +70,7 @@ var PatternComponent = function PatternComponent(_ref) {
|
|
|
70
70
|
className: "pattern__title"
|
|
71
71
|
}, translate('phone.pattern')), /*#__PURE__*/_react.default.createElement("button", {
|
|
72
72
|
type: "button",
|
|
73
|
-
className: "pattern__close gat--btn__round
|
|
73
|
+
className: "pattern__close gat--btn__round",
|
|
74
74
|
onClick: function onClick() {
|
|
75
75
|
return close();
|
|
76
76
|
}
|
|
@@ -117,7 +117,7 @@ var PdfComponent = function PdfComponent(_ref) {
|
|
|
117
117
|
className: "position--absolute top right z-index1"
|
|
118
118
|
}, /*#__PURE__*/_react.default.createElement("button", {
|
|
119
119
|
type: "button",
|
|
120
|
-
className: "gat--btn__round
|
|
120
|
+
className: "gat--btn__round",
|
|
121
121
|
onClick: function onClick() {
|
|
122
122
|
emitFinish();
|
|
123
123
|
play('click-ui');
|
|
@@ -72,7 +72,7 @@ var SurveyComponent = function SurveyComponent(_ref) {
|
|
|
72
72
|
var _useState5 = (0, _react.useState)(false),
|
|
73
73
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
74
74
|
finished = _useState6[0],
|
|
75
|
-
|
|
75
|
+
finish = _useState6[1];
|
|
76
76
|
|
|
77
77
|
var _soundActions = _slicedToArray(soundActions, 1),
|
|
78
78
|
play = _soundActions[0];
|
|
@@ -90,12 +90,8 @@ var SurveyComponent = function SurveyComponent(_ref) {
|
|
|
90
90
|
play('click-ui');
|
|
91
91
|
|
|
92
92
|
if (!backward && page + 1 >= PAGES.length) {
|
|
93
|
-
|
|
93
|
+
finish(true);
|
|
94
94
|
} else {
|
|
95
|
-
if (backward) {
|
|
96
|
-
setFinished(false);
|
|
97
|
-
}
|
|
98
|
-
|
|
99
95
|
var destinationPage = backward ? page - 1 : page + 1;
|
|
100
96
|
setPage(destinationPage);
|
|
101
97
|
}
|
|
@@ -125,22 +121,12 @@ var SurveyComponent = function SurveyComponent(_ref) {
|
|
|
125
121
|
id: PAGES[page].id,
|
|
126
122
|
survey: survey,
|
|
127
123
|
translate: translate,
|
|
128
|
-
changePage: function changePage(
|
|
129
|
-
return _changePage(false
|
|
124
|
+
changePage: function changePage() {
|
|
125
|
+
return _changePage(false);
|
|
130
126
|
}
|
|
131
127
|
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
132
128
|
className: "test--buttons next"
|
|
133
|
-
}, /*#__PURE__*/_react.default.createElement("button", {
|
|
134
|
-
id: "survey-button-back",
|
|
135
|
-
type: "button",
|
|
136
|
-
disabled: page === 0,
|
|
137
|
-
onClick: function onClick() {
|
|
138
|
-
return _changePage(true);
|
|
139
|
-
},
|
|
140
|
-
className: "gat--btn__navigation ".concat(page === 0 ? 'disabled' : '')
|
|
141
|
-
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
142
|
-
className: (0, _LangIsRtl.default)() ? 'icon-next' : 'icon-back'
|
|
143
|
-
})), finished && page === PAGES.length - 1 ? /*#__PURE__*/_react.default.createElement("button", {
|
|
129
|
+
}, finished ? /*#__PURE__*/_react.default.createElement("button", {
|
|
144
130
|
id: "survey-button",
|
|
145
131
|
type: "button",
|
|
146
132
|
disabled: !survey[PAGES[page].id],
|
|
@@ -152,7 +138,17 @@ var SurveyComponent = function SurveyComponent(_ref) {
|
|
|
152
138
|
});
|
|
153
139
|
},
|
|
154
140
|
className: "gat--btn gat--btn__primary ".concat(!survey[PAGES[page].id] ? 'disabled' : '', " not-transition")
|
|
155
|
-
}, translate('survey.finish')) : null,
|
|
141
|
+
}, translate('survey.finish')) : /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("button", {
|
|
142
|
+
id: "survey-button-back",
|
|
143
|
+
type: "button",
|
|
144
|
+
disabled: page === 0,
|
|
145
|
+
onClick: function onClick() {
|
|
146
|
+
return _changePage(true);
|
|
147
|
+
},
|
|
148
|
+
className: "gat--btn__navigation ".concat(page === 0 ? 'disabled' : '')
|
|
149
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
150
|
+
className: (0, _LangIsRtl.default)() ? 'icon-next' : 'icon-back'
|
|
151
|
+
})), /*#__PURE__*/_react.default.createElement("button", {
|
|
156
152
|
id: "survey-button",
|
|
157
153
|
type: "button",
|
|
158
154
|
disabled: !survey[PAGES[page].id],
|
|
@@ -162,7 +158,7 @@ var SurveyComponent = function SurveyComponent(_ref) {
|
|
|
162
158
|
className: "gat--btn__navigation ".concat(!survey[PAGES[page].id] ? 'disabled' : '')
|
|
163
159
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
164
160
|
className: (0, _LangIsRtl.default)() ? 'icon-back' : 'icon-next'
|
|
165
|
-
}))
|
|
161
|
+
})))))));
|
|
166
162
|
};
|
|
167
163
|
|
|
168
164
|
var _default = SurveyComponent;
|
|
@@ -18,7 +18,7 @@ var skipButton = function skipButton(_ref) {
|
|
|
18
18
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, mandatory && viewed || !mandatory || finished || mandatoryHasBeenViewed ? /*#__PURE__*/_react.default.createElement("div", {
|
|
19
19
|
className: "position--absolute right top z-index1"
|
|
20
20
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
21
|
-
className: "gat--btn__round
|
|
21
|
+
className: "gat--btn__round",
|
|
22
22
|
onClick: function onClick() {
|
|
23
23
|
skip();
|
|
24
24
|
}
|
|
@@ -289,7 +289,7 @@ var VideoVisor = function VideoVisor(_ref) {
|
|
|
289
289
|
}, /*#__PURE__*/_react.default.createElement("p", null, Math.floor(loadedPercentage))))) : null) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
290
290
|
className: "position--absolute right top z-index1"
|
|
291
291
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
292
|
-
className: "gat--btn__round
|
|
292
|
+
className: "gat--btn__round",
|
|
293
293
|
onClick: function onClick() {
|
|
294
294
|
playSound('click-ui');
|
|
295
295
|
endVideo();
|
package/package.json
CHANGED
|
@@ -1,114 +1,114 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@gamelearn/arcade-components",
|
|
3
|
-
"author": "Gamelearn",
|
|
4
|
-
"license": "unlicense",
|
|
5
|
-
"version": "2.5.11
|
|
6
|
-
"main": "dist/index.js",
|
|
7
|
-
"files": [
|
|
8
|
-
"dist",
|
|
9
|
-
"README.md"
|
|
10
|
-
],
|
|
11
|
-
"repository": {
|
|
12
|
-
"type": "git",
|
|
13
|
-
"url": "https://github.com/gamelearn/arcade-components"
|
|
14
|
-
},
|
|
15
|
-
"dependencies": {
|
|
16
|
-
"@babel/runtime": "^7.18.6",
|
|
17
|
-
"@gamelearn/arcade-styles": "2.5.6
|
|
18
|
-
"@gamelearn/arcade-three-core": "1.17.2",
|
|
19
|
-
"@react-three/drei": "9.4.3",
|
|
20
|
-
"@react-three/fiber": "8.0.17",
|
|
21
|
-
"@testing-library/jest-dom": "^5.16.4",
|
|
22
|
-
"@testing-library/react": "^13.1.1",
|
|
23
|
-
"@testing-library/user-event": "13.5.0",
|
|
24
|
-
"global": "^4.4.0",
|
|
25
|
-
"gsap": "^3.10.1",
|
|
26
|
-
"hls.js": "0.12.4",
|
|
27
|
-
"html-react-parser": "^1.4.0",
|
|
28
|
-
"interactjs": "^1.10.11",
|
|
29
|
-
"konva": "^7.2.5",
|
|
30
|
-
"prop-types": "15.7.2",
|
|
31
|
-
"react-konva": "^18.1.0",
|
|
32
|
-
"react-konva-utils": "^0.3.0",
|
|
33
|
-
"react-pdf": "5.2.0",
|
|
34
|
-
"react-promise-suspense": "0.3.3",
|
|
35
|
-
"react-typist": "^2.0.5",
|
|
36
|
-
"three": "0.139.2",
|
|
37
|
-
"web-vitals": "0.2.4"
|
|
38
|
-
},
|
|
39
|
-
"scripts": {
|
|
40
|
-
"start": "npm run storybook",
|
|
41
|
-
"clean": "rimraf dist",
|
|
42
|
-
"watch": "npx nodemon -e js --ignore dist --exec \"yarn compile && yalc push --changed\"",
|
|
43
|
-
"compile": "npm run clean && cross-env NODE_ENV=production babel src -d dist --ignore src/**/*.stories.js,src/**/*.test.js,src/setupTests.js",
|
|
44
|
-
"test": "react-scripts test --watchAll=false",
|
|
45
|
-
"test:watch": "react-scripts test",
|
|
46
|
-
"eject": "react-scripts eject",
|
|
47
|
-
"storybook": "start-storybook -p 6006 -s public",
|
|
48
|
-
"build-storybook": "build-storybook -o build",
|
|
49
|
-
"generate": "plop",
|
|
50
|
-
"lint": "npx eslint src --ext js,json",
|
|
51
|
-
"lint:fix": "npx eslint src --ext js,json --fix",
|
|
52
|
-
"lint:quiet": "npx eslint src --ext js,json --quiet",
|
|
53
|
-
"publish-hotfix": "yarn compile && npm publish && npm run version-tag",
|
|
54
|
-
"version-tag": "P_VER=$(cat package.json | grep version | head -1 | awk -F: '{ print $2 }' | sed 's/[\",]//g' | tr -d '[[:space:]]') && git tag v$P_VER && git push origin v$P_VER"
|
|
55
|
-
},
|
|
56
|
-
"browserslist": {
|
|
57
|
-
"production": [
|
|
58
|
-
">0.2%",
|
|
59
|
-
"not dead",
|
|
60
|
-
"not op_mini all"
|
|
61
|
-
],
|
|
62
|
-
"development": [
|
|
63
|
-
"last 1 chrome version",
|
|
64
|
-
"last 1 firefox version",
|
|
65
|
-
"last 1 safari version"
|
|
66
|
-
]
|
|
67
|
-
},
|
|
68
|
-
"devDependencies": {
|
|
69
|
-
"@babel/cli": "7.12.10",
|
|
70
|
-
"@babel/eslint-parser": "^7.15.8",
|
|
71
|
-
"@babel/preset-env": "7.12.11",
|
|
72
|
-
"@babel/preset-react": "7.12.10",
|
|
73
|
-
"@gamelearn/version": "^1.3.1",
|
|
74
|
-
"@react-three/test-renderer": "6.0.6",
|
|
75
|
-
"@storybook/addon-actions": "6.1.11",
|
|
76
|
-
"@storybook/addon-essentials": "6.1.11",
|
|
77
|
-
"@storybook/addon-links": "6.1.11",
|
|
78
|
-
"@storybook/addons": "^6.3.8",
|
|
79
|
-
"@storybook/node-logger": "6.1.11",
|
|
80
|
-
"@storybook/preset-create-react-app": "3.1.5",
|
|
81
|
-
"@storybook/react": "6.1.11",
|
|
82
|
-
"@storybook/theming": "^6.3.8",
|
|
83
|
-
"babel-loader": "8.1.0",
|
|
84
|
-
"cross-env": "7.0.3",
|
|
85
|
-
"eslint-config-airbnb": "^18.2.1",
|
|
86
|
-
"eslint-config-prettier": "^8.3.0",
|
|
87
|
-
"eslint-plugin-json-format": "^2.0.1",
|
|
88
|
-
"eslint-plugin-prettier": "^4.0.0",
|
|
89
|
-
"husky": "4.3.0",
|
|
90
|
-
"nodemon": "^2.0.13",
|
|
91
|
-
"plop": "^2.7.4",
|
|
92
|
-
"prettier": "^2.5.0",
|
|
93
|
-
"react": "18.0.0",
|
|
94
|
-
"react-dom": "18.0.0",
|
|
95
|
-
"react-scripts": "4.0.1",
|
|
96
|
-
"rimraf": "3.0.2"
|
|
97
|
-
},
|
|
98
|
-
"jest": {
|
|
99
|
-
"transformIgnorePatterns": [
|
|
100
|
-
"node_modules/(?!(three)/)"
|
|
101
|
-
],
|
|
102
|
-
"moduleNameMapper": {
|
|
103
|
-
"^react-pdf$": "react-pdf/dist/umd/entry.jest",
|
|
104
|
-
"^react-konva-utils$": "react-pdf/dist/umd/entry.jest"
|
|
105
|
-
}
|
|
106
|
-
},
|
|
107
|
-
"husky": {
|
|
108
|
-
"hooks": {
|
|
109
|
-
"prepare-commit-msg": "bash node_modules/@gamelearn/version/scripts/update_version.sh -p hooks.config ${HUSKY_GIT_PARAMS}",
|
|
110
|
-
"post-commit": "bash node_modules/@gamelearn/version/scripts/after_version_update.sh -p hooks.config",
|
|
111
|
-
"post-merge": "bash node_modules/@gamelearn/version/scripts/after_version_update.sh -p hooks.config"
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@gamelearn/arcade-components",
|
|
3
|
+
"author": "Gamelearn",
|
|
4
|
+
"license": "unlicense",
|
|
5
|
+
"version": "2.5.11",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"files": [
|
|
8
|
+
"dist",
|
|
9
|
+
"README.md"
|
|
10
|
+
],
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "https://github.com/gamelearn/arcade-components"
|
|
14
|
+
},
|
|
15
|
+
"dependencies": {
|
|
16
|
+
"@babel/runtime": "^7.18.6",
|
|
17
|
+
"@gamelearn/arcade-styles": "2.5.6",
|
|
18
|
+
"@gamelearn/arcade-three-core": "1.17.2",
|
|
19
|
+
"@react-three/drei": "9.4.3",
|
|
20
|
+
"@react-three/fiber": "8.0.17",
|
|
21
|
+
"@testing-library/jest-dom": "^5.16.4",
|
|
22
|
+
"@testing-library/react": "^13.1.1",
|
|
23
|
+
"@testing-library/user-event": "13.5.0",
|
|
24
|
+
"global": "^4.4.0",
|
|
25
|
+
"gsap": "^3.10.1",
|
|
26
|
+
"hls.js": "0.12.4",
|
|
27
|
+
"html-react-parser": "^1.4.0",
|
|
28
|
+
"interactjs": "^1.10.11",
|
|
29
|
+
"konva": "^7.2.5",
|
|
30
|
+
"prop-types": "15.7.2",
|
|
31
|
+
"react-konva": "^18.1.0",
|
|
32
|
+
"react-konva-utils": "^0.3.0",
|
|
33
|
+
"react-pdf": "5.2.0",
|
|
34
|
+
"react-promise-suspense": "0.3.3",
|
|
35
|
+
"react-typist": "^2.0.5",
|
|
36
|
+
"three": "0.139.2",
|
|
37
|
+
"web-vitals": "0.2.4"
|
|
38
|
+
},
|
|
39
|
+
"scripts": {
|
|
40
|
+
"start": "npm run storybook",
|
|
41
|
+
"clean": "rimraf dist",
|
|
42
|
+
"watch": "npx nodemon -e js --ignore dist --exec \"yarn compile && yalc push --changed\"",
|
|
43
|
+
"compile": "npm run clean && cross-env NODE_ENV=production babel src -d dist --ignore src/**/*.stories.js,src/**/*.test.js,src/setupTests.js",
|
|
44
|
+
"test": "react-scripts test --watchAll=false",
|
|
45
|
+
"test:watch": "react-scripts test",
|
|
46
|
+
"eject": "react-scripts eject",
|
|
47
|
+
"storybook": "start-storybook -p 6006 -s public",
|
|
48
|
+
"build-storybook": "build-storybook -o build",
|
|
49
|
+
"generate": "plop",
|
|
50
|
+
"lint": "npx eslint src --ext js,json",
|
|
51
|
+
"lint:fix": "npx eslint src --ext js,json --fix",
|
|
52
|
+
"lint:quiet": "npx eslint src --ext js,json --quiet",
|
|
53
|
+
"publish-hotfix": "yarn compile && npm publish && npm run version-tag",
|
|
54
|
+
"version-tag": "P_VER=$(cat package.json | grep version | head -1 | awk -F: '{ print $2 }' | sed 's/[\",]//g' | tr -d '[[:space:]]') && git tag v$P_VER && git push origin v$P_VER"
|
|
55
|
+
},
|
|
56
|
+
"browserslist": {
|
|
57
|
+
"production": [
|
|
58
|
+
">0.2%",
|
|
59
|
+
"not dead",
|
|
60
|
+
"not op_mini all"
|
|
61
|
+
],
|
|
62
|
+
"development": [
|
|
63
|
+
"last 1 chrome version",
|
|
64
|
+
"last 1 firefox version",
|
|
65
|
+
"last 1 safari version"
|
|
66
|
+
]
|
|
67
|
+
},
|
|
68
|
+
"devDependencies": {
|
|
69
|
+
"@babel/cli": "7.12.10",
|
|
70
|
+
"@babel/eslint-parser": "^7.15.8",
|
|
71
|
+
"@babel/preset-env": "7.12.11",
|
|
72
|
+
"@babel/preset-react": "7.12.10",
|
|
73
|
+
"@gamelearn/version": "^1.3.1",
|
|
74
|
+
"@react-three/test-renderer": "6.0.6",
|
|
75
|
+
"@storybook/addon-actions": "6.1.11",
|
|
76
|
+
"@storybook/addon-essentials": "6.1.11",
|
|
77
|
+
"@storybook/addon-links": "6.1.11",
|
|
78
|
+
"@storybook/addons": "^6.3.8",
|
|
79
|
+
"@storybook/node-logger": "6.1.11",
|
|
80
|
+
"@storybook/preset-create-react-app": "3.1.5",
|
|
81
|
+
"@storybook/react": "6.1.11",
|
|
82
|
+
"@storybook/theming": "^6.3.8",
|
|
83
|
+
"babel-loader": "8.1.0",
|
|
84
|
+
"cross-env": "7.0.3",
|
|
85
|
+
"eslint-config-airbnb": "^18.2.1",
|
|
86
|
+
"eslint-config-prettier": "^8.3.0",
|
|
87
|
+
"eslint-plugin-json-format": "^2.0.1",
|
|
88
|
+
"eslint-plugin-prettier": "^4.0.0",
|
|
89
|
+
"husky": "4.3.0",
|
|
90
|
+
"nodemon": "^2.0.13",
|
|
91
|
+
"plop": "^2.7.4",
|
|
92
|
+
"prettier": "^2.5.0",
|
|
93
|
+
"react": "18.0.0",
|
|
94
|
+
"react-dom": "18.0.0",
|
|
95
|
+
"react-scripts": "4.0.1",
|
|
96
|
+
"rimraf": "3.0.2"
|
|
97
|
+
},
|
|
98
|
+
"jest": {
|
|
99
|
+
"transformIgnorePatterns": [
|
|
100
|
+
"node_modules/(?!(three)/)"
|
|
101
|
+
],
|
|
102
|
+
"moduleNameMapper": {
|
|
103
|
+
"^react-pdf$": "react-pdf/dist/umd/entry.jest",
|
|
104
|
+
"^react-konva-utils$": "react-pdf/dist/umd/entry.jest"
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
"husky": {
|
|
108
|
+
"hooks": {
|
|
109
|
+
"prepare-commit-msg": "bash node_modules/@gamelearn/version/scripts/update_version.sh -p hooks.config ${HUSKY_GIT_PARAMS}",
|
|
110
|
+
"post-commit": "bash node_modules/@gamelearn/version/scripts/after_version_update.sh -p hooks.config",
|
|
111
|
+
"post-merge": "bash node_modules/@gamelearn/version/scripts/after_version_update.sh -p hooks.config"
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|