@instructure/quiz-core 22.9.0 → 22.10.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.
@@ -36,7 +36,7 @@ var ItemShow = /*#__PURE__*/function (_Component) {
36
36
  value: function render() {
37
37
  var item = this.props.entry;
38
38
  var Interaction = componentForItem(item.getInteractionType().slug, COMPONENT_SHOW);
39
- var propsForInteraction = propsForInteractionShow(item.toJS());
39
+ var propsForInteraction = propsForInteractionShow(item.toJS(), this.props);
40
40
  return /*#__PURE__*/React.createElement(Interaction, Object.assign({}, propsForInteraction, {
41
41
  itemId: this.props.guid,
42
42
  switchOnEditing: this.props.switchOnEditing
@@ -47,7 +47,11 @@ var ItemShow = /*#__PURE__*/function (_Component) {
47
47
  _defineProperty(ItemShow, "propTypes", {
48
48
  entry: ImmutablePropTypes.record.isRequired,
49
49
  guid: PropTypes.string.isRequired,
50
- switchOnEditing: PropTypes.func
50
+ switchOnEditing: PropTypes.func,
51
+ separatorConfig: PropTypes.shape({
52
+ decimalSeparator: PropTypes.string,
53
+ thousandSeparator: PropTypes.string
54
+ })
51
55
  });
52
56
  _defineProperty(ItemShow, "defaultProps", {
53
57
  switchOnEditing: null
@@ -66,6 +66,7 @@ export var propsForInteractionEdit = function propsForInteractionEdit(props, add
66
66
  };
67
67
  };
68
68
  export var propsForInteractionShow = function propsForInteractionShow(item) {
69
+ var props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
69
70
  return {
70
71
  itemId: item.id,
71
72
  interactionData: item.interactionData,
@@ -75,6 +76,7 @@ export var propsForInteractionShow = function propsForInteractionShow(item) {
75
76
  itemBody: item.itemBody || '',
76
77
  properties: item.properties,
77
78
  notifyScreenreader: true,
78
- scoringData: item.scoringData
79
+ scoringData: item.scoringData,
80
+ separatorConfig: props.separatorConfig
79
81
  };
80
82
  };
@@ -45,7 +45,7 @@ var ItemShow = /*#__PURE__*/function (_Component) {
45
45
  value: function render() {
46
46
  var item = this.props.entry;
47
47
  var Interaction = (0, _componentForItem["default"])(item.getInteractionType().slug, _quizCommon.COMPONENT_SHOW);
48
- var propsForInteraction = (0, _interactionTypePropsHelper.propsForInteractionShow)(item.toJS());
48
+ var propsForInteraction = (0, _interactionTypePropsHelper.propsForInteractionShow)(item.toJS(), this.props);
49
49
  return /*#__PURE__*/_react["default"].createElement(Interaction, Object.assign({}, propsForInteraction, {
50
50
  itemId: this.props.guid,
51
51
  switchOnEditing: this.props.switchOnEditing
@@ -56,7 +56,11 @@ var ItemShow = /*#__PURE__*/function (_Component) {
56
56
  (0, _defineProperty2["default"])(ItemShow, "propTypes", {
57
57
  entry: _reactImmutableProptypes["default"].record.isRequired,
58
58
  guid: _propTypes["default"].string.isRequired,
59
- switchOnEditing: _propTypes["default"].func
59
+ switchOnEditing: _propTypes["default"].func,
60
+ separatorConfig: _propTypes["default"].shape({
61
+ decimalSeparator: _propTypes["default"].string,
62
+ thousandSeparator: _propTypes["default"].string
63
+ })
60
64
  });
61
65
  (0, _defineProperty2["default"])(ItemShow, "defaultProps", {
62
66
  switchOnEditing: null
@@ -73,6 +73,7 @@ var propsForInteractionEdit = exports.propsForInteractionEdit = function propsFo
73
73
  };
74
74
  };
75
75
  var propsForInteractionShow = exports.propsForInteractionShow = function propsForInteractionShow(item) {
76
+ var props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
76
77
  return {
77
78
  itemId: item.id,
78
79
  interactionData: item.interactionData,
@@ -82,6 +83,7 @@ var propsForInteractionShow = exports.propsForInteractionShow = function propsFo
82
83
  itemBody: item.itemBody || '',
83
84
  properties: item.properties,
84
85
  notifyScreenreader: true,
85
- scoringData: item.scoringData
86
+ scoringData: item.scoringData,
87
+ separatorConfig: props.separatorConfig
86
88
  };
87
89
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/quiz-core",
3
- "version": "22.9.0",
3
+ "version": "22.10.0",
4
4
  "license": "MIT",
5
5
  "description": "The Quiz React SDK by Instructure Inc.",
6
6
  "author": "Instructure, Inc. Engineering and Product Design",
@@ -111,12 +111,12 @@
111
111
  "store": "^1.3.20",
112
112
  "striptags": "^2.0.0",
113
113
  "uuid": "^3.2.1",
114
- "@instructure/quiz-common": "22.9.0",
115
- "@instructure/quiz-i18n": "22.9.0",
116
- "@instructure/quiz-interactions": "22.9.0",
117
- "@instructure/quiz-rce": "22.9.0",
118
- "@instructure/quiz-number-input": "22.9.0",
119
- "instructure-validations": "22.9.0"
114
+ "@instructure/quiz-common": "22.10.0",
115
+ "@instructure/quiz-interactions": "22.10.0",
116
+ "@instructure/quiz-rce": "22.10.0",
117
+ "@instructure/quiz-i18n": "22.10.0",
118
+ "instructure-validations": "22.10.0",
119
+ "@instructure/quiz-number-input": "22.10.0"
120
120
  },
121
121
  "devDependencies": {
122
122
  "@instructure/ui-axe-check": "10.14.0",
@@ -145,7 +145,7 @@
145
145
  "sinon": "^6.1.3",
146
146
  "sinon-chai": "^3.3.0",
147
147
  "@instructure/quiz-scripts": "21.0.0",
148
- "quiz-presets": "22.9.0"
148
+ "quiz-presets": "22.10.0"
149
149
  },
150
150
  "peerDependencies": {
151
151
  "react": "^15 || ^16"