@pie-element/explicit-constructed-response 7.2.9-next.20 → 7.2.9-next.22

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.
@@ -8,7 +8,7 @@
8
8
  "@material-ui/core": "^3.9.2",
9
9
  "@material-ui/icons": "^3.0.1",
10
10
  "@pie-framework/pie-configure-events": "^1.3.0",
11
- "@pie-lib/pie-toolbox": "2.6.1",
11
+ "@pie-lib/pie-toolbox": "2.7.0",
12
12
  "classnames": "^2.2.6",
13
13
  "debug": "^3.1.0",
14
14
  "lodash": "^4.17.15",
@@ -8,7 +8,7 @@
8
8
  "author": "",
9
9
  "license": "ISC",
10
10
  "dependencies": {
11
- "@pie-lib/pie-toolbox": "2.6.1",
11
+ "@pie-lib/pie-toolbox": "2.7.0",
12
12
  "debug": "^3.1.0",
13
13
  "lodash": "^4.17.15",
14
14
  "type-of": "^2.0.1"
@@ -1,5 +1,5 @@
1
1
  import {_dll_react, _dll_prop_types, _dll_classnames, _dll_react_dom, _dll_lodash, _dll_debug} from "../../../@pie-lib/pie-toolbox-math-rendering-module@3.0.1/module/index.js";
2
- import {_dll_pie_lib__pie_toolbox_editable_html, _dll_pie_lib__pie_toolbox_config_ui} from "../../../@pie-lib/pie-toolbox-module@5.7.1/module/index.js";
2
+ import {_dll_pie_lib__pie_toolbox_editable_html, _dll_pie_lib__pie_toolbox_config_ui} from "../../../@pie-lib/pie-toolbox-module@5.7.2/module/index.js";
3
3
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
4
4
  function getDefaultExportFromCjs(x) {
5
5
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
@@ -24379,7 +24379,7 @@ var _default = {
24379
24379
  },
24380
24380
  imageClozeAssociation: {
24381
24381
  reachedLimit_one: 'You’ve reached the limit of {{count}} response per area. To add another response, one must first be removed.',
24382
- reachedLimit_other: 'You’ve reached the limit of {{count}} responses per area. To add another response, one must first be removed.'
24382
+ reachedLimit_other: 'Full'
24383
24383
  },
24384
24384
  drawingResponse: {
24385
24385
  fillColor: 'Fill color',
@@ -24475,7 +24475,7 @@ var _default = {
24475
24475
  },
24476
24476
  imageClozeAssociation: {
24477
24477
  reachedLimit_one: 'Has alcanzado el límite de {{count}} respuesta por área. Para agregar otra respuesta, primero se debe eliminar una respuesta.',
24478
- reachedLimit_other: 'Has alcanzado el límite de {{count}} respuestas por área. Para agregar otra respuesta, primero se debe eliminar una respuesta.'
24478
+ reachedLimit_other: 'Lleno'
24479
24479
  },
24480
24480
  drawingResponse: {
24481
24481
  fillColor: 'Color de relleno',
package/module/element.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import {_dll_react, _dll_prop_types, _dll_debug, _dll_lodash, _dll_react_dom_server, _dll_classnames, _dll_react_dom, _dll_pie_framework__mathquill, _dll_pie_lib__pie_toolbox_math_rendering} from "../../../@pie-lib/pie-toolbox-math-rendering-module@3.0.1/module/index.js";
2
- import {_dll_pie_lib__pie_toolbox_correct_answer_toggle, _dll_pie_lib__pie_toolbox_render_ui} from "../../../@pie-lib/pie-toolbox-module@5.7.1/module/index.js";
2
+ import {_dll_pie_lib__pie_toolbox_correct_answer_toggle, _dll_pie_lib__pie_toolbox_render_ui} from "../../../@pie-lib/pie-toolbox-module@5.7.2/module/index.js";
3
3
  function _mergeNamespaces(n, m) {
4
4
  m.forEach(function (e) {
5
5
  e && typeof e !== 'string' && !Array.isArray(e) && Object.keys(e).forEach(function (k) {
@@ -19162,6 +19162,18 @@ const require$$14$5 = _dll_classnames;
19162
19162
  className: props.classes.para
19163
19163
  }, props.children);
19164
19164
  });
19165
+ var Spacer = (0, _styles.withStyles)(function () {
19166
+ return {
19167
+ spacer: {
19168
+ display: 'inline-block',
19169
+ width: '1.5em'
19170
+ }
19171
+ };
19172
+ })(function (props) {
19173
+ return _react["default"].createElement("span", {
19174
+ className: props.classes.spacer
19175
+ });
19176
+ });
19165
19177
  var restrictWhitespaceTypes = ['tbody', 'tr'];
19166
19178
  var addText = function addText(parentNode, text) {
19167
19179
  var isWhitespace = text.trim() === '';
@@ -19200,6 +19212,11 @@ const require$$14$5 = _dll_classnames;
19200
19212
  var c = rootRenderChildren(n, value, onChange);
19201
19213
  if (c) {
19202
19214
  children.push(c);
19215
+ if ((parentNode === null || parentNode === void 0 ? void 0 : parentNode.type) !== 'td') {
19216
+ children.push(_react["default"].createElement(Spacer, {
19217
+ key: ("spacer-").concat(index)
19218
+ }));
19219
+ }
19203
19220
  return;
19204
19221
  }
19205
19222
  }
@@ -140430,6 +140447,7 @@ const require$$11$s = _dll_prop_types;
140430
140447
  }
140431
140448
  _this = _super.call.apply(_super, [this].concat(args));
140432
140449
  (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "parsedText", function (text) {
140450
+ var autoplayAudioEnabled = _this.props.autoplayAudioEnabled;
140433
140451
  var div = document.createElement('div');
140434
140452
  div.innerHTML = text;
140435
140453
  var audio = div.querySelector('audio');
@@ -140438,6 +140456,9 @@ const require$$11$s = _dll_prop_types;
140438
140456
  source.setAttribute('type', 'audio/mp3');
140439
140457
  source.setAttribute('src', audio.getAttribute('src'));
140440
140458
  audio.removeAttribute('src');
140459
+ if (autoplayAudioEnabled) {
140460
+ audio.setAttribute('autoplay', 'autoplay');
140461
+ }
140441
140462
  audio.appendChild(source);
140442
140463
  }
140443
140464
  return div.innerHTML;
@@ -140511,7 +140532,8 @@ const require$$11$s = _dll_prop_types;
140511
140532
  tagName: _propTypes["default"].string,
140512
140533
  className: _propTypes["default"].string,
140513
140534
  onClick: _propTypes["default"].func,
140514
- defaultClassName: _propTypes["default"].string
140535
+ defaultClassName: _propTypes["default"].string,
140536
+ autoplayAudioEnabled: _propTypes["default"].bool
140515
140537
  });
140516
140538
  (0, _defineProperty2["default"])(PreviewPrompt, "defaultProps", {
140517
140539
  onClick: function onClick() {}
@@ -143529,7 +143551,8 @@ const require$$2$k = _dll_react;
143529
143551
  return newObj;
143530
143552
  }
143531
143553
  var backends = [{
143532
- backend: _reactDndHtml5Backend.HTML5Backend
143554
+ backend: _reactDndHtml5Backend.HTML5Backend,
143555
+ transition: _reactDndMultiBackend.MouseTransition
143533
143556
  }, {
143534
143557
  backend: _reactDndTouchBackend.TouchBackend,
143535
143558
  options: {
@@ -144744,8 +144767,7 @@ const require$$18$3 = _dll_classnames;
144744
144767
  fontSize: 'inherit',
144745
144768
  maxWidth: '374px',
144746
144769
  position: 'relative',
144747
- borderRadius: '3px',
144748
- margin: '8px'
144770
+ borderRadius: '3px'
144749
144771
  },
144750
144772
  chipLabel: {
144751
144773
  whiteSpace: 'normal',
@@ -169994,7 +170016,8 @@ const require$$12$1 = _dll_debug;
169994
170016
  var dataURL = reader.result;
169995
170017
  _this.setState({
169996
170018
  fileUpload: _objectSpread(_objectSpread({}, _this.state.fileUpload), {}, {
169997
- url: dataURL
170019
+ url: dataURL,
170020
+ mimeType: fileChosen.type
169998
170021
  })
169999
170022
  });
170000
170023
  };
@@ -170054,7 +170077,8 @@ const require$$12$1 = _dll_debug;
170054
170077
  _this.setState({
170055
170078
  fileUpload: _objectSpread(_objectSpread({}, _this.state.fileUpload), {}, {
170056
170079
  loading: false,
170057
- url: ''
170080
+ url: '',
170081
+ mimeType: ''
170058
170082
  })
170059
170083
  });
170060
170084
  case 2:
@@ -170080,7 +170104,8 @@ const require$$12$1 = _dll_debug;
170080
170104
  error: null,
170081
170105
  loading: false,
170082
170106
  scheduled: false,
170083
- url: ''
170107
+ url: '',
170108
+ mimeType: ''
170084
170109
  }
170085
170110
  };
170086
170111
  return _this;
@@ -170101,7 +170126,7 @@ const require$$12$1 = _dll_debug;
170101
170126
  value: function render() {
170102
170127
  var _this2 = this;
170103
170128
  var _this$props = this.props, classes = _this$props.classes, open = _this$props.open, disablePortal = _this$props.disablePortal, type = _this$props.type, edit = _this$props.edit, uploadSoundSupport = _this$props.uploadSoundSupport;
170104
- var _this$state4 = this.state, ends = _this$state4.ends, height = _this$state4.height, invalid = _this$state4.invalid, starts = _this$state4.starts, width = _this$state4.width, url = _this$state4.url, formattedUrl = _this$state4.formattedUrl, updating = _this$state4.updating, tabValue = _this$state4.tabValue, fileUpload = _this$state4.fileUpload;
170129
+ var _this$state4 = this.state, ends = _this$state4.ends, height = _this$state4.height, invalid = _this$state4.invalid, starts = _this$state4.starts, width = _this$state4.width, url = _this$state4.url, mimeType = _this$state4.mimeType, formattedUrl = _this$state4.formattedUrl, updating = _this$state4.updating, tabValue = _this$state4.tabValue, fileUpload = _this$state4.fileUpload;
170105
170130
  var isYoutube = matchYoutubeUrl(url);
170106
170131
  var isInsertURL = tabValue === tabsTypeMap.insertUrl;
170107
170132
  var isUploadMedia = tabValue === tabsTypeMap.uploadFile;
@@ -170206,7 +170231,7 @@ const require$$12$1 = _dll_debug;
170206
170231
  controls: "controls",
170207
170232
  controlsList: "nodownload"
170208
170233
  }, _react["default"].createElement("source", {
170209
- type: "audio/mp3",
170234
+ type: mimeType,
170210
170235
  src: fileUpload.url
170211
170236
  })), _react["default"].createElement(_IconButton["default"], {
170212
170237
  "aria-label": "delete",
@@ -177539,7 +177564,7 @@ const require$$13$1 = _dll_prop_types;
177539
177564
  editorHolder: {
177540
177565
  position: 'relative',
177541
177566
  padding: '0px',
177542
- overflowY: 'scroll',
177567
+ overflowY: 'auto',
177543
177568
  color: _renderUi.color.text(),
177544
177569
  backgroundColor: _renderUi.color.background(),
177545
177570
  '&::before': {
@@ -183672,7 +183697,7 @@ var en = {};
183672
183697
  },
183673
183698
  imageClozeAssociation: {
183674
183699
  reachedLimit_one: 'You’ve reached the limit of {{count}} response per area. To add another response, one must first be removed.',
183675
- reachedLimit_other: 'You’ve reached the limit of {{count}} responses per area. To add another response, one must first be removed.'
183700
+ reachedLimit_other: 'Full'
183676
183701
  },
183677
183702
  drawingResponse: {
183678
183703
  fillColor: 'Fill color',
@@ -183765,7 +183790,7 @@ var es = {};
183765
183790
  },
183766
183791
  imageClozeAssociation: {
183767
183792
  reachedLimit_one: 'Has alcanzado el límite de {{count}} respuesta por área. Para agregar otra respuesta, primero se debe eliminar una respuesta.',
183768
- reachedLimit_other: 'Has alcanzado el límite de {{count}} respuestas por área. Para agregar otra respuesta, primero se debe eliminar una respuesta.'
183793
+ reachedLimit_other: 'Lleno'
183769
183794
  },
183770
183795
  drawingResponse: {
183771
183796
  fillColor: 'Color de relleno',
@@ -8,7 +8,7 @@
8
8
  },
9
9
  {
10
10
  "name": "@pie-lib/pie-toolbox-module",
11
- "version": "5.7.1"
11
+ "version": "5.7.2"
12
12
  }
13
13
  ]
14
14
  }
package/module/print.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import {_dll_react, _dll_prop_types, _dll_debug, _dll_lodash, _dll_react_dom_server, _dll_classnames, _dll_react_dom, _dll_pie_framework__mathquill, _dll_pie_lib__pie_toolbox_math_rendering} from "../../../@pie-lib/pie-toolbox-math-rendering-module@3.0.1/module/index.js";
2
- import {_dll_pie_lib__pie_toolbox_correct_answer_toggle, _dll_pie_lib__pie_toolbox_render_ui} from "../../../@pie-lib/pie-toolbox-module@5.7.1/module/index.js";
2
+ import {_dll_pie_lib__pie_toolbox_correct_answer_toggle, _dll_pie_lib__pie_toolbox_render_ui} from "../../../@pie-lib/pie-toolbox-module@5.7.2/module/index.js";
3
3
  function _mergeNamespaces(n, m) {
4
4
  m.forEach(function (e) {
5
5
  e && typeof e !== 'string' && !Array.isArray(e) && Object.keys(e).forEach(function (k) {
@@ -19125,6 +19125,18 @@ const require$$14$5 = _dll_classnames;
19125
19125
  className: props.classes.para
19126
19126
  }, props.children);
19127
19127
  });
19128
+ var Spacer = (0, _styles.withStyles)(function () {
19129
+ return {
19130
+ spacer: {
19131
+ display: 'inline-block',
19132
+ width: '1.5em'
19133
+ }
19134
+ };
19135
+ })(function (props) {
19136
+ return _react["default"].createElement("span", {
19137
+ className: props.classes.spacer
19138
+ });
19139
+ });
19128
19140
  var restrictWhitespaceTypes = ['tbody', 'tr'];
19129
19141
  var addText = function addText(parentNode, text) {
19130
19142
  var isWhitespace = text.trim() === '';
@@ -19163,6 +19175,11 @@ const require$$14$5 = _dll_classnames;
19163
19175
  var c = rootRenderChildren(n, value, onChange);
19164
19176
  if (c) {
19165
19177
  children.push(c);
19178
+ if ((parentNode === null || parentNode === void 0 ? void 0 : parentNode.type) !== 'td') {
19179
+ children.push(_react["default"].createElement(Spacer, {
19180
+ key: ("spacer-").concat(index)
19181
+ }));
19182
+ }
19166
19183
  return;
19167
19184
  }
19168
19185
  }
@@ -140393,6 +140410,7 @@ const require$$11$s = _dll_prop_types;
140393
140410
  }
140394
140411
  _this = _super.call.apply(_super, [this].concat(args));
140395
140412
  (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "parsedText", function (text) {
140413
+ var autoplayAudioEnabled = _this.props.autoplayAudioEnabled;
140396
140414
  var div = document.createElement('div');
140397
140415
  div.innerHTML = text;
140398
140416
  var audio = div.querySelector('audio');
@@ -140401,6 +140419,9 @@ const require$$11$s = _dll_prop_types;
140401
140419
  source.setAttribute('type', 'audio/mp3');
140402
140420
  source.setAttribute('src', audio.getAttribute('src'));
140403
140421
  audio.removeAttribute('src');
140422
+ if (autoplayAudioEnabled) {
140423
+ audio.setAttribute('autoplay', 'autoplay');
140424
+ }
140404
140425
  audio.appendChild(source);
140405
140426
  }
140406
140427
  return div.innerHTML;
@@ -140474,7 +140495,8 @@ const require$$11$s = _dll_prop_types;
140474
140495
  tagName: _propTypes["default"].string,
140475
140496
  className: _propTypes["default"].string,
140476
140497
  onClick: _propTypes["default"].func,
140477
- defaultClassName: _propTypes["default"].string
140498
+ defaultClassName: _propTypes["default"].string,
140499
+ autoplayAudioEnabled: _propTypes["default"].bool
140478
140500
  });
140479
140501
  (0, _defineProperty2["default"])(PreviewPrompt, "defaultProps", {
140480
140502
  onClick: function onClick() {}
@@ -143492,7 +143514,8 @@ const require$$2$k = _dll_react;
143492
143514
  return newObj;
143493
143515
  }
143494
143516
  var backends = [{
143495
- backend: _reactDndHtml5Backend.HTML5Backend
143517
+ backend: _reactDndHtml5Backend.HTML5Backend,
143518
+ transition: _reactDndMultiBackend.MouseTransition
143496
143519
  }, {
143497
143520
  backend: _reactDndTouchBackend.TouchBackend,
143498
143521
  options: {
@@ -144707,8 +144730,7 @@ const require$$18$3 = _dll_classnames;
144707
144730
  fontSize: 'inherit',
144708
144731
  maxWidth: '374px',
144709
144732
  position: 'relative',
144710
- borderRadius: '3px',
144711
- margin: '8px'
144733
+ borderRadius: '3px'
144712
144734
  },
144713
144735
  chipLabel: {
144714
144736
  whiteSpace: 'normal',
@@ -169957,7 +169979,8 @@ const require$$12$1 = _dll_debug;
169957
169979
  var dataURL = reader.result;
169958
169980
  _this.setState({
169959
169981
  fileUpload: _objectSpread(_objectSpread({}, _this.state.fileUpload), {}, {
169960
- url: dataURL
169982
+ url: dataURL,
169983
+ mimeType: fileChosen.type
169961
169984
  })
169962
169985
  });
169963
169986
  };
@@ -170017,7 +170040,8 @@ const require$$12$1 = _dll_debug;
170017
170040
  _this.setState({
170018
170041
  fileUpload: _objectSpread(_objectSpread({}, _this.state.fileUpload), {}, {
170019
170042
  loading: false,
170020
- url: ''
170043
+ url: '',
170044
+ mimeType: ''
170021
170045
  })
170022
170046
  });
170023
170047
  case 2:
@@ -170043,7 +170067,8 @@ const require$$12$1 = _dll_debug;
170043
170067
  error: null,
170044
170068
  loading: false,
170045
170069
  scheduled: false,
170046
- url: ''
170070
+ url: '',
170071
+ mimeType: ''
170047
170072
  }
170048
170073
  };
170049
170074
  return _this;
@@ -170064,7 +170089,7 @@ const require$$12$1 = _dll_debug;
170064
170089
  value: function render() {
170065
170090
  var _this2 = this;
170066
170091
  var _this$props = this.props, classes = _this$props.classes, open = _this$props.open, disablePortal = _this$props.disablePortal, type = _this$props.type, edit = _this$props.edit, uploadSoundSupport = _this$props.uploadSoundSupport;
170067
- var _this$state4 = this.state, ends = _this$state4.ends, height = _this$state4.height, invalid = _this$state4.invalid, starts = _this$state4.starts, width = _this$state4.width, url = _this$state4.url, formattedUrl = _this$state4.formattedUrl, updating = _this$state4.updating, tabValue = _this$state4.tabValue, fileUpload = _this$state4.fileUpload;
170092
+ var _this$state4 = this.state, ends = _this$state4.ends, height = _this$state4.height, invalid = _this$state4.invalid, starts = _this$state4.starts, width = _this$state4.width, url = _this$state4.url, mimeType = _this$state4.mimeType, formattedUrl = _this$state4.formattedUrl, updating = _this$state4.updating, tabValue = _this$state4.tabValue, fileUpload = _this$state4.fileUpload;
170068
170093
  var isYoutube = matchYoutubeUrl(url);
170069
170094
  var isInsertURL = tabValue === tabsTypeMap.insertUrl;
170070
170095
  var isUploadMedia = tabValue === tabsTypeMap.uploadFile;
@@ -170169,7 +170194,7 @@ const require$$12$1 = _dll_debug;
170169
170194
  controls: "controls",
170170
170195
  controlsList: "nodownload"
170171
170196
  }, _react["default"].createElement("source", {
170172
- type: "audio/mp3",
170197
+ type: mimeType,
170173
170198
  src: fileUpload.url
170174
170199
  })), _react["default"].createElement(_IconButton["default"], {
170175
170200
  "aria-label": "delete",
@@ -177502,7 +177527,7 @@ const require$$13$1 = _dll_prop_types;
177502
177527
  editorHolder: {
177503
177528
  position: 'relative',
177504
177529
  padding: '0px',
177505
- overflowY: 'scroll',
177530
+ overflowY: 'auto',
177506
177531
  color: _renderUi.color.text(),
177507
177532
  backgroundColor: _renderUi.color.background(),
177508
177533
  '&::before': {
@@ -183635,7 +183660,7 @@ var en = {};
183635
183660
  },
183636
183661
  imageClozeAssociation: {
183637
183662
  reachedLimit_one: 'You’ve reached the limit of {{count}} response per area. To add another response, one must first be removed.',
183638
- reachedLimit_other: 'You’ve reached the limit of {{count}} responses per area. To add another response, one must first be removed.'
183663
+ reachedLimit_other: 'Full'
183639
183664
  },
183640
183665
  drawingResponse: {
183641
183666
  fillColor: 'Fill color',
@@ -183728,7 +183753,7 @@ var es = {};
183728
183753
  },
183729
183754
  imageClozeAssociation: {
183730
183755
  reachedLimit_one: 'Has alcanzado el límite de {{count}} respuesta por área. Para agregar otra respuesta, primero se debe eliminar una respuesta.',
183731
- reachedLimit_other: 'Has alcanzado el límite de {{count}} respuestas por área. Para agregar otra respuesta, primero se debe eliminar una respuesta.'
183756
+ reachedLimit_other: 'Lleno'
183732
183757
  },
183733
183758
  drawingResponse: {
183734
183759
  fillColor: 'Color de relleno',
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "access": "public"
5
5
  },
6
6
  "repository": "pie-framework/pie-elements",
7
- "version": "7.2.9-next.20+e7e5cd4eb",
7
+ "version": "7.2.9-next.22+6517bb532",
8
8
  "description": "",
9
9
  "scripts": {
10
10
  "postpublish": "../../scripts/postpublish"
@@ -12,7 +12,7 @@
12
12
  "dependencies": {
13
13
  "@material-ui/core": "^3.9.2",
14
14
  "@pie-framework/pie-player-events": "^0.1.0",
15
- "@pie-lib/pie-toolbox": "2.6.1",
15
+ "@pie-lib/pie-toolbox": "2.7.0",
16
16
  "classnames": "^2.2.5",
17
17
  "lodash": "^4.17.10",
18
18
  "prop-types": "^15.6.1",
@@ -21,7 +21,7 @@
21
21
  },
22
22
  "author": "",
23
23
  "license": "ISC",
24
- "gitHead": "e7e5cd4eb2d1360d4b18ff8f0756cff448dc1574",
24
+ "gitHead": "6517bb532d2b416fdf57525a3d50c62c83fdc543",
25
25
  "main": "lib/index.js",
26
26
  "module": "src/index.js",
27
27
  "exports": {