@pie-element/rubric 6.0.2-esm.0 → 11.0.3-esm.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.
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "@pie-element/rubric-configure",
3
3
  "private": true,
4
- "version": "5.0.3-esm.0",
4
+ "version": "11.0.3-esm.0",
5
5
  "description": "Rubric authoring view",
6
6
  "main": "lib/index.js",
7
7
  "author": "Pie Framework Authors",
8
8
  "dependencies": {
9
9
  "@material-ui/core": "^3.9.2",
10
10
  "@pie-framework/pie-configure-events": "^1.3.0",
11
- "@pie-lib/config-ui": "^11.26.1",
12
- "@pie-lib/editable-html": "^11.18.1",
13
- "@pie-lib/render-ui": "^4.32.1",
11
+ "@pie-lib/config-ui": "^11.26.3",
12
+ "@pie-lib/editable-html": "^11.18.3",
13
+ "@pie-lib/render-ui": "^4.32.3",
14
14
  "debug": "^4.1.1",
15
15
  "react": "^16.8.6",
16
16
  "react-beautiful-dnd": "^11.0.2",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pie-element/rubric-controller",
3
3
  "private": true,
4
- "version": "4.0.2-esm.0",
4
+ "version": "11.0.3-esm.0",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {
7
7
  "test": "./node_modules/.bin/jest"
package/esm/configure.js CHANGED
@@ -16,11 +16,9 @@ import FormGroup from '@material-ui/core/FormGroup';
16
16
  import FormControlLabel from '@material-ui/core/FormControlLabel';
17
17
  import grey from '@material-ui/core/colors/grey';
18
18
  import Typography from '@material-ui/core/Typography';
19
- import DragIndicator from '@material-ui/icons/DragIndicator';
19
+ import require$$3 from '@material-ui/core/SvgIcon';
20
20
  import EditableHtml from '@pie-lib/editable-html';
21
21
  import Menu from '@material-ui/core/Menu';
22
- import MoreVertIcon from '@material-ui/icons/MoreVert';
23
- import MoreHorizIcon from '@material-ui/icons/MoreHoriz';
24
22
  import IconButton from '@material-ui/core/IconButton';
25
23
  import range from 'lodash/range';
26
24
  import { InputContainer, layout, settings } from '@pie-lib/config-ui';
@@ -59,6 +57,322 @@ function _objectWithoutPropertiesLoose$1(source, excluded) {
59
57
  return target;
60
58
  }
61
59
 
60
+ var DragIndicator = {};
61
+
62
+ var interopRequireDefault = {exports: {}};
63
+
64
+ (function (module) {
65
+ function _interopRequireDefault(obj) {
66
+ return obj && obj.__esModule ? obj : {
67
+ "default": obj
68
+ };
69
+ }
70
+
71
+ module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
72
+ }(interopRequireDefault));
73
+
74
+ var createSvgIcon$1 = {};
75
+
76
+ var pure$1 = {};
77
+
78
+ var shouldUpdate$1 = {};
79
+
80
+ var inheritsLoose = {exports: {}};
81
+
82
+ var setPrototypeOf$2 = {exports: {}};
83
+
84
+ (function (module) {
85
+ function _setPrototypeOf(o, p) {
86
+ module.exports = _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
87
+ o.__proto__ = p;
88
+ return o;
89
+ }, module.exports.__esModule = true, module.exports["default"] = module.exports;
90
+ return _setPrototypeOf(o, p);
91
+ }
92
+
93
+ module.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;
94
+ }(setPrototypeOf$2));
95
+
96
+ (function (module) {
97
+ var setPrototypeOf = setPrototypeOf$2.exports;
98
+
99
+ function _inheritsLoose(subClass, superClass) {
100
+ subClass.prototype = Object.create(superClass.prototype);
101
+ subClass.prototype.constructor = subClass;
102
+ setPrototypeOf(subClass, superClass);
103
+ }
104
+
105
+ module.exports = _inheritsLoose, module.exports.__esModule = true, module.exports["default"] = module.exports;
106
+ }(inheritsLoose));
107
+
108
+ var setDisplayName$1 = {};
109
+
110
+ var setStatic$1 = {};
111
+
112
+ setStatic$1.__esModule = true;
113
+ setStatic$1.default = void 0;
114
+
115
+ var setStatic = function setStatic(key, value) {
116
+ return function (BaseComponent) {
117
+ /* eslint-disable no-param-reassign */
118
+ BaseComponent[key] = value;
119
+ /* eslint-enable no-param-reassign */
120
+
121
+ return BaseComponent;
122
+ };
123
+ };
124
+
125
+ var _default$a = setStatic;
126
+ setStatic$1.default = _default$a;
127
+
128
+ var _interopRequireDefault$8 = interopRequireDefault.exports;
129
+
130
+ setDisplayName$1.__esModule = true;
131
+ setDisplayName$1.default = void 0;
132
+
133
+ var _setStatic = _interopRequireDefault$8(setStatic$1);
134
+
135
+ var setDisplayName = function setDisplayName(displayName) {
136
+ return (0, _setStatic.default)('displayName', displayName);
137
+ };
138
+
139
+ var _default$9 = setDisplayName;
140
+ setDisplayName$1.default = _default$9;
141
+
142
+ var wrapDisplayName$1 = {};
143
+
144
+ var getDisplayName$1 = {};
145
+
146
+ getDisplayName$1.__esModule = true;
147
+ getDisplayName$1.default = void 0;
148
+
149
+ var getDisplayName = function getDisplayName(Component) {
150
+ if (typeof Component === 'string') {
151
+ return Component;
152
+ }
153
+
154
+ if (!Component) {
155
+ return undefined;
156
+ }
157
+
158
+ return Component.displayName || Component.name || 'Component';
159
+ };
160
+
161
+ var _default$8 = getDisplayName;
162
+ getDisplayName$1.default = _default$8;
163
+
164
+ var _interopRequireDefault$7 = interopRequireDefault.exports;
165
+
166
+ wrapDisplayName$1.__esModule = true;
167
+ wrapDisplayName$1.default = void 0;
168
+
169
+ var _getDisplayName = _interopRequireDefault$7(getDisplayName$1);
170
+
171
+ var wrapDisplayName = function wrapDisplayName(BaseComponent, hocName) {
172
+ return hocName + "(" + (0, _getDisplayName.default)(BaseComponent) + ")";
173
+ };
174
+
175
+ var _default$7 = wrapDisplayName;
176
+ wrapDisplayName$1.default = _default$7;
177
+
178
+ var _interopRequireDefault$6 = interopRequireDefault.exports;
179
+
180
+ shouldUpdate$1.__esModule = true;
181
+ shouldUpdate$1.default = void 0;
182
+
183
+ var _inheritsLoose2 = _interopRequireDefault$6(inheritsLoose.exports);
184
+
185
+ var _react$4 = React;
186
+
187
+ var _setDisplayName$1 = _interopRequireDefault$6(setDisplayName$1);
188
+
189
+ var _wrapDisplayName$1 = _interopRequireDefault$6(wrapDisplayName$1);
190
+
191
+ var shouldUpdate = function shouldUpdate(test) {
192
+ return function (BaseComponent) {
193
+ var factory = (0, _react$4.createFactory)(BaseComponent);
194
+
195
+ var ShouldUpdate =
196
+ /*#__PURE__*/
197
+ function (_Component) {
198
+ (0, _inheritsLoose2.default)(ShouldUpdate, _Component);
199
+
200
+ function ShouldUpdate() {
201
+ return _Component.apply(this, arguments) || this;
202
+ }
203
+
204
+ var _proto = ShouldUpdate.prototype;
205
+
206
+ _proto.shouldComponentUpdate = function shouldComponentUpdate(nextProps) {
207
+ return test(this.props, nextProps);
208
+ };
209
+
210
+ _proto.render = function render() {
211
+ return factory(this.props);
212
+ };
213
+
214
+ return ShouldUpdate;
215
+ }(_react$4.Component);
216
+
217
+ if (process.env.NODE_ENV !== 'production') {
218
+ return (0, _setDisplayName$1.default)((0, _wrapDisplayName$1.default)(BaseComponent, 'shouldUpdate'))(ShouldUpdate);
219
+ }
220
+
221
+ return ShouldUpdate;
222
+ };
223
+ };
224
+
225
+ var _default$6 = shouldUpdate;
226
+ shouldUpdate$1.default = _default$6;
227
+
228
+ var shallowEqual$2 = {};
229
+
230
+ /**
231
+ * Copyright (c) 2013-present, Facebook, Inc.
232
+ *
233
+ * This source code is licensed under the MIT license found in the
234
+ * LICENSE file in the root directory of this source tree.
235
+ *
236
+ * @typechecks
237
+ *
238
+ */
239
+
240
+ var hasOwnProperty$1 = Object.prototype.hasOwnProperty;
241
+
242
+ /**
243
+ * inlined Object.is polyfill to avoid requiring consumers ship their own
244
+ * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
245
+ */
246
+ function is$2(x, y) {
247
+ // SameValue algorithm
248
+ if (x === y) {
249
+ // Steps 1-5, 7-10
250
+ // Steps 6.b-6.e: +0 != -0
251
+ // Added the nonzero y check to make Flow happy, but it is redundant
252
+ return x !== 0 || y !== 0 || 1 / x === 1 / y;
253
+ } else {
254
+ // Step 6.a: NaN == NaN
255
+ return x !== x && y !== y;
256
+ }
257
+ }
258
+
259
+ /**
260
+ * Performs equality by iterating through keys on an object and returning false
261
+ * when any key has values which are not strictly equal between the arguments.
262
+ * Returns true when the values of all keys are strictly equal.
263
+ */
264
+ function shallowEqual$1(objA, objB) {
265
+ if (is$2(objA, objB)) {
266
+ return true;
267
+ }
268
+
269
+ if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {
270
+ return false;
271
+ }
272
+
273
+ var keysA = Object.keys(objA);
274
+ var keysB = Object.keys(objB);
275
+
276
+ if (keysA.length !== keysB.length) {
277
+ return false;
278
+ }
279
+
280
+ // Test for A's keys different from B.
281
+ for (var i = 0; i < keysA.length; i++) {
282
+ if (!hasOwnProperty$1.call(objB, keysA[i]) || !is$2(objA[keysA[i]], objB[keysA[i]])) {
283
+ return false;
284
+ }
285
+ }
286
+
287
+ return true;
288
+ }
289
+
290
+ var shallowEqual_1 = shallowEqual$1;
291
+
292
+ var _interopRequireDefault$5 = interopRequireDefault.exports;
293
+
294
+ shallowEqual$2.__esModule = true;
295
+ shallowEqual$2.default = void 0;
296
+
297
+ var _shallowEqual$1 = _interopRequireDefault$5(shallowEqual_1);
298
+
299
+ var _default$5 = _shallowEqual$1.default;
300
+ shallowEqual$2.default = _default$5;
301
+
302
+ var _interopRequireDefault$4 = interopRequireDefault.exports;
303
+
304
+ pure$1.__esModule = true;
305
+ pure$1.default = void 0;
306
+
307
+ var _shouldUpdate = _interopRequireDefault$4(shouldUpdate$1);
308
+
309
+ var _shallowEqual = _interopRequireDefault$4(shallowEqual$2);
310
+
311
+ var _setDisplayName = _interopRequireDefault$4(setDisplayName$1);
312
+
313
+ var _wrapDisplayName = _interopRequireDefault$4(wrapDisplayName$1);
314
+
315
+ var pure = function pure(BaseComponent) {
316
+ var hoc = (0, _shouldUpdate.default)(function (props, nextProps) {
317
+ return !(0, _shallowEqual.default)(props, nextProps);
318
+ });
319
+
320
+ if (process.env.NODE_ENV !== 'production') {
321
+ return (0, _setDisplayName.default)((0, _wrapDisplayName.default)(BaseComponent, 'pure'))(hoc(BaseComponent));
322
+ }
323
+
324
+ return hoc(BaseComponent);
325
+ };
326
+
327
+ var _default$4 = pure;
328
+ pure$1.default = _default$4;
329
+
330
+ var _interopRequireDefault$3 = interopRequireDefault.exports;
331
+
332
+ Object.defineProperty(createSvgIcon$1, "__esModule", {
333
+ value: true
334
+ });
335
+ createSvgIcon$1.default = void 0;
336
+
337
+ var _react$3 = _interopRequireDefault$3(React);
338
+
339
+ var _pure = _interopRequireDefault$3(pure$1);
340
+
341
+ var _SvgIcon = _interopRequireDefault$3(require$$3);
342
+
343
+ function createSvgIcon(path, displayName) {
344
+ var Icon = function Icon(props) {
345
+ return _react$3.default.createElement(_SvgIcon.default, props, path);
346
+ };
347
+
348
+ Icon.displayName = "".concat(displayName, "Icon");
349
+ Icon = (0, _pure.default)(Icon);
350
+ Icon.muiName = 'SvgIcon';
351
+ return Icon;
352
+ }
353
+ var _default$3 = createSvgIcon;
354
+ createSvgIcon$1.default = _default$3;
355
+
356
+ var _interopRequireDefault$2 = interopRequireDefault.exports;
357
+
358
+ Object.defineProperty(DragIndicator, "__esModule", {
359
+ value: true
360
+ });
361
+ var default_1$2 = DragIndicator.default = void 0;
362
+
363
+ var _react$2 = _interopRequireDefault$2(React);
364
+
365
+ var _createSvgIcon$2 = _interopRequireDefault$2(createSvgIcon$1);
366
+
367
+ var _default$2 = (0, _createSvgIcon$2.default)(_react$2.default.createElement(_react$2.default.Fragment, null, _react$2.default.createElement("path", {
368
+ fill: "none",
369
+ d: "M0 0h24v24H0V0z"
370
+ }), _react$2.default.createElement("path", {
371
+ d: "M11 18c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2zm-2-8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm6 4c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"
372
+ })), 'DragIndicator');
373
+
374
+ default_1$2 = DragIndicator.default = _default$2;
375
+
62
376
  var _global = {exports: {}};
63
377
 
64
378
  // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
@@ -11152,6 +11466,50 @@ var ConnectedDraggable = connect(makeMapStateToProps$1, mapDispatchToProps$1, nu
11152
11466
  })(Draggable);
11153
11467
  ConnectedDraggable.defaultProps = defaultProps$1;
11154
11468
 
11469
+ var MoreVert = {};
11470
+
11471
+ var _interopRequireDefault$1 = interopRequireDefault.exports;
11472
+
11473
+ Object.defineProperty(MoreVert, "__esModule", {
11474
+ value: true
11475
+ });
11476
+ var default_1$1 = MoreVert.default = void 0;
11477
+
11478
+ var _react$1 = _interopRequireDefault$1(React);
11479
+
11480
+ var _createSvgIcon$1 = _interopRequireDefault$1(createSvgIcon$1);
11481
+
11482
+ var _default$1 = (0, _createSvgIcon$1.default)(_react$1.default.createElement(_react$1.default.Fragment, null, _react$1.default.createElement("path", {
11483
+ fill: "none",
11484
+ d: "M0 0h24v24H0z"
11485
+ }), _react$1.default.createElement("path", {
11486
+ d: "M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"
11487
+ })), 'MoreVert');
11488
+
11489
+ default_1$1 = MoreVert.default = _default$1;
11490
+
11491
+ var MoreHoriz = {};
11492
+
11493
+ var _interopRequireDefault = interopRequireDefault.exports;
11494
+
11495
+ Object.defineProperty(MoreHoriz, "__esModule", {
11496
+ value: true
11497
+ });
11498
+ var default_1 = MoreHoriz.default = void 0;
11499
+
11500
+ var _react = _interopRequireDefault(React);
11501
+
11502
+ var _createSvgIcon = _interopRequireDefault(createSvgIcon$1);
11503
+
11504
+ var _default = (0, _createSvgIcon.default)(_react.default.createElement(_react.default.Fragment, null, _react.default.createElement("path", {
11505
+ fill: "none",
11506
+ d: "M0 0h24v24H0z"
11507
+ }), _react.default.createElement("path", {
11508
+ d: "M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"
11509
+ })), 'MoreHoriz');
11510
+
11511
+ default_1 = MoreHoriz.default = _default;
11512
+
11155
11513
  class IconMenu extends React.Component {
11156
11514
  constructor(props) {
11157
11515
  super(props);
@@ -11193,9 +11551,9 @@ class IconMenu extends React.Component {
11193
11551
  onClick: this.handleClick
11194
11552
  }, /*#__PURE__*/React.createElement(IconButton, {
11195
11553
  className: classes.icon
11196
- }, open ? /*#__PURE__*/React.createElement(MoreVertIcon, {
11554
+ }, open ? /*#__PURE__*/React.createElement(default_1$1, {
11197
11555
  color: iconColor
11198
- }) : /*#__PURE__*/React.createElement(MoreHorizIcon, {
11556
+ }) : /*#__PURE__*/React.createElement(default_1, {
11199
11557
  color: iconColor
11200
11558
  }))), /*#__PURE__*/React.createElement(Menu, {
11201
11559
  id: "point-menu",
@@ -11352,7 +11710,7 @@ const PointConfig = withStyles(theme => ({
11352
11710
  className: classes.pointsLabel
11353
11711
  }, pointsLabel), /*#__PURE__*/React.createElement("div", {
11354
11712
  className: classes.row
11355
- }, /*#__PURE__*/React.createElement(DragIndicator, {
11713
+ }, /*#__PURE__*/React.createElement(default_1$2, {
11356
11714
  className: classes.dragIndicator
11357
11715
  }), /*#__PURE__*/React.createElement(EditableHtml, {
11358
11716
  className: classes.editor,