@pie-lib/mask-markup 1.10.21-next.159 → 1.10.21-next.179
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/lib/choices/choice.js +20 -16
- package/lib/choices/choice.js.map +1 -1
- package/lib/choices/index.js +17 -15
- package/lib/choices/index.js.map +1 -1
- package/lib/components/blank.js +27 -21
- package/lib/components/blank.js.map +1 -1
- package/lib/components/correct-input.js +4 -2
- package/lib/components/correct-input.js.map +1 -1
- package/lib/components/dropdown.js +20 -16
- package/lib/components/dropdown.js.map +1 -1
- package/lib/components/input.js +1 -1
- package/lib/components/input.js.map +1 -1
- package/lib/constructed-response.js +1 -1
- package/lib/constructed-response.js.map +1 -1
- package/lib/drag-in-the-blank.js +19 -17
- package/lib/drag-in-the-blank.js.map +1 -1
- package/lib/index.js +12 -12
- package/lib/inline-dropdown.js +1 -1
- package/lib/inline-dropdown.js.map +1 -1
- package/lib/mask.js +27 -25
- package/lib/mask.js.map +1 -1
- package/lib/serialization.js +3 -3
- package/lib/serialization.js.map +1 -1
- package/lib/with-mask.js +19 -15
- package/lib/with-mask.js.map +1 -1
- package/package.json +4 -4
package/lib/with-mask.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
+
|
|
3
5
|
Object.defineProperty(exports, "__esModule", {
|
|
4
6
|
value: true
|
|
5
7
|
});
|
|
@@ -17,23 +19,25 @@ var _serialization = require("./serialization");
|
|
|
17
19
|
|
|
18
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
19
21
|
|
|
20
|
-
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
21
|
-
|
|
22
22
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
23
23
|
|
|
24
24
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
25
25
|
|
|
26
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
26
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
27
27
|
|
|
28
|
-
function
|
|
28
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
29
29
|
|
|
30
|
-
function
|
|
30
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
31
31
|
|
|
32
|
-
function
|
|
32
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
33
33
|
|
|
34
|
-
function
|
|
34
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
35
35
|
|
|
36
|
-
function
|
|
36
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
37
|
+
|
|
38
|
+
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; } }
|
|
39
|
+
|
|
40
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
37
41
|
|
|
38
42
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
39
43
|
|
|
@@ -48,17 +52,17 @@ var buildLayoutFromMarkup = function buildLayoutFromMarkup(markup, type) {
|
|
|
48
52
|
exports.buildLayoutFromMarkup = buildLayoutFromMarkup;
|
|
49
53
|
|
|
50
54
|
var withMask = function withMask(type, renderChildren) {
|
|
51
|
-
var _class
|
|
55
|
+
var _class;
|
|
52
56
|
|
|
53
|
-
return
|
|
54
|
-
/*#__PURE__*/
|
|
55
|
-
function (_React$Component) {
|
|
57
|
+
return _class = /*#__PURE__*/function (_React$Component) {
|
|
56
58
|
_inherits(WithMask, _React$Component);
|
|
57
59
|
|
|
60
|
+
var _super = _createSuper(WithMask);
|
|
61
|
+
|
|
58
62
|
function WithMask() {
|
|
59
63
|
_classCallCheck(this, WithMask);
|
|
60
64
|
|
|
61
|
-
return
|
|
65
|
+
return _super.apply(this, arguments);
|
|
62
66
|
}
|
|
63
67
|
|
|
64
68
|
_createClass(WithMask, [{
|
|
@@ -70,7 +74,7 @@ var withMask = function withMask(type, renderChildren) {
|
|
|
70
74
|
value = _this$props.value,
|
|
71
75
|
onChange = _this$props.onChange;
|
|
72
76
|
var maskLayout = layout ? layout : buildLayoutFromMarkup(markup, type);
|
|
73
|
-
return _react["default"].createElement(_mask["default"], {
|
|
77
|
+
return /*#__PURE__*/_react["default"].createElement(_mask["default"], {
|
|
74
78
|
layout: maskLayout,
|
|
75
79
|
value: value,
|
|
76
80
|
onChange: onChange,
|
|
@@ -92,7 +96,7 @@ var withMask = function withMask(type, renderChildren) {
|
|
|
92
96
|
layout: _propTypes["default"].object,
|
|
93
97
|
value: _propTypes["default"].object,
|
|
94
98
|
onChange: _propTypes["default"].func
|
|
95
|
-
}),
|
|
99
|
+
}), _class;
|
|
96
100
|
};
|
|
97
101
|
|
|
98
102
|
exports.withMask = withMask;
|
package/lib/with-mask.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/with-mask.jsx"],"names":["buildLayoutFromMarkup","markup","type","processed","value","document","withMask","renderChildren","props","layout","onChange","maskLayout","React","Component","PropTypes","string","object","func"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/with-mask.jsx"],"names":["buildLayoutFromMarkup","markup","type","processed","value","document","withMask","renderChildren","props","layout","onChange","maskLayout","React","Component","PropTypes","string","object","func"],"mappings":";;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;AAEO,IAAMA,qBAAqB,GAAG,SAAxBA,qBAAwB,CAACC,MAAD,EAASC,IAAT,EAAkB;AACrD,sBAA8B,+BAAaD,MAAb,EAAqBC,IAArB,CAA9B;AAAA,MAAgBC,SAAhB,iBAAQF,MAAR;;AACA,MAAMG,KAAK,GAAG,gCAAYD,SAAZ,CAAd;AACA,SAAOC,KAAK,CAACC,QAAb;AACD,CAJM;;;;AAMA,IAAMC,QAAQ,GAAG,SAAXA,QAAW,CAACJ,IAAD,EAAOK,cAAP,EAA0B;AAAA;;AAChD;AAAA;;AAAA;;AAAA;AAAA;;AAAA;AAAA;;AAAA;AAAA;AAAA,aAcE,kBAAS;AACP,0BAA4C,KAAKC,KAAjD;AAAA,YAAQP,MAAR,eAAQA,MAAR;AAAA,YAAgBQ,MAAhB,eAAgBA,MAAhB;AAAA,YAAwBL,KAAxB,eAAwBA,KAAxB;AAAA,YAA+BM,QAA/B,eAA+BA,QAA/B;AAEA,YAAMC,UAAU,GAAGF,MAAM,GAAGA,MAAH,GAAYT,qBAAqB,CAACC,MAAD,EAASC,IAAT,CAA1D;AACA,4BACE,gCAAC,gBAAD;AACE,UAAA,MAAM,EAAES,UADV;AAEE,UAAA,KAAK,EAAEP,KAFT;AAGE,UAAA,QAAQ,EAAEM,QAHZ;AAIE,UAAA,cAAc,EAAEH,cAAc,CAAC,KAAKC,KAAN;AAJhC,UADF;AAQD;AA1BH;;AAAA;AAAA,IAA8BI,kBAAMC,SAApC,wCACqB;AACjB;AACN;AACA;AACMZ,IAAAA,MAAM,EAAEa,sBAAUC,MAJD;;AAKjB;AACN;AACA;AACMN,IAAAA,MAAM,EAAEK,sBAAUE,MARD;AASjBZ,IAAAA,KAAK,EAAEU,sBAAUE,MATA;AAUjBN,IAAAA,QAAQ,EAAEI,sBAAUG;AAVH,GADrB;AA4BD,CA7BM","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport Mask from './mask';\nimport componentize from './componentize';\nimport { deserialize } from './serialization';\n\nexport const buildLayoutFromMarkup = (markup, type) => {\n const { markup: processed } = componentize(markup, type);\n const value = deserialize(processed);\n return value.document;\n};\n\nexport const withMask = (type, renderChildren) => {\n return class WithMask extends React.Component {\n static propTypes = {\n /**\n * At the start we'll probably work with markup\n */\n markup: PropTypes.string,\n /**\n * Once we start authoring, it may make sense for use to us layout, which will be a simple js object that maps to `slate.Value`.\n */\n layout: PropTypes.object,\n value: PropTypes.object,\n onChange: PropTypes.func\n };\n\n render() {\n const { markup, layout, value, onChange } = this.props;\n\n const maskLayout = layout ? layout : buildLayoutFromMarkup(markup, type);\n return (\n <Mask\n layout={maskLayout}\n value={value}\n onChange={onChange}\n renderChildren={renderChildren(this.props)}\n />\n );\n }\n };\n};\n"],"file":"with-mask.js"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-lib/mask-markup",
|
|
3
|
-
"version": "1.10.21-next.
|
|
3
|
+
"version": "1.10.21-next.179+42c4d7f5",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "src/index.js",
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@material-ui/core": "^3.9.3",
|
|
12
12
|
"@pie-lib/drag": "^1.1.52",
|
|
13
|
-
"@pie-lib/math-rendering": "^2.3.
|
|
14
|
-
"@pie-lib/render-ui": "^4.12.
|
|
13
|
+
"@pie-lib/math-rendering": "^2.3.10-next.179+42c4d7f5",
|
|
14
|
+
"@pie-lib/render-ui": "^4.12.1-next.179+42c4d7f5",
|
|
15
15
|
"classnames": "^2.2.6",
|
|
16
16
|
"debug": "^4.1.1",
|
|
17
17
|
"immutable": ">=3.8.1",
|
|
@@ -27,5 +27,5 @@
|
|
|
27
27
|
"keywords": [],
|
|
28
28
|
"author": "",
|
|
29
29
|
"license": "ISC",
|
|
30
|
-
"gitHead": "
|
|
30
|
+
"gitHead": "42c4d7f55f7ed4f54a5d66e1adbbe66c31054eea"
|
|
31
31
|
}
|