@pie-element/complex-rubric 3.4.6-next.2 → 3.4.6-next.6

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.
@@ -7,7 +7,7 @@
7
7
  "test": "echo \"Error: no test specified\" && exit 1"
8
8
  },
9
9
  "dependencies": {
10
- "@pie-lib/pie-toolbox": "2.9.5",
10
+ "@pie-lib/pie-toolbox": "2.10.0",
11
11
  "lodash": "^4.17.15"
12
12
  },
13
13
  "author": "",
@@ -1,6 +1,6 @@
1
- import {_dll_react, _dll_prop_types, _dll_classnames, _dll_react_dom, _dll_debug, _dll_lodash, _dll_react_dom_server, _dll_pie_framework__mathquill} from "../../../@pie-lib/pie-toolbox-math-rendering-module@3.3.4/module/index.js";
1
+ import {_dll_react, _dll_prop_types, _dll_classnames, _dll_react_dom, _dll_debug, _dll_lodash, _dll_react_dom_server, _dll_pie_framework__mathquill} from "../../../@pie-lib/pie-toolbox-math-rendering-module@3.3.5/module/index.js";
2
2
  import RubricConfigure from '@pie-element/rubric/configure/lib';
3
- import {_dll_pie_lib__pie_toolbox_editable_html, _dll_pie_lib__pie_toolbox_render_ui, _dll_pie_lib__pie_toolbox_config_ui} from "../../../@pie-lib/pie-toolbox-module@5.10.4/module/index.js";
3
+ import {_dll_pie_lib__pie_toolbox_editable_html, _dll_pie_lib__pie_toolbox_render_ui, _dll_pie_lib__pie_toolbox_config_ui} from "../../../@pie-lib/pie-toolbox-module@5.10.5/module/index.js";
4
4
  function _mergeNamespaces(n, m) {
5
5
  m.forEach(function (e) {
6
6
  e && typeof e !== 'string' && !Array.isArray(e) && Object.keys(e).forEach(function (k) {
@@ -126757,7 +126757,7 @@ const require$$11$G = _dll_prop_types;
126757
126757
  }
126758
126758
  _this = _super.call.apply(_super, [this].concat(args));
126759
126759
  (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "parsedText", function (text) {
126760
- var autoplayAudioEnabled = _this.props.autoplayAudioEnabled;
126760
+ var customAudioButton = _this.props.customAudioButton;
126761
126761
  var div = document.createElement('div');
126762
126762
  div.innerHTML = text;
126763
126763
  var audio = div.querySelector('audio');
@@ -126766,25 +126766,101 @@ const require$$11$G = _dll_prop_types;
126766
126766
  source.setAttribute('type', 'audio/mp3');
126767
126767
  source.setAttribute('src', audio.getAttribute('src'));
126768
126768
  audio.removeAttribute('src');
126769
- if (autoplayAudioEnabled) {
126770
- audio.setAttribute('autoplay', 'autoplay');
126771
- }
126769
+ audio.setAttribute('id', 'pie-prompt-audio-player');
126772
126770
  audio.appendChild(source);
126771
+ if (customAudioButton) {
126772
+ audio.style.display = 'none';
126773
+ var playButton = document.createElement('div');
126774
+ playButton.id = 'play-audio-button';
126775
+ Object.assign(playButton.style, {
126776
+ cursor: 'pointer',
126777
+ display: 'block',
126778
+ width: '128px',
126779
+ height: '128px',
126780
+ backgroundImage: ("url(").concat(customAudioButton.pauseImage, ")"),
126781
+ backgroundSize: 'cover',
126782
+ borderRadius: '50%',
126783
+ border: '1px solid #326295'
126784
+ });
126785
+ audio.parentNode.insertBefore(playButton, audio);
126786
+ }
126773
126787
  }
126774
126788
  return div.innerHTML;
126775
126789
  });
126776
126790
  return _this;
126777
126791
  }
126778
126792
  (0, _createClass2["default"])(PreviewPrompt, [{
126793
+ key: "addCustomAudioButtonControls",
126794
+ value: function addCustomAudioButtonControls() {
126795
+ var _this$props = this.props, autoplayAudioEnabled = _this$props.autoplayAudioEnabled, customAudioButton = _this$props.customAudioButton;
126796
+ var playButton = document.getElementById('play-audio-button');
126797
+ var audio = document.getElementById('pie-prompt-audio-player');
126798
+ if (autoplayAudioEnabled && audio) {
126799
+ audio.play().then(function () {
126800
+ if (playButton && customAudioButton) {
126801
+ audio.addEventListener('ended', handleAudioEnded);
126802
+ }
126803
+ })["catch"](function (error) {
126804
+ console.error('Error playing audio', error);
126805
+ });
126806
+ }
126807
+ if (!playButton || !audio || !customAudioButton) return;
126808
+ var handlePlayClick = function handlePlayClick() {
126809
+ if (!audio.paused) return;
126810
+ if (playButton.style.backgroundImage.includes(customAudioButton.pauseImage)) return;
126811
+ audio.play();
126812
+ };
126813
+ var handleAudioEnded = function handleAudioEnded() {
126814
+ playButton.style.backgroundImage = ("url(").concat(customAudioButton.playImage, ")");
126815
+ };
126816
+ var handleAudioPlay = function handleAudioPlay() {
126817
+ Object.assign(playButton.style, {
126818
+ backgroundImage: ("url(").concat(customAudioButton.pauseImage, ")"),
126819
+ border: '1px solid #ccc'
126820
+ });
126821
+ };
126822
+ var handleAudioPause = function handleAudioPause() {
126823
+ Object.assign(playButton.style, {
126824
+ backgroundImage: ("url(").concat(customAudioButton.playImage, ")"),
126825
+ border: '1px solid #326295'
126826
+ });
126827
+ };
126828
+ playButton.addEventListener('click', handlePlayClick);
126829
+ audio.addEventListener('play', handleAudioPlay);
126830
+ audio.addEventListener('pause', handleAudioPause);
126831
+ audio.addEventListener('ended', handleAudioEnded);
126832
+ this._handlePlayClick = handlePlayClick;
126833
+ this._handleAudioPlay = handleAudioPlay;
126834
+ this._handleAudioPause = handleAudioPause;
126835
+ this._handleAudioEnded = handleAudioEnded;
126836
+ }
126837
+ }, {
126838
+ key: "removeCustomAudioButtonListeners",
126839
+ value: function removeCustomAudioButtonListeners() {
126840
+ var playButton = document.getElementById('play-audio-button');
126841
+ var audio = document.querySelector('audio');
126842
+ if (!playButton || !audio) return;
126843
+ playButton.removeEventListener('click', this._handlePlayClick);
126844
+ audio.removeEventListener('play', this._handleAudioPlay);
126845
+ audio.removeEventListener('pause', this._handleAudioPause);
126846
+ audio.removeEventListener('ended', this._handleAudioEnded);
126847
+ }
126848
+ }, {
126779
126849
  key: "componentDidMount",
126780
126850
  value: function componentDidMount() {
126781
126851
  this.alignImages();
126852
+ this.addCustomAudioButtonControls();
126782
126853
  }
126783
126854
  }, {
126784
126855
  key: "componentDidUpdate",
126785
126856
  value: function componentDidUpdate() {
126786
126857
  this.alignImages();
126787
126858
  }
126859
+ }, {
126860
+ key: "componentWillUnmount",
126861
+ value: function componentWillUnmount() {
126862
+ this.removeCustomAudioButtonListeners();
126863
+ }
126788
126864
  }, {
126789
126865
  key: "alignImages",
126790
126866
  value: function alignImages() {
@@ -126819,7 +126895,7 @@ const require$$11$G = _dll_prop_types;
126819
126895
  }, {
126820
126896
  key: "render",
126821
126897
  value: function render() {
126822
- var _this$props = this.props, prompt = _this$props.prompt, classes = _this$props.classes, tagName = _this$props.tagName, className = _this$props.className, onClick = _this$props.onClick, defaultClassName = _this$props.defaultClassName;
126898
+ var _this$props2 = this.props, prompt = _this$props2.prompt, classes = _this$props2.classes, tagName = _this$props2.tagName, className = _this$props2.className, onClick = _this$props2.onClick, defaultClassName = _this$props2.defaultClassName;
126823
126899
  var CustomTag = tagName || 'div';
126824
126900
  var legendClass = tagName === 'legend' ? 'legend' : '';
126825
126901
  var customClasses = ("").concat(classes.promptTable, " ").concat(classes[className] || '', " ").concat(defaultClassName || '', " ").concat(classes[legendClass] || '');
@@ -126843,7 +126919,11 @@ const require$$11$G = _dll_prop_types;
126843
126919
  className: _propTypes["default"].string,
126844
126920
  onClick: _propTypes["default"].func,
126845
126921
  defaultClassName: _propTypes["default"].string,
126846
- autoplayAudioEnabled: _propTypes["default"].bool
126922
+ autoplayAudioEnabled: _propTypes["default"].bool,
126923
+ customAudioButton: {
126924
+ playImage: _propTypes["default"].string,
126925
+ pauseImage: _propTypes["default"].string
126926
+ }
126847
126927
  });
126848
126928
  (0, _defineProperty2["default"])(PreviewPrompt, "defaultProps", {
126849
126929
  onClick: function onClick() {}
package/module/element.js CHANGED
@@ -1,5 +1,5 @@
1
- import {_dll_react, _dll_prop_types, _dll_react_dom, _dll_classnames, _dll_debug, _dll_pie_lib__pie_toolbox_math_rendering, _dll_lodash, _dll_react_dom_server, _dll_pie_framework__mathquill} from "../../../@pie-lib/pie-toolbox-math-rendering-module@3.3.4/module/index.js";
2
- import {_dll_pie_lib__pie_toolbox_render_ui} from "../../../@pie-lib/pie-toolbox-module@5.10.4/module/index.js";
1
+ import {_dll_react, _dll_prop_types, _dll_react_dom, _dll_classnames, _dll_debug, _dll_pie_lib__pie_toolbox_math_rendering, _dll_lodash, _dll_react_dom_server, _dll_pie_framework__mathquill} from "../../../@pie-lib/pie-toolbox-math-rendering-module@3.3.5/module/index.js";
2
+ import {_dll_pie_lib__pie_toolbox_render_ui} from "../../../@pie-lib/pie-toolbox-module@5.10.5/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) {
@@ -142720,7 +142720,7 @@ const require$$11$B = _dll_prop_types;
142720
142720
  }
142721
142721
  _this = _super.call.apply(_super, [this].concat(args));
142722
142722
  (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "parsedText", function (text) {
142723
- var autoplayAudioEnabled = _this.props.autoplayAudioEnabled;
142723
+ var customAudioButton = _this.props.customAudioButton;
142724
142724
  var div = document.createElement('div');
142725
142725
  div.innerHTML = text;
142726
142726
  var audio = div.querySelector('audio');
@@ -142729,25 +142729,101 @@ const require$$11$B = _dll_prop_types;
142729
142729
  source.setAttribute('type', 'audio/mp3');
142730
142730
  source.setAttribute('src', audio.getAttribute('src'));
142731
142731
  audio.removeAttribute('src');
142732
- if (autoplayAudioEnabled) {
142733
- audio.setAttribute('autoplay', 'autoplay');
142734
- }
142732
+ audio.setAttribute('id', 'pie-prompt-audio-player');
142735
142733
  audio.appendChild(source);
142734
+ if (customAudioButton) {
142735
+ audio.style.display = 'none';
142736
+ var playButton = document.createElement('div');
142737
+ playButton.id = 'play-audio-button';
142738
+ Object.assign(playButton.style, {
142739
+ cursor: 'pointer',
142740
+ display: 'block',
142741
+ width: '128px',
142742
+ height: '128px',
142743
+ backgroundImage: ("url(").concat(customAudioButton.pauseImage, ")"),
142744
+ backgroundSize: 'cover',
142745
+ borderRadius: '50%',
142746
+ border: '1px solid #326295'
142747
+ });
142748
+ audio.parentNode.insertBefore(playButton, audio);
142749
+ }
142736
142750
  }
142737
142751
  return div.innerHTML;
142738
142752
  });
142739
142753
  return _this;
142740
142754
  }
142741
142755
  (0, _createClass2["default"])(PreviewPrompt, [{
142756
+ key: "addCustomAudioButtonControls",
142757
+ value: function addCustomAudioButtonControls() {
142758
+ var _this$props = this.props, autoplayAudioEnabled = _this$props.autoplayAudioEnabled, customAudioButton = _this$props.customAudioButton;
142759
+ var playButton = document.getElementById('play-audio-button');
142760
+ var audio = document.getElementById('pie-prompt-audio-player');
142761
+ if (autoplayAudioEnabled && audio) {
142762
+ audio.play().then(function () {
142763
+ if (playButton && customAudioButton) {
142764
+ audio.addEventListener('ended', handleAudioEnded);
142765
+ }
142766
+ })["catch"](function (error) {
142767
+ console.error('Error playing audio', error);
142768
+ });
142769
+ }
142770
+ if (!playButton || !audio || !customAudioButton) return;
142771
+ var handlePlayClick = function handlePlayClick() {
142772
+ if (!audio.paused) return;
142773
+ if (playButton.style.backgroundImage.includes(customAudioButton.pauseImage)) return;
142774
+ audio.play();
142775
+ };
142776
+ var handleAudioEnded = function handleAudioEnded() {
142777
+ playButton.style.backgroundImage = ("url(").concat(customAudioButton.playImage, ")");
142778
+ };
142779
+ var handleAudioPlay = function handleAudioPlay() {
142780
+ Object.assign(playButton.style, {
142781
+ backgroundImage: ("url(").concat(customAudioButton.pauseImage, ")"),
142782
+ border: '1px solid #ccc'
142783
+ });
142784
+ };
142785
+ var handleAudioPause = function handleAudioPause() {
142786
+ Object.assign(playButton.style, {
142787
+ backgroundImage: ("url(").concat(customAudioButton.playImage, ")"),
142788
+ border: '1px solid #326295'
142789
+ });
142790
+ };
142791
+ playButton.addEventListener('click', handlePlayClick);
142792
+ audio.addEventListener('play', handleAudioPlay);
142793
+ audio.addEventListener('pause', handleAudioPause);
142794
+ audio.addEventListener('ended', handleAudioEnded);
142795
+ this._handlePlayClick = handlePlayClick;
142796
+ this._handleAudioPlay = handleAudioPlay;
142797
+ this._handleAudioPause = handleAudioPause;
142798
+ this._handleAudioEnded = handleAudioEnded;
142799
+ }
142800
+ }, {
142801
+ key: "removeCustomAudioButtonListeners",
142802
+ value: function removeCustomAudioButtonListeners() {
142803
+ var playButton = document.getElementById('play-audio-button');
142804
+ var audio = document.querySelector('audio');
142805
+ if (!playButton || !audio) return;
142806
+ playButton.removeEventListener('click', this._handlePlayClick);
142807
+ audio.removeEventListener('play', this._handleAudioPlay);
142808
+ audio.removeEventListener('pause', this._handleAudioPause);
142809
+ audio.removeEventListener('ended', this._handleAudioEnded);
142810
+ }
142811
+ }, {
142742
142812
  key: "componentDidMount",
142743
142813
  value: function componentDidMount() {
142744
142814
  this.alignImages();
142815
+ this.addCustomAudioButtonControls();
142745
142816
  }
142746
142817
  }, {
142747
142818
  key: "componentDidUpdate",
142748
142819
  value: function componentDidUpdate() {
142749
142820
  this.alignImages();
142750
142821
  }
142822
+ }, {
142823
+ key: "componentWillUnmount",
142824
+ value: function componentWillUnmount() {
142825
+ this.removeCustomAudioButtonListeners();
142826
+ }
142751
142827
  }, {
142752
142828
  key: "alignImages",
142753
142829
  value: function alignImages() {
@@ -142782,7 +142858,7 @@ const require$$11$B = _dll_prop_types;
142782
142858
  }, {
142783
142859
  key: "render",
142784
142860
  value: function render() {
142785
- var _this$props = this.props, prompt = _this$props.prompt, classes = _this$props.classes, tagName = _this$props.tagName, className = _this$props.className, onClick = _this$props.onClick, defaultClassName = _this$props.defaultClassName;
142861
+ var _this$props2 = this.props, prompt = _this$props2.prompt, classes = _this$props2.classes, tagName = _this$props2.tagName, className = _this$props2.className, onClick = _this$props2.onClick, defaultClassName = _this$props2.defaultClassName;
142786
142862
  var CustomTag = tagName || 'div';
142787
142863
  var legendClass = tagName === 'legend' ? 'legend' : '';
142788
142864
  var customClasses = ("").concat(classes.promptTable, " ").concat(classes[className] || '', " ").concat(defaultClassName || '', " ").concat(classes[legendClass] || '');
@@ -142806,7 +142882,11 @@ const require$$11$B = _dll_prop_types;
142806
142882
  className: _propTypes["default"].string,
142807
142883
  onClick: _propTypes["default"].func,
142808
142884
  defaultClassName: _propTypes["default"].string,
142809
- autoplayAudioEnabled: _propTypes["default"].bool
142885
+ autoplayAudioEnabled: _propTypes["default"].bool,
142886
+ customAudioButton: {
142887
+ playImage: _propTypes["default"].string,
142888
+ pauseImage: _propTypes["default"].string
142889
+ }
142810
142890
  });
142811
142891
  (0, _defineProperty2["default"])(PreviewPrompt, "defaultProps", {
142812
142892
  onClick: function onClick() {}
@@ -4,11 +4,11 @@
4
4
  "modules": [
5
5
  {
6
6
  "name": "@pie-lib/pie-toolbox-math-rendering-module",
7
- "version": "3.3.4"
7
+ "version": "3.3.5"
8
8
  },
9
9
  {
10
10
  "name": "@pie-lib/pie-toolbox-module",
11
- "version": "5.10.4"
11
+ "version": "5.10.5"
12
12
  }
13
13
  ]
14
14
  }
package/module/print.js CHANGED
@@ -1,5 +1,5 @@
1
- import {_dll_react, _dll_prop_types, _dll_react_dom, _dll_classnames, _dll_debug, _dll_pie_lib__pie_toolbox_math_rendering, _dll_lodash, _dll_react_dom_server, _dll_pie_framework__mathquill} from "../../../@pie-lib/pie-toolbox-math-rendering-module@3.3.4/module/index.js";
2
- import {_dll_pie_lib__pie_toolbox_render_ui} from "../../../@pie-lib/pie-toolbox-module@5.10.4/module/index.js";
1
+ import {_dll_react, _dll_prop_types, _dll_react_dom, _dll_classnames, _dll_debug, _dll_pie_lib__pie_toolbox_math_rendering, _dll_lodash, _dll_react_dom_server, _dll_pie_framework__mathquill} from "../../../@pie-lib/pie-toolbox-math-rendering-module@3.3.5/module/index.js";
2
+ import {_dll_pie_lib__pie_toolbox_render_ui} from "../../../@pie-lib/pie-toolbox-module@5.10.5/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) {
@@ -142720,7 +142720,7 @@ const require$$11$B = _dll_prop_types;
142720
142720
  }
142721
142721
  _this = _super.call.apply(_super, [this].concat(args));
142722
142722
  (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "parsedText", function (text) {
142723
- var autoplayAudioEnabled = _this.props.autoplayAudioEnabled;
142723
+ var customAudioButton = _this.props.customAudioButton;
142724
142724
  var div = document.createElement('div');
142725
142725
  div.innerHTML = text;
142726
142726
  var audio = div.querySelector('audio');
@@ -142729,25 +142729,101 @@ const require$$11$B = _dll_prop_types;
142729
142729
  source.setAttribute('type', 'audio/mp3');
142730
142730
  source.setAttribute('src', audio.getAttribute('src'));
142731
142731
  audio.removeAttribute('src');
142732
- if (autoplayAudioEnabled) {
142733
- audio.setAttribute('autoplay', 'autoplay');
142734
- }
142732
+ audio.setAttribute('id', 'pie-prompt-audio-player');
142735
142733
  audio.appendChild(source);
142734
+ if (customAudioButton) {
142735
+ audio.style.display = 'none';
142736
+ var playButton = document.createElement('div');
142737
+ playButton.id = 'play-audio-button';
142738
+ Object.assign(playButton.style, {
142739
+ cursor: 'pointer',
142740
+ display: 'block',
142741
+ width: '128px',
142742
+ height: '128px',
142743
+ backgroundImage: ("url(").concat(customAudioButton.pauseImage, ")"),
142744
+ backgroundSize: 'cover',
142745
+ borderRadius: '50%',
142746
+ border: '1px solid #326295'
142747
+ });
142748
+ audio.parentNode.insertBefore(playButton, audio);
142749
+ }
142736
142750
  }
142737
142751
  return div.innerHTML;
142738
142752
  });
142739
142753
  return _this;
142740
142754
  }
142741
142755
  (0, _createClass2["default"])(PreviewPrompt, [{
142756
+ key: "addCustomAudioButtonControls",
142757
+ value: function addCustomAudioButtonControls() {
142758
+ var _this$props = this.props, autoplayAudioEnabled = _this$props.autoplayAudioEnabled, customAudioButton = _this$props.customAudioButton;
142759
+ var playButton = document.getElementById('play-audio-button');
142760
+ var audio = document.getElementById('pie-prompt-audio-player');
142761
+ if (autoplayAudioEnabled && audio) {
142762
+ audio.play().then(function () {
142763
+ if (playButton && customAudioButton) {
142764
+ audio.addEventListener('ended', handleAudioEnded);
142765
+ }
142766
+ })["catch"](function (error) {
142767
+ console.error('Error playing audio', error);
142768
+ });
142769
+ }
142770
+ if (!playButton || !audio || !customAudioButton) return;
142771
+ var handlePlayClick = function handlePlayClick() {
142772
+ if (!audio.paused) return;
142773
+ if (playButton.style.backgroundImage.includes(customAudioButton.pauseImage)) return;
142774
+ audio.play();
142775
+ };
142776
+ var handleAudioEnded = function handleAudioEnded() {
142777
+ playButton.style.backgroundImage = ("url(").concat(customAudioButton.playImage, ")");
142778
+ };
142779
+ var handleAudioPlay = function handleAudioPlay() {
142780
+ Object.assign(playButton.style, {
142781
+ backgroundImage: ("url(").concat(customAudioButton.pauseImage, ")"),
142782
+ border: '1px solid #ccc'
142783
+ });
142784
+ };
142785
+ var handleAudioPause = function handleAudioPause() {
142786
+ Object.assign(playButton.style, {
142787
+ backgroundImage: ("url(").concat(customAudioButton.playImage, ")"),
142788
+ border: '1px solid #326295'
142789
+ });
142790
+ };
142791
+ playButton.addEventListener('click', handlePlayClick);
142792
+ audio.addEventListener('play', handleAudioPlay);
142793
+ audio.addEventListener('pause', handleAudioPause);
142794
+ audio.addEventListener('ended', handleAudioEnded);
142795
+ this._handlePlayClick = handlePlayClick;
142796
+ this._handleAudioPlay = handleAudioPlay;
142797
+ this._handleAudioPause = handleAudioPause;
142798
+ this._handleAudioEnded = handleAudioEnded;
142799
+ }
142800
+ }, {
142801
+ key: "removeCustomAudioButtonListeners",
142802
+ value: function removeCustomAudioButtonListeners() {
142803
+ var playButton = document.getElementById('play-audio-button');
142804
+ var audio = document.querySelector('audio');
142805
+ if (!playButton || !audio) return;
142806
+ playButton.removeEventListener('click', this._handlePlayClick);
142807
+ audio.removeEventListener('play', this._handleAudioPlay);
142808
+ audio.removeEventListener('pause', this._handleAudioPause);
142809
+ audio.removeEventListener('ended', this._handleAudioEnded);
142810
+ }
142811
+ }, {
142742
142812
  key: "componentDidMount",
142743
142813
  value: function componentDidMount() {
142744
142814
  this.alignImages();
142815
+ this.addCustomAudioButtonControls();
142745
142816
  }
142746
142817
  }, {
142747
142818
  key: "componentDidUpdate",
142748
142819
  value: function componentDidUpdate() {
142749
142820
  this.alignImages();
142750
142821
  }
142822
+ }, {
142823
+ key: "componentWillUnmount",
142824
+ value: function componentWillUnmount() {
142825
+ this.removeCustomAudioButtonListeners();
142826
+ }
142751
142827
  }, {
142752
142828
  key: "alignImages",
142753
142829
  value: function alignImages() {
@@ -142782,7 +142858,7 @@ const require$$11$B = _dll_prop_types;
142782
142858
  }, {
142783
142859
  key: "render",
142784
142860
  value: function render() {
142785
- var _this$props = this.props, prompt = _this$props.prompt, classes = _this$props.classes, tagName = _this$props.tagName, className = _this$props.className, onClick = _this$props.onClick, defaultClassName = _this$props.defaultClassName;
142861
+ var _this$props2 = this.props, prompt = _this$props2.prompt, classes = _this$props2.classes, tagName = _this$props2.tagName, className = _this$props2.className, onClick = _this$props2.onClick, defaultClassName = _this$props2.defaultClassName;
142786
142862
  var CustomTag = tagName || 'div';
142787
142863
  var legendClass = tagName === 'legend' ? 'legend' : '';
142788
142864
  var customClasses = ("").concat(classes.promptTable, " ").concat(classes[className] || '', " ").concat(defaultClassName || '', " ").concat(classes[legendClass] || '');
@@ -142806,7 +142882,11 @@ const require$$11$B = _dll_prop_types;
142806
142882
  className: _propTypes["default"].string,
142807
142883
  onClick: _propTypes["default"].func,
142808
142884
  defaultClassName: _propTypes["default"].string,
142809
- autoplayAudioEnabled: _propTypes["default"].bool
142885
+ autoplayAudioEnabled: _propTypes["default"].bool,
142886
+ customAudioButton: {
142887
+ playImage: _propTypes["default"].string,
142888
+ pauseImage: _propTypes["default"].string
142889
+ }
142810
142890
  });
142811
142891
  (0, _defineProperty2["default"])(PreviewPrompt, "defaultProps", {
142812
142892
  onClick: function onClick() {}
package/package.json CHANGED
@@ -1,21 +1,21 @@
1
1
  {
2
2
  "name": "@pie-element/complex-rubric",
3
3
  "repository": "pie-framework/pie-elements",
4
- "version": "3.4.6-next.2+959a39e31",
4
+ "version": "3.4.6-next.6+843584110",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
8
8
  "dependencies": {
9
9
  "@material-ui/core": "^3.9.2",
10
- "@pie-element/multi-trait-rubric": "^4.3.6-next.2+959a39e31",
11
- "@pie-element/rubric": "^4.4.6-next.2+959a39e31",
10
+ "@pie-element/multi-trait-rubric": "^4.3.6-next.6+843584110",
11
+ "@pie-element/rubric": "^4.4.6-next.6+843584110",
12
12
  "@pie-framework/pie-player-events": "^0.1.0",
13
13
  "classnames": "^2.2.5",
14
14
  "debug": "^4.1.1",
15
15
  "lodash": "^4.17.11",
16
16
  "prop-types": "^15.7.2"
17
17
  },
18
- "gitHead": "959a39e31af790462a237b9e533f66cee138c1ba",
18
+ "gitHead": "843584110d234c09778612f3c9607ec3c7531900",
19
19
  "scripts": {
20
20
  "postpublish": "../../scripts/postpublish"
21
21
  },