@pie-element/passage 2.21.7-next.6 → 2.21.8-next.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5562,9 +5562,10 @@ class Main extends React$1.Component {
5562
5562
  }
5563
5563
  render() {
5564
5564
  const {model, classes, configuration, imageSupport, onConfigurationChanged, onModelChanged, uploadSoundSupport} = this.props;
5565
- const {settingsPanelDisabled, language = {}, languageChoices = {}, maxImageWidth = {}, maxImageHeight = {}, mathMlOptions = {}, baseInputConfiguration = {}, teacherInstructions = {}, title, subtitle, text, author} = configuration || ({});
5566
- const {errors = {}, teacherInstructionsEnabled, titleEnabled, subtitleEnabled, authorEnabled, textEnabled} = model || ({});
5567
- const {teacherInstructions: teacherInstructionsError, title: titleError, subtitle: subtitleError, author: authorError, text: textError} = errors || ({});
5565
+ const {settingsPanelDisabled, language = {}, languageChoices = {}, maxImageWidth = {}, maxImageHeight = {}, mathMlOptions = {}, baseInputConfiguration = {}, teacherInstructions = {}, title = {}, subtitle = {}, text = {}, author = {}} = configuration || ({});
5566
+ const {errors = {}, passages = [], teacherInstructionsEnabled, titleEnabled, subtitleEnabled, authorEnabled, textEnabled} = model || ({});
5567
+ const {passages: passagesErrors} = errors || ({});
5568
+ const {teacherInstructions: teacherInstructionsError, title: titleError, subtitle: subtitleError, author: authorError, text: textError} = passagesErrors && passagesErrors[0] || ({});
5568
5569
  const defaultImageMaxWidth = maxImageWidth && maxImageWidth.prompt;
5569
5570
  const defaultImageMaxHeight = maxImageHeight && maxImageHeight.prompt;
5570
5571
  const panelSettings = {
@@ -5598,159 +5599,159 @@ class Main extends React$1.Component {
5598
5599
  __self: this,
5599
5600
  __source: {
5600
5601
  fileName: _jsxFileName,
5601
- lineNumber: 90
5602
+ lineNumber: 103
5602
5603
  }
5603
5604
  }),
5604
5605
  __self: this,
5605
5606
  __source: {
5606
5607
  fileName: _jsxFileName,
5607
- lineNumber: 87
5608
+ lineNumber: 100
5608
5609
  }
5609
- }, titleEnabled && React$1.createElement(InputContainer, {
5610
- label: title.label,
5610
+ }, teacherInstructionsEnabled && React$1.createElement(InputContainer, {
5611
+ label: teacherInstructions.label,
5611
5612
  className: classes.inputContainer,
5612
5613
  __self: this,
5613
5614
  __source: {
5614
5615
  fileName: _jsxFileName,
5615
- lineNumber: 103
5616
+ lineNumber: 116
5616
5617
  }
5617
5618
  }, React$1.createElement(EditableHtml, {
5618
5619
  activePlugins: ALL_PLUGINS,
5619
- markup: model.passages[0].title || '',
5620
- onChange: value => this.handleChange('title', value),
5620
+ markup: passages[0].teacherInstructions || '',
5621
+ onChange: value => this.handleChange('teacherInstructions', value),
5621
5622
  nonEmpty: false,
5622
- error: titleError,
5623
+ error: teacherInstructionsError,
5624
+ maxImageWidth: maxImageWidth && maxImageWidth.teacherInstructions || defaultImageMaxWidth,
5625
+ maxImageHeight: maxImageHeight && maxImageHeight.teacherInstructions || defaultImageMaxHeight,
5623
5626
  mathMlOptions: mathMlOptions,
5624
5627
  languageCharactersProps: [{
5625
5628
  language: 'spanish'
5626
5629
  }, {
5627
5630
  language: 'special'
5628
5631
  }],
5629
- pluginProps: getPluginProps(_optionalChain([title, 'optionalAccess', _ => _.inputConfiguration])),
5632
+ pluginProps: getPluginProps(_optionalChain([teacherInstructions, 'optionalAccess', _ => _.inputConfiguration])),
5630
5633
  __self: this,
5631
5634
  __source: {
5632
5635
  fileName: _jsxFileName,
5633
- lineNumber: 104
5636
+ lineNumber: 117
5634
5637
  }
5635
- }), titleError && React$1.createElement('div', {
5638
+ }), teacherInstructionsError && React$1.createElement('div', {
5636
5639
  className: classes.errorText,
5637
5640
  __self: this,
5638
5641
  __source: {
5639
5642
  fileName: _jsxFileName,
5640
- lineNumber: 114
5643
+ lineNumber: 129
5641
5644
  }
5642
- }, titleError)), subtitleEnabled && React$1.createElement(InputContainer, {
5643
- label: subtitle.label,
5645
+ }, teacherInstructionsError)), titleEnabled && React$1.createElement(InputContainer, {
5646
+ label: title.label,
5644
5647
  className: classes.inputContainer,
5645
5648
  __self: this,
5646
5649
  __source: {
5647
5650
  fileName: _jsxFileName,
5648
- lineNumber: 118
5651
+ lineNumber: 134
5649
5652
  }
5650
5653
  }, React$1.createElement(EditableHtml, {
5651
5654
  activePlugins: ALL_PLUGINS,
5652
- markup: model.passages[0].subtitle || '',
5653
- onChange: value => this.handleChange('subtitle', value),
5655
+ markup: passages[0].title || '',
5656
+ onChange: value => this.handleChange('title', value),
5654
5657
  nonEmpty: false,
5655
- error: subtitleError,
5658
+ error: titleError,
5656
5659
  mathMlOptions: mathMlOptions,
5657
5660
  languageCharactersProps: [{
5658
5661
  language: 'spanish'
5659
5662
  }, {
5660
5663
  language: 'special'
5661
5664
  }],
5662
- pluginProps: getPluginProps(_optionalChain([subtitle, 'optionalAccess', _2 => _2.inputConfiguration])),
5665
+ pluginProps: getPluginProps(_optionalChain([title, 'optionalAccess', _2 => _2.inputConfiguration])),
5663
5666
  __self: this,
5664
5667
  __source: {
5665
5668
  fileName: _jsxFileName,
5666
- lineNumber: 119
5669
+ lineNumber: 135
5667
5670
  }
5668
- }), subtitleError && React$1.createElement('div', {
5671
+ }), titleError && React$1.createElement('div', {
5669
5672
  className: classes.errorText,
5670
5673
  __self: this,
5671
5674
  __source: {
5672
5675
  fileName: _jsxFileName,
5673
- lineNumber: 129
5676
+ lineNumber: 145
5674
5677
  }
5675
- }, subtitleError)), authorEnabled && React$1.createElement(InputContainer, {
5676
- label: author.label,
5678
+ }, titleError)), subtitleEnabled && React$1.createElement(InputContainer, {
5679
+ label: subtitle.label,
5677
5680
  className: classes.inputContainer,
5678
5681
  __self: this,
5679
5682
  __source: {
5680
5683
  fileName: _jsxFileName,
5681
- lineNumber: 133
5684
+ lineNumber: 150
5682
5685
  }
5683
5686
  }, React$1.createElement(EditableHtml, {
5684
5687
  activePlugins: ALL_PLUGINS,
5685
- markup: model.passages[0].author || '',
5686
- onChange: value => this.handleChange('author', value),
5688
+ markup: passages[0].subtitle || '',
5689
+ onChange: value => this.handleChange('subtitle', value),
5687
5690
  nonEmpty: false,
5688
- error: authorError,
5691
+ error: subtitleError,
5689
5692
  mathMlOptions: mathMlOptions,
5690
5693
  languageCharactersProps: [{
5691
5694
  language: 'spanish'
5692
5695
  }, {
5693
5696
  language: 'special'
5694
5697
  }],
5695
- pluginProps: getPluginProps(_optionalChain([author, 'optionalAccess', _3 => _3.inputConfiguration])),
5698
+ pluginProps: getPluginProps(_optionalChain([subtitle, 'optionalAccess', _3 => _3.inputConfiguration])),
5696
5699
  __self: this,
5697
5700
  __source: {
5698
5701
  fileName: _jsxFileName,
5699
- lineNumber: 134
5702
+ lineNumber: 151
5700
5703
  }
5701
- }), authorError && React$1.createElement('div', {
5704
+ }), subtitleError && React$1.createElement('div', {
5702
5705
  className: classes.errorText,
5703
5706
  __self: this,
5704
5707
  __source: {
5705
5708
  fileName: _jsxFileName,
5706
- lineNumber: 144
5709
+ lineNumber: 161
5707
5710
  }
5708
- }, authorError)), teacherInstructionsEnabled && React$1.createElement(InputContainer, {
5709
- label: teacherInstructions.label,
5711
+ }, subtitleError)), authorEnabled && React$1.createElement(InputContainer, {
5712
+ label: author.label,
5710
5713
  className: classes.inputContainer,
5711
5714
  __self: this,
5712
5715
  __source: {
5713
5716
  fileName: _jsxFileName,
5714
- lineNumber: 148
5717
+ lineNumber: 166
5715
5718
  }
5716
5719
  }, React$1.createElement(EditableHtml, {
5717
5720
  activePlugins: ALL_PLUGINS,
5718
- markup: model.passages[0].teacherInstructions || '',
5719
- onChange: value => this.handleChange('teacherInstructions', value),
5721
+ markup: passages[0].author || '',
5722
+ onChange: value => this.handleChange('author', value),
5720
5723
  nonEmpty: false,
5721
- error: teacherInstructionsError,
5722
- maxImageWidth: maxImageWidth && maxImageWidth.teacherInstructions || defaultImageMaxWidth,
5723
- maxImageHeight: maxImageHeight && maxImageHeight.teacherInstructions || defaultImageMaxHeight,
5724
+ error: authorError,
5724
5725
  mathMlOptions: mathMlOptions,
5725
5726
  languageCharactersProps: [{
5726
5727
  language: 'spanish'
5727
5728
  }, {
5728
5729
  language: 'special'
5729
5730
  }],
5730
- pluginProps: getPluginProps(_optionalChain([teacherInstructions, 'optionalAccess', _4 => _4.inputConfiguration])),
5731
+ pluginProps: getPluginProps(_optionalChain([author, 'optionalAccess', _4 => _4.inputConfiguration])),
5731
5732
  __self: this,
5732
5733
  __source: {
5733
5734
  fileName: _jsxFileName,
5734
- lineNumber: 149
5735
+ lineNumber: 167
5735
5736
  }
5736
- }), teacherInstructionsError && React$1.createElement('div', {
5737
+ }), authorError && React$1.createElement('div', {
5737
5738
  className: classes.errorText,
5738
5739
  __self: this,
5739
5740
  __source: {
5740
5741
  fileName: _jsxFileName,
5741
- lineNumber: 161
5742
+ lineNumber: 177
5742
5743
  }
5743
- }, teacherInstructionsError)), textEnabled && React$1.createElement(InputContainer, {
5744
+ }, authorError)), textEnabled && React$1.createElement(InputContainer, {
5744
5745
  label: text.label,
5745
5746
  className: classes.inputContainer,
5746
5747
  __self: this,
5747
5748
  __source: {
5748
5749
  fileName: _jsxFileName,
5749
- lineNumber: 165
5750
+ lineNumber: 182
5750
5751
  }
5751
5752
  }, React$1.createElement(EditableHtml, {
5752
5753
  activePlugins: ALL_PLUGINS,
5753
- markup: model.passages[0].text || '',
5754
+ markup: passages[0].text || '',
5754
5755
  onChange: value => this.handleChange('text', value),
5755
5756
  imageSupport: imageSupport,
5756
5757
  uploadSoundSupport: uploadSoundSupport,
@@ -5768,14 +5769,14 @@ class Main extends React$1.Component {
5768
5769
  __self: this,
5769
5770
  __source: {
5770
5771
  fileName: _jsxFileName,
5771
- lineNumber: 166
5772
+ lineNumber: 183
5772
5773
  }
5773
5774
  }), textError && React$1.createElement('div', {
5774
5775
  className: classes.errorText,
5775
5776
  __self: this,
5776
5777
  __source: {
5777
5778
  fileName: _jsxFileName,
5778
- lineNumber: 180
5779
+ lineNumber: 197
5779
5780
  }
5780
5781
  }, textError)));
5781
5782
  }
@@ -5798,8 +5799,8 @@ var defaultValues = {
5798
5799
  teacherInstructionsEnabled: true,
5799
5800
  titleEnabled: true,
5800
5801
  subtitleEnabled: true,
5801
- textEnabled: true,
5802
5802
  authorEnabled: true,
5803
+ textEnabled: true,
5803
5804
  passages: [{
5804
5805
  teacherInstructions: '',
5805
5806
  title: '',