@flozy/editor 9.0.4 → 9.0.7
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/ChatEditor.js +2 -2
- package/dist/Editor/CommonEditor.js +41 -11
- package/dist/Editor/Editor.css +15 -1
- package/dist/Editor/Elements/Color Picker/ColorPicker.js +5 -4
- package/dist/Editor/Elements/DataView/Layouts/ColumnView.js +4 -1
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/Select.js +3 -4
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/styles.js +6 -1
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/DateType.js +19 -9
- package/dist/Editor/Elements/DataView/Layouts/TableStyles.js +32 -2
- package/dist/Editor/Elements/DataView/Layouts/TableView.js +126 -29
- package/dist/Editor/Elements/DataView/Layouts/ViewData.js +3 -3
- package/dist/Editor/Elements/DataView/Providers/DataViewProvider.js +1 -1
- package/dist/Editor/Elements/DataView/styles.js +8 -8
- package/dist/Editor/Elements/Grid/GridItem.js +1 -2
- package/dist/Editor/Elements/Link/Link.js +70 -43
- package/dist/Editor/Elements/SimpleText/index.js +0 -1
- package/dist/Editor/Elements/Variables/Style.js +28 -2
- package/dist/Editor/Elements/Variables/VariableButton.js +7 -3
- package/dist/Editor/Toolbar/FormatTools/TextSize.js +0 -2
- package/dist/Editor/Toolbar/PopupTool/AddTemplates.js +9 -8
- package/dist/Editor/Toolbar/PopupTool/PopupToolStyle.js +13 -11
- package/dist/Editor/common/CustomDialog/index.js +90 -0
- package/dist/Editor/common/CustomDialog/styles.js +80 -0
- package/dist/Editor/common/DnD/Draggable.js +0 -1
- package/dist/Editor/common/ImageSelector/UploadStyles.js +0 -1
- package/dist/Editor/common/MentionsPopup/Styles.js +3 -3
- package/dist/Editor/common/RnD/Utils/gridDropItem.js +5 -4
- package/dist/Editor/commonStyle.js +59 -4
- package/dist/Editor/plugins/withHTML.js +1 -1
- package/dist/Editor/utils/helper.js +13 -1
- package/dist/Editor/utils/link.js +1 -1
- package/package.json +5 -2
@@ -438,16 +438,71 @@ const useCommonStyle = theme => ({
|
|
438
438
|
width: "100%",
|
439
439
|
"& .react-datepicker__input-container": {
|
440
440
|
"& .MuiInputBase-root": {
|
441
|
-
|
441
|
+
backgroundColor: theme?.palette?.editor?.inputFieldBgColor,
|
442
442
|
"& .MuiInputBase-input": {
|
443
|
-
|
444
|
-
color:
|
443
|
+
backgroundColor: theme?.palette?.editor?.inputFieldBgColor,
|
444
|
+
color: theme?.palette?.editor?.textColor + " !important"
|
445
445
|
},
|
446
446
|
"& .MuiOutlinedInput-notchedOutline": {
|
447
|
-
border: `1px solid ${theme?.palette?.editor?.signaturePopUpInputFieldBorder} !important
|
447
|
+
border: `1px solid ${theme?.palette?.editor?.signaturePopUpInputFieldBorder || theme?.palette?.divider} !important`,
|
448
|
+
borderRadius: "10px"
|
449
|
+
},
|
450
|
+
"&:hover .MuiOutlinedInput-notchedOutline": {
|
451
|
+
borderColor: theme?.palette?.primary?.main
|
452
|
+
},
|
453
|
+
"&.Mui-focused .MuiOutlinedInput-notchedOutline": {
|
454
|
+
borderColor: theme?.palette?.primary?.dark
|
448
455
|
}
|
449
456
|
}
|
450
457
|
}
|
458
|
+
},
|
459
|
+
"& .react-datepicker": {
|
460
|
+
backgroundColor: theme?.palette?.editor?.inputFieldBgColor,
|
461
|
+
// borderRadius: "10px",
|
462
|
+
border: `1px solid ${theme?.palette?.divider || "#ccc"}`,
|
463
|
+
boxShadow: "2px 4px 8px rgba(0, 0, 0, 0.4)",
|
464
|
+
color: theme?.palette?.editor?.textColor + " !important"
|
465
|
+
},
|
466
|
+
"& .react-datepicker__header": {
|
467
|
+
backgroundColor: theme?.palette?.editor?.inputFieldBgColor,
|
468
|
+
borderBottom: `1px solid ${theme?.palette?.divider || "#ddd"}`,
|
469
|
+
color: theme?.palette?.editor?.textColor + " !important"
|
470
|
+
},
|
471
|
+
"& .react-datepicker__day": {
|
472
|
+
color: theme?.palette?.editor?.textColor,
|
473
|
+
"&:hover": {
|
474
|
+
backgroundColor: theme?.palette?.editor?.menuOptionHoverBackground,
|
475
|
+
color: theme?.palette?.editor?.textColor || "#fff"
|
476
|
+
}
|
477
|
+
},
|
478
|
+
"& .react-datepicker__current-month": {
|
479
|
+
color: theme?.palette?.editor?.textColor
|
480
|
+
},
|
481
|
+
"& .react-datepicker__day-name": {
|
482
|
+
color: theme?.palette?.editor?.textColor
|
483
|
+
},
|
484
|
+
"& .react-datepicker__day--selected": {
|
485
|
+
background: theme?.palette?.editor?.activeColor,
|
486
|
+
color: "#fff",
|
487
|
+
"&:hover": {
|
488
|
+
background: theme?.palette?.editor?.activeColor,
|
489
|
+
color: "#fff"
|
490
|
+
}
|
491
|
+
},
|
492
|
+
"& .react-datepicker__day--keyboard-selected": {
|
493
|
+
backgroundColor: "#bad9f1",
|
494
|
+
color: "#000",
|
495
|
+
"&:hover": {
|
496
|
+
backgroundColor: "#bad9f1",
|
497
|
+
color: "#000"
|
498
|
+
}
|
499
|
+
},
|
500
|
+
"& .react-datepicker__day--today": {
|
501
|
+
fontWeight: "bold",
|
502
|
+
borderBottom: `2px solid ${theme?.palette?.editor?.activeColor}`
|
503
|
+
},
|
504
|
+
"& .react-datepicker__triangle": {
|
505
|
+
display: "none"
|
451
506
|
}
|
452
507
|
},
|
453
508
|
signaturePopUpNameField: {
|
@@ -9,7 +9,7 @@ const parseCopiedHTML = html => {
|
|
9
9
|
const parsed = new DOMParser().parseFromString(html, "text/html");
|
10
10
|
|
11
11
|
// if ol, ul are inside li, remove and push ol,ul after that li to maintain format between our slate list and external source list's json
|
12
|
-
parsed.querySelectorAll("li > ul, li > ol").forEach(list => {
|
12
|
+
parsed.querySelectorAll("li > ul, li > ol, li > table").forEach(list => {
|
13
13
|
// Find the parent li
|
14
14
|
const parentLi = list.parentElement;
|
15
15
|
|
@@ -756,4 +756,16 @@ export const hideSlateSelection = () => {
|
|
756
756
|
};
|
757
757
|
export function handleNegativeInteger(val) {
|
758
758
|
return val < 0 ? 0 : val;
|
759
|
-
}
|
759
|
+
}
|
760
|
+
export const isEverythingSelected = editor => {
|
761
|
+
const {
|
762
|
+
selection
|
763
|
+
} = editor;
|
764
|
+
if (selection && Range.isExpanded(selection)) {
|
765
|
+
if (Range.includes(selection, Editor.start(editor, [])) && Range.includes(selection, Editor.end(editor, []))) {
|
766
|
+
return true;
|
767
|
+
} else {
|
768
|
+
return false;
|
769
|
+
}
|
770
|
+
}
|
771
|
+
};
|
@@ -3,7 +3,7 @@ import { isBlockActive } from "./SlateUtilityFunctions";
|
|
3
3
|
export const createLinkNode = (href, showInNewTab, text, linkType) => ({
|
4
4
|
type: "link",
|
5
5
|
href,
|
6
|
-
target: showInNewTab ? "_blank" : "_self",
|
6
|
+
target: showInNewTab === "_blank" ? "_blank" : "_self",
|
7
7
|
linkType,
|
8
8
|
children: [{
|
9
9
|
text
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@flozy/editor",
|
3
|
-
"version": "9.0.
|
3
|
+
"version": "9.0.7",
|
4
4
|
"description": "An Editor for flozy app brain",
|
5
5
|
"files": [
|
6
6
|
"dist"
|
@@ -69,7 +69,10 @@
|
|
69
69
|
"storybook": "storybook dev -p 6006",
|
70
70
|
"build-storybook": "NODE_OPTIONS='--max_old_space_size=4096' storybook build",
|
71
71
|
"publish:npm": "rm -rf dist && mkdir dist && babel src/components -d dist --copy-files",
|
72
|
-
"publish:local": "rm -rf /Users/agmac03/flozy/client/node_modules/@flozy/editor/dist && babel src/components -d /Users/agmac03/flozy/client/node_modules/@flozy/editor/dist --copy-files"
|
72
|
+
"publish:local": "rm -rf /Users/agmac03/flozy/client/node_modules/@flozy/editor/dist && babel src/components -d /Users/agmac03/flozy/client/node_modules/@flozy/editor/dist --copy-files",
|
73
|
+
"publish:flozy": "./publish-flozy.sh",
|
74
|
+
"publish:flozy2": "./publish-flozy2.sh",
|
75
|
+
"publish:permission": "chmod +x publish-flozy.sh && chmod +x publish-flozy2.sh"
|
73
76
|
},
|
74
77
|
"eslintConfig": {
|
75
78
|
"extends": [
|