@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.
Files changed (31) hide show
  1. package/dist/tsconfig.tsbuildinfo +1 -1
  2. package/dist/types/config.d.ts +8 -2
  3. package/package.json +6 -2
  4. package/src/front/build/asset-manifest.json +7 -7
  5. package/src/front/build/index.html +1 -1
  6. package/src/front/build/static/js/2.dfcfabd9.chunk.js +3 -0
  7. package/src/front/build/static/js/{2.5e3d5b65.chunk.js.LICENSE.txt → 2.dfcfabd9.chunk.js.LICENSE.txt} +46 -0
  8. package/src/front/build/static/js/2.dfcfabd9.chunk.js.map +1 -0
  9. package/src/front/build/static/js/main.4657766c.chunk.js +2 -0
  10. package/src/front/build/static/js/main.4657766c.chunk.js.map +1 -0
  11. package/src/front/node_modules/.cache/.eslintcache +1 -1
  12. package/src/front/node_modules/.cache/babel-loader/0fa05b1305ad481c28603c3ee4586ee5.json +1 -0
  13. package/src/front/node_modules/.cache/babel-loader/8dc9940116207017f4bd83d81616ba9f.json +1 -0
  14. package/src/front/node_modules/.cache/babel-loader/9b778dc265ad465619c361a73d83088f.json +1 -0
  15. package/src/front/node_modules/.cache/babel-loader/d93f712aa30f501d623e165b8d5b862c.json +1 -0
  16. package/src/front/node_modules/.cache/terser-webpack-plugin/content-v2/sha512/08/3b/4adf1f3031e44fc30113dc7d2a3f1169e1bb10c7ab99b45a7d7170cc2540b351c3b7bb29d23de376808c0d6d97443e6f83fcba31c4b6e4b3d1a75445c04d +1 -0
  17. package/src/front/node_modules/.cache/terser-webpack-plugin/content-v2/sha512/97/d0/0221dc1df827240422029501c4408ec9ac793c0f4e988834572a69f12de8fa6730c02a6a0d420674c881355a95e53f46a99a0b36a59bdafdb245d5e85f08 +1 -0
  18. package/src/front/node_modules/.cache/terser-webpack-plugin/index-v5/{03/f6/fe533ff91d4daa56e323f4fc8e4df13d3176fc1bfff318920f9315782eea → b5/a0/08672a587b48d0cc4ff9127d06d1bcda33131d3c5a4d95198bfdfd70f5af} +1 -1
  19. package/src/front/node_modules/.cache/terser-webpack-plugin/index-v5/{1a/f6/93794b3e91e2fc8012c6d64abcbec3d311845a4f34191ae898f0b23fb368 → fa/a9/e580c1d526744f6292052bc4ee590c313ceb564f0a6c2e2351433f01e642} +1 -1
  20. package/src/front/src/App.js +0 -1
  21. package/src/front/src/components/inputs/RichTextInput.js +15 -5
  22. package/src/front/src/contexts/ConfigContext.js +5 -3
  23. package/src/front/src/index.js +1 -1
  24. package/src/types/config.ts +13 -5
  25. package/src/front/build/static/js/2.5e3d5b65.chunk.js +0 -3
  26. package/src/front/build/static/js/2.5e3d5b65.chunk.js.map +0 -1
  27. package/src/front/build/static/js/main.0e17de8e.chunk.js +0 -2
  28. package/src/front/build/static/js/main.0e17de8e.chunk.js.map +0 -1
  29. package/src/front/node_modules/.cache/babel-loader/8bf1ffce0aafe512d86b54b91d3edb80.json +0 -1
  30. package/src/front/node_modules/.cache/terser-webpack-plugin/content-v2/sha512/c9/12/58a7f123b352e6ae40715f13eb0c089d25efc399f4e05b09d5fdb82569a107cfae29a94d43a2d5b6fc9d9cc411cfa262e3a33e797fbb4932bc1277c59204 +0 -1
  31. package/src/front/node_modules/.cache/terser-webpack-plugin/content-v2/sha512/fc/f2/d26e69e1766cd443d21369914f15e7a321eceef1d998bde1cbc026d4909ebd78ccf8a9664e2b1aad993a85e0cf53becedc536f5fc4fedf2112657e14f0e4 +0 -1
@@ -1,2 +1,2 @@
1
1
 
2
- c066ddf8bc11b31bbbad54b824b86183e7a07fc6 {"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.0e17de8e.chunk.js\",\"contentHash\":\"bfe325183d0d620ed8f8\"}","integrity":"sha512-yRJYp/Ejs1LmrkBxXxPrDAidJe/DmfTgWwnV/bglaaEHz64pqU1DotW2/J2cxBHPomLjoz55f7tJMrwSd8WSBA==","time":1687338672093,"size":376321}
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
- 020fc7f93146e5e7b11087156b5993cd5ac1c5ed {"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.5e3d5b65.chunk.js\",\"contentHash\":\"17387ffe9e86fdeb3d6b\"}","integrity":"sha512-/PLSbmnhdmzUQ9ITaZFPFeejIezu8dmYveHLwCbUkJ69eMz4qWZOKxqtmTqF4M9Tvs7cU29fxP7fIRJlfhTw5A==","time":1687338675411,"size":1867077}
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}
@@ -68,7 +68,6 @@ function App() {
68
68
  </div>
69
69
  )}
70
70
  </div>
71
-
72
71
  );
73
72
  }
74
73
 
@@ -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
- return (
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
- {props.children}
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 };
@@ -8,4 +8,4 @@ ReactDOM.render(
8
8
  <App />
9
9
  </React.StrictMode>,
10
10
  document.getElementById('root')
11
- );
11
+ );
@@ -90,11 +90,19 @@ export type TextareaColumn = {
90
90
  name: string,
91
91
  }
92
92
 
93
- export type RichTextColumn = {
94
- dataType: 'richText',
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',