@pie-element/complex-rubric 2.18.5-next.0 → 2.18.5-next.1

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.
@@ -7,7 +7,7 @@
7
7
  "test": "echo \"Error: no test specified\" && exit 1"
8
8
  },
9
9
  "dependencies": {
10
- "@pie-lib/pie-toolbox": "1.29.3",
10
+ "@pie-lib/pie-toolbox": "1.30.0",
11
11
  "lodash": "^4.17.15"
12
12
  },
13
13
  "author": "",
@@ -1,6 +1,6 @@
1
- import {_dll_react, _dll_prop_types, _dll_classnames, _dll_react_dom, _dll_debug, _dll_lodash, _dll_react_dom_server, _dll_pie_framework__mathquill} from "../../../@pie-lib/pie-toolbox-math-rendering-module@1.22.2/module/index.js";
1
+ import {_dll_react, _dll_prop_types, _dll_classnames, _dll_react_dom, _dll_debug, _dll_lodash, _dll_react_dom_server, _dll_pie_framework__mathquill} from "../../../@pie-lib/pie-toolbox-math-rendering-module@1.22.3/module/index.js";
2
2
  import RubricConfigure from '@pie-element/rubric/configure/lib';
3
- import {_dll_pie_lib__pie_toolbox_editable_html, _dll_pie_lib__pie_toolbox_render_ui, _dll_pie_lib__pie_toolbox_config_ui} from "../../../@pie-lib/pie-toolbox-module@4.23.1/module/index.js";
3
+ import {_dll_pie_lib__pie_toolbox_editable_html, _dll_pie_lib__pie_toolbox_render_ui, _dll_pie_lib__pie_toolbox_config_ui} from "../../../@pie-lib/pie-toolbox-module@4.24.3/module/index.js";
4
4
  function _mergeNamespaces(n, m) {
5
5
  m.forEach(function (e) {
6
6
  e && typeof e !== 'string' && !Array.isArray(e) && Object.keys(e).forEach(function (k) {
@@ -138964,6 +138964,10 @@ const require$$12$b = _dll_debug;
138964
138964
  video: 'Video',
138965
138965
  audio: 'Audio'
138966
138966
  };
138967
+ var tabsTypeMap = {
138968
+ uploadFile: 'upload-file',
138969
+ insertUrl: 'insert-url'
138970
+ };
138967
138971
  var MediaDialog = (function (_React$Component) {
138968
138972
  (0, _inherits2["default"])(MediaDialog, _React$Component);
138969
138973
  var _super = _createSuper(MediaDialog);
@@ -139086,7 +139090,7 @@ const require$$12$b = _dll_debug;
139086
139090
  (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "handleDone", function (val) {
139087
139091
  var handleClose = _this.props.handleClose;
139088
139092
  var _this$state2 = _this.state, tabValue = _this$state2.tabValue, fileUpload = _this$state2.fileUpload;
139089
- var isInsertURL = tabValue === 0;
139093
+ var isInsertURL = tabValue === tabsTypeMap.insertUrl;
139090
139094
  if (!val) {
139091
139095
  if (fileUpload.url) {
139092
139096
  _this.handleRemoveFile();
@@ -139211,7 +139215,8 @@ const require$$12$b = _dll_debug;
139211
139215
  }
139212
139216
  }, _callee2);
139213
139217
  })));
139214
- var _src = props.src, _starts = props.starts, _ends = props.ends, _height = props.height, _url = props.url, _urlToUse = props.urlToUse, _width = props.width;
139218
+ var _ends = props.ends, _height = props.height, _src = props.src, _starts = props.starts, _type = props.type, uploadSoundSupport = props.uploadSoundSupport, _url = props.url, _urlToUse = props.urlToUse, _width = props.width;
139219
+ var showUploadFile = (uploadSoundSupport === null || uploadSoundSupport === void 0 ? void 0 : uploadSoundSupport.add) && (uploadSoundSupport === null || uploadSoundSupport === void 0 ? void 0 : uploadSoundSupport["delete"]) && _type !== 'video';
139215
139220
  _this.state = {
139216
139221
  ends: _ends || 0,
139217
139222
  url: _url,
@@ -139221,7 +139226,7 @@ const require$$12$b = _dll_debug;
139221
139226
  invalid: false,
139222
139227
  starts: _starts || 0,
139223
139228
  width: _width || 560,
139224
- tabValue: 0,
139229
+ tabValue: showUploadFile ? tabsTypeMap.uploadFile : tabsTypeMap.insertUrl,
139225
139230
  fileUpload: {
139226
139231
  error: null,
139227
139232
  loading: false,
@@ -139249,9 +139254,10 @@ const require$$12$b = _dll_debug;
139249
139254
  var _this$props = this.props, classes = _this$props.classes, open = _this$props.open, disablePortal = _this$props.disablePortal, type = _this$props.type, edit = _this$props.edit, uploadSoundSupport = _this$props.uploadSoundSupport;
139250
139255
  var _this$state4 = this.state, ends = _this$state4.ends, height = _this$state4.height, invalid = _this$state4.invalid, starts = _this$state4.starts, width = _this$state4.width, url = _this$state4.url, formattedUrl = _this$state4.formattedUrl, updating = _this$state4.updating, tabValue = _this$state4.tabValue, fileUpload = _this$state4.fileUpload;
139251
139256
  var isYoutube = matchYoutubeUrl(url);
139252
- var isInsertURL = tabValue === 0;
139253
- var isUploadMedia = tabValue === 1;
139257
+ var isInsertURL = tabValue === tabsTypeMap.insertUrl;
139258
+ var isUploadMedia = tabValue === tabsTypeMap.uploadFile;
139254
139259
  var submitIsDisabled = isInsertURL ? invalid || url === null || url === undefined : !fileUpload.url || fileUpload.scheduled;
139260
+ var showUploadFile = (uploadSoundSupport === null || uploadSoundSupport === void 0 ? void 0 : uploadSoundSupport.add) && (uploadSoundSupport === null || uploadSoundSupport === void 0 ? void 0 : uploadSoundSupport["delete"]) && type !== 'video';
139255
139261
  return _react["default"].createElement(_Dialog["default"], {
139256
139262
  classes: {
139257
139263
  paper: classes.paper
@@ -139274,11 +139280,13 @@ const require$$12$b = _dll_debug;
139274
139280
  tabValue: value
139275
139281
  });
139276
139282
  }
139277
- }, _react["default"].createElement(_Tab["default"], {
139278
- label: type === 'video' ? 'Insert YouTube, Vimeo, or Google Drive URL' : 'Insert SoundCloud URL'
139279
- }), uploadSoundSupport !== null && uploadSoundSupport !== void 0 && uploadSoundSupport.add && uploadSoundSupport !== null && uploadSoundSupport !== void 0 && uploadSoundSupport["delete"] && type !== 'video' ? _react["default"].createElement(_Tab["default"], {
139283
+ }, showUploadFile ? _react["default"].createElement(_Tab["default"], {
139284
+ value: tabsTypeMap.uploadFile,
139280
139285
  label: "Upload file"
139281
- }) : null)), isInsertURL && _react["default"].createElement("div", null, _react["default"].createElement(_TextField["default"], {
139286
+ }) : null, _react["default"].createElement(_Tab["default"], {
139287
+ value: tabsTypeMap.insertUrl,
139288
+ label: type === 'video' ? 'Insert YouTube, Vimeo, or Google Drive URL' : 'Insert SoundCloud URL'
139289
+ }))), isInsertURL && _react["default"].createElement("div", null, _react["default"].createElement(_TextField["default"], {
139282
139290
  autoFocus: true,
139283
139291
  error: invalid,
139284
139292
  helperText: invalid ? 'Invalid URL' : '',
@@ -145648,7 +145656,9 @@ var MARK_TAGS = {
145648
145656
  code: 'code',
145649
145657
  strong: 'bold',
145650
145658
  blockquote: 'blockquote',
145651
- h3: 'h3'
145659
+ h3: 'h3',
145660
+ sup: 'sup',
145661
+ sub: 'sub'
145652
145662
  };
145653
145663
  var parseStyleString = function parseStyleString(s) {
145654
145664
  var regex = /([\w-]*)\s*:\s*([^;]*)/g;
@@ -149175,6 +149185,30 @@ function _objectSpread$4(target) {
149175
149185
  return target;
149176
149186
  }
149177
149187
  var log$1 = (0, _debug["default"])('@pie-lib:editable-html:plugins');
149188
+ var SuperscriptIcon = function SuperscriptIcon() {
149189
+ return _react$1e["default"].createElement("svg", {
149190
+ xmlns: "http://www.w3.org/2000/svg",
149191
+ height: "24px",
149192
+ viewBox: "0 0 24 24",
149193
+ width: "24px",
149194
+ fill: "none"
149195
+ }, _react$1e["default"].createElement("path", {
149196
+ d: "M22,7h-2v1h3v1h-4V7c0-0.55,0.45-1,1-1h2V5h-3V4h3c0.55,0,1,0.45,1,1v1C23,6.55,22.55,7,22,7z M5.88,20h2.66l3.4-5.42h0.12 l3.4,5.42h2.66l-4.65-7.27L17.81,6h-2.68l-3.07,4.99h-0.12L8.85,6H6.19l4.32,6.73L5.88,20z",
149197
+ fill: "currentColor"
149198
+ }));
149199
+ };
149200
+ var SubscriptIcon = function SubscriptIcon() {
149201
+ return _react$1e["default"].createElement("svg", {
149202
+ xmlns: "http://www.w3.org/2000/svg",
149203
+ height: "24px",
149204
+ viewBox: "0 0 24 24",
149205
+ width: "24px",
149206
+ fill: "none"
149207
+ }, _react$1e["default"].createElement("path", {
149208
+ d: "M22,18h-2v1h3v1h-4v-2c0-0.55,0.45-1,1-1h2v-1h-3v-1h3c0.55,0,1,0.45,1,1v1C23,17.55,22.55,18,22,18z M5.88,18h2.66 l3.4-5.42h0.12l3.4,5.42h2.66l-4.65-7.27L17.81,4h-2.68l-3.07,4.99h-0.12L8.85,4H6.19l4.32,6.73L5.88,18z",
149209
+ fill: "currentColor"
149210
+ }));
149211
+ };
149178
149212
  var HeadingIcon = function HeadingIcon() {
149179
149213
  return _react$1e["default"].createElement("svg", {
149180
149214
  width: "30",
@@ -149275,7 +149309,7 @@ function MarkHotkey(options) {
149275
149309
  }
149276
149310
  };
149277
149311
  }
149278
- var ALL_PLUGINS = ['bold', 'html', 'italic', 'underline', 'strikethrough', 'bulleted-list', 'numbered-list', 'image', 'math', 'languageCharacters', 'blockquote', 'h3', 'table', 'video', 'audio', 'responseArea', 'redo', 'undo'];
149312
+ var ALL_PLUGINS = ['bold', 'html', 'italic', 'underline', 'strikethrough', 'bulleted-list', 'numbered-list', 'image', 'math', 'languageCharacters', 'blockquote', 'h3', 'table', 'video', 'audio', 'responseArea', 'redo', 'undo', 'superscript', 'subscript'];
149279
149313
  plugins.ALL_PLUGINS = ALL_PLUGINS;
149280
149314
  var DEFAULT_PLUGINS = ALL_PLUGINS.filter(function (plug) {
149281
149315
  return !['responseArea', 'h3', 'blockquote'].includes(plug);
@@ -149359,6 +149393,14 @@ var buildPlugins = function buildPlugins(activePlugins, customPlugins, opts) {
149359
149393
  type: 'underline',
149360
149394
  icon: _react$1e["default"].createElement(_FormatUnderlined["default"], null),
149361
149395
  tag: 'u'
149396
+ })), addIf('superscript', MarkHotkey({
149397
+ type: 'sup',
149398
+ icon: _react$1e["default"].createElement(SuperscriptIcon, null),
149399
+ tag: 'sup'
149400
+ })), addIf('subscript', MarkHotkey({
149401
+ type: 'sub',
149402
+ icon: _react$1e["default"].createElement(SubscriptIcon, null),
149403
+ tag: 'sub'
149362
149404
  })), addIf('image', imagePlugin), addIf('video', (0, _media["default"])('video', opts.media)), addIf('audio', (0, _media["default"])('audio', opts.media)), addIf('math', mathPlugin)].concat((0, _toConsumableArray2$2["default"])(languageCharactersPlugins.map(function (plugin) {
149363
149405
  return addIf('languageCharacters', plugin);
149364
149406
  })), [addIf('blockquote', MarkHotkey({
package/module/element.js CHANGED
@@ -1,5 +1,5 @@
1
- import {_dll_react, _dll_prop_types, _dll_react_dom, _dll_classnames, _dll_debug, _dll_lodash, _dll_react_dom_server, _dll_pie_framework__mathquill} from "../../../@pie-lib/pie-toolbox-math-rendering-module@1.22.2/module/index.js";
2
- import {_dll_pie_lib__pie_toolbox_render_ui} from "../../../@pie-lib/pie-toolbox-module@4.23.1/module/index.js";
1
+ import {_dll_react, _dll_prop_types, _dll_react_dom, _dll_classnames, _dll_debug, _dll_lodash, _dll_react_dom_server, _dll_pie_framework__mathquill} from "../../../@pie-lib/pie-toolbox-math-rendering-module@1.22.3/module/index.js";
2
+ import {_dll_pie_lib__pie_toolbox_render_ui} from "../../../@pie-lib/pie-toolbox-module@4.24.3/module/index.js";
3
3
  function _mergeNamespaces(n, m) {
4
4
  m.forEach(function (e) {
5
5
  e && typeof e !== 'string' && !Array.isArray(e) && Object.keys(e).forEach(function (k) {
@@ -129143,6 +129143,10 @@ const require$$12$b = _dll_debug;
129143
129143
  video: 'Video',
129144
129144
  audio: 'Audio'
129145
129145
  };
129146
+ var tabsTypeMap = {
129147
+ uploadFile: 'upload-file',
129148
+ insertUrl: 'insert-url'
129149
+ };
129146
129150
  var MediaDialog = (function (_React$Component) {
129147
129151
  (0, _inherits2["default"])(MediaDialog, _React$Component);
129148
129152
  var _super = _createSuper(MediaDialog);
@@ -129265,7 +129269,7 @@ const require$$12$b = _dll_debug;
129265
129269
  (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "handleDone", function (val) {
129266
129270
  var handleClose = _this.props.handleClose;
129267
129271
  var _this$state2 = _this.state, tabValue = _this$state2.tabValue, fileUpload = _this$state2.fileUpload;
129268
- var isInsertURL = tabValue === 0;
129272
+ var isInsertURL = tabValue === tabsTypeMap.insertUrl;
129269
129273
  if (!val) {
129270
129274
  if (fileUpload.url) {
129271
129275
  _this.handleRemoveFile();
@@ -129390,7 +129394,8 @@ const require$$12$b = _dll_debug;
129390
129394
  }
129391
129395
  }, _callee2);
129392
129396
  })));
129393
- var _src = props.src, _starts = props.starts, _ends = props.ends, _height = props.height, _url = props.url, _urlToUse = props.urlToUse, _width = props.width;
129397
+ var _ends = props.ends, _height = props.height, _src = props.src, _starts = props.starts, _type = props.type, uploadSoundSupport = props.uploadSoundSupport, _url = props.url, _urlToUse = props.urlToUse, _width = props.width;
129398
+ var showUploadFile = (uploadSoundSupport === null || uploadSoundSupport === void 0 ? void 0 : uploadSoundSupport.add) && (uploadSoundSupport === null || uploadSoundSupport === void 0 ? void 0 : uploadSoundSupport["delete"]) && _type !== 'video';
129394
129399
  _this.state = {
129395
129400
  ends: _ends || 0,
129396
129401
  url: _url,
@@ -129400,7 +129405,7 @@ const require$$12$b = _dll_debug;
129400
129405
  invalid: false,
129401
129406
  starts: _starts || 0,
129402
129407
  width: _width || 560,
129403
- tabValue: 0,
129408
+ tabValue: showUploadFile ? tabsTypeMap.uploadFile : tabsTypeMap.insertUrl,
129404
129409
  fileUpload: {
129405
129410
  error: null,
129406
129411
  loading: false,
@@ -129428,9 +129433,10 @@ const require$$12$b = _dll_debug;
129428
129433
  var _this$props = this.props, classes = _this$props.classes, open = _this$props.open, disablePortal = _this$props.disablePortal, type = _this$props.type, edit = _this$props.edit, uploadSoundSupport = _this$props.uploadSoundSupport;
129429
129434
  var _this$state4 = this.state, ends = _this$state4.ends, height = _this$state4.height, invalid = _this$state4.invalid, starts = _this$state4.starts, width = _this$state4.width, url = _this$state4.url, formattedUrl = _this$state4.formattedUrl, updating = _this$state4.updating, tabValue = _this$state4.tabValue, fileUpload = _this$state4.fileUpload;
129430
129435
  var isYoutube = matchYoutubeUrl(url);
129431
- var isInsertURL = tabValue === 0;
129432
- var isUploadMedia = tabValue === 1;
129436
+ var isInsertURL = tabValue === tabsTypeMap.insertUrl;
129437
+ var isUploadMedia = tabValue === tabsTypeMap.uploadFile;
129433
129438
  var submitIsDisabled = isInsertURL ? invalid || url === null || url === undefined : !fileUpload.url || fileUpload.scheduled;
129439
+ var showUploadFile = (uploadSoundSupport === null || uploadSoundSupport === void 0 ? void 0 : uploadSoundSupport.add) && (uploadSoundSupport === null || uploadSoundSupport === void 0 ? void 0 : uploadSoundSupport["delete"]) && type !== 'video';
129434
129440
  return _react["default"].createElement(_Dialog["default"], {
129435
129441
  classes: {
129436
129442
  paper: classes.paper
@@ -129453,11 +129459,13 @@ const require$$12$b = _dll_debug;
129453
129459
  tabValue: value
129454
129460
  });
129455
129461
  }
129456
- }, _react["default"].createElement(_Tab["default"], {
129457
- label: type === 'video' ? 'Insert YouTube, Vimeo, or Google Drive URL' : 'Insert SoundCloud URL'
129458
- }), uploadSoundSupport !== null && uploadSoundSupport !== void 0 && uploadSoundSupport.add && uploadSoundSupport !== null && uploadSoundSupport !== void 0 && uploadSoundSupport["delete"] && type !== 'video' ? _react["default"].createElement(_Tab["default"], {
129462
+ }, showUploadFile ? _react["default"].createElement(_Tab["default"], {
129463
+ value: tabsTypeMap.uploadFile,
129459
129464
  label: "Upload file"
129460
- }) : null)), isInsertURL && _react["default"].createElement("div", null, _react["default"].createElement(_TextField["default"], {
129465
+ }) : null, _react["default"].createElement(_Tab["default"], {
129466
+ value: tabsTypeMap.insertUrl,
129467
+ label: type === 'video' ? 'Insert YouTube, Vimeo, or Google Drive URL' : 'Insert SoundCloud URL'
129468
+ }))), isInsertURL && _react["default"].createElement("div", null, _react["default"].createElement(_TextField["default"], {
129461
129469
  autoFocus: true,
129462
129470
  error: invalid,
129463
129471
  helperText: invalid ? 'Invalid URL' : '',
@@ -143908,7 +143916,9 @@ var MARK_TAGS = {
143908
143916
  code: 'code',
143909
143917
  strong: 'bold',
143910
143918
  blockquote: 'blockquote',
143911
- h3: 'h3'
143919
+ h3: 'h3',
143920
+ sup: 'sup',
143921
+ sub: 'sub'
143912
143922
  };
143913
143923
  var parseStyleString = function parseStyleString(s) {
143914
143924
  var regex = /([\w-]*)\s*:\s*([^;]*)/g;
@@ -147435,6 +147445,30 @@ function _objectSpread$4(target) {
147435
147445
  return target;
147436
147446
  }
147437
147447
  var log$1 = (0, _debug["default"])('@pie-lib:editable-html:plugins');
147448
+ var SuperscriptIcon = function SuperscriptIcon() {
147449
+ return _react$1c["default"].createElement("svg", {
147450
+ xmlns: "http://www.w3.org/2000/svg",
147451
+ height: "24px",
147452
+ viewBox: "0 0 24 24",
147453
+ width: "24px",
147454
+ fill: "none"
147455
+ }, _react$1c["default"].createElement("path", {
147456
+ d: "M22,7h-2v1h3v1h-4V7c0-0.55,0.45-1,1-1h2V5h-3V4h3c0.55,0,1,0.45,1,1v1C23,6.55,22.55,7,22,7z M5.88,20h2.66l3.4-5.42h0.12 l3.4,5.42h2.66l-4.65-7.27L17.81,6h-2.68l-3.07,4.99h-0.12L8.85,6H6.19l4.32,6.73L5.88,20z",
147457
+ fill: "currentColor"
147458
+ }));
147459
+ };
147460
+ var SubscriptIcon = function SubscriptIcon() {
147461
+ return _react$1c["default"].createElement("svg", {
147462
+ xmlns: "http://www.w3.org/2000/svg",
147463
+ height: "24px",
147464
+ viewBox: "0 0 24 24",
147465
+ width: "24px",
147466
+ fill: "none"
147467
+ }, _react$1c["default"].createElement("path", {
147468
+ d: "M22,18h-2v1h3v1h-4v-2c0-0.55,0.45-1,1-1h2v-1h-3v-1h3c0.55,0,1,0.45,1,1v1C23,17.55,22.55,18,22,18z M5.88,18h2.66 l3.4-5.42h0.12l3.4,5.42h2.66l-4.65-7.27L17.81,4h-2.68l-3.07,4.99h-0.12L8.85,4H6.19l4.32,6.73L5.88,18z",
147469
+ fill: "currentColor"
147470
+ }));
147471
+ };
147438
147472
  var HeadingIcon = function HeadingIcon() {
147439
147473
  return _react$1c["default"].createElement("svg", {
147440
147474
  width: "30",
@@ -147535,7 +147569,7 @@ function MarkHotkey(options) {
147535
147569
  }
147536
147570
  };
147537
147571
  }
147538
- var ALL_PLUGINS = ['bold', 'html', 'italic', 'underline', 'strikethrough', 'bulleted-list', 'numbered-list', 'image', 'math', 'languageCharacters', 'blockquote', 'h3', 'table', 'video', 'audio', 'responseArea', 'redo', 'undo'];
147572
+ var ALL_PLUGINS = ['bold', 'html', 'italic', 'underline', 'strikethrough', 'bulleted-list', 'numbered-list', 'image', 'math', 'languageCharacters', 'blockquote', 'h3', 'table', 'video', 'audio', 'responseArea', 'redo', 'undo', 'superscript', 'subscript'];
147539
147573
  plugins.ALL_PLUGINS = ALL_PLUGINS;
147540
147574
  var DEFAULT_PLUGINS = ALL_PLUGINS.filter(function (plug) {
147541
147575
  return !['responseArea', 'h3', 'blockquote'].includes(plug);
@@ -147619,6 +147653,14 @@ var buildPlugins = function buildPlugins(activePlugins, customPlugins, opts) {
147619
147653
  type: 'underline',
147620
147654
  icon: _react$1c["default"].createElement(_FormatUnderlined["default"], null),
147621
147655
  tag: 'u'
147656
+ })), addIf('superscript', MarkHotkey({
147657
+ type: 'sup',
147658
+ icon: _react$1c["default"].createElement(SuperscriptIcon, null),
147659
+ tag: 'sup'
147660
+ })), addIf('subscript', MarkHotkey({
147661
+ type: 'sub',
147662
+ icon: _react$1c["default"].createElement(SubscriptIcon, null),
147663
+ tag: 'sub'
147622
147664
  })), addIf('image', imagePlugin), addIf('video', (0, _media["default"])('video', opts.media)), addIf('audio', (0, _media["default"])('audio', opts.media)), addIf('math', mathPlugin)].concat((0, _toConsumableArray2$2["default"])(languageCharactersPlugins.map(function (plugin) {
147623
147665
  return addIf('languageCharacters', plugin);
147624
147666
  })), [addIf('blockquote', MarkHotkey({
@@ -4,11 +4,11 @@
4
4
  "modules": [
5
5
  {
6
6
  "name": "@pie-lib/pie-toolbox-math-rendering-module",
7
- "version": "1.22.2"
7
+ "version": "1.22.3"
8
8
  },
9
9
  {
10
10
  "name": "@pie-lib/pie-toolbox-module",
11
- "version": "4.23.1"
11
+ "version": "4.24.3"
12
12
  }
13
13
  ]
14
14
  }
package/module/print.js CHANGED
@@ -1,5 +1,5 @@
1
- import {_dll_react, _dll_prop_types, _dll_react_dom, _dll_classnames, _dll_debug, _dll_lodash, _dll_react_dom_server, _dll_pie_framework__mathquill} from "../../../@pie-lib/pie-toolbox-math-rendering-module@1.22.2/module/index.js";
2
- import {_dll_pie_lib__pie_toolbox_render_ui} from "../../../@pie-lib/pie-toolbox-module@4.23.1/module/index.js";
1
+ import {_dll_react, _dll_prop_types, _dll_react_dom, _dll_classnames, _dll_debug, _dll_lodash, _dll_react_dom_server, _dll_pie_framework__mathquill} from "../../../@pie-lib/pie-toolbox-math-rendering-module@1.22.3/module/index.js";
2
+ import {_dll_pie_lib__pie_toolbox_render_ui} from "../../../@pie-lib/pie-toolbox-module@4.24.3/module/index.js";
3
3
  function _mergeNamespaces(n, m) {
4
4
  m.forEach(function (e) {
5
5
  e && typeof e !== 'string' && !Array.isArray(e) && Object.keys(e).forEach(function (k) {
@@ -129143,6 +129143,10 @@ const require$$12$b = _dll_debug;
129143
129143
  video: 'Video',
129144
129144
  audio: 'Audio'
129145
129145
  };
129146
+ var tabsTypeMap = {
129147
+ uploadFile: 'upload-file',
129148
+ insertUrl: 'insert-url'
129149
+ };
129146
129150
  var MediaDialog = (function (_React$Component) {
129147
129151
  (0, _inherits2["default"])(MediaDialog, _React$Component);
129148
129152
  var _super = _createSuper(MediaDialog);
@@ -129265,7 +129269,7 @@ const require$$12$b = _dll_debug;
129265
129269
  (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "handleDone", function (val) {
129266
129270
  var handleClose = _this.props.handleClose;
129267
129271
  var _this$state2 = _this.state, tabValue = _this$state2.tabValue, fileUpload = _this$state2.fileUpload;
129268
- var isInsertURL = tabValue === 0;
129272
+ var isInsertURL = tabValue === tabsTypeMap.insertUrl;
129269
129273
  if (!val) {
129270
129274
  if (fileUpload.url) {
129271
129275
  _this.handleRemoveFile();
@@ -129390,7 +129394,8 @@ const require$$12$b = _dll_debug;
129390
129394
  }
129391
129395
  }, _callee2);
129392
129396
  })));
129393
- var _src = props.src, _starts = props.starts, _ends = props.ends, _height = props.height, _url = props.url, _urlToUse = props.urlToUse, _width = props.width;
129397
+ var _ends = props.ends, _height = props.height, _src = props.src, _starts = props.starts, _type = props.type, uploadSoundSupport = props.uploadSoundSupport, _url = props.url, _urlToUse = props.urlToUse, _width = props.width;
129398
+ var showUploadFile = (uploadSoundSupport === null || uploadSoundSupport === void 0 ? void 0 : uploadSoundSupport.add) && (uploadSoundSupport === null || uploadSoundSupport === void 0 ? void 0 : uploadSoundSupport["delete"]) && _type !== 'video';
129394
129399
  _this.state = {
129395
129400
  ends: _ends || 0,
129396
129401
  url: _url,
@@ -129400,7 +129405,7 @@ const require$$12$b = _dll_debug;
129400
129405
  invalid: false,
129401
129406
  starts: _starts || 0,
129402
129407
  width: _width || 560,
129403
- tabValue: 0,
129408
+ tabValue: showUploadFile ? tabsTypeMap.uploadFile : tabsTypeMap.insertUrl,
129404
129409
  fileUpload: {
129405
129410
  error: null,
129406
129411
  loading: false,
@@ -129428,9 +129433,10 @@ const require$$12$b = _dll_debug;
129428
129433
  var _this$props = this.props, classes = _this$props.classes, open = _this$props.open, disablePortal = _this$props.disablePortal, type = _this$props.type, edit = _this$props.edit, uploadSoundSupport = _this$props.uploadSoundSupport;
129429
129434
  var _this$state4 = this.state, ends = _this$state4.ends, height = _this$state4.height, invalid = _this$state4.invalid, starts = _this$state4.starts, width = _this$state4.width, url = _this$state4.url, formattedUrl = _this$state4.formattedUrl, updating = _this$state4.updating, tabValue = _this$state4.tabValue, fileUpload = _this$state4.fileUpload;
129430
129435
  var isYoutube = matchYoutubeUrl(url);
129431
- var isInsertURL = tabValue === 0;
129432
- var isUploadMedia = tabValue === 1;
129436
+ var isInsertURL = tabValue === tabsTypeMap.insertUrl;
129437
+ var isUploadMedia = tabValue === tabsTypeMap.uploadFile;
129433
129438
  var submitIsDisabled = isInsertURL ? invalid || url === null || url === undefined : !fileUpload.url || fileUpload.scheduled;
129439
+ var showUploadFile = (uploadSoundSupport === null || uploadSoundSupport === void 0 ? void 0 : uploadSoundSupport.add) && (uploadSoundSupport === null || uploadSoundSupport === void 0 ? void 0 : uploadSoundSupport["delete"]) && type !== 'video';
129434
129440
  return _react["default"].createElement(_Dialog["default"], {
129435
129441
  classes: {
129436
129442
  paper: classes.paper
@@ -129453,11 +129459,13 @@ const require$$12$b = _dll_debug;
129453
129459
  tabValue: value
129454
129460
  });
129455
129461
  }
129456
- }, _react["default"].createElement(_Tab["default"], {
129457
- label: type === 'video' ? 'Insert YouTube, Vimeo, or Google Drive URL' : 'Insert SoundCloud URL'
129458
- }), uploadSoundSupport !== null && uploadSoundSupport !== void 0 && uploadSoundSupport.add && uploadSoundSupport !== null && uploadSoundSupport !== void 0 && uploadSoundSupport["delete"] && type !== 'video' ? _react["default"].createElement(_Tab["default"], {
129462
+ }, showUploadFile ? _react["default"].createElement(_Tab["default"], {
129463
+ value: tabsTypeMap.uploadFile,
129459
129464
  label: "Upload file"
129460
- }) : null)), isInsertURL && _react["default"].createElement("div", null, _react["default"].createElement(_TextField["default"], {
129465
+ }) : null, _react["default"].createElement(_Tab["default"], {
129466
+ value: tabsTypeMap.insertUrl,
129467
+ label: type === 'video' ? 'Insert YouTube, Vimeo, or Google Drive URL' : 'Insert SoundCloud URL'
129468
+ }))), isInsertURL && _react["default"].createElement("div", null, _react["default"].createElement(_TextField["default"], {
129461
129469
  autoFocus: true,
129462
129470
  error: invalid,
129463
129471
  helperText: invalid ? 'Invalid URL' : '',
@@ -143908,7 +143916,9 @@ var MARK_TAGS = {
143908
143916
  code: 'code',
143909
143917
  strong: 'bold',
143910
143918
  blockquote: 'blockquote',
143911
- h3: 'h3'
143919
+ h3: 'h3',
143920
+ sup: 'sup',
143921
+ sub: 'sub'
143912
143922
  };
143913
143923
  var parseStyleString = function parseStyleString(s) {
143914
143924
  var regex = /([\w-]*)\s*:\s*([^;]*)/g;
@@ -147435,6 +147445,30 @@ function _objectSpread$4(target) {
147435
147445
  return target;
147436
147446
  }
147437
147447
  var log$1 = (0, _debug["default"])('@pie-lib:editable-html:plugins');
147448
+ var SuperscriptIcon = function SuperscriptIcon() {
147449
+ return _react$1c["default"].createElement("svg", {
147450
+ xmlns: "http://www.w3.org/2000/svg",
147451
+ height: "24px",
147452
+ viewBox: "0 0 24 24",
147453
+ width: "24px",
147454
+ fill: "none"
147455
+ }, _react$1c["default"].createElement("path", {
147456
+ d: "M22,7h-2v1h3v1h-4V7c0-0.55,0.45-1,1-1h2V5h-3V4h3c0.55,0,1,0.45,1,1v1C23,6.55,22.55,7,22,7z M5.88,20h2.66l3.4-5.42h0.12 l3.4,5.42h2.66l-4.65-7.27L17.81,6h-2.68l-3.07,4.99h-0.12L8.85,6H6.19l4.32,6.73L5.88,20z",
147457
+ fill: "currentColor"
147458
+ }));
147459
+ };
147460
+ var SubscriptIcon = function SubscriptIcon() {
147461
+ return _react$1c["default"].createElement("svg", {
147462
+ xmlns: "http://www.w3.org/2000/svg",
147463
+ height: "24px",
147464
+ viewBox: "0 0 24 24",
147465
+ width: "24px",
147466
+ fill: "none"
147467
+ }, _react$1c["default"].createElement("path", {
147468
+ d: "M22,18h-2v1h3v1h-4v-2c0-0.55,0.45-1,1-1h2v-1h-3v-1h3c0.55,0,1,0.45,1,1v1C23,17.55,22.55,18,22,18z M5.88,18h2.66 l3.4-5.42h0.12l3.4,5.42h2.66l-4.65-7.27L17.81,4h-2.68l-3.07,4.99h-0.12L8.85,4H6.19l4.32,6.73L5.88,18z",
147469
+ fill: "currentColor"
147470
+ }));
147471
+ };
147438
147472
  var HeadingIcon = function HeadingIcon() {
147439
147473
  return _react$1c["default"].createElement("svg", {
147440
147474
  width: "30",
@@ -147535,7 +147569,7 @@ function MarkHotkey(options) {
147535
147569
  }
147536
147570
  };
147537
147571
  }
147538
- var ALL_PLUGINS = ['bold', 'html', 'italic', 'underline', 'strikethrough', 'bulleted-list', 'numbered-list', 'image', 'math', 'languageCharacters', 'blockquote', 'h3', 'table', 'video', 'audio', 'responseArea', 'redo', 'undo'];
147572
+ var ALL_PLUGINS = ['bold', 'html', 'italic', 'underline', 'strikethrough', 'bulleted-list', 'numbered-list', 'image', 'math', 'languageCharacters', 'blockquote', 'h3', 'table', 'video', 'audio', 'responseArea', 'redo', 'undo', 'superscript', 'subscript'];
147539
147573
  plugins.ALL_PLUGINS = ALL_PLUGINS;
147540
147574
  var DEFAULT_PLUGINS = ALL_PLUGINS.filter(function (plug) {
147541
147575
  return !['responseArea', 'h3', 'blockquote'].includes(plug);
@@ -147619,6 +147653,14 @@ var buildPlugins = function buildPlugins(activePlugins, customPlugins, opts) {
147619
147653
  type: 'underline',
147620
147654
  icon: _react$1c["default"].createElement(_FormatUnderlined["default"], null),
147621
147655
  tag: 'u'
147656
+ })), addIf('superscript', MarkHotkey({
147657
+ type: 'sup',
147658
+ icon: _react$1c["default"].createElement(SuperscriptIcon, null),
147659
+ tag: 'sup'
147660
+ })), addIf('subscript', MarkHotkey({
147661
+ type: 'sub',
147662
+ icon: _react$1c["default"].createElement(SubscriptIcon, null),
147663
+ tag: 'sub'
147622
147664
  })), addIf('image', imagePlugin), addIf('video', (0, _media["default"])('video', opts.media)), addIf('audio', (0, _media["default"])('audio', opts.media)), addIf('math', mathPlugin)].concat((0, _toConsumableArray2$2["default"])(languageCharactersPlugins.map(function (plugin) {
147623
147665
  return addIf('languageCharacters', plugin);
147624
147666
  })), [addIf('blockquote', MarkHotkey({
package/package.json CHANGED
@@ -1,21 +1,21 @@
1
1
  {
2
2
  "name": "@pie-element/complex-rubric",
3
3
  "repository": "pie-framework/pie-elements",
4
- "version": "2.18.5-next.0+e65085474",
4
+ "version": "2.18.5-next.1+395d7d779",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
8
8
  "dependencies": {
9
9
  "@material-ui/core": "^3.9.2",
10
- "@pie-element/multi-trait-rubric": "^3.18.4-next.14+e65085474",
11
- "@pie-element/rubric": "^3.18.4-next.14+e65085474",
10
+ "@pie-element/multi-trait-rubric": "^3.18.4-next.15+395d7d779",
11
+ "@pie-element/rubric": "^3.18.4-next.15+395d7d779",
12
12
  "@pie-framework/pie-player-events": "^0.1.0",
13
13
  "classnames": "^2.2.5",
14
14
  "debug": "^4.1.1",
15
15
  "lodash": "^4.17.11",
16
16
  "prop-types": "^15.7.2"
17
17
  },
18
- "gitHead": "e65085474ada79e0f7fb979a5c81260f2d331f71",
18
+ "gitHead": "395d7d779caae57a810cc19c1d676319d1c19ded",
19
19
  "scripts": {
20
20
  "postpublish": "../../scripts/postpublish"
21
21
  },