@flozy/editor 10.2.4 → 10.2.6
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/Editor/CommonEditor.js +11 -0
- package/dist/Editor/Elements/Accordion/Accordion.js +27 -8
- package/dist/Editor/Elements/Accordion/AccordionSummary.js +1 -23
- package/dist/Editor/Elements/AppHeader/AppHeader.js +7 -2
- package/dist/Editor/Elements/Button/EditorButton.js +6 -4
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/MultiSelect.js +26 -26
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/MultiSelectType.js +8 -8
- package/dist/Editor/Elements/Form/Form.js +1 -3
- package/dist/Editor/Elements/Form/FormElements/FormTextArea.js +0 -1
- package/dist/Editor/Elements/Table/TableCell.js +7 -3
- package/dist/Editor/common/Checkbox/index.js +46 -0
- package/dist/Editor/common/Checkbox/styles.js +45 -0
- package/dist/Editor/common/ColorPickerButton.js +3 -0
- package/dist/Editor/common/LinkSettings/NavComponents.js +45 -65
- package/dist/Editor/common/LinkSettings/index.js +13 -26
- package/dist/Editor/common/LinkSettings/navOptions.js +2 -2
- package/dist/Editor/common/LinkSettings/style.js +164 -244
- package/dist/Editor/common/RadioGroup/index.js +48 -0
- package/dist/Editor/common/RadioGroup/styles.js +29 -0
- package/dist/Editor/common/RnD/ElementOptions/Actions.js +4 -5
- package/dist/Editor/common/RnD/ElementSettings/styles.js +0 -1
- package/dist/Editor/common/RnD/OptionsPopup/style.js +0 -1
- package/dist/Editor/common/Select/index.js +44 -7
- package/dist/Editor/common/Select/styles.js +30 -2
- package/dist/Editor/common/StyleBuilder/accordionTitleBtnStyle.js +2 -2
- package/dist/Editor/common/StyleBuilder/accordionTitleStyle.js +12 -9
- package/dist/Editor/common/SwipeableDrawer/style.js +14 -12
- package/dist/Editor/common/iconListV2.js +21 -0
- package/dist/Editor/commonStyle.js +18 -0
- package/dist/Editor/utils/helper.js +25 -7
- package/dist/Editor/utils/insertAppHeader.js +1 -1
- package/package.json +1 -1
@@ -8,11 +8,11 @@ const accordionTitleBtnStyle = [{
|
|
8
8
|
needPreview: true,
|
9
9
|
hideGradient: true
|
10
10
|
}, {
|
11
|
-
label: "
|
11
|
+
label: "Background Color",
|
12
12
|
key: "accordionBgColor",
|
13
13
|
type: "color"
|
14
14
|
}, {
|
15
|
-
label: "
|
15
|
+
label: "Border Color",
|
16
16
|
key: "accordionBorderColor",
|
17
17
|
type: "color"
|
18
18
|
}]
|
@@ -6,15 +6,18 @@ const accordionTitleStyle = [{
|
|
6
6
|
key: "textColor",
|
7
7
|
type: "color",
|
8
8
|
needPreview: true
|
9
|
-
}
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
9
|
+
}
|
10
|
+
// {
|
11
|
+
// label: "Background Color",
|
12
|
+
// key: "bgColor",
|
13
|
+
// type: "color",
|
14
|
+
// },
|
15
|
+
// {
|
16
|
+
// label: "Border Color",
|
17
|
+
// key: "borderColor",
|
18
|
+
// type: "color",
|
19
|
+
// },
|
20
|
+
]
|
18
21
|
}, {
|
19
22
|
tab: "Banner Spacing",
|
20
23
|
value: "bannerSpacing",
|
@@ -6,20 +6,22 @@ const Styles = theme => ({
|
|
6
6
|
"& .MuiDrawer-paper": {
|
7
7
|
borderTopLeftRadius: 8,
|
8
8
|
borderTopRightRadius: 8,
|
9
|
-
backgroundColor: theme?.palette?.editor?.miniToolBarBackground
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
9
|
+
backgroundColor: theme?.palette?.editor?.miniToolBarBackground
|
10
|
+
|
11
|
+
// "& .MuiInputBase-root": {
|
12
|
+
// border: `1px solid ${theme?.palette?.editor?.textColor}`,
|
13
|
+
// color: theme?.palette?.editor?.textColor,
|
14
|
+
// },
|
15
|
+
// "& .MuiSvgIcon-root": {
|
16
|
+
// color: theme?.palette?.editor?.textColor,
|
17
|
+
// },
|
18
|
+
// "& .MuiFormLabel-root": {
|
19
|
+
// color: theme?.palette?.editor?.textColor,
|
20
|
+
// backgroundColor: theme?.palette?.editor?.background,
|
21
|
+
// },
|
21
22
|
}
|
22
23
|
},
|
24
|
+
|
23
25
|
childContainer: {
|
24
26
|
padding: "20px",
|
25
27
|
"&.emojiDrawer": {
|
@@ -1358,6 +1358,27 @@ export function CheckedBoxCheckIcon() {
|
|
1358
1358
|
})
|
1359
1359
|
});
|
1360
1360
|
}
|
1361
|
+
export function CheckedRadioIcon() {
|
1362
|
+
return /*#__PURE__*/_jsxs("svg", {
|
1363
|
+
width: "17",
|
1364
|
+
height: "17",
|
1365
|
+
viewBox: "0 0 17 17",
|
1366
|
+
fill: "none",
|
1367
|
+
xmlns: "http://www.w3.org/2000/svg",
|
1368
|
+
children: [/*#__PURE__*/_jsx("path", {
|
1369
|
+
d: "M16.5 8.42148C16.5 12.792 12.9227 16.343 8.5 16.343C4.07734 16.343 0.5 12.792 0.5 8.42148C0.5 4.05093 4.07734 0.5 8.5 0.5C12.9227 0.5 16.5 4.05093 16.5 8.42148Z",
|
1370
|
+
fill: "#DEE8FC",
|
1371
|
+
stroke: "#2563EB",
|
1372
|
+
className: "radio-icon-path"
|
1373
|
+
}), /*#__PURE__*/_jsx("ellipse", {
|
1374
|
+
cx: "8.5",
|
1375
|
+
cy: "8.42079",
|
1376
|
+
rx: "3.5",
|
1377
|
+
ry: "3.46767",
|
1378
|
+
fill: "#2563EB"
|
1379
|
+
})]
|
1380
|
+
});
|
1381
|
+
}
|
1361
1382
|
export function SectionSettingIcon() {
|
1362
1383
|
return /*#__PURE__*/_jsxs("svg", {
|
1363
1384
|
width: "13",
|
@@ -575,6 +575,24 @@ const useCommonStyle = theme => ({
|
|
575
575
|
padding: "16px 8px 16px 10px!important",
|
576
576
|
height: "100%"
|
577
577
|
},
|
578
|
+
buttonMoreIcon: {
|
579
|
+
position: "absolute",
|
580
|
+
top: "50%",
|
581
|
+
right: -40,
|
582
|
+
transform: "translateY(-50%)"
|
583
|
+
},
|
584
|
+
// buttonMoreOption: {
|
585
|
+
// background: `${theme?.palette?.editor?.aiInputBackground} !important`,
|
586
|
+
// border: `1px solid ${theme?.palette?.editor?.buttonBorder1} !important`,
|
587
|
+
// padding: "4px !important",
|
588
|
+
// "& svg": {
|
589
|
+
// width: "18px !important",
|
590
|
+
// height: "18px !important",
|
591
|
+
// "& path": {
|
592
|
+
// stroke: `${theme?.palette?.editor?.closeButtonSvgStroke} !important`,
|
593
|
+
// },
|
594
|
+
// },
|
595
|
+
// },
|
578
596
|
buttonMoreOption2: {
|
579
597
|
background: `${theme?.palette?.editor?.aiInputBackground} !important`,
|
580
598
|
border: `1px solid ${theme?.palette?.editor?.buttonBorder1} !important`,
|
@@ -335,7 +335,8 @@ const handleLinkBtnClick = (e, props, isMobilePreview, metadata) => {
|
|
335
335
|
}
|
336
336
|
}
|
337
337
|
};
|
338
|
-
export const handleLinkType = (url, linkType, readOnly, openInNewTab, onClick = () => {}, metadata = {}
|
338
|
+
export const handleLinkType = (url, linkType, readOnly, openInNewTab, onClick = () => {}, metadata = {}, isEditMode, isCustomMobile // for drawer in App Header
|
339
|
+
) => {
|
339
340
|
const props = {};
|
340
341
|
if (!readOnly) {
|
341
342
|
return {
|
@@ -367,6 +368,9 @@ export const handleLinkType = (url, linkType, readOnly, openInNewTab, onClick =
|
|
367
368
|
case "page":
|
368
369
|
const [page = "", section] = url?.split("#") || [];
|
369
370
|
const sec = section ? `#${section}` : "";
|
371
|
+
if (isEditMode) {
|
372
|
+
break;
|
373
|
+
}
|
370
374
|
if (page === "_currentPage") {
|
371
375
|
props.component = "button";
|
372
376
|
props.onClick = () => {
|
@@ -387,11 +391,12 @@ export const handleLinkType = (url, linkType, readOnly, openInNewTab, onClick =
|
|
387
391
|
const currentUserPage = getCurrentUserPage();
|
388
392
|
props.href = isCurrentPage(page) ? `./${currentUserPage}${sec}` : `./${url}`;
|
389
393
|
if (openInNewTab) {
|
390
|
-
if (isCurrentPage(page)) {
|
391
|
-
|
392
|
-
} else {
|
393
|
-
|
394
|
-
}
|
394
|
+
// if (isCurrentPage(page)) {
|
395
|
+
// // temp fix, if user is presented in current page, open in new tab option is restricted, we will scroll to the element in current page
|
396
|
+
// } else {
|
397
|
+
// props.target = "_blank";
|
398
|
+
// }
|
399
|
+
props.target = "_blank";
|
395
400
|
}
|
396
401
|
}
|
397
402
|
break;
|
@@ -426,7 +431,7 @@ export const handleLinkType = (url, linkType, readOnly, openInNewTab, onClick =
|
|
426
431
|
|
427
432
|
// for iphone fix
|
428
433
|
if (props.component === "a" && props.href) {
|
429
|
-
const isMobile = getDevice(window.innerWidth) === "xs";
|
434
|
+
const isMobile = isCustomMobile || getDevice(window.innerWidth) === "xs";
|
430
435
|
if (isMobile) {
|
431
436
|
props.component = "button"; // iphone is opening two tabs, on open in new tab because of a tag.
|
432
437
|
}
|
@@ -953,4 +958,17 @@ export const getSelectedElementColor = (editor, format, theme) => {
|
|
953
958
|
}
|
954
959
|
const color = getSelectedElementStyle(format, editor, format);
|
955
960
|
return getSelectedColor(color, theme);
|
961
|
+
};
|
962
|
+
export const isHavingColor = color => {
|
963
|
+
if (!color) {
|
964
|
+
return false;
|
965
|
+
}
|
966
|
+
if (color.includes("rgba")) {
|
967
|
+
const match = color.match(/rgba?\((\d+),\s*(\d+),\s*(\d+),?\s*(\d*\.?\d+)?\)/);
|
968
|
+
if (!match) return false; // Invalid format
|
969
|
+
|
970
|
+
const alpha = match[4] !== undefined ? parseFloat(match[4]) : 1; // Default alpha = 1
|
971
|
+
return alpha !== 0;
|
972
|
+
}
|
973
|
+
return true;
|
956
974
|
};
|