labellife-design-tool 2.2.9 → 2.3.1
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/dist/cjs/canvas/workspace.js +56 -13
- package/dist/cjs/canvas/workspace.js.map +1 -1
- package/dist/cjs/index.js +565 -105
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/model/store.js +1 -1
- package/dist/cjs/model/store.js.map +1 -1
- package/dist/cjs/side-panel/index.js +191 -35
- package/dist/cjs/side-panel/index.js.map +1 -1
- package/dist/cjs/toolbar/toolbar.js +317 -56
- package/dist/cjs/toolbar/toolbar.js.map +1 -1
- package/dist/esm/canvas/workspace.js +56 -13
- package/dist/esm/canvas/workspace.js.map +1 -1
- package/dist/esm/index.js +565 -105
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/model/store.js +1 -1
- package/dist/esm/model/store.js.map +1 -1
- package/dist/esm/side-panel/index.js +191 -35
- package/dist/esm/side-panel/index.js.map +1 -1
- package/dist/esm/toolbar/toolbar.js +318 -57
- package/dist/esm/toolbar/toolbar.js.map +1 -1
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -50,6 +50,15 @@ require('@mui/icons-material/Crop');
|
|
|
50
50
|
var AutoAwesomeIcon = require('@mui/icons-material/AutoAwesome');
|
|
51
51
|
var SwapHorizIcon = require('@mui/icons-material/SwapHoriz');
|
|
52
52
|
var SwapVertIcon = require('@mui/icons-material/SwapVert');
|
|
53
|
+
var OpenWithIcon = require('@mui/icons-material/OpenWith');
|
|
54
|
+
require('@mui/icons-material/AlignHorizontalLeft');
|
|
55
|
+
require('@mui/icons-material/AlignHorizontalCenter');
|
|
56
|
+
require('@mui/icons-material/AlignHorizontalRight');
|
|
57
|
+
require('@mui/icons-material/AlignVerticalTop');
|
|
58
|
+
require('@mui/icons-material/AlignVerticalCenter');
|
|
59
|
+
require('@mui/icons-material/AlignVerticalBottom');
|
|
60
|
+
var VerticalAlignTopIcon = require('@mui/icons-material/VerticalAlignTop');
|
|
61
|
+
var VerticalAlignBottomIcon = require('@mui/icons-material/VerticalAlignBottom');
|
|
53
62
|
var ZoomInIcon = require('@mui/icons-material/ZoomIn');
|
|
54
63
|
var ZoomOutIcon = require('@mui/icons-material/ZoomOut');
|
|
55
64
|
var FitScreenIcon = require('@mui/icons-material/FitScreen');
|
|
@@ -1690,7 +1699,7 @@ var Store = mobxStateTree.types.model('Store', {
|
|
|
1690
1699
|
return f.id === el.id;
|
|
1691
1700
|
});
|
|
1692
1701
|
if (!alreadyPending) {
|
|
1693
|
-
self._pendingInputFields.
|
|
1702
|
+
self._pendingInputFields = [el].concat(_toConsumableArray(self._pendingInputFields));
|
|
1694
1703
|
}
|
|
1695
1704
|
},
|
|
1696
1705
|
clearPendingInputFields: function clearPendingInputFields() {
|
|
@@ -6902,7 +6911,7 @@ function ImagesGrid(_ref) {
|
|
|
6902
6911
|
});
|
|
6903
6912
|
}
|
|
6904
6913
|
|
|
6905
|
-
var _excluded$2 = ["inputField", "promptText", "inputType", "required", "placeholder", "options", "minSelections", "maxSelections"];
|
|
6914
|
+
var _excluded$2 = ["inputField", "promptText", "inputType", "required", "removeIfSkipped", "placeholder", "options", "minSelections", "maxSelections"];
|
|
6906
6915
|
var IMAGE_PLACEHOLDER_SRC = "data:image/svg+xml;charset=utf-8,".concat(encodeURIComponent("<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"400\" height=\"400\" viewBox=\"0 0 400 400\">\n <rect width=\"400\" height=\"400\" fill=\"#f0f2f5\" rx=\"12\"/>\n <rect x=\"110\" y=\"90\" width=\"180\" height=\"145\" rx=\"10\" fill=\"#dde1e7\"/>\n <circle cx=\"158\" cy=\"135\" r=\"22\" fill=\"#f0f2f5\"/>\n <polygon points=\"110,235 168,163 210,205 250,163 290,235\" fill=\"#c8cdd6\"/>\n <rect x=\"140\" y=\"268\" width=\"120\" height=\"14\" rx=\"7\" fill=\"#c8cdd6\"/>\n <rect x=\"160\" y=\"292\" width=\"80\" height=\"10\" rx=\"5\" fill=\"#dde1e7\"/>\n </svg>"));
|
|
6907
6916
|
|
|
6908
6917
|
// ── Date formatting helpers ──────────────────────────────────────────
|
|
@@ -7143,6 +7152,30 @@ var InputFieldsPanelContent = mobxReactLite.observer(function (_ref3) {
|
|
|
7143
7152
|
_useState30 = _slicedToArray(_useState29, 2),
|
|
7144
7153
|
listOptions = _useState30[0],
|
|
7145
7154
|
setListOptions = _useState30[1];
|
|
7155
|
+
var _useState31 = React.useState(false),
|
|
7156
|
+
_useState32 = _slicedToArray(_useState31, 2),
|
|
7157
|
+
textRemoveIfSkipped = _useState32[0],
|
|
7158
|
+
setTextRemoveIfSkipped = _useState32[1];
|
|
7159
|
+
var _useState33 = React.useState(false),
|
|
7160
|
+
_useState34 = _slicedToArray(_useState33, 2),
|
|
7161
|
+
dateRemoveIfSkipped = _useState34[0],
|
|
7162
|
+
setDateRemoveIfSkipped = _useState34[1];
|
|
7163
|
+
var _useState35 = React.useState(false),
|
|
7164
|
+
_useState36 = _slicedToArray(_useState35, 2),
|
|
7165
|
+
integerRemoveIfSkipped = _useState36[0],
|
|
7166
|
+
setIntegerRemoveIfSkipped = _useState36[1];
|
|
7167
|
+
var _useState37 = React.useState(false),
|
|
7168
|
+
_useState38 = _slicedToArray(_useState37, 2),
|
|
7169
|
+
imageRemoveIfSkipped = _useState38[0],
|
|
7170
|
+
setImageRemoveIfSkipped = _useState38[1];
|
|
7171
|
+
var _useState39 = React.useState(false),
|
|
7172
|
+
_useState40 = _slicedToArray(_useState39, 2),
|
|
7173
|
+
radioRemoveIfSkipped = _useState40[0],
|
|
7174
|
+
setRadioRemoveIfSkipped = _useState40[1];
|
|
7175
|
+
var _useState41 = React.useState(false),
|
|
7176
|
+
_useState42 = _slicedToArray(_useState41, 2),
|
|
7177
|
+
listRemoveIfSkipped = _useState42[0],
|
|
7178
|
+
setListRemoveIfSkipped = _useState42[1];
|
|
7146
7179
|
var addInputElement = function addInputElement(inputType) {
|
|
7147
7180
|
var extra = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
7148
7181
|
var page = store.activePage;
|
|
@@ -7162,7 +7195,8 @@ var InputFieldsPanelContent = mobxReactLite.observer(function (_ref3) {
|
|
|
7162
7195
|
inputType: 'image',
|
|
7163
7196
|
placeholder: t('sidePanel.inputFields.imagePlaceholder', 'Upload image'),
|
|
7164
7197
|
promptText: extra.promptText || t('sidePanel.inputFields.defaultImagePrompt', 'Please upload an image'),
|
|
7165
|
-
required: extra.required || false
|
|
7198
|
+
required: extra.required || false,
|
|
7199
|
+
removeIfSkipped: extra.removeIfSkipped || false
|
|
7166
7200
|
}
|
|
7167
7201
|
});
|
|
7168
7202
|
} else {
|
|
@@ -7218,7 +7252,8 @@ var InputFieldsPanelContent = mobxReactLite.observer(function (_ref3) {
|
|
|
7218
7252
|
inputType: inputType,
|
|
7219
7253
|
placeholder: placeholder,
|
|
7220
7254
|
promptText: extra.promptText || defaultPrompt,
|
|
7221
|
-
required: extra.required || false
|
|
7255
|
+
required: extra.required || false,
|
|
7256
|
+
removeIfSkipped: extra.removeIfSkipped || false
|
|
7222
7257
|
}, inputType === 'date' ? {
|
|
7223
7258
|
dateFormat: extra.dateFormat || 'MM-DD-YYYY'
|
|
7224
7259
|
} : {}), ['radio', 'list'].includes(inputType) ? {
|
|
@@ -7269,7 +7304,8 @@ var InputFieldsPanelContent = mobxReactLite.observer(function (_ref3) {
|
|
|
7269
7304
|
onClick: function onClick() {
|
|
7270
7305
|
return addInputElement('text', {
|
|
7271
7306
|
promptText: textPrompt,
|
|
7272
|
-
required: textRequired
|
|
7307
|
+
required: textRequired,
|
|
7308
|
+
removeIfSkipped: textRemoveIfSkipped
|
|
7273
7309
|
});
|
|
7274
7310
|
}
|
|
7275
7311
|
}), /*#__PURE__*/jsxRuntime.jsx(material.TextField, {
|
|
@@ -7304,6 +7340,23 @@ var InputFieldsPanelContent = mobxReactLite.observer(function (_ref3) {
|
|
|
7304
7340
|
sx: {
|
|
7305
7341
|
ml: 5.5
|
|
7306
7342
|
}
|
|
7343
|
+
}), !textRequired && /*#__PURE__*/jsxRuntime.jsx(material.FormControlLabel, {
|
|
7344
|
+
control: /*#__PURE__*/jsxRuntime.jsx(material.Checkbox, {
|
|
7345
|
+
size: "small",
|
|
7346
|
+
checked: textRemoveIfSkipped,
|
|
7347
|
+
onChange: function onChange(e) {
|
|
7348
|
+
return setTextRemoveIfSkipped(e.target.checked);
|
|
7349
|
+
}
|
|
7350
|
+
}),
|
|
7351
|
+
label: /*#__PURE__*/jsxRuntime.jsx(material.Typography, {
|
|
7352
|
+
sx: {
|
|
7353
|
+
fontSize: 12
|
|
7354
|
+
},
|
|
7355
|
+
children: t('sidePanel.inputFields.removeIfSkipped', 'Remove if skipped')
|
|
7356
|
+
}),
|
|
7357
|
+
sx: {
|
|
7358
|
+
ml: 5.5
|
|
7359
|
+
}
|
|
7307
7360
|
}), /*#__PURE__*/jsxRuntime.jsx(InputFieldCard, {
|
|
7308
7361
|
icon: /*#__PURE__*/jsxRuntime.jsx(CalendarTodayIcon, {
|
|
7309
7362
|
fontSize: "small"
|
|
@@ -7314,7 +7367,8 @@ var InputFieldsPanelContent = mobxReactLite.observer(function (_ref3) {
|
|
|
7314
7367
|
return addInputElement('date', {
|
|
7315
7368
|
dateFormat: dateFormat,
|
|
7316
7369
|
promptText: datePrompt,
|
|
7317
|
-
required: dateRequired
|
|
7370
|
+
required: dateRequired,
|
|
7371
|
+
removeIfSkipped: dateRemoveIfSkipped
|
|
7318
7372
|
});
|
|
7319
7373
|
}
|
|
7320
7374
|
}), /*#__PURE__*/jsxRuntime.jsx(material.TextField, {
|
|
@@ -7349,6 +7403,23 @@ var InputFieldsPanelContent = mobxReactLite.observer(function (_ref3) {
|
|
|
7349
7403
|
sx: {
|
|
7350
7404
|
ml: 5.5
|
|
7351
7405
|
}
|
|
7406
|
+
}), !dateRequired && /*#__PURE__*/jsxRuntime.jsx(material.FormControlLabel, {
|
|
7407
|
+
control: /*#__PURE__*/jsxRuntime.jsx(material.Checkbox, {
|
|
7408
|
+
size: "small",
|
|
7409
|
+
checked: dateRemoveIfSkipped,
|
|
7410
|
+
onChange: function onChange(e) {
|
|
7411
|
+
return setDateRemoveIfSkipped(e.target.checked);
|
|
7412
|
+
}
|
|
7413
|
+
}),
|
|
7414
|
+
label: /*#__PURE__*/jsxRuntime.jsx(material.Typography, {
|
|
7415
|
+
sx: {
|
|
7416
|
+
fontSize: 12
|
|
7417
|
+
},
|
|
7418
|
+
children: t('sidePanel.inputFields.removeIfSkipped', 'Remove if skipped')
|
|
7419
|
+
}),
|
|
7420
|
+
sx: {
|
|
7421
|
+
ml: 5.5
|
|
7422
|
+
}
|
|
7352
7423
|
}), /*#__PURE__*/jsxRuntime.jsxs(material.FormControl, {
|
|
7353
7424
|
size: "small",
|
|
7354
7425
|
sx: {
|
|
@@ -7388,7 +7459,8 @@ var InputFieldsPanelContent = mobxReactLite.observer(function (_ref3) {
|
|
|
7388
7459
|
onClick: function onClick() {
|
|
7389
7460
|
return addInputElement('integer', {
|
|
7390
7461
|
promptText: integerPrompt,
|
|
7391
|
-
required: integerRequired
|
|
7462
|
+
required: integerRequired,
|
|
7463
|
+
removeIfSkipped: integerRemoveIfSkipped
|
|
7392
7464
|
});
|
|
7393
7465
|
}
|
|
7394
7466
|
}), /*#__PURE__*/jsxRuntime.jsx(material.TextField, {
|
|
@@ -7423,6 +7495,23 @@ var InputFieldsPanelContent = mobxReactLite.observer(function (_ref3) {
|
|
|
7423
7495
|
sx: {
|
|
7424
7496
|
ml: 5.5
|
|
7425
7497
|
}
|
|
7498
|
+
}), !integerRequired && /*#__PURE__*/jsxRuntime.jsx(material.FormControlLabel, {
|
|
7499
|
+
control: /*#__PURE__*/jsxRuntime.jsx(material.Checkbox, {
|
|
7500
|
+
size: "small",
|
|
7501
|
+
checked: integerRemoveIfSkipped,
|
|
7502
|
+
onChange: function onChange(e) {
|
|
7503
|
+
return setIntegerRemoveIfSkipped(e.target.checked);
|
|
7504
|
+
}
|
|
7505
|
+
}),
|
|
7506
|
+
label: /*#__PURE__*/jsxRuntime.jsx(material.Typography, {
|
|
7507
|
+
sx: {
|
|
7508
|
+
fontSize: 12
|
|
7509
|
+
},
|
|
7510
|
+
children: t('sidePanel.inputFields.removeIfSkipped', 'Remove if skipped')
|
|
7511
|
+
}),
|
|
7512
|
+
sx: {
|
|
7513
|
+
ml: 5.5
|
|
7514
|
+
}
|
|
7426
7515
|
}), /*#__PURE__*/jsxRuntime.jsx(InputFieldCard, {
|
|
7427
7516
|
icon: /*#__PURE__*/jsxRuntime.jsx(ImageIcon, {
|
|
7428
7517
|
fontSize: "small"
|
|
@@ -7432,7 +7521,8 @@ var InputFieldsPanelContent = mobxReactLite.observer(function (_ref3) {
|
|
|
7432
7521
|
onClick: function onClick() {
|
|
7433
7522
|
return addInputElement('image', {
|
|
7434
7523
|
promptText: imagePrompt,
|
|
7435
|
-
required: imageRequired
|
|
7524
|
+
required: imageRequired,
|
|
7525
|
+
removeIfSkipped: imageRemoveIfSkipped
|
|
7436
7526
|
});
|
|
7437
7527
|
}
|
|
7438
7528
|
}), /*#__PURE__*/jsxRuntime.jsx(material.TextField, {
|
|
@@ -7467,6 +7557,23 @@ var InputFieldsPanelContent = mobxReactLite.observer(function (_ref3) {
|
|
|
7467
7557
|
sx: {
|
|
7468
7558
|
ml: 5.5
|
|
7469
7559
|
}
|
|
7560
|
+
}), !imageRequired && /*#__PURE__*/jsxRuntime.jsx(material.FormControlLabel, {
|
|
7561
|
+
control: /*#__PURE__*/jsxRuntime.jsx(material.Checkbox, {
|
|
7562
|
+
size: "small",
|
|
7563
|
+
checked: imageRemoveIfSkipped,
|
|
7564
|
+
onChange: function onChange(e) {
|
|
7565
|
+
return setImageRemoveIfSkipped(e.target.checked);
|
|
7566
|
+
}
|
|
7567
|
+
}),
|
|
7568
|
+
label: /*#__PURE__*/jsxRuntime.jsx(material.Typography, {
|
|
7569
|
+
sx: {
|
|
7570
|
+
fontSize: 12
|
|
7571
|
+
},
|
|
7572
|
+
children: t('sidePanel.inputFields.removeIfSkipped', 'Remove if skipped')
|
|
7573
|
+
}),
|
|
7574
|
+
sx: {
|
|
7575
|
+
ml: 5.5
|
|
7576
|
+
}
|
|
7470
7577
|
}), /*#__PURE__*/jsxRuntime.jsx(InputFieldCard, {
|
|
7471
7578
|
icon: /*#__PURE__*/jsxRuntime.jsx(RadioButtonCheckedIcon, {
|
|
7472
7579
|
fontSize: "small"
|
|
@@ -7477,7 +7584,8 @@ var InputFieldsPanelContent = mobxReactLite.observer(function (_ref3) {
|
|
|
7477
7584
|
return addInputElement('radio', {
|
|
7478
7585
|
promptText: radioPrompt,
|
|
7479
7586
|
required: radioRequired,
|
|
7480
|
-
options: radioOptions
|
|
7587
|
+
options: radioOptions,
|
|
7588
|
+
removeIfSkipped: radioRemoveIfSkipped
|
|
7481
7589
|
});
|
|
7482
7590
|
}
|
|
7483
7591
|
}), /*#__PURE__*/jsxRuntime.jsx(material.TextField, {
|
|
@@ -7512,6 +7620,23 @@ var InputFieldsPanelContent = mobxReactLite.observer(function (_ref3) {
|
|
|
7512
7620
|
sx: {
|
|
7513
7621
|
ml: 5.5
|
|
7514
7622
|
}
|
|
7623
|
+
}), !radioRequired && /*#__PURE__*/jsxRuntime.jsx(material.FormControlLabel, {
|
|
7624
|
+
control: /*#__PURE__*/jsxRuntime.jsx(material.Checkbox, {
|
|
7625
|
+
size: "small",
|
|
7626
|
+
checked: radioRemoveIfSkipped,
|
|
7627
|
+
onChange: function onChange(e) {
|
|
7628
|
+
return setRadioRemoveIfSkipped(e.target.checked);
|
|
7629
|
+
}
|
|
7630
|
+
}),
|
|
7631
|
+
label: /*#__PURE__*/jsxRuntime.jsx(material.Typography, {
|
|
7632
|
+
sx: {
|
|
7633
|
+
fontSize: 12
|
|
7634
|
+
},
|
|
7635
|
+
children: t('sidePanel.inputFields.removeIfSkipped', 'Remove if skipped')
|
|
7636
|
+
}),
|
|
7637
|
+
sx: {
|
|
7638
|
+
ml: 5.5
|
|
7639
|
+
}
|
|
7515
7640
|
}), /*#__PURE__*/jsxRuntime.jsx(OptionsEditor, {
|
|
7516
7641
|
options: radioOptions,
|
|
7517
7642
|
onChange: setRadioOptions
|
|
@@ -7526,7 +7651,8 @@ var InputFieldsPanelContent = mobxReactLite.observer(function (_ref3) {
|
|
|
7526
7651
|
promptText: listPrompt,
|
|
7527
7652
|
minSelections: listMinSelections,
|
|
7528
7653
|
maxSelections: listMaxSelections,
|
|
7529
|
-
options: listOptions
|
|
7654
|
+
options: listOptions,
|
|
7655
|
+
removeIfSkipped: listRemoveIfSkipped
|
|
7530
7656
|
});
|
|
7531
7657
|
}
|
|
7532
7658
|
}), /*#__PURE__*/jsxRuntime.jsx(material.TextField, {
|
|
@@ -7599,6 +7725,23 @@ var InputFieldsPanelContent = mobxReactLite.observer(function (_ref3) {
|
|
|
7599
7725
|
fontSize: 10
|
|
7600
7726
|
},
|
|
7601
7727
|
children: listMinSelections > 0 ? "Required \xB7 min ".concat(listMinSelections).concat(listMaxSelections > 0 ? ", max ".concat(listMaxSelections) : ', no max') : "Optional \xB7 max ".concat(listMaxSelections > 0 ? listMaxSelections : '∞')
|
|
7728
|
+
}), listMinSelections === 0 && /*#__PURE__*/jsxRuntime.jsx(material.FormControlLabel, {
|
|
7729
|
+
control: /*#__PURE__*/jsxRuntime.jsx(material.Checkbox, {
|
|
7730
|
+
size: "small",
|
|
7731
|
+
checked: listRemoveIfSkipped,
|
|
7732
|
+
onChange: function onChange(e) {
|
|
7733
|
+
return setListRemoveIfSkipped(e.target.checked);
|
|
7734
|
+
}
|
|
7735
|
+
}),
|
|
7736
|
+
label: /*#__PURE__*/jsxRuntime.jsx(material.Typography, {
|
|
7737
|
+
sx: {
|
|
7738
|
+
fontSize: 12
|
|
7739
|
+
},
|
|
7740
|
+
children: t('sidePanel.inputFields.removeIfSkipped', 'Remove if skipped')
|
|
7741
|
+
}),
|
|
7742
|
+
sx: {
|
|
7743
|
+
ml: 5.5
|
|
7744
|
+
}
|
|
7602
7745
|
})]
|
|
7603
7746
|
}), /*#__PURE__*/jsxRuntime.jsx(material.Divider, {
|
|
7604
7747
|
sx: {
|
|
@@ -7631,30 +7774,34 @@ var InputFieldsPanelContent = mobxReactLite.observer(function (_ref3) {
|
|
|
7631
7774
|
var MarkAsVariableForm = mobxReactLite.observer(function (_ref4) {
|
|
7632
7775
|
var _selectedElement$cust;
|
|
7633
7776
|
var store = _ref4.store;
|
|
7634
|
-
var
|
|
7635
|
-
|
|
7636
|
-
markLabel =
|
|
7637
|
-
setMarkLabel =
|
|
7638
|
-
var
|
|
7639
|
-
|
|
7640
|
-
markRequired =
|
|
7641
|
-
setMarkRequired =
|
|
7642
|
-
var
|
|
7643
|
-
|
|
7644
|
-
markInputType =
|
|
7645
|
-
setMarkInputType =
|
|
7646
|
-
var
|
|
7647
|
-
|
|
7648
|
-
markOptions =
|
|
7649
|
-
setMarkOptions =
|
|
7650
|
-
var
|
|
7651
|
-
|
|
7652
|
-
markMinSelections =
|
|
7653
|
-
setMarkMinSelections =
|
|
7654
|
-
var
|
|
7655
|
-
|
|
7656
|
-
markMaxSelections =
|
|
7657
|
-
setMarkMaxSelections =
|
|
7777
|
+
var _useState43 = React.useState(''),
|
|
7778
|
+
_useState44 = _slicedToArray(_useState43, 2),
|
|
7779
|
+
markLabel = _useState44[0],
|
|
7780
|
+
setMarkLabel = _useState44[1];
|
|
7781
|
+
var _useState45 = React.useState(false),
|
|
7782
|
+
_useState46 = _slicedToArray(_useState45, 2),
|
|
7783
|
+
markRequired = _useState46[0],
|
|
7784
|
+
setMarkRequired = _useState46[1];
|
|
7785
|
+
var _useState47 = React.useState('text'),
|
|
7786
|
+
_useState48 = _slicedToArray(_useState47, 2),
|
|
7787
|
+
markInputType = _useState48[0],
|
|
7788
|
+
setMarkInputType = _useState48[1];
|
|
7789
|
+
var _useState49 = React.useState(['Option 1', 'Option 2']),
|
|
7790
|
+
_useState50 = _slicedToArray(_useState49, 2),
|
|
7791
|
+
markOptions = _useState50[0],
|
|
7792
|
+
setMarkOptions = _useState50[1];
|
|
7793
|
+
var _useState51 = React.useState(0),
|
|
7794
|
+
_useState52 = _slicedToArray(_useState51, 2),
|
|
7795
|
+
markMinSelections = _useState52[0],
|
|
7796
|
+
setMarkMinSelections = _useState52[1];
|
|
7797
|
+
var _useState53 = React.useState(2),
|
|
7798
|
+
_useState54 = _slicedToArray(_useState53, 2),
|
|
7799
|
+
markMaxSelections = _useState54[0],
|
|
7800
|
+
setMarkMaxSelections = _useState54[1];
|
|
7801
|
+
var _useState55 = React.useState(false),
|
|
7802
|
+
_useState56 = _slicedToArray(_useState55, 2),
|
|
7803
|
+
markRemoveIfSkipped = _useState56[0],
|
|
7804
|
+
setMarkRemoveIfSkipped = _useState56[1];
|
|
7658
7805
|
var selectedIds = store.selectedElementsIds || [];
|
|
7659
7806
|
var selectedElement = selectedIds.length === 1 ? store.getElementById(selectedIds[0]) : null;
|
|
7660
7807
|
var isImageElement = (selectedElement === null || selectedElement === void 0 ? void 0 : selectedElement.type) === 'image';
|
|
@@ -7663,13 +7810,14 @@ var MarkAsVariableForm = mobxReactLite.observer(function (_ref4) {
|
|
|
7663
7810
|
var isAlreadyVariable = !!(selectedElement !== null && selectedElement !== void 0 && (_selectedElement$cust = selectedElement.custom) !== null && _selectedElement$cust !== void 0 && _selectedElement$cust.inputField);
|
|
7664
7811
|
React.useEffect(function () {
|
|
7665
7812
|
if (selectedElement && isSupportedElement) {
|
|
7666
|
-
var _selectedElement$cust2, _selectedElement$cust3, _selectedElement$cust4, _selectedElement$cust5, _selectedElement$cust6, _selectedElement$cust7;
|
|
7813
|
+
var _selectedElement$cust2, _selectedElement$cust3, _selectedElement$cust4, _selectedElement$cust5, _selectedElement$cust6, _selectedElement$cust7, _selectedElement$cust8;
|
|
7667
7814
|
setMarkLabel(((_selectedElement$cust2 = selectedElement.custom) === null || _selectedElement$cust2 === void 0 ? void 0 : _selectedElement$cust2.promptText) || '');
|
|
7668
7815
|
setMarkRequired(!!((_selectedElement$cust3 = selectedElement.custom) !== null && _selectedElement$cust3 !== void 0 && _selectedElement$cust3.required));
|
|
7669
7816
|
setMarkInputType(isImageElement ? 'image' : ((_selectedElement$cust4 = selectedElement.custom) === null || _selectedElement$cust4 === void 0 ? void 0 : _selectedElement$cust4.inputType) || 'text');
|
|
7670
7817
|
setMarkOptions(((_selectedElement$cust5 = selectedElement.custom) === null || _selectedElement$cust5 === void 0 ? void 0 : _selectedElement$cust5.options) || ['Option 1', 'Option 2']);
|
|
7671
7818
|
setMarkMinSelections(((_selectedElement$cust6 = selectedElement.custom) === null || _selectedElement$cust6 === void 0 ? void 0 : _selectedElement$cust6.minSelections) || 0);
|
|
7672
7819
|
setMarkMaxSelections(((_selectedElement$cust7 = selectedElement.custom) === null || _selectedElement$cust7 === void 0 ? void 0 : _selectedElement$cust7.maxSelections) || 2);
|
|
7820
|
+
setMarkRemoveIfSkipped(!!((_selectedElement$cust8 = selectedElement.custom) !== null && _selectedElement$cust8 !== void 0 && _selectedElement$cust8.removeIfSkipped));
|
|
7673
7821
|
} else {
|
|
7674
7822
|
setMarkLabel('');
|
|
7675
7823
|
setMarkRequired(false);
|
|
@@ -7677,6 +7825,7 @@ var MarkAsVariableForm = mobxReactLite.observer(function (_ref4) {
|
|
|
7677
7825
|
setMarkOptions(['Option 1', 'Option 2']);
|
|
7678
7826
|
setMarkMinSelections(0);
|
|
7679
7827
|
setMarkMaxSelections(2);
|
|
7828
|
+
setMarkRemoveIfSkipped(false);
|
|
7680
7829
|
}
|
|
7681
7830
|
}, [selectedElement === null || selectedElement === void 0 ? void 0 : selectedElement.id]);
|
|
7682
7831
|
var handleMark = function handleMark() {
|
|
@@ -7687,7 +7836,8 @@ var MarkAsVariableForm = mobxReactLite.observer(function (_ref4) {
|
|
|
7687
7836
|
inputField: true,
|
|
7688
7837
|
promptText: markLabel.trim(),
|
|
7689
7838
|
inputType: effectiveType,
|
|
7690
|
-
required: markRequired
|
|
7839
|
+
required: markRequired,
|
|
7840
|
+
removeIfSkipped: !markRequired && markRemoveIfSkipped
|
|
7691
7841
|
}, ['radio', 'list'].includes(effectiveType) ? {
|
|
7692
7842
|
options: markOptions.filter(Boolean)
|
|
7693
7843
|
} : {}), effectiveType === 'list' ? {
|
|
@@ -7704,6 +7854,7 @@ var MarkAsVariableForm = mobxReactLite.observer(function (_ref4) {
|
|
|
7704
7854
|
_ref5.promptText;
|
|
7705
7855
|
_ref5.inputType;
|
|
7706
7856
|
_ref5.required;
|
|
7857
|
+
_ref5.removeIfSkipped;
|
|
7707
7858
|
_ref5.placeholder;
|
|
7708
7859
|
_ref5.options;
|
|
7709
7860
|
_ref5.minSelections;
|
|
@@ -7924,6 +8075,20 @@ var MarkAsVariableForm = mobxReactLite.observer(function (_ref4) {
|
|
|
7924
8075
|
},
|
|
7925
8076
|
children: t('sidePanel.inputFields.required', 'Required')
|
|
7926
8077
|
})
|
|
8078
|
+
}), !markRequired && /*#__PURE__*/jsxRuntime.jsx(material.FormControlLabel, {
|
|
8079
|
+
control: /*#__PURE__*/jsxRuntime.jsx(material.Checkbox, {
|
|
8080
|
+
size: "small",
|
|
8081
|
+
checked: markRemoveIfSkipped,
|
|
8082
|
+
onChange: function onChange(e) {
|
|
8083
|
+
return setMarkRemoveIfSkipped(e.target.checked);
|
|
8084
|
+
}
|
|
8085
|
+
}),
|
|
8086
|
+
label: /*#__PURE__*/jsxRuntime.jsx(material.Typography, {
|
|
8087
|
+
sx: {
|
|
8088
|
+
fontSize: 12
|
|
8089
|
+
},
|
|
8090
|
+
children: t('sidePanel.inputFields.removeIfSkipped', 'Remove if skipped')
|
|
8091
|
+
})
|
|
7927
8092
|
}), /*#__PURE__*/jsxRuntime.jsx(material.Button, {
|
|
7928
8093
|
variant: "contained",
|
|
7929
8094
|
size: "small",
|
|
@@ -8065,6 +8230,21 @@ function _loadGoogleFont() {
|
|
|
8065
8230
|
var DEFAULT_FONTS = ['ABeeZee', 'Abel', 'Abhaya Libre', 'Abril Fatface', 'Aclonica', 'Acme', 'Actor', 'Adamina', 'Advent Pro', 'Aguafina Script', 'Akronim', 'Aladin', 'Alata', 'Alatsi', 'Albert Sans', 'Aldrich', 'Alef', 'Alegreya', 'Alegreya Sans', 'Alegreya Sans SC', 'Alegreya SC', 'Aleo', 'Alex Brush', 'Alfa Slab One', 'Alice', 'Alike', 'Alike Angular', 'Allan', 'Allerta', 'Allerta Stencil', 'Allison', 'Allura', 'Almarai', 'Almendra', 'Almendra Display', 'Almendra SC', 'Alumni Sans', 'Alumni Sans Inline One', 'Amarante', 'Amaranth', 'Amatic SC', 'Amethysta', 'Amiko', 'Amiri', 'Amita', 'Anaheim', 'Andada Pro', 'Andika', 'Anek Bangla', 'Anek Devanagari', 'Anek Gujarati', 'Anek Gurmukhi', 'Anek Kannada', 'Anek Latin', 'Anek Malayalam', 'Anek Odia', 'Anek Tamil', 'Anek Telugu', 'Angkor', 'Annie Use Your Telescope', 'Anonymous Pro', 'Antic', 'Antic Didone', 'Antic Slab', 'Anton', 'Antonio', 'Anybody', 'Arapey', 'Arbutus', 'Arbutus Slab', 'Architects Daughter', 'Archivo', 'Archivo Black', 'Archivo Narrow', 'Are You Serious', 'Aref Ruqaa', 'Arima', 'Arimo', 'Arizonia', 'Armata', 'Arsenal', 'Artifika', 'Arvo', 'Arya', 'Asap', 'Asap Condensed', 'Asar', 'Asset', 'Assistant', 'Astloch', 'Asul', 'Athiti', 'Atkinson Hyperlegible', 'Atma', 'Atomic Age', 'Aubrey', 'Audiowide', 'Autour One', 'Average', 'Average Sans', 'Averia Gruesa Libre', 'Averia Libre', 'Averia Sans Libre', 'Averia Serif Libre', 'Azeret Mono', 'B612', 'B612 Mono', 'Bad Script', 'Bahiana', 'Bahianita', 'Bai Jamjuree', 'Bakbak One', 'Ballet', 'Baloo 2', 'Baloo Bhai 2', 'Baloo Bhaijaan 2', 'Baloo Bhaina 2', 'Baloo Chettan 2', 'Baloo Da 2', 'Baloo Paaji 2', 'Baloo Tamma 2', 'Baloo Tammudu 2', 'Baloo Thambi 2', 'Balsamiq Sans', 'Balthazar', 'Bangers', 'Barlow', 'Barlow Condensed', 'Barlow Semi Condensed', 'Barriecito', 'Barrio', 'Basic', 'Baskervville', 'Battambang', 'Baumans', 'Bayon', 'Be Vietnam Pro', 'Beau Rivage', 'Bebas Neue', 'Belgrano', 'Bellefair', 'Belleza', 'Bellota', 'Bellota Text', 'BenchNine', 'Benne', 'Bentham', 'Berkshire Swash', 'Besley', 'Beth Ellen', 'Bevan', 'BIZ UDGothic', 'BIZ UDMincho', 'BIZ UDPGothic', 'BIZ UDPMincho', 'Big Shoulders Display', 'Big Shoulders Inline Display', 'Big Shoulders Inline Text', 'Big Shoulders Stencil Display', 'Big Shoulders Stencil Text', 'Big Shoulders Text', 'Bigelow Rules', 'Bigshot One', 'Bilbo', 'Bilbo Swash Caps', 'BioRhyme', 'BioRhyme Expanded', 'Birthstone', 'Birthstone Bounce', 'Bitter', 'Black And White Picture', 'Black Han Sans', 'Black Ops One', 'Blaka', 'Blaka Hollow', 'Blaka Ink', 'Blinker', 'Bodoni Moda', 'Bokor', 'Bona Nova', 'Bonbon', 'Bonheur Royale', 'Boogaloo', 'Bowlby One', 'Bowlby One SC', 'Brawler', 'Bree Serif', 'Brygada 1918', 'Bubblegum Sans', 'Bubbler One', 'Buda', 'Buenard', 'Bungee', 'Bungee Hairline', 'Bungee Inline', 'Bungee Outline', 'Bungee Shade', 'Bungee Spice', 'Butcherman', 'Butterfly Kids', 'Cabin', 'Cabin Condensed', 'Cabin Sketch', 'Caesar Dressing', 'Cagliostro', 'Cairo', 'Cairo Play', 'Caladea', 'Calistoga', 'Calligraffitti', 'Cambay', 'Cambo', 'Candal', 'Cantarell', 'Cantata One', 'Cantora One', 'Caprasimo', 'Capriola', 'Caramel', 'Carattere', 'Cardo', 'Carlito', 'Carme', 'Carrois Gothic', 'Carrois Gothic SC', 'Carter One', 'Castoro', 'Catamaran', 'Caudex', 'Caveat', 'Caveat Brush', 'Cedarville Cursive', 'Ceviche One', 'Chakra Petch', 'Changa', 'Changa One', 'Chango', 'Charis SIL', 'Charm', 'Charmonman', 'Chathura', 'Chau Philomene One', 'Chela One', 'Chelsea Market', 'Chenla', 'Cherry Bomb One', 'Cherry Cream Soda', 'Cherry Swash', 'Chewy', 'Chicle', 'Chilanka', 'Chivo', 'Chivo Mono', 'Chonburi', 'Cinzel', 'Cinzel Decorative', 'Clicker Script', 'Coda', 'Coda Caption', 'Codystar', 'Coiny', 'Combo', 'Comfortaa', 'Comforter', 'Comforter Brush', 'Comic Neue', 'Coming Soon', 'Commissioner', 'Concert One', 'Condiment', 'Content', 'Contrail One', 'Convergence', 'Cookie', 'Copse', 'Corben', 'Corinthia', 'Cormorant', 'Cormorant Garamond', 'Cormorant Infant', 'Cormorant SC', 'Cormorant Unicase', 'Cormorant Upright', 'Courgette', 'Courier Prime', 'Cousine', 'Coustard', 'Covered By Your Grace', 'Crafty Girls', 'Creepster', 'Crete Round', 'Crimson Pro', 'Crimson Text', 'Croissant One', 'Crushed', 'Cuprum', 'Cute Font', 'Cutive', 'Cutive Mono', 'DM Mono', 'DM Sans', 'DM Serif Display', 'DM Serif Text', 'Damion', 'Dancing Script', 'Dangrek', 'Darker Grotesque', 'David Libre', 'Dawning of a New Day', 'Days One', 'Dekko', 'Dela Gothic One', 'Delius', 'Delius Swash Caps', 'Delius Unicase', 'Della Respira', 'Denk One', 'Devonshire', 'Dhurjati', 'Didact Gothic', 'Diplomata', 'Diplomata SC', 'Do Hyeon', 'Dokdo', 'Domine', 'Donegal One', 'Dongle', 'Doppio One', 'Dorsa', 'Dosis', 'DotGothic16', 'Dr Sugiyama', 'Duru Sans', 'DynaPuff', 'Dynalight', 'EB Garamond', 'Eagle Lake', 'East Sea Dokdo', 'Eater', 'Economica', 'Eczar', 'El Messiri', 'Electrolize', 'Elsie', 'Elsie Swash Caps', 'Emblema One', 'Emilys Candy', 'Encode Sans', 'Encode Sans Condensed', 'Encode Sans Expanded', 'Encode Sans SC', 'Encode Sans Semi Condensed', 'Encode Sans Semi Expanded', 'Engagement', 'Englebert', 'Enriqueta', 'Ephesis', 'Epilogue', 'Erica One', 'Esteban', 'Estonia', 'Euphoria Script', 'Ewert', 'Exo', 'Exo 2', 'Expletus Sans', 'Explora', 'Fahkwang', 'Familjen Grotesk', 'Fanwood Text', 'Farro', 'Farsan', 'Fascinate', 'Fascinate Inline', 'Faster One', 'Fasthand', 'Fauna One', 'Faustina', 'Federant', 'Federo', 'Felipa', 'Fenix', 'Festive', 'Finger Paint', 'Finlandica', 'Fira Code', 'Fira Mono', 'Fira Sans', 'Fira Sans Condensed', 'Fira Sans Extra Condensed', 'Fjalla One', 'Fjord One', 'Flamenco', 'Flavors', 'Fleur De Leah', 'Flow Block', 'Flow Circular', 'Flow Rounded', 'Fondamento', 'Fontdiner Swanky', 'Forum', 'Fragment Mono', 'Francois One', 'Frank Ruhl Libre', 'Fraunces', 'Freckle Face', 'Fredericka the Great', 'Fredoka', 'Freehand', 'Fresca', 'Frijole', 'Fruktur', 'Fugaz One', 'Fuggles', 'Fuzzy Bubbles', 'GFS Didot', 'GFS Neohellenic', 'Gabriela', 'Gaegu', 'Gafata', 'Galada', 'Galdeano', 'Galindo', 'Gamja Flower', 'Gantari', 'Gas', 'Gayathri', 'Gelasio', 'Gemunu Libre', 'Genos', 'Gentium Book Plus', 'Gentium Plus', 'Geo', 'Georama', 'Geostar', 'Geostar Fill', 'Germania One', 'Gideon Roman', 'Gidugu', 'Gilda Display', 'Girassol', 'Give You Glory', 'Glass Antiqua', 'Glegoo', 'Gloria Hallelujah', 'Glory', 'Gluten', 'Goblin One', 'Gochi Hand', 'Goldman', 'Goldplay', 'Golos Text', 'Gorditas', 'Gothic A1', 'Gotu', 'Goudy Bookletter 1911', 'Gowun Batang', 'Gowun Dodum', 'Graduate', 'Grand Hotel', 'Grandstander', 'Grape Nuts', 'Gravitas One', 'Great Vibes', 'Grechen Fuemen', 'Grenze', 'Grenze Gotisch', 'Grey Qo', 'Griffy', 'Gruppo', 'Gudea', 'Gugi', 'Gulzar', 'Gupter', 'Gurajada', 'Gwendolyn', 'Habibi', 'Hachi Maru Pop', 'Hahmlet', 'Halant', 'Hammersmith One', 'Hanalei', 'Hanalei Fill', 'Handlee', 'Hanken Grotesk', 'Hanuman', 'Happy Monkey', 'Harmattan', 'Headland One', 'Heebo', 'Henny Penny', 'Hepta Slab', 'Herr Von Muellerhoff', 'Hi Melody', 'Hina Mincho', 'Hind', 'Hind Guntur', 'Hind Madurai', 'Hind Siliguri', 'Hind Vadodara', 'Holtwood One SC', 'Homemade Apple', 'Homenaje', 'Hubballi', 'Hurricane', 'IBM Plex Mono', 'IBM Plex Sans', 'IBM Plex Sans Arabic', 'IBM Plex Sans Condensed', 'IBM Plex Sans Devanagari', 'IBM Plex Sans Hebrew', 'IBM Plex Sans JP', 'IBM Plex Sans KR', 'IBM Plex Sans Thai', 'IBM Plex Sans Thai Looped', 'IBM Plex Serif', 'Iceberg', 'Iceland', 'Imbue', 'Imperial Script', 'Imprima', 'Inconsolata', 'Inder', 'Indie Flower', 'Ingrid Darling', 'Inika', 'Inknut Antiqua', 'Inria Sans', 'Inria Serif', 'Inspiration', 'Inter', 'Inter Tight', 'Irish Grover', 'Island Moments', 'Istok Web', 'Italiana', 'Italianno', 'Itim', 'Jacques Francois', 'Jacques Francois Shadow', 'Jaldi', 'JetBrains Mono', 'Jim Nightshade', 'Joan', 'Jockey One', 'Jolly Lodger', 'Jomhuria', 'Jomolhari', 'Josefin Sans', 'Josefin Slab', 'Jost', 'Joti One', 'Jua', 'Judson', 'Julee', 'Julius Sans One', 'Junge', 'Jura', 'K2D', 'Kadwa', 'Kaisei Decol', 'Kaisei HarunoUmi', 'Kaisei Opti', 'Kaisei Tokumin', 'Kalam', 'Kameron', 'Kanit', 'Kantumruy Pro', 'Karantina', 'Karla', 'Karma', 'Katibeh', 'Kaushan Script', 'Kavivanar', 'Kavoon', 'Kdam Thmor Pro', 'Keania One', 'Kelly Slab', 'Kenia', 'Khand', 'Khmer', 'Khula', 'Kings', 'Kirang Haerang', 'Kite One', 'Kiwi Maru', 'Klee One', 'Knewave', 'KoHo', 'Kodchasan', 'Koh Santepheap', 'Kolker Brush', 'Konkhmer Sleokchher', 'Kosugi', 'Kosugi Maru', 'Kotta One', 'Koulen', 'Kranky', 'Kreon', 'Kristi', 'Krona One', 'Krub', 'Kufam', 'Kulim Park', 'Kumar One', 'Kumar One Outline', 'Kumbh Sans', 'Kurale', 'La Belle Aurore', 'Lacquer', 'Laila', 'Lakki Reddy', 'Lalezar', 'Lancelot', 'Langar', 'Lango', 'Lateef', 'Lato', 'Lavishly Yours', 'League Gothic', 'League Script', 'League Spartan', 'Leckerli One', 'Ledger', 'Lekton', 'Lemon', 'Lemonada', 'Lexend', 'Lexend Deca', 'Lexend Exa', 'Lexend Giga', 'Lexend Mega', 'Lexend Peta', 'Lexend Tera', 'Lexend Zetta', 'Libre Barcode 128', 'Libre Barcode 128 Text', 'Libre Barcode 39', 'Libre Barcode 39 Extended', 'Libre Barcode 39 Extended Text', 'Libre Barcode 39 Text', 'Libre Barcode EAN13 Text', 'Libre Baskerville', 'Libre Bodoni', 'Libre Caslon Display', 'Libre Caslon Text', 'Libre Franklin', 'Licorice', 'Life Savers', 'Lilita One', 'Lily Script One', 'Limelight', 'Linden Hill', 'Lingua Franca', 'Literata', 'Liu Jian Mao Cao', 'Livvic', 'Lobster', 'Lobster Two', 'Londrina Outline', 'Londrina Shadow', 'Londrina Sketch', 'Londrina Solid', 'Long Cang', 'Lora', 'Love Light', 'Love Ya Like A Sister', 'Loved by the King', 'Lovers Quarrel', 'Luckiest Guy', 'Lusitana', 'Lustria', 'Luxurious Roman', 'Luxurious Script', 'M PLUS 1', 'M PLUS 1 Code', 'M PLUS 1p', 'M PLUS 2', 'M PLUS Code Latin', 'M PLUS Rounded 1c', 'Ma Shan Zheng', 'Macondo', 'Macondo Swash Caps', 'Mada', 'Magra', 'Maiden Orange', 'Maitree', 'Major Mono Display', 'Mako', 'Mali', 'Mallanna', 'Mandali', 'Manjari', 'Manrope', 'Mansalva', 'Manuale', 'Marcellus', 'Marcellus SC', 'Marck Script', 'Margarine', 'Marhey', 'Markazi Text', 'Marko One', 'Marmelad', 'Martel', 'Martel Sans', 'Marvel', 'Mate', 'Mate SC', 'Maven Pro', 'McLaren', 'Mea Culpa', 'Meddon', 'MedievalSharp', 'Medula One', 'Meera Inimai', 'Megrim', 'Meie Script', 'Meow Script', 'Merienda', 'Merriweather', 'Merriweather Sans', 'Metal', 'Metal Mania', 'Metamorphous', 'Metrophobic', 'Michroma', 'Milonga', 'Miltonian', 'Miltonian Tattoo', 'Mina', 'Miniver', 'Miriam Libre', 'Mirza', 'Miss Fajardose', 'Mitr', 'Mochiy Pop One', 'Mochiy Pop P One', 'Modak', 'Modern Antiqua', 'Mogra', 'Mohave', 'Moirai One', 'Molengo', 'Molle', 'Monda', 'Monofett', 'Monoton', 'Monsieur La Doulaise', 'Montaga', 'Montagu Slab', 'MonteCarlo', 'Montez', 'Montserrat', 'Montserrat Alternates', 'Montserrat Subrayada', 'Moon Dance', 'Moul', 'Moulpali', 'Mountains of Christmas', 'Mouse Memoirs', 'Mr Bedfort', 'Mr Dafoe', 'Mr De Haviland', 'Mrs Saint Delafield', 'Mrs Sheppards', 'Mukta', 'Mukta Mahee', 'Mukta Malar', 'Mukta Vaani', 'Mulish', 'Murecho', 'MuseoModerno', 'My Soul', 'Mynerve', 'Mystery Quest', 'NTR', 'Nabla', 'Nanum Brush Script', 'Nanum Gothic', 'Nanum Gothic Coding', 'Nanum Myeongjo', 'Nanum Pen Script', 'Neonderthaw', 'Nerko One', 'Neucha', 'Neuton', 'New Rocker', 'New Tegomin', 'News Cycle', 'Newsreader', 'Niconne', 'Niramit', 'Nixie One', 'Nobile', 'Nokora', 'Norican', 'Nosifer', 'Notable', 'Nothing You Could Do', 'Noticia Text', 'Noto Color Emoji', 'Noto Emoji', 'Noto Kufi Arabic', 'Noto Music', 'Noto Naskh Arabic', 'Noto Nastaliq Urdu', 'Noto Sans', 'Noto Sans Arabic', 'Noto Sans Display', 'Noto Sans Mono', 'Noto Serif', 'Noto Serif Display', 'Nova Cut', 'Nova Flat', 'Nova Mono', 'Nova Oval', 'Nova Round', 'Nova Script', 'Nova Slim', 'Nova Square', 'Numans', 'Nunito', 'Nunito Sans', 'Odibee Sans', 'Odor Mean Chey', 'Offside', 'Oi', 'Old Standard TT', 'Oldenburg', 'Ole', 'Oleo Script', 'Oleo Script Swash Caps', 'Oooh Baby', 'Open Sans', 'Oranienbaum', 'Orbit', 'Orbitron', 'Oregano', 'Orelega One', 'Orienta', 'Original Surfer', 'Oswald', 'Outfit', 'Over the Rainbow', 'Overlock', 'Overlock SC', 'Overpass', 'Overpass Mono', 'Ovo', 'Oxanium', 'Oxygen', 'Oxygen Mono', 'PT Mono', 'PT Sans', 'PT Sans Caption', 'PT Sans Narrow', 'PT Serif', 'PT Serif Caption', 'Pacifico', 'Padauk', 'Padyakke Expanded One', 'Palanquin', 'Palanquin Dark', 'Palette Mosaic', 'Pangolin', 'Paprika', 'Parisienne', 'Passero One', 'Passion One', 'Passions Conflict', 'Pathway Extreme', 'Pathway Gothic One', 'Patrick Hand', 'Patrick Hand SC', 'Pattaya', 'Patua One', 'Pavanam', 'Paytone One', 'Peddana', 'Peralta', 'Permanent Marker', 'Petit Formal Script', 'Petrona', 'Philosopher', 'Phudu', 'Piazzolla', 'Piedra', 'Pinyon Script', 'Pirata One', 'Plaster', 'Play', 'Playball', 'Playfair Display', 'Playfair Display SC', 'Playpen Sans', 'Plus Jakarta Sans', 'Podkova', 'Poiret One', 'Poller One', 'Poltawski Nowy', 'Poly', 'Pompiere', 'Pontano Sans', 'Poor Story', 'Poppins', 'Port Lligat Sans', 'Port Lligat Slab', 'Potta One', 'Pragati Narrow', 'Praise', 'Prata', 'Preahvihear', 'Press Start 2P', 'Pridi', 'Princess Sofia', 'Prociono', 'Prompt', 'Prosto One', 'Proza Libre', 'Public Sans', 'Puppies Play', 'Puritan', 'Purple Purse', 'Pushster', 'Quando', 'Quantico', 'Quattrocento', 'Quattrocento Sans', 'Questrial', 'Quicksand', 'Quintessential', 'Qwigley', 'Qwitcher Grypen', 'REM', 'Racing Sans One', 'Radio Canada', 'Radley', 'Rajdhani', 'Rakkas', 'Raleway', 'Raleway Dots', 'Ramabhadra', 'Ramaraja', 'Rambla', 'Rammetto One', 'Rampart One', 'Ranchers', 'Rancho', 'Ranga', 'Rasa', 'Rationale', 'Ravi Prakash', 'Readex Pro', 'Recursive', 'Red Hat Display', 'Red Hat Mono', 'Red Hat Text', 'Red Rose', 'Redacted', 'Redacted Script', 'Redressed', 'Reem Kufi', 'Reem Kufi Fun', 'Reem Kufi Ink', 'Reenie Beanie', 'Reggae One', 'Revalia', 'Rhodium Libre', 'Ribeye', 'Ribeye Marrow', 'Righteous', 'Risque', 'Road Rage', 'RocknRoll One', 'Rokkitt', 'Romanesco', 'Ropa Sans', 'Rosario', 'Rosarivo', 'Rouge Script', 'Rowdies', 'Rozha One', 'Rubik', 'Rubik Beastly', 'Rubik Bubbles', 'Rubik Burned', 'Rubik Dirt', 'Rubik Distressed', 'Rubik Gemstones', 'Rubik Glitch', 'Rubik Iso', 'Rubik Marker Hatch', 'Rubik Maze', 'Rubik Microbe', 'Rubik Mono One', 'Rubik Moonrocks', 'Rubik Pixels', 'Rubik Puddles', 'Rubik Spray Paint', 'Rubik Storm', 'Rubik Vinyl', 'Rubik Wet Paint', 'Ruda', 'Rufina', 'Ruge Boogie', 'Ruluko', 'Rum Raisin', 'Ruslan Display', 'Russo One', 'Ruthie', 'Rye', 'STIX Two Text', 'Sacramento', 'Sahitya', 'Sail', 'Saira', 'Saira Condensed', 'Saira Extra Condensed', 'Saira Semi Condensed', 'Saira Stencil One', 'Salsa', 'Sanchez', 'Sancreek', 'Sansita', 'Sansita Swashed', 'Sarabun', 'Sarala', 'Sarina', 'Sarpanch', 'Sassybold', 'Satisfy', 'Sawarabi Gothic', 'Sawarabi Mincho', 'Scada', 'Scheherazade New', 'Schoolbell', 'Scope One', 'Seaweed Script', 'Secular One', 'Sedgwick Ave', 'Sedgwick Ave Display', 'Sen', 'Send Flowers', 'Sevillana', 'Seymour One', 'Shadows Into Light', 'Shadows Into Light Two', 'Shalimar', 'Shanti', 'Share', 'Share Tech', 'Share Tech Mono', 'Shippori Antique', 'Shippori Antique B1', 'Shippori Mincho', 'Shippori Mincho B1', 'Shizuru', 'Shojumaru', 'Short Stack', 'Shrikhand', 'Siemreap', 'Sigmar One', 'Signika', 'Signika Negative', 'Silkscreen', 'Simonetta', 'Single Day', 'Sintony', 'Sirin Stencil', 'Six Caps', 'Skranji', 'Slabo 13px', 'Slabo 27px', 'Slackey', 'Smokum', 'Smooch', 'Smooch Sans', 'Smythe', 'Sniglet', 'Snippet', 'Snowburst One', 'Sofadi One', 'Sofia', 'Sofia Sans', 'Sofia Sans Condensed', 'Sofia Sans Extra Condensed', 'Sofia Sans Semi Condensed', 'Solitreo', 'Solway', 'Song Myung', 'Sono', 'Sonsie One', 'Sora', 'Sorts Mill Goudy', 'Source Code Pro', 'Source Sans 3', 'Source Sans Pro', 'Source Serif 4', 'Source Serif Pro', 'Space Grotesk', 'Space Mono', 'Special Elite', 'Spectral', 'Spectral SC', 'Spicy Rice', 'Spinnaker', 'Spirax', 'Splash', 'Spline Sans', 'Spline Sans Mono', 'Squada One', 'Square Peg', 'Sree Krushnadevaraya', 'Sriracha', 'Srisakdi', 'Staatliches', 'Stalemate', 'Stalinist One', 'Stardos Stencil', 'Stick', 'Stick No Bills', 'Stint Ultra Condensed', 'Stint Ultra Expanded', 'Stoke', 'Strait', 'Style Script', 'Stylish', 'Sue Ellen Francisco', 'Suez One', 'Sulphur Point', 'Sumana', 'Sunflower', 'Sunshiney', 'Supermercado One', 'Sura', 'Suranna', 'Suravaram', 'Suwannaphum', 'Swanky and Moo Moo', 'Syncopate', 'Syne', 'Syne Mono', 'Syne Tactile', 'Tac One', 'Tai Heritage Pro', 'Tajawal', 'Tangerine', 'Tapestry', 'Taprom', 'Tauri', 'Taviraj', 'Teko', 'Telex', 'Tenali Ramakrishna', 'Tenor Sans', 'Text Me One', 'Texturina', 'Thasadith', 'The Girl Next Door', 'The Nautigal', 'Tienne', 'Tillana', 'Tilt Neon', 'Tilt Prism', 'Tilt Warp', 'Timmana', 'Tinos', 'Tiro Bangla', 'Tiro Devanagari Marathi', 'Tiro Devanagari Sanskrit', 'Tiro Gurmukhi', 'Tiro Kannada', 'Tiro Tamil', 'Tiro Telugu', 'Titan One', 'Titillium Web', 'Tomorrow', 'Tourney', 'Trade Winds', 'Train One', 'Trirong', 'Trispace', 'Trocchi', 'Trochut', 'Truculenta', 'Trykker', 'Tsukimi Rounded', 'Tulpen One', 'Turret Road', 'Twinkle Star', 'Ubuntu', 'Ubuntu Condensed', 'Ubuntu Mono', 'Uchen', 'Ultra', 'Unbounded', 'Uncial Antiqua', 'Underdog', 'Unica One', 'UnifrakturCook', 'UnifrakturMaguntia', 'Unkempt', 'Unlock', 'Unna', 'Updock', 'Urbanist', 'Vast Shadow', 'Vazirmatn', 'Vesper Libre', 'Viaoda Libre', 'Vibes', 'Vibur', 'Vidaloka', 'Viga', 'Voces', 'Volkhov', 'Vollkorn', 'Vollkorn SC', 'Voltaire', 'Vujahday Script', 'Waiting for the Sunrise', 'Wallpoet', 'Walter Turncoat', 'Warnes', 'Waterfall', 'Wavefont', 'Wellfleet', 'Wendy One', 'Whisper', 'WindSong', 'Wire One', 'Work Sans', 'Wix Madefor Display', 'Wix Madefor Text', 'Xanh Mono', 'Yaldevi', 'Yanone Kaffeesatz', 'Yantramanav', 'Yatra One', 'Yellowtail', 'Yeon Sung', 'Yeseva One', 'Yesteryear', 'Yomogi', 'Yrsa', 'Ysabeau', 'Ysabeau Infant', 'Ysabeau Office', 'Ysabeau SC', 'Yuji Boku', 'Yuji Hentaigana Akari', 'Yuji Hentaigana Akebono', 'Yuji Mai', 'Yuji Syuku', 'Yusei Magic', 'ZCOOL KuaiLe', 'ZCOOL QingKe HuangYou', 'ZCOOL XiaoWei', 'Zen Antique', 'Zen Antique Soft', 'Zen Dots', 'Zen Kaku Gothic Antique', 'Zen Kaku Gothic New', 'Zen Kurenaido', 'Zen Loop', 'Zen Maru Gothic', 'Zen Old Mincho', 'Zen Tokyo Zoo', 'Zeyada', 'Zhi Mang Xing', 'Zilla Slab', 'Zilla Slab Highlight'];
|
|
8066
8231
|
|
|
8067
8232
|
var _excluded$1 = ["fontFamily"];
|
|
8233
|
+
var _positionMenuItemSx = {
|
|
8234
|
+
textTransform: 'none',
|
|
8235
|
+
fontSize: 12,
|
|
8236
|
+
fontWeight: 400,
|
|
8237
|
+
color: '#333',
|
|
8238
|
+
justifyContent: 'flex-start',
|
|
8239
|
+
px: 1,
|
|
8240
|
+
py: 0.6,
|
|
8241
|
+
minWidth: 0,
|
|
8242
|
+
'&:hover': {
|
|
8243
|
+
backgroundColor: 'rgba(13,131,205,0.08)'
|
|
8244
|
+
}
|
|
8245
|
+
};
|
|
8246
|
+
|
|
8247
|
+
// ── Font preview: lightweight Google Font subsets for dropdown ──
|
|
8068
8248
|
var _fontPreviewLoaded = new Set();
|
|
8069
8249
|
function loadFontPreview(fontFamily) {
|
|
8070
8250
|
if (_fontPreviewLoaded.has(fontFamily)) return;
|
|
@@ -8745,10 +8925,270 @@ var LineToolbar = mobxReactLite.observer(function (_ref7) {
|
|
|
8745
8925
|
});
|
|
8746
8926
|
});
|
|
8747
8927
|
|
|
8748
|
-
//
|
|
8749
|
-
var
|
|
8928
|
+
// Position + alignment popover button
|
|
8929
|
+
var PositionButton = mobxReactLite.observer(function (_ref8) {
|
|
8750
8930
|
var element = _ref8.element,
|
|
8751
8931
|
store = _ref8.store;
|
|
8932
|
+
var _useState3 = React.useState(null),
|
|
8933
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
8934
|
+
anchorEl = _useState4[0],
|
|
8935
|
+
setAnchorEl = _useState4[1];
|
|
8936
|
+
var open = Boolean(anchorEl);
|
|
8937
|
+
var pageW = store.width;
|
|
8938
|
+
var pageH = store.height;
|
|
8939
|
+
var alignEl = function alignEl(xVal, yVal) {
|
|
8940
|
+
var attrs = {};
|
|
8941
|
+
if (xVal !== null) attrs.x = xVal;
|
|
8942
|
+
if (yVal !== null) attrs.y = yVal;
|
|
8943
|
+
element.set(attrs);
|
|
8944
|
+
store.history.addUndoState();
|
|
8945
|
+
};
|
|
8946
|
+
var layer = function layer(fn) {
|
|
8947
|
+
fn();
|
|
8948
|
+
store.history.addUndoState();
|
|
8949
|
+
};
|
|
8950
|
+
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
8951
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(material.Button, {
|
|
8952
|
+
size: "small",
|
|
8953
|
+
onClick: function onClick(e) {
|
|
8954
|
+
return setAnchorEl(e.currentTarget);
|
|
8955
|
+
},
|
|
8956
|
+
startIcon: /*#__PURE__*/jsxRuntime.jsx(OpenWithIcon, {
|
|
8957
|
+
sx: {
|
|
8958
|
+
fontSize: '16px !important'
|
|
8959
|
+
}
|
|
8960
|
+
}),
|
|
8961
|
+
sx: _objectSpread2({
|
|
8962
|
+
textTransform: 'none',
|
|
8963
|
+
fontSize: 12,
|
|
8964
|
+
whiteSpace: 'nowrap',
|
|
8965
|
+
px: 1.5,
|
|
8966
|
+
minWidth: 'auto'
|
|
8967
|
+
}, open ? {
|
|
8968
|
+
backgroundColor: '#e3f2fd',
|
|
8969
|
+
color: '#0d83cd'
|
|
8970
|
+
} : {}),
|
|
8971
|
+
children: t('toolbar.position', 'Position')
|
|
8972
|
+
}), /*#__PURE__*/jsxRuntime.jsxs(material.Popover, {
|
|
8973
|
+
open: open,
|
|
8974
|
+
anchorEl: anchorEl,
|
|
8975
|
+
onClose: function onClose() {
|
|
8976
|
+
return setAnchorEl(null);
|
|
8977
|
+
},
|
|
8978
|
+
anchorOrigin: {
|
|
8979
|
+
vertical: 'bottom',
|
|
8980
|
+
horizontal: 'left'
|
|
8981
|
+
},
|
|
8982
|
+
transformOrigin: {
|
|
8983
|
+
vertical: 'top',
|
|
8984
|
+
horizontal: 'left'
|
|
8985
|
+
},
|
|
8986
|
+
slotProps: {
|
|
8987
|
+
paper: {
|
|
8988
|
+
sx: {
|
|
8989
|
+
mt: 0.5,
|
|
8990
|
+
p: 2,
|
|
8991
|
+
width: 300,
|
|
8992
|
+
borderRadius: '10px',
|
|
8993
|
+
boxShadow: '0 4px 20px rgba(0,0,0,0.12)'
|
|
8994
|
+
}
|
|
8995
|
+
}
|
|
8996
|
+
},
|
|
8997
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(material.Typography, {
|
|
8998
|
+
variant: "caption",
|
|
8999
|
+
sx: {
|
|
9000
|
+
fontWeight: 700,
|
|
9001
|
+
color: '#111',
|
|
9002
|
+
display: 'block',
|
|
9003
|
+
mb: 1,
|
|
9004
|
+
fontSize: 12
|
|
9005
|
+
},
|
|
9006
|
+
children: t('toolbar.layering', 'Layer order')
|
|
9007
|
+
}), /*#__PURE__*/jsxRuntime.jsxs(material.Box, {
|
|
9008
|
+
sx: {
|
|
9009
|
+
display: 'grid',
|
|
9010
|
+
gridTemplateColumns: '1fr 1fr',
|
|
9011
|
+
gap: 0.5,
|
|
9012
|
+
mb: 2
|
|
9013
|
+
},
|
|
9014
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(material.Button, {
|
|
9015
|
+
size: "small",
|
|
9016
|
+
startIcon: /*#__PURE__*/jsxRuntime.jsx(ArrowUpwardIcon, {}),
|
|
9017
|
+
onClick: function onClick() {
|
|
9018
|
+
return layer(function () {
|
|
9019
|
+
return element.moveUp();
|
|
9020
|
+
});
|
|
9021
|
+
},
|
|
9022
|
+
sx: _positionMenuItemSx,
|
|
9023
|
+
children: t('toolbar.up', 'Up')
|
|
9024
|
+
}), /*#__PURE__*/jsxRuntime.jsx(material.Button, {
|
|
9025
|
+
size: "small",
|
|
9026
|
+
startIcon: /*#__PURE__*/jsxRuntime.jsx(ArrowDownwardIcon, {}),
|
|
9027
|
+
onClick: function onClick() {
|
|
9028
|
+
return layer(function () {
|
|
9029
|
+
return element.moveDown();
|
|
9030
|
+
});
|
|
9031
|
+
},
|
|
9032
|
+
sx: _positionMenuItemSx,
|
|
9033
|
+
children: t('toolbar.down', 'Down')
|
|
9034
|
+
}), /*#__PURE__*/jsxRuntime.jsx(material.Button, {
|
|
9035
|
+
size: "small",
|
|
9036
|
+
startIcon: /*#__PURE__*/jsxRuntime.jsx(VerticalAlignTopIcon, {}),
|
|
9037
|
+
onClick: function onClick() {
|
|
9038
|
+
return layer(function () {
|
|
9039
|
+
return element.moveTop();
|
|
9040
|
+
});
|
|
9041
|
+
},
|
|
9042
|
+
sx: _positionMenuItemSx,
|
|
9043
|
+
children: t('toolbar.toForward', 'To front')
|
|
9044
|
+
}), /*#__PURE__*/jsxRuntime.jsx(material.Button, {
|
|
9045
|
+
size: "small",
|
|
9046
|
+
startIcon: /*#__PURE__*/jsxRuntime.jsx(VerticalAlignBottomIcon, {}),
|
|
9047
|
+
onClick: function onClick() {
|
|
9048
|
+
return layer(function () {
|
|
9049
|
+
return element.moveBottom();
|
|
9050
|
+
});
|
|
9051
|
+
},
|
|
9052
|
+
sx: _positionMenuItemSx,
|
|
9053
|
+
children: t('toolbar.toBottom', 'To back')
|
|
9054
|
+
})]
|
|
9055
|
+
}), /*#__PURE__*/jsxRuntime.jsx(material.Divider, {
|
|
9056
|
+
sx: {
|
|
9057
|
+
mb: 1.5
|
|
9058
|
+
}
|
|
9059
|
+
}), /*#__PURE__*/jsxRuntime.jsx(material.Typography, {
|
|
9060
|
+
variant: "caption",
|
|
9061
|
+
sx: {
|
|
9062
|
+
fontWeight: 700,
|
|
9063
|
+
color: '#111',
|
|
9064
|
+
display: 'block',
|
|
9065
|
+
mb: 1,
|
|
9066
|
+
fontSize: 12
|
|
9067
|
+
},
|
|
9068
|
+
children: t('toolbar.position', 'Position')
|
|
9069
|
+
}), function () {
|
|
9070
|
+
var cx = (pageW - element.width) / 2;
|
|
9071
|
+
var cy = (pageH - element.height) / 2;
|
|
9072
|
+
var rx = pageW - element.width;
|
|
9073
|
+
var by = pageH - element.height;
|
|
9074
|
+
var positions = [{
|
|
9075
|
+
label: 'Top left',
|
|
9076
|
+
x: 0,
|
|
9077
|
+
y: 0,
|
|
9078
|
+
row: 0,
|
|
9079
|
+
col: 0
|
|
9080
|
+
}, {
|
|
9081
|
+
label: 'Top center',
|
|
9082
|
+
x: cx,
|
|
9083
|
+
y: 0,
|
|
9084
|
+
row: 0,
|
|
9085
|
+
col: 1
|
|
9086
|
+
}, {
|
|
9087
|
+
label: 'Top right',
|
|
9088
|
+
x: rx,
|
|
9089
|
+
y: 0,
|
|
9090
|
+
row: 0,
|
|
9091
|
+
col: 2
|
|
9092
|
+
}, {
|
|
9093
|
+
label: 'Middle left',
|
|
9094
|
+
x: 0,
|
|
9095
|
+
y: cy,
|
|
9096
|
+
row: 1,
|
|
9097
|
+
col: 0
|
|
9098
|
+
}, {
|
|
9099
|
+
label: 'Center',
|
|
9100
|
+
x: cx,
|
|
9101
|
+
y: cy,
|
|
9102
|
+
row: 1,
|
|
9103
|
+
col: 1
|
|
9104
|
+
}, {
|
|
9105
|
+
label: 'Middle right',
|
|
9106
|
+
x: rx,
|
|
9107
|
+
y: cy,
|
|
9108
|
+
row: 1,
|
|
9109
|
+
col: 2
|
|
9110
|
+
}, {
|
|
9111
|
+
label: 'Bottom left',
|
|
9112
|
+
x: 0,
|
|
9113
|
+
y: by,
|
|
9114
|
+
row: 2,
|
|
9115
|
+
col: 0
|
|
9116
|
+
}, {
|
|
9117
|
+
label: 'Bottom center',
|
|
9118
|
+
x: cx,
|
|
9119
|
+
y: by,
|
|
9120
|
+
row: 2,
|
|
9121
|
+
col: 1
|
|
9122
|
+
}, {
|
|
9123
|
+
label: 'Bottom right',
|
|
9124
|
+
x: rx,
|
|
9125
|
+
y: by,
|
|
9126
|
+
row: 2,
|
|
9127
|
+
col: 2
|
|
9128
|
+
}];
|
|
9129
|
+
return /*#__PURE__*/jsxRuntime.jsx(material.Box, {
|
|
9130
|
+
sx: {
|
|
9131
|
+
display: 'grid',
|
|
9132
|
+
gridTemplateColumns: 'repeat(3, 1fr)',
|
|
9133
|
+
gap: 0.5
|
|
9134
|
+
},
|
|
9135
|
+
children: positions.map(function (_ref9) {
|
|
9136
|
+
var label = _ref9.label,
|
|
9137
|
+
x = _ref9.x,
|
|
9138
|
+
y = _ref9.y;
|
|
9139
|
+
return /*#__PURE__*/jsxRuntime.jsx(material.Tooltip, {
|
|
9140
|
+
title: label,
|
|
9141
|
+
placement: "top",
|
|
9142
|
+
children: /*#__PURE__*/jsxRuntime.jsx(material.IconButton, {
|
|
9143
|
+
size: "small",
|
|
9144
|
+
onClick: function onClick() {
|
|
9145
|
+
return alignEl(x, y);
|
|
9146
|
+
},
|
|
9147
|
+
sx: {
|
|
9148
|
+
borderRadius: '6px',
|
|
9149
|
+
border: '1px solid #e0e0e0',
|
|
9150
|
+
p: 0.75,
|
|
9151
|
+
'&:hover': {
|
|
9152
|
+
backgroundColor: 'rgba(13,131,205,0.08)',
|
|
9153
|
+
borderColor: '#0d83cd'
|
|
9154
|
+
}
|
|
9155
|
+
},
|
|
9156
|
+
children: /*#__PURE__*/jsxRuntime.jsx(material.Box, {
|
|
9157
|
+
sx: {
|
|
9158
|
+
display: 'grid',
|
|
9159
|
+
gridTemplateColumns: 'repeat(3, 5px)',
|
|
9160
|
+
gap: '2px'
|
|
9161
|
+
},
|
|
9162
|
+
children: [0, 1, 2].map(function (r) {
|
|
9163
|
+
return [0, 1, 2].map(function (c) {
|
|
9164
|
+
return /*#__PURE__*/jsxRuntime.jsx(material.Box, {
|
|
9165
|
+
sx: {
|
|
9166
|
+
width: 5,
|
|
9167
|
+
height: 5,
|
|
9168
|
+
borderRadius: '1px',
|
|
9169
|
+
backgroundColor: r === positions.find(function (p) {
|
|
9170
|
+
return p.label === label;
|
|
9171
|
+
}).row && c === positions.find(function (p) {
|
|
9172
|
+
return p.label === label;
|
|
9173
|
+
}).col ? '#0d83cd' : '#ccc'
|
|
9174
|
+
}
|
|
9175
|
+
}, "".concat(r, "-").concat(c));
|
|
9176
|
+
});
|
|
9177
|
+
})
|
|
9178
|
+
})
|
|
9179
|
+
})
|
|
9180
|
+
}, label);
|
|
9181
|
+
})
|
|
9182
|
+
});
|
|
9183
|
+
}()]
|
|
9184
|
+
})]
|
|
9185
|
+
});
|
|
9186
|
+
});
|
|
9187
|
+
|
|
9188
|
+
// Common controls for all element types
|
|
9189
|
+
var CommonControls = mobxReactLite.observer(function (_ref0) {
|
|
9190
|
+
var element = _ref0.element,
|
|
9191
|
+
store = _ref0.store;
|
|
8752
9192
|
var isLocked = element.locked;
|
|
8753
9193
|
var handleDuplicate = function handleDuplicate() {
|
|
8754
9194
|
if (element.clone) {
|
|
@@ -8789,14 +9229,6 @@ var CommonControls = mobxReactLite.observer(function (_ref8) {
|
|
|
8789
9229
|
var handleOpacityCommit = function handleOpacityCommit() {
|
|
8790
9230
|
store.history.addUndoState();
|
|
8791
9231
|
};
|
|
8792
|
-
var handleMoveUp = function handleMoveUp() {
|
|
8793
|
-
element.moveUp();
|
|
8794
|
-
store.history.addUndoState();
|
|
8795
|
-
};
|
|
8796
|
-
var handleMoveDown = function handleMoveDown() {
|
|
8797
|
-
element.moveDown();
|
|
8798
|
-
store.history.addUndoState();
|
|
8799
|
-
};
|
|
8800
9232
|
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
8801
9233
|
children: [/*#__PURE__*/jsxRuntime.jsx(material.Tooltip, {
|
|
8802
9234
|
title: t('toolbar.opacity', 'Opacity'),
|
|
@@ -8831,24 +9263,9 @@ var CommonControls = mobxReactLite.observer(function (_ref8) {
|
|
|
8831
9263
|
sx: {
|
|
8832
9264
|
mx: 0.5
|
|
8833
9265
|
}
|
|
8834
|
-
}), /*#__PURE__*/jsxRuntime.jsx(
|
|
8835
|
-
|
|
8836
|
-
|
|
8837
|
-
size: "small",
|
|
8838
|
-
onClick: handleMoveUp,
|
|
8839
|
-
children: /*#__PURE__*/jsxRuntime.jsx(ArrowUpwardIcon, {
|
|
8840
|
-
fontSize: "small"
|
|
8841
|
-
})
|
|
8842
|
-
})
|
|
8843
|
-
}), /*#__PURE__*/jsxRuntime.jsx(material.Tooltip, {
|
|
8844
|
-
title: t('toolbar.down', 'Move down'),
|
|
8845
|
-
children: /*#__PURE__*/jsxRuntime.jsx(material.IconButton, {
|
|
8846
|
-
size: "small",
|
|
8847
|
-
onClick: handleMoveDown,
|
|
8848
|
-
children: /*#__PURE__*/jsxRuntime.jsx(ArrowDownwardIcon, {
|
|
8849
|
-
fontSize: "small"
|
|
8850
|
-
})
|
|
8851
|
-
})
|
|
9266
|
+
}), /*#__PURE__*/jsxRuntime.jsx(PositionButton, {
|
|
9267
|
+
element: element,
|
|
9268
|
+
store: store
|
|
8852
9269
|
}), /*#__PURE__*/jsxRuntime.jsx(material.Divider, {
|
|
8853
9270
|
orientation: "vertical",
|
|
8854
9271
|
flexItem: true,
|
|
@@ -8892,26 +9309,26 @@ var CommonControls = mobxReactLite.observer(function (_ref8) {
|
|
|
8892
9309
|
});
|
|
8893
9310
|
|
|
8894
9311
|
// Download button with format/quality popover
|
|
8895
|
-
var DefaultDownloadButton = mobxReactLite.observer(function (
|
|
8896
|
-
var store =
|
|
8897
|
-
var
|
|
8898
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
8899
|
-
anchorEl = _useState4[0],
|
|
8900
|
-
setAnchorEl = _useState4[1];
|
|
8901
|
-
var _useState5 = React.useState('png'),
|
|
9312
|
+
var DefaultDownloadButton = mobxReactLite.observer(function (_ref1) {
|
|
9313
|
+
var store = _ref1.store;
|
|
9314
|
+
var _useState5 = React.useState(null),
|
|
8902
9315
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
8903
|
-
|
|
8904
|
-
|
|
9316
|
+
anchorEl = _useState6[0],
|
|
9317
|
+
setAnchorEl = _useState6[1];
|
|
9318
|
+
var _useState7 = React.useState('png'),
|
|
9319
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
9320
|
+
fileType = _useState8[0],
|
|
9321
|
+
setFileType = _useState8[1];
|
|
8905
9322
|
// Default quality so pixelRatio=1 (output = template's own pixel size).
|
|
8906
9323
|
// qualityToPixelRatio(q) = q * 3, so q = 1/3 → pixelRatio = 1.
|
|
8907
|
-
var
|
|
8908
|
-
_useState8 = _slicedToArray(_useState7, 2),
|
|
8909
|
-
quality = _useState8[0],
|
|
8910
|
-
setQuality = _useState8[1];
|
|
8911
|
-
var _useState9 = React.useState(false),
|
|
9324
|
+
var _useState9 = React.useState(1 / 3),
|
|
8912
9325
|
_useState0 = _slicedToArray(_useState9, 2),
|
|
8913
|
-
|
|
8914
|
-
|
|
9326
|
+
quality = _useState0[0],
|
|
9327
|
+
setQuality = _useState0[1];
|
|
9328
|
+
var _useState1 = React.useState(false),
|
|
9329
|
+
_useState10 = _slicedToArray(_useState1, 2),
|
|
9330
|
+
exporting = _useState10[0],
|
|
9331
|
+
setExporting = _useState10[1];
|
|
8915
9332
|
var open = Boolean(anchorEl);
|
|
8916
9333
|
var handleClick = function handleClick(e) {
|
|
8917
9334
|
setAnchorEl(e.currentTarget);
|
|
@@ -9144,15 +9561,15 @@ var DefaultDownloadButton = mobxReactLite.observer(function (_ref9) {
|
|
|
9144
9561
|
});
|
|
9145
9562
|
|
|
9146
9563
|
// Import button — loads a JSON template file into the store
|
|
9147
|
-
var DefaultImportButton = mobxReactLite.observer(function (
|
|
9148
|
-
var store =
|
|
9149
|
-
var
|
|
9150
|
-
|
|
9151
|
-
importing =
|
|
9152
|
-
setImporting =
|
|
9564
|
+
var DefaultImportButton = mobxReactLite.observer(function (_ref11) {
|
|
9565
|
+
var store = _ref11.store;
|
|
9566
|
+
var _useState11 = React.useState(false),
|
|
9567
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
9568
|
+
importing = _useState12[0],
|
|
9569
|
+
setImporting = _useState12[1];
|
|
9153
9570
|
var fileInputRef = React.useRef(null);
|
|
9154
9571
|
var handleFileChange = React.useCallback(/*#__PURE__*/function () {
|
|
9155
|
-
var
|
|
9572
|
+
var _ref12 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2(e) {
|
|
9156
9573
|
var _e$target$files;
|
|
9157
9574
|
var file, text, jsonData, _t3;
|
|
9158
9575
|
return _regenerator().w(function (_context2) {
|
|
@@ -9190,7 +9607,7 @@ var DefaultImportButton = mobxReactLite.observer(function (_ref1) {
|
|
|
9190
9607
|
}, _callee2, null, [[2, 4, 5, 6]]);
|
|
9191
9608
|
}));
|
|
9192
9609
|
return function (_x) {
|
|
9193
|
-
return
|
|
9610
|
+
return _ref12.apply(this, arguments);
|
|
9194
9611
|
};
|
|
9195
9612
|
}(), [store]);
|
|
9196
9613
|
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
@@ -9256,10 +9673,10 @@ var rowSx = {
|
|
|
9256
9673
|
display: 'none'
|
|
9257
9674
|
}
|
|
9258
9675
|
};
|
|
9259
|
-
var Toolbar = mobxReactLite.observer(function (
|
|
9260
|
-
var store =
|
|
9261
|
-
|
|
9262
|
-
components =
|
|
9676
|
+
var Toolbar = mobxReactLite.observer(function (_ref13) {
|
|
9677
|
+
var store = _ref13.store,
|
|
9678
|
+
_ref13$components = _ref13.components,
|
|
9679
|
+
components = _ref13$components === void 0 ? {} : _ref13$components;
|
|
9263
9680
|
var ActionControls = components.ActionControls;
|
|
9264
9681
|
var ImportButton = 'ImportButton' in components ? components.ImportButton : DefaultImportButton;
|
|
9265
9682
|
var DownloadButton = 'DownloadButton' in components ? components.DownloadButton : DefaultDownloadButton;
|
|
@@ -11177,6 +11594,7 @@ var InputFieldsDialog = mobxReactLite.observer(function (_ref2) {
|
|
|
11177
11594
|
setDisplayIndex = _useState8[1];
|
|
11178
11595
|
var initialTotalRef = React.useRef(0);
|
|
11179
11596
|
var completedHistoryRef = React.useRef([]);
|
|
11597
|
+
var removedDueToSkipRef = React.useRef([]);
|
|
11180
11598
|
var isGoingBackRef = React.useRef(false);
|
|
11181
11599
|
var prevBackTriggerRef = React.useRef(backTrigger);
|
|
11182
11600
|
var config = getInputFieldsConfig();
|
|
@@ -11219,14 +11637,24 @@ var InputFieldsDialog = mobxReactLite.observer(function (_ref2) {
|
|
|
11219
11637
|
var last = completedHistoryRef.current.pop();
|
|
11220
11638
|
if (!last) return;
|
|
11221
11639
|
var el = last.el,
|
|
11222
|
-
previousValue = last.previousValue
|
|
11640
|
+
previousValue = last.previousValue,
|
|
11641
|
+
removed = last.removed;
|
|
11223
11642
|
if (el) {
|
|
11224
11643
|
var isImage = el.custom && el.custom.inputType === 'image';
|
|
11225
|
-
|
|
11226
|
-
|
|
11227
|
-
|
|
11228
|
-
|
|
11229
|
-
|
|
11644
|
+
if (removed) {
|
|
11645
|
+
el.set({
|
|
11646
|
+
visible: true
|
|
11647
|
+
});
|
|
11648
|
+
removedDueToSkipRef.current = removedDueToSkipRef.current.filter(function (e) {
|
|
11649
|
+
return e.id !== el.id;
|
|
11650
|
+
});
|
|
11651
|
+
} else {
|
|
11652
|
+
el.set(isImage ? {
|
|
11653
|
+
src: previousValue || ''
|
|
11654
|
+
} : {
|
|
11655
|
+
text: previousValue || ''
|
|
11656
|
+
});
|
|
11657
|
+
}
|
|
11230
11658
|
isGoingBackRef.current = true;
|
|
11231
11659
|
store._unresolveInputField(el);
|
|
11232
11660
|
}
|
|
@@ -11244,6 +11672,15 @@ var InputFieldsDialog = mobxReactLite.observer(function (_ref2) {
|
|
|
11244
11672
|
var currentField = fields[0];
|
|
11245
11673
|
if (!currentField) return null;
|
|
11246
11674
|
|
|
11675
|
+
// ── Helper: clear the removed-elements tracking ref ──────────────────
|
|
11676
|
+
// Elements are kept in the canvas with visible:false — they don't render
|
|
11677
|
+
// on screen or in exports, and can be restored via back navigation at any
|
|
11678
|
+
// point (including back-from-summary via backTrigger) without touching
|
|
11679
|
+
// deleted MST nodes.
|
|
11680
|
+
var _flushRemovedElements = function _flushRemovedElements() {
|
|
11681
|
+
removedDueToSkipRef.current = [];
|
|
11682
|
+
};
|
|
11683
|
+
|
|
11247
11684
|
// ── Shared submit / skip / back helpers ─────────────────────────────
|
|
11248
11685
|
var handleSubmit = function handleSubmit(elementId, value) {
|
|
11249
11686
|
var el = store.getElementById(elementId);
|
|
@@ -11267,6 +11704,7 @@ var InputFieldsDialog = mobxReactLite.observer(function (_ref2) {
|
|
|
11267
11704
|
}
|
|
11268
11705
|
store._resolveInputField(elementId);
|
|
11269
11706
|
if (fields.length <= 1) {
|
|
11707
|
+
_flushRemovedElements();
|
|
11270
11708
|
store.history.addUndoState();
|
|
11271
11709
|
if (_onComplete) _onComplete();
|
|
11272
11710
|
} else {
|
|
@@ -11279,13 +11717,24 @@ var InputFieldsDialog = mobxReactLite.observer(function (_ref2) {
|
|
|
11279
11717
|
var el = store.getElementById(elementId);
|
|
11280
11718
|
var isImage = el && el.custom && el.custom.inputType === 'image';
|
|
11281
11719
|
var previousValue = el ? isImage ? el.src : el.text : '';
|
|
11720
|
+
var shouldRemove = !!(el && el.custom && el.custom.removeIfSkipped);
|
|
11721
|
+
if (shouldRemove) {
|
|
11722
|
+
el.set({
|
|
11723
|
+
visible: false
|
|
11724
|
+
});
|
|
11725
|
+
removedDueToSkipRef.current.push(el);
|
|
11726
|
+
}
|
|
11282
11727
|
completedHistoryRef.current.push({
|
|
11283
11728
|
el: el,
|
|
11284
11729
|
previousValue: previousValue,
|
|
11285
|
-
skipped: true
|
|
11730
|
+
skipped: true,
|
|
11731
|
+
removed: shouldRemove
|
|
11286
11732
|
});
|
|
11287
11733
|
store._resolveInputField(elementId);
|
|
11288
11734
|
if (fields.length <= 1) {
|
|
11735
|
+
var hadRemovals = removedDueToSkipRef.current.length > 0;
|
|
11736
|
+
_flushRemovedElements();
|
|
11737
|
+
if (hadRemovals) store.history.addUndoState();
|
|
11289
11738
|
if (_onComplete) _onComplete();
|
|
11290
11739
|
} else {
|
|
11291
11740
|
setDisplayIndex(function (prev) {
|
|
@@ -11297,14 +11746,24 @@ var InputFieldsDialog = mobxReactLite.observer(function (_ref2) {
|
|
|
11297
11746
|
var last = completedHistoryRef.current.pop();
|
|
11298
11747
|
if (!last) return;
|
|
11299
11748
|
var el = last.el,
|
|
11300
|
-
previousValue = last.previousValue
|
|
11749
|
+
previousValue = last.previousValue,
|
|
11750
|
+
removed = last.removed;
|
|
11301
11751
|
if (el) {
|
|
11302
11752
|
var isImage = el.custom && el.custom.inputType === 'image';
|
|
11303
|
-
|
|
11304
|
-
|
|
11305
|
-
|
|
11306
|
-
|
|
11307
|
-
|
|
11753
|
+
if (removed) {
|
|
11754
|
+
el.set({
|
|
11755
|
+
visible: true
|
|
11756
|
+
});
|
|
11757
|
+
removedDueToSkipRef.current = removedDueToSkipRef.current.filter(function (e) {
|
|
11758
|
+
return e.id !== el.id;
|
|
11759
|
+
});
|
|
11760
|
+
} else {
|
|
11761
|
+
el.set(isImage ? {
|
|
11762
|
+
src: previousValue || ''
|
|
11763
|
+
} : {
|
|
11764
|
+
text: previousValue || ''
|
|
11765
|
+
});
|
|
11766
|
+
}
|
|
11308
11767
|
store._unresolveInputField(el);
|
|
11309
11768
|
}
|
|
11310
11769
|
setDisplayIndex(function (prev) {
|
|
@@ -11338,6 +11797,7 @@ var InputFieldsDialog = mobxReactLite.observer(function (_ref2) {
|
|
|
11338
11797
|
onBack: handleBack,
|
|
11339
11798
|
canGoBack: canGoBack,
|
|
11340
11799
|
onComplete: function onComplete() {
|
|
11800
|
+
_flushRemovedElements();
|
|
11341
11801
|
store.history.addUndoState();
|
|
11342
11802
|
if (_onComplete) _onComplete();
|
|
11343
11803
|
}
|