jclic 2.1.20 → 2.1.21
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/CHANGELOG.md +13 -6
- package/dist/1078.jclic-node.js +282 -0
- package/dist/1078.jclic-node.js.map +1 -0
- package/dist/1196.jclic-node.js +808 -0
- package/dist/1196.jclic-node.js.map +1 -0
- package/dist/1253.jclic-node.js +1432 -0
- package/dist/1253.jclic-node.js.map +1 -0
- package/dist/13.jclic-node.js +103 -0
- package/dist/13.jclic-node.js.map +1 -0
- package/dist/1567.jclic-node.js +2313 -0
- package/dist/1567.jclic-node.js.map +1 -0
- package/dist/1588.jclic-node.js +602 -0
- package/dist/1588.jclic-node.js.map +1 -0
- package/dist/1725.jclic-node.js +836 -0
- package/dist/1725.jclic-node.js.map +1 -0
- package/dist/1731.jclic-node.js +438 -0
- package/dist/1731.jclic-node.js.map +1 -0
- package/dist/1842.jclic-node.js +651 -0
- package/dist/1842.jclic-node.js.map +1 -0
- package/dist/2160.jclic-node.js +1016 -0
- package/dist/2160.jclic-node.js.map +1 -0
- package/dist/222.jclic-node.js +129 -0
- package/dist/222.jclic-node.js.map +1 -0
- package/dist/2316.jclic-node.js +949 -0
- package/dist/2316.jclic-node.js.map +1 -0
- package/dist/2355.jclic-node.js +371 -0
- package/dist/2355.jclic-node.js.map +1 -0
- package/dist/2366.jclic-node.js +431 -0
- package/dist/2366.jclic-node.js.map +1 -0
- package/dist/2379.jclic-node.js +202 -0
- package/dist/2379.jclic-node.js.map +1 -0
- package/dist/2437.jclic-node.js +450 -0
- package/dist/2437.jclic-node.js.map +1 -0
- package/dist/2531.jclic-node.js +869 -0
- package/dist/2531.jclic-node.js.map +1 -0
- package/dist/2608.jclic-node.js +160 -0
- package/dist/2608.jclic-node.js.map +1 -0
- package/dist/2715.jclic-node.js +554 -0
- package/dist/2715.jclic-node.js.map +1 -0
- package/dist/277.jclic-node.js +22 -0
- package/dist/277.jclic-node.js.map +1 -0
- package/dist/2921.jclic-node.js +660 -0
- package/dist/2921.jclic-node.js.map +1 -0
- package/dist/2952.jclic-node.js +101 -0
- package/dist/2952.jclic-node.js.map +1 -0
- package/dist/3018.jclic-node.js +421 -0
- package/dist/3018.jclic-node.js.map +1 -0
- package/dist/3019.jclic-node.js +682 -0
- package/dist/3019.jclic-node.js.map +1 -0
- package/dist/3231.jclic-node.js +274 -0
- package/dist/3231.jclic-node.js.map +1 -0
- package/dist/331.jclic-node.js +115 -0
- package/dist/331.jclic-node.js.map +1 -0
- package/dist/3391.jclic-node.js +276 -0
- package/dist/3391.jclic-node.js.map +1 -0
- package/dist/3502.jclic-node.js +671 -0
- package/dist/3502.jclic-node.js.map +1 -0
- package/dist/3653.jclic-node.js +982 -0
- package/dist/3653.jclic-node.js.map +1 -0
- package/dist/371.jclic.min.js +2 -0
- package/dist/371.jclic.min.js.map +1 -0
- package/dist/3856.jclic-node.js +575 -0
- package/dist/3856.jclic-node.js.map +1 -0
- package/dist/4112.jclic-node.js +659 -0
- package/dist/4112.jclic-node.js.map +1 -0
- package/dist/4123.jclic-node.js +910 -0
- package/dist/4123.jclic-node.js.map +1 -0
- package/dist/427.jclic-node.js +894 -0
- package/dist/427.jclic-node.js.map +1 -0
- package/dist/4483.jclic-node.js +327 -0
- package/dist/4483.jclic-node.js.map +1 -0
- package/dist/4548.jclic-node.js +1078 -0
- package/dist/4548.jclic-node.js.map +1 -0
- package/dist/466.jclic-node.js +99 -0
- package/dist/466.jclic-node.js.map +1 -0
- package/dist/485.jclic-node.js +783 -0
- package/dist/485.jclic-node.js.map +1 -0
- package/dist/4921.jclic-node.js +500 -0
- package/dist/4921.jclic-node.js.map +1 -0
- package/dist/5091.jclic-node.js +239 -0
- package/dist/5091.jclic-node.js.map +1 -0
- package/dist/520.jclic-node.js +550 -0
- package/dist/520.jclic-node.js.map +1 -0
- package/dist/5312.jclic-node.js +1126 -0
- package/dist/5312.jclic-node.js.map +1 -0
- package/dist/5338.jclic-node.js +212 -0
- package/dist/5338.jclic-node.js.map +1 -0
- package/dist/5344.jclic-node.js +229 -0
- package/dist/5344.jclic-node.js.map +1 -0
- package/dist/5550.jclic-node.js +238 -0
- package/dist/5550.jclic-node.js.map +1 -0
- package/dist/5626.jclic-node.js +614 -0
- package/dist/5626.jclic-node.js.map +1 -0
- package/dist/5977.jclic-node.js +1081 -0
- package/dist/5977.jclic-node.js.map +1 -0
- package/dist/6148.jclic-node.js +345 -0
- package/dist/6148.jclic-node.js.map +1 -0
- package/dist/6176.jclic-node.js +481 -0
- package/dist/6176.jclic-node.js.map +1 -0
- package/dist/6221.jclic-node.js +1072 -0
- package/dist/6221.jclic-node.js.map +1 -0
- package/dist/6238.jclic-node.js +718 -0
- package/dist/6238.jclic-node.js.map +1 -0
- package/dist/6454.jclic-node.js +1413 -0
- package/dist/6454.jclic-node.js.map +1 -0
- package/dist/6565.jclic-node.js +294 -0
- package/dist/6565.jclic-node.js.map +1 -0
- package/dist/6579.jclic-node.js +719 -0
- package/dist/6579.jclic-node.js.map +1 -0
- package/dist/6715.jclic-node.js +148 -0
- package/dist/6715.jclic-node.js.map +1 -0
- package/dist/6777.jclic-node.js +171 -0
- package/dist/6777.jclic-node.js.map +1 -0
- package/dist/6782.jclic-node.js +1611 -0
- package/dist/6782.jclic-node.js.map +1 -0
- package/dist/6847.jclic-node.js +601 -0
- package/dist/6847.jclic-node.js.map +1 -0
- package/dist/6856.jclic-node.js +252 -0
- package/dist/6856.jclic-node.js.map +1 -0
- package/dist/696.jclic-node.js +1821 -0
- package/dist/696.jclic-node.js.map +1 -0
- package/dist/698.jclic-node.js +583 -0
- package/dist/698.jclic-node.js.map +1 -0
- package/dist/704.jclic-node.js +80 -0
- package/dist/704.jclic-node.js.map +1 -0
- package/dist/7046.jclic-node.js +735 -0
- package/dist/7046.jclic-node.js.map +1 -0
- package/dist/7220.jclic-node.js +156 -0
- package/dist/7220.jclic-node.js.map +1 -0
- package/dist/7257.jclic-node.js +931 -0
- package/dist/7257.jclic-node.js.map +1 -0
- package/dist/743.jclic-node.js +583 -0
- package/dist/743.jclic-node.js.map +1 -0
- package/dist/757.jclic-node.js +1072 -0
- package/dist/757.jclic-node.js.map +1 -0
- package/dist/7781.jclic-node.js +202 -0
- package/dist/7781.jclic-node.js.map +1 -0
- package/dist/7912.jclic-node.js +2103 -0
- package/dist/7912.jclic-node.js.map +1 -0
- package/dist/827.jclic-node.js +708 -0
- package/dist/827.jclic-node.js.map +1 -0
- package/dist/8276.jclic-node.js +409 -0
- package/dist/8276.jclic-node.js.map +1 -0
- package/dist/8322.jclic-node.js +498 -0
- package/dist/8322.jclic-node.js.map +1 -0
- package/dist/8641.jclic-node.js +360 -0
- package/dist/8641.jclic-node.js.map +1 -0
- package/dist/8837.jclic-node.js +651 -0
- package/dist/8837.jclic-node.js.map +1 -0
- package/dist/8895.jclic-node.js +151 -0
- package/dist/8895.jclic-node.js.map +1 -0
- package/dist/9072.jclic-node.js +1285 -0
- package/dist/9072.jclic-node.js.map +1 -0
- package/dist/9078.jclic-node.js +935 -0
- package/dist/9078.jclic-node.js.map +1 -0
- package/dist/9103.jclic-node.js +718 -0
- package/dist/9103.jclic-node.js.map +1 -0
- package/dist/9359.jclic-node.js +145 -0
- package/dist/9359.jclic-node.js.map +1 -0
- package/dist/9409.jclic-node.js +921 -0
- package/dist/9409.jclic-node.js.map +1 -0
- package/dist/9513.jclic-node.js +720 -0
- package/dist/9513.jclic-node.js.map +1 -0
- package/dist/9704.jclic-node.js +81 -0
- package/dist/9704.jclic-node.js.map +1 -0
- package/dist/9950.jclic-node.js +827 -0
- package/dist/9950.jclic-node.js.map +1 -0
- package/dist/jclic-node.js +157 -143
- package/dist/jclic-node.js.map +1 -1
- package/dist/jclic.min.js +2 -2
- package/dist/jclic.min.js.map +1 -1
- package/package.json +7 -7
- package/src/GlobalData.js +1 -1
- package/src/init-jsdom.js +22 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,15 +1,22 @@
|
|
|
1
|
+
### v2.1.21 (2024-10-15)
|
|
2
|
+
#### Improvements
|
|
3
|
+
- Upgraded dependencies
|
|
4
|
+
#### Bug fixes
|
|
5
|
+
- NODE: Use `globalThis` instead of `global` (legacy in NodeJS 22) if available.
|
|
6
|
+
- NODE: Avoid overwrite `global.navigator` and other new global objects in NodeJS 22.
|
|
7
|
+
|
|
1
8
|
### v2.1.20 (2024-09-24)
|
|
2
9
|
#### Bug fixes
|
|
3
|
-
-
|
|
4
|
-
-
|
|
10
|
+
- Upgraded dependencies
|
|
11
|
+
- Moved `xmldom` and `jsdom` to *Dependencies* in `package.json` (they are no longer *devDependencies*)
|
|
5
12
|
|
|
6
13
|
### v2.1.19 (2024-09-14)
|
|
7
14
|
#### Improvements
|
|
8
|
-
-
|
|
9
|
-
-
|
|
10
|
-
-
|
|
15
|
+
- Upgraded ESLint to v9. Config file is now: `eslint.config.mjs`.
|
|
16
|
+
- Use specific file extensions to differentiate CommonJS (.cjs) and ECMAScript (.mjs) module formats.
|
|
17
|
+
- Converted `webpack.config` and `build-locales` to ECMAScript module format.
|
|
11
18
|
- Always use file extensions when importing sibling modules.
|
|
12
|
-
-
|
|
19
|
+
- Exported all JClic classes in the NPM package
|
|
13
20
|
|
|
14
21
|
### v2.1.18 (2024-09-13)
|
|
15
22
|
#### Improvements
|
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
exports.id = 1078;
|
|
3
|
+
exports.ids = [1078,7220];
|
|
4
|
+
exports.modules = {
|
|
5
|
+
|
|
6
|
+
/***/ 1078:
|
|
7
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
8
|
+
|
|
9
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
10
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
11
|
+
/* harmony export */ });
|
|
12
|
+
/* unused harmony export ConditionalJumpInfo */
|
|
13
|
+
/* harmony import */ var _JumpInfo_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7220);
|
|
14
|
+
/* harmony import */ var _Utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1253);
|
|
15
|
+
/**
|
|
16
|
+
* File : bags/ConditionalJumpInfo.js
|
|
17
|
+
* Created : 05/04/2015
|
|
18
|
+
* By : Francesc Busquets <francesc@gmail.com>
|
|
19
|
+
*
|
|
20
|
+
* JClic.js
|
|
21
|
+
* An HTML5 player of JClic activities
|
|
22
|
+
* https://projectestac.github.io/jclic.js
|
|
23
|
+
*
|
|
24
|
+
* @source https://github.com/projectestac/jclic.js
|
|
25
|
+
*
|
|
26
|
+
* @license EUPL-1.2
|
|
27
|
+
* @licstart
|
|
28
|
+
* (c) 2000-2020 Catalan Educational Telematic Network (XTEC)
|
|
29
|
+
*
|
|
30
|
+
* Licensed under the EUPL, Version 1.1 or -as soon they will be approved by
|
|
31
|
+
* the European Commission- subsequent versions of the EUPL (the "Licence");
|
|
32
|
+
* You may not use this work except in compliance with the Licence.
|
|
33
|
+
*
|
|
34
|
+
* You may obtain a copy of the Licence at:
|
|
35
|
+
* https://joinup.ec.europa.eu/software/page/eupl
|
|
36
|
+
*
|
|
37
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
38
|
+
* distributed under the Licence is distributed on an "AS IS" basis, WITHOUT
|
|
39
|
+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
40
|
+
* Licence for the specific language governing permissions and limitations
|
|
41
|
+
* under the Licence.
|
|
42
|
+
* @licend
|
|
43
|
+
* @module
|
|
44
|
+
*/
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* This special case of {@link module:bags/JumpInfo.JumpInfo JumpInfo} is used in {@link module:bags/ActivitySequenceJump.ActivitySequenceJump ActivitySequenceJump} objects to decide
|
|
51
|
+
* the type of jump or action to be performed, based on the results obtained by the user when
|
|
52
|
+
* playing previous JClic activities.
|
|
53
|
+
*
|
|
54
|
+
* In addition to the standard {@link module:bags/JumpInfo.JumpInfo JumpInfo} fields and methods, this class has two public
|
|
55
|
+
* members where score and time thresholds are stored.
|
|
56
|
+
*
|
|
57
|
+
* The exact meaning of this members will depend on the type of `ConditionalJumpInfo` in the
|
|
58
|
+
* {@link module:bags/ActivitySequenceJump.ActivitySequenceJump ActivitySequenceJump} (it can be `upperJump` or `lowerJump`).
|
|
59
|
+
* @extends module:bags/JumpInfo.JumpInfo
|
|
60
|
+
*/
|
|
61
|
+
class ConditionalJumpInfo extends _JumpInfo_js__WEBPACK_IMPORTED_MODULE_0__["default"] {
|
|
62
|
+
/**
|
|
63
|
+
* ConditionalJumpInfo constructor
|
|
64
|
+
* @param {string} action - Must be one of the described actions.
|
|
65
|
+
* @param {number|string} [sq] - Can be the tag of the sequence element to jump to, or its
|
|
66
|
+
* cardinal number in the list.
|
|
67
|
+
* @param {number} [threshold] - Threshold above or below which the action will be triggered,
|
|
68
|
+
* depending on the type of JumpInfo.
|
|
69
|
+
* @param {number} [time] - Delay to be applied in automatic jumps.
|
|
70
|
+
*/
|
|
71
|
+
constructor(action, sq, threshold, time) {
|
|
72
|
+
super(action, sq);
|
|
73
|
+
this.threshold = typeof threshold === 'number' ? threshold : -1;
|
|
74
|
+
this.time = typeof threshold === 'number' ? time : -1;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Loads this object settings from a specific JQuery XML element
|
|
79
|
+
* @param {external:jQuery} $xml - The XML element to parse
|
|
80
|
+
*/
|
|
81
|
+
setProperties($xml) {
|
|
82
|
+
super.setProperties($xml);
|
|
83
|
+
if ($xml.attr('threshold') !== undefined)
|
|
84
|
+
this.threshold = $xml.attr('threshold');
|
|
85
|
+
if ($xml.attr('time') !== undefined)
|
|
86
|
+
this.time = $xml.attr('time');
|
|
87
|
+
return this;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Gets a object with the basic attributes needed to rebuild this instance excluding functions,
|
|
92
|
+
* parent references, constants and also attributes retaining the default value.
|
|
93
|
+
* The resulting object is commonly usued to serialize elements in JSON format.
|
|
94
|
+
* @returns {object} - The resulting object, with minimal attrributes
|
|
95
|
+
*/
|
|
96
|
+
getAttributes() {
|
|
97
|
+
return Object.assign(super.getAttributes(), (0,_Utils_js__WEBPACK_IMPORTED_MODULE_1__/* .getAttr */ .iu)(this, ['threshold', 'time']));
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Loads this conditional jump settings from a data object
|
|
102
|
+
* @param {object} data - The data object to parse
|
|
103
|
+
*/
|
|
104
|
+
setAttributes(data) {
|
|
105
|
+
super.setAttributes(data);
|
|
106
|
+
['threshold', 'time'].forEach(t => {
|
|
107
|
+
if (!(0,_Utils_js__WEBPACK_IMPORTED_MODULE_1__/* .isEmpty */ .Im)(data[t]))
|
|
108
|
+
this[t] = data[t];
|
|
109
|
+
});
|
|
110
|
+
return this;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
Object.assign(ConditionalJumpInfo.prototype, {
|
|
115
|
+
/**
|
|
116
|
+
* Threshold above or below which the action will be triggered, depending on the type of JumpInfo.
|
|
117
|
+
* @name module:bags/ConditionalJumpInfo.ConditionalJumpInfo#threshold
|
|
118
|
+
* @type {number} */
|
|
119
|
+
threshold: -1,
|
|
120
|
+
/**
|
|
121
|
+
* Delay to be applied in automatic jumps.
|
|
122
|
+
* @name module:bags/ConditionalJumpInfo.ConditionalJumpInfo#time
|
|
123
|
+
* @type {number} */
|
|
124
|
+
time: -1,
|
|
125
|
+
});
|
|
126
|
+
|
|
127
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ConditionalJumpInfo);
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
/***/ }),
|
|
131
|
+
|
|
132
|
+
/***/ 7220:
|
|
133
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
134
|
+
|
|
135
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
136
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
137
|
+
/* harmony export */ });
|
|
138
|
+
/* unused harmony export JumpInfo */
|
|
139
|
+
/* harmony import */ var _Utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1253);
|
|
140
|
+
/**
|
|
141
|
+
* File : bags/JumpInfo.js
|
|
142
|
+
* Created : 05/04/2015
|
|
143
|
+
* By : Francesc Busquets <francesc@gmail.com>
|
|
144
|
+
*
|
|
145
|
+
* JClic.js
|
|
146
|
+
* An HTML5 player of JClic activities
|
|
147
|
+
* https://projectestac.github.io/jclic.js
|
|
148
|
+
*
|
|
149
|
+
* @source https://github.com/projectestac/jclic.js
|
|
150
|
+
*
|
|
151
|
+
* @license EUPL-1.2
|
|
152
|
+
* @licstart
|
|
153
|
+
* (c) 2000-2020 Catalan Educational Telematic Network (XTEC)
|
|
154
|
+
*
|
|
155
|
+
* Licensed under the EUPL, Version 1.1 or -as soon they will be approved by
|
|
156
|
+
* the European Commission- subsequent versions of the EUPL (the "Licence");
|
|
157
|
+
* You may not use this work except in compliance with the Licence.
|
|
158
|
+
*
|
|
159
|
+
* You may obtain a copy of the Licence at:
|
|
160
|
+
* https://joinup.ec.europa.eu/software/page/eupl
|
|
161
|
+
*
|
|
162
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
163
|
+
* distributed under the Licence is distributed on an "AS IS" basis, WITHOUT
|
|
164
|
+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
165
|
+
* Licence for the specific language governing permissions and limitations
|
|
166
|
+
* under the Licence.
|
|
167
|
+
* @licend
|
|
168
|
+
* @module
|
|
169
|
+
*/
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* This class contains information about what things JClic sequence manager has to do in certain
|
|
175
|
+
* circumstances, such as:
|
|
176
|
+
* - an activity finishes
|
|
177
|
+
* - the user clicks on the "next" or "prev" buttons
|
|
178
|
+
* - the user clicks or a cell with special "active content"
|
|
179
|
+
*
|
|
180
|
+
* Different kinds of actions are possible for each of these events:
|
|
181
|
+
* - RETURN: to go back to a previous point in the sequence.
|
|
182
|
+
* - EXIT: to exit the program (thus navigating to another URL)
|
|
183
|
+
* - STOP: to do nothing.
|
|
184
|
+
* - JUMP: to jump to a specific point in the sequence of activities, or to another JClic project.
|
|
185
|
+
* @see {@link module:bags/ActivitySequenceJump.ActivitySequenceJump ActivitySequenceJump}
|
|
186
|
+
* @see {@link module:bags/ConditionalJumpInfo.ConditionalJumpInfo ConditionalJumpInfo}
|
|
187
|
+
*/
|
|
188
|
+
class JumpInfo {
|
|
189
|
+
/**
|
|
190
|
+
* JumpInfo constructor
|
|
191
|
+
* @param {string} action - Must be one of the described actions.
|
|
192
|
+
* @param {number|string} [sq] - Can be the tag of the sequence element to jump to, or its
|
|
193
|
+
* cardinal number in the list.
|
|
194
|
+
*/
|
|
195
|
+
constructor(action, sq) {
|
|
196
|
+
this.action = action;
|
|
197
|
+
switch (typeof sq) {
|
|
198
|
+
case 'string':
|
|
199
|
+
this.sequence = sq;
|
|
200
|
+
break;
|
|
201
|
+
case 'number':
|
|
202
|
+
this.actNum = sq;
|
|
203
|
+
break;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* Loads the object settings from a specific JQuery XML element
|
|
209
|
+
* @param {external:jQuery} $xml - The XML element to parse
|
|
210
|
+
*/
|
|
211
|
+
setProperties($xml) {
|
|
212
|
+
this.id = $xml.attr('id');
|
|
213
|
+
this.action = $xml.attr('action') || 'JUMP';
|
|
214
|
+
if ($xml.attr('tag'))
|
|
215
|
+
this.sequence = (0,_Utils_js__WEBPACK_IMPORTED_MODULE_0__/* .nSlash */ .c4)($xml.attr('tag'));
|
|
216
|
+
if ($xml.attr('project'))
|
|
217
|
+
this.projectPath = (0,_Utils_js__WEBPACK_IMPORTED_MODULE_0__/* .nSlash */ .c4)($xml.attr('project'));
|
|
218
|
+
return this;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
/**
|
|
222
|
+
* Gets a object with the basic attributes needed to rebuild this instance excluding functions,
|
|
223
|
+
* parent references, constants and also attributes retaining the default value.
|
|
224
|
+
* The resulting object is commonly usued to serialize elements in JSON format.
|
|
225
|
+
* @returns {object} - The resulting object, with minimal attrributes
|
|
226
|
+
*/
|
|
227
|
+
getAttributes() {
|
|
228
|
+
return (0,_Utils_js__WEBPACK_IMPORTED_MODULE_0__/* .getAttr */ .iu)(this, ['id', 'action', 'actNum', 'sequence', 'projectPath']);
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
/**
|
|
232
|
+
* Loads the object settings from a data object
|
|
233
|
+
* @param {object} data - The data object to parse
|
|
234
|
+
*/
|
|
235
|
+
setAttributes(data) {
|
|
236
|
+
['id', 'action', 'actNum', 'sequence', 'projectPath'].forEach(t => {
|
|
237
|
+
if (!(0,_Utils_js__WEBPACK_IMPORTED_MODULE_0__/* .isEmpty */ .Im)(data[t]))
|
|
238
|
+
this[t] = data[t];
|
|
239
|
+
});
|
|
240
|
+
return this;
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
Object.assign(JumpInfo.prototype, {
|
|
245
|
+
/**
|
|
246
|
+
* The JumpInfo identifier
|
|
247
|
+
* - For regular jumps: 'forward', 'back'
|
|
248
|
+
* - For conditional jumps: 'upper', 'lower'
|
|
249
|
+
* @name module:bags/JumpInfo.JumpInfo#id
|
|
250
|
+
* @type {string} */
|
|
251
|
+
id: null,
|
|
252
|
+
/**
|
|
253
|
+
* The current action.
|
|
254
|
+
* Possible values are: `JUMP`, `STOP`, `RETURN` and `EXIT`.
|
|
255
|
+
* @name module:bags/JumpInfo.JumpInfo#action
|
|
256
|
+
* @type {string} */
|
|
257
|
+
action: null,
|
|
258
|
+
/**
|
|
259
|
+
* Activity number in the sequence list
|
|
260
|
+
* @name module:bags/JumpInfo.JumpInfo#actNum
|
|
261
|
+
* @type {number} */
|
|
262
|
+
actNum: -1,
|
|
263
|
+
/**
|
|
264
|
+
* Current sequence tag
|
|
265
|
+
* @name module:bags/JumpInfo.JumpInfo#sequence
|
|
266
|
+
* @type {string} */
|
|
267
|
+
sequence: null,
|
|
268
|
+
/**
|
|
269
|
+
* Path of another JClic project to jump to
|
|
270
|
+
* @name module:bags/JumpInfo.JumpInfo#projectPath
|
|
271
|
+
* @type {string} */
|
|
272
|
+
projectPath: null,
|
|
273
|
+
});
|
|
274
|
+
|
|
275
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (JumpInfo);
|
|
276
|
+
|
|
277
|
+
|
|
278
|
+
/***/ })
|
|
279
|
+
|
|
280
|
+
};
|
|
281
|
+
;
|
|
282
|
+
//# sourceMappingURL=1078.jclic-node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1078.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;;AAEqC;AACU;;AAE/C;AACA,yBAAyB,8CAA8C,YAAY,kFAAkF;AACrK;AACA;AACA;AACA,gCAAgC,8CAA8C;AAC9E;AACA;AACA;AACA,IAAI,kFAAkF;AACtF;AACA;AACO,kCAAkC,oDAAQ;AACjD;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,eAAe;AAC5B;AACA,aAAa,QAAQ;AACrB;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,iBAAiB;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA;AACA,gDAAgD,4DAAO;AACvD;;AAEA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA,WAAW,4DAAO;AAClB;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA,CAAC;;AAED,iEAAe,mBAAmB,EAAC;;;;;;;;;;;;;AChHnC;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;;AAEuD;;AAEvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,SAAS;AACT;AACO;AACP;AACA;AACA,aAAa,QAAQ;AACrB,aAAa,eAAe;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,aAAa,iBAAiB;AAC9B;AACA;AACA;AACA;AACA;AACA,sBAAsB,2DAAM;AAC5B;AACA,yBAAyB,2DAAM;AAC/B;AACA;;AAEA;AACA;AACA;AACA;AACA,eAAe,QAAQ;AACvB;AACA;AACA,WAAW,4DAAO;AAClB;;AAEA;AACA;AACA,aAAa,QAAQ;AACrB;AACA;AACA;AACA,WAAW,4DAAO;AAClB;AACA,KAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA;AACA;AACA;AACA,YAAY,QAAQ;AACpB;AACA,CAAC;;AAED,iEAAe,QAAQ,EAAC","sources":["webpack://jclic/./src/bags/ConditionalJumpInfo.js","webpack://jclic/./src/bags/JumpInfo.js"],"sourcesContent":["/**\n * File : bags/ConditionalJumpInfo.js\n * Created : 05/04/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 Catalan Educational Telematic Network (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 JumpInfo from './JumpInfo.js';\nimport { getAttr, isEmpty } from '../Utils.js';\n\n/**\n * This special case of {@link module:bags/JumpInfo.JumpInfo JumpInfo} is used in {@link module:bags/ActivitySequenceJump.ActivitySequenceJump ActivitySequenceJump} objects to decide\n * the type of jump or action to be performed, based on the results obtained by the user when\n * playing previous JClic activities.\n *\n * In addition to the standard {@link module:bags/JumpInfo.JumpInfo JumpInfo} fields and methods, this class has two public\n * members where score and time thresholds are stored.\n *\n * The exact meaning of this members will depend on the type of `ConditionalJumpInfo` in the\n * {@link module:bags/ActivitySequenceJump.ActivitySequenceJump ActivitySequenceJump} (it can be `upperJump` or `lowerJump`).\n * @extends module:bags/JumpInfo.JumpInfo\n */\nexport class ConditionalJumpInfo extends JumpInfo {\n /**\n * ConditionalJumpInfo constructor\n * @param {string} action - Must be one of the described actions.\n * @param {number|string} [sq] - Can be the tag of the sequence element to jump to, or its\n * cardinal number in the list.\n * @param {number} [threshold] - Threshold above or below which the action will be triggered,\n * depending on the type of JumpInfo.\n * @param {number} [time] - Delay to be applied in automatic jumps.\n */\n constructor(action, sq, threshold, time) {\n super(action, sq);\n this.threshold = typeof threshold === 'number' ? threshold : -1;\n this.time = typeof threshold === 'number' ? time : -1;\n }\n\n /**\n * Loads this object settings from a specific JQuery XML element\n * @param {external:jQuery} $xml - The XML element to parse\n */\n setProperties($xml) {\n super.setProperties($xml);\n if ($xml.attr('threshold') !== undefined)\n this.threshold = $xml.attr('threshold');\n if ($xml.attr('time') !== undefined)\n this.time = $xml.attr('time');\n return this;\n }\n\n /**\n * Gets a object with the basic attributes needed to rebuild this instance excluding functions,\n * parent references, constants and also attributes retaining the default value.\n * The resulting object is commonly usued to serialize elements in JSON format.\n * @returns {object} - The resulting object, with minimal attrributes\n */\n getAttributes() {\n return Object.assign(super.getAttributes(), getAttr(this, ['threshold', 'time']));\n }\n\n /**\n * Loads this conditional jump settings from a data object\n * @param {object} data - The data object to parse\n */\n setAttributes(data) {\n super.setAttributes(data);\n ['threshold', 'time'].forEach(t => {\n if (!isEmpty(data[t]))\n this[t] = data[t];\n });\n return this;\n }\n}\n\nObject.assign(ConditionalJumpInfo.prototype, {\n /**\n * Threshold above or below which the action will be triggered, depending on the type of JumpInfo.\n * @name module:bags/ConditionalJumpInfo.ConditionalJumpInfo#threshold\n * @type {number} */\n threshold: -1,\n /**\n * Delay to be applied in automatic jumps.\n * @name module:bags/ConditionalJumpInfo.ConditionalJumpInfo#time\n * @type {number} */\n time: -1,\n});\n\nexport default ConditionalJumpInfo;\n","/**\n * File : bags/JumpInfo.js\n * Created : 05/04/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 Catalan Educational Telematic Network (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 { nSlash, getAttr, isEmpty } from '../Utils.js';\n\n/**\n * This class contains information about what things JClic sequence manager has to do in certain\n * circumstances, such as:\n * - an activity finishes\n * - the user clicks on the \"next\" or \"prev\" buttons\n * - the user clicks or a cell with special \"active content\"\n *\n * Different kinds of actions are possible for each of these events:\n * - RETURN: to go back to a previous point in the sequence.\n * - EXIT: to exit the program (thus navigating to another URL)\n * - STOP: to do nothing.\n * - JUMP: to jump to a specific point in the sequence of activities, or to another JClic project.\n * @see {@link module:bags/ActivitySequenceJump.ActivitySequenceJump ActivitySequenceJump}\n * @see {@link module:bags/ConditionalJumpInfo.ConditionalJumpInfo ConditionalJumpInfo}\n */\nexport class JumpInfo {\n /**\n * JumpInfo constructor\n * @param {string} action - Must be one of the described actions.\n * @param {number|string} [sq] - Can be the tag of the sequence element to jump to, or its\n * cardinal number in the list.\n */\n constructor(action, sq) {\n this.action = action;\n switch (typeof sq) {\n case 'string':\n this.sequence = sq;\n break;\n case 'number':\n this.actNum = sq;\n break;\n }\n }\n\n /**\n * Loads the object settings from a specific JQuery XML element\n * @param {external:jQuery} $xml - The XML element to parse\n */\n setProperties($xml) {\n this.id = $xml.attr('id');\n this.action = $xml.attr('action') || 'JUMP';\n if ($xml.attr('tag'))\n this.sequence = nSlash($xml.attr('tag'));\n if ($xml.attr('project'))\n this.projectPath = nSlash($xml.attr('project'));\n return this;\n }\n\n /**\n * Gets a object with the basic attributes needed to rebuild this instance excluding functions,\n * parent references, constants and also attributes retaining the default value.\n * The resulting object is commonly usued to serialize elements in JSON format.\n * @returns {object} - The resulting object, with minimal attrributes\n */\n getAttributes() {\n return getAttr(this, ['id', 'action', 'actNum', 'sequence', 'projectPath']);\n }\n\n /**\n * Loads the object settings from a data object\n * @param {object} data - The data object to parse\n */\n setAttributes(data) {\n ['id', 'action', 'actNum', 'sequence', 'projectPath'].forEach(t => {\n if (!isEmpty(data[t]))\n this[t] = data[t];\n });\n return this;\n }\n}\n\nObject.assign(JumpInfo.prototype, {\n /**\n * The JumpInfo identifier\n * - For regular jumps: 'forward', 'back'\n * - For conditional jumps: 'upper', 'lower'\n * @name module:bags/JumpInfo.JumpInfo#id\n * @type {string} */\n id: null,\n /**\n * The current action.\n * Possible values are: `JUMP`, `STOP`, `RETURN` and `EXIT`.\n * @name module:bags/JumpInfo.JumpInfo#action\n * @type {string} */\n action: null,\n /**\n * Activity number in the sequence list\n * @name module:bags/JumpInfo.JumpInfo#actNum\n * @type {number} */\n actNum: -1,\n /**\n * Current sequence tag\n * @name module:bags/JumpInfo.JumpInfo#sequence\n * @type {string} */\n sequence: null,\n /**\n * Path of another JClic project to jump to\n * @name module:bags/JumpInfo.JumpInfo#projectPath\n * @type {string} */\n projectPath: null,\n});\n\nexport default JumpInfo;\n"],"names":[],"sourceRoot":""}
|