Skip to content

Commit 4ae9bf0

Browse files
authored
Merge pull request #2656 from pie-framework/develop
merge
2 parents 29d1a24 + 2591282 commit 4ae9bf0

104 files changed

Lines changed: 341 additions & 253 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

packages/boilerplate-item-type/configure/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"dependencies": {
99
"@material-ui/core": "^3.9.2",
1010
"@pie-framework/pie-configure-events": "^1.3.0",
11-
"@pie-lib/pie-toolbox": "2.18.1",
11+
"@pie-lib/pie-toolbox": "2.19.0",
1212
"debug": "^3.1.0",
1313
"lodash": "^4.17.15",
1414
"prop-types": "^15.6.2",

packages/boilerplate-item-type/controller/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"main": "lib/index.js",
77
"module": "src/index.js",
88
"dependencies": {
9-
"@pie-lib/pie-toolbox": "2.18.1",
9+
"@pie-lib/pie-toolbox": "2.19.0",
1010
"debug": "^3.1.0",
1111
"lodash": "^4.17.15"
1212
},

packages/boilerplate-item-type/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"dependencies": {
1010
"@material-ui/core": "^3.9.2",
1111
"@pie-framework/pie-player-events": "^0.1.0",
12-
"@pie-lib/pie-toolbox": "2.18.1",
12+
"@pie-lib/pie-toolbox": "2.19.0",
1313
"prop-types": "^15.6.1",
1414
"react": "^16.8.1",
1515
"react-dom": "^16.8.1"

packages/calculator/configure/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"dependencies": {
88
"@material-ui/core": "^3.9.2",
99
"@pie-framework/pie-configure-events": "^1.3.0",
10-
"@pie-lib/pie-toolbox": "2.18.1",
10+
"@pie-lib/pie-toolbox": "2.19.0",
1111
"react": "^16.8.1",
1212
"react-dom": "^16.8.1"
1313
},

packages/categorize/configure/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"@material-ui/core": "^3.9.2",
1313
"@material-ui/icons": "^3.0.1",
1414
"@pie-framework/pie-configure-events": "^1.3.0",
15-
"@pie-lib/pie-toolbox": "2.18.1",
15+
"@pie-lib/pie-toolbox": "2.19.0",
1616
"classnames": "^2.2.5",
1717
"debug": "^3.1.0",
1818
"lodash": "^4.17.15",

packages/categorize/configure/src/design/buttons.jsx

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,4 @@ const DeleteButton = withStyles(() => ({
5353
</Button>
5454
));
5555

56-
const Divider = withStyles((theme) => ({
57-
divider: {
58-
marginTop: 2 * theme.spacing.unit,
59-
marginBottom: 2 * theme.spacing.unit,
60-
},
61-
}))(({ classes }) => <MuiDivider className={classes.divider} />);
62-
63-
export { AddButton, DeleteButton, Divider };
56+
export { AddButton, DeleteButton };

packages/categorize/configure/src/design/categories/alternateResponses.jsx

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ import React from 'react';
22
import PropTypes from 'prop-types';
33
import { withStyles } from '@material-ui/core/styles';
44
import classNames from 'classnames';
5-
import Category from './category';
65
import { moveChoiceToAlternate, removeChoiceFromAlternate } from '@pie-lib/pie-toolbox/categorize';
7-
import { RowLabel } from './RowLabel';
6+
7+
import Category from './category';
88
import { getMaxCategoryChoices } from '../../utils';
99

1010
const styles = (theme) => ({
@@ -28,9 +28,6 @@ const styles = (theme) => ({
2828
rowLabel: {
2929
gridColumn: '1/3',
3030
},
31-
rowLabelHolder: {
32-
width: '100%',
33-
},
3431
});
3532

3633
export class AlternateResponses extends React.Component {
@@ -44,15 +41,12 @@ export class AlternateResponses extends React.Component {
4441
classes: PropTypes.object.isRequired,
4542
className: PropTypes.string,
4643
categories: PropTypes.array,
47-
defaultImageMaxHeight: PropTypes.number,
48-
defaultImageMaxWidth: PropTypes.number,
4944
onModelChanged: PropTypes.func,
5045
model: PropTypes.object.isRequired,
5146
uploadSoundSupport: PropTypes.shape({
5247
add: PropTypes.func.isRequired,
5348
delete: PropTypes.func.isRequired,
5449
}),
55-
toolbarOpts: PropTypes.object,
5650
spellCheck: PropTypes.bool,
5751
};
5852

@@ -161,14 +155,10 @@ export class AlternateResponses extends React.Component {
161155
imageSupport,
162156
spellCheck,
163157
uploadSoundSupport,
164-
toolbarOpts,
165-
defaultImageMaxHeight,
166-
defaultImageMaxWidth,
167158
mathMlOptions = {},
168159
} = this.props;
169160
const { categoriesPerRow, errors, rowLabels } = model;
170161
const { duplicateAlternate } = errors || {};
171-
const { maxImageWidth = {}, maxImageHeight = {} } = configuration || {};
172162

173163
const holderStyle = {
174164
gridTemplateColumns: `repeat(${categoriesPerRow}, 1fr)`,

packages/categorize/configure/src/design/choices/choice.jsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@ export class Choice extends React.Component {
3737
choice: PropTypes.object.isRequired,
3838
connectDropTarget: PropTypes.func,
3939
deleteFocusedEl: PropTypes.func,
40-
defaultImageMaxHeight: PropTypes.number,
41-
defaultImageMaxWidth: PropTypes.number,
4240
focusedEl: PropTypes.number,
4341
index: PropTypes.number,
4442
lockChoiceOrder: PropTypes.bool,

packages/categorize/configure/src/design/choices/index.jsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { withStyles } from '@material-ui/core/styles';
44
import classNames from 'classnames';
55
import Choice from './choice';
66
import Header from '../header';
7-
import every from 'lodash/every';
87
import Config from './config';
98
import { choiceUtils as utils } from '@pie-lib/pie-toolbox/config-ui';
109
import { removeAllChoices } from '@pie-lib/pie-toolbox/categorize';
@@ -49,7 +48,7 @@ export class Choices extends React.Component {
4948

5049
allChoicesHaveCount = (count) => {
5150
const { choices } = this.props;
52-
return every(choices, (c) => c.categoryCount === count);
51+
return Array.isArray(choices) && choices.every((c) => c.categoryCount === count);
5352
};
5453

5554
addChoice = () => {

packages/categorize/configure/src/design/index.jsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,6 @@ export class Design extends React.Component {
215215
spellCheckEnabled,
216216
teacherInstructionsEnabled,
217217
toolbarEditorPosition,
218-
maxAnswerChoices,
219218
extraCSSRules,
220219
} = model || {};
221220
const {
@@ -428,9 +427,6 @@ export class Design extends React.Component {
428427
categories={categoriesList}
429428
onModelChanged={this.updateModel}
430429
uploadSoundSupport={uploadSoundSupport}
431-
toolbarOpts={toolbarOpts}
432-
defaultImageMaxWidth={defaultImageMaxWidth}
433-
defaultImageMaxHeight={defaultImageMaxHeight}
434430
mathMlOptions={mathMlOptions}
435431
/>
436432
</React.Fragment>

0 commit comments

Comments
 (0)