@pie-element/passage 2.21.7-next.14 → 2.21.7-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.
- package/configure/lib/defaults.js +1 -1
- package/configure/lib/defaults.js.map +1 -1
- package/configure/lib/design.js +39 -49
- package/configure/lib/design.js.map +1 -1
- package/controller/lib/defaults.js +3 -3
- package/controller/lib/defaults.js.map +1 -1
- package/controller/lib/index.js +5 -26
- package/controller/lib/index.js.map +1 -1
- package/controller/package.json +1 -4
- package/module/configure.js +53 -54
- package/module/controller.js +7 -1000
- package/package.json +2 -2
package/module/configure.js
CHANGED
|
@@ -5562,10 +5562,9 @@ 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
|
|
5566
|
-
const {errors = {},
|
|
5567
|
-
const {
|
|
5568
|
-
const {teacherInstructions: teacherInstructionsError, title: titleError, subtitle: subtitleError, author: authorError, text: textError} = passagesErrors && passagesErrors[0] || ({});
|
|
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 || ({});
|
|
5569
5568
|
const defaultImageMaxWidth = maxImageWidth && maxImageWidth.prompt;
|
|
5570
5569
|
const defaultImageMaxHeight = maxImageHeight && maxImageHeight.prompt;
|
|
5571
5570
|
const panelSettings = {
|
|
@@ -5599,159 +5598,159 @@ class Main extends React$1.Component {
|
|
|
5599
5598
|
__self: this,
|
|
5600
5599
|
__source: {
|
|
5601
5600
|
fileName: _jsxFileName,
|
|
5602
|
-
lineNumber:
|
|
5601
|
+
lineNumber: 90
|
|
5603
5602
|
}
|
|
5604
5603
|
}),
|
|
5605
5604
|
__self: this,
|
|
5606
5605
|
__source: {
|
|
5607
5606
|
fileName: _jsxFileName,
|
|
5608
|
-
lineNumber:
|
|
5607
|
+
lineNumber: 87
|
|
5609
5608
|
}
|
|
5610
|
-
},
|
|
5611
|
-
label:
|
|
5609
|
+
}, titleEnabled && React$1.createElement(InputContainer, {
|
|
5610
|
+
label: title.label,
|
|
5612
5611
|
className: classes.inputContainer,
|
|
5613
5612
|
__self: this,
|
|
5614
5613
|
__source: {
|
|
5615
5614
|
fileName: _jsxFileName,
|
|
5616
|
-
lineNumber:
|
|
5615
|
+
lineNumber: 103
|
|
5617
5616
|
}
|
|
5618
5617
|
}, React$1.createElement(EditableHtml, {
|
|
5619
5618
|
activePlugins: ALL_PLUGINS,
|
|
5620
|
-
markup: passages[0].
|
|
5621
|
-
onChange: value => this.handleChange('
|
|
5619
|
+
markup: model.passages[0].title || '',
|
|
5620
|
+
onChange: value => this.handleChange('title', value),
|
|
5622
5621
|
nonEmpty: false,
|
|
5623
|
-
error:
|
|
5624
|
-
maxImageWidth: maxImageWidth && maxImageWidth.teacherInstructions || defaultImageMaxWidth,
|
|
5625
|
-
maxImageHeight: maxImageHeight && maxImageHeight.teacherInstructions || defaultImageMaxHeight,
|
|
5622
|
+
error: titleError,
|
|
5626
5623
|
mathMlOptions: mathMlOptions,
|
|
5627
5624
|
languageCharactersProps: [{
|
|
5628
5625
|
language: 'spanish'
|
|
5629
5626
|
}, {
|
|
5630
5627
|
language: 'special'
|
|
5631
5628
|
}],
|
|
5632
|
-
pluginProps: getPluginProps(_optionalChain([
|
|
5629
|
+
pluginProps: getPluginProps(_optionalChain([title, 'optionalAccess', _ => _.inputConfiguration])),
|
|
5633
5630
|
__self: this,
|
|
5634
5631
|
__source: {
|
|
5635
5632
|
fileName: _jsxFileName,
|
|
5636
|
-
lineNumber:
|
|
5633
|
+
lineNumber: 104
|
|
5637
5634
|
}
|
|
5638
|
-
}),
|
|
5635
|
+
}), titleError && React$1.createElement('div', {
|
|
5639
5636
|
className: classes.errorText,
|
|
5640
5637
|
__self: this,
|
|
5641
5638
|
__source: {
|
|
5642
5639
|
fileName: _jsxFileName,
|
|
5643
|
-
lineNumber:
|
|
5640
|
+
lineNumber: 114
|
|
5644
5641
|
}
|
|
5645
|
-
},
|
|
5646
|
-
label:
|
|
5642
|
+
}, titleError)), subtitleEnabled && React$1.createElement(InputContainer, {
|
|
5643
|
+
label: subtitle.label,
|
|
5647
5644
|
className: classes.inputContainer,
|
|
5648
5645
|
__self: this,
|
|
5649
5646
|
__source: {
|
|
5650
5647
|
fileName: _jsxFileName,
|
|
5651
|
-
lineNumber:
|
|
5648
|
+
lineNumber: 118
|
|
5652
5649
|
}
|
|
5653
5650
|
}, React$1.createElement(EditableHtml, {
|
|
5654
5651
|
activePlugins: ALL_PLUGINS,
|
|
5655
|
-
markup: passages[0].
|
|
5656
|
-
onChange: value => this.handleChange('
|
|
5652
|
+
markup: model.passages[0].subtitle || '',
|
|
5653
|
+
onChange: value => this.handleChange('subtitle', value),
|
|
5657
5654
|
nonEmpty: false,
|
|
5658
|
-
error:
|
|
5655
|
+
error: subtitleError,
|
|
5659
5656
|
mathMlOptions: mathMlOptions,
|
|
5660
5657
|
languageCharactersProps: [{
|
|
5661
5658
|
language: 'spanish'
|
|
5662
5659
|
}, {
|
|
5663
5660
|
language: 'special'
|
|
5664
5661
|
}],
|
|
5665
|
-
pluginProps: getPluginProps(_optionalChain([
|
|
5662
|
+
pluginProps: getPluginProps(_optionalChain([subtitle, 'optionalAccess', _2 => _2.inputConfiguration])),
|
|
5666
5663
|
__self: this,
|
|
5667
5664
|
__source: {
|
|
5668
5665
|
fileName: _jsxFileName,
|
|
5669
|
-
lineNumber:
|
|
5666
|
+
lineNumber: 119
|
|
5670
5667
|
}
|
|
5671
|
-
}),
|
|
5668
|
+
}), subtitleError && React$1.createElement('div', {
|
|
5672
5669
|
className: classes.errorText,
|
|
5673
5670
|
__self: this,
|
|
5674
5671
|
__source: {
|
|
5675
5672
|
fileName: _jsxFileName,
|
|
5676
|
-
lineNumber:
|
|
5673
|
+
lineNumber: 129
|
|
5677
5674
|
}
|
|
5678
|
-
},
|
|
5679
|
-
label:
|
|
5675
|
+
}, subtitleError)), authorEnabled && React$1.createElement(InputContainer, {
|
|
5676
|
+
label: author.label,
|
|
5680
5677
|
className: classes.inputContainer,
|
|
5681
5678
|
__self: this,
|
|
5682
5679
|
__source: {
|
|
5683
5680
|
fileName: _jsxFileName,
|
|
5684
|
-
lineNumber:
|
|
5681
|
+
lineNumber: 133
|
|
5685
5682
|
}
|
|
5686
5683
|
}, React$1.createElement(EditableHtml, {
|
|
5687
5684
|
activePlugins: ALL_PLUGINS,
|
|
5688
|
-
markup: passages[0].
|
|
5689
|
-
onChange: value => this.handleChange('
|
|
5685
|
+
markup: model.passages[0].author || '',
|
|
5686
|
+
onChange: value => this.handleChange('author', value),
|
|
5690
5687
|
nonEmpty: false,
|
|
5691
|
-
error:
|
|
5688
|
+
error: authorError,
|
|
5692
5689
|
mathMlOptions: mathMlOptions,
|
|
5693
5690
|
languageCharactersProps: [{
|
|
5694
5691
|
language: 'spanish'
|
|
5695
5692
|
}, {
|
|
5696
5693
|
language: 'special'
|
|
5697
5694
|
}],
|
|
5698
|
-
pluginProps: getPluginProps(_optionalChain([
|
|
5695
|
+
pluginProps: getPluginProps(_optionalChain([author, 'optionalAccess', _3 => _3.inputConfiguration])),
|
|
5699
5696
|
__self: this,
|
|
5700
5697
|
__source: {
|
|
5701
5698
|
fileName: _jsxFileName,
|
|
5702
|
-
lineNumber:
|
|
5699
|
+
lineNumber: 134
|
|
5703
5700
|
}
|
|
5704
|
-
}),
|
|
5701
|
+
}), authorError && React$1.createElement('div', {
|
|
5705
5702
|
className: classes.errorText,
|
|
5706
5703
|
__self: this,
|
|
5707
5704
|
__source: {
|
|
5708
5705
|
fileName: _jsxFileName,
|
|
5709
|
-
lineNumber:
|
|
5706
|
+
lineNumber: 144
|
|
5710
5707
|
}
|
|
5711
|
-
},
|
|
5712
|
-
label:
|
|
5708
|
+
}, authorError)), teacherInstructionsEnabled && React$1.createElement(InputContainer, {
|
|
5709
|
+
label: teacherInstructions.label,
|
|
5713
5710
|
className: classes.inputContainer,
|
|
5714
5711
|
__self: this,
|
|
5715
5712
|
__source: {
|
|
5716
5713
|
fileName: _jsxFileName,
|
|
5717
|
-
lineNumber:
|
|
5714
|
+
lineNumber: 148
|
|
5718
5715
|
}
|
|
5719
5716
|
}, React$1.createElement(EditableHtml, {
|
|
5720
5717
|
activePlugins: ALL_PLUGINS,
|
|
5721
|
-
markup: passages[0].
|
|
5722
|
-
onChange: value => this.handleChange('
|
|
5718
|
+
markup: model.passages[0].teacherInstructions || '',
|
|
5719
|
+
onChange: value => this.handleChange('teacherInstructions', value),
|
|
5723
5720
|
nonEmpty: false,
|
|
5724
|
-
error:
|
|
5721
|
+
error: teacherInstructionsError,
|
|
5722
|
+
maxImageWidth: maxImageWidth && maxImageWidth.teacherInstructions || defaultImageMaxWidth,
|
|
5723
|
+
maxImageHeight: maxImageHeight && maxImageHeight.teacherInstructions || defaultImageMaxHeight,
|
|
5725
5724
|
mathMlOptions: mathMlOptions,
|
|
5726
5725
|
languageCharactersProps: [{
|
|
5727
5726
|
language: 'spanish'
|
|
5728
5727
|
}, {
|
|
5729
5728
|
language: 'special'
|
|
5730
5729
|
}],
|
|
5731
|
-
pluginProps: getPluginProps(_optionalChain([
|
|
5730
|
+
pluginProps: getPluginProps(_optionalChain([teacherInstructions, 'optionalAccess', _4 => _4.inputConfiguration])),
|
|
5732
5731
|
__self: this,
|
|
5733
5732
|
__source: {
|
|
5734
5733
|
fileName: _jsxFileName,
|
|
5735
|
-
lineNumber:
|
|
5734
|
+
lineNumber: 149
|
|
5736
5735
|
}
|
|
5737
|
-
}),
|
|
5736
|
+
}), teacherInstructionsError && React$1.createElement('div', {
|
|
5738
5737
|
className: classes.errorText,
|
|
5739
5738
|
__self: this,
|
|
5740
5739
|
__source: {
|
|
5741
5740
|
fileName: _jsxFileName,
|
|
5742
|
-
lineNumber:
|
|
5741
|
+
lineNumber: 161
|
|
5743
5742
|
}
|
|
5744
|
-
},
|
|
5743
|
+
}, teacherInstructionsError)), textEnabled && React$1.createElement(InputContainer, {
|
|
5745
5744
|
label: text.label,
|
|
5746
5745
|
className: classes.inputContainer,
|
|
5747
5746
|
__self: this,
|
|
5748
5747
|
__source: {
|
|
5749
5748
|
fileName: _jsxFileName,
|
|
5750
|
-
lineNumber:
|
|
5749
|
+
lineNumber: 165
|
|
5751
5750
|
}
|
|
5752
5751
|
}, React$1.createElement(EditableHtml, {
|
|
5753
5752
|
activePlugins: ALL_PLUGINS,
|
|
5754
|
-
markup: passages[0].text || '',
|
|
5753
|
+
markup: model.passages[0].text || '',
|
|
5755
5754
|
onChange: value => this.handleChange('text', value),
|
|
5756
5755
|
imageSupport: imageSupport,
|
|
5757
5756
|
uploadSoundSupport: uploadSoundSupport,
|
|
@@ -5769,14 +5768,14 @@ class Main extends React$1.Component {
|
|
|
5769
5768
|
__self: this,
|
|
5770
5769
|
__source: {
|
|
5771
5770
|
fileName: _jsxFileName,
|
|
5772
|
-
lineNumber:
|
|
5771
|
+
lineNumber: 166
|
|
5773
5772
|
}
|
|
5774
5773
|
}), textError && React$1.createElement('div', {
|
|
5775
5774
|
className: classes.errorText,
|
|
5776
5775
|
__self: this,
|
|
5777
5776
|
__source: {
|
|
5778
5777
|
fileName: _jsxFileName,
|
|
5779
|
-
lineNumber:
|
|
5778
|
+
lineNumber: 180
|
|
5780
5779
|
}
|
|
5781
5780
|
}, textError)));
|
|
5782
5781
|
}
|
|
@@ -5799,8 +5798,8 @@ var defaultValues = {
|
|
|
5799
5798
|
teacherInstructionsEnabled: true,
|
|
5800
5799
|
titleEnabled: true,
|
|
5801
5800
|
subtitleEnabled: true,
|
|
5802
|
-
authorEnabled: true,
|
|
5803
5801
|
textEnabled: true,
|
|
5802
|
+
authorEnabled: true,
|
|
5804
5803
|
passages: [{
|
|
5805
5804
|
teacherInstructions: '',
|
|
5806
5805
|
title: '',
|