@flozy/editor 8.0.1 → 8.0.3
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.
@@ -446,6 +446,12 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
|
|
446
446
|
}
|
447
447
|
}
|
448
448
|
}
|
449
|
+
} else if (event.key === "Delete") {
|
450
|
+
const everythingSelect = isEverythingSelected(editor);
|
451
|
+
if (everythingSelect) {
|
452
|
+
event.preventDefault();
|
453
|
+
dialogRef.current?.handleOpen();
|
454
|
+
}
|
449
455
|
}
|
450
456
|
}, [chars, target, mentions, setMentions, search, type, mentionsRef]);
|
451
457
|
const Overlay = collaborativeEditor && !isReadOnly ? RemoteCursorOverlay : React.Fragment;
|
@@ -1,6 +1,9 @@
|
|
1
1
|
import React from "react";
|
2
2
|
import DatePicker from "react-datepicker";
|
3
3
|
import { useDataView } from "../../Providers/DataViewProvider";
|
4
|
+
import { Grid } from "@mui/material";
|
5
|
+
import useCommonStyle from "../../../../commonStyle";
|
6
|
+
import { useEditorContext } from "../../../../hooks/useMouseMove";
|
4
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
5
8
|
function isValidDate(dateString) {
|
6
9
|
const date = new Date(dateString);
|
@@ -16,20 +19,27 @@ const DateType = props => {
|
|
16
19
|
const {
|
17
20
|
onChange
|
18
21
|
} = useDataView();
|
22
|
+
const {
|
23
|
+
theme
|
24
|
+
} = useEditorContext();
|
25
|
+
const classes = useCommonStyle(theme);
|
19
26
|
const handleChange = date => {
|
20
27
|
onChange(rowIndex, {
|
21
28
|
[property]: date
|
22
29
|
});
|
23
30
|
};
|
24
|
-
return /*#__PURE__*/_jsx(
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
31
|
+
return /*#__PURE__*/_jsx(Grid, {
|
32
|
+
sx: classes.datePicker,
|
33
|
+
children: /*#__PURE__*/_jsx(DatePicker, {
|
34
|
+
disabled: readOnly,
|
35
|
+
selected: isValidDate(value) ? new Date(value) : "",
|
36
|
+
onChange: handleChange,
|
37
|
+
onKeyDown: e => {
|
38
|
+
e.preventDefault();
|
39
|
+
console.log(e?.target.value);
|
40
|
+
},
|
41
|
+
placeholderText: "MM/DD/YYYY"
|
42
|
+
})
|
33
43
|
});
|
34
44
|
};
|
35
45
|
export default DateType;
|
@@ -428,16 +428,71 @@ const useCommonStyle = theme => ({
|
|
428
428
|
width: "100%",
|
429
429
|
"& .react-datepicker__input-container": {
|
430
430
|
"& .MuiInputBase-root": {
|
431
|
-
|
431
|
+
backgroundColor: theme?.palette?.editor?.inputFieldBgColor,
|
432
432
|
"& .MuiInputBase-input": {
|
433
|
-
|
434
|
-
color:
|
433
|
+
backgroundColor: theme?.palette?.editor?.inputFieldBgColor,
|
434
|
+
color: theme?.palette?.editor?.textColor + " !important"
|
435
435
|
},
|
436
436
|
"& .MuiOutlinedInput-notchedOutline": {
|
437
|
-
border: `1px solid ${theme?.palette?.editor?.signaturePopUpInputFieldBorder} !important
|
437
|
+
border: `1px solid ${theme?.palette?.editor?.signaturePopUpInputFieldBorder || theme?.palette?.divider} !important`,
|
438
|
+
borderRadius: "10px"
|
439
|
+
},
|
440
|
+
"&:hover .MuiOutlinedInput-notchedOutline": {
|
441
|
+
borderColor: theme?.palette?.primary?.main
|
442
|
+
},
|
443
|
+
"&.Mui-focused .MuiOutlinedInput-notchedOutline": {
|
444
|
+
borderColor: theme?.palette?.primary?.dark
|
438
445
|
}
|
439
446
|
}
|
440
447
|
}
|
448
|
+
},
|
449
|
+
"& .react-datepicker": {
|
450
|
+
backgroundColor: theme?.palette?.editor?.inputFieldBgColor,
|
451
|
+
// borderRadius: "10px",
|
452
|
+
border: `1px solid ${theme?.palette?.divider || "#ccc"}`,
|
453
|
+
boxShadow: "2px 4px 8px rgba(0, 0, 0, 0.4)",
|
454
|
+
color: theme?.palette?.editor?.textColor + " !important"
|
455
|
+
},
|
456
|
+
"& .react-datepicker__header": {
|
457
|
+
backgroundColor: theme?.palette?.editor?.inputFieldBgColor,
|
458
|
+
borderBottom: `1px solid ${theme?.palette?.divider || "#ddd"}`,
|
459
|
+
color: theme?.palette?.editor?.textColor + " !important"
|
460
|
+
},
|
461
|
+
"& .react-datepicker__day": {
|
462
|
+
color: theme?.palette?.editor?.textColor,
|
463
|
+
"&:hover": {
|
464
|
+
backgroundColor: theme?.palette?.editor?.menuOptionHoverBackground,
|
465
|
+
color: theme?.palette?.editor?.textColor || "#fff"
|
466
|
+
}
|
467
|
+
},
|
468
|
+
"& .react-datepicker__current-month": {
|
469
|
+
color: theme?.palette?.editor?.textColor
|
470
|
+
},
|
471
|
+
"& .react-datepicker__day-name": {
|
472
|
+
color: theme?.palette?.editor?.textColor
|
473
|
+
},
|
474
|
+
"& .react-datepicker__day--selected": {
|
475
|
+
background: theme?.palette?.editor?.activeColor,
|
476
|
+
color: "#fff",
|
477
|
+
"&:hover": {
|
478
|
+
background: theme?.palette?.editor?.activeColor,
|
479
|
+
color: "#fff"
|
480
|
+
}
|
481
|
+
},
|
482
|
+
"& .react-datepicker__day--keyboard-selected": {
|
483
|
+
backgroundColor: "#bad9f1",
|
484
|
+
color: "#000",
|
485
|
+
"&:hover": {
|
486
|
+
backgroundColor: "#bad9f1",
|
487
|
+
color: "#000"
|
488
|
+
}
|
489
|
+
},
|
490
|
+
"& .react-datepicker__day--today": {
|
491
|
+
fontWeight: "bold",
|
492
|
+
borderBottom: `2px solid ${theme?.palette?.editor?.activeColor}`
|
493
|
+
},
|
494
|
+
"& .react-datepicker__triangle": {
|
495
|
+
display: "none"
|
441
496
|
}
|
442
497
|
},
|
443
498
|
signaturePopUpNameField: {
|