jclic 2.1.21 → 2.1.23

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 (175) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/jclic-node.js +9 -8
  3. package/dist/jclic-node.js.map +1 -1
  4. package/dist/jclic.min.js +2 -2
  5. package/dist/jclic.min.js.map +1 -1
  6. package/package.json +4 -4
  7. package/src/GlobalData.js +1 -1
  8. package/src/JClicPlayer.js +2 -2
  9. package/src/bags/MediaBag.js +6 -5
  10. package/dist/1078.jclic-node.js +0 -282
  11. package/dist/1078.jclic-node.js.map +0 -1
  12. package/dist/1196.jclic-node.js +0 -808
  13. package/dist/1196.jclic-node.js.map +0 -1
  14. package/dist/1253.jclic-node.js +0 -1432
  15. package/dist/1253.jclic-node.js.map +0 -1
  16. package/dist/13.jclic-node.js +0 -103
  17. package/dist/13.jclic-node.js.map +0 -1
  18. package/dist/1567.jclic-node.js +0 -2313
  19. package/dist/1567.jclic-node.js.map +0 -1
  20. package/dist/1588.jclic-node.js +0 -602
  21. package/dist/1588.jclic-node.js.map +0 -1
  22. package/dist/1725.jclic-node.js +0 -836
  23. package/dist/1725.jclic-node.js.map +0 -1
  24. package/dist/1731.jclic-node.js +0 -438
  25. package/dist/1731.jclic-node.js.map +0 -1
  26. package/dist/1842.jclic-node.js +0 -651
  27. package/dist/1842.jclic-node.js.map +0 -1
  28. package/dist/2160.jclic-node.js +0 -1016
  29. package/dist/2160.jclic-node.js.map +0 -1
  30. package/dist/222.jclic-node.js +0 -129
  31. package/dist/222.jclic-node.js.map +0 -1
  32. package/dist/2316.jclic-node.js +0 -949
  33. package/dist/2316.jclic-node.js.map +0 -1
  34. package/dist/2355.jclic-node.js +0 -371
  35. package/dist/2355.jclic-node.js.map +0 -1
  36. package/dist/2366.jclic-node.js +0 -431
  37. package/dist/2366.jclic-node.js.map +0 -1
  38. package/dist/2379.jclic-node.js +0 -202
  39. package/dist/2379.jclic-node.js.map +0 -1
  40. package/dist/2437.jclic-node.js +0 -450
  41. package/dist/2437.jclic-node.js.map +0 -1
  42. package/dist/2531.jclic-node.js +0 -869
  43. package/dist/2531.jclic-node.js.map +0 -1
  44. package/dist/2608.jclic-node.js +0 -160
  45. package/dist/2608.jclic-node.js.map +0 -1
  46. package/dist/2715.jclic-node.js +0 -554
  47. package/dist/2715.jclic-node.js.map +0 -1
  48. package/dist/277.jclic-node.js +0 -22
  49. package/dist/277.jclic-node.js.map +0 -1
  50. package/dist/2921.jclic-node.js +0 -660
  51. package/dist/2921.jclic-node.js.map +0 -1
  52. package/dist/2952.jclic-node.js +0 -101
  53. package/dist/2952.jclic-node.js.map +0 -1
  54. package/dist/3018.jclic-node.js +0 -421
  55. package/dist/3018.jclic-node.js.map +0 -1
  56. package/dist/3019.jclic-node.js +0 -682
  57. package/dist/3019.jclic-node.js.map +0 -1
  58. package/dist/3231.jclic-node.js +0 -274
  59. package/dist/3231.jclic-node.js.map +0 -1
  60. package/dist/331.jclic-node.js +0 -115
  61. package/dist/331.jclic-node.js.map +0 -1
  62. package/dist/3391.jclic-node.js +0 -276
  63. package/dist/3391.jclic-node.js.map +0 -1
  64. package/dist/3502.jclic-node.js +0 -671
  65. package/dist/3502.jclic-node.js.map +0 -1
  66. package/dist/3653.jclic-node.js +0 -982
  67. package/dist/3653.jclic-node.js.map +0 -1
  68. package/dist/371.jclic.min.js +0 -2
  69. package/dist/371.jclic.min.js.map +0 -1
  70. package/dist/3856.jclic-node.js +0 -575
  71. package/dist/3856.jclic-node.js.map +0 -1
  72. package/dist/4112.jclic-node.js +0 -659
  73. package/dist/4112.jclic-node.js.map +0 -1
  74. package/dist/4123.jclic-node.js +0 -910
  75. package/dist/4123.jclic-node.js.map +0 -1
  76. package/dist/427.jclic-node.js +0 -894
  77. package/dist/427.jclic-node.js.map +0 -1
  78. package/dist/4483.jclic-node.js +0 -327
  79. package/dist/4483.jclic-node.js.map +0 -1
  80. package/dist/4548.jclic-node.js +0 -1078
  81. package/dist/4548.jclic-node.js.map +0 -1
  82. package/dist/466.jclic-node.js +0 -99
  83. package/dist/466.jclic-node.js.map +0 -1
  84. package/dist/485.jclic-node.js +0 -783
  85. package/dist/485.jclic-node.js.map +0 -1
  86. package/dist/4921.jclic-node.js +0 -500
  87. package/dist/4921.jclic-node.js.map +0 -1
  88. package/dist/5091.jclic-node.js +0 -239
  89. package/dist/5091.jclic-node.js.map +0 -1
  90. package/dist/520.jclic-node.js +0 -550
  91. package/dist/520.jclic-node.js.map +0 -1
  92. package/dist/5312.jclic-node.js +0 -1126
  93. package/dist/5312.jclic-node.js.map +0 -1
  94. package/dist/5338.jclic-node.js +0 -212
  95. package/dist/5338.jclic-node.js.map +0 -1
  96. package/dist/5344.jclic-node.js +0 -229
  97. package/dist/5344.jclic-node.js.map +0 -1
  98. package/dist/5550.jclic-node.js +0 -238
  99. package/dist/5550.jclic-node.js.map +0 -1
  100. package/dist/5626.jclic-node.js +0 -614
  101. package/dist/5626.jclic-node.js.map +0 -1
  102. package/dist/5977.jclic-node.js +0 -1081
  103. package/dist/5977.jclic-node.js.map +0 -1
  104. package/dist/6148.jclic-node.js +0 -345
  105. package/dist/6148.jclic-node.js.map +0 -1
  106. package/dist/6176.jclic-node.js +0 -481
  107. package/dist/6176.jclic-node.js.map +0 -1
  108. package/dist/6221.jclic-node.js +0 -1072
  109. package/dist/6221.jclic-node.js.map +0 -1
  110. package/dist/6238.jclic-node.js +0 -718
  111. package/dist/6238.jclic-node.js.map +0 -1
  112. package/dist/6454.jclic-node.js +0 -1413
  113. package/dist/6454.jclic-node.js.map +0 -1
  114. package/dist/6565.jclic-node.js +0 -294
  115. package/dist/6565.jclic-node.js.map +0 -1
  116. package/dist/6579.jclic-node.js +0 -719
  117. package/dist/6579.jclic-node.js.map +0 -1
  118. package/dist/6715.jclic-node.js +0 -148
  119. package/dist/6715.jclic-node.js.map +0 -1
  120. package/dist/6777.jclic-node.js +0 -171
  121. package/dist/6777.jclic-node.js.map +0 -1
  122. package/dist/6782.jclic-node.js +0 -1611
  123. package/dist/6782.jclic-node.js.map +0 -1
  124. package/dist/6847.jclic-node.js +0 -601
  125. package/dist/6847.jclic-node.js.map +0 -1
  126. package/dist/6856.jclic-node.js +0 -252
  127. package/dist/6856.jclic-node.js.map +0 -1
  128. package/dist/696.jclic-node.js +0 -1821
  129. package/dist/696.jclic-node.js.map +0 -1
  130. package/dist/698.jclic-node.js +0 -583
  131. package/dist/698.jclic-node.js.map +0 -1
  132. package/dist/704.jclic-node.js +0 -80
  133. package/dist/704.jclic-node.js.map +0 -1
  134. package/dist/7046.jclic-node.js +0 -735
  135. package/dist/7046.jclic-node.js.map +0 -1
  136. package/dist/7220.jclic-node.js +0 -156
  137. package/dist/7220.jclic-node.js.map +0 -1
  138. package/dist/7257.jclic-node.js +0 -931
  139. package/dist/7257.jclic-node.js.map +0 -1
  140. package/dist/743.jclic-node.js +0 -583
  141. package/dist/743.jclic-node.js.map +0 -1
  142. package/dist/757.jclic-node.js +0 -1072
  143. package/dist/757.jclic-node.js.map +0 -1
  144. package/dist/7781.jclic-node.js +0 -202
  145. package/dist/7781.jclic-node.js.map +0 -1
  146. package/dist/7912.jclic-node.js +0 -2103
  147. package/dist/7912.jclic-node.js.map +0 -1
  148. package/dist/827.jclic-node.js +0 -708
  149. package/dist/827.jclic-node.js.map +0 -1
  150. package/dist/8276.jclic-node.js +0 -409
  151. package/dist/8276.jclic-node.js.map +0 -1
  152. package/dist/8322.jclic-node.js +0 -498
  153. package/dist/8322.jclic-node.js.map +0 -1
  154. package/dist/8641.jclic-node.js +0 -360
  155. package/dist/8641.jclic-node.js.map +0 -1
  156. package/dist/8837.jclic-node.js +0 -651
  157. package/dist/8837.jclic-node.js.map +0 -1
  158. package/dist/8895.jclic-node.js +0 -151
  159. package/dist/8895.jclic-node.js.map +0 -1
  160. package/dist/9072.jclic-node.js +0 -1285
  161. package/dist/9072.jclic-node.js.map +0 -1
  162. package/dist/9078.jclic-node.js +0 -935
  163. package/dist/9078.jclic-node.js.map +0 -1
  164. package/dist/9103.jclic-node.js +0 -718
  165. package/dist/9103.jclic-node.js.map +0 -1
  166. package/dist/9359.jclic-node.js +0 -145
  167. package/dist/9359.jclic-node.js.map +0 -1
  168. package/dist/9409.jclic-node.js +0 -921
  169. package/dist/9409.jclic-node.js.map +0 -1
  170. package/dist/9513.jclic-node.js +0 -720
  171. package/dist/9513.jclic-node.js.map +0 -1
  172. package/dist/9704.jclic-node.js +0 -81
  173. package/dist/9704.jclic-node.js.map +0 -1
  174. package/dist/9950.jclic-node.js +0 -827
  175. package/dist/9950.jclic-node.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"6847.jclic-node.js","mappings":";;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACO;AACP;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,iBAAiB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA,YAAY;AACZ;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA,YAAY,SAAS;A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CAAoC,EAAC","sources":["webpack://jclic/./src/skins/Counter.js","webpack://jclic/./src/skins/CustomSkin.js"],"sourcesContent":["/**\n * File : skins/Counter.js\n * Created : 07/05/2015\n * By : Francesc Busquets <francesc@gmail.com>\n *\n * JClic.js\n * An HTML5 player of JClic activities\n * https://projectestac.github.io/jclic.js\n *\n * @source https://github.com/projectestac/jclic.js\n *\n * @license EUPL-1.2\n * @licstart\n * (c) 2000-2020 Educational Telematic Network of Catalonia (XTEC)\n *\n * Licensed under the EUPL, Version 1.1 or -as soon they will be approved by\n * the European Commission- subsequent versions of the EUPL (the \"Licence\");\n * You may not use this work except in compliance with the Licence.\n *\n * You may obtain a copy of the Licence at:\n * https://joinup.ec.europa.eu/software/page/eupl\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the Licence is distributed on an \"AS IS\" basis, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\n * Licence for the specific language governing permissions and limitations\n * under the Licence.\n * @licend\n * @module\n */\n\n/**\n * This class encapsulates the operation of a numeric counter, used to display the current\n * values of score, actions and time.\n */\nexport class Counter {\n /**\n * Counter constructor\n * @param {string} id - The type of information stored on this counter\n * @param {external:jQuery} [$div] - The HTML element where this counter will show values (can be _null_)\n */\n constructor(id, $div) {\n if (id)\n this.id = id;\n if ($div)\n this.$div = $div;\n }\n\n /**\n * Gets the current display value of this counter\n * @returns {number}\n */\n getDisplayValue() {\n let result = this.countDown > 0 ? this.countDown - this.value : this.value;\n if (this.displayDiffFrom)\n result = result - this.displayDiffFrom.value;\n return Math.max(0, Math.min(this.MAX_DISPLAY_VALUE, result));\n }\n\n /**\n * Paints the value of this counter on screen\n * (method to be overridden by subclasses)\n */\n refreshDisplay() {\n if (this.$div)\n this.$div.html(this.enabled ? (this.getDisplayValue() + 1000).toString().substring(1) : '000');\n }\n\n /**\n * Enables or disables this counter\n * @param {boolean} enabled - State been assigned to this counter\n */\n setEnabled(enabled) {\n if (this.enabled !== enabled) {\n this.enabled = enabled;\n if (this.$div) {\n this.refreshDisplay();\n this.$div.css('opacity', this.enabled ? 1.0 : 0.3);\n }\n }\n }\n\n /**\n * Sets the initial value of the counter\n * @param {number} maxValue - Value from which the countdown will start\n */\n setCountDown(maxValue) {\n if (this.countDown !== (this.countDown = maxValue))\n this.refreshDisplay();\n }\n\n /**\n * Increments by one the value of this counter\n */\n incValue() {\n this.value++;\n if (this.enabled)\n this.refreshDisplay();\n }\n\n /**\n * Sets a specific value to this counter\n * @param {number} value - The value to set\n */\n setValue(value) {\n if (this.enabled && this.value !== (this.value = value))\n this.refreshDisplay();\n }\n}\n\nObject.assign(Counter.prototype, {\n /**\n * Type of counter (usually: `score`, `actions` or `time`)\n * @name module:skins/Counter.Counter#id\n * @type {string} */\n id: '',\n /**\n * The HTML element where this counter shows its value\n * @name module:skins/Counter.Counter#$div\n * @type {external:jQuery}\n */\n $div: null,\n /**\n * Current value of this counter\n * @name module:skins/Counter.Counter#value\n * @type {number} */\n value: 0,\n /**\n * When set, the counter displays a countdown from this value to zero\n * @name module:skins/Counter.Counter#countDown\n * @type {number} */\n countDown: 0,\n /**\n * Flag indicating if this counter is currently enabled\n * @name module:skins/Counter.Counter#enabled\n * @type {boolean} */\n enabled: true,\n /**\n * Maximum value to be displayed by this counter\n * @name module:skins/Counter.Counter#MAX_DISPLAY_VALUE\n * @type {number} */\n MAX_DISPLAY_VALUE: 999,\n /**\n * An optional Counter used as a subtractor to display the current value.\n * Useful to display `errors` subtracting `score` from `actions`.\n * @name module:skins/Counter.Counter#displayDiffFrom\n * @type {module:skins/Counter.Counter}\n */\n displayDiffFrom: null,\n});\n\nexport default Counter;\n","/**\n * File : skins/CustomSkin.js\n * Created : 12/02/2018\n * By : Francesc Busquets <francesc@gmail.com>\n *\n * JClic.js\n * An HTML5 player of JClic activities\n * https://projectestac.github.io/jclic.js\n *\n * @source https://github.com/projectestac/jclic.js\n *\n * @license EUPL-1.2\n * @licstart\n * (c) 2000-2020 Educational Telematic Network of Catalonia (XTEC)\n *\n * Licensed under the EUPL, Version 1.1 or -as soon they will be approved by\n * the European Commission- subsequent versions of the EUPL (the \"Licence\");\n * You may not use this work except in compliance with the Licence.\n *\n * You may obtain a copy of the Licence at:\n * https://joinup.ec.europa.eu/software/page/eupl\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the Licence is distributed on an \"AS IS\" basis, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\n * Licence for the specific language governing permissions and limitations\n * under the Licence.\n * @licend\n * @module\n */\n\nimport $ from 'jquery';\nimport Skin from './Skin.js';\nimport Counter from './Counter.js';\nimport { getMsg, checkColor, getImgClipUrl } from '../Utils.js';\nimport { Rectangle } from '../AWT.js';\nimport ActiveBox from '../boxes/ActiveBox.js';\n\n/**\n * Custom {@link module:skins/Skin.Skin Skin} for JClic.js, built assembling specific cuts of a canvas (usually a PNG file) defined in an XML file\n * @extends module:skins/Skin.Skin\n */\nexport class CustomSkin extends Skin {\n\n /**\n * CustomSkin constructor\n *\n * @param {module:JClicPlayer.JClicPlayer} ps - The PlayStation (currently a {@link module:JClicPlayer.JClicPlayer JClicPlayer}) used to load and\n * realize the media objects needed tot build the Skin.\n * @param {string} [name] - The skin class name\n * @param {object} [options] - Optional parameter with additional options\n */\n constructor(ps, name = null, options = null) {\n // CustomSkin extends [Skin](Skin.html)\n super(ps, name, options);\n //console.log(this.options)\n\n this.$mainPanel = $('<div/>', { class: 'JClicCustomMainPanel' });\n this.$gridPanel = $('<div/>', { class: 'JClicGridPanel' });\n for (let i = 0; i < 9; i++)\n this.$gridPanel.append($('<div/>', { class: `JClicCell JClicCell${i + 1}` }));\n this.$mainPanel.append(this.$gridPanel);\n this.$playerCnt.detach().addClass('JClicPlayerCell').appendTo(this.$mainPanel);\n this.$div.prepend(this.$mainPanel);\n\n // Add buttons\n if (options.buttons) {\n Object.keys(options.buttons.button).forEach(k => {\n const k2 = k === 'about' ? 'reports' : k;\n const msg = getMsg(this.msgKeys[k2] || k2);\n this.buttons[k2] = $('<button/>', { class: `JClicBtn JClicTransform Btn-${k2}`, title: msg, 'aria-label': msg, disabled: typeof this.msgKeys[k2] === 'undefined' })\n .on('click', evt => { if (ps.actions[k2]) ps.actions[k2].processEvent(evt); });\n this.$mainPanel.append(this.buttons[k2]);\n });\n }\n\n // Add message box\n if (options.rectangle.messages) {\n this.msgBox = new ActiveBox();\n this.msgBox.role = 'message';\n this.$msgBoxDiv = $('<div/>', { class: 'JClicMsgBox' })\n .on('click', () => {\n this.msgBox.playMedia(ps);\n return false;\n });\n this.$mainPanel.append(this.$msgBoxDiv);\n }\n\n // Add counters\n if (false !== this.ps.options.counters && options.counters && options.counters.counter) {\n $.each(Skin.prototype.counters, (name, _val) => {\n if (options.counters.counter[name]) {\n const msg = getMsg(name);\n this.counters[name] = new Counter(name, $('<div/>', { class: `JClicCounter JClicTransform Counter-${name}`, title: msg, 'aria-label': msg })\n .html('000')\n .appendTo(this.$mainPanel));\n }\n });\n }\n\n // Add progress animation\n if (options.progressAnimation) {\n this.$progressAnimation = $('<div/>', { class: 'JClicProgressAnimation JClicTransform' });\n this.$mainPanel.append(this.$progressAnimation);\n }\n\n }\n\n /**\n * Enables or disables the `tabindex` attribute of the main buttons. Useful when a modal dialog\n * overlay is active, to avoid direct access to controls not related with the dialog.\n * @param {boolean} status - `true` to make main controls navigable, `false` otherwise\n */\n enableMainButtons(status) {\n this.$mainPanel.find('.JClicBtn').attr('tabindex', status ? '0' : '-1');\n }\n\n /**\n * Computes the CSS styles used by this skin in thre moodes: main, half ant twoThirds.\n * The resulting strings will be stored in `cssVariants`\n * @returns {string}\n */\n _computeStyleSheets() {\n const\n maxw = this.options.dimension.preferredSize.width,\n maxh = this.options.dimension.preferredSize.height;\n\n this.twoThirdsMedia = { width: maxw, height: maxh };\n this.halfMedia = {\n width: Math.round(2 * maxw / 3),\n height: Math.round(2 * maxh / 3)\n };\n\n // Panels:\n const\n ph0 = this.options.rectangle.frame.left,\n ph1 = ph0 + this.options.rectangle.player.left,\n ph2 = ph0 + this.options.slicer.left,\n ph3 = ph0 + this.options.slicer.right,\n ph4 = ph1 + this.options.rectangle.player.width,\n ph5 = ph0 + this.options.rectangle.frame.width,\n pv0 = this.options.rectangle.frame.top,\n pv1 = pv0 + this.options.rectangle.player.top,\n pv2 = pv0 + this.options.slicer.top,\n pv3 = pv0 + this.options.slicer.bottom,\n pv4 = pv1 + this.options.rectangle.player.height,\n pv5 = pv0 + this.options.rectangle.frame.height,\n imgElement = this.ps.project.mediaBag.getElement(this.options.image, true),\n imgUrl = imgElement.data && imgElement.data.src ? imgElement.data.src : '',\n box1 = imgElement.data ? getImgClipUrl(imgElement.data, new Rectangle(ph0, pv0, ph2 - ph0, pv2 - pv0)) : '',\n box2 = imgElement.data ? getImgClipUrl(imgElement.data, new Rectangle(ph2 - ph0, pv0, ph3 - ph2, pv2 - pv0)) : '',\n box3 = imgElement.data ? getImgClipUrl(imgElement.data, new Rectangle(ph3, pv0, ph5 - ph3, pv2 - pv0)) : '',\n box4 = imgElement.data ? getImgClipUrl(imgElement.data, new Rectangle(ph0, pv2 - pv0, ph2 - ph0, pv3 - pv2)) : '',\n box6 = imgElement.data ? getImgClipUrl(imgElement.data, new Rectangle(ph3 - ph0, pv2 - pv0, ph5 - ph3, pv3 - pv2)) : '',\n box7 = imgElement.data ? getImgClipUrl(imgElement.data, new Rectangle(ph0, pv3 - pv0, ph2 - ph0, pv5 - pv3)) : '',\n box8 = imgElement.data ? getImgClipUrl(imgElement.data, new Rectangle(ph2 - ph0, pv3 - pv0, ph3 - ph2, pv5 - pv3)) : '',\n box9 = imgElement.data ? getImgClipUrl(imgElement.data, new Rectangle(ph3, pv3 - pv0, ph5 - ph3, pv5 - pv3)) : '';\n\n let css = `\n.ID .JClicCustomMainPanel {flex-grow:1;position:relative;background-color: ${checkColor(this.options.color.fill.value)};}\n.ID .JClicGridPanel {position:absolute;width:100%;height:100%;display:grid;grid-template-columns:${ph2 - ph0}px 1fr ${ph5 - ph3}px;grid-template-rows:${pv2 - pv0}px 1fr ${pv5 - pv3}px;}\n.ID .JClicCell {background-repeat:no-repeat;background-size:contain;}\n.ID .JClicPlayerCell {position:absolute;top:${pv1 - pv0}px;right:${ph5 - ph4}px;bottom:${pv5 - pv4}px;left:${ph1 - ph0}px;}\n.ID .JClicCell1 {background-image:url(${box1});}\n.ID .JClicCell2 {background-image:url(${box2});background-repeat:repeat-x;}\n.ID .JClicCell3 {background-image:url(${box3});}\n.ID .JClicCell4 {background-image:url(${box4});background-repeat:repeat-y;}\n.ID .JClicCell5 {}\n.ID .JClicCell6 {background-image:url(${box6});background-repeat:repeat-y;}\n.ID .JClicCell7 {background-image:url(${box7});}\n.ID .JClicCell8 {background-image:url(${box8});background-repeat:repeat-x;}\n.ID .JClicCell9 {background-image:url(${box9});}`;\n\n let cssHalf = `\n.ID .JClicGridPanel {grid-template-columns:${Math.round((ph2 - ph0) / 2)}px 1fr ${Math.round((ph5 - ph3) / 2)}px;grid-template-rows:${Math.round((pv2 - pv0) / 2)}px 1fr ${Math.round((pv5 - pv3) / 2)}px;}\n.ID .JClicPlayerCell {top:${Math.round((pv1 - pv0) / 2)}px;right:${Math.round((ph5 - ph4) / 2)}px;bottom:${Math.round((pv5 - pv4) / 2)}px;left:${Math.round((ph1 - ph0) / 2)}px;}\n.ID .JClicTransform {transform: scale(0.5);}`;\n\n let cssTwoThirds = `\n.ID .JClicGridPanel {grid-template-columns:${Math.round(2 * (ph2 - ph0) / 3)}px 1fr ${Math.round(2 * (ph5 - ph3) / 3)}px;grid-template-rows:${Math.round(2 * (pv2 - pv0) / 3)}px 1fr ${Math.round(2 * (pv5 - pv3) / 3)}px;}\n.ID .JClicPlayerCell {top:${Math.round(2 * (pv1 - pv0) / 3)}px;right:${Math.round(2 * (ph5 - ph4) / 3)}px;bottom:${Math.round(2 * (pv5 - pv4) / 3)}px;left:${Math.round(2 * (ph1 - ph0) / 3)}px;}\n.ID .JClicTransform {transform: scale(0.666);}`;\n\n // Buttons:\n if (this.options.buttons) {\n const bt = this.options.buttons;\n let wBase = 30, hBase = 30, offsetBase = {};\n if (bt.settings) {\n if (bt.settings.dimension) {\n wBase = bt.settings.dimension.width || wBase;\n hBase = bt.settings.dimension.height || hBase;\n }\n if (bt.settings.offset)\n Object.assign(offsetBase, bt.settings.offset);\n }\n Object.keys(this.options.buttons.button).forEach(k => {\n const\n btn = bt.button[k],\n k2 = k === 'about' ? 'reports' : k;\n let w = wBase, h = hBase, offset = offsetBase;\n if (btn.settings) {\n if (btn.settings.dimension) {\n w = btn.settings.dimension.width || w;\n h = btn.settings.dimension.height || h;\n }\n if (btn.settings.offset)\n offset = Object.assign({}, offsetBase, btn.settings.offset);\n }\n const\n x = btn.point.pos.left,\n xp = x < ph2 ? `left:${x}` : `right:${ph5 - x - w}`,\n xpHalf = x < ph2 ? `left:${Math.round(x / 2 - w / 4)}` : `right:${Math.round((ph5 - x - w) / 2 - w / 4)}`,\n xpTwoThirds = x < ph2 ? `left:${Math.round(2 * x / 3 - w / 6)}` : `right:${Math.round(2 * (ph5 - x - w) / 3 - w / 6)}`,\n y = btn.point.pos.top,\n yp = y < pv2 ? `top:${y}` : `bottom:${pv5 - y - h}`,\n ypHalf = y < pv2 ? `top:${Math.round(y / 2 - h / 4)}` : `bottom:${Math.round((pv5 - y - h) / 2 - h / 4)}`,\n ypTwoThirds = y < pv2 ? `top:${Math.round(2 * y / 3 - h / 6)}` : `bottom:${Math.round(2 * (pv5 - y - h) / 3 - h / 6)}`,\n xs = btn.point.source.left,\n ys = btn.point.source.top;\n css += `.ID .Btn-${k2} {position:absolute;${xp}px;${yp}px;width:${w}px;height:${h}px;background:url(${imgUrl}) !important;background-position:-${xs}px -${ys}px !important;}\\n`;\n cssHalf += `.ID .Btn-${k2} {${xpHalf}px;${ypHalf}px;}\\n`;\n cssTwoThirds += `.ID .Btn-${k2} {${xpTwoThirds}px;${ypTwoThirds}px;}\\n`;\n if (offset.active)\n css += `.ID .Btn-${k2}:active {background-position:-${xs + offset.active.right}px -${ys + offset.active.down}px !important;}\\n`;\n if (offset.over)\n css += `.ID .Btn-${k2}:hover {background-position:-${xs + offset.over.right}px -${ys + offset.over.down}px !important;}\\n`;\n if (offset.disabled)\n css += `.ID .Btn-${k2}:disabled {background-position:-${xs + offset.disabled.right}px -${ys + offset.disabled.down}px !important;}\\n`;\n });\n }\n\n // Counters:\n if (this.options.counters && this.options.counters.settings) {\n const cnt = this.options.counters;\n let wBase = 35, hBase = 20;\n if (cnt.settings.dimension && cnt.settings.dimension.counter) {\n wBase = (cnt.settings.dimension.counter.width || wBase);\n hBase = cnt.settings.dimension.counter.height || hBase;\n }\n let wLb = 37, hLb = 14;\n if (cnt.settings.dimension && cnt.settings.dimension.label) {\n wLb = (cnt.settings.dimension.label.width || wLb);\n hLb = cnt.settings.dimension.label.height || hLb;\n }\n let bColor = 'black';\n if (cnt.style && cnt.style.color && cnt.style.color.foreground)\n bColor = checkColor(cnt.style.color.foreground.value || bColor);\n let lbFntSize = hLb - 4;\n let lbFntFamily = 'Roboto';\n if (cnt.style && cnt.style.font && cnt.style.font.label) {\n lbFntSize = Math.max(8, cnt.style.font.label.size || lbFntSize);\n lbFntFamily = `${cnt.style.font.label.family || 'Roboto'},Roboto,sans-serif`;\n }\n\n css += `.ID .JClicCounter {font-size:${hBase - 2}px;color:${bColor}}\\n`;\n Object.keys(this.options.counters.counter).forEach(k => {\n const\n counter = cnt.counter[k];\n let w = wBase, h = hBase;\n const\n x = counter.point.counter.left,\n xl = counter.point.label.left || (x - Math.round((wLb - wBase) / 2)),\n xp = x < ph2 ? `left:${x}` : `right:${ph5 - x - w}`,\n xpHalf = x < ph2 ? `left:${Math.round(x / 2 - w / 4)}` : `right:${Math.round((ph5 - x - w) / 2 - w / 4)}`,\n xpTwoThirds = x < ph2 ? `left:${Math.round(2 * x / 3 - w / 6)}` : `right:${Math.round(2 * (ph5 - x - w) / 3 - w / 6)}`,\n y = counter.point.counter.top,\n yl = counter.point.label.top || (y - hLb),\n yp = y < pv2 ? `top:${y}` : `bottom:${pv5 - y - h}`,\n ypHalf = y < pv2 ? `top:${Math.round(y / 2 - h / 4)}` : `bottom:${Math.round((pv5 - y - h) / 2 - h / 4)}`,\n ypTwoThirds = y < pv2 ? `top:${Math.round(2 * y / 3 - h / 6)}` : `bottom:${Math.round(2 * (pv5 - y - h) / 3 - h / 6)}`;\n // counter:\n css += `.ID .Counter-${k} {position:absolute;${xp}px;${yp}px;width:${w}px;height:${h}px;line-height:${h}px;}\\n`;\n // label:\n css += `.ID .Counter-${k}:before {content:\"${getMsg(k)}\";font-size:${lbFntSize}px;font-family:${lbFntFamily};width:${wLb}px;height:${hLb}px;line-height:${hLb}px;position:absolute;top:${yl - y}px;left:${xl - x}px;}`;\n // reduced sizes:\n cssHalf += `.ID .Counter-${k} {${xpHalf}px;${ypHalf}px;}\\n`;\n cssTwoThirds += `.ID .Counter-${k} {${xpTwoThirds}px;${ypTwoThirds}px;}\\n`;\n });\n }\n\n // Progress animation:\n if (this.options.progressAnimation) {\n const pa = this.options.progressAnimation;\n let w = 30, h = 30;\n if (pa.dimension) {\n w = pa.dimension.width || w;\n h = pa.dimension.height || h;\n }\n const\n x = pa.point.pos.left,\n xp = x < ph2 ? `left:${x}` : `right:${ph5 - x - w}`,\n xpHalf = x < ph2 ? `left:${Math.round(x / 2 - w / 4)}` : `right:${Math.round((ph5 - x - w) / 2 - w / 4)}`,\n xpTwoThirds = x < ph2 ? `left:${Math.round(2 * x / 3 - w / 6)}` : `right:${Math.round(2 * (ph5 - x - w) / 3 - w / 6)}`,\n y = pa.point.pos.top,\n yp = y < pv2 ? `top:${y}` : `bottom:${pv5 - y - h}`,\n ypHalf = y < pv2 ? `top:${Math.round(y / 2 - h / 4)}` : `bottom:${Math.round((pv5 - y - h) / 2 - h / 4)}`,\n ypTwoThirds = y < pv2 ? `top:${Math.round(2 * y / 3 - h / 6)}` : `bottom:${Math.round(2 * (pv5 - y - h) / 3 - h / 6)}`,\n xs = pa.point.source.left,\n ys = pa.point.source.top;\n css += `.ID .JClicProgressAnimation {position:absolute;${xp}px;${yp}px;width:${w}px;height:${h}px;background:url(${imgUrl});background-position:-${xs}px -${ys}px;}\\n`;\n cssHalf += `.ID .JClicProgressAnimation {${xpHalf}px;${ypHalf}px;}\\n`;\n cssTwoThirds += `.ID .JClicProgressAnimation {${xpTwoThirds}px;${ypTwoThirds}px;}\\n`;\n\n if (pa.frames && pa.direction) {\n const\n dx = (pa.step || w) * (pa.direction === 'right' ? 1 : pa.direction === 'left' ? -1 : 0),\n dy = (pa.step || h) * (pa.direction === 'down' ? 1 : pa.direction === 'up' ? -1 : 0);\n css += `\\n@keyframes anim {100% {background-position:${(xs + dx * pa.frames) * -1}px ${(ys + dy * pa.frames) * -1}px;}}\\n.ID .JClicProgressAnimation {animation: anim ${pa.frames * pa.delay}ms steps(${pa.frames}) infinite;}`;\n }\n }\n\n // Messages box:\n if (this.options.rectangle.messages) {\n const\n bx = this.options.rectangle.messages,\n left = ph0 + bx.left,\n right = ph5 - bx.width - bx.left - ph0,\n tb = bx.top < pv2 ? `top:${bx.top}` : `bottom:${pv5 - bx.height - bx.top}`,\n tbHalf = bx.top < pv2 ? `top:${Math.round(bx.top / 2)}` : `bottom:${Math.round((pv5 - bx.height - bx.top) / 2)}`,\n tbTwoThirds = bx.top < pv2 ? `top:${Math.round(2 * bx.top / 3)}` : `bottom:${Math.round(2 * (pv5 - bx.height - bx.top) / 3)}`;\n\n css += `.ID .JClicMsgBox {position:absolute;left:${left}px;right:${right}px;height:${bx.height}px;${tb}px;}`;\n cssHalf += `.ID .JClicMsgBox {left:${Math.round(left / 2)}px;right:${Math.round(right / 2)}px;height:${Math.round(bx.height / 2)}px;${tbHalf}px;}`;\n cssTwoThirds += `.ID .JClicMsgBox {left:${Math.round(2 * left / 3)}px;right:${Math.round(2 * right / 3)}px;height:${Math.round(2 * bx.height / 3)}px;${tbTwoThirds}px;}`;\n }\n\n // TODO: Implement status messages?\n\n // Store results in `cssVariants`\n this.cssVariants = {\n default: this.mainCSS + css,\n half: cssHalf,\n twoThirds: cssTwoThirds\n };\n }\n\n /**\n * Returns the CSS styles used by this skin. This method should be called only from\n * the `Skin` constructor, and overridded by subclasses if needed.\n * @param {string} media - A specific media size. Possible values are: 'default', 'half' and 'twoThirds'\n * @override\n * @returns {string}\n */\n _getStyleSheets(media = 'default') {\n if (!this.cssVariants)\n this._computeStyleSheets();\n return `${super._getStyleSheets(media)}${this.cssVariants[media] || ''}`;\n }\n\n /**\n * Sets/unsets the 'wait' state\n * @override\n * @param {boolean} status - Whether to set or unset the wait status. When `undefined`, the\n * `waitCursorCount` member is evaluated to decide if the wait state should be activated or deactivated.\n */\n setWaitCursor(status) {\n super.setWaitCursor(status);\n if (this.$progressAnimation)\n this.$progressAnimation.css('animation-play-state', this.waitCursorCount > 0 ? 'running' : 'paused');\n }\n}\n\nObject.assign(CustomSkin.prototype, {\n /**\n * Class name of this skin. It will be used as a base selector in the definition of all CSS styles.\n * @name module:skins/CustomSkin.CustomSkin#skinId\n * @override\n * @type {string} */\n skinId: 'JClicCustomSkin',\n /**\n * The name of the image file to be used as a base of this skin.\n * @name module:skins/CustomSkin.CustomSkin#image\n * @type {string} */\n image: null,\n /**\n * Styles used in this skin\n * @name module:skins/CustomSkin.CustomSkin#skinCSS\n * @override\n * @type {string} */\n mainCSS: '\\\n.ID .JClicPlayerCnt {margin:0;}\\\n.ID .JClicBtn:focus {outline:0;}\\\n.ID .JClicCounter {font-family:Roboto,sans-serif;text-align:center;}',\n /**\n * Specifc styles (`default`, `half` and `twoThirds`) computed at run-time,\n * based on the provided XML file\n * @name module:skins/CustomSkin.CustomSkin#cssVariants\n * @type {object} */\n cssVariants: null,\n /**\n * Key ids of currently supported buttons, associated with its helper literal\n * @name module:skins/CustomSkin.CustomSkin#msgKeys\n * @type {object} */\n msgKeys: {\n next: 'Next activity',\n prev: 'Previous activity',\n info: 'Information',\n help: 'Help',\n reports: 'Reports',\n // TODO: Implement audio on/off!\n audio: 'Audio on/off',\n reset: 'Reset activity',\n },\n /**\n * Graphic indicator of loading progress\n * @name module:skins/CustomSkin.Skin#$progressAnimation\n * @type {external:jQuery} */\n $progressAnimation: null,\n});\n\n// Register this class in the list of available skins\nexport default Skin.registerClass('custom', CustomSkin);\n"],"names":[],"sourceRoot":""}
@@ -1,252 +0,0 @@
1
- "use strict";
2
- exports.id = 6856;
3
- exports.ids = [6856];
4
- exports.modules = {
5
-
6
- /***/ 6856:
7
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
8
-
9
-
10
- // EXPORTS
11
- __webpack_require__.d(__webpack_exports__, {
12
- "default": () => (/* binding */ panels_Menu)
13
- });
14
-
15
- // UNUSED EXPORTS: Menu, MenuPanel
16
-
17
- // EXTERNAL MODULE: external "jquery"
18
- var external_jquery_ = __webpack_require__(7750);
19
- var external_jquery_default = /*#__PURE__*/__webpack_require__.n(external_jquery_);
20
- // EXTERNAL MODULE: ./src/Activity.js
21
- var Activity = __webpack_require__(1567);
22
- // EXTERNAL MODULE: ./src/media/MediaContent.js + 6 modules
23
- var MediaContent = __webpack_require__(2355);
24
- // EXTERNAL MODULE: ./src/Utils.js
25
- var Utils = __webpack_require__(1253);
26
- ;// ./src/activities/panels/icons/ico00.png
27
- const ico00_namespaceObject = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAB1UExURUxpcZVZAGyAAGyAAJVZAJVZAJVZAIhmAJVZAJVZAJVZAIhmAGyAAGyAAGyAAGyAAGyAAJVZAJVZAGyAAJVZANj+AP+ZAMFzAPWSALVsANyEAM57AJ66AOiLALXVAM3xAK1nAI6oAIabAJWwAMTnAKFgAGyAAIlz9xYAAAAVdFJOUwB9oCIiZpkRRKq7M4BVu9VmVd1EzJvdA7gAAAE0SURBVDjLjZPZkoMgEEVFFsHdZBQR3M38/ycOKQ1gJKnpV051nwtNEPyrsjBNom9AqNSapxn8CBRjXY+DmjXkbQSXeq9tWJe7ByhVberXqzCY8yGM6GVK9FQ4SpVUxAwnJ+A+2wkLBLLppYgJRgZIrcJYBKxvdLUdFzE4mHBzFNDUvKoVdFfI7YQ1q7gD7LowXNRwaM4R6AzQEXNRWZrPT2jLA9YaQOIXQHV0WIbFvKZImPNGmLCMCwY0lJQQS6vAzEXFjY7Of5iORXwKySHe8+kWWwVeGQUnmW3QTMgDONUbhQ+ABAZwozkTqH1Ox8za3Jz3drLZDMABquuM9nFaKXZpwfFpp+j0ZiHJ21pifiIkQ++Lix+9nc+Z5/tQwrt2fxEBvN8vooQJLgTDX74xSi6z/wAoQC7hWsslMgAAAABJRU5ErkJggg==";
28
- ;// ./src/activities/panels/icons/ico01.png
29
- const ico01_namespaceObject = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAByUExURUxpcfzZt/rfw/pycvrcv/3UrJqf/QAAAP/hxPvOov9sbPqFhYmN/f7nz3V4+/3ky/+AgPrIl11g/P/Klf+Kiv9XV//q1vtHR/rCim1w//pcXISI//tfX5WY/VNT///Dh/86OvwhISUl/js7+klM+vq6e8H/VfEAAAABdFJOUwBA5thmAAABGElEQVQ4y62T23aCMBBFiU48iQlELoJW7b3//4udBIi0MqsvDU+w95yEGSiK/15YrlVhd1+C8Nk05+ribzcvCJlXklBV3u/8pToLAnMk3kiCh0Hkz4LA/NSC+YcgANTWYP4OqVGmtmAuC2St2Mn4EMbq9TaPvABpDborD+OB0QqG8hbo3HTNAikFCtEZBTcMx+t+ewC2U4IyMAFUTgVd5nukHYlrqYcxSBlw15k/gTlXx/ySPT5NLOkyP7IQq0PoOd/wSZLgmLtD5AMLsS70ZbnZEL+LTQmZv6aEQIkrpTUlwWX+FhNCyNzaOiVkHgXODyHzFr87ye/3g+NxGrTgJ6zNa8nXJ04zf4Ew88ylr8KM/At//sB88w0/sBcK3bRRzgAAAABJRU5ErkJggg==";
30
- ;// ./src/activities/panels/icons/ico02.png
31
- const ico02_namespaceObject = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAtUExURUxpcQAAAP///8zMzJmZmfrdwP/hxPvOov3UrP3JlvzZt/zlzf/p0/zBh/rDjUN28cYAAAABdFJOUwBA5thmAAAAyklEQVQ4y6WT6w6DIAxG/YS2XHTv/7grLshF0C1r+KE5n6fFpMvybQHt6bldbXfQcazNsTD4MdCV+S+AQcBUBYa5M4BfHrcB8oNA08HLg0EeAiwOuGtBzoE0Mje4AO4S7QwhgDhlZrcISiNoqxzFoGbSb5Uyozhs4ckdD4M+OfQtUmeKcUsGnaQEyoSp/6YJIr2LXAPqp4OH4BzJtUXyZy7iBwbl8eSDALUc/Z/Sv1DxHfVm5ao5hjtIme+YbOnJMdlj/vCJoB5HX97wIgms7CtjdwAAAABJRU5ErkJggg==";
32
- ;// ./src/activities/panels/icons/ico03.png
33
- const ico03_namespaceObject = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAwUExURUxpcQAAAPrdwP/hxP7mz/8AAAAAmfvOov3UrAAA//3JlvzZtwCZAP8A//zCifq6e7UN6GsAAAABdFJOUwBA5thmAAABA0lEQVQ4y5WS2RbDIAhEHdyTJv3/vy2osVj1oR6zeYcBDcb8NV6v9fp1NV7mgq8cMs/cDWYHhrmomsM1pcj9pgS7FL3IZ6AI8nazsCiCnPOG3wf0QpArfDnoGATC6mwc9oi/AtMFgAFFLQhDCuZcQ0yAMghB+cuNUgJpSVM1zg7phGUFpv3VFdB5gqxolpwdTqYO5EaPJ57PgWOZWgvt0bl4u+LAbwmzv0Q7JxquJM2FSpwTBRHvRU7Mey/E16f4FwfeSkpUBD26CIQ+PMajODTmaw0Dr7/V1zRVQCNvAvNw6QbFb5iWwvRaWKE4Vh3H/6LxG+ueROfYdXXlb+zavg/++ADYLwfSmmk9oQAAAABJRU5ErkJggg==";
34
- ;// ./src/activities/panels/icons/icofolder.png
35
- const icofolder_namespaceObject = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAnUExURUxpcffvhP///2VlZczMZv//zPf39+/nc8zMzDMzmZmZZrW1tbWttcl3sA0AAAABdFJOUwBA5thmAAAAgklEQVQ4y9WSQQ6AIAwEsVtFwf+/14JGbcHeTHSuO9kFQggfBE8BFwLR+mBwFGYSZvh53zjzZTdkLTXCkS/ViDHBCLe8Gla48qpkGEHl+8pdYJo0yOouPA2GhLLiCCyC28DIcAXZ0IfsVKS3BTGUMDas0E9NfkO/ovmQBv2v0BJ+xAaYuQX2hCJNtwAAAABJRU5ErkJggg==";
36
- ;// ./src/activities/panels/Menu.js
37
- /**
38
- * File : activities/panels/Menu.js
39
- * Created : 20/07/2017
40
- * By : Francesc Busquets <francesc@gmail.com>
41
- *
42
- * JClic.js
43
- * An HTML5 player of JClic activities
44
- * https://projectestac.github.io/jclic.js
45
- *
46
- * @source https://github.com/projectestac/jclic.js
47
- *
48
- * @license EUPL-1.2
49
- * @licstart
50
- * (c) 2000-2020 Educational Telematic Network of Catalonia (XTEC)
51
- *
52
- * Licensed under the EUPL, Version 1.1 or -as soon they will be approved by
53
- * the European Commission- subsequent versions of the EUPL (the "Licence");
54
- * You may not use this work except in compliance with the Licence.
55
- *
56
- * You may obtain a copy of the Licence at:
57
- * https://joinup.ec.europa.eu/software/page/eupl
58
- *
59
- * Unless required by applicable law or agreed to in writing, software
60
- * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT
61
- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
62
- * Licence for the specific language governing permissions and limitations
63
- * under the Licence.
64
- * @licend
65
- * @module
66
- */
67
-
68
-
69
-
70
-
71
-
72
-
73
- // Use Webpack to import PNG files
74
-
75
-
76
-
77
-
78
-
79
-
80
- /**
81
- * This class of {@link module:Activity.Activity Activity} is only used in legacy JClic project libraries. It contains
82
- * one or more buttons pointing to specific JClic projects or to other `Menu` activity panels.
83
- * @extends module:Activity.Activity
84
- */
85
- class Menu extends Activity/* Activity */.I {
86
- /**
87
- * Menu constructor
88
- * @param {module:project/JClicProject.JClicProject} project - The {@link module:project/JClicProject.JClicProject JClicProject} to which this activity belongs
89
- */
90
- constructor(project) {
91
- super(project);
92
- this.menuElements = [];
93
- // This kind of activities are not reported
94
- this.includeInReports = false;
95
- this.reportActions = false;
96
- }
97
- }
98
-
99
- /**
100
- * The {@link module:Activity.ActivityPanel ActivityPanel} where Menu will show its content.
101
- * @extends module:Activity.ActivityPanel
102
- */
103
- class MenuPanel extends Activity/* ActivityPanel */.S {
104
- /**
105
- * MenuPanel constructor
106
- * @param {module:Activity.Activity} act - The {@link module:Activity.Activity Activity} to which this Panel belongs
107
- * @param {module:JClicPlayer.JClicPlayer} ps - Any object implementing the methods defined in the
108
- * [PlayStation](http://projectestac.github.io/jclic/apidoc/edu/xtec/jclic/PlayStation.html) Java interface.
109
- * @param {external:jQuery} [$div] - The jQuery DOM element where this Panel will deploy
110
- */
111
- constructor(act, ps, $div) {
112
- super(act, ps, $div);
113
- // This kind of activity will always clean the "last project skin" setting
114
- ps.lastProjectSkin = null;
115
- }
116
-
117
- /**
118
- * Prepares the visual components of the activity
119
- * @override
120
- */
121
- buildVisualComponents() {
122
- if (this.firstRun)
123
- super.buildVisualComponents();
124
- // This `div` will contain the action buttons
125
- const $btnDiv = external_jquery_default()('<div/>').css({
126
- 'width': '100%',
127
- 'max-height': '100%',
128
- 'position': 'absolute',
129
- 'top': '50%',
130
- 'transform': 'translateY(-50%)',
131
- 'display': 'flex',
132
- 'flex-wrap': 'wrap',
133
- 'overflow-y': 'auto',
134
- 'place-content': 'center',
135
- 'overflow-y': 'auto'
136
- });
137
- this.act.menuElements.forEach((me) => {
138
- // Create a button for each menu element
139
- const caption = me.description || me.caption || 'JClic';
140
- const $btn = external_jquery_default()('<button/>', {
141
- class: 'StockBtn',
142
- title: caption,
143
- 'aria-label': caption
144
- }).css({
145
- 'min-width': '80px',
146
- 'max-width': '200px',
147
- 'min-height': '80px',
148
- 'margin': '4px',
149
- 'padding': '4px',
150
- 'display': 'flex',
151
- 'flex-direction': 'column',
152
- 'justify-content': 'center',
153
- 'align-items': 'center'
154
- });
155
-
156
- // Set the button icon
157
- const
158
- iconSrc = MenuPanel.icons[me.icon || '@ico00.png'],
159
- $img = external_jquery_default()('<img/>', { src: iconSrc || '' }).css({
160
- 'max-width': '180px',
161
- 'max-height': '100px',
162
- 'margin': '4px'
163
- });
164
- if (!iconSrc) {
165
- // It's not a stock image, so load `src` when available
166
- const mbe = this.act.project.mediaBag.getElement(me.icon, true);
167
- mbe.getFullPathPromise().then(imgFullPath => $img.attr('src', imgFullPath));
168
- }
169
- $btn.append($img);
170
-
171
- // Set the button text
172
- $btn.append(external_jquery_default()('<span/>').css({
173
- 'max-width': '180px',
174
- 'overflow': 'hidden',
175
- 'white-space': 'nowrap',
176
- 'text-overflow': 'ellipsis'
177
- }).html(me.caption));
178
-
179
- // Set a click listener method
180
- // $btn.on('click', function...) does not work!
181
- $btn[0].addEventListener('click', (ev) => {
182
- const mc = new MediaContent["default"](me.projectPath ? 'RUN_CLIC_PACKAGE' : 'RUN_CLIC_ACTIVITY', me.sequence);
183
- if (me.projectPath)
184
- mc.externalParam = me.projectPath;
185
- (0,Utils/* log */.Rm)('info', `Launching ${me.projectPath || ''} ${me.sequence || ''}`);
186
- this.ps.playMedia(mc);
187
- ev.preventDefault();
188
- });
189
-
190
- // Place the created button on the container
191
- $btnDiv.append($btn);
192
- });
193
-
194
- // Add the buttons container on the main panel `div`
195
- this.$div.empty().append($btnDiv);
196
- }
197
-
198
- /**
199
- * Sets the real dimension of this panel.
200
- * @override
201
- * @param {module:AWT.Dimension} preferredMaxSize - The maximum surface available for the activity panel
202
- * @returns {module:AWT.Dimension}
203
- */
204
- setDimension(preferredMaxSize) {
205
- return preferredMaxSize;
206
- }
207
-
208
- /**
209
- * Basic initialization procedure
210
- * @override
211
- */
212
- initActivity() {
213
- super.initActivity();
214
-
215
- if (!this.firstRun)
216
- this.buildVisualComponents();
217
- else
218
- this.firstRun = false;
219
-
220
- this.setAndPlayMsg('initial', 'start');
221
- this.playing = true;
222
- }
223
- }
224
-
225
- /**
226
- * Default icons used in buttons, inherited from JClic
227
- * @type {object}
228
- */
229
- MenuPanel.icons = {
230
- '@ico00.png': ico00_namespaceObject,
231
- '@ico01.png': ico01_namespaceObject,
232
- '@ico02.png': ico02_namespaceObject,
233
- '@ico03.png': ico03_namespaceObject,
234
- '@icofolder.png': icofolder_namespaceObject,
235
- };
236
-
237
- /**
238
- * Panel class associated to this type of activity: {@link module:activities/panels/Menu.MenuPanel MenuPanel}
239
- * @type {class} */
240
- Menu.Panel = MenuPanel;
241
-
242
- // Register activity class
243
- /* harmony default export */ const panels_Menu = (Activity/* Activity */.I.registerClass('@panels.Menu', Menu));
244
-
245
-
246
-
247
-
248
- /***/ })
249
-
250
- };
251
- ;
252
- //# sourceMappingURL=6856.jclic-node.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"6856.jclic-node.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEuB;AACqC;AACL;AAClB;;AAErC;AACsC;AACA;AACA;AACA;AACQ;;AAE9C;AACA,kBAAkB,yCAAyC;AAC3D;AACA;AACA;AACO,mBAAmB,wBAAQ;AAClC;AACA;AACA,aAAa,0CAA0C,eAAe,6DAA6D;AACnI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,QAAQ,mDAAmD;AAC3D;AACA;AACO,wBAAwB,6BAAa;AAC5C;AACA;AACA,aAAa,0BAA0B,WAAW,yCAAyC;AAC3F,aAAa,gCAAgC;AAC7C;AACA,aAAa,iBAAiB;AAC9B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,yBAAC;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,mBAAmB,yBAAC;AACpB;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA,eAAe,yBAAC,aAAa,oBAAoB;AACjD;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,kBAAkB,yBAAC;AACnB;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;AACA,uBAAuB,uBAAY;AACnC;AACA;AACA,QAAQ,qBAAG,sBAAsB,sBAAsB,EAAE,kBAAkB;AAC3E;AACA;AACA,OAAO;;AAEP;AACA;AACA,KAAK;;AAEL;AACA;AACA;;AAEA;AACA;AACA;AACA,aAAa,sBAAsB;AACnC,eAAe;AACf;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAU;AACV;AACA;AACA,gBAAgB,qBAAK;AACrB,gBAAgB,qBAAK;AACrB,gBAAgB,qBAAK;AACrB,gBAAgB,qBAAK;AACrB,oBAAoB,yBAAS;AAC7B;;AAEA;AACA,qDAAqD;AACrD,UAAU,OAAO;AACjB;;AAEA;AACA,kDAAe,wBAAQ,oCAAoC,EAAC","sources":["webpack://jclic/./src/activities/panels/Menu.js"],"sourcesContent":["/**\n * File : activities/panels/Menu.js\n * Created : 20/07/2017\n * By : Francesc Busquets <francesc@gmail.com>\n *\n * JClic.js\n * An HTML5 player of JClic activities\n * https://projectestac.github.io/jclic.js\n *\n * @source https://github.com/projectestac/jclic.js\n *\n * @license EUPL-1.2\n * @licstart\n * (c) 2000-2020 Educational Telematic Network of Catalonia (XTEC)\n *\n * Licensed under the EUPL, Version 1.1 or -as soon they will be approved by\n * the European Commission- subsequent versions of the EUPL (the \"Licence\");\n * You may not use this work except in compliance with the Licence.\n *\n * You may obtain a copy of the Licence at:\n * https://joinup.ec.europa.eu/software/page/eupl\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the Licence is distributed on an \"AS IS\" basis, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\n * Licence for the specific language governing permissions and limitations\n * under the Licence.\n * @licend\n * @module\n */\n\nimport $ from 'jquery';\nimport { Activity, ActivityPanel } from '../../Activity.js';\nimport MediaContent from '../../media/MediaContent.js';\nimport { log } from '../../Utils.js';\n\n// Use Webpack to import PNG files\nimport ico00 from './icons/ico00.png';\nimport ico01 from './icons/ico01.png';\nimport ico02 from './icons/ico02.png';\nimport ico03 from './icons/ico03.png';\nimport icoFolder from './icons/icofolder.png';\n\n/**\n * This class of {@link module:Activity.Activity Activity} is only used in legacy JClic project libraries. It contains\n * one or more buttons pointing to specific JClic projects or to other `Menu` activity panels.\n * @extends module:Activity.Activity\n */\nexport class Menu extends Activity {\n /**\n * Menu constructor\n * @param {module:project/JClicProject.JClicProject} project - The {@link module:project/JClicProject.JClicProject JClicProject} to which this activity belongs\n */\n constructor(project) {\n super(project);\n this.menuElements = [];\n // This kind of activities are not reported\n this.includeInReports = false;\n this.reportActions = false;\n }\n}\n\n/**\n * The {@link module:Activity.ActivityPanel ActivityPanel} where Menu will show its content.\n * @extends module:Activity.ActivityPanel\n */\nexport class MenuPanel extends ActivityPanel {\n /**\n * MenuPanel constructor\n * @param {module:Activity.Activity} act - The {@link module:Activity.Activity Activity} to which this Panel belongs\n * @param {module:JClicPlayer.JClicPlayer} ps - Any object implementing the methods defined in the\n * [PlayStation](http://projectestac.github.io/jclic/apidoc/edu/xtec/jclic/PlayStation.html) Java interface.\n * @param {external:jQuery} [$div] - The jQuery DOM element where this Panel will deploy\n */\n constructor(act, ps, $div) {\n super(act, ps, $div);\n // This kind of activity will always clean the \"last project skin\" setting\n ps.lastProjectSkin = null;\n }\n\n /**\n * Prepares the visual components of the activity\n * @override\n */\n buildVisualComponents() {\n if (this.firstRun)\n super.buildVisualComponents();\n // This `div` will contain the action buttons\n const $btnDiv = $('<div/>').css({\n 'width': '100%',\n 'max-height': '100%',\n 'position': 'absolute',\n 'top': '50%',\n 'transform': 'translateY(-50%)',\n 'display': 'flex',\n 'flex-wrap': 'wrap',\n 'overflow-y': 'auto',\n 'place-content': 'center',\n 'overflow-y': 'auto'\n });\n this.act.menuElements.forEach((me) => {\n // Create a button for each menu element\n const caption = me.description || me.caption || 'JClic';\n const $btn = $('<button/>', {\n class: 'StockBtn',\n title: caption,\n 'aria-label': caption\n }).css({\n 'min-width': '80px',\n 'max-width': '200px',\n 'min-height': '80px',\n 'margin': '4px',\n 'padding': '4px',\n 'display': 'flex',\n 'flex-direction': 'column',\n 'justify-content': 'center',\n 'align-items': 'center'\n });\n\n // Set the button icon\n const\n iconSrc = MenuPanel.icons[me.icon || '@ico00.png'],\n $img = $('<img/>', { src: iconSrc || '' }).css({\n 'max-width': '180px',\n 'max-height': '100px',\n 'margin': '4px'\n });\n if (!iconSrc) {\n // It's not a stock image, so load `src` when available\n const mbe = this.act.project.mediaBag.getElement(me.icon, true);\n mbe.getFullPathPromise().then(imgFullPath => $img.attr('src', imgFullPath));\n }\n $btn.append($img);\n\n // Set the button text\n $btn.append($('<span/>').css({\n 'max-width': '180px',\n 'overflow': 'hidden',\n 'white-space': 'nowrap',\n 'text-overflow': 'ellipsis'\n }).html(me.caption));\n\n // Set a click listener method\n // $btn.on('click', function...) does not work!\n $btn[0].addEventListener('click', (ev) => {\n const mc = new MediaContent(me.projectPath ? 'RUN_CLIC_PACKAGE' : 'RUN_CLIC_ACTIVITY', me.sequence);\n if (me.projectPath)\n mc.externalParam = me.projectPath;\n log('info', `Launching ${me.projectPath || ''} ${me.sequence || ''}`);\n this.ps.playMedia(mc);\n ev.preventDefault();\n });\n\n // Place the created button on the container\n $btnDiv.append($btn);\n });\n\n // Add the buttons container on the main panel `div`\n this.$div.empty().append($btnDiv);\n }\n\n /**\n * Sets the real dimension of this panel.\n * @override\n * @param {module:AWT.Dimension} preferredMaxSize - The maximum surface available for the activity panel\n * @returns {module:AWT.Dimension}\n */\n setDimension(preferredMaxSize) {\n return preferredMaxSize;\n }\n\n /**\n * Basic initialization procedure\n * @override\n */\n initActivity() {\n super.initActivity();\n\n if (!this.firstRun)\n this.buildVisualComponents();\n else\n this.firstRun = false;\n\n this.setAndPlayMsg('initial', 'start');\n this.playing = true;\n }\n}\n\n/**\n * Default icons used in buttons, inherited from JClic\n * @type {object}\n */\nMenuPanel.icons = {\n '@ico00.png': ico00,\n '@ico01.png': ico01,\n '@ico02.png': ico02,\n '@ico03.png': ico03,\n '@icofolder.png': icoFolder,\n};\n\n/**\n * Panel class associated to this type of activity: {@link module:activities/panels/Menu.MenuPanel MenuPanel}\n * @type {class} */\nMenu.Panel = MenuPanel;\n\n// Register activity class\nexport default Activity.registerClass('@panels.Menu', Menu);\n\n\n"],"names":[],"sourceRoot":""}