@pie-element/math-templated 5.0.2-esm.0 → 11.0.5-esm.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/configure/package.json +5 -5
- package/controller/package.json +3 -3
- package/esm/configure.js +341 -4
- package/esm/configure.js.map +1 -1
- package/module/controller.js +39 -38
- package/module/element.js +1 -1
- package/module/index.html +1 -1
- package/module/manifest.json +1 -1
- package/module/print.html +1 -1
- package/module/print.js +1 -1
- package/package.json +7 -7
package/configure/package.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-element/math-templated-configure",
|
|
3
3
|
"private": true,
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "11.0.5-esm.0",
|
|
5
5
|
"description": "",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"module": "src/index.js",
|
|
8
8
|
"dependencies": {
|
|
9
9
|
"@material-ui/core": "^3.9.2",
|
|
10
10
|
"@pie-framework/pie-configure-events": "^1.3.0",
|
|
11
|
-
"@pie-lib/config-ui": "^11.26.
|
|
12
|
-
"@pie-lib/editable-html": "^11.18.
|
|
13
|
-
"@pie-lib/math-toolbar": "^1.28.
|
|
14
|
-
"@pie-lib/render-ui": "^4.32.
|
|
11
|
+
"@pie-lib/config-ui": "^11.26.3",
|
|
12
|
+
"@pie-lib/editable-html": "^11.18.3",
|
|
13
|
+
"@pie-lib/math-toolbar": "^1.28.3",
|
|
14
|
+
"@pie-lib/render-ui": "^4.32.3",
|
|
15
15
|
"debug": "^3.1.0",
|
|
16
16
|
"lodash": "^4.17.15",
|
|
17
17
|
"prop-types": "^15.6.2",
|
package/controller/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-element/math-templated-controller",
|
|
3
3
|
"private": true,
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "11.0.5-esm.0",
|
|
5
5
|
"description": "",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"module": "src/index.js",
|
|
8
8
|
"dependencies": {
|
|
9
9
|
"@pie-framework/math-validation": "^1.4.2",
|
|
10
|
-
"@pie-lib/controller-utils": "^0.19.
|
|
11
|
-
"@pie-lib/translator": "^2.20.
|
|
10
|
+
"@pie-lib/controller-utils": "^0.19.2",
|
|
11
|
+
"@pie-lib/translator": "^2.20.2",
|
|
12
12
|
"debug": "^3.1.0",
|
|
13
13
|
"lodash": "^4.17.15"
|
|
14
14
|
},
|
package/esm/configure.js
CHANGED
|
@@ -10,7 +10,7 @@ import { withStyles } from '@material-ui/core/styles';
|
|
|
10
10
|
import Typography from '@material-ui/core/Typography';
|
|
11
11
|
import Select from '@material-ui/core/Select';
|
|
12
12
|
import MenuItem from '@material-ui/core/MenuItem';
|
|
13
|
-
import
|
|
13
|
+
import require$$3 from '@material-ui/core/SvgIcon';
|
|
14
14
|
import Tooltip from '@material-ui/core/Tooltip';
|
|
15
15
|
import cloneDeep from 'lodash/cloneDeep';
|
|
16
16
|
import pick from 'lodash/pick';
|
|
@@ -25,7 +25,6 @@ import FormControlLabel from '@material-ui/core/FormControlLabel';
|
|
|
25
25
|
import InputLabel from '@material-ui/core/InputLabel';
|
|
26
26
|
import Checkbox from '@material-ui/core/Checkbox';
|
|
27
27
|
import IconButton from '@material-ui/core/IconButton';
|
|
28
|
-
import Delete from '@material-ui/icons/Delete';
|
|
29
28
|
import { color } from '@pie-lib/render-ui';
|
|
30
29
|
|
|
31
30
|
function _extends() {
|
|
@@ -46,6 +45,344 @@ function _extends() {
|
|
|
46
45
|
return _extends.apply(this, arguments);
|
|
47
46
|
}
|
|
48
47
|
|
|
48
|
+
var Info = {};
|
|
49
|
+
|
|
50
|
+
var interopRequireDefault = {exports: {}};
|
|
51
|
+
|
|
52
|
+
(function (module) {
|
|
53
|
+
function _interopRequireDefault(obj) {
|
|
54
|
+
return obj && obj.__esModule ? obj : {
|
|
55
|
+
"default": obj
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
60
|
+
}(interopRequireDefault));
|
|
61
|
+
|
|
62
|
+
var createSvgIcon$1 = {};
|
|
63
|
+
|
|
64
|
+
var pure$1 = {};
|
|
65
|
+
|
|
66
|
+
var shouldUpdate$1 = {};
|
|
67
|
+
|
|
68
|
+
var inheritsLoose = {exports: {}};
|
|
69
|
+
|
|
70
|
+
var setPrototypeOf = {exports: {}};
|
|
71
|
+
|
|
72
|
+
(function (module) {
|
|
73
|
+
function _setPrototypeOf(o, p) {
|
|
74
|
+
module.exports = _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
|
|
75
|
+
o.__proto__ = p;
|
|
76
|
+
return o;
|
|
77
|
+
}, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
78
|
+
return _setPrototypeOf(o, p);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
module.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
82
|
+
}(setPrototypeOf));
|
|
83
|
+
|
|
84
|
+
(function (module) {
|
|
85
|
+
var setPrototypeOf$1 = setPrototypeOf.exports;
|
|
86
|
+
|
|
87
|
+
function _inheritsLoose(subClass, superClass) {
|
|
88
|
+
subClass.prototype = Object.create(superClass.prototype);
|
|
89
|
+
subClass.prototype.constructor = subClass;
|
|
90
|
+
setPrototypeOf$1(subClass, superClass);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
module.exports = _inheritsLoose, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
94
|
+
}(inheritsLoose));
|
|
95
|
+
|
|
96
|
+
var setDisplayName$1 = {};
|
|
97
|
+
|
|
98
|
+
var setStatic$1 = {};
|
|
99
|
+
|
|
100
|
+
setStatic$1.__esModule = true;
|
|
101
|
+
setStatic$1.default = void 0;
|
|
102
|
+
|
|
103
|
+
var setStatic = function setStatic(key, value) {
|
|
104
|
+
return function (BaseComponent) {
|
|
105
|
+
/* eslint-disable no-param-reassign */
|
|
106
|
+
BaseComponent[key] = value;
|
|
107
|
+
/* eslint-enable no-param-reassign */
|
|
108
|
+
|
|
109
|
+
return BaseComponent;
|
|
110
|
+
};
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
var _default$9 = setStatic;
|
|
114
|
+
setStatic$1.default = _default$9;
|
|
115
|
+
|
|
116
|
+
var _interopRequireDefault$7 = interopRequireDefault.exports;
|
|
117
|
+
|
|
118
|
+
setDisplayName$1.__esModule = true;
|
|
119
|
+
setDisplayName$1.default = void 0;
|
|
120
|
+
|
|
121
|
+
var _setStatic = _interopRequireDefault$7(setStatic$1);
|
|
122
|
+
|
|
123
|
+
var setDisplayName = function setDisplayName(displayName) {
|
|
124
|
+
return (0, _setStatic.default)('displayName', displayName);
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
var _default$8 = setDisplayName;
|
|
128
|
+
setDisplayName$1.default = _default$8;
|
|
129
|
+
|
|
130
|
+
var wrapDisplayName$1 = {};
|
|
131
|
+
|
|
132
|
+
var getDisplayName$1 = {};
|
|
133
|
+
|
|
134
|
+
getDisplayName$1.__esModule = true;
|
|
135
|
+
getDisplayName$1.default = void 0;
|
|
136
|
+
|
|
137
|
+
var getDisplayName = function getDisplayName(Component) {
|
|
138
|
+
if (typeof Component === 'string') {
|
|
139
|
+
return Component;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
if (!Component) {
|
|
143
|
+
return undefined;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
return Component.displayName || Component.name || 'Component';
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
var _default$7 = getDisplayName;
|
|
150
|
+
getDisplayName$1.default = _default$7;
|
|
151
|
+
|
|
152
|
+
var _interopRequireDefault$6 = interopRequireDefault.exports;
|
|
153
|
+
|
|
154
|
+
wrapDisplayName$1.__esModule = true;
|
|
155
|
+
wrapDisplayName$1.default = void 0;
|
|
156
|
+
|
|
157
|
+
var _getDisplayName = _interopRequireDefault$6(getDisplayName$1);
|
|
158
|
+
|
|
159
|
+
var wrapDisplayName = function wrapDisplayName(BaseComponent, hocName) {
|
|
160
|
+
return hocName + "(" + (0, _getDisplayName.default)(BaseComponent) + ")";
|
|
161
|
+
};
|
|
162
|
+
|
|
163
|
+
var _default$6 = wrapDisplayName;
|
|
164
|
+
wrapDisplayName$1.default = _default$6;
|
|
165
|
+
|
|
166
|
+
var _interopRequireDefault$5 = interopRequireDefault.exports;
|
|
167
|
+
|
|
168
|
+
shouldUpdate$1.__esModule = true;
|
|
169
|
+
shouldUpdate$1.default = void 0;
|
|
170
|
+
|
|
171
|
+
var _inheritsLoose2 = _interopRequireDefault$5(inheritsLoose.exports);
|
|
172
|
+
|
|
173
|
+
var _react$3 = React__default;
|
|
174
|
+
|
|
175
|
+
var _setDisplayName$1 = _interopRequireDefault$5(setDisplayName$1);
|
|
176
|
+
|
|
177
|
+
var _wrapDisplayName$1 = _interopRequireDefault$5(wrapDisplayName$1);
|
|
178
|
+
|
|
179
|
+
var shouldUpdate = function shouldUpdate(test) {
|
|
180
|
+
return function (BaseComponent) {
|
|
181
|
+
var factory = (0, _react$3.createFactory)(BaseComponent);
|
|
182
|
+
|
|
183
|
+
var ShouldUpdate =
|
|
184
|
+
/*#__PURE__*/
|
|
185
|
+
function (_Component) {
|
|
186
|
+
(0, _inheritsLoose2.default)(ShouldUpdate, _Component);
|
|
187
|
+
|
|
188
|
+
function ShouldUpdate() {
|
|
189
|
+
return _Component.apply(this, arguments) || this;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
var _proto = ShouldUpdate.prototype;
|
|
193
|
+
|
|
194
|
+
_proto.shouldComponentUpdate = function shouldComponentUpdate(nextProps) {
|
|
195
|
+
return test(this.props, nextProps);
|
|
196
|
+
};
|
|
197
|
+
|
|
198
|
+
_proto.render = function render() {
|
|
199
|
+
return factory(this.props);
|
|
200
|
+
};
|
|
201
|
+
|
|
202
|
+
return ShouldUpdate;
|
|
203
|
+
}(_react$3.Component);
|
|
204
|
+
|
|
205
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
206
|
+
return (0, _setDisplayName$1.default)((0, _wrapDisplayName$1.default)(BaseComponent, 'shouldUpdate'))(ShouldUpdate);
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
return ShouldUpdate;
|
|
210
|
+
};
|
|
211
|
+
};
|
|
212
|
+
|
|
213
|
+
var _default$5 = shouldUpdate;
|
|
214
|
+
shouldUpdate$1.default = _default$5;
|
|
215
|
+
|
|
216
|
+
var shallowEqual$1 = {};
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
220
|
+
*
|
|
221
|
+
* This source code is licensed under the MIT license found in the
|
|
222
|
+
* LICENSE file in the root directory of this source tree.
|
|
223
|
+
*
|
|
224
|
+
* @typechecks
|
|
225
|
+
*
|
|
226
|
+
*/
|
|
227
|
+
|
|
228
|
+
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
229
|
+
|
|
230
|
+
/**
|
|
231
|
+
* inlined Object.is polyfill to avoid requiring consumers ship their own
|
|
232
|
+
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
|
|
233
|
+
*/
|
|
234
|
+
function is(x, y) {
|
|
235
|
+
// SameValue algorithm
|
|
236
|
+
if (x === y) {
|
|
237
|
+
// Steps 1-5, 7-10
|
|
238
|
+
// Steps 6.b-6.e: +0 != -0
|
|
239
|
+
// Added the nonzero y check to make Flow happy, but it is redundant
|
|
240
|
+
return x !== 0 || y !== 0 || 1 / x === 1 / y;
|
|
241
|
+
} else {
|
|
242
|
+
// Step 6.a: NaN == NaN
|
|
243
|
+
return x !== x && y !== y;
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* Performs equality by iterating through keys on an object and returning false
|
|
249
|
+
* when any key has values which are not strictly equal between the arguments.
|
|
250
|
+
* Returns true when the values of all keys are strictly equal.
|
|
251
|
+
*/
|
|
252
|
+
function shallowEqual(objA, objB) {
|
|
253
|
+
if (is(objA, objB)) {
|
|
254
|
+
return true;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {
|
|
258
|
+
return false;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
var keysA = Object.keys(objA);
|
|
262
|
+
var keysB = Object.keys(objB);
|
|
263
|
+
|
|
264
|
+
if (keysA.length !== keysB.length) {
|
|
265
|
+
return false;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
// Test for A's keys different from B.
|
|
269
|
+
for (var i = 0; i < keysA.length; i++) {
|
|
270
|
+
if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {
|
|
271
|
+
return false;
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
return true;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
var shallowEqual_1 = shallowEqual;
|
|
279
|
+
|
|
280
|
+
var _interopRequireDefault$4 = interopRequireDefault.exports;
|
|
281
|
+
|
|
282
|
+
shallowEqual$1.__esModule = true;
|
|
283
|
+
shallowEqual$1.default = void 0;
|
|
284
|
+
|
|
285
|
+
var _shallowEqual$1 = _interopRequireDefault$4(shallowEqual_1);
|
|
286
|
+
|
|
287
|
+
var _default$4 = _shallowEqual$1.default;
|
|
288
|
+
shallowEqual$1.default = _default$4;
|
|
289
|
+
|
|
290
|
+
var _interopRequireDefault$3 = interopRequireDefault.exports;
|
|
291
|
+
|
|
292
|
+
pure$1.__esModule = true;
|
|
293
|
+
pure$1.default = void 0;
|
|
294
|
+
|
|
295
|
+
var _shouldUpdate = _interopRequireDefault$3(shouldUpdate$1);
|
|
296
|
+
|
|
297
|
+
var _shallowEqual = _interopRequireDefault$3(shallowEqual$1);
|
|
298
|
+
|
|
299
|
+
var _setDisplayName = _interopRequireDefault$3(setDisplayName$1);
|
|
300
|
+
|
|
301
|
+
var _wrapDisplayName = _interopRequireDefault$3(wrapDisplayName$1);
|
|
302
|
+
|
|
303
|
+
var pure = function pure(BaseComponent) {
|
|
304
|
+
var hoc = (0, _shouldUpdate.default)(function (props, nextProps) {
|
|
305
|
+
return !(0, _shallowEqual.default)(props, nextProps);
|
|
306
|
+
});
|
|
307
|
+
|
|
308
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
309
|
+
return (0, _setDisplayName.default)((0, _wrapDisplayName.default)(BaseComponent, 'pure'))(hoc(BaseComponent));
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
return hoc(BaseComponent);
|
|
313
|
+
};
|
|
314
|
+
|
|
315
|
+
var _default$3 = pure;
|
|
316
|
+
pure$1.default = _default$3;
|
|
317
|
+
|
|
318
|
+
var _interopRequireDefault$2 = interopRequireDefault.exports;
|
|
319
|
+
|
|
320
|
+
Object.defineProperty(createSvgIcon$1, "__esModule", {
|
|
321
|
+
value: true
|
|
322
|
+
});
|
|
323
|
+
createSvgIcon$1.default = void 0;
|
|
324
|
+
|
|
325
|
+
var _react$2 = _interopRequireDefault$2(React__default);
|
|
326
|
+
|
|
327
|
+
var _pure = _interopRequireDefault$2(pure$1);
|
|
328
|
+
|
|
329
|
+
var _SvgIcon = _interopRequireDefault$2(require$$3);
|
|
330
|
+
|
|
331
|
+
function createSvgIcon(path, displayName) {
|
|
332
|
+
var Icon = function Icon(props) {
|
|
333
|
+
return _react$2.default.createElement(_SvgIcon.default, props, path);
|
|
334
|
+
};
|
|
335
|
+
|
|
336
|
+
Icon.displayName = "".concat(displayName, "Icon");
|
|
337
|
+
Icon = (0, _pure.default)(Icon);
|
|
338
|
+
Icon.muiName = 'SvgIcon';
|
|
339
|
+
return Icon;
|
|
340
|
+
}
|
|
341
|
+
var _default$2 = createSvgIcon;
|
|
342
|
+
createSvgIcon$1.default = _default$2;
|
|
343
|
+
|
|
344
|
+
var _interopRequireDefault$1 = interopRequireDefault.exports;
|
|
345
|
+
|
|
346
|
+
Object.defineProperty(Info, "__esModule", {
|
|
347
|
+
value: true
|
|
348
|
+
});
|
|
349
|
+
var default_1$1 = Info.default = void 0;
|
|
350
|
+
|
|
351
|
+
var _react$1 = _interopRequireDefault$1(React__default);
|
|
352
|
+
|
|
353
|
+
var _createSvgIcon$1 = _interopRequireDefault$1(createSvgIcon$1);
|
|
354
|
+
|
|
355
|
+
var _default$1 = (0, _createSvgIcon$1.default)(_react$1.default.createElement(_react$1.default.Fragment, null, _react$1.default.createElement("path", {
|
|
356
|
+
fill: "none",
|
|
357
|
+
d: "M0 0h24v24H0z"
|
|
358
|
+
}), _react$1.default.createElement("path", {
|
|
359
|
+
d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"
|
|
360
|
+
})), 'Info');
|
|
361
|
+
|
|
362
|
+
default_1$1 = Info.default = _default$1;
|
|
363
|
+
|
|
364
|
+
var Delete = {};
|
|
365
|
+
|
|
366
|
+
var _interopRequireDefault = interopRequireDefault.exports;
|
|
367
|
+
|
|
368
|
+
Object.defineProperty(Delete, "__esModule", {
|
|
369
|
+
value: true
|
|
370
|
+
});
|
|
371
|
+
var default_1 = Delete.default = void 0;
|
|
372
|
+
|
|
373
|
+
var _react = _interopRequireDefault(React__default);
|
|
374
|
+
|
|
375
|
+
var _createSvgIcon = _interopRequireDefault(createSvgIcon$1);
|
|
376
|
+
|
|
377
|
+
var _default = (0, _createSvgIcon.default)(_react.default.createElement(_react.default.Fragment, null, _react.default.createElement("path", {
|
|
378
|
+
d: "M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"
|
|
379
|
+
}), _react.default.createElement("path", {
|
|
380
|
+
fill: "none",
|
|
381
|
+
d: "M0 0h24v24H0z"
|
|
382
|
+
})), 'Delete');
|
|
383
|
+
|
|
384
|
+
default_1 = Delete.default = _default;
|
|
385
|
+
|
|
49
386
|
class Response extends React.Component {
|
|
50
387
|
constructor(props) {
|
|
51
388
|
super(props);
|
|
@@ -312,7 +649,7 @@ class Response extends React.Component {
|
|
|
312
649
|
}), /*#__PURE__*/React.createElement(IconButton, {
|
|
313
650
|
className: classes.removeAlternateButton,
|
|
314
651
|
onClick: this.onRemoveAlternate(alternateId)
|
|
315
|
-
}, /*#__PURE__*/React.createElement(
|
|
652
|
+
}, /*#__PURE__*/React.createElement(default_1, null))), error && error[alternateId] ? /*#__PURE__*/React.createElement("div", {
|
|
316
653
|
className: classes.errorText
|
|
317
654
|
}, error[alternateId]) : null)), /*#__PURE__*/React.createElement(Button, {
|
|
318
655
|
className: classes.alternateButton,
|
|
@@ -830,7 +1167,7 @@ class Design extends React__default.Component {
|
|
|
830
1167
|
disableTouchListener: true,
|
|
831
1168
|
placement: 'right',
|
|
832
1169
|
title: validationMessage
|
|
833
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
1170
|
+
}, /*#__PURE__*/React__default.createElement(default_1$1, {
|
|
834
1171
|
fontSize: 'small',
|
|
835
1172
|
color: 'primary'
|
|
836
1173
|
}))), /*#__PURE__*/React__default.createElement(EditableHtml, {
|