@pie-element/complex-rubric 3.1.3 → 3.1.4-next.43

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/module/element.js CHANGED
@@ -1,5 +1,5 @@
1
- import {_dll_react, _dll_prop_types, _dll_react_dom, _dll_classnames, _dll_debug, _dll_pie_lib__pie_toolbox_math_rendering_accessible, _dll_lodash, _dll_react_dom_server, _dll_pie_framework__mathquill} from "../../../@pie-lib/pie-toolbox-math-rendering-module@2.0.11/module/index.js";
2
- import {_dll_pie_lib__pie_toolbox_render_ui} from "../../../@pie-lib/pie-toolbox-module@5.0.7/module/index.js";
1
+ import {_dll_react, _dll_prop_types, _dll_react_dom, _dll_classnames, _dll_debug, _dll_pie_lib__pie_toolbox_math_rendering_accessible, _dll_lodash, _dll_react_dom_server, _dll_pie_framework__mathquill} from "../../../@pie-lib/pie-toolbox-math-rendering-module@2.0.12/module/index.js";
2
+ import {_dll_pie_lib__pie_toolbox_render_ui} from "../../../@pie-lib/pie-toolbox-module@5.0.11/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) {
@@ -32816,6 +32816,7 @@ toolbarButtons.RawMarkButton = RawMarkButton;
32816
32816
  (0, _defineProperty2$R["default"])(RawMarkButton, "propTypes", {
32817
32817
  onToggle: _propTypes$1n["default"].func.isRequired,
32818
32818
  mark: _propTypes$1n["default"].string,
32819
+ label: _propTypes$1n["default"].string.isRequired,
32819
32820
  children: _propTypes$1n["default"].oneOfType([_propTypes$1n["default"].arrayOf(_propTypes$1n["default"].node), _propTypes$1n["default"].node]).isRequired,
32820
32821
  classes: _propTypes$1n["default"].object.isRequired,
32821
32822
  active: _propTypes$1n["default"].bool
@@ -87661,12 +87662,19 @@ const require$$10$r = _dll_debug;
87661
87662
  if (props.isMark) {
87662
87663
  var isActive = (0, _utils.hasMark)(props.value, props.type);
87663
87664
  log('[ToolbarButton] mark:isActive: ', isActive);
87665
+ var ariaLabel;
87666
+ if (props.type === 'sup') {
87667
+ ariaLabel = 'Superscript (marks text as superscripted)';
87668
+ } else if (props.type === 'sub') {
87669
+ ariaLabel = 'Subscript (marks text as subscripted)';
87670
+ } else {
87671
+ ariaLabel = props.type;
87672
+ }
87664
87673
  return _react["default"].createElement(_toolbarButtons.MarkButton, {
87665
87674
  active: isActive,
87666
- label: props.type,
87667
87675
  onToggle: onToggle,
87668
87676
  mark: props.type,
87669
- ariaLabel: props.type
87677
+ label: ariaLabel
87670
87678
  }, props.icon);
87671
87679
  } else {
87672
87680
  var disabled = props.disabled;
@@ -90487,7 +90495,8 @@ const require$$3$A = _dll_prop_types;
90487
90495
  border: '1px solid #C0C3CF',
90488
90496
  boxSizing: 'border-box',
90489
90497
  borderRadius: '3px',
90490
- position: 'relative'
90498
+ position: 'relative',
90499
+ alignItems: 'center'
90491
90500
  }
90492
90501
  }, _react["default"].createElement("div", {
90493
90502
  style: {
@@ -90495,13 +90504,17 @@ const require$$3$A = _dll_prop_types;
90495
90504
  overflow: 'hidden',
90496
90505
  padding: '0 25px 0 8px',
90497
90506
  whiteSpace: 'nowrap',
90498
- textOverflow: 'ellipsis',
90499
- lineHeight: '35px'
90507
+ textOverflow: 'ellipsis'
90508
+ }
90509
+ }, _react["default"].createElement("span", {
90510
+ style: {
90511
+ display: 'inline-block',
90512
+ verticalAlign: 'middle'
90500
90513
  },
90501
90514
  dangerouslySetInnerHTML: {
90502
90515
  __html: html
90503
90516
  }
90504
- }), _react["default"].createElement(_icons.Chevron, {
90517
+ })), _react["default"].createElement(_icons.Chevron, {
90505
90518
  direction: "down",
90506
90519
  style: {
90507
90520
  position: 'absolute',
@@ -103894,6 +103907,7 @@ function UndoRedo(type) {
103894
103907
  toolbar: {
103895
103908
  type: type,
103896
103909
  icon: _react$1c["default"].createElement(IconToUse, null),
103910
+ ariaLabel: type === 'undo' ? 'Undo (revert the last action)' : 'Redo (reapply the last undone action)',
103897
103911
  onClick: function onClick(value, onChange) {
103898
103912
  var change = value.change();
103899
103913
  onChange(change[type]());
@@ -112760,7 +112774,8 @@ const require$$23 = _dll_classnames;
112760
112774
  (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "renderPlaceholder", function (props) {
112761
112775
  var editor = props.editor;
112762
112776
  var document = editor.value.document;
112763
- if (!editor.props.placeholder || document.text !== '' || document.nodes.size !== 1) {
112777
+ var stateValue = _this.state.value;
112778
+ if (!editor.props.placeholder || document.text !== '' || document.nodes.size !== 1 || !document.isEmpty || stateValue.isFocused) {
112764
112779
  return false;
112765
112780
  }
112766
112781
  return _react["default"].createElement("span", {
package/module/index.html CHANGED
@@ -2,7 +2,7 @@
2
2
  <!doctype html>
3
3
  <html>
4
4
  <head>
5
- <title>@pie-element/complex-rubric@3.1.2</title>
5
+ <title>@pie-element/complex-rubric@3.1.3</title>
6
6
  <script
7
7
  type="module"
8
8
  src="https://cdn.jsdelivr.net/npm/@pslb/demo-el@^1.0.0/dist/demo-el/demo-el.esm.js"></script>
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@pie-element/complex-rubric",
3
- "version": "3.1.2",
3
+ "version": "3.1.3",
4
4
  "modules": [
5
5
  {
6
6
  "name": "@pie-lib/pie-toolbox-math-rendering-module",
7
- "version": "2.0.11"
7
+ "version": "2.0.12"
8
8
  },
9
9
  {
10
10
  "name": "@pie-lib/pie-toolbox-module",
11
- "version": "5.0.7"
11
+ "version": "5.0.11"
12
12
  }
13
13
  ]
14
14
  }
package/module/print.html CHANGED
@@ -2,7 +2,7 @@
2
2
  <!doctype html>
3
3
  <html>
4
4
  <head>
5
- <title>@pie-element/complex-rubric@3.1.2</title>
5
+ <title>@pie-element/complex-rubric@3.1.3</title>
6
6
  <link
7
7
  href="https://fonts.googleapis.com/css?family=Roboto&display=swap"
8
8
  rel="stylesheet"
package/module/print.js CHANGED
@@ -1,5 +1,5 @@
1
- import {_dll_react, _dll_prop_types, _dll_react_dom, _dll_classnames, _dll_debug, _dll_pie_lib__pie_toolbox_math_rendering_accessible, _dll_lodash, _dll_react_dom_server, _dll_pie_framework__mathquill} from "../../../@pie-lib/pie-toolbox-math-rendering-module@2.0.11/module/index.js";
2
- import {_dll_pie_lib__pie_toolbox_render_ui} from "../../../@pie-lib/pie-toolbox-module@5.0.7/module/index.js";
1
+ import {_dll_react, _dll_prop_types, _dll_react_dom, _dll_classnames, _dll_debug, _dll_pie_lib__pie_toolbox_math_rendering_accessible, _dll_lodash, _dll_react_dom_server, _dll_pie_framework__mathquill} from "../../../@pie-lib/pie-toolbox-math-rendering-module@2.0.12/module/index.js";
2
+ import {_dll_pie_lib__pie_toolbox_render_ui} from "../../../@pie-lib/pie-toolbox-module@5.0.11/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) {
@@ -32816,6 +32816,7 @@ toolbarButtons.RawMarkButton = RawMarkButton;
32816
32816
  (0, _defineProperty2$R["default"])(RawMarkButton, "propTypes", {
32817
32817
  onToggle: _propTypes$1n["default"].func.isRequired,
32818
32818
  mark: _propTypes$1n["default"].string,
32819
+ label: _propTypes$1n["default"].string.isRequired,
32819
32820
  children: _propTypes$1n["default"].oneOfType([_propTypes$1n["default"].arrayOf(_propTypes$1n["default"].node), _propTypes$1n["default"].node]).isRequired,
32820
32821
  classes: _propTypes$1n["default"].object.isRequired,
32821
32822
  active: _propTypes$1n["default"].bool
@@ -87661,12 +87662,19 @@ const require$$10$r = _dll_debug;
87661
87662
  if (props.isMark) {
87662
87663
  var isActive = (0, _utils.hasMark)(props.value, props.type);
87663
87664
  log('[ToolbarButton] mark:isActive: ', isActive);
87665
+ var ariaLabel;
87666
+ if (props.type === 'sup') {
87667
+ ariaLabel = 'Superscript (marks text as superscripted)';
87668
+ } else if (props.type === 'sub') {
87669
+ ariaLabel = 'Subscript (marks text as subscripted)';
87670
+ } else {
87671
+ ariaLabel = props.type;
87672
+ }
87664
87673
  return _react["default"].createElement(_toolbarButtons.MarkButton, {
87665
87674
  active: isActive,
87666
- label: props.type,
87667
87675
  onToggle: onToggle,
87668
87676
  mark: props.type,
87669
- ariaLabel: props.type
87677
+ label: ariaLabel
87670
87678
  }, props.icon);
87671
87679
  } else {
87672
87680
  var disabled = props.disabled;
@@ -90487,7 +90495,8 @@ const require$$3$A = _dll_prop_types;
90487
90495
  border: '1px solid #C0C3CF',
90488
90496
  boxSizing: 'border-box',
90489
90497
  borderRadius: '3px',
90490
- position: 'relative'
90498
+ position: 'relative',
90499
+ alignItems: 'center'
90491
90500
  }
90492
90501
  }, _react["default"].createElement("div", {
90493
90502
  style: {
@@ -90495,13 +90504,17 @@ const require$$3$A = _dll_prop_types;
90495
90504
  overflow: 'hidden',
90496
90505
  padding: '0 25px 0 8px',
90497
90506
  whiteSpace: 'nowrap',
90498
- textOverflow: 'ellipsis',
90499
- lineHeight: '35px'
90507
+ textOverflow: 'ellipsis'
90508
+ }
90509
+ }, _react["default"].createElement("span", {
90510
+ style: {
90511
+ display: 'inline-block',
90512
+ verticalAlign: 'middle'
90500
90513
  },
90501
90514
  dangerouslySetInnerHTML: {
90502
90515
  __html: html
90503
90516
  }
90504
- }), _react["default"].createElement(_icons.Chevron, {
90517
+ })), _react["default"].createElement(_icons.Chevron, {
90505
90518
  direction: "down",
90506
90519
  style: {
90507
90520
  position: 'absolute',
@@ -103894,6 +103907,7 @@ function UndoRedo(type) {
103894
103907
  toolbar: {
103895
103908
  type: type,
103896
103909
  icon: _react$1c["default"].createElement(IconToUse, null),
103910
+ ariaLabel: type === 'undo' ? 'Undo (revert the last action)' : 'Redo (reapply the last undone action)',
103897
103911
  onClick: function onClick(value, onChange) {
103898
103912
  var change = value.change();
103899
103913
  onChange(change[type]());
@@ -112760,7 +112774,8 @@ const require$$23 = _dll_classnames;
112760
112774
  (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "renderPlaceholder", function (props) {
112761
112775
  var editor = props.editor;
112762
112776
  var document = editor.value.document;
112763
- if (!editor.props.placeholder || document.text !== '' || document.nodes.size !== 1) {
112777
+ var stateValue = _this.state.value;
112778
+ if (!editor.props.placeholder || document.text !== '' || document.nodes.size !== 1 || !document.isEmpty || stateValue.isFocused) {
112764
112779
  return false;
112765
112780
  }
112766
112781
  return _react["default"].createElement("span", {
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": "3.1.3",
4
+ "version": "3.1.4-next.43+2137958ad",
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": "^4.1.3",
11
- "@pie-element/rubric": "^4.1.3",
10
+ "@pie-element/multi-trait-rubric": "^4.1.4-next.43+2137958ad",
11
+ "@pie-element/rubric": "^4.1.4-next.43+2137958ad",
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": "55af78558b81f2cd421eaac78eb3e652e3523697",
18
+ "gitHead": "2137958adc303c2f08bc53bf6537469158220c1f",
19
19
  "scripts": {
20
20
  "postpublish": "../../scripts/postpublish"
21
21
  },