jclic 2.2.1 → 2.3.0

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.
Files changed (177) hide show
  1. package/README.md +5 -7
  2. package/dist-node/jclic-node.js +14157 -0
  3. package/dist-node/jclic-node.umd.cjs +530 -0
  4. package/package.json +38 -26
  5. package/.vscode/launch.json +0 -33
  6. package/.vscode/settings.json +0 -13
  7. package/CHANGELOG.md +0 -672
  8. package/TRANSLATIONS.md +0 -11
  9. package/build-locales.mjs +0 -82
  10. package/dist/jclic-node.js +0 -31680
  11. package/dist/jclic-node.js.map +0 -1
  12. package/dist/jclic.components.LICENSE +0 -2254
  13. package/dist/jclic.min.js +0 -27
  14. package/dist/jclic.min.js.map +0 -1
  15. package/eslint.config.mjs +0 -31
  16. package/jsdoc.config.js +0 -71
  17. package/locales/ar.po +0 -244
  18. package/locales/ast.po +0 -246
  19. package/locales/bs.po +0 -247
  20. package/locales/ca.po +0 -248
  21. package/locales/ca_ES@valencia.po +0 -248
  22. package/locales/cs.po +0 -244
  23. package/locales/da.po +0 -244
  24. package/locales/de.po +0 -246
  25. package/locales/el.po +0 -244
  26. package/locales/es.po +0 -248
  27. package/locales/eu.po +0 -244
  28. package/locales/fr.po +0 -244
  29. package/locales/gl.po +0 -244
  30. package/locales/he.po +0 -244
  31. package/locales/hr.po +0 -245
  32. package/locales/it.po +0 -246
  33. package/locales/ja.po +0 -242
  34. package/locales/jclic.js.pot +0 -241
  35. package/locales/nb_NO.po +0 -244
  36. package/locales/nl.po +0 -244
  37. package/locales/pl.po +0 -244
  38. package/locales/pt.po +0 -244
  39. package/locales/pt_BR.po +0 -248
  40. package/locales/ro.po +0 -248
  41. package/locales/ru.po +0 -245
  42. package/locales/ta.po +0 -244
  43. package/locales/tr.po +0 -246
  44. package/locales/uk.po +0 -247
  45. package/locales/vec.po +0 -244
  46. package/locales/zh_TW.po +0 -246
  47. package/patches/po2json+1.0.0-beta-3.patch +0 -12
  48. package/src/AWT.js +0 -2067
  49. package/src/Activity.js +0 -1311
  50. package/src/Deps.js +0 -232
  51. package/src/GlobalData.js +0 -5
  52. package/src/JClic.js +0 -196
  53. package/src/JClicPlayer.js +0 -1308
  54. package/src/PlayerHistory.js +0 -305
  55. package/src/Utils.js +0 -1355
  56. package/src/activities/associations/ComplexAssociation.js +0 -321
  57. package/src/activities/associations/SimpleAssociation.js +0 -519
  58. package/src/activities/memory/MemoryGame.js +0 -423
  59. package/src/activities/panels/Explore.js +0 -349
  60. package/src/activities/panels/Identify.js +0 -356
  61. package/src/activities/panels/InformationScreen.js +0 -262
  62. package/src/activities/panels/Menu.js +0 -209
  63. package/src/activities/panels/icons/ico00.png +0 -0
  64. package/src/activities/panels/icons/ico01.png +0 -0
  65. package/src/activities/panels/icons/ico02.png +0 -0
  66. package/src/activities/panels/icons/ico03.png +0 -0
  67. package/src/activities/panels/icons/icofolder.png +0 -0
  68. package/src/activities/puzzles/DoublePuzzle.js +0 -424
  69. package/src/activities/puzzles/ExchangePuzzle.js +0 -374
  70. package/src/activities/puzzles/HolePuzzle.js +0 -360
  71. package/src/activities/text/Complete.js +0 -127
  72. package/src/activities/text/Evaluator.js +0 -534
  73. package/src/activities/text/FillInBlanks.js +0 -426
  74. package/src/activities/text/IdentifyText.js +0 -253
  75. package/src/activities/text/OrderText.js +0 -421
  76. package/src/activities/text/TextActivityBase.js +0 -557
  77. package/src/activities/text/TextActivityDocument.js +0 -660
  78. package/src/activities/text/WrittenAnswer.js +0 -557
  79. package/src/activities/textGrid/CrossWord.js +0 -565
  80. package/src/activities/textGrid/WordSearch.js +0 -458
  81. package/src/activities/textGrid/icons/hIcon.svg +0 -3
  82. package/src/activities/textGrid/icons/vIcon.svg +0 -3
  83. package/src/automation/AutoContentProvider.js +0 -182
  84. package/src/automation/arith/Arith.js +0 -864
  85. package/src/bags/ActivitySequence.js +0 -318
  86. package/src/bags/ActivitySequenceElement.js +0 -161
  87. package/src/bags/ActivitySequenceJump.js +0 -140
  88. package/src/bags/ConditionalJumpInfo.js +0 -113
  89. package/src/bags/JumpInfo.js +0 -136
  90. package/src/bags/MediaBag.js +0 -215
  91. package/src/bags/MediaBagElement.js +0 -516
  92. package/src/boxes/AbstractBox.js +0 -699
  93. package/src/boxes/ActiveBagContent.js +0 -494
  94. package/src/boxes/ActiveBox.js +0 -810
  95. package/src/boxes/ActiveBoxBag.js +0 -357
  96. package/src/boxes/ActiveBoxContent.js +0 -484
  97. package/src/boxes/ActiveBoxGrid.js +0 -179
  98. package/src/boxes/BoxBag.js +0 -500
  99. package/src/boxes/BoxBase.js +0 -398
  100. package/src/boxes/BoxConnector.js +0 -325
  101. package/src/boxes/TextGrid.js +0 -887
  102. package/src/boxes/TextGridContent.js +0 -215
  103. package/src/init-jsdom.js +0 -65
  104. package/src/jclic-node.js +0 -219
  105. package/src/media/ActiveMediaBag.js +0 -145
  106. package/src/media/ActiveMediaPlayer.js +0 -297
  107. package/src/media/AudioBuffer.js +0 -219
  108. package/src/media/EventSounds.js +0 -169
  109. package/src/media/EventSoundsElement.js +0 -155
  110. package/src/media/MediaContent.js +0 -328
  111. package/src/media/MidiAudioPlayer.js +0 -254
  112. package/src/media/icons/audio.svg +0 -3
  113. package/src/media/icons/generic.svg +0 -3
  114. package/src/media/icons/mic.svg +0 -3
  115. package/src/media/icons/movie.svg +0 -3
  116. package/src/media/icons/music.svg +0 -3
  117. package/src/media/icons/url.svg +0 -3
  118. package/src/media/sounds/actionError.mp3 +0 -0
  119. package/src/media/sounds/actionOk.mp3 +0 -0
  120. package/src/media/sounds/click.mp3 +0 -0
  121. package/src/media/sounds/finishedError.mp3 +0 -0
  122. package/src/media/sounds/finishedOk.mp3 +0 -0
  123. package/src/media/sounds/start.mp3 +0 -0
  124. package/src/project/JClicProject.js +0 -282
  125. package/src/project/ProjectSettings.js +0 -273
  126. package/src/report/ActionReg.js +0 -123
  127. package/src/report/ActivityReg.js +0 -271
  128. package/src/report/EncryptMin.js +0 -210
  129. package/src/report/Reporter.js +0 -727
  130. package/src/report/SCORM.js +0 -272
  131. package/src/report/SequenceReg.js +0 -275
  132. package/src/report/SessionReg.js +0 -340
  133. package/src/report/SessionStorageReporter.js +0 -131
  134. package/src/report/TCPReporter.js +0 -628
  135. package/src/shapers/ClassicJigSaw.js +0 -138
  136. package/src/shapers/Holes.js +0 -77
  137. package/src/shapers/JigSaw.js +0 -161
  138. package/src/shapers/Rectangular.js +0 -78
  139. package/src/shapers/Shaper.js +0 -386
  140. package/src/shapers/TriangularJigSaw.js +0 -121
  141. package/src/skins/BlueSkin.js +0 -80
  142. package/src/skins/Counter.js +0 -152
  143. package/src/skins/CustomSkin.js +0 -412
  144. package/src/skins/DefaultSkin.js +0 -376
  145. package/src/skins/EmptySkin.js +0 -82
  146. package/src/skins/GreenSkin.js +0 -94
  147. package/src/skins/MiniSkin.js +0 -130
  148. package/src/skins/OrangeSkin.js +0 -78
  149. package/src/skins/SimpleSkin.js +0 -92
  150. package/src/skins/Skin.js +0 -1021
  151. package/src/skins/assets/actionsIcon.svg +0 -3
  152. package/src/skins/assets/appLogo.svg +0 -8
  153. package/src/skins/assets/basic.css +0 -41
  154. package/src/skins/assets/closeDialogIcon.svg +0 -3
  155. package/src/skins/assets/closeIcon.svg +0 -3
  156. package/src/skins/assets/copyIcon.svg +0 -3
  157. package/src/skins/assets/fullScreenExitIcon.svg +0 -3
  158. package/src/skins/assets/fullScreenIcon.svg +0 -3
  159. package/src/skins/assets/infoIcon.svg +0 -3
  160. package/src/skins/assets/main.css +0 -43
  161. package/src/skins/assets/mainHalf.css +0 -23
  162. package/src/skins/assets/mainTwoThirds.css +0 -23
  163. package/src/skins/assets/mini.css +0 -15
  164. package/src/skins/assets/nextIcon.svg +0 -3
  165. package/src/skins/assets/okDialogIcon.svg +0 -3
  166. package/src/skins/assets/prevIcon.svg +0 -3
  167. package/src/skins/assets/reports.css +0 -156
  168. package/src/skins/assets/reportsIcon.svg +0 -3
  169. package/src/skins/assets/scoreIcon.svg +0 -3
  170. package/src/skins/assets/simple.css +0 -16
  171. package/src/skins/assets/simpleHalf.css +0 -11
  172. package/src/skins/assets/simpleTwoThirds.css +0 -11
  173. package/src/skins/assets/timeIcon.svg +0 -4
  174. package/src/skins/assets/waitAnim.css +0 -54
  175. package/src/skins/assets/waitImgBig.svg +0 -3
  176. package/src/skins/assets/waitImgSmall.svg +0 -3
  177. package/webpack.config.mjs +0 -169
@@ -1,376 +0,0 @@
1
- /**
2
- * File : skins/DefaultSkin.js
3
- * Created : 12/05/2015
4
- * By : Francesc Busquets <francesc@gmail.com>
5
- *
6
- * JClic.js
7
- * An HTML5 player of JClic activities
8
- * https://projectestac.github.io/jclic.js
9
- *
10
- * @source https://github.com/projectestac/jclic.js
11
- *
12
- * @license EUPL-1.2
13
- * @licstart
14
- * (c) 2000-2020 Educational Telematic Network of Catalonia (XTEC)
15
- *
16
- * Licensed under the EUPL, Version 1.1 or -as soon they will be approved by
17
- * the European Commission- subsequent versions of the EUPL (the "Licence");
18
- * You may not use this work except in compliance with the Licence.
19
- *
20
- * You may obtain a copy of the Licence at:
21
- * https://joinup.ec.europa.eu/software/page/eupl
22
- *
23
- * Unless required by applicable law or agreed to in writing, software
24
- * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT
25
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
26
- * Licence for the specific language governing permissions and limitations
27
- * under the Licence.
28
- * @licend
29
- * @module
30
- */
31
-
32
- /* global document */
33
-
34
- import $ from 'jquery';
35
- import { Font } from '../AWT.js';
36
- import Skin from './Skin.js';
37
- import ActiveBox from '../boxes/ActiveBox.js';
38
- import Counter from './Counter.js';
39
- import { log, getMsg, getSvg, svgToURI } from '../Utils.js';
40
-
41
- // Use Webpack to import CSS and SVG files
42
- import mainCSS from './assets/main.css';
43
- import mainCSSHalf from './assets/mainHalf.css';
44
- import mainCSSTwoThirds from './assets/mainTwoThirds.css';
45
- import prevIcon from './assets/prevIcon.svg';
46
- import nextIcon from './assets/nextIcon.svg';
47
- import fullScreenIcon from './assets/fullScreenIcon.svg';
48
- import fullScreenExitIcon from './assets/fullScreenExitIcon.svg';
49
- import closeIcon from './assets/closeIcon.svg';
50
- import infoIcon from './assets/infoIcon.svg';
51
- import reportsIcon from './assets/reportsIcon.svg';
52
- import timeIcon from './assets/timeIcon.svg';
53
- import scoreIcon from './assets/scoreIcon.svg';
54
- import actionsIcon from './assets/actionsIcon.svg';
55
-
56
- /**
57
- * This is the default {@link module:skins/Skin.Skin Skin} used by JClic.js
58
- * @extends module:skins/Skin.Skin
59
- */
60
- export class DefaultSkin extends Skin {
61
- /**
62
- * DefaultSkin constructor
63
- * @param {module:JClicPlayer.JClicPlayer} ps - The PlayStation (currently a {@link module:JClicPlayer.JClicPlayer JClicPlayer}) used to load and
64
- * realize the media objects needed tot build the Skin.
65
- * @param {string} [name] - The skin class name
66
- * @param {object} [options] - Optional parameter with additional options, used by subclasses
67
- * this skin. When `null` or `undefined`, a new one will be created.
68
- */
69
- constructor(ps, name = null, options = {}) {
70
- // DefaultSkin extends [Skin](Skin.html)
71
- super(ps, name, options);
72
- let msg = '';
73
-
74
- Font.loadGoogleFonts(this.cssFonts);
75
-
76
- // Create the main container for buttons, counters and message box
77
- this.$ctrlCnt = $('<div/>', { class: 'JClicCtrlCnt unselectableText', role: 'navigation' });
78
- this.$div.append(this.$ctrlCnt);
79
-
80
- // Add `prev` button
81
- msg = getMsg('Previous activity');
82
- this.buttons.prev = $('<button/>', { class: 'JClicBtn', title: msg, 'aria-label': msg })
83
- .append($(getSvg(this.prevIcon, this.iconWidth, this.iconHeight, this.iconFill)))
84
- .on('click', evt => {
85
- if (this.ps)
86
- this.ps.actions.prev.processEvent(evt);
87
- });
88
- this.$ctrlCnt.append(this.buttons.prev);
89
-
90
- // Add message box
91
- this.msgBox = new ActiveBox();
92
- this.msgBox.role = 'message';
93
- this.$msgBoxDiv = $('<div/>', { class: 'JClicMsgBox' })
94
- .on('click', () => {
95
- this.msgBox.playMedia(ps);
96
- return false;
97
- });
98
- this.$ctrlCnt.append(this.$msgBoxDiv);
99
-
100
- // Add `next` button
101
- msg = getMsg('Next activity');
102
- this.buttons.next = $('<button/>', { class: 'JClicBtn', title: msg, 'aria-label': msg })
103
- .append($(getSvg(this.nextIcon, this.iconWidth, this.iconHeight, this.iconFill)))
104
- .on('click', evt => {
105
- if (this.ps)
106
- this.ps.actions.next.processEvent(evt);
107
- });
108
- this.$ctrlCnt.append(this.buttons.next);
109
-
110
- // Add counters
111
- if (false !== this.ps.options.counters && false !== options.counters) {
112
- // Create counters
113
- msg = getMsg('Reports');
114
- const $countCnt = $('<button/>', { class: 'JClicCountCnt', 'aria-label': msg })
115
- .on('click', evt => {
116
- if (this.ps)
117
- this.ps.actions.reports.processEvent(evt);
118
- });
119
- $.each(Skin.prototype.counters, (name, _val) => {
120
- msg = getMsg(name);
121
- this.counters[name] = new Counter(name, $('<div/>', { class: 'JClicCounter', title: msg, 'aria-label': msg })
122
- .css({
123
- 'background-image': `url(${svgToURI(this[name + 'Icon'], this.counterIconWidth, this.counterIconHeight, this.counterIconFill)})`,
124
- color: this.counterIconFill
125
- })
126
- .html('000')
127
- .appendTo($countCnt));
128
- });
129
- this.$ctrlCnt.append($countCnt);
130
- }
131
-
132
- // Add info button
133
- if (true === this.ps.options.info || true === options.info) {
134
- msg = getMsg('Information');
135
- this.buttons.info = $('<button/>', { class: 'JClicBtn', title: msg, 'aria-label': msg })
136
- .append($(getSvg(this.infoIcon, this.iconWidth, this.iconHeight, this.iconFill)))
137
- .on('click', evt => {
138
- if (this.ps)
139
- this.ps.actions.info.processEvent(evt);
140
- });
141
- this.$ctrlCnt.append(this.buttons.info);
142
- }
143
-
144
- // Add reports button
145
- if (true === this.ps.options.reportsBtn || true === options.reportsBtn) {
146
- msg = getMsg('Reports');
147
- this.buttons.about = $('<button/>', { class: 'JClicBtn', title: msg, 'aria-label': msg })
148
- .append($(getSvg(this.reportsIcon, this.iconWidth, this.iconHeight, this.iconFill)))
149
- .on('click', evt => {
150
- if (this.ps)
151
- this.ps.actions.reports.processEvent(evt);
152
- });
153
- this.$ctrlCnt.append(this.buttons.about);
154
- }
155
-
156
- // Add `full screen` button
157
- if (document && document.fullscreenEnabled) {
158
- msg = getMsg('Toggle full screen');
159
- this.buttons.fullscreen = $('<button/>', { class: 'JClicBtn', title: msg, 'aria-label': msg })
160
- .append($('<img/>', { src: svgToURI(this.fullScreenIcon, this.iconWidth, this.iconHeight, this.iconFill) }))
161
- .on('click', () => {
162
- this.setScreenFull(null);
163
- });
164
- this.$ctrlCnt.append(this.buttons.fullscreen);
165
- }
166
-
167
- // Add `close` button
168
- if (typeof this.ps.options.closeFn === 'function') {
169
- msg = getMsg('Close');
170
- const closeFn = this.ps.options.closeFn;
171
- this.buttons.close = $('<button/>', { class: 'JClicBtn', title: msg, 'aria-label': msg })
172
- .append($(getSvg(this.closeIcon, this.iconWidth, this.iconHeight, this.iconFill)))
173
- .on('click', () => {
174
- log('info', 'Closing the player');
175
- closeFn();
176
- });
177
- this.$ctrlCnt.append(this.buttons.close);
178
- }
179
-
180
- // Workaround for a bug in Edge and Explorer: SVG objects not implementing `blur` and `focus` methods
181
- // See: [https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/8479637/]
182
- // This affects Polymer `iron-overlay-behavior`. See: [https://github.com/PolymerElements/iron-overlay-behavior/pull/211]
183
- let nilFunc = null;
184
- $.each(this.buttons, (_key, value) => {
185
- if (value && (typeof value[0].focus !== 'function' || typeof value[0].blur !== 'function')) {
186
- if (nilFunc === null)
187
- nilFunc = () => log('error', '"blur" and "focus" not defined for SVG objects in Explorer/Edge');
188
- value[0].focus = value[0].blur = nilFunc;
189
- }
190
- });
191
- }
192
-
193
- /**
194
- * Returns the CSS styles used by this skin. This method should be called only from
195
- * the `Skin` constructor, and overridded by subclasses if needed.
196
- * @param {string} media - A specific media size. Possible values are: 'default', 'half' and 'twoThirds'
197
- * @returns {string}
198
- */
199
- _getStyleSheets(media = 'default') {
200
- return `${super._getStyleSheets(media)}${media === 'default' ? this.mainCSS : media === 'half' ? this.mainCSSHalf : media === 'twoThirds' ? this.mainCSSTwoThirds : ''}`;
201
- }
202
-
203
- /**
204
- * Main method used to build the content of the skin. Resizes and places internal objects.
205
- * @override
206
- */
207
- doLayout() {
208
- // Call method on ancestor
209
- super.doLayout();
210
-
211
- // Set the fullScreen icon
212
- if (this.buttons.fullscreen)
213
- this.buttons.fullscreen.find('img').get(-1).src = svgToURI(
214
- this[(document && document.fullscreenElement) ? 'fullScreenExitIcon' : 'fullScreenIcon'],
215
- this.iconWidth, this.iconHeight, this.iconFill);
216
- }
217
-
218
- /**
219
- * Enables or disables the `tabindex` attribute of the main buttons. Useful when a modal dialog
220
- * overlay is active, to avoid direct access to controls not related with the dialog.
221
- * @param {boolean} status - `true` to make main controls navigable, `false` otherwise
222
- */
223
- enableMainButtons(status) {
224
- this.$ctrlCnt.find('.JClicBtn,.JClicCountCnt').attr('tabindex', status ? '0' : '-1');
225
- }
226
- }
227
-
228
- Object.assign(DefaultSkin.prototype, {
229
- /**
230
- * Class name of this skin. It will be used as a base selector in the definition of all CSS styles.
231
- * @name module:skins/DefaultSkin.DefaultSkin#skinId
232
- * @override
233
- * @type {string}
234
- */
235
- skinId: 'JClicDefaultSkin',
236
- /**
237
- * The HTML div where buttons, counters and message box are placed
238
- * @name module:skins/DefaultSkin.DefaultSkin#$ctrlCnt
239
- * @type {external:jQuery} */
240
- $ctrlCnt: null,
241
- /**
242
- * Space (pixels) between the components of this {@link module:skins/Skin.Skin Skin}
243
- * @name module:skins/DefaultSkin.DefaultSkin#margin
244
- * @type {number} */
245
- margin: 18,
246
- /**
247
- * Height of {@link module:skins/DefaultSkin.DefaultSkin#msgBox msgBox}
248
- * @name module:skins/DefaultSkin.DefaultSkin#msgBoxHeight
249
- * @type {number} */
250
- msgBoxHeight: 60,
251
- /**
252
- * Width of counters, in pixels
253
- * @name module:skins/DefaultSkin.DefaultSkin#countersWidth
254
- * @type {number} */
255
- countersWidth: 60,
256
- /**
257
- * Height of counters, in pixels
258
- * @name module:skins/DefaultSkin.DefaultSkin#countersHeight
259
- * @type {number} */
260
- countersHeight: 20,
261
- //
262
- //Buttons and other graphical resources used by this skin.
263
- //
264
- /**
265
- * Styles used in this skin
266
- * @name module:skins/DefaultSkin.DefaultSkin#mainCSS
267
- * @type {string} */
268
- mainCSS,
269
- /**
270
- * Styles used in this skin, sized to half its regular size
271
- * @name module:skins/DefaultSkin.DefaultSkin#mainCSSHalf
272
- * @type {string} */
273
- mainCSSHalf,
274
- /**
275
- * Styles used in this skin, sized to two thirds of its regular size
276
- * @name module:skins/DefaultSkin.DefaultSkin#mainCSSTwoThirds
277
- * @type {string} */
278
- mainCSSTwoThirds,
279
- /**
280
- * Fonts used in this skin
281
- * @name module:skins/DefaultSkin.DefaultSkin#cssFonts
282
- * @type {string[]} */
283
- cssFonts: ['Roboto'],
284
- //
285
- // Default settings for icons (can be overridden in subclasses):
286
- /**
287
- * Icon width
288
- * @name module:skins/DefaultSkin.DefaultSkin#iconWidth
289
- * @type {number} */
290
- iconWidth: 36,
291
- /**
292
- * Icon height
293
- * @name module:skins/DefaultSkin.DefaultSkin#iconHeight
294
- * @type {number} */
295
- iconHeight: 36,
296
- /**
297
- * Fill color for icons
298
- * @name module:skins/DefaultSkin.DefaultSkin#iconFill
299
- * @type {string} */
300
- iconFill: '#FFFFFF',
301
- //
302
- // SVG images for action buttons
303
- // Based on [Google Material design Icons](https://google.github.io/material-design-icons/)
304
- //
305
- /**
306
- * Icon for 'previous activity' button
307
- * @name module:skins/DefaultSkin.DefaultSkin#prevIcon
308
- * @type {string} */
309
- prevIcon,
310
- /**
311
- * Icon for 'next activity' button
312
- * @name module:skins/DefaultSkin.DefaultSkin#nextIcon
313
- * @type {string} */
314
- nextIcon,
315
- /**
316
- * Full screen on icon
317
- * @name module:skins/DefaultSkin.DefaultSkin#fullScreenIcon
318
- * @type {string} */
319
- fullScreenIcon,
320
- /**
321
- * Full screen off icon
322
- * @name module:skins/DefaultSkin.DefaultSkin#fullScreenExitIcon
323
- * @type {string} */
324
- fullScreenExitIcon,
325
- /**
326
- * Close button
327
- * @name module:skins/DefaultSkin.DefaultSkin#closeIcon
328
- * @type {string} */
329
- closeIcon,
330
- /**
331
- * Info button
332
- * @name module:skins/DefaultSkin.DefaultSkin#infoIcon
333
- * @type {string} */
334
- infoIcon,
335
- /**
336
- * Reports button
337
- * @name module:skins/DefaultSkin.DefaultSkin#reportsIcon
338
- * @type {string} */
339
- reportsIcon,
340
- //
341
- // Settings for counters:
342
- /**
343
- * Counter icon width
344
- * @name module:skins/DefaultSkin.DefaultSkin#counterIconWidth
345
- * @type {number} */
346
- counterIconWidth: 18,
347
- /**
348
- * Counter icon height
349
- * @name module:skins/DefaultSkin.DefaultSkin#counterIconHeight
350
- * @type {number} */
351
- counterIconHeight: 18,
352
- /**
353
- * Counter icon fill color
354
- * @name module:skins/DefaultSkin.DefaultSkin#counterIconFill
355
- * @type {string} */
356
- counterIconFill: '#FFFFFF',
357
- // Counters:
358
- /**
359
- * Time icon
360
- * @name module:skins/DefaultSkin.DefaultSkin#timeIcon
361
- * @type {string} */
362
- timeIcon,
363
- /**
364
- * Score icon
365
- * @name module:skins/DefaultSkin.DefaultSkin#scoreIcon
366
- * @type {string} */
367
- scoreIcon,
368
- /**
369
- * Actions icon
370
- * @name module:skins/DefaultSkin.DefaultSkin#actionsIcon
371
- * @type {string} */
372
- actionsIcon,
373
- });
374
-
375
- // Register this class in the list of available skins
376
- export default Skin.registerClass('default', DefaultSkin);
@@ -1,82 +0,0 @@
1
- /**
2
- * File : skins/EmptySkin.js
3
- * Created : 14/03/2017
4
- * By : Francesc Busquets <francesc@gmail.com>
5
- *
6
- * JClic.js
7
- * An HTML5 player of JClic activities
8
- * https://projectestac.github.io/jclic.js
9
- *
10
- * @source https://github.com/projectestac/jclic.js
11
- *
12
- * @license EUPL-1.2
13
- * @licstart
14
- * (c) 2000-2020 Educational Telematic Network of Catalonia (XTEC)
15
- *
16
- * Licensed under the EUPL, Version 1.1 or -as soon they will be approved by
17
- * the European Commission- subsequent versions of the EUPL (the "Licence");
18
- * You may not use this work except in compliance with the Licence.
19
- *
20
- * You may obtain a copy of the Licence at:
21
- * https://joinup.ec.europa.eu/software/page/eupl
22
- *
23
- * Unless required by applicable law or agreed to in writing, software
24
- * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT
25
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
26
- * Licence for the specific language governing permissions and limitations
27
- * under the Licence.
28
- * @licend
29
- * @module
30
- */
31
-
32
- import Skin from './Skin.js';
33
- import ActiveBox from '../boxes/ActiveBox.js';
34
-
35
- /**
36
- * A minimalist {@link module:skins/Skin.Skin Skin} for JClic.js with just the player, without messages, counters nor any button.
37
- * @extends module:skins/Skin.Skin
38
- */
39
- export class EmptySkin extends Skin {
40
-
41
- /**
42
- * EmptySkin constructor
43
- *
44
- * @param {module:JClicPlayer.JClicPlayer} ps - The PlayStation (currently a {@link module:JClicPlayer.JClicPlayer JClicPlayer}) used to load and
45
- * realize the media objects needed tot build the Skin.
46
- * @param {string} [name] - The skin class name
47
- * @param {object} [options] - Optional parameter with additional options
48
- */
49
- constructor(ps, name = null, options = {}) {
50
- // EmptySkin extends [Skin](Skin.html)
51
- super(ps, name, options);
52
- this.msgBox = new ActiveBox();
53
- this.msgBox.role = 'message';
54
- }
55
- /**
56
- * Returns the CSS styles used by this skin. This method should be called only from
57
- * the `Skin` constructor, and overridded by subclasses if needed.
58
- * @param {string} media - A specific media size. Possible values are: 'default', 'half' and 'twoThirds'
59
- * @returns {string}
60
- */
61
- _getStyleSheets(media = 'default') {
62
- return super._getStyleSheets(media) + (media === 'default' ? this.mainCSS : '');
63
- }
64
- }
65
-
66
- Object.assign(EmptySkin.prototype, {
67
- /**
68
- * Class name of this skin. It will be used as a base selector in the definition of all CSS styles.
69
- * @name module:skins/EmptySkin.EmptySkin#skinId
70
- * @override
71
- * @type {string} */
72
- skinId: 'JClicEmptySkin',
73
- /**
74
- * Styles used in this skin
75
- * @name module:skins/EmptySkin.EmptySkin#skinCSS
76
- * @override
77
- * @type {string} */
78
- mainCSS: '.ID .JClicPlayerCnt {margin:0;}'
79
- });
80
-
81
- // Register this class in the list of available skins
82
- export default Skin.registerClass('empty', EmptySkin);
@@ -1,94 +0,0 @@
1
- /**
2
- * File : skins/GreenSkin.js
3
- * Created : 04/07/2016
4
- * By : Francesc Busquets <francesc@gmail.com>
5
- *
6
- * JClic.js
7
- * An HTML5 player of JClic activities
8
- * https://projectestac.github.io/jclic.js
9
- *
10
- * @source https://github.com/projectestac/jclic.js
11
- *
12
- * @license EUPL-1.2
13
- * @licstart
14
- * (c) 2000-2020 Educational Telematic Network of Catalonia (XTEC)
15
- *
16
- * Licensed under the EUPL, Version 1.1 or -as soon they will be approved by
17
- * the European Commission- subsequent versions of the EUPL (the "Licence");
18
- * You may not use this work except in compliance with the Licence.
19
- *
20
- * You may obtain a copy of the Licence at:
21
- * https://joinup.ec.europa.eu/software/page/eupl
22
- *
23
- * Unless required by applicable law or agreed to in writing, software
24
- * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT
25
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
26
- * Licence for the specific language governing permissions and limitations
27
- * under the Licence.
28
- * @licend
29
- * @module
30
- */
31
-
32
- import Skin from './Skin.js';
33
- import DefaultSkin from './DefaultSkin.js';
34
-
35
- /**
36
- * This is a variant of the default {@link module:skins/Skin.Skin Skin} used by JClic.js
37
- * It differs from {@link module:skins/DefaultSkin.DefaultSkin DefaultSkin} only in some colors
38
- * @extends module:skins/DefaultSkin.DefaultSkin
39
- */
40
- export class GreenSkin extends DefaultSkin {
41
- /**
42
- * GreenSkin constructor
43
- *
44
- * @param {module:JClicPlayer.JClicPlayer} ps - The PlayStation (currently a {@link module:JClicPlayer.JClicPlayer JClicPlayer}) used to load and
45
- * realize the media objects needed to build this Skin.
46
- * @param {string} [name] - The skin class name
47
- * @param {object} [options] - Optional parameter with additional options
48
- */
49
- constructor(ps, name = null, options = {}) {
50
- // GreenSkin extends [DefaultSkin](DefaultSkin.html)
51
- super(ps, name, options);
52
- }
53
-
54
- /**
55
- * Returns the CSS styles used by this skin. This method should be called only from
56
- * the `Skin` constructor, and overridded by subclasses if needed.
57
- * @param {string} media - A specific media size. Possible values are: 'default', 'half' and 'twoThirds'
58
- * @returns {string}
59
- */
60
- _getStyleSheets(media = 'default') {
61
- return super._getStyleSheets(media) + (media === 'default' ? this.skinCSS : '');
62
- }
63
- }
64
-
65
- Object.assign(GreenSkin.prototype, {
66
- /**
67
- * Class name of this skin. It will be used as a base selector in the definition of all CSS styles.
68
- * @name module:skins/GreenSkin.GreenSkin#skinId
69
- * @override
70
- * @type {string} */
71
- skinId: 'JClicGreenSkin',
72
- //
73
- // Buttons and other graphical resources used by this skin:
74
- /**
75
- * Fill color for icons
76
- * @name module:skins/GreenSkin.GreenSkin#iconFill
77
- * @override
78
- * @type {string} */
79
- iconFill: '#20640E',
80
- /**
81
- * Fill-in color for counters
82
- * @name module:skins/GreenSkin.GreenSkin#counterIconFill
83
- * @override
84
- * @type {string} */
85
- counterIconFill: '#20640E',
86
- /**
87
- * Styles used in this skin
88
- * @name module:skins/GreenSkin.GreenSkin#skinCSS
89
- * @type {string} */
90
- skinCSS: '.ID {background-color:#4AFF19;}'
91
- });
92
-
93
- // Register this class in the list of available skins
94
- export default Skin.registerClass('green', GreenSkin);
@@ -1,130 +0,0 @@
1
- /**
2
- * File : skins/MiniSkin.js
3
- * Created : 05/07/2016
4
- * By : Francesc Busquets <francesc@gmail.com>
5
- *
6
- * JClic.js
7
- * An HTML5 player of JClic activities
8
- * https://projectestac.github.io/jclic.js
9
- *
10
- * @source https://github.com/projectestac/jclic.js
11
- *
12
- * @license EUPL-1.2
13
- * @licstart
14
- * (c) 2000-2020 Educational Telematic Network of Catalonia (XTEC)
15
- *
16
- * Licensed under the EUPL, Version 1.1 or -as soon they will be approved by
17
- * the European Commission- subsequent versions of the EUPL (the "Licence");
18
- * You may not use this work except in compliance with the Licence.
19
- *
20
- * You may obtain a copy of the Licence at:
21
- * https://joinup.ec.europa.eu/software/page/eupl
22
- *
23
- * Unless required by applicable law or agreed to in writing, software
24
- * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT
25
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
26
- * Licence for the specific language governing permissions and limitations
27
- * under the Licence.
28
- * @licend
29
- * @module
30
- */
31
-
32
- import Skin from './Skin.js';
33
- import DefaultSkin from './DefaultSkin.js';
34
-
35
- // Use Webpack to import CSS and SVG files
36
- import skinCSS from './assets/mini.css';
37
-
38
- /**
39
- * This is a variant of the default {@link module:skins/Skin.Skin Skin} used by JClic.js
40
- * It differs from {@link module:skins/DefaultSkin.DefaultSkin DefaultSkin} in colors and sizes
41
- * @extends module:skins/DefaultSkin.DefaultSkin
42
- */
43
- export class MiniSkin extends DefaultSkin {
44
- /**
45
- * MiniSkin constructor
46
- *
47
- * @param {module:JClicPlayer.JClicPlayer} ps - The PlayStation (currently a {@link module:JClicPlayer.JClicPlayer JClicPlayer}) used to load and
48
- * realize the media objects meeded tot build the Skin.
49
- * @param {string} [name] - The skin class name
50
- * @param {object} [options] - Optional parameter with additional options
51
- */
52
- constructor(ps, name = null, options = {}) {
53
- // MiniSkin extends [DefaultSkin](DefaultSkin.html)
54
- super(ps, name, Object.assign({}, options, { counters: false, reportsBtn: true }));
55
- }
56
-
57
- /**
58
- * Returns the CSS styles used by this skin. This method should be called only from
59
- * the `Skin` constructor, and overridded by subclasses if needed.
60
- * @param {string} media - A specific media size. Possible values are: 'default', 'half' and 'twoThirds'
61
- * @returns {string}
62
- */
63
- _getStyleSheets(media = 'default') {
64
- return super._getStyleSheets(media) + (media === 'default' ? this.skinCSS : '');
65
- }
66
- }
67
-
68
- Object.assign(MiniSkin.prototype, {
69
- /**
70
- * Class name of this skin. It will be used as a base selector in the definition of all CSS styles.
71
- * @name MiniSkin#skinId
72
- * @override
73
- * @type {string}
74
- */
75
- skinId: 'JClicMiniSkin',
76
- // Buttons and other graphical resources used by this skin.
77
- //
78
- /**
79
- * Icon width
80
- * @name MiniSkin#iconWidth
81
- * @override
82
- * @type {number} */
83
- iconWidth: 18,
84
- /**
85
- * Icon height
86
- * @name MiniSkin#iconHeight
87
- * @override
88
- * @type {number} */
89
- iconHeight: 18,
90
- /**
91
- * Fill color for icons
92
- * @name MiniSkin#iconFill
93
- * @override
94
- * @type {string} */
95
- iconFill: '#080808',
96
- /**
97
- * Fill-in color for counters
98
- * @name MiniSkin#counterIconFill
99
- * @override
100
- * @type {string} */
101
- counterIconFill: '#080808',
102
- /**
103
- * Default margin between elements
104
- * @name MiniSkin#margin
105
- * @override
106
- * @type {number} */
107
- margin: 8,
108
- /**
109
- * Styles used in this skin
110
- * @name MiniSkin#skinCSS
111
- * @type {string} */
112
- skinCSS,
113
- /**
114
- * Styles used in this skin, sized to half its regular size.
115
- * (_null_ here because MiniSkin it's already very small)
116
- * @name MiniSkin#mainCSSHalf
117
- * @override
118
- * @type {string} */
119
- mainCSSHalf: '',
120
- /**
121
- * Styles used in this skin, sized to two thirds of its regular size
122
- * (_null_ here because MiniSkin it's already very small)
123
- * @name MiniSkin#mainCSSTwoThirds
124
- * @override
125
- * @type {string} */
126
- mainCSSTwoThirds: '',
127
- });
128
-
129
- // Register this class in the list of available skins
130
- export default Skin.registerClass('mini', MiniSkin);