@arbisoft/react-design-tool 1.0.54 → 1.0.55
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/README.md +2 -2
- package/dist/cjs/index.js +23 -26
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +23 -26
- package/dist/esm/index.js.map +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -40,13 +40,13 @@ yarn add @arbisoft/react-design-tool
|
|
|
40
40
|
#### ⚠️ Important: Installation Guide for React 18 and Below
|
|
41
41
|
|
|
42
42
|
```bash
|
|
43
|
-
npm install @arbisoft/react-design-tool@1.0.
|
|
43
|
+
npm install @arbisoft/react-design-tool@1.0.55
|
|
44
44
|
```
|
|
45
45
|
|
|
46
46
|
OR
|
|
47
47
|
|
|
48
48
|
```bash
|
|
49
|
-
yarn add @arbisoft/react-design-tool@1.0.
|
|
49
|
+
yarn add @arbisoft/react-design-tool@1.0.55
|
|
50
50
|
|
|
51
51
|
```
|
|
52
52
|
|
package/dist/cjs/index.js
CHANGED
|
@@ -282,17 +282,19 @@ function _regeneratorDefine(e, r, n, t) {
|
|
|
282
282
|
i = 0;
|
|
283
283
|
}
|
|
284
284
|
_regeneratorDefine = function (e, r, n, t) {
|
|
285
|
-
|
|
286
|
-
_regeneratorDefine(e, r, function (e) {
|
|
287
|
-
return this._invoke(r, n, e);
|
|
288
|
-
});
|
|
289
|
-
}
|
|
290
|
-
r ? i ? i(e, r, {
|
|
285
|
+
if (r) i ? i(e, r, {
|
|
291
286
|
value: n,
|
|
292
287
|
enumerable: !t,
|
|
293
288
|
configurable: !t,
|
|
294
289
|
writable: !t
|
|
295
|
-
}) : e[r] = n
|
|
290
|
+
}) : e[r] = n;else {
|
|
291
|
+
function o(r, n) {
|
|
292
|
+
_regeneratorDefine(e, r, function (e) {
|
|
293
|
+
return this._invoke(r, n, e);
|
|
294
|
+
});
|
|
295
|
+
}
|
|
296
|
+
o("next", 0), o("throw", 1), o("return", 2);
|
|
297
|
+
}
|
|
296
298
|
}, _regeneratorDefine(e, r, n, t);
|
|
297
299
|
}
|
|
298
300
|
function _slicedToArray(r, e) {
|
|
@@ -806,7 +808,7 @@ var LOCATION_BREADCRUMB$8 = "property > building > room";
|
|
|
806
808
|
var DOMAIN$8 = "www.domain.com";
|
|
807
809
|
var SHOW_PROPERTY_LOCATION$8 = "Show Property Label";
|
|
808
810
|
var LOCATION_HELPER$8 = "Enable this to show the property’s location label on the canvas, or disable it to hide it.";
|
|
809
|
-
var SHOW_QR_ID$8 = "Show QR
|
|
811
|
+
var SHOW_QR_ID$8 = "Show QR ID";
|
|
810
812
|
var QR_ID_HELPER$8 = "Enable this to display the unique QR Code ID on the canvas, or disable it to remove it.";
|
|
811
813
|
var enTranslations = {
|
|
812
814
|
BRING_FORWARD: BRING_FORWARD$8,
|
|
@@ -2073,6 +2075,7 @@ var TEXT_DICTIONARY = {
|
|
|
2073
2075
|
};
|
|
2074
2076
|
var LOCATION_ELEMENT_ID = 'element-location-text';
|
|
2075
2077
|
var QRID_ELEMENT_ID = 'element-qrid-text';
|
|
2078
|
+
var QRID_ELEMENT_PILL = 'element-qrid-text-pill';
|
|
2076
2079
|
|
|
2077
2080
|
var SideBar = function SideBar(_ref) {
|
|
2078
2081
|
var _TEXT_DICTIONARY$lang, _TEXT_DICTIONARY$lang2, _TEXT_DICTIONARY$lang3, _TEXT_DICTIONARY$lang4, _TEXT_DICTIONARY$lang5, _TEXT_DICTIONARY$lang6;
|
|
@@ -2940,7 +2943,7 @@ var exportStageAsImage = /*#__PURE__*/function () {
|
|
|
2940
2943
|
var _ref3 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2(resolve, reject) {
|
|
2941
2944
|
var stage, canvas, dataURL, _t;
|
|
2942
2945
|
return _regenerator().w(function (_context2) {
|
|
2943
|
-
while (1) switch (_context2.
|
|
2946
|
+
while (1) switch (_context2.n) {
|
|
2944
2947
|
case 0:
|
|
2945
2948
|
_context2.p = 0;
|
|
2946
2949
|
stage = stageRef === null || stageRef === void 0 ? void 0 : stageRef.current;
|
|
@@ -4275,7 +4278,7 @@ var CanvasImage = function CanvasImage(_ref) {
|
|
|
4275
4278
|
_load = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {
|
|
4276
4279
|
var res, blob, img, _t;
|
|
4277
4280
|
return _regenerator().w(function (_context) {
|
|
4278
|
-
while (1) switch (_context.
|
|
4281
|
+
while (1) switch (_context.n) {
|
|
4279
4282
|
case 0:
|
|
4280
4283
|
_context.p = 0;
|
|
4281
4284
|
setLoading(true);
|
|
@@ -4449,7 +4452,7 @@ var QrElement = function QrElement(_ref) {
|
|
|
4449
4452
|
_loadLogo = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2() {
|
|
4450
4453
|
var res, blob, img, _t;
|
|
4451
4454
|
return _regenerator().w(function (_context2) {
|
|
4452
|
-
while (1) switch (_context2.
|
|
4455
|
+
while (1) switch (_context2.n) {
|
|
4453
4456
|
case 0:
|
|
4454
4457
|
if (element !== null && element !== void 0 && element.qrLogo) {
|
|
4455
4458
|
_context2.n = 1;
|
|
@@ -6420,7 +6423,7 @@ function memoize(fn) {
|
|
|
6420
6423
|
}
|
|
6421
6424
|
|
|
6422
6425
|
// eslint-disable-next-line no-undef
|
|
6423
|
-
var reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|
|
|
6426
|
+
var reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23
|
|
6424
6427
|
|
|
6425
6428
|
var isPropValid = /* #__PURE__ */memoize(function (prop) {
|
|
6426
6429
|
return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111
|
|
@@ -6847,7 +6850,7 @@ var Studio = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
6847
6850
|
setSelectedElement(toAdd);
|
|
6848
6851
|
};
|
|
6849
6852
|
var addQrIdText = function addQrIdText() {
|
|
6850
|
-
var _elements$find4, _qrIdText$width, _qrIdText$textAlign, _ref5, _qrIdText$color;
|
|
6853
|
+
var _elements$find4, _qrIdText$width, _qrIdText$textAlign, _ref5, _qrIdText$color, _ref6, _qrIdText$fontWeight;
|
|
6851
6854
|
if (!qrId || hasQrIdText) return;
|
|
6852
6855
|
|
|
6853
6856
|
// 1) If we’ve seen it before, restore EXACTLY as it was
|
|
@@ -6919,7 +6922,7 @@ var Studio = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
6919
6922
|
color: color,
|
|
6920
6923
|
textDecoration: defaultTextProps === null || defaultTextProps === void 0 ? void 0 : defaultTextProps.textDecoration,
|
|
6921
6924
|
fontStyle: defaultTextProps === null || defaultTextProps === void 0 ? void 0 : defaultTextProps.fontStyle,
|
|
6922
|
-
fontWeight: defaultTextProps === null || defaultTextProps === void 0 ? void 0 : defaultTextProps.fontWeight
|
|
6925
|
+
fontWeight: (_ref6 = (_qrIdText$fontWeight = qrIdText === null || qrIdText === void 0 ? void 0 : qrIdText.fontWeight) !== null && _qrIdText$fontWeight !== void 0 ? _qrIdText$fontWeight : defaultTextProps === null || defaultTextProps === void 0 ? void 0 : defaultTextProps.fontWeight) !== null && _ref6 !== void 0 ? _ref6 : '400'
|
|
6923
6926
|
}, wantOutline && {
|
|
6924
6927
|
stroke: color.toLowerCase() === '#ffffff' || color.toLowerCase() === 'white' ? 'rgba(0,0,0,0.5)' : 'rgba(255,255,255,0.8)',
|
|
6925
6928
|
strokeWidth: 1,
|
|
@@ -7185,9 +7188,6 @@ var Studio = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
7185
7188
|
var selectedElementCopy = _objectSpread2({}, selectedElement);
|
|
7186
7189
|
selectedElementCopy[key] = value;
|
|
7187
7190
|
delete selectedElementCopy['ref'];
|
|
7188
|
-
if (key === 'fontWeight') {
|
|
7189
|
-
selectedElementCopy['fontVariant'] = value;
|
|
7190
|
-
}
|
|
7191
7191
|
var updatedElements = elements === null || elements === void 0 ? void 0 : elements.map(function (el) {
|
|
7192
7192
|
return el.id === (selectedElementCopy === null || selectedElementCopy === void 0 ? void 0 : selectedElementCopy.id) ? _objectSpread2({}, selectedElementCopy) : el;
|
|
7193
7193
|
});
|
|
@@ -7260,9 +7260,6 @@ var Studio = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
7260
7260
|
copyElements === null || copyElements === void 0 || copyElements.push(selectedElem);
|
|
7261
7261
|
saveHistory(_toConsumableArray(copyElements));
|
|
7262
7262
|
};
|
|
7263
|
-
console.log({
|
|
7264
|
-
elements: elements
|
|
7265
|
-
});
|
|
7266
7263
|
var createNewTemplate = function createNewTemplate() {
|
|
7267
7264
|
var elems = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [].concat(_toConsumableArray(defaultElements), [{
|
|
7268
7265
|
type: elementTypes.qr,
|
|
@@ -7289,7 +7286,7 @@ var Studio = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
7289
7286
|
});
|
|
7290
7287
|
if (!(newQrIdText !== null && newQrIdText !== void 0 && newQrIdText.id) && prevQrIdText !== null && prevQrIdText !== void 0 && prevQrIdText.id) {
|
|
7291
7288
|
var qrIdPill = prevElements.find(function (element) {
|
|
7292
|
-
return element.id ===
|
|
7289
|
+
return element.id === QRID_ELEMENT_PILL;
|
|
7293
7290
|
});
|
|
7294
7291
|
if (qrIdPill.id) elems.push(qrIdPill);
|
|
7295
7292
|
elems.push(prevQrIdText);
|
|
@@ -7477,10 +7474,10 @@ var Studio = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
7477
7474
|
}
|
|
7478
7475
|
};
|
|
7479
7476
|
var addQrLogo = /*#__PURE__*/function () {
|
|
7480
|
-
var
|
|
7477
|
+
var _ref7 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2() {
|
|
7481
7478
|
var file, result, imageUrl, reader, _t;
|
|
7482
7479
|
return _regenerator().w(function (_context2) {
|
|
7483
|
-
while (1) switch (_context2.
|
|
7480
|
+
while (1) switch (_context2.n) {
|
|
7484
7481
|
case 0:
|
|
7485
7482
|
_context2.n = 1;
|
|
7486
7483
|
return pickImage();
|
|
@@ -7533,7 +7530,7 @@ var Studio = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
7533
7530
|
}, _callee2, null, [[3, 5, 6, 7]]);
|
|
7534
7531
|
}));
|
|
7535
7532
|
return function addQrLogo() {
|
|
7536
|
-
return
|
|
7533
|
+
return _ref7.apply(this, arguments);
|
|
7537
7534
|
};
|
|
7538
7535
|
}();
|
|
7539
7536
|
var addLogo = function addLogo(url) {
|
|
@@ -7562,7 +7559,7 @@ var Studio = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
7562
7559
|
}
|
|
7563
7560
|
};
|
|
7564
7561
|
var onSaveProgress = /*#__PURE__*/function () {
|
|
7565
|
-
var
|
|
7562
|
+
var _ref8 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee3() {
|
|
7566
7563
|
var processedElements, dataURL;
|
|
7567
7564
|
return _regenerator().w(function (_context3) {
|
|
7568
7565
|
while (1) switch (_context3.n) {
|
|
@@ -7596,7 +7593,7 @@ var Studio = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
7596
7593
|
}, _callee3);
|
|
7597
7594
|
}));
|
|
7598
7595
|
return function onSaveProgress() {
|
|
7599
|
-
return
|
|
7596
|
+
return _ref8.apply(this, arguments);
|
|
7600
7597
|
};
|
|
7601
7598
|
}();
|
|
7602
7599
|
return /*#__PURE__*/React.createElement(styled.StyleSheetManager, {
|