@pie-element/complex-rubric 3.7.8-next.77 → 3.7.8-next.80
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/node_modules/@pie-element/multi-trait-rubric/CHANGELOG.json +1 -0
- package/configure/node_modules/@pie-element/{rubric → multi-trait-rubric}/CHANGELOG.md +402 -676
- package/configure/node_modules/@pie-element/multi-trait-rubric/README.md +55 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/CHANGELOG.json +1 -0
- package/configure/node_modules/@pie-element/{rubric → multi-trait-rubric}/configure/CHANGELOG.md +366 -574
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/common.js +584 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/common.js.map +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/defaults.js +152 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/defaults.js.map +1 -0
- package/configure/node_modules/@pie-element/{rubric → multi-trait-rubric}/configure/lib/index.js +89 -63
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/index.js.map +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/main.js +546 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/main.js.map +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/modals.js +361 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/modals.js.map +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/scale.js +556 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/scale.js.map +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/trait.js +380 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/trait.js.map +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/traitsHeader.js +296 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/traitsHeader.js.map +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/utils.js +118 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/lib/utils.js.map +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/configure/package.json +18 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/controller/CHANGELOG.json +1 -0
- package/configure/node_modules/@pie-element/{rubric → multi-trait-rubric}/controller/CHANGELOG.md +172 -165
- package/configure/node_modules/@pie-element/{rubric → multi-trait-rubric}/controller/lib/defaults.js +8 -5
- package/configure/node_modules/@pie-element/multi-trait-rubric/controller/lib/defaults.js.map +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/controller/lib/index.js +215 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/controller/lib/index.js.map +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/controller/lib/utils.js +13 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/controller/lib/utils.js.map +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/controller/package.json +15 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/docs/config-schema.json +1628 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/docs/config-schema.json.md +1202 -0
- package/configure/node_modules/@pie-element/{rubric → multi-trait-rubric}/docs/demo/config.js +2 -2
- package/configure/node_modules/@pie-element/multi-trait-rubric/docs/demo/generate.js +117 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/docs/demo/index.html +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/docs/demo/session.js +6 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/docs/pie-schema.json +861 -0
- package/configure/node_modules/@pie-element/{rubric/docs/config-schema.json.md → multi-trait-rubric/docs/pie-schema.json.md} +284 -202
- package/configure/node_modules/@pie-element/{rubric → multi-trait-rubric}/lib/index.js +27 -30
- package/configure/node_modules/@pie-element/multi-trait-rubric/lib/index.js.map +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/lib/main.js +164 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/lib/main.js.map +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/lib/scale.js +330 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/lib/scale.js.map +1 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/lib/trait.js +103 -0
- package/configure/node_modules/@pie-element/multi-trait-rubric/lib/trait.js.map +1 -0
- package/configure/node_modules/@pie-element/{rubric → multi-trait-rubric}/package.json +10 -12
- package/configure/package.json +5 -5
- package/module/configure.js +1 -1
- package/module/element.js +1 -1
- package/module/manifest.json +4 -4
- package/module/print.js +1 -1
- package/package.json +4 -4
- package/configure/node_modules/@pie-element/rubric/CHANGELOG.json +0 -257
- package/configure/node_modules/@pie-element/rubric/README.md +0 -3
- package/configure/node_modules/@pie-element/rubric/configure/CHANGELOG.json +0 -197
- package/configure/node_modules/@pie-element/rubric/configure/lib/defaults.js +0 -68
- package/configure/node_modules/@pie-element/rubric/configure/lib/defaults.js.map +0 -1
- package/configure/node_modules/@pie-element/rubric/configure/lib/index.js.map +0 -1
- package/configure/node_modules/@pie-element/rubric/configure/lib/main.js +0 -162
- package/configure/node_modules/@pie-element/rubric/configure/lib/main.js.map +0 -1
- package/configure/node_modules/@pie-element/rubric/configure/lib/pie-toolbox-rubric/authoring.js +0 -573
- package/configure/node_modules/@pie-element/rubric/configure/lib/pie-toolbox-rubric/authoring.js.map +0 -1
- package/configure/node_modules/@pie-element/rubric/configure/lib/pie-toolbox-rubric/index.js +0 -24
- package/configure/node_modules/@pie-element/rubric/configure/lib/pie-toolbox-rubric/index.js.map +0 -1
- package/configure/node_modules/@pie-element/rubric/configure/lib/pie-toolbox-rubric/point-menu.js +0 -172
- package/configure/node_modules/@pie-element/rubric/configure/lib/pie-toolbox-rubric/point-menu.js.map +0 -1
- package/configure/node_modules/@pie-element/rubric/configure/package.json +0 -17
- package/configure/node_modules/@pie-element/rubric/configure/src/__tests__/index.test.jsx +0 -167
- package/configure/node_modules/@pie-element/rubric/configure/src/defaults.js +0 -42
- package/configure/node_modules/@pie-element/rubric/configure/src/index.js +0 -129
- package/configure/node_modules/@pie-element/rubric/configure/src/main.jsx +0 -89
- package/configure/node_modules/@pie-element/rubric/configure/src/pie-toolbox-rubric/authoring.jsx +0 -449
- package/configure/node_modules/@pie-element/rubric/configure/src/pie-toolbox-rubric/index.js +0 -9
- package/configure/node_modules/@pie-element/rubric/configure/src/pie-toolbox-rubric/point-menu.jsx +0 -94
- package/configure/node_modules/@pie-element/rubric/controller/CHANGELOG.json +0 -17
- package/configure/node_modules/@pie-element/rubric/controller/lib/defaults.js.map +0 -1
- package/configure/node_modules/@pie-element/rubric/controller/lib/index.js +0 -59
- package/configure/node_modules/@pie-element/rubric/controller/lib/index.js.map +0 -1
- package/configure/node_modules/@pie-element/rubric/controller/package.json +0 -13
- package/configure/node_modules/@pie-element/rubric/controller/src/__tests__/index.test.js +0 -33
- package/configure/node_modules/@pie-element/rubric/controller/src/defaults.js +0 -8
- package/configure/node_modules/@pie-element/rubric/controller/src/index.js +0 -41
- package/configure/node_modules/@pie-element/rubric/docs/config-schema.json +0 -712
- package/configure/node_modules/@pie-element/rubric/docs/demo/generate.js +0 -8
- package/configure/node_modules/@pie-element/rubric/docs/demo/index.html +0 -2
- package/configure/node_modules/@pie-element/rubric/docs/pie-schema.json +0 -391
- package/configure/node_modules/@pie-element/rubric/docs/pie-schema.json.md +0 -281
- package/configure/node_modules/@pie-element/rubric/lib/index.js.map +0 -1
- package/configure/node_modules/@pie-element/rubric/lib/main.js +0 -270
- package/configure/node_modules/@pie-element/rubric/lib/main.js.map +0 -1
- package/configure/node_modules/@pie-element/rubric/lib/print.js +0 -114
- package/configure/node_modules/@pie-element/rubric/lib/print.js.map +0 -1
- package/configure/node_modules/@pie-element/rubric/module/configure.js +0 -42661
- package/configure/node_modules/@pie-element/rubric/module/controller.js +0 -113
- package/configure/node_modules/@pie-element/rubric/module/demo.js +0 -33
- package/configure/node_modules/@pie-element/rubric/module/element.js +0 -7980
- package/configure/node_modules/@pie-element/rubric/module/index.html +0 -21
- package/configure/node_modules/@pie-element/rubric/module/manifest.json +0 -14
- package/configure/node_modules/@pie-element/rubric/module/print-demo.js +0 -71
- package/configure/node_modules/@pie-element/rubric/module/print.html +0 -18
- package/configure/node_modules/@pie-element/rubric/module/print.js +0 -7993
- package/configure/node_modules/@pie-element/rubric/src/__tests__/__snapshots__/rubric-view.test.jsx.snap +0 -1815
- package/configure/node_modules/@pie-element/rubric/src/__tests__/rubric-view.test.jsx +0 -49
- package/configure/node_modules/@pie-element/rubric/src/index.js +0 -37
- package/configure/node_modules/@pie-element/rubric/src/main.jsx +0 -196
- package/configure/node_modules/@pie-element/rubric/src/print.js +0 -63
- /package/configure/node_modules/@pie-element/{rubric → multi-trait-rubric}/LICENSE.md +0 -0
|
@@ -1,162 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports["default"] = void 0;
|
|
9
|
-
|
|
10
|
-
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
11
|
-
|
|
12
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
13
|
-
|
|
14
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
15
|
-
|
|
16
|
-
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
17
|
-
|
|
18
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
19
|
-
|
|
20
|
-
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
21
|
-
|
|
22
|
-
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
23
|
-
|
|
24
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
25
|
-
|
|
26
|
-
var _react = _interopRequireDefault(require("react"));
|
|
27
|
-
|
|
28
|
-
var _index = require("./pie-toolbox-rubric/index");
|
|
29
|
-
|
|
30
|
-
var _styles = require("@material-ui/core/styles");
|
|
31
|
-
|
|
32
|
-
var _configUi = require("@pie-lib/pie-toolbox/config-ui");
|
|
33
|
-
|
|
34
|
-
var _excluded = ["points", "sampleAnswers"];
|
|
35
|
-
|
|
36
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
37
|
-
|
|
38
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
39
|
-
|
|
40
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
|
|
41
|
-
|
|
42
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
43
|
-
|
|
44
|
-
var Panel = _configUi.settings.Panel,
|
|
45
|
-
toggle = _configUi.settings.toggle;
|
|
46
|
-
|
|
47
|
-
var styles = function styles(theme) {
|
|
48
|
-
return {
|
|
49
|
-
design: {
|
|
50
|
-
fontFamily: 'Cerebri Sans',
|
|
51
|
-
fontSize: theme.typography.fontSize
|
|
52
|
-
}
|
|
53
|
-
};
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
var Main = /*#__PURE__*/function (_React$Component) {
|
|
57
|
-
(0, _inherits2["default"])(Main, _React$Component);
|
|
58
|
-
|
|
59
|
-
var _super = _createSuper(Main);
|
|
60
|
-
|
|
61
|
-
function Main() {
|
|
62
|
-
var _this;
|
|
63
|
-
|
|
64
|
-
(0, _classCallCheck2["default"])(this, Main);
|
|
65
|
-
|
|
66
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
67
|
-
args[_key] = arguments[_key];
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
_this = _super.call.apply(_super, [this].concat(args));
|
|
71
|
-
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "verifyRubriclessModel", function (m, config) {
|
|
72
|
-
var _ref = config || {},
|
|
73
|
-
_ref$rubricless = _ref.rubricless,
|
|
74
|
-
rubricless = _ref$rubricless === void 0 ? false : _ref$rubricless;
|
|
75
|
-
|
|
76
|
-
return rubricless ? function (_ref2) {
|
|
77
|
-
var points = _ref2.points,
|
|
78
|
-
sampleAnswers = _ref2.sampleAnswers,
|
|
79
|
-
rest = (0, _objectWithoutProperties2["default"])(_ref2, _excluded);
|
|
80
|
-
return rest;
|
|
81
|
-
}(m) : m;
|
|
82
|
-
});
|
|
83
|
-
return _this;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
(0, _createClass2["default"])(Main, [{
|
|
87
|
-
key: "render",
|
|
88
|
-
value: function render() {
|
|
89
|
-
var _ref3 = this.props || {},
|
|
90
|
-
model = _ref3.model,
|
|
91
|
-
configuration = _ref3.configuration,
|
|
92
|
-
onConfigurationChanged = _ref3.onConfigurationChanged,
|
|
93
|
-
onModelChanged = _ref3.onModelChanged,
|
|
94
|
-
imageSupport = _ref3.imageSupport;
|
|
95
|
-
|
|
96
|
-
var _ref4 = configuration || {},
|
|
97
|
-
_ref4$baseInputConfig = _ref4.baseInputConfiguration,
|
|
98
|
-
baseInputConfiguration = _ref4$baseInputConfig === void 0 ? {} : _ref4$baseInputConfig,
|
|
99
|
-
_ref4$contentDimensio = _ref4.contentDimensions,
|
|
100
|
-
contentDimensions = _ref4$contentDimensio === void 0 ? {} : _ref4$contentDimensio,
|
|
101
|
-
settingsPanelDisabled = _ref4.settingsPanelDisabled,
|
|
102
|
-
_ref4$showExcludeZero = _ref4.showExcludeZero,
|
|
103
|
-
showExcludeZero = _ref4$showExcludeZero === void 0 ? {} : _ref4$showExcludeZero,
|
|
104
|
-
_ref4$showMaxPoint = _ref4.showMaxPoint,
|
|
105
|
-
showMaxPoint = _ref4$showMaxPoint === void 0 ? {} : _ref4$showMaxPoint,
|
|
106
|
-
_ref4$mathMlOptions = _ref4.mathMlOptions,
|
|
107
|
-
mathMlOptions = _ref4$mathMlOptions === void 0 ? {} : _ref4$mathMlOptions,
|
|
108
|
-
_ref4$rubricless = _ref4.rubricless,
|
|
109
|
-
rubricless = _ref4$rubricless === void 0 ? false : _ref4$rubricless,
|
|
110
|
-
rubriclessInstruction = _ref4.rubriclessInstruction,
|
|
111
|
-
width = _ref4.width; // ensure to eliminate points and sampleAnswers in case of rubricless
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
var value = this.verifyRubriclessModel(model, configuration);
|
|
115
|
-
var extraCSSRules = model.extraCSSRules;
|
|
116
|
-
var panelProperties = {
|
|
117
|
-
excludeZeroEnabled: showExcludeZero.settings && toggle(showExcludeZero.label),
|
|
118
|
-
maxPointsEnabled: showMaxPoint.settings && toggle(showMaxPoint.label),
|
|
119
|
-
rubriclessInstructionEnabled: rubricless && rubriclessInstruction.settings && toggle(rubriclessInstruction.label)
|
|
120
|
-
};
|
|
121
|
-
|
|
122
|
-
var getPluginProps = function getPluginProps(props) {
|
|
123
|
-
return Object.assign(_objectSpread({}, baseInputConfiguration), props || {});
|
|
124
|
-
};
|
|
125
|
-
|
|
126
|
-
return /*#__PURE__*/_react["default"].createElement(_configUi.layout.ConfigLayout, {
|
|
127
|
-
extraCSSRules: extraCSSRules,
|
|
128
|
-
dimensions: contentDimensions,
|
|
129
|
-
hideSettings: settingsPanelDisabled,
|
|
130
|
-
settings: /*#__PURE__*/_react["default"].createElement(Panel, {
|
|
131
|
-
model: model,
|
|
132
|
-
onChangeModel: onModelChanged,
|
|
133
|
-
configuration: configuration,
|
|
134
|
-
onChangeConfiguration: onConfigurationChanged,
|
|
135
|
-
pluginOpts: getPluginProps(rubriclessInstruction === null || rubriclessInstruction === void 0 ? void 0 : rubriclessInstruction.inputConfiguration),
|
|
136
|
-
groups: {
|
|
137
|
-
Properties: panelProperties
|
|
138
|
-
},
|
|
139
|
-
imageSupport: imageSupport
|
|
140
|
-
})
|
|
141
|
-
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
142
|
-
style: {
|
|
143
|
-
maxWidth: width
|
|
144
|
-
}
|
|
145
|
-
}, /*#__PURE__*/_react["default"].createElement(_index.Authoring, {
|
|
146
|
-
value: value,
|
|
147
|
-
config: configuration,
|
|
148
|
-
onChange: onModelChanged,
|
|
149
|
-
mathMlOptions: mathMlOptions,
|
|
150
|
-
rubricless: rubricless,
|
|
151
|
-
pluginOpts: baseInputConfiguration,
|
|
152
|
-
imageSupport: imageSupport
|
|
153
|
-
})));
|
|
154
|
-
}
|
|
155
|
-
}]);
|
|
156
|
-
return Main;
|
|
157
|
-
}(_react["default"].Component);
|
|
158
|
-
|
|
159
|
-
var _default = (0, _styles.withStyles)(styles)(Main);
|
|
160
|
-
|
|
161
|
-
exports["default"] = _default;
|
|
162
|
-
//# sourceMappingURL=main.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/main.jsx"],"names":["Panel","settings","toggle","styles","theme","design","fontFamily","fontSize","typography","Main","m","config","rubricless","points","sampleAnswers","rest","props","model","configuration","onConfigurationChanged","onModelChanged","imageSupport","baseInputConfiguration","contentDimensions","settingsPanelDisabled","showExcludeZero","showMaxPoint","mathMlOptions","rubriclessInstruction","width","value","verifyRubriclessModel","extraCSSRules","panelProperties","excludeZeroEnabled","label","maxPointsEnabled","rubriclessInstructionEnabled","getPluginProps","Object","assign","inputConfiguration","Properties","maxWidth","React","Component"],"mappings":"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","sourcesContent":["import React from 'react';\nimport { Authoring } from './pie-toolbox-rubric/index';\nimport { withStyles } from '@material-ui/core/styles';\nimport { layout, settings } from '@pie-lib/pie-toolbox/config-ui';\n\nconst { Panel, toggle } = settings;\n\nconst styles = (theme) => ({\n design: {\n fontFamily: 'Cerebri Sans',\n fontSize: theme.typography.fontSize,\n },\n});\n\nclass Main extends React.Component {\n verifyRubriclessModel = (m, config) => {\n const { rubricless = false } = config || {};\n return rubricless ? (({ points, sampleAnswers, ...rest }) => rest)(m) : m;\n };\n\n render() {\n const { model, configuration, onConfigurationChanged, onModelChanged, imageSupport } = this.props || {};\n const {\n baseInputConfiguration = {},\n contentDimensions = {},\n settingsPanelDisabled,\n showExcludeZero = {},\n showMaxPoint = {},\n mathMlOptions = {},\n rubricless = false,\n rubriclessInstruction,\n width,\n } = configuration || {};\n\n // ensure to eliminate points and sampleAnswers in case of rubricless\n const value = this.verifyRubriclessModel(model, configuration);\n const { extraCSSRules } = model;\n\n const panelProperties = {\n excludeZeroEnabled: showExcludeZero.settings && toggle(showExcludeZero.label),\n maxPointsEnabled: showMaxPoint.settings && toggle(showMaxPoint.label),\n rubriclessInstructionEnabled: rubricless && rubriclessInstruction.settings && toggle(rubriclessInstruction.label),\n };\n\n const getPluginProps = (props) => {\n return Object.assign(\n {\n ...baseInputConfiguration,\n },\n props || {},\n );\n };\n\n return (\n <layout.ConfigLayout\n extraCSSRules={extraCSSRules}\n dimensions={contentDimensions}\n hideSettings={settingsPanelDisabled}\n settings={\n <Panel\n model={model}\n onChangeModel={onModelChanged}\n configuration={configuration}\n onChangeConfiguration={onConfigurationChanged}\n pluginOpts={getPluginProps(rubriclessInstruction?.inputConfiguration)}\n groups={{\n Properties: panelProperties,\n }}\n imageSupport={imageSupport}\n />\n }\n >\n <div style={{ maxWidth: width }}>\n <Authoring\n value={value}\n config={configuration}\n onChange={onModelChanged}\n mathMlOptions={mathMlOptions}\n rubricless={rubricless}\n pluginOpts={baseInputConfiguration}\n imageSupport={imageSupport}\n />\n </div>\n </layout.ConfigLayout>\n );\n }\n}\n\nexport default withStyles(styles)(Main);\n"],"file":"main.js"}
|