@pie-element/ebsr 7.0.24-next.2 → 7.0.26
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/CHANGELOG.md +48 -0
- package/{configure/node_modules/@pie-element/multiple-choice/LICENSE.md → LICENSE.md} +0 -0
- package/configure/CHANGELOG.md +48 -0
- package/configure/package.json +3 -3
- package/controller/CHANGELOG.md +8 -0
- package/controller/package.json +1 -1
- package/package.json +3 -3
- package/configure/node_modules/@pie-element/multiple-choice/CHANGELOG.json +0 -1972
- package/configure/node_modules/@pie-element/multiple-choice/CHANGELOG.md +0 -1793
- package/configure/node_modules/@pie-element/multiple-choice/PRINT.md +0 -35
- package/configure/node_modules/@pie-element/multiple-choice/README.md +0 -56
- package/configure/node_modules/@pie-element/multiple-choice/choice.png +0 -0
- package/configure/node_modules/@pie-element/multiple-choice/configure/CHANGELOG.json +0 -1387
- package/configure/node_modules/@pie-element/multiple-choice/configure/CHANGELOG.md +0 -1334
- package/configure/node_modules/@pie-element/multiple-choice/configure/lib/defaults.js +0 -104
- package/configure/node_modules/@pie-element/multiple-choice/configure/lib/defaults.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/configure/lib/index.js +0 -198
- package/configure/node_modules/@pie-element/multiple-choice/configure/lib/index.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/configure/lib/main.js +0 -599
- package/configure/node_modules/@pie-element/multiple-choice/configure/lib/main.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/configure/lib/utils.js +0 -18
- package/configure/node_modules/@pie-element/multiple-choice/configure/lib/utils.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/configure/package.json +0 -20
- package/configure/node_modules/@pie-element/multiple-choice/controller/CHANGELOG.json +0 -527
- package/configure/node_modules/@pie-element/multiple-choice/controller/CHANGELOG.md +0 -768
- package/configure/node_modules/@pie-element/multiple-choice/controller/lib/defaults.js +0 -18
- package/configure/node_modules/@pie-element/multiple-choice/controller/lib/defaults.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/controller/lib/index.js +0 -305
- package/configure/node_modules/@pie-element/multiple-choice/controller/lib/index.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/controller/lib/utils.js +0 -36
- package/configure/node_modules/@pie-element/multiple-choice/controller/lib/utils.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/controller/package.json +0 -15
- package/configure/node_modules/@pie-element/multiple-choice/docs/config-schema.json +0 -353
- package/configure/node_modules/@pie-element/multiple-choice/docs/config-schema.json.md +0 -277
- package/configure/node_modules/@pie-element/multiple-choice/docs/demo/config.js +0 -8
- package/configure/node_modules/@pie-element/multiple-choice/docs/demo/generate.js +0 -52
- package/configure/node_modules/@pie-element/multiple-choice/docs/demo/index.html +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/docs/demo/session.js +0 -7
- package/configure/node_modules/@pie-element/multiple-choice/docs/pie-schema.json +0 -338
- package/configure/node_modules/@pie-element/multiple-choice/docs/pie-schema.json.md +0 -274
- package/configure/node_modules/@pie-element/multiple-choice/lib/choice-input.js +0 -298
- package/configure/node_modules/@pie-element/multiple-choice/lib/choice-input.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/lib/choice.js +0 -157
- package/configure/node_modules/@pie-element/multiple-choice/lib/choice.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/lib/feedback-tick.js +0 -174
- package/configure/node_modules/@pie-element/multiple-choice/lib/feedback-tick.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/lib/index.js +0 -151
- package/configure/node_modules/@pie-element/multiple-choice/lib/index.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/lib/main.js +0 -97
- package/configure/node_modules/@pie-element/multiple-choice/lib/main.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/lib/multiple-choice.js +0 -254
- package/configure/node_modules/@pie-element/multiple-choice/lib/multiple-choice.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/lib/print.js +0 -129
- package/configure/node_modules/@pie-element/multiple-choice/lib/print.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/lib/session-updater.js +0 -35
- package/configure/node_modules/@pie-element/multiple-choice/lib/session-updater.js.map +0 -1
- package/configure/node_modules/@pie-element/multiple-choice/module/configure.js +0 -843
- package/configure/node_modules/@pie-element/multiple-choice/module/controller.js +0 -20686
- package/configure/node_modules/@pie-element/multiple-choice/module/demo.js +0 -77
- package/configure/node_modules/@pie-element/multiple-choice/module/element.js +0 -2019
- package/configure/node_modules/@pie-element/multiple-choice/module/index.html +0 -21
- package/configure/node_modules/@pie-element/multiple-choice/module/manifest.json +0 -14
- package/configure/node_modules/@pie-element/multiple-choice/module/print-demo.js +0 -115
- package/configure/node_modules/@pie-element/multiple-choice/module/print.html +0 -18
- package/configure/node_modules/@pie-element/multiple-choice/module/print.js +0 -1983
- package/configure/node_modules/@pie-element/multiple-choice/package.json +0 -34
- package/configure/node_modules/@pie-lib/math-rendering/CHANGELOG.json +0 -672
- package/configure/node_modules/@pie-lib/math-rendering/CHANGELOG.md +0 -427
- package/configure/node_modules/@pie-lib/math-rendering/LICENSE.md +0 -5
- package/configure/node_modules/@pie-lib/math-rendering/lib/index.js +0 -30
- package/configure/node_modules/@pie-lib/math-rendering/lib/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-rendering/lib/mstack/chtml.js +0 -316
- package/configure/node_modules/@pie-lib/math-rendering/lib/mstack/chtml.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-rendering/lib/mstack/index.js +0 -23
- package/configure/node_modules/@pie-lib/math-rendering/lib/mstack/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-rendering/lib/mstack/mml.js +0 -123
- package/configure/node_modules/@pie-lib/math-rendering/lib/mstack/mml.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-rendering/lib/normalization.js +0 -103
- package/configure/node_modules/@pie-lib/math-rendering/lib/normalization.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-rendering/lib/render-math.js +0 -275
- package/configure/node_modules/@pie-lib/math-rendering/lib/render-math.js.map +0 -1
- package/configure/node_modules/@pie-lib/math-rendering/package.json +0 -19
- package/configure/node_modules/@pie-lib/math-rendering/playground/demo.html +0 -872
- package/configure/node_modules/@pie-lib/math-rendering/playground/demo.js +0 -108
- package/configure/node_modules/@pie-lib/math-rendering/playground/main.html +0 -156
- package/configure/node_modules/@pie-lib/math-rendering/playground/main.js +0 -16
- package/configure/node_modules/@pie-lib/math-rendering/playground/webpack.config.js +0 -29
- package/configure/node_modules/@pie-lib/math-rendering/src/index.js +0 -4
- package/configure/node_modules/@pie-lib/math-rendering/src/mstack/chtml.js +0 -215
- package/configure/node_modules/@pie-lib/math-rendering/src/mstack/index.js +0 -13
- package/configure/node_modules/@pie-lib/math-rendering/src/mstack/mml.js +0 -24
- package/configure/node_modules/@pie-lib/math-rendering/src/normalization.js +0 -69
- package/configure/node_modules/@pie-lib/math-rendering/src/render-math.js +0 -234
- package/configure/node_modules/@pie-lib/render-ui/CHANGELOG.json +0 -937
- package/configure/node_modules/@pie-lib/render-ui/CHANGELOG.md +0 -602
- package/configure/node_modules/@pie-lib/render-ui/LICENSE.md +0 -5
- package/configure/node_modules/@pie-lib/render-ui/README.md +0 -33
- package/configure/node_modules/@pie-lib/render-ui/lib/collapsible/index.js +0 -146
- package/configure/node_modules/@pie-lib/render-ui/lib/collapsible/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/render-ui/lib/color.js +0 -134
- package/configure/node_modules/@pie-lib/render-ui/lib/color.js.map +0 -1
- package/configure/node_modules/@pie-lib/render-ui/lib/feedback.js +0 -160
- package/configure/node_modules/@pie-lib/render-ui/lib/feedback.js.map +0 -1
- package/configure/node_modules/@pie-lib/render-ui/lib/has-text.js +0 -24
- package/configure/node_modules/@pie-lib/render-ui/lib/has-text.js.map +0 -1
- package/configure/node_modules/@pie-lib/render-ui/lib/html-and-math.js +0 -102
- package/configure/node_modules/@pie-lib/render-ui/lib/html-and-math.js.map +0 -1
- package/configure/node_modules/@pie-lib/render-ui/lib/index.js +0 -104
- package/configure/node_modules/@pie-lib/render-ui/lib/index.js.map +0 -1
- package/configure/node_modules/@pie-lib/render-ui/lib/input-container.js +0 -60
- package/configure/node_modules/@pie-lib/render-ui/lib/input-container.js.map +0 -1
- package/configure/node_modules/@pie-lib/render-ui/lib/preview-layout.js +0 -133
- package/configure/node_modules/@pie-lib/render-ui/lib/preview-layout.js.map +0 -1
- package/configure/node_modules/@pie-lib/render-ui/lib/preview-prompt.js +0 -162
- package/configure/node_modules/@pie-lib/render-ui/lib/preview-prompt.js.map +0 -1
- package/configure/node_modules/@pie-lib/render-ui/lib/purpose.js +0 -28
- package/configure/node_modules/@pie-lib/render-ui/lib/purpose.js.map +0 -1
- package/configure/node_modules/@pie-lib/render-ui/lib/readable.js +0 -28
- package/configure/node_modules/@pie-lib/render-ui/lib/readable.js.map +0 -1
- package/configure/node_modules/@pie-lib/render-ui/lib/response-indicators.js +0 -160
- package/configure/node_modules/@pie-lib/render-ui/lib/response-indicators.js.map +0 -1
- package/configure/node_modules/@pie-lib/render-ui/lib/withUndoReset.js +0 -206
- package/configure/node_modules/@pie-lib/render-ui/lib/withUndoReset.js.map +0 -1
- package/configure/node_modules/@pie-lib/render-ui/package.json +0 -30
- package/configure/node_modules/@pie-lib/render-ui/src/collapsible/index.jsx +0 -68
- package/configure/node_modules/@pie-lib/render-ui/src/color.js +0 -48
- package/configure/node_modules/@pie-lib/render-ui/src/feedback.jsx +0 -100
- package/configure/node_modules/@pie-lib/render-ui/src/has-text.js +0 -14
- package/configure/node_modules/@pie-lib/render-ui/src/html-and-math.js +0 -40
- package/configure/node_modules/@pie-lib/render-ui/src/index.js +0 -27
- package/configure/node_modules/@pie-lib/render-ui/src/input-container.jsx +0 -41
- package/configure/node_modules/@pie-lib/render-ui/src/preview-layout.jsx +0 -77
- package/configure/node_modules/@pie-lib/render-ui/src/preview-prompt.jsx +0 -90
- package/configure/node_modules/@pie-lib/render-ui/src/purpose.jsx +0 -19
- package/configure/node_modules/@pie-lib/render-ui/src/readable.jsx +0 -19
- package/configure/node_modules/@pie-lib/render-ui/src/response-indicators.jsx +0 -89
- package/configure/node_modules/@pie-lib/render-ui/src/withUndoReset.jsx +0 -118
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
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
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
Object.defineProperty(exports, "Collapsible", {
|
|
9
|
-
enumerable: true,
|
|
10
|
-
get: function get() {
|
|
11
|
-
return _collapsible["default"];
|
|
12
|
-
}
|
|
13
|
-
});
|
|
14
|
-
Object.defineProperty(exports, "Feedback", {
|
|
15
|
-
enumerable: true,
|
|
16
|
-
get: function get() {
|
|
17
|
-
return _feedback["default"];
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
Object.defineProperty(exports, "HtmlAndMath", {
|
|
21
|
-
enumerable: true,
|
|
22
|
-
get: function get() {
|
|
23
|
-
return _htmlAndMath["default"];
|
|
24
|
-
}
|
|
25
|
-
});
|
|
26
|
-
Object.defineProperty(exports, "InputContainer", {
|
|
27
|
-
enumerable: true,
|
|
28
|
-
get: function get() {
|
|
29
|
-
return _inputContainer["default"];
|
|
30
|
-
}
|
|
31
|
-
});
|
|
32
|
-
Object.defineProperty(exports, "PreviewLayout", {
|
|
33
|
-
enumerable: true,
|
|
34
|
-
get: function get() {
|
|
35
|
-
return _previewLayout["default"];
|
|
36
|
-
}
|
|
37
|
-
});
|
|
38
|
-
Object.defineProperty(exports, "PreviewPrompt", {
|
|
39
|
-
enumerable: true,
|
|
40
|
-
get: function get() {
|
|
41
|
-
return _previewPrompt["default"];
|
|
42
|
-
}
|
|
43
|
-
});
|
|
44
|
-
Object.defineProperty(exports, "Purpose", {
|
|
45
|
-
enumerable: true,
|
|
46
|
-
get: function get() {
|
|
47
|
-
return _purpose["default"];
|
|
48
|
-
}
|
|
49
|
-
});
|
|
50
|
-
Object.defineProperty(exports, "Readable", {
|
|
51
|
-
enumerable: true,
|
|
52
|
-
get: function get() {
|
|
53
|
-
return _readable["default"];
|
|
54
|
-
}
|
|
55
|
-
});
|
|
56
|
-
exports.color = void 0;
|
|
57
|
-
Object.defineProperty(exports, "hasText", {
|
|
58
|
-
enumerable: true,
|
|
59
|
-
get: function get() {
|
|
60
|
-
return _hasText.hasText;
|
|
61
|
-
}
|
|
62
|
-
});
|
|
63
|
-
exports.indicators = void 0;
|
|
64
|
-
Object.defineProperty(exports, "withUndoReset", {
|
|
65
|
-
enumerable: true,
|
|
66
|
-
get: function get() {
|
|
67
|
-
return _withUndoReset["default"];
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
|
|
71
|
-
var indicators = _interopRequireWildcard(require("./response-indicators"));
|
|
72
|
-
|
|
73
|
-
exports.indicators = indicators;
|
|
74
|
-
|
|
75
|
-
var _feedback = _interopRequireDefault(require("./feedback"));
|
|
76
|
-
|
|
77
|
-
var _collapsible = _interopRequireDefault(require("./collapsible"));
|
|
78
|
-
|
|
79
|
-
var _withUndoReset = _interopRequireDefault(require("./withUndoReset"));
|
|
80
|
-
|
|
81
|
-
var _previewLayout = _interopRequireDefault(require("./preview-layout"));
|
|
82
|
-
|
|
83
|
-
var _htmlAndMath = _interopRequireDefault(require("./html-and-math"));
|
|
84
|
-
|
|
85
|
-
var _inputContainer = _interopRequireDefault(require("./input-container"));
|
|
86
|
-
|
|
87
|
-
var _previewPrompt = _interopRequireDefault(require("./preview-prompt"));
|
|
88
|
-
|
|
89
|
-
var _readable = _interopRequireDefault(require("./readable"));
|
|
90
|
-
|
|
91
|
-
var _purpose = _interopRequireDefault(require("./purpose"));
|
|
92
|
-
|
|
93
|
-
var color = _interopRequireWildcard(require("./color"));
|
|
94
|
-
|
|
95
|
-
exports.color = color;
|
|
96
|
-
|
|
97
|
-
var _hasText = require("./has-text");
|
|
98
|
-
|
|
99
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
100
|
-
|
|
101
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
102
|
-
|
|
103
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
104
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AACA","sourcesContent":["import * as indicators from './response-indicators';\nimport Feedback from './feedback';\nimport Collapsible from './collapsible';\nimport withUndoReset from './withUndoReset';\nimport PreviewLayout from './preview-layout';\nimport HtmlAndMath from './html-and-math';\nimport InputContainer from './input-container';\nimport PreviewPrompt from './preview-prompt';\nimport Readable from './readable';\nimport Purpose from './purpose';\nimport * as color from './color';\nimport { hasText } from './has-text';\n\nexport {\n HtmlAndMath,\n indicators,\n withUndoReset,\n Feedback,\n PreviewLayout,\n Collapsible,\n InputContainer,\n PreviewPrompt,\n color,\n Readable,\n Purpose,\n hasText\n};\n"],"file":"index.js"}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = void 0;
|
|
7
|
-
|
|
8
|
-
var _InputLabel = _interopRequireDefault(require("@material-ui/core/InputLabel"));
|
|
9
|
-
|
|
10
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
-
|
|
12
|
-
var _react = _interopRequireDefault(require("react"));
|
|
13
|
-
|
|
14
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
15
|
-
|
|
16
|
-
var _styles = require("@material-ui/core/styles");
|
|
17
|
-
|
|
18
|
-
var _FormControl = _interopRequireDefault(require("@material-ui/core/FormControl"));
|
|
19
|
-
|
|
20
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
21
|
-
|
|
22
|
-
var RawInputContainer = function RawInputContainer(props) {
|
|
23
|
-
var label = props.label,
|
|
24
|
-
className = props.className,
|
|
25
|
-
children = props.children,
|
|
26
|
-
classes = props.classes;
|
|
27
|
-
var names = (0, _classnames["default"])(classes.formControl, className);
|
|
28
|
-
return /*#__PURE__*/_react["default"].createElement(_FormControl["default"], {
|
|
29
|
-
className: names
|
|
30
|
-
}, /*#__PURE__*/_react["default"].createElement(_InputLabel["default"], {
|
|
31
|
-
className: classes.label,
|
|
32
|
-
shrink: true
|
|
33
|
-
}, label), children);
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
RawInputContainer.propTypes = {
|
|
37
|
-
label: _propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].object]).isRequired,
|
|
38
|
-
className: _propTypes["default"].string,
|
|
39
|
-
children: _propTypes["default"].oneOfType([_propTypes["default"].arrayOf(_propTypes["default"].node), _propTypes["default"].node]).isRequired,
|
|
40
|
-
classes: _propTypes["default"].object.isRequired
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
var _default = (0, _styles.withStyles)(function (theme) {
|
|
44
|
-
return {
|
|
45
|
-
formControl: {
|
|
46
|
-
marginLeft: 0,
|
|
47
|
-
marginRight: theme.spacing.unit,
|
|
48
|
-
paddingBottom: theme.spacing.unit,
|
|
49
|
-
flex: '1 0 auto',
|
|
50
|
-
minWidth: theme.spacing.unit * 4
|
|
51
|
-
},
|
|
52
|
-
label: {
|
|
53
|
-
fontSize: 'inherit',
|
|
54
|
-
whiteSpace: 'nowrap'
|
|
55
|
-
}
|
|
56
|
-
};
|
|
57
|
-
})(RawInputContainer);
|
|
58
|
-
|
|
59
|
-
exports["default"] = _default;
|
|
60
|
-
//# sourceMappingURL=input-container.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/input-container.jsx"],"names":["RawInputContainer","props","label","className","children","classes","names","formControl","propTypes","PropTypes","oneOfType","string","object","isRequired","arrayOf","node","theme","marginLeft","marginRight","spacing","unit","paddingBottom","flex","minWidth","fontSize","whiteSpace"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,IAAMA,iBAAiB,GAAG,SAApBA,iBAAoB,CAAAC,KAAK,EAAI;AACjC,MAAQC,KAAR,GAAgDD,KAAhD,CAAQC,KAAR;AAAA,MAAeC,SAAf,GAAgDF,KAAhD,CAAeE,SAAf;AAAA,MAA0BC,QAA1B,GAAgDH,KAAhD,CAA0BG,QAA1B;AAAA,MAAoCC,OAApC,GAAgDJ,KAAhD,CAAoCI,OAApC;AACA,MAAMC,KAAK,GAAG,4BAAWD,OAAO,CAACE,WAAnB,EAAgCJ,SAAhC,CAAd;AAEA,sBACE,gCAAC,uBAAD;AAAa,IAAA,SAAS,EAAEG;AAAxB,kBACE,gCAAC,sBAAD;AAAY,IAAA,SAAS,EAAED,OAAO,CAACH,KAA/B;AAAsC,IAAA,MAAM,EAAE;AAA9C,KACGA,KADH,CADF,EAIGE,QAJH,CADF;AAQD,CAZD;;AAcAJ,iBAAiB,CAACQ,SAAlB,GAA8B;AAC5BN,EAAAA,KAAK,EAAEO,sBAAUC,SAAV,CAAoB,CAACD,sBAAUE,MAAX,EAAmBF,sBAAUG,MAA7B,CAApB,EAA0DC,UADrC;AAE5BV,EAAAA,SAAS,EAAEM,sBAAUE,MAFO;AAG5BP,EAAAA,QAAQ,EAAEK,sBAAUC,SAAV,CAAoB,CAACD,sBAAUK,OAAV,CAAkBL,sBAAUM,IAA5B,CAAD,EAAoCN,sBAAUM,IAA9C,CAApB,EAAyEF,UAHvD;AAI5BR,EAAAA,OAAO,EAAEI,sBAAUG,MAAV,CAAiBC;AAJE,CAA9B;;eAOe,wBAAW,UAAAG,KAAK;AAAA,SAAK;AAClCT,IAAAA,WAAW,EAAE;AACXU,MAAAA,UAAU,EAAE,CADD;AAEXC,MAAAA,WAAW,EAAEF,KAAK,CAACG,OAAN,CAAcC,IAFhB;AAGXC,MAAAA,aAAa,EAAEL,KAAK,CAACG,OAAN,CAAcC,IAHlB;AAIXE,MAAAA,IAAI,EAAE,UAJK;AAKXC,MAAAA,QAAQ,EAAEP,KAAK,CAACG,OAAN,CAAcC,IAAd,GAAqB;AALpB,KADqB;AAQlClB,IAAAA,KAAK,EAAE;AACLsB,MAAAA,QAAQ,EAAE,SADL;AAELC,MAAAA,UAAU,EAAE;AAFP;AAR2B,GAAL;AAAA,CAAhB,EAYXzB,iBAZW,C","sourcesContent":["import InputLabel from '@material-ui/core/InputLabel';\nimport PropTypes from 'prop-types';\nimport React from 'react';\nimport classNames from 'classnames';\nimport { withStyles } from '@material-ui/core/styles';\nimport FormControl from '@material-ui/core/FormControl';\n\nconst RawInputContainer = props => {\n const { label, className, children, classes } = props;\n const names = classNames(classes.formControl, className);\n\n return (\n <FormControl className={names}>\n <InputLabel className={classes.label} shrink={true}>\n {label}\n </InputLabel>\n {children}\n </FormControl>\n );\n};\n\nRawInputContainer.propTypes = {\n label: PropTypes.oneOfType([PropTypes.string, PropTypes.object]).isRequired,\n className: PropTypes.string,\n children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]).isRequired,\n classes: PropTypes.object.isRequired\n};\n\nexport default withStyles(theme => ({\n formControl: {\n marginLeft: 0,\n marginRight: theme.spacing.unit,\n paddingBottom: theme.spacing.unit,\n flex: '1 0 auto',\n minWidth: theme.spacing.unit * 4\n },\n label: {\n fontSize: 'inherit',\n whiteSpace: 'nowrap'\n }\n}))(RawInputContainer);\n"],"file":"input-container.js"}
|
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
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
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports["default"] = void 0;
|
|
9
|
-
|
|
10
|
-
var _react = _interopRequireDefault(require("react"));
|
|
11
|
-
|
|
12
|
-
var _styles = require("@material-ui/core/styles");
|
|
13
|
-
|
|
14
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
15
|
-
|
|
16
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
17
|
-
|
|
18
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
19
|
-
|
|
20
|
-
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); } }
|
|
21
|
-
|
|
22
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
23
|
-
|
|
24
|
-
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); }
|
|
25
|
-
|
|
26
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
27
|
-
|
|
28
|
-
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); }; }
|
|
29
|
-
|
|
30
|
-
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); }
|
|
31
|
-
|
|
32
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
33
|
-
|
|
34
|
-
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; } }
|
|
35
|
-
|
|
36
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
37
|
-
|
|
38
|
-
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
|
-
|
|
40
|
-
var PreviewLayout = /*#__PURE__*/function (_React$Component) {
|
|
41
|
-
_inherits(PreviewLayout, _React$Component);
|
|
42
|
-
|
|
43
|
-
var _super = _createSuper(PreviewLayout);
|
|
44
|
-
|
|
45
|
-
function PreviewLayout() {
|
|
46
|
-
_classCallCheck(this, PreviewLayout);
|
|
47
|
-
|
|
48
|
-
return _super.apply(this, arguments);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
_createClass(PreviewLayout, [{
|
|
52
|
-
key: "render",
|
|
53
|
-
value: function render() {
|
|
54
|
-
var _this$props = this.props,
|
|
55
|
-
children = _this$props.children,
|
|
56
|
-
classes = _this$props.classes;
|
|
57
|
-
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
58
|
-
className: classes.container
|
|
59
|
-
}, children);
|
|
60
|
-
}
|
|
61
|
-
}]);
|
|
62
|
-
|
|
63
|
-
return PreviewLayout;
|
|
64
|
-
}(_react["default"].Component);
|
|
65
|
-
|
|
66
|
-
_defineProperty(PreviewLayout, "propTypes", {
|
|
67
|
-
children: _propTypes["default"].oneOfType([_propTypes["default"].arrayOf(_propTypes["default"].node), _propTypes["default"].node]).isRequired,
|
|
68
|
-
classes: _propTypes["default"].object
|
|
69
|
-
});
|
|
70
|
-
|
|
71
|
-
var styles = function styles() {
|
|
72
|
-
return {
|
|
73
|
-
container: {
|
|
74
|
-
display: 'flex',
|
|
75
|
-
flexDirection: 'column',
|
|
76
|
-
position: 'relative'
|
|
77
|
-
}
|
|
78
|
-
};
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
var theme = (0, _styles.createMuiTheme)({
|
|
82
|
-
typography: {
|
|
83
|
-
useNextVariants: true
|
|
84
|
-
},
|
|
85
|
-
palette: {
|
|
86
|
-
action: {
|
|
87
|
-
disabled: 'rgba(0, 0, 0, 0.54);'
|
|
88
|
-
}
|
|
89
|
-
},
|
|
90
|
-
overrides: {
|
|
91
|
-
MuiRadio: {
|
|
92
|
-
root: {
|
|
93
|
-
'&$checked': {
|
|
94
|
-
color: '#3f51b5 !important'
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
},
|
|
98
|
-
MuiCheckbox: {
|
|
99
|
-
root: {
|
|
100
|
-
'&$checked': {
|
|
101
|
-
color: '#3f51b5 !important'
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
},
|
|
105
|
-
MuiTabs: {
|
|
106
|
-
root: {
|
|
107
|
-
borderBottom: '1px solid #eee'
|
|
108
|
-
}
|
|
109
|
-
},
|
|
110
|
-
MuiSwitch: {
|
|
111
|
-
root: {
|
|
112
|
-
'&$checked': {
|
|
113
|
-
color: '#3f51b5 !important',
|
|
114
|
-
'& + $bar': {
|
|
115
|
-
backgroundColor: '#3f51b5 !important',
|
|
116
|
-
opacity: 0.5
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
});
|
|
123
|
-
var Styled = (0, _styles.withStyles)(styles)(PreviewLayout);
|
|
124
|
-
|
|
125
|
-
var RootElem = function RootElem(props) {
|
|
126
|
-
return /*#__PURE__*/_react["default"].createElement(_styles.MuiThemeProvider, {
|
|
127
|
-
theme: theme
|
|
128
|
-
}, /*#__PURE__*/_react["default"].createElement(Styled, props));
|
|
129
|
-
};
|
|
130
|
-
|
|
131
|
-
var _default = RootElem;
|
|
132
|
-
exports["default"] = _default;
|
|
133
|
-
//# sourceMappingURL=preview-layout.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/preview-layout.jsx"],"names":["PreviewLayout","props","children","classes","container","React","Component","PropTypes","oneOfType","arrayOf","node","isRequired","object","styles","display","flexDirection","position","theme","typography","useNextVariants","palette","action","disabled","overrides","MuiRadio","root","color","MuiCheckbox","MuiTabs","borderBottom","MuiSwitch","backgroundColor","opacity","Styled","RootElem"],"mappings":";;;;;;;;;AAAA;;AACA;;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;IAEMA,a;;;;;;;;;;;;;WAMJ,kBAAS;AACP,wBAA8B,KAAKC,KAAnC;AAAA,UAAQC,QAAR,eAAQA,QAAR;AAAA,UAAkBC,OAAlB,eAAkBA,OAAlB;AAEA,0BAAO;AAAK,QAAA,SAAS,EAAEA,OAAO,CAACC;AAAxB,SAAoCF,QAApC,CAAP;AACD;;;;EAVyBG,kBAAMC,S;;gBAA5BN,a,eACe;AACjBE,EAAAA,QAAQ,EAAEK,sBAAUC,SAAV,CAAoB,CAACD,sBAAUE,OAAV,CAAkBF,sBAAUG,IAA5B,CAAD,EAAoCH,sBAAUG,IAA9C,CAApB,EAAyEC,UADlE;AAEjBR,EAAAA,OAAO,EAAEI,sBAAUK;AAFF,C;;AAYrB,IAAMC,MAAM,GAAG,SAATA,MAAS;AAAA,SAAO;AACpBT,IAAAA,SAAS,EAAE;AACTU,MAAAA,OAAO,EAAE,MADA;AAETC,MAAAA,aAAa,EAAE,QAFN;AAGTC,MAAAA,QAAQ,EAAE;AAHD;AADS,GAAP;AAAA,CAAf;;AAQA,IAAMC,KAAK,GAAG,4BAAe;AAC3BC,EAAAA,UAAU,EAAE;AACVC,IAAAA,eAAe,EAAE;AADP,GADe;AAI3BC,EAAAA,OAAO,EAAE;AACPC,IAAAA,MAAM,EAAE;AACNC,MAAAA,QAAQ,EAAE;AADJ;AADD,GAJkB;AAS3BC,EAAAA,SAAS,EAAE;AACTC,IAAAA,QAAQ,EAAE;AACRC,MAAAA,IAAI,EAAE;AACJ,qBAAa;AACXC,UAAAA,KAAK,EAAE;AADI;AADT;AADE,KADD;AAQTC,IAAAA,WAAW,EAAE;AACXF,MAAAA,IAAI,EAAE;AACJ,qBAAa;AACXC,UAAAA,KAAK,EAAE;AADI;AADT;AADK,KARJ;AAeTE,IAAAA,OAAO,EAAE;AACPH,MAAAA,IAAI,EAAE;AACJI,QAAAA,YAAY,EAAE;AADV;AADC,KAfA;AAoBTC,IAAAA,SAAS,EAAE;AACTL,MAAAA,IAAI,EAAE;AACJ,qBAAa;AACXC,UAAAA,KAAK,EAAE,oBADI;AAEX,sBAAY;AACVK,YAAAA,eAAe,EAAE,oBADP;AAEVC,YAAAA,OAAO,EAAE;AAFC;AAFD;AADT;AADG;AApBF;AATgB,CAAf,CAAd;AA2CA,IAAMC,MAAM,GAAG,wBAAWpB,MAAX,EAAmBb,aAAnB,CAAf;;AAEA,IAAMkC,QAAQ,GAAG,SAAXA,QAAW,CAAAjC,KAAK;AAAA,sBACpB,gCAAC,wBAAD;AAAkB,IAAA,KAAK,EAAEgB;AAAzB,kBACE,gCAAC,MAAD,EAAYhB,KAAZ,CADF,CADoB;AAAA,CAAtB;;eAMeiC,Q","sourcesContent":["import React from 'react';\nimport { withStyles, createMuiTheme, MuiThemeProvider } from '@material-ui/core/styles';\nimport PropTypes from 'prop-types';\n\nclass PreviewLayout extends React.Component {\n static propTypes = {\n children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]).isRequired,\n classes: PropTypes.object\n };\n\n render() {\n const { children, classes } = this.props;\n\n return <div className={classes.container}>{children}</div>;\n }\n}\n\nconst styles = () => ({\n container: {\n display: 'flex',\n flexDirection: 'column',\n position: 'relative'\n }\n});\n\nconst theme = createMuiTheme({\n typography: {\n useNextVariants: true\n },\n palette: {\n action: {\n disabled: 'rgba(0, 0, 0, 0.54);'\n }\n },\n overrides: {\n MuiRadio: {\n root: {\n '&$checked': {\n color: '#3f51b5 !important'\n }\n }\n },\n MuiCheckbox: {\n root: {\n '&$checked': {\n color: '#3f51b5 !important'\n }\n }\n },\n MuiTabs: {\n root: {\n borderBottom: '1px solid #eee'\n }\n },\n MuiSwitch: {\n root: {\n '&$checked': {\n color: '#3f51b5 !important',\n '& + $bar': {\n backgroundColor: '#3f51b5 !important',\n opacity: 0.5\n }\n }\n }\n }\n }\n});\n\nconst Styled = withStyles(styles)(PreviewLayout);\n\nconst RootElem = props => (\n <MuiThemeProvider theme={theme}>\n <Styled {...props} />\n </MuiThemeProvider>\n);\n\nexport default RootElem;\n"],"file":"preview-layout.js"}
|
|
@@ -1,162 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
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
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports["default"] = exports.PreviewPrompt = void 0;
|
|
9
|
-
|
|
10
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
-
|
|
12
|
-
var _styles = require("@material-ui/core/styles");
|
|
13
|
-
|
|
14
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
15
|
-
|
|
16
|
-
var color = _interopRequireWildcard(require("./color"));
|
|
17
|
-
|
|
18
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
19
|
-
|
|
20
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
21
|
-
|
|
22
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
23
|
-
|
|
24
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
25
|
-
|
|
26
|
-
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); } }
|
|
27
|
-
|
|
28
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
29
|
-
|
|
30
|
-
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); }
|
|
31
|
-
|
|
32
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
33
|
-
|
|
34
|
-
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); }; }
|
|
35
|
-
|
|
36
|
-
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); }
|
|
37
|
-
|
|
38
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
39
|
-
|
|
40
|
-
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; } }
|
|
41
|
-
|
|
42
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
43
|
-
|
|
44
|
-
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; }
|
|
45
|
-
|
|
46
|
-
//Used these below to replace \\embed{newLine} with \\newline from prompt which will get parsed in MathJax
|
|
47
|
-
var NEWLINE_BLOCK_REGEX = /\\embed\{newLine\}\[\]/g;
|
|
48
|
-
var NEWLINE_LATEX = '\\newline ';
|
|
49
|
-
|
|
50
|
-
var PreviewPrompt = /*#__PURE__*/function (_Component) {
|
|
51
|
-
_inherits(PreviewPrompt, _Component);
|
|
52
|
-
|
|
53
|
-
var _super = _createSuper(PreviewPrompt);
|
|
54
|
-
|
|
55
|
-
function PreviewPrompt() {
|
|
56
|
-
var _this;
|
|
57
|
-
|
|
58
|
-
_classCallCheck(this, PreviewPrompt);
|
|
59
|
-
|
|
60
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
61
|
-
args[_key] = arguments[_key];
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
_this = _super.call.apply(_super, [this].concat(args));
|
|
65
|
-
|
|
66
|
-
_defineProperty(_assertThisInitialized(_this), "parsedText", function (text) {
|
|
67
|
-
// fix imported audio content for Safari PD-1419
|
|
68
|
-
var div = document.createElement('div');
|
|
69
|
-
div.innerHTML = text;
|
|
70
|
-
var audio = div.querySelector('audio');
|
|
71
|
-
|
|
72
|
-
if (audio) {
|
|
73
|
-
var source = document.createElement('source');
|
|
74
|
-
source.setAttribute('type', 'audio/mp3');
|
|
75
|
-
source.setAttribute('src', audio.getAttribute('src'));
|
|
76
|
-
audio.removeAttribute('src');
|
|
77
|
-
audio.appendChild(source);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
return div.innerHTML;
|
|
81
|
-
});
|
|
82
|
-
|
|
83
|
-
return _this;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
_createClass(PreviewPrompt, [{
|
|
87
|
-
key: "render",
|
|
88
|
-
value: function render() {
|
|
89
|
-
var _this$props = this.props,
|
|
90
|
-
prompt = _this$props.prompt,
|
|
91
|
-
classes = _this$props.classes,
|
|
92
|
-
tagName = _this$props.tagName,
|
|
93
|
-
className = _this$props.className,
|
|
94
|
-
onClick = _this$props.onClick,
|
|
95
|
-
defaultClassName = _this$props.defaultClassName;
|
|
96
|
-
var CustomTag = tagName || 'div';
|
|
97
|
-
var customClasses = "".concat(classes.promptTable, " ").concat(classes[className] || '', " ").concat(defaultClassName || '');
|
|
98
|
-
return /*#__PURE__*/_react["default"].createElement(CustomTag, {
|
|
99
|
-
onClick: onClick,
|
|
100
|
-
className: customClasses,
|
|
101
|
-
dangerouslySetInnerHTML: {
|
|
102
|
-
__html: this.parsedText(prompt || '').replace(NEWLINE_BLOCK_REGEX, NEWLINE_LATEX)
|
|
103
|
-
}
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
|
-
}]);
|
|
107
|
-
|
|
108
|
-
return PreviewPrompt;
|
|
109
|
-
}(_react.Component);
|
|
110
|
-
|
|
111
|
-
exports.PreviewPrompt = PreviewPrompt;
|
|
112
|
-
|
|
113
|
-
_defineProperty(PreviewPrompt, "propTypes", {
|
|
114
|
-
classes: _propTypes["default"].object,
|
|
115
|
-
prompt: _propTypes["default"].string,
|
|
116
|
-
tagName: _propTypes["default"].string,
|
|
117
|
-
className: _propTypes["default"].string,
|
|
118
|
-
onClick: _propTypes["default"].func,
|
|
119
|
-
defaultClassName: _propTypes["default"].string
|
|
120
|
-
});
|
|
121
|
-
|
|
122
|
-
_defineProperty(PreviewPrompt, "defaultProps", {
|
|
123
|
-
onClick: function onClick() {}
|
|
124
|
-
});
|
|
125
|
-
|
|
126
|
-
var styles = function styles(theme) {
|
|
127
|
-
return {
|
|
128
|
-
prompt: {
|
|
129
|
-
verticalAlign: 'middle',
|
|
130
|
-
color: color.text()
|
|
131
|
-
},
|
|
132
|
-
rationale: {
|
|
133
|
-
paddingLeft: theme.spacing.unit * 16
|
|
134
|
-
},
|
|
135
|
-
label: {
|
|
136
|
-
color: "".concat(color.text(), " !important"),
|
|
137
|
-
//'var(--choice-input-color, black)',
|
|
138
|
-
display: 'inline-block',
|
|
139
|
-
verticalAlign: 'middle',
|
|
140
|
-
cursor: 'pointer'
|
|
141
|
-
},
|
|
142
|
-
promptTable: {
|
|
143
|
-
'&:not(.MathJax) > table': {
|
|
144
|
-
borderCollapse: 'collapse'
|
|
145
|
-
},
|
|
146
|
-
'&:not(.MathJax) > table tr': {
|
|
147
|
-
'&:nth-child(2n)': {
|
|
148
|
-
backgroundColor: '#f6f8fa'
|
|
149
|
-
}
|
|
150
|
-
},
|
|
151
|
-
'&:not(.MathJax) > table td, &:not(.MathJax) > table th': {
|
|
152
|
-
padding: '.6em 1em',
|
|
153
|
-
textAlign: 'center'
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
};
|
|
157
|
-
};
|
|
158
|
-
|
|
159
|
-
var _default = (0, _styles.withStyles)(styles)(PreviewPrompt);
|
|
160
|
-
|
|
161
|
-
exports["default"] = _default;
|
|
162
|
-
//# sourceMappingURL=preview-prompt.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/preview-prompt.jsx"],"names":["NEWLINE_BLOCK_REGEX","NEWLINE_LATEX","PreviewPrompt","text","div","document","createElement","innerHTML","audio","querySelector","source","setAttribute","getAttribute","removeAttribute","appendChild","props","prompt","classes","tagName","className","onClick","defaultClassName","CustomTag","customClasses","promptTable","__html","parsedText","replace","Component","PropTypes","object","string","func","styles","theme","verticalAlign","color","rationale","paddingLeft","spacing","unit","label","display","cursor","borderCollapse","backgroundColor","padding","textAlign"],"mappings":"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","sourcesContent":["import React, { Component } from 'react';\nimport { withStyles } from '@material-ui/core/styles';\nimport PropTypes from 'prop-types';\nimport * as color from './color';\n\n//Used these below to replace \\\\embed{newLine} with \\\\newline from prompt which will get parsed in MathJax\nconst NEWLINE_BLOCK_REGEX = /\\\\embed\\{newLine\\}\\[\\]/g;\nconst NEWLINE_LATEX = '\\\\newline ';\n\nexport class PreviewPrompt extends Component {\n static propTypes = {\n classes: PropTypes.object,\n prompt: PropTypes.string,\n tagName: PropTypes.string,\n className: PropTypes.string,\n onClick: PropTypes.func,\n defaultClassName: PropTypes.string\n };\n\n static defaultProps = {\n onClick: () => {}\n };\n\n parsedText = text => {\n // fix imported audio content for Safari PD-1419\n const div = document.createElement('div');\n div.innerHTML = text;\n\n const audio = div.querySelector('audio');\n if (audio) {\n const source = document.createElement('source');\n\n source.setAttribute('type', 'audio/mp3');\n source.setAttribute('src', audio.getAttribute('src'));\n\n audio.removeAttribute('src');\n audio.appendChild(source);\n }\n\n return div.innerHTML;\n };\n\n render() {\n const { prompt, classes, tagName, className, onClick, defaultClassName } = this.props;\n const CustomTag = tagName || 'div';\n const customClasses = `${classes.promptTable} ${classes[className] || ''} ${defaultClassName ||\n ''}`;\n\n return (\n <CustomTag\n onClick={onClick}\n className={customClasses}\n dangerouslySetInnerHTML={{\n __html: this.parsedText(prompt || '').replace(NEWLINE_BLOCK_REGEX, NEWLINE_LATEX)\n }}\n />\n );\n }\n}\n\nconst styles = theme => ({\n prompt: {\n verticalAlign: 'middle',\n color: color.text()\n },\n rationale: {\n paddingLeft: theme.spacing.unit * 16\n },\n label: {\n color: `${color.text()} !important`, //'var(--choice-input-color, black)',\n display: 'inline-block',\n verticalAlign: 'middle',\n cursor: 'pointer'\n },\n promptTable: {\n '&:not(.MathJax) > table': {\n borderCollapse: 'collapse'\n },\n '&:not(.MathJax) > table tr': {\n '&:nth-child(2n)': {\n backgroundColor: '#f6f8fa'\n }\n },\n '&:not(.MathJax) > table td, &:not(.MathJax) > table th': {\n padding: '.6em 1em',\n textAlign: 'center'\n }\n }\n});\nexport default withStyles(styles)(PreviewPrompt);\n"],"file":"preview-prompt.js"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = void 0;
|
|
7
|
-
|
|
8
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
-
|
|
10
|
-
var _react = _interopRequireDefault(require("react"));
|
|
11
|
-
|
|
12
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
|
-
|
|
14
|
-
var Purpose = function Purpose(props) {
|
|
15
|
-
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, _react["default"].Children.map(props.children, function (child) {
|
|
16
|
-
return /*#__PURE__*/_react["default"].cloneElement(child, {
|
|
17
|
-
'data-pie-purpose': props.purpose
|
|
18
|
-
});
|
|
19
|
-
}));
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
Purpose.propTypes = {
|
|
23
|
-
children: _propTypes["default"].node,
|
|
24
|
-
purpose: _propTypes["default"].string
|
|
25
|
-
};
|
|
26
|
-
var _default = Purpose;
|
|
27
|
-
exports["default"] = _default;
|
|
28
|
-
//# sourceMappingURL=purpose.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/purpose.jsx"],"names":["Purpose","props","React","Children","map","children","child","cloneElement","purpose","propTypes","PropTypes","node","string"],"mappings":";;;;;;;AAAA;;AACA;;;;AAEA,IAAMA,OAAO,GAAG,SAAVA,OAAU,CAAAC,KAAK,EAAI;AACvB,sBACE,kEACGC,kBAAMC,QAAN,CAAeC,GAAf,CAAmBH,KAAK,CAACI,QAAzB,EAAmC,UAAAC,KAAK;AAAA,wBACvCJ,kBAAMK,YAAN,CAAmBD,KAAnB,EAA0B;AAAE,0BAAoBL,KAAK,CAACO;AAA5B,KAA1B,CADuC;AAAA,GAAxC,CADH,CADF;AAOD,CARD;;AAUAR,OAAO,CAACS,SAAR,GAAoB;AAClBJ,EAAAA,QAAQ,EAAEK,sBAAUC,IADF;AAElBH,EAAAA,OAAO,EAAEE,sBAAUE;AAFD,CAApB;eAKeZ,O","sourcesContent":["import PropTypes from 'prop-types';\nimport React from 'react';\n\nconst Purpose = props => {\n return (\n <>\n {React.Children.map(props.children, child =>\n React.cloneElement(child, { 'data-pie-purpose': props.purpose })\n )}\n </>\n );\n};\n\nPurpose.propTypes = {\n children: PropTypes.node,\n purpose: PropTypes.string\n};\n\nexport default Purpose;\n"],"file":"purpose.js"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = void 0;
|
|
7
|
-
|
|
8
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
-
|
|
10
|
-
var _react = _interopRequireDefault(require("react"));
|
|
11
|
-
|
|
12
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
|
-
|
|
14
|
-
var Readable = function Readable(props) {
|
|
15
|
-
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, _react["default"].Children.map(props.children, function (child) {
|
|
16
|
-
return /*#__PURE__*/_react["default"].cloneElement(child, {
|
|
17
|
-
'data-pie-readable': props["false"] === undefined
|
|
18
|
-
});
|
|
19
|
-
}));
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
Readable.propTypes = {
|
|
23
|
-
children: _propTypes["default"].node,
|
|
24
|
-
"false": _propTypes["default"].bool
|
|
25
|
-
};
|
|
26
|
-
var _default = Readable;
|
|
27
|
-
exports["default"] = _default;
|
|
28
|
-
//# sourceMappingURL=readable.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/readable.jsx"],"names":["Readable","props","React","Children","map","children","child","cloneElement","undefined","propTypes","PropTypes","node","bool"],"mappings":";;;;;;;AAAA;;AACA;;;;AAEA,IAAMA,QAAQ,GAAG,SAAXA,QAAW,CAAAC,KAAK,EAAI;AACxB,sBACE,kEACGC,kBAAMC,QAAN,CAAeC,GAAf,CAAmBH,KAAK,CAACI,QAAzB,EAAmC,UAAAC,KAAK;AAAA,wBACvCJ,kBAAMK,YAAN,CAAmBD,KAAnB,EAA0B;AAAE,2BAAqBL,KAAK,SAAL,KAAgBO;AAAvC,KAA1B,CADuC;AAAA,GAAxC,CADH,CADF;AAOD,CARD;;AAUAR,QAAQ,CAACS,SAAT,GAAqB;AACnBJ,EAAAA,QAAQ,EAAEK,sBAAUC,IADD;AAEnB,WAAOD,sBAAUE;AAFE,CAArB;eAKeZ,Q","sourcesContent":["import PropTypes from 'prop-types';\nimport React from 'react';\n\nconst Readable = props => {\n return (\n <>\n {React.Children.map(props.children, child =>\n React.cloneElement(child, { 'data-pie-readable': props.false === undefined })\n )}\n </>\n );\n};\n\nReadable.propTypes = {\n children: PropTypes.node,\n false: PropTypes.bool\n};\n\nexport default Readable;\n"],"file":"readable.js"}
|