@kingteza/crud-component 1.0.52 → 1.0.54
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/_virtual/_commonjsHelpers.cjs.js +1 -1
- package/_virtual/_commonjsHelpers.es.js +5 -3
- package/_virtual/_nodeUtil.cjs.js +1 -0
- package/_virtual/_nodeUtil.es.js +4 -0
- package/_virtual/index.cjs.js +1 -1
- package/_virtual/index.cjs2.js +1 -1
- package/_virtual/index.cjs3.js +1 -0
- package/_virtual/index.es.js +9 -5
- package/_virtual/index.es2.js +5 -2
- package/_virtual/index.es3.js +4 -0
- package/_virtual/isBuffer.cjs.js +1 -0
- package/_virtual/isBuffer.es.js +4 -0
- package/_virtual/quill.cjs.js +1 -0
- package/_virtual/quill.es.js +4 -0
- package/common/rich/index.cjs.js +1 -1
- package/common/rich/index.es.js +9 -9
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function e
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var o=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function l(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}exports.commonjsGlobal=o;exports.getDefaultExportFromCjs=l;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
var o = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
2
|
+
function l(e) {
|
|
3
|
+
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
3
4
|
}
|
|
4
5
|
export {
|
|
5
|
-
|
|
6
|
+
o as commonjsGlobal,
|
|
7
|
+
l as getDefaultExportFromCjs
|
|
6
8
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={exports:{}};exports.__module=e;
|
package/_virtual/index.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("./_commonjsHelpers.cjs.js"),r=require("../node_modules/.pnpm/react-quill@2.0.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-quill/lib/index.cjs.js");var o=r.__require();const e=t.getDefaultExportFromCjs(o),l=Object.freeze(Object.defineProperty({__proto__:null,default:e},Symbol.toStringTag,{value:"Module"}));exports.default=e;exports.index=l;
|
package/_virtual/index.cjs2.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";const e=require("./_commonjsHelpers.cjs.js"),r=require("../node_modules/.pnpm/classnames@2.5.1/node_modules/classnames/index.cjs.js");var s=r.__require();const t=e.getDefaultExportFromCjs(s);module.exports=t;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={exports:{}};exports.__module=e;
|
package/_virtual/index.es.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
import { getDefaultExportFromCjs as
|
|
2
|
-
import { __require as
|
|
3
|
-
var
|
|
4
|
-
const t = /* @__PURE__ */
|
|
1
|
+
import { getDefaultExportFromCjs as e } from "./_commonjsHelpers.es.js";
|
|
2
|
+
import { __require as r } from "../node_modules/.pnpm/react-quill@2.0.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/react-quill/lib/index.es.js";
|
|
3
|
+
var t = r();
|
|
4
|
+
const o = /* @__PURE__ */ e(t), l = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5
|
+
__proto__: null,
|
|
6
|
+
default: o
|
|
7
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
5
8
|
export {
|
|
6
|
-
|
|
9
|
+
o as default,
|
|
10
|
+
l as i
|
|
7
11
|
};
|
package/_virtual/index.es2.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import { getDefaultExportFromCjs as r } from "./_commonjsHelpers.es.js";
|
|
2
|
+
import { __require as s } from "../node_modules/.pnpm/classnames@2.5.1/node_modules/classnames/index.es.js";
|
|
3
|
+
var e = s();
|
|
4
|
+
const t = /* @__PURE__ */ r(e);
|
|
2
5
|
export {
|
|
3
|
-
|
|
6
|
+
t as default
|
|
4
7
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={exports:{}};exports.__module=e;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={exports:{}};exports.__module=e;
|
package/common/rich/index.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime");;/* empty css */;/* empty css */const a=require("antd"),s=require("react"),x=require("../../util/ValidationUtil.cjs.js"),q=s.lazy(async()=>{const{default:t}=await Promise.resolve().then(()=>require("../../_virtual/index.cjs.js")).then(i=>i.index);return{default:i=>l.jsx(t,{...i})}}),g=({name:t,label:i,required:u,rules:c=[],disabled:h})=>{const o=a.Form.useFormInstance(),[d,n]=s.useState(""),f={toolbar:[["bold","italic","underline","strike","blockquote"],[{list:"ordered"},{list:"bullet"}],["link"],["clean"]]},p=["bold","italic","underline","strike","blockquote","list","bullet","link"];s.useEffect(()=>{const e=o.getFieldValue(t);e&&e!=="<p></p>"&&e!=="<p><br></p>"&&n(e)},[o,t]);const r=a.Form.useWatch(t,o);s.useEffect(()=>{r!==d&&n(!r||r==="<p></p>"||r==="<p><br></p>"?"":r)},[r,d]);const b=e=>{n(e);const m=!e||e==="<p></p>"||e.trim()==="<p><br></p>"?void 0:e;o.setFieldValue(t,m),o.validateFields([t]).catch(()=>{})},k=s.useMemo(()=>u?[...c,...x.required(i??"")]:c,[u,c,i]);return l.jsx(a.Form.Item,{name:t,label:i,rules:k,children:l.jsx(s.Suspense,{fallback:l.jsx("div",{children:"Loading editor..."}),children:l.jsx(q,{readOnly:h,value:d,onChange:b,theme:"snow",className:"bg-white dark:!bg-[#141414] dark:text-white dark:!fill-white",modules:f,formats:p})})})};exports.RichTextEditor=g;
|
package/common/rich/index.es.js
CHANGED
|
@@ -5,11 +5,11 @@ import { Form as a } from "antd";
|
|
|
5
5
|
import V, { useState as g, useEffect as u, useMemo as w, Suspense as F } from "react";
|
|
6
6
|
import x from "../../util/ValidationUtil.es.js";
|
|
7
7
|
const R = V.lazy(async () => {
|
|
8
|
-
const { default: e } = await import("
|
|
9
|
-
return { default: (
|
|
8
|
+
const { default: e } = await import("../../_virtual/index.es.js").then((i) => i.i);
|
|
9
|
+
return { default: (i) => /* @__PURE__ */ l(e, { ...i }) };
|
|
10
10
|
}), S = ({
|
|
11
11
|
name: e,
|
|
12
|
-
label:
|
|
12
|
+
label: i,
|
|
13
13
|
required: d,
|
|
14
14
|
rules: c = [],
|
|
15
15
|
disabled: p
|
|
@@ -35,20 +35,20 @@ const R = V.lazy(async () => {
|
|
|
35
35
|
const t = r.getFieldValue(e);
|
|
36
36
|
t && t !== "<p></p>" && t !== "<p><br></p>" && s(t);
|
|
37
37
|
}, [r, e]);
|
|
38
|
-
const
|
|
38
|
+
const o = a.useWatch(e, r);
|
|
39
39
|
u(() => {
|
|
40
|
-
|
|
41
|
-
}, [
|
|
40
|
+
o !== n && s(!o || o === "<p></p>" || o === "<p><br></p>" ? "" : o);
|
|
41
|
+
}, [o, n]);
|
|
42
42
|
const h = (t) => {
|
|
43
43
|
s(t);
|
|
44
44
|
const k = !t || t === "<p></p>" || t.trim() === "<p><br></p>" ? void 0 : t;
|
|
45
45
|
r.setFieldValue(e, k), r.validateFields([e]).catch(() => {
|
|
46
46
|
});
|
|
47
47
|
}, b = w(
|
|
48
|
-
() => d ? [...c, ...x.required(
|
|
49
|
-
[d, c,
|
|
48
|
+
() => d ? [...c, ...x.required(i ?? "")] : c,
|
|
49
|
+
[d, c, i]
|
|
50
50
|
);
|
|
51
|
-
return /* @__PURE__ */ l(a.Item, { name: e, label:
|
|
51
|
+
return /* @__PURE__ */ l(a.Item, { name: e, label: i, rules: b, children: /* @__PURE__ */ l(F, { fallback: /* @__PURE__ */ l("div", { children: "Loading editor..." }), children: /* @__PURE__ */ l(
|
|
52
52
|
R,
|
|
53
53
|
{
|
|
54
54
|
readOnly: p,
|