@galadrim/galadmin 0.1.29 → 0.1.30
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/tsconfig.tsbuildinfo +1 -1
- package/dist/types/config.d.ts +8 -2
- package/package.json +6 -2
- package/src/front/build/asset-manifest.json +7 -7
- package/src/front/build/index.html +1 -1
- package/src/front/build/static/js/2.dfcfabd9.chunk.js +3 -0
- package/src/front/build/static/js/{2.5e3d5b65.chunk.js.LICENSE.txt → 2.dfcfabd9.chunk.js.LICENSE.txt} +46 -0
- package/src/front/build/static/js/2.dfcfabd9.chunk.js.map +1 -0
- package/src/front/build/static/js/main.4657766c.chunk.js +2 -0
- package/src/front/build/static/js/main.4657766c.chunk.js.map +1 -0
- package/src/front/node_modules/.cache/.eslintcache +1 -1
- package/src/front/node_modules/.cache/babel-loader/0fa05b1305ad481c28603c3ee4586ee5.json +1 -0
- package/src/front/node_modules/.cache/babel-loader/8dc9940116207017f4bd83d81616ba9f.json +1 -0
- package/src/front/node_modules/.cache/babel-loader/9b778dc265ad465619c361a73d83088f.json +1 -0
- package/src/front/node_modules/.cache/babel-loader/d93f712aa30f501d623e165b8d5b862c.json +1 -0
- package/src/front/node_modules/.cache/terser-webpack-plugin/content-v2/sha512/08/3b/4adf1f3031e44fc30113dc7d2a3f1169e1bb10c7ab99b45a7d7170cc2540b351c3b7bb29d23de376808c0d6d97443e6f83fcba31c4b6e4b3d1a75445c04d +1 -0
- package/src/front/node_modules/.cache/terser-webpack-plugin/content-v2/sha512/97/d0/0221dc1df827240422029501c4408ec9ac793c0f4e988834572a69f12de8fa6730c02a6a0d420674c881355a95e53f46a99a0b36a59bdafdb245d5e85f08 +1 -0
- package/src/front/node_modules/.cache/terser-webpack-plugin/index-v5/{03/f6/fe533ff91d4daa56e323f4fc8e4df13d3176fc1bfff318920f9315782eea → b5/a0/08672a587b48d0cc4ff9127d06d1bcda33131d3c5a4d95198bfdfd70f5af} +1 -1
- package/src/front/node_modules/.cache/terser-webpack-plugin/index-v5/{1a/f6/93794b3e91e2fc8012c6d64abcbec3d311845a4f34191ae898f0b23fb368 → fa/a9/e580c1d526744f6292052bc4ee590c313ceb564f0a6c2e2351433f01e642} +1 -1
- package/src/front/src/App.js +0 -1
- package/src/front/src/components/inputs/RichTextInput.js +15 -5
- package/src/front/src/contexts/ConfigContext.js +5 -3
- package/src/front/src/index.js +1 -1
- package/src/types/config.ts +13 -5
- package/src/front/build/static/js/2.5e3d5b65.chunk.js +0 -3
- package/src/front/build/static/js/2.5e3d5b65.chunk.js.map +0 -1
- package/src/front/build/static/js/main.0e17de8e.chunk.js +0 -2
- package/src/front/build/static/js/main.0e17de8e.chunk.js.map +0 -1
- package/src/front/node_modules/.cache/babel-loader/8bf1ffce0aafe512d86b54b91d3edb80.json +0 -1
- package/src/front/node_modules/.cache/terser-webpack-plugin/content-v2/sha512/c9/12/58a7f123b352e6ae40715f13eb0c089d25efc399f4e05b09d5fdb82569a107cfae29a94d43a2d5b6fc9d9cc411cfa262e3a33e797fbb4932bc1277c59204 +0 -1
- package/src/front/node_modules/.cache/terser-webpack-plugin/content-v2/sha512/fc/f2/d26e69e1766cd443d21369914f15e7a321eceef1d998bde1cbc026d4909ebd78ccf8a9664e2b1aad993a85e0cf53becedc536f5fc4fedf2112657e14f0e4 +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
|
|
2
|
+
2652a597ec64e520087dec30774f32afd78dadef {"key":"{\"terser\":\"5.7.1\",\"terser-webpack-plugin\":\"4.2.3\",\"terser-webpack-plugin-options\":{\"test\":new RegExp(\"\\\\.[cm]?js(\\\\?.*)?$\", \"i\"),\"extractComments\":true,\"sourceMap\":true,\"cache\":true,\"cacheKeys\":defaultCacheKeys => defaultCacheKeys,\"parallel\":true,\"include\":undefined,\"exclude\":undefined,\"minify\":undefined,\"terserOptions\":{\"parse\":{\"ecma\":8},\"compress\":{\"ecma\":5,\"warnings\":false,\"comparisons\":false,\"inline\":2},\"mangle\":{\"safari10\":true},\"keep_classnames\":false,\"keep_fnames\":false,\"output\":{\"ecma\":5,\"comments\":false,\"ascii_only\":true},\"ecma\":5}},\"name\":\"static\\u002Fjs\\u002Fmain.4657766c.chunk.js\",\"contentHash\":\"ed1fb64d87cbeea4fffd\"}","integrity":"sha512-l9ACIdwd+CckBCIClQHEQI7JrHk8D06YiDRXKmnxLej6ZzDAKmoNQgZ0yIE1WpXlP0apmgs2pZva/bJF1ehfCA==","time":1687449773522,"size":378305}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
|
|
2
|
+
d85f283b238c7e7e32dd6cb29c51dc458a5b1ab9 {"key":"{\"terser\":\"5.7.1\",\"terser-webpack-plugin\":\"4.2.3\",\"terser-webpack-plugin-options\":{\"test\":new RegExp(\"\\\\.[cm]?js(\\\\?.*)?$\", \"i\"),\"extractComments\":true,\"sourceMap\":true,\"cache\":true,\"cacheKeys\":defaultCacheKeys => defaultCacheKeys,\"parallel\":true,\"include\":undefined,\"exclude\":undefined,\"minify\":undefined,\"terserOptions\":{\"parse\":{\"ecma\":8},\"compress\":{\"ecma\":5,\"warnings\":false,\"comparisons\":false,\"inline\":2},\"mangle\":{\"safari10\":true},\"keep_classnames\":false,\"keep_fnames\":false,\"output\":{\"ecma\":5,\"comments\":false,\"ascii_only\":true},\"ecma\":5}},\"name\":\"static\\u002Fjs\\u002F2.dfcfabd9.chunk.js\",\"contentHash\":\"c37e20b2d52812374ae7\"}","integrity":"sha512-CDtK3x8wMeRPwwET3H0qPxFp4bsQx6uZtFp9cXDMJUCzUcO3uynSPeN2gIwNbZdEPm+D/LoxxLbks9GnVEXATQ==","time":1687449841513,"size":16499851}
|
package/src/front/src/App.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { useEffect, useRef } from "react";
|
|
1
|
+
import { useEffect, useRef, useState } from "react";
|
|
2
|
+
import { RichTextEditor } from "@mantine/rte";
|
|
2
3
|
|
|
3
4
|
window.Quill.prototype.getHTML = function () {
|
|
4
5
|
return this.container.querySelector('.ql-editor').innerHTML;
|
|
@@ -6,6 +7,7 @@ window.Quill.prototype.getHTML = function () {
|
|
|
6
7
|
|
|
7
8
|
export default ({ column, onChange, initialData }) => {
|
|
8
9
|
const quillContainer = useRef(null);
|
|
10
|
+
const [mantineText, setMantineText] = useState(initialData?.[column.htmlField]);
|
|
9
11
|
|
|
10
12
|
useEffect(() => {
|
|
11
13
|
if (quillContainer.current && !quillContainer.current.editor) {
|
|
@@ -46,10 +48,18 @@ export default ({ column, onChange, initialData }) => {
|
|
|
46
48
|
}
|
|
47
49
|
}, [quillContainer.current])
|
|
48
50
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
+
return column.useMantineEditor ? (
|
|
52
|
+
<RichTextEditor
|
|
53
|
+
style={column.height ? { height: column.height } : null}
|
|
54
|
+
value={mantineText}
|
|
55
|
+
onChange={(content) => {
|
|
56
|
+
onChange({[column.htmlField]: content});
|
|
57
|
+
setMantineText(content);
|
|
58
|
+
}}
|
|
59
|
+
/>
|
|
60
|
+
) : (
|
|
51
61
|
<div class='quillContainer'>
|
|
52
62
|
<div class="quill" ref={quillContainer} style={column.height ? { height: column.height } : null} />
|
|
53
63
|
</div>
|
|
54
|
-
)
|
|
55
|
-
}
|
|
64
|
+
);
|
|
65
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
2
1
|
import React, { useEffect, createContext, useState } from "react";
|
|
3
2
|
import axios from "axios";
|
|
3
|
+
import { MantineProvider } from "@mantine/core";
|
|
4
4
|
|
|
5
5
|
const ConfigContext = createContext(null);
|
|
6
6
|
|
|
@@ -25,9 +25,11 @@ const ConfigProvider = (props) => {
|
|
|
25
25
|
|
|
26
26
|
return config ? (
|
|
27
27
|
<ConfigContext.Provider value={config} >
|
|
28
|
-
|
|
28
|
+
<MantineProvider>
|
|
29
|
+
{props.children}
|
|
30
|
+
</MantineProvider>
|
|
29
31
|
</ConfigContext.Provider >
|
|
30
32
|
) : null
|
|
31
33
|
};
|
|
32
34
|
|
|
33
|
-
export { ConfigContext, ConfigProvider };
|
|
35
|
+
export { ConfigContext, ConfigProvider };
|
package/src/front/src/index.js
CHANGED
package/src/types/config.ts
CHANGED
|
@@ -90,11 +90,19 @@ export type TextareaColumn = {
|
|
|
90
90
|
name: string,
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
-
export type
|
|
94
|
-
dataType:
|
|
95
|
-
htmlField: string
|
|
96
|
-
contentField: string
|
|
97
|
-
}
|
|
93
|
+
export type QuillRichTextColumn = {
|
|
94
|
+
dataType: "richText";
|
|
95
|
+
htmlField: string;
|
|
96
|
+
contentField: string;
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
export type MantineRichTextColumn = {
|
|
100
|
+
dataType: "richText";
|
|
101
|
+
htmlField: string;
|
|
102
|
+
useMantineEditor: true;
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
export type RichTextColumn = QuillRichTextColumn | MantineRichTextColumn;
|
|
98
106
|
|
|
99
107
|
export type FileColumn = {
|
|
100
108
|
dataType: 'file',
|