aq-fe-framework 0.1.39 → 0.1.40
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.
|
@@ -6033,7 +6033,23 @@ import StarterKit from "@tiptap/starter-kit";
|
|
|
6033
6033
|
import { useEffect as useEffect5, useState as useState7 } from "react";
|
|
6034
6034
|
import { jsx as jsx45, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
6035
6035
|
function MyTextEditor(_a) {
|
|
6036
|
-
var _b = _a, {
|
|
6036
|
+
var _b = _a, {
|
|
6037
|
+
autoHiddenToolBar = false,
|
|
6038
|
+
contentHeight = "400px",
|
|
6039
|
+
onChange,
|
|
6040
|
+
value,
|
|
6041
|
+
error,
|
|
6042
|
+
label,
|
|
6043
|
+
withAsterisk
|
|
6044
|
+
} = _b, rest = __objRest(_b, [
|
|
6045
|
+
"autoHiddenToolBar",
|
|
6046
|
+
"contentHeight",
|
|
6047
|
+
"onChange",
|
|
6048
|
+
"value",
|
|
6049
|
+
"error",
|
|
6050
|
+
"label",
|
|
6051
|
+
"withAsterisk"
|
|
6052
|
+
]);
|
|
6037
6053
|
const [hiddenToolBar, setHiddenToolBar] = useState7(autoHiddenToolBar);
|
|
6038
6054
|
const editor = useEditor(__spreadValues({
|
|
6039
6055
|
extensions: [
|
|
@@ -6117,7 +6133,7 @@ function MyTextEditor(_a) {
|
|
|
6117
6133
|
editor.commands.setContent(value);
|
|
6118
6134
|
}
|
|
6119
6135
|
}, [value, editor]);
|
|
6120
|
-
return /* @__PURE__ */ jsx45(Input.Wrapper, { label, flex: 1, error, children: /* @__PURE__ */ jsxs24(RichTextEditor, { editor, style: { border: error && "1px solid #e03131" }, children: [
|
|
6136
|
+
return /* @__PURE__ */ jsx45(Input.Wrapper, { label, flex: 1, error, withAsterisk, children: /* @__PURE__ */ jsxs24(RichTextEditor, { editor, style: { border: error && "1px solid #e03131" }, children: [
|
|
6121
6137
|
/* @__PURE__ */ jsxs24(RichTextEditor.Toolbar, { hidden: hiddenToolBar, sticky: true, stickyOffset: 60, children: [
|
|
6122
6138
|
/* @__PURE__ */ jsxs24(RichTextEditor.ControlsGroup, { children: [
|
|
6123
6139
|
/* @__PURE__ */ jsx45(RichTextEditor.Bold, {}),
|
|
@@ -336,8 +336,9 @@ interface IMyTextEditor extends Partial<EditorOptions> {
|
|
|
336
336
|
onChange?: any;
|
|
337
337
|
contentHeight?: MantineSize | string;
|
|
338
338
|
autoHiddenToolBar?: boolean;
|
|
339
|
+
withAsterisk?: boolean;
|
|
339
340
|
}
|
|
340
|
-
declare function MyTextEditor({ autoHiddenToolBar, contentHeight, onChange, value, error, label, ...rest }: IMyTextEditor): react_jsx_runtime.JSX.Element;
|
|
341
|
+
declare function MyTextEditor({ autoHiddenToolBar, contentHeight, onChange, value, error, label, withAsterisk, ...rest }: IMyTextEditor): react_jsx_runtime.JSX.Element;
|
|
341
342
|
|
|
342
343
|
interface IMyTextInput extends TextInputProps {
|
|
343
344
|
label?: string;
|