@oliasoft-open-source/react-ui-library 5.13.6 → 5.13.7-beta-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.
- package/dist/global.css +1 -1
- package/dist/index.js +64 -62
- package/package.json +5 -4
package/dist/index.js
CHANGED
|
@@ -22,10 +22,11 @@ import { useVirtualizer } from "@tanstack/react-virtual";
|
|
|
22
22
|
import { SimplifyAP } from "simplify-ts";
|
|
23
23
|
import Papa from "papaparse";
|
|
24
24
|
import { Slide, ToastContainer as Toaster, toast as toast$1 } from "react-toastify";
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import
|
|
28
|
-
import "
|
|
25
|
+
import { isNil as isNil$1 } from "es-toolkit";
|
|
26
|
+
import { EditorContent, useEditor } from "@tiptap/react";
|
|
27
|
+
import StarterKit from "@tiptap/starter-kit";
|
|
28
|
+
import Placeholder from "@tiptap/extension-placeholder";
|
|
29
|
+
import { Markdown } from "@tiptap/markdown";
|
|
29
30
|
import { DndProvider } from "react-dnd";
|
|
30
31
|
import { MultiBackend, Tree as Tree$1, getBackendOptions } from "@minoru/react-dnd-treeview";
|
|
31
32
|
import ReactDiffViewer, { DiffMethod } from "react-diff-viewer-continued";
|
|
@@ -5002,7 +5003,7 @@ const normalizeParsedResult = (e) => {
|
|
|
5002
5003
|
onClickCopyClipboard: useCallback(async (e) => {
|
|
5003
5004
|
let t = await v();
|
|
5004
5005
|
if (!t) return;
|
|
5005
|
-
let { fields: n = [], units: r = [], rows: a = [] } = t, o = (r == null ? [] : r).map((e) => e != null && e.length ? e : placeholder$1).slice(0, n.length), s = (e, t) => t === "comma" ? e.replace(/\./g, ",") : e, c = unParse(n, o, a.map((t) => t.map((t) =>
|
|
5006
|
+
let { fields: n = [], units: r = [], rows: a = [] } = t, o = (r == null ? [] : r).map((e) => e != null && e.length ? e : placeholder$1).slice(0, n.length), s = (e, t) => t === "comma" ? e.replace(/\./g, ",") : e, c = unParse(n, o, a.map((t) => t.map((t) => isNil$1(t) ? "" : s(t.toString(), e))), { delimiter: " " });
|
|
5006
5007
|
try {
|
|
5007
5008
|
await navigator.clipboard.writeText(c), transitionToast({ message: {
|
|
5008
5009
|
type: "Success",
|
|
@@ -6003,94 +6004,95 @@ var rich_text_toolbar_module_default = {
|
|
|
6003
6004
|
let RichTextIcon = /* @__PURE__ */ function(e) {
|
|
6004
6005
|
return e.BOLD = "bold", e.ITALIC = "italic", e.CODE = "code", e.UL = "ul", e.OL = "ol", e;
|
|
6005
6006
|
}({});
|
|
6006
|
-
const RichTextToolbar = ({
|
|
6007
|
-
|
|
6007
|
+
const RichTextToolbar = ({ editor: e, disabled: t = !1, toolbarComponent: n = null }) => {
|
|
6008
|
+
var r, i, a, o, s;
|
|
6009
|
+
let c = [
|
|
6008
6010
|
{
|
|
6009
6011
|
icon: RichTextIcon.BOLD,
|
|
6010
|
-
onClick:
|
|
6011
|
-
active:
|
|
6012
|
+
onClick: () => e == null ? void 0 : e.chain().focus().toggleBold().run(),
|
|
6013
|
+
active: (r = e == null ? void 0 : e.isActive("bold")) == null ? !1 : r
|
|
6012
6014
|
},
|
|
6013
6015
|
{
|
|
6014
6016
|
icon: RichTextIcon.ITALIC,
|
|
6015
|
-
onClick:
|
|
6016
|
-
active:
|
|
6017
|
+
onClick: () => e == null ? void 0 : e.chain().focus().toggleItalic().run(),
|
|
6018
|
+
active: (i = e == null ? void 0 : e.isActive("italic")) == null ? !1 : i
|
|
6017
6019
|
},
|
|
6018
6020
|
{
|
|
6019
6021
|
icon: RichTextIcon.CODE,
|
|
6020
|
-
onClick:
|
|
6021
|
-
active:
|
|
6022
|
+
onClick: () => e == null ? void 0 : e.chain().focus().toggleCode().run(),
|
|
6023
|
+
active: (a = e == null ? void 0 : e.isActive("code")) == null ? !1 : a
|
|
6022
6024
|
},
|
|
6023
6025
|
{
|
|
6024
6026
|
icon: RichTextIcon.UL,
|
|
6025
|
-
onClick:
|
|
6026
|
-
active:
|
|
6027
|
+
onClick: () => e == null ? void 0 : e.chain().focus().toggleBulletList().run(),
|
|
6028
|
+
active: (o = e == null ? void 0 : e.isActive("bulletList")) == null ? !1 : o
|
|
6027
6029
|
},
|
|
6028
6030
|
{
|
|
6029
6031
|
icon: RichTextIcon.OL,
|
|
6030
|
-
onClick:
|
|
6031
|
-
active:
|
|
6032
|
+
onClick: () => e == null ? void 0 : e.chain().focus().toggleOrderedList().run(),
|
|
6033
|
+
active: (s = e == null ? void 0 : e.isActive("orderedList")) == null ? !1 : s
|
|
6032
6034
|
}
|
|
6033
6035
|
];
|
|
6034
6036
|
return /* @__PURE__ */ jsxs("div", {
|
|
6035
6037
|
className: rich_text_toolbar_module_default.richTextToolbarContainer,
|
|
6036
6038
|
children: [/* @__PURE__ */ jsx("div", {
|
|
6037
6039
|
className: rich_text_toolbar_module_default.richTextToolbar,
|
|
6038
|
-
children:
|
|
6040
|
+
children: c.map((e, n) => /* @__PURE__ */ jsx(Button, {
|
|
6039
6041
|
small: !0,
|
|
6040
6042
|
round: !0,
|
|
6041
6043
|
basic: !0,
|
|
6042
|
-
icon:
|
|
6044
|
+
icon: e.icon,
|
|
6043
6045
|
colored: Color.MUTED,
|
|
6044
|
-
onClick:
|
|
6045
|
-
|
|
6046
|
-
|
|
6047
|
-
|
|
6048
|
-
|
|
6049
|
-
}, r))
|
|
6050
|
-
}), t]
|
|
6046
|
+
onClick: e.onClick,
|
|
6047
|
+
active: e.active,
|
|
6048
|
+
disabled: t
|
|
6049
|
+
}, n))
|
|
6050
|
+
}), n]
|
|
6051
6051
|
});
|
|
6052
6052
|
};
|
|
6053
6053
|
var rich_text_input_module_default = {
|
|
6054
|
-
inputInTable: "
|
|
6055
|
-
inputHover: "
|
|
6056
|
-
inputFocus: "
|
|
6057
|
-
inputError: "
|
|
6058
|
-
inputWarning: "
|
|
6059
|
-
inputDisabled: "
|
|
6060
|
-
hideScrollbars: "
|
|
6061
|
-
richTextInput: "
|
|
6054
|
+
inputInTable: "_inputInTable_gb097_1",
|
|
6055
|
+
inputHover: "_inputHover_gb097_13",
|
|
6056
|
+
inputFocus: "_inputFocus_gb097_18",
|
|
6057
|
+
inputError: "_inputError_gb097_25",
|
|
6058
|
+
inputWarning: "_inputWarning_gb097_26",
|
|
6059
|
+
inputDisabled: "_inputDisabled_gb097_61",
|
|
6060
|
+
hideScrollbars: "_hideScrollbars_gb097_67",
|
|
6061
|
+
richTextInput: "_richTextInput_gb097_77"
|
|
6062
6062
|
};
|
|
6063
6063
|
const RichTextInput = memo(forwardRef(({ placeholder: e, onChange: t, value: n, disabled: r, toolbarComponent: i }, a) => {
|
|
6064
|
-
let
|
|
6065
|
-
extensions:
|
|
6066
|
-
|
|
6067
|
-
|
|
6068
|
-
|
|
6069
|
-
|
|
6070
|
-
|
|
6071
|
-
|
|
6072
|
-
|
|
6073
|
-
|
|
6074
|
-
|
|
6075
|
-
|
|
6076
|
-
stringHandler: "markdown"
|
|
6064
|
+
let o = useContext(DisabledContext), u = r || o, d = useEditor({
|
|
6065
|
+
extensions: [
|
|
6066
|
+
StarterKit,
|
|
6067
|
+
Placeholder.configure({ placeholder: e }),
|
|
6068
|
+
Markdown
|
|
6069
|
+
],
|
|
6070
|
+
content: n == null ? "" : n,
|
|
6071
|
+
contentType: "markdown",
|
|
6072
|
+
editable: !u,
|
|
6073
|
+
onUpdate: ({ editor: e }) => {
|
|
6074
|
+
t == null || t(e.getMarkdown());
|
|
6075
|
+
}
|
|
6077
6076
|
});
|
|
6078
|
-
return
|
|
6077
|
+
return useEffect(() => {
|
|
6078
|
+
if (!d) return;
|
|
6079
|
+
let e = d.getMarkdown();
|
|
6080
|
+
n !== void 0 && n !== e && d.commands.setContent(n, {
|
|
6081
|
+
emitUpdate: !1,
|
|
6082
|
+
contentType: "markdown"
|
|
6083
|
+
});
|
|
6084
|
+
}, [n, d]), useEffect(() => {
|
|
6085
|
+
d && d.setEditable(!u);
|
|
6086
|
+
}, [u, d]), useImperativeHandle(a, () => ({
|
|
6087
|
+
clearContent: () => d == null ? void 0 : d.commands.clearContent(!1),
|
|
6088
|
+
editor: d
|
|
6089
|
+
}), [d]), /* @__PURE__ */ jsxs("div", {
|
|
6079
6090
|
className: rich_text_input_module_default.richTextInput,
|
|
6080
|
-
children: /* @__PURE__ */
|
|
6081
|
-
|
|
6082
|
-
|
|
6083
|
-
|
|
6084
|
-
|
|
6085
|
-
let r = e.getMarkdown(n);
|
|
6086
|
-
t && t(r), p(n);
|
|
6087
|
-
},
|
|
6088
|
-
editable: !u,
|
|
6089
|
-
children: [/* @__PURE__ */ jsx(RichTextToolbar, {
|
|
6090
|
-
disabled: u,
|
|
6091
|
-
toolbarComponent: i
|
|
6092
|
-
}), /* @__PURE__ */ jsx(EditorComponent, {})]
|
|
6093
|
-
})
|
|
6091
|
+
children: [/* @__PURE__ */ jsx(RichTextToolbar, {
|
|
6092
|
+
editor: d,
|
|
6093
|
+
disabled: u,
|
|
6094
|
+
toolbarComponent: i
|
|
6095
|
+
}), /* @__PURE__ */ jsx(EditorContent, { editor: d })]
|
|
6094
6096
|
});
|
|
6095
6097
|
}));
|
|
6096
6098
|
var row_module_default = { row: "_row_n16je_1" };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oliasoft-open-source/react-ui-library",
|
|
3
|
-
"version": "5.13.
|
|
3
|
+
"version": "5.13.7-beta-2",
|
|
4
4
|
"description": "Reusable UI components for React projects",
|
|
5
5
|
"homepage": "https://oliasoft-open-source.gitlab.io/react-ui-library",
|
|
6
6
|
"bugs": {
|
|
@@ -39,9 +39,11 @@
|
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@fontsource/noto-sans": "^5.2.5",
|
|
41
41
|
"@minoru/react-dnd-treeview": "^3.5.0",
|
|
42
|
-
"@remirror/pm": "^3.0.1",
|
|
43
|
-
"@remirror/react": "^3.0.3",
|
|
44
42
|
"@tanstack/react-virtual": "^3.13.2",
|
|
43
|
+
"@tiptap/extension-placeholder": "^3.20.0",
|
|
44
|
+
"@tiptap/markdown": "^3.20.0",
|
|
45
|
+
"@tiptap/react": "^3.20.0",
|
|
46
|
+
"@tiptap/starter-kit": "^3.20.0",
|
|
45
47
|
"@types/rc-slider": "^9.3.1",
|
|
46
48
|
"@types/react-resizable": "^3.0.8",
|
|
47
49
|
"@types/react-window": "^1.8.8",
|
|
@@ -64,7 +66,6 @@
|
|
|
64
66
|
"react-toastify": "^9.1.3",
|
|
65
67
|
"react-transition-group": "^4.4.5",
|
|
66
68
|
"react-window": "^1.8.11",
|
|
67
|
-
"remirror": "^3.0.3",
|
|
68
69
|
"resize-observer-polyfill": "^1.5.1",
|
|
69
70
|
"simplify-ts": "^1.0.2",
|
|
70
71
|
"styled-components": "^6.1.15"
|