@flozy/editor 10.8.0 → 10.8.2
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.
@@ -40,7 +40,8 @@ const SelectV1 = props => {
|
|
40
40
|
wrapColumn = false,
|
41
41
|
onChange,
|
42
42
|
onUpdate,
|
43
|
-
translation
|
43
|
+
translation,
|
44
|
+
disabled
|
44
45
|
} = props;
|
45
46
|
const [anchorEl, setAnchorEl] = useState(null);
|
46
47
|
const [anchorElOption, setAnchorElOption] = useState(null);
|
@@ -217,15 +218,13 @@ const SelectV1 = props => {
|
|
217
218
|
overflowX: wrapColumn ? "hidden" : "auto",
|
218
219
|
gap: 0.5,
|
219
220
|
padding: "8px",
|
220
|
-
cursor: "pointer"
|
221
|
+
cursor: disabled ? "auto" : "pointer"
|
221
222
|
},
|
222
|
-
onClick: handleOpenPopover,
|
223
|
+
onClick: disabled ? undefined : handleOpenPopover,
|
223
224
|
children: resolvedSelectedOptions?.map((option, index) => /*#__PURE__*/_jsx(Chip, {
|
224
225
|
label: option?.value,
|
225
|
-
onDelete: event =>
|
226
|
-
|
227
|
-
},
|
228
|
-
deleteIcon: /*#__PURE__*/_jsx(CloseIcon, {}),
|
226
|
+
onDelete: !disabled ? event => handleDeleteChip(event, option) : undefined,
|
227
|
+
deleteIcon: !disabled ? /*#__PURE__*/_jsx(CloseIcon, {}) : undefined,
|
229
228
|
variant: "filled",
|
230
229
|
sx: {
|
231
230
|
backgroundColor: option?.color,
|
@@ -237,7 +236,7 @@ const SelectV1 = props => {
|
|
237
236
|
}
|
238
237
|
},
|
239
238
|
"&:hover": {
|
240
|
-
opacity: 0.8
|
239
|
+
opacity: disabled ? 1 : 0.8
|
241
240
|
}
|
242
241
|
}
|
243
242
|
}, index))
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { useSlate } from "slate-react";
|
2
|
-
import { defaultTheme } from "../theme";
|
2
|
+
import { defaultTheme } from "../theme/index";
|
3
3
|
import { getPageSettings, updatePageSettings } from "../utils/pageSettings";
|
4
4
|
import { HEADING_THEME_FIELDS, PARAGRAPH_THEME_FIELDS } from "../helper/theme";
|
5
5
|
import { useEditorContext } from "./useMouseMove";
|
@@ -145,7 +145,6 @@ export const useEditorTheme = () => {
|
|
145
145
|
const {
|
146
146
|
theme
|
147
147
|
} = pageProps || {};
|
148
|
-
console.log("Editor debugger===>", defaultTheme);
|
149
148
|
return {
|
150
149
|
selectedTheme: theme?.theme || defaultTheme?.theme,
|
151
150
|
updateTheme: (update, actionData) => updateTheme(editor, pageSt, update, actionData, triggerRender),
|