@kingteza/crud-component 1.2.7 → 1.4.0
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/common/show-more/index.cjs.js +1 -1
- package/dist/common/show-more/index.d.ts +15 -3
- package/dist/common/show-more/index.es.js +76 -5
- package/dist/crud/CrudComponent.cjs.js +1 -1
- package/dist/crud/CrudComponent.d.ts +1 -0
- package/dist/crud/CrudComponent.es.js +44 -45
- package/dist/crud/CrudField.cjs.js +1 -1
- package/dist/crud/CrudField.es.js +67 -66
- package/dist/crud/view/CrudViewerUtil.cjs.js +1 -1
- package/dist/crud/view/CrudViewerUtil.es.js +22 -22
- package/dist/crud-component.css +1 -1
- package/package.json +1 -3
- package/dist/Play.d.ts +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const s=require("react/jsx-runtime"),r=require("react");;/* empty css */const h=({children:c,className:w="",expanded:f=!1,keepNewLines:g=!1,less:m="Show less",lines:n=3,more:p="Show more",onClick:i,width:o,truncatedEndingComponent:u,anchorClass:b="show-more-less-clickable"})=>{const[t,S]=r.useState(f),[l,x]=r.useState(!1),a=r.useRef(null),d=()=>{if(!a.current)return;const e=a.current,T=(Number.parseInt(getComputedStyle(e).lineHeight)||20)*n,j=e.scrollHeight>T;x(j)};r.useEffect(()=>{const e=setTimeout(d,0);return()=>clearTimeout(e)},[c,n]),r.useEffect(()=>{const e=()=>d();return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]);const v=()=>{const e=!t;S(e),i==null||i(e)},y=()=>{const e={width:o?`${o}px`:"100%",wordBreak:"break-word",whiteSpace:g?"pre-wrap":"normal"};return!t&&l?{...e,display:"-webkit-box",WebkitLineClamp:n,WebkitBoxOrient:"vertical",overflow:"hidden"}:e};return s.jsxs("div",{className:`show-more-container ${w}`,style:{width:o?`${o}px`:"100%"},children:[s.jsx("div",{ref:a,style:y(),children:c}),!t&&l&&u&&s.jsx("span",{children:u}),l&&s.jsx("button",{type:"button",className:b,onClick:v,style:{cursor:"pointer",background:"none",border:"none",padding:0,font:"inherit",color:"inherit"},"aria-label":t?"Show less content":"Show more content",children:t?m:p})]})};exports.ShowMore=h;exports.default=h;
|
|
@@ -1,4 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export
|
|
3
|
-
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface ShowMoreProps {
|
|
3
|
+
anchorClass?: string;
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
className?: string;
|
|
6
|
+
expanded?: boolean;
|
|
7
|
+
keepNewLines?: boolean;
|
|
8
|
+
less?: React.ReactNode;
|
|
9
|
+
lines?: number;
|
|
10
|
+
more?: React.ReactNode;
|
|
11
|
+
onClick?: ((expanded: boolean) => void);
|
|
12
|
+
width?: number;
|
|
13
|
+
truncatedEndingComponent?: React.ReactNode;
|
|
14
|
+
}
|
|
15
|
+
export declare const ShowMore: React.FC<ShowMoreProps>;
|
|
4
16
|
export default ShowMore;
|
|
@@ -1,8 +1,79 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
1
|
+
import { jsxs as E, jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { useState as h, useRef as H, useEffect as w } from "react";
|
|
3
3
|
/* empty css */
|
|
4
|
-
const
|
|
4
|
+
const R = ({
|
|
5
|
+
children: a,
|
|
6
|
+
className: m = "",
|
|
7
|
+
expanded: u = !1,
|
|
8
|
+
keepNewLines: p = !1,
|
|
9
|
+
less: f = "Show less",
|
|
10
|
+
lines: r = 3,
|
|
11
|
+
more: g = "Show more",
|
|
12
|
+
onClick: n,
|
|
13
|
+
width: o,
|
|
14
|
+
truncatedEndingComponent: c,
|
|
15
|
+
anchorClass: b = "show-more-less-clickable"
|
|
16
|
+
}) => {
|
|
17
|
+
const [t, x] = h(u), [s, S] = h(!1), i = H(null), d = () => {
|
|
18
|
+
if (!i.current) return;
|
|
19
|
+
const e = i.current, T = (Number.parseInt(getComputedStyle(e).lineHeight) || 20) * r, k = e.scrollHeight > T;
|
|
20
|
+
S(k);
|
|
21
|
+
};
|
|
22
|
+
w(() => {
|
|
23
|
+
const e = setTimeout(d, 0);
|
|
24
|
+
return () => clearTimeout(e);
|
|
25
|
+
}, [a, r]), w(() => {
|
|
26
|
+
const e = () => d();
|
|
27
|
+
return window.addEventListener("resize", e), () => window.removeEventListener("resize", e);
|
|
28
|
+
}, []);
|
|
29
|
+
const v = () => {
|
|
30
|
+
const e = !t;
|
|
31
|
+
x(e), n == null || n(e);
|
|
32
|
+
}, y = () => {
|
|
33
|
+
const e = {
|
|
34
|
+
width: o ? `${o}px` : "100%",
|
|
35
|
+
wordBreak: "break-word",
|
|
36
|
+
whiteSpace: p ? "pre-wrap" : "normal"
|
|
37
|
+
};
|
|
38
|
+
return !t && s ? {
|
|
39
|
+
...e,
|
|
40
|
+
display: "-webkit-box",
|
|
41
|
+
WebkitLineClamp: r,
|
|
42
|
+
WebkitBoxOrient: "vertical",
|
|
43
|
+
overflow: "hidden"
|
|
44
|
+
} : e;
|
|
45
|
+
};
|
|
46
|
+
return /* @__PURE__ */ E(
|
|
47
|
+
"div",
|
|
48
|
+
{
|
|
49
|
+
className: `show-more-container ${m}`,
|
|
50
|
+
style: { width: o ? `${o}px` : "100%" },
|
|
51
|
+
children: [
|
|
52
|
+
/* @__PURE__ */ l("div", { ref: i, style: y(), children: a }),
|
|
53
|
+
!t && s && c && /* @__PURE__ */ l("span", { children: c }),
|
|
54
|
+
s && /* @__PURE__ */ l(
|
|
55
|
+
"button",
|
|
56
|
+
{
|
|
57
|
+
type: "button",
|
|
58
|
+
className: b,
|
|
59
|
+
onClick: v,
|
|
60
|
+
style: {
|
|
61
|
+
cursor: "pointer",
|
|
62
|
+
background: "none",
|
|
63
|
+
border: "none",
|
|
64
|
+
padding: 0,
|
|
65
|
+
font: "inherit",
|
|
66
|
+
color: "inherit"
|
|
67
|
+
},
|
|
68
|
+
"aria-label": t ? "Show less content" : "Show more content",
|
|
69
|
+
children: t ? f : g
|
|
70
|
+
}
|
|
71
|
+
)
|
|
72
|
+
]
|
|
73
|
+
}
|
|
74
|
+
);
|
|
75
|
+
};
|
|
5
76
|
export {
|
|
6
|
-
|
|
7
|
-
|
|
77
|
+
R as ShowMore,
|
|
78
|
+
R as default
|
|
8
79
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),x=require("antd"),t=require("react"),H=require("./modal/index.cjs.js"),J=require("./import/CrudImportButton.cjs.js"),K=require("./view/CrudViewer.cjs.js"),L=require("../common/button/NewButton.cjs.js"),M=require("../common/button/PrintButton.cjs.js");function O({idField:l="id",onCreate:C,onDelete:j,onHide:f,onUpdate:n,fields:r,data:m,grid:k,isHiding:q,isCreating:h,isDeleting:p,isUpdating:B,paginateProps:w,onPrint:a,printing:N,viewable:v,loadingData:R,formBuilder:g,extraAction:y,minusHeight:b,cloneable:P,fullWidthModal:S=!0,wizard:I,extraView:V,importable:i,onClickNew:u,size:z,...A}){const c=t.useRef(null),D=t.useCallback(()=>{var s;(s=c.current)==null||s.create()},[]),o=t.useCallback(async(s,F=!0,G=!1)=>{var d;await((d=c.current)==null?void 0:d.update(s,F,G))},[]),E=t.useCallback(async s=>{o(s,!1,!0)},[o]);return e.jsxs(e.Fragment,{children:[e.jsxs(x.Space,{direction:"vertical",className:"w-100",children:[e.jsxs("div",{className:"w-100 d-flex",children:[e.jsx("div",{style:{flex:1},children:e.jsx(L.NewButton,{onClick:()=>{u?u():D()},className:"flex-1"})}),e.jsxs(x.Space,{children:[!!a&&e.jsx(M.PrintButton,{className:"float-right",loading:N,onClick:a}),!!i&&e.jsx(J,{fields:r,importProps:i})]})]}),e.jsx(K,{...A,minusHeight:b,data:m,size:z,fields:r,extraAction:y,idField:l,isDeleting:p,loadingData:R,onClickUpdate:n?o:void 0,onHide:f,isHiding:q,onDelete:j,onUpdate:n,onClickClone:P?E:void 0,paginateProps:w,viewable:v,extraView:V})]}),e.jsx(H,{ref:c,fields:r,wizard:I,grid:k,fullWidthModal:S,isCreating:h,isUpdating:B,onCreate:C,onUpdate:n,idField:l,formBuilder:g})]})}module.exports=O;
|
|
@@ -140,6 +140,7 @@ export interface ColorPickerFieldProps<T> extends Omit<InitialCrudField<T>, "pla
|
|
|
140
140
|
export interface CheckboxBasedFieldProps<T> extends InitialCrudField<T> {
|
|
141
141
|
type: "checkbox";
|
|
142
142
|
onChange?: (value: boolean, form: FormInstance<T>) => void;
|
|
143
|
+
switch?: boolean;
|
|
143
144
|
}
|
|
144
145
|
export interface NumberBasedFieldProps<T> extends InitialCrudField<T>, AddonFieldProps {
|
|
145
146
|
type: "number";
|
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
import { jsxs as e, Fragment as H, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { Space as f
|
|
3
|
-
import { useRef as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { NewButton as
|
|
8
|
-
import { PrintButton as
|
|
9
|
-
|
|
10
|
-
function to({
|
|
2
|
+
import { Space as f } from "antd";
|
|
3
|
+
import { useRef as J, useCallback as c } from "react";
|
|
4
|
+
import K from "./modal/index.es.js";
|
|
5
|
+
import L from "./import/CrudImportButton.es.js";
|
|
6
|
+
import O from "./view/CrudViewer.es.js";
|
|
7
|
+
import { NewButton as Q } from "../common/button/NewButton.es.js";
|
|
8
|
+
import { PrintButton as T } from "../common/button/PrintButton.es.js";
|
|
9
|
+
function ro({
|
|
11
10
|
idField: i = "id",
|
|
12
11
|
onCreate: p,
|
|
13
12
|
onDelete: C,
|
|
14
13
|
onHide: h,
|
|
15
14
|
onUpdate: t,
|
|
16
|
-
fields:
|
|
15
|
+
fields: l,
|
|
17
16
|
data: k,
|
|
18
17
|
grid: x,
|
|
19
18
|
isHiding: v,
|
|
@@ -24,29 +23,29 @@ function to({
|
|
|
24
23
|
onPrint: m,
|
|
25
24
|
printing: y,
|
|
26
25
|
viewable: j,
|
|
27
|
-
loadingData:
|
|
28
|
-
formBuilder:
|
|
29
|
-
extraAction:
|
|
30
|
-
minusHeight:
|
|
31
|
-
cloneable:
|
|
32
|
-
fullWidthModal:
|
|
33
|
-
wizard:
|
|
34
|
-
extraView:
|
|
26
|
+
loadingData: R,
|
|
27
|
+
formBuilder: I,
|
|
28
|
+
extraAction: M,
|
|
29
|
+
minusHeight: P,
|
|
30
|
+
cloneable: S,
|
|
31
|
+
fullWidthModal: V = !0,
|
|
32
|
+
wizard: b,
|
|
33
|
+
extraView: q,
|
|
35
34
|
importable: s,
|
|
36
35
|
onClickNew: u,
|
|
37
|
-
size:
|
|
38
|
-
...
|
|
36
|
+
size: z,
|
|
37
|
+
...A
|
|
39
38
|
}) {
|
|
40
|
-
const
|
|
39
|
+
const n = J(null), D = c(() => {
|
|
41
40
|
var o;
|
|
42
|
-
(o =
|
|
41
|
+
(o = n.current) == null || o.create();
|
|
43
42
|
}, []), a = c(
|
|
44
|
-
async (o,
|
|
43
|
+
async (o, F = !0, G = !1) => {
|
|
45
44
|
var d;
|
|
46
|
-
await ((d =
|
|
45
|
+
await ((d = n.current) == null ? void 0 : d.update(o, F, G));
|
|
47
46
|
},
|
|
48
47
|
[]
|
|
49
|
-
),
|
|
48
|
+
), E = c(
|
|
50
49
|
async (o) => {
|
|
51
50
|
a(o, !1, !0);
|
|
52
51
|
},
|
|
@@ -56,68 +55,68 @@ function to({
|
|
|
56
55
|
/* @__PURE__ */ e(f, { direction: "vertical", className: "w-100", children: [
|
|
57
56
|
/* @__PURE__ */ e("div", { className: "w-100 d-flex", children: [
|
|
58
57
|
/* @__PURE__ */ r("div", { style: { flex: 1 }, children: /* @__PURE__ */ r(
|
|
59
|
-
|
|
58
|
+
Q,
|
|
60
59
|
{
|
|
61
60
|
onClick: () => {
|
|
62
|
-
u ? u() :
|
|
61
|
+
u ? u() : D();
|
|
63
62
|
},
|
|
64
63
|
className: "flex-1"
|
|
65
64
|
}
|
|
66
65
|
) }),
|
|
67
66
|
/* @__PURE__ */ e(f, { children: [
|
|
68
67
|
!!m && /* @__PURE__ */ r(
|
|
69
|
-
|
|
68
|
+
T,
|
|
70
69
|
{
|
|
71
70
|
className: "float-right",
|
|
72
71
|
loading: y,
|
|
73
72
|
onClick: m
|
|
74
73
|
}
|
|
75
74
|
),
|
|
76
|
-
!!s && /* @__PURE__ */ r(
|
|
75
|
+
!!s && /* @__PURE__ */ r(L, { fields: l, importProps: s })
|
|
77
76
|
] })
|
|
78
77
|
] }),
|
|
79
78
|
/* @__PURE__ */ r(
|
|
80
|
-
|
|
79
|
+
O,
|
|
81
80
|
{
|
|
82
|
-
...
|
|
83
|
-
minusHeight:
|
|
81
|
+
...A,
|
|
82
|
+
minusHeight: P,
|
|
84
83
|
data: k,
|
|
85
|
-
size:
|
|
86
|
-
fields:
|
|
87
|
-
extraAction:
|
|
84
|
+
size: z,
|
|
85
|
+
fields: l,
|
|
86
|
+
extraAction: M,
|
|
88
87
|
idField: i,
|
|
89
88
|
isDeleting: B,
|
|
90
|
-
loadingData:
|
|
89
|
+
loadingData: R,
|
|
91
90
|
onClickUpdate: t ? a : void 0,
|
|
92
91
|
onHide: h,
|
|
93
92
|
isHiding: v,
|
|
94
93
|
onDelete: C,
|
|
95
94
|
onUpdate: t,
|
|
96
|
-
onClickClone:
|
|
95
|
+
onClickClone: S ? E : void 0,
|
|
97
96
|
paginateProps: g,
|
|
98
97
|
viewable: j,
|
|
99
|
-
extraView:
|
|
98
|
+
extraView: q
|
|
100
99
|
}
|
|
101
100
|
)
|
|
102
101
|
] }),
|
|
103
102
|
/* @__PURE__ */ r(
|
|
104
|
-
|
|
103
|
+
K,
|
|
105
104
|
{
|
|
106
|
-
ref:
|
|
107
|
-
fields:
|
|
108
|
-
wizard:
|
|
105
|
+
ref: n,
|
|
106
|
+
fields: l,
|
|
107
|
+
wizard: b,
|
|
109
108
|
grid: x,
|
|
110
|
-
fullWidthModal:
|
|
109
|
+
fullWidthModal: V,
|
|
111
110
|
isCreating: w,
|
|
112
111
|
isUpdating: N,
|
|
113
112
|
onCreate: p,
|
|
114
113
|
onUpdate: t,
|
|
115
114
|
idField: i,
|
|
116
|
-
formBuilder:
|
|
115
|
+
formBuilder: I
|
|
117
116
|
}
|
|
118
117
|
)
|
|
119
118
|
] });
|
|
120
119
|
}
|
|
121
120
|
export {
|
|
122
|
-
|
|
121
|
+
ro as default
|
|
123
122
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),b=require("antd"),q=require("react"),$=require("react-highlight-words"),z=require("../locale/index.cjs.js"),J=require("./FileCrudField.cjs.js"),K=require("./ImageCrudField.cjs.js"),Q=require("../common/check-box/CheckBox.cjs.js"),X=require("../common/date-picker/DatePicker.cjs.js"),Y=require("../common/date-picker/TimePicker.cjs.js"),U=require("../common/select/SelectComponent.cjs.js"),Z=require("../common/text-field/NumberField.cjs.js"),V=require("../common/text-field/TextField.cjs.js"),ee=require("../common/tooltip/TooltipComponent.cjs.js"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),b=require("antd"),q=require("react"),$=require("react-highlight-words"),z=require("../locale/index.cjs.js"),J=require("./FileCrudField.cjs.js"),K=require("./ImageCrudField.cjs.js"),Q=require("../common/check-box/CheckBox.cjs.js"),X=require("../common/date-picker/DatePicker.cjs.js"),Y=require("../common/date-picker/TimePicker.cjs.js"),U=require("../common/select/SelectComponent.cjs.js"),Z=require("../common/text-field/NumberField.cjs.js"),V=require("../common/text-field/TextField.cjs.js"),ee=require("../common/tooltip/TooltipComponent.cjs.js"),te=require("./CrudTextAreaComponent.cjs.js"),M=require("../util/CrudUtil.cjs.js");function re(y){const{label:o,name:m,type:x,required:d,hidden:S,rules:h=[],updatable:g=!0,readonly:w=!1,fieldClassName:C,customFormFieldRender:O,fieldTooltip:j,fieldHelper:v,...t}=y,c=b.Form.useFormInstance();q.useEffect(()=>{if(x==="select"){const{items:l=[],onSearch:a,searchOnType:i}=t;!(l!=null&&l.length)&&!i&&(a==null||a(void 0,c,t==null?void 0:t.updatingValue))}},[c,t,x,t==null?void 0:t.updatingValue]);const{t:P}=z.useTranslationLibNoNS();if(w||S)return e.jsx(e.Fragment,{});if(O)return O(c,y);switch(x){case"text":case"email":case"password":{const{onChange:l,placeholder:a,addonAfter:i,addonBefore:f}=t;return e.jsx(V.default,{placeholder:a,disabled:!g,rules:h,required:d,onChange:l?s=>l(s,c):void 0,type:x,name:m,tooltip:j,label:o,className:C,autoComplete:"new-password",addonAfter:i,addonBefore:f,help:v})}case"number":{const{onChange:l,placeholder:a,allowMinus:i,min:f,max:s,addonAfter:T,addonBefore:p}=t;return e.jsx(Z,{placeholder:a,disabled:!g,moneyField:!!t.formatted,type:x,onChange:l?F=>l(F,c):void 0,rules:h,autoComplete:"false",required:d,tooltip:j,className:C,min:i?null:f,max:s,addonAfter:T,addonBefore:p,name:m,label:o,help:v})}case"date":{const{range:l,disableToday:a,disabledFutureDays:i,disabledPastDays:f,onChange:s,placeholder:T,format:p}=t;return e.jsx(X,{placeholder:T,required:d,disabled:!g,type:x,format:p,tooltip:j,range:l,name:m,label:o,onChange:s?F=>s(F,c):void 0,className:C,disableToday:a,disabledFutureDays:i,disabledPastDays:f,help:v})}case"time":{const{range:l=!1,disableCurrent:a,disabledFuture:i,disabledPast:f,onChange:s,use12Hours:T,format:p,placeholder:F}=t;return e.jsx(Y,{placeholder:F,required:d,format:p,disabled:!g,type:x,tooltip:j,range:l,use12Hours:T,name:m,label:o,onChange:s?n=>s(n,c):void 0,className:C,disableCurrent:a,disabledFuture:i,disabledPast:f,help:v})}case"textarea":return e.jsx(te,{...y});case"image":return e.jsx(K.default,{...t,required:d,name:m,label:o,rules:h,fieldClassName:C,onRemoved:t.onRemoved,onUploading:t.onUploading,provider:t.provider});case"file":return e.jsx(J.default,{...t,required:d,name:m,label:o,rules:h,fieldClassName:C,onRemoved:t.onRemoved,onUploading:t.onUploading,provider:t.provider});case"select":return e.jsx(E,{...t,required:d,name:m,label:o,rules:h,fieldClassName:C,form:c,updatable:g,readonly:w,fieldTooltip:j,fieldHelper:v});case"enum":{const{enum:l,radio:a=!1,translation:i,onChange:f,onSearch:s,multiple:T,tagRender:p}=t,F=Array.isArray(l)?l:Object.keys(l);return a?e.jsx(b.Form.Item,{...t,name:m,required:d,tooltip:j,rules:h,label:o,className:["w-100",C].join(" "),help:v,children:e.jsx(b.Radio.Group,{...t,onChange:f?n=>{var N;return f((N=n==null?void 0:n.target)==null?void 0:N.value,c)}:void 0,children:F.map(n=>e.jsx(b.Radio,{disabled:!g,value:n,children:i?P(i[n]):n},n))})}):e.jsx(U,{...t,tagRender:typeof p=="function"?p:p?n=>{const{value:N,label:R}=n,k=p[N];return k?e.jsx(b.Tag,{color:k.color,children:R}):e.jsx(b.Tag,{children:R})}:void 0,onChange:f?n=>f(n,c):void 0,className:["w-100",C].join(" "),name:m,items:F,required:d,tooltip:j,rules:h,label:o,help:v,disabled:!g,onSearch:s?n=>s(n,c):void 0,allowClear:!0,mode:T?"multiple":void 0,itemBuilder:n=>e.jsx(b.Select.Option,{value:n,children:i?P(i[n]):n},n)})}case"checkbox":{const{onChange:l,switch:a}=t;return e.jsx(Q,{className:C,rules:h,onChange:l?i=>l(i,c):void 0,label:o,tooltip:j,disabled:!g,name:m,help:v,switch:a})}case"color":return e.jsx(D,{...t,type:"color",required:d,name:m,label:o,rules:h,fieldClassName:C,updatable:g,readonly:w,fieldTooltip:j,fieldHelper:v});default:return e.jsx(e.Fragment,{children:`${x} Not Implemented`})}}function E(y){const{items:o=[],loading:m,searchOnType:x,onSearch:d,multiple:S,onChange:h,highlightSearch:g,required:w,fieldClassName:C,rules:O,fieldTooltip:j,updatable:v,label:t,name:c,tagRender:P,updatingValue:l,onSet:a,placeholder:i,allowClear:f=!0}=y,s=y.form,[T,p]=q.useState(""),F=q.useMemo(()=>M.getRealName(c),[c]),n=q.useMemo(()=>M.getRealName(c,"upsertFieldName"),[c]),N=b.Form.useWatch(F,s),[R,k]=q.useState(!0);q.useEffect(()=>{a&&R&&N&&(a==null||a(N,o,s),k(!1))},[R,s,o,F,a,N]),q.useEffect(()=>{N&&k(!0)},[N]);const _=q.useCallback(async r=>{p(r),x&&(d==null||d(r,s,l))},[s,d,x,l]);return e.jsx(U,{...y,maxTagCount:"responsive",maxTagPlaceholder:r=>e.jsxs(ee,{title:e.jsx(e.Fragment,{children:r.map(u=>e.jsxs(e.Fragment,{children:[u.label," ",e.jsx("br",{})]}))}),children:["+",r==null?void 0:r.length]}),placeholder:i,onSelect:r=>{a==null||a(r==null?void 0:r.key,o,s)},onChange:h?r=>{p(""),h(r,s)}:void 0,mode:S?"multiple":void 0,className:["w-100",C].join(" "),name:n,items:o,required:w,tooltip:j,tagRender:P,rules:O,disabled:!v,label:t,allowClear:f,onSearch:_,loading:m,filterOption:g?(r,u)=>{var H,A,B;try{const I=r.toLowerCase().split(/\s+/),W=((typeof(u==null?void 0:u.children)=="string"?u==null?void 0:u.children:(A=(H=u==null?void 0:u.children)==null?void 0:H.props)==null?void 0:A.textToHighlight)??"").toLowerCase(),G=(((B=u==null?void 0:u.value)==null?void 0:B.toString())??"").toLowerCase();return I.every(L=>W.indexOf(L)>=0||G.indexOf(L)>=0)}catch{return!0}}:void 0,itemBuilder:g?r=>{const u=r.value?String(r.value):void 0;return e.jsx(b.Select.Option,{value:r.key,title:u,disabled:r.disabled,children:e.jsx($,{highlightClassName:"highlight-text",searchWords:(T??"").split(" "),autoEscape:!0,textToHighlight:u??""})},r.key)}:r=>e.jsx(b.Select.Option,{value:r.key,title:r.value,disabled:r.disabled,children:r.value},r.key)})}function D(y){const{required:o,fieldClassName:m,rules:x,fieldTooltip:d,updatable:S,label:h,name:g,fieldHelper:w}=y;return e.jsx(b.Form.Item,{label:h,name:g,required:o,rules:x,tooltip:d,help:w,children:e.jsx(b.ColorPicker,{disabledAlpha:!0,format:"hex",defaultFormat:"hex",showText:!0,trigger:"click",className:m,disabled:!S,...y.innerProps})})}exports.ColorCrudFieldComponent=D;exports.SelectCrudFieldComponent=E;exports.default=re;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { jsx as t, Fragment as
|
|
2
|
-
import { Form as
|
|
1
|
+
import { jsx as t, Fragment as P, jsxs as E } from "react/jsx-runtime";
|
|
2
|
+
import { Form as A, Radio as M, Select as j, Tag as W, ColorPicker as X } from "antd";
|
|
3
3
|
import { useEffect as B, useState as G, useMemo as _, useCallback as Y } from "react";
|
|
4
4
|
import Z from "react-highlight-words";
|
|
5
5
|
import { useTranslationLibNoNS as V } from "../locale/index.es.js";
|
|
@@ -19,58 +19,58 @@ function Re(N) {
|
|
|
19
19
|
label: i,
|
|
20
20
|
name: u,
|
|
21
21
|
type: g,
|
|
22
|
-
required:
|
|
22
|
+
required: s,
|
|
23
23
|
hidden: k,
|
|
24
24
|
rules: h = [],
|
|
25
25
|
updatable: f = !0,
|
|
26
26
|
readonly: w = !1,
|
|
27
27
|
fieldClassName: C,
|
|
28
|
-
customFormFieldRender:
|
|
28
|
+
customFormFieldRender: S,
|
|
29
29
|
fieldTooltip: v,
|
|
30
30
|
fieldHelper: y,
|
|
31
31
|
...e
|
|
32
|
-
} = N,
|
|
32
|
+
} = N, c = A.useFormInstance();
|
|
33
33
|
B(() => {
|
|
34
34
|
if (g === "select") {
|
|
35
35
|
const {
|
|
36
36
|
items: l = [],
|
|
37
37
|
onSearch: a,
|
|
38
|
-
searchOnType:
|
|
38
|
+
searchOnType: d
|
|
39
39
|
} = e;
|
|
40
|
-
!(l != null && l.length) && !
|
|
40
|
+
!(l != null && l.length) && !d && (a == null || a(void 0, c, e == null ? void 0 : e.updatingValue));
|
|
41
41
|
}
|
|
42
|
-
}, [
|
|
43
|
-
const { t:
|
|
44
|
-
if (w || k) return /* @__PURE__ */ t(
|
|
45
|
-
if (
|
|
46
|
-
return
|
|
42
|
+
}, [c, e, g, e == null ? void 0 : e.updatingValue]);
|
|
43
|
+
const { t: H } = V();
|
|
44
|
+
if (w || k) return /* @__PURE__ */ t(P, {});
|
|
45
|
+
if (S)
|
|
46
|
+
return S(c, N);
|
|
47
47
|
switch (g) {
|
|
48
48
|
case "text":
|
|
49
49
|
case "email":
|
|
50
50
|
case "password": {
|
|
51
|
-
const { onChange: l, placeholder: a, addonAfter:
|
|
51
|
+
const { onChange: l, placeholder: a, addonAfter: d, addonBefore: p } = e;
|
|
52
52
|
return /* @__PURE__ */ t(
|
|
53
53
|
ne,
|
|
54
54
|
{
|
|
55
55
|
placeholder: a,
|
|
56
56
|
disabled: !f,
|
|
57
57
|
rules: h,
|
|
58
|
-
required:
|
|
59
|
-
onChange: l ? (n) => l(n,
|
|
58
|
+
required: s,
|
|
59
|
+
onChange: l ? (n) => l(n, c) : void 0,
|
|
60
60
|
type: g,
|
|
61
61
|
name: u,
|
|
62
62
|
tooltip: v,
|
|
63
63
|
label: i,
|
|
64
64
|
className: C,
|
|
65
65
|
autoComplete: "new-password",
|
|
66
|
-
addonAfter:
|
|
66
|
+
addonAfter: d,
|
|
67
67
|
addonBefore: p,
|
|
68
68
|
help: y
|
|
69
69
|
}
|
|
70
70
|
);
|
|
71
71
|
}
|
|
72
72
|
case "number": {
|
|
73
|
-
const { onChange: l, placeholder: a, allowMinus:
|
|
73
|
+
const { onChange: l, placeholder: a, allowMinus: d, min: p, max: n, addonAfter: T, addonBefore: b } = e;
|
|
74
74
|
return /* @__PURE__ */ t(
|
|
75
75
|
oe,
|
|
76
76
|
{
|
|
@@ -78,13 +78,13 @@ function Re(N) {
|
|
|
78
78
|
disabled: !f,
|
|
79
79
|
moneyField: !!e.formatted,
|
|
80
80
|
type: g,
|
|
81
|
-
onChange: l ? (x) => l(x,
|
|
81
|
+
onChange: l ? (x) => l(x, c) : void 0,
|
|
82
82
|
rules: h,
|
|
83
83
|
autoComplete: "false",
|
|
84
|
-
required:
|
|
84
|
+
required: s,
|
|
85
85
|
tooltip: v,
|
|
86
86
|
className: C,
|
|
87
|
-
min:
|
|
87
|
+
min: d ? null : p,
|
|
88
88
|
max: n,
|
|
89
89
|
addonAfter: T,
|
|
90
90
|
addonBefore: b,
|
|
@@ -98,7 +98,7 @@ function Re(N) {
|
|
|
98
98
|
const {
|
|
99
99
|
range: l,
|
|
100
100
|
disableToday: a,
|
|
101
|
-
disabledFutureDays:
|
|
101
|
+
disabledFutureDays: d,
|
|
102
102
|
disabledPastDays: p,
|
|
103
103
|
onChange: n,
|
|
104
104
|
placeholder: T,
|
|
@@ -108,7 +108,7 @@ function Re(N) {
|
|
|
108
108
|
ae,
|
|
109
109
|
{
|
|
110
110
|
placeholder: T,
|
|
111
|
-
required:
|
|
111
|
+
required: s,
|
|
112
112
|
disabled: !f,
|
|
113
113
|
type: g,
|
|
114
114
|
format: b,
|
|
@@ -116,10 +116,10 @@ function Re(N) {
|
|
|
116
116
|
range: l,
|
|
117
117
|
name: u,
|
|
118
118
|
label: i,
|
|
119
|
-
onChange: n ? (x) => n(x,
|
|
119
|
+
onChange: n ? (x) => n(x, c) : void 0,
|
|
120
120
|
className: C,
|
|
121
121
|
disableToday: a,
|
|
122
|
-
disabledFutureDays:
|
|
122
|
+
disabledFutureDays: d,
|
|
123
123
|
disabledPastDays: p,
|
|
124
124
|
help: y
|
|
125
125
|
}
|
|
@@ -129,7 +129,7 @@ function Re(N) {
|
|
|
129
129
|
const {
|
|
130
130
|
range: l = !1,
|
|
131
131
|
disableCurrent: a,
|
|
132
|
-
disabledFuture:
|
|
132
|
+
disabledFuture: d,
|
|
133
133
|
disabledPast: p,
|
|
134
134
|
onChange: n,
|
|
135
135
|
use12Hours: T,
|
|
@@ -140,7 +140,7 @@ function Re(N) {
|
|
|
140
140
|
le,
|
|
141
141
|
{
|
|
142
142
|
placeholder: x,
|
|
143
|
-
required:
|
|
143
|
+
required: s,
|
|
144
144
|
format: b,
|
|
145
145
|
disabled: !f,
|
|
146
146
|
type: g,
|
|
@@ -149,10 +149,10 @@ function Re(N) {
|
|
|
149
149
|
use12Hours: T,
|
|
150
150
|
name: u,
|
|
151
151
|
label: i,
|
|
152
|
-
onChange: n ? (o) => n(o,
|
|
152
|
+
onChange: n ? (o) => n(o, c) : void 0,
|
|
153
153
|
className: C,
|
|
154
154
|
disableCurrent: a,
|
|
155
|
-
disabledFuture:
|
|
155
|
+
disabledFuture: d,
|
|
156
156
|
disabledPast: p,
|
|
157
157
|
help: y
|
|
158
158
|
}
|
|
@@ -165,7 +165,7 @@ function Re(N) {
|
|
|
165
165
|
re,
|
|
166
166
|
{
|
|
167
167
|
...e,
|
|
168
|
-
required:
|
|
168
|
+
required: s,
|
|
169
169
|
name: u,
|
|
170
170
|
label: i,
|
|
171
171
|
rules: h,
|
|
@@ -180,7 +180,7 @@ function Re(N) {
|
|
|
180
180
|
ee,
|
|
181
181
|
{
|
|
182
182
|
...e,
|
|
183
|
-
required:
|
|
183
|
+
required: s,
|
|
184
184
|
name: u,
|
|
185
185
|
label: i,
|
|
186
186
|
rules: h,
|
|
@@ -195,12 +195,12 @@ function Re(N) {
|
|
|
195
195
|
se,
|
|
196
196
|
{
|
|
197
197
|
...e,
|
|
198
|
-
required:
|
|
198
|
+
required: s,
|
|
199
199
|
name: u,
|
|
200
200
|
label: i,
|
|
201
201
|
rules: h,
|
|
202
202
|
fieldClassName: C,
|
|
203
|
-
form:
|
|
203
|
+
form: c,
|
|
204
204
|
updatable: f,
|
|
205
205
|
readonly: w,
|
|
206
206
|
fieldTooltip: v,
|
|
@@ -211,18 +211,18 @@ function Re(N) {
|
|
|
211
211
|
const {
|
|
212
212
|
enum: l,
|
|
213
213
|
radio: a = !1,
|
|
214
|
-
translation:
|
|
214
|
+
translation: d,
|
|
215
215
|
onChange: p,
|
|
216
216
|
onSearch: n,
|
|
217
217
|
multiple: T,
|
|
218
218
|
tagRender: b
|
|
219
219
|
} = e, x = Array.isArray(l) ? l : Object.keys(l);
|
|
220
220
|
return a ? /* @__PURE__ */ t(
|
|
221
|
-
|
|
221
|
+
A.Item,
|
|
222
222
|
{
|
|
223
223
|
...e,
|
|
224
224
|
name: u,
|
|
225
|
-
required:
|
|
225
|
+
required: s,
|
|
226
226
|
tooltip: v,
|
|
227
227
|
rules: h,
|
|
228
228
|
label: i,
|
|
@@ -234,9 +234,9 @@ function Re(N) {
|
|
|
234
234
|
...e,
|
|
235
235
|
onChange: p ? (o) => {
|
|
236
236
|
var F;
|
|
237
|
-
return p((F = o == null ? void 0 : o.target) == null ? void 0 : F.value,
|
|
237
|
+
return p((F = o == null ? void 0 : o.target) == null ? void 0 : F.value, c);
|
|
238
238
|
} : void 0,
|
|
239
|
-
children: x.map((o) => /* @__PURE__ */ t(M, { disabled: !f, value: o, children:
|
|
239
|
+
children: x.map((o) => /* @__PURE__ */ t(M, { disabled: !f, value: o, children: d ? H(d[o]) : o }, o))
|
|
240
240
|
}
|
|
241
241
|
)
|
|
242
242
|
}
|
|
@@ -248,46 +248,47 @@ function Re(N) {
|
|
|
248
248
|
const { value: F, label: R } = o, O = b[F];
|
|
249
249
|
return O ? /* @__PURE__ */ t(W, { color: O.color, children: R }) : /* @__PURE__ */ t(W, { children: R });
|
|
250
250
|
} : void 0,
|
|
251
|
-
onChange: p ? (o) => p(o,
|
|
251
|
+
onChange: p ? (o) => p(o, c) : void 0,
|
|
252
252
|
className: ["w-100", C].join(" "),
|
|
253
253
|
name: u,
|
|
254
254
|
items: x,
|
|
255
|
-
required:
|
|
255
|
+
required: s,
|
|
256
256
|
tooltip: v,
|
|
257
257
|
rules: h,
|
|
258
258
|
label: i,
|
|
259
259
|
help: y,
|
|
260
260
|
disabled: !f,
|
|
261
|
-
onSearch: n ? (o) => n(o,
|
|
261
|
+
onSearch: n ? (o) => n(o, c) : void 0,
|
|
262
262
|
allowClear: !0,
|
|
263
263
|
mode: T ? "multiple" : void 0,
|
|
264
|
-
itemBuilder: (o) => /* @__PURE__ */ t(
|
|
264
|
+
itemBuilder: (o) => /* @__PURE__ */ t(j.Option, { value: o, children: d ? H(d[o]) : o }, o)
|
|
265
265
|
}
|
|
266
266
|
);
|
|
267
267
|
}
|
|
268
268
|
case "checkbox": {
|
|
269
|
-
const { onChange: l } = e;
|
|
269
|
+
const { onChange: l, switch: a } = e;
|
|
270
270
|
return /* @__PURE__ */ t(
|
|
271
271
|
te,
|
|
272
272
|
{
|
|
273
273
|
className: C,
|
|
274
274
|
rules: h,
|
|
275
|
-
onChange: l ? (
|
|
275
|
+
onChange: l ? (d) => l(d, c) : void 0,
|
|
276
276
|
label: i,
|
|
277
277
|
tooltip: v,
|
|
278
278
|
disabled: !f,
|
|
279
279
|
name: u,
|
|
280
|
-
help: y
|
|
280
|
+
help: y,
|
|
281
|
+
switch: a
|
|
281
282
|
}
|
|
282
283
|
);
|
|
283
284
|
}
|
|
284
285
|
case "color":
|
|
285
286
|
return /* @__PURE__ */ t(
|
|
286
|
-
|
|
287
|
+
ce,
|
|
287
288
|
{
|
|
288
289
|
...e,
|
|
289
290
|
type: "color",
|
|
290
|
-
required:
|
|
291
|
+
required: s,
|
|
291
292
|
name: u,
|
|
292
293
|
label: i,
|
|
293
294
|
rules: h,
|
|
@@ -299,7 +300,7 @@ function Re(N) {
|
|
|
299
300
|
}
|
|
300
301
|
);
|
|
301
302
|
default:
|
|
302
|
-
return /* @__PURE__ */ t(
|
|
303
|
+
return /* @__PURE__ */ t(P, { children: `${g} Not Implemented` });
|
|
303
304
|
}
|
|
304
305
|
}
|
|
305
306
|
function se(N) {
|
|
@@ -307,23 +308,23 @@ function se(N) {
|
|
|
307
308
|
items: i = [],
|
|
308
309
|
loading: u,
|
|
309
310
|
searchOnType: g,
|
|
310
|
-
onSearch:
|
|
311
|
+
onSearch: s,
|
|
311
312
|
multiple: k,
|
|
312
313
|
onChange: h,
|
|
313
314
|
highlightSearch: f,
|
|
314
315
|
required: w,
|
|
315
316
|
fieldClassName: C,
|
|
316
|
-
rules:
|
|
317
|
+
rules: S,
|
|
317
318
|
fieldTooltip: v,
|
|
318
319
|
updatable: y,
|
|
319
320
|
label: e,
|
|
320
|
-
name:
|
|
321
|
-
tagRender:
|
|
321
|
+
name: c,
|
|
322
|
+
tagRender: H,
|
|
322
323
|
updatingValue: l,
|
|
323
324
|
onSet: a,
|
|
324
|
-
placeholder:
|
|
325
|
+
placeholder: d,
|
|
325
326
|
allowClear: p = !0
|
|
326
|
-
} = N, n = N.form, [T, b] = G(""), x = _(() => $.getRealName(
|
|
327
|
+
} = N, n = N.form, [T, b] = G(""), x = _(() => $.getRealName(c), [c]), o = _(() => $.getRealName(c, "upsertFieldName"), [c]), F = A.useWatch(x, n), [R, O] = G(!0);
|
|
327
328
|
B(() => {
|
|
328
329
|
a && R && F && (a == null || a(F, i, n), O(!1));
|
|
329
330
|
}, [R, n, i, x, a, F]), B(() => {
|
|
@@ -331,9 +332,9 @@ function se(N) {
|
|
|
331
332
|
}, [F]);
|
|
332
333
|
const J = Y(
|
|
333
334
|
async (r) => {
|
|
334
|
-
b(r), g && (
|
|
335
|
+
b(r), g && (s == null || s(r, n, l));
|
|
335
336
|
},
|
|
336
|
-
[n,
|
|
337
|
+
[n, s, g, l]
|
|
337
338
|
);
|
|
338
339
|
return /* @__PURE__ */ t(
|
|
339
340
|
z,
|
|
@@ -343,7 +344,7 @@ function se(N) {
|
|
|
343
344
|
maxTagPlaceholder: (r) => /* @__PURE__ */ E(
|
|
344
345
|
ie,
|
|
345
346
|
{
|
|
346
|
-
title: /* @__PURE__ */ t(
|
|
347
|
+
title: /* @__PURE__ */ t(P, { children: r.map((m) => /* @__PURE__ */ E(P, { children: [
|
|
347
348
|
m.label,
|
|
348
349
|
" ",
|
|
349
350
|
/* @__PURE__ */ t("br", {})
|
|
@@ -354,7 +355,7 @@ function se(N) {
|
|
|
354
355
|
]
|
|
355
356
|
}
|
|
356
357
|
),
|
|
357
|
-
placeholder:
|
|
358
|
+
placeholder: d,
|
|
358
359
|
onSelect: (r) => {
|
|
359
360
|
a == null || a(r == null ? void 0 : r.key, i, n);
|
|
360
361
|
},
|
|
@@ -367,8 +368,8 @@ function se(N) {
|
|
|
367
368
|
items: i,
|
|
368
369
|
required: w,
|
|
369
370
|
tooltip: v,
|
|
370
|
-
tagRender:
|
|
371
|
-
rules:
|
|
371
|
+
tagRender: H,
|
|
372
|
+
rules: S,
|
|
372
373
|
disabled: !y,
|
|
373
374
|
label: e,
|
|
374
375
|
allowClear: p,
|
|
@@ -388,7 +389,7 @@ function se(N) {
|
|
|
388
389
|
itemBuilder: f ? (r) => {
|
|
389
390
|
const m = r.value ? String(r.value) : void 0;
|
|
390
391
|
return /* @__PURE__ */ t(
|
|
391
|
-
|
|
392
|
+
j.Option,
|
|
392
393
|
{
|
|
393
394
|
value: r.key,
|
|
394
395
|
title: m,
|
|
@@ -406,7 +407,7 @@ function se(N) {
|
|
|
406
407
|
r.key
|
|
407
408
|
);
|
|
408
409
|
} : (r) => /* @__PURE__ */ t(
|
|
409
|
-
|
|
410
|
+
j.Option,
|
|
410
411
|
{
|
|
411
412
|
value: r.key,
|
|
412
413
|
title: r.value,
|
|
@@ -418,25 +419,25 @@ function se(N) {
|
|
|
418
419
|
}
|
|
419
420
|
);
|
|
420
421
|
}
|
|
421
|
-
function
|
|
422
|
+
function ce(N) {
|
|
422
423
|
const {
|
|
423
424
|
required: i,
|
|
424
425
|
fieldClassName: u,
|
|
425
426
|
rules: g,
|
|
426
|
-
fieldTooltip:
|
|
427
|
+
fieldTooltip: s,
|
|
427
428
|
updatable: k,
|
|
428
429
|
label: h,
|
|
429
430
|
name: f,
|
|
430
431
|
fieldHelper: w
|
|
431
432
|
} = N;
|
|
432
433
|
return /* @__PURE__ */ t(
|
|
433
|
-
|
|
434
|
+
A.Item,
|
|
434
435
|
{
|
|
435
436
|
label: h,
|
|
436
437
|
name: f,
|
|
437
438
|
required: i,
|
|
438
439
|
rules: g,
|
|
439
|
-
tooltip:
|
|
440
|
+
tooltip: s,
|
|
440
441
|
help: w,
|
|
441
442
|
children: /* @__PURE__ */ t(
|
|
442
443
|
X,
|
|
@@ -455,7 +456,7 @@ function me(N) {
|
|
|
455
456
|
);
|
|
456
457
|
}
|
|
457
458
|
export {
|
|
458
|
-
|
|
459
|
+
ce as ColorCrudFieldComponent,
|
|
459
460
|
se as SelectCrudFieldComponent,
|
|
460
461
|
Re as default
|
|
461
462
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react/jsx-runtime"),b=require("@ant-design/icons"),h=require("antd"),A=require("../../common/show-more/index.cjs.js"),F=require("../FileCrudField.cjs.js"),T=require("../ImageCrudField.cjs.js"),j=require("../../util/DateUtil.cjs.js"),q=require("../../util/NumberUtil.cjs.js"),g=require("../../locale/index.cjs.js"),B=require("../../util/CrudUtil.cjs.js"),m=require("../../common/error/ErrorBoundaryComponent.cjs.js");function R({type:
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react/jsx-runtime"),b=require("@ant-design/icons"),h=require("antd"),A=require("../../common/show-more/index.cjs.js"),F=require("../FileCrudField.cjs.js"),T=require("../ImageCrudField.cjs.js"),j=require("../../util/DateUtil.cjs.js"),q=require("../../util/NumberUtil.cjs.js"),g=require("../../locale/index.cjs.js"),B=require("../../util/CrudUtil.cjs.js"),m=require("../../common/error/ErrorBoundaryComponent.cjs.js");function R({type:l,render:r,...i}){try{return l==="object"?(t,e,o)=>typeof r=="function"?r(t,e,o):"":l==="select"?(t,e,o)=>{if(!t)return"-";const n=i,a=t||(n.items??[]).find(s=>s[n.innerFieldId??"key"]===e[B.getRealName(i.name,"upsertFieldName")]),c=n.multiple?Array.isArray(a)?a.map(s=>s==null?void 0:s[n.innerFieldLabel??"name"]):void 0:a==null?void 0:a[n.innerFieldLabel??"value"];return typeof r=="function"?r(c,e,o):Array.isArray(c)?c.join(", "):c}:l==="number"?(t,e,o)=>typeof r=="function"?r(t,e,o):i!=null&&i.int?q.default.toInt(t,i.formatted):q.default.toMoney(t):l==="enum"?(t,e,o)=>{var s;if(!t)return"-";const n=i;if(typeof r=="function")return r(t,e,o);if(n.multiple){const f=Array.isArray(t)?t:t?[t]:[];return typeof n.tagRender=="object"?u.jsx(m.ErrorBoundaryComponent,{children:u.jsx(h.Space,{wrap:!0,children:f.map((d,y)=>{var v,S;const x=(v=n.tagRender)==null?void 0:v[d],C=g.tWithOrWithoutNS(((S=n==null?void 0:n.translation)==null?void 0:S[d??""])??d);return x?u.jsx(h.Tag,{color:x.color,children:C},y+d):C})})}):n!=null&&n.translation?u.jsx(m.ErrorBoundaryComponent,{children:f==null?void 0:f.map(d=>{var y;return g.tWithOrWithoutNS(((y=n==null?void 0:n.translation)==null?void 0:y[d??""])??d)}).join(", ")}):f==null?void 0:f.join(", ")}const a=((s=n==null?void 0:n.translation)==null?void 0:s[t??""])??t,c=g.tWithOrWithoutNS(a);if(typeof n.tagRender=="object"){const f=n.tagRender[t];if(f)return u.jsx(h.Tag,{color:f.color,children:c})}return c}:l==="date"?(t,e,o)=>{if(!t)return"-";const n=i!=null&&i.formatTime?j.formatDateTime(t):j.formatDate(t);return u.jsx(m.ErrorBoundaryComponent,{children:typeof r=="function"?r(t,e,o):n})}:l==="checkbox"?(t,e,o)=>typeof r=="function"?r(t,e,o):t?u.jsx(b.CheckOutlined,{}):u.jsx(b.CloseOutlined,{}):l==="image"?(t,e,o)=>t?u.jsx(m.ErrorBoundaryComponent,{children:typeof r=="function"?r(t,e,o):u.jsx(T.ImageCrudCellValue,{value:t,provider:i.provider})}):"-":l==="file"?(t,e,o)=>t?u.jsx(m.ErrorBoundaryComponent,{children:typeof r=="function"?r(t,e,o):u.jsx(F.FileCrudCellValue,{value:t,provider:i.provider})}):"":l==="time"?(t,e,o)=>{if(!t)return"-";const n=i==null?void 0:i.format,a=i==null?void 0:i.use12Hours,c=j.formatTime(t,n||(a?"hh:mm:ss A":void 0));return u.jsx(m.ErrorBoundaryComponent,{children:typeof r=="function"?r(t,e,o):c})}:l==="color"?(t,e,o)=>t?typeof r=="function"?r(t,e,o):typeof t=="string"&&t.startsWith("#")?u.jsx(h.Tooltip,{title:t,children:u.jsx(h.Avatar,{style:{backgroundColor:t}})}):String(t):"-":l==="textarea"?(t,e,o)=>{if(!t)return"-";const n=i,a=n.truncated??1;return typeof r=="function"?r(t,e,o):a?u.jsx(m.ErrorBoundaryComponent,{children:u.jsx(A.ShowMore,{lines:a===!0?1:a,children:n.rich?u.jsx("div",{style:{all:"unset"},dangerouslySetInnerHTML:{__html:t}}):t})}):n.rich?u.jsx("div",{style:{all:"unset"},dangerouslySetInnerHTML:{__html:t}}):t}:typeof r=="function"?r:(t,e,o)=>t}catch(t){return console.warn("An error occurred while rendering the value for field: "+String(i.name),t),"-"}}exports.getRendererValueCrudViewer=R;
|
|
@@ -4,24 +4,24 @@ import { Space as R, Tag as S, Tooltip as w, Avatar as I } from "antd";
|
|
|
4
4
|
import { ShowMore as V } from "../../common/show-more/index.es.js";
|
|
5
5
|
import { FileCrudCellValue as k } from "../FileCrudField.es.js";
|
|
6
6
|
import { ImageCrudCellValue as x } from "../ImageCrudField.es.js";
|
|
7
|
-
import
|
|
7
|
+
import y from "../../util/DateUtil.es.js";
|
|
8
8
|
import j from "../../util/NumberUtil.es.js";
|
|
9
|
-
import { tWithOrWithoutNS as
|
|
9
|
+
import { tWithOrWithoutNS as g } from "../../locale/index.es.js";
|
|
10
10
|
import H from "../../util/CrudUtil.es.js";
|
|
11
11
|
import { ErrorBoundaryComponent as h } from "../../common/error/ErrorBoundaryComponent.es.js";
|
|
12
12
|
function z({
|
|
13
|
-
type:
|
|
13
|
+
type: c,
|
|
14
14
|
render: i,
|
|
15
15
|
...l
|
|
16
16
|
}) {
|
|
17
17
|
try {
|
|
18
|
-
return
|
|
18
|
+
return c === "object" ? (t, o, r) => typeof i == "function" ? i(t, o, r) : "" : c === "select" ? (t, o, r) => {
|
|
19
19
|
if (!t) return "-";
|
|
20
20
|
const n = l, a = t || (n.items ?? []).find(
|
|
21
21
|
(m) => m[n.innerFieldId ?? "key"] === o[H.getRealName(l.name, "upsertFieldName")]
|
|
22
|
-
),
|
|
23
|
-
return typeof i == "function" ? i(
|
|
24
|
-
} :
|
|
22
|
+
), u = n.multiple ? Array.isArray(a) ? a.map((m) => m == null ? void 0 : m[n.innerFieldLabel ?? "name"]) : void 0 : a == null ? void 0 : a[n.innerFieldLabel ?? "value"];
|
|
23
|
+
return typeof i == "function" ? i(u, o, r) : Array.isArray(u) ? u.join(", ") : u;
|
|
24
|
+
} : c === "number" ? (t, o, r) => typeof i == "function" ? i(t, o, r) : l != null && l.int ? j.toInt(t, l.formatted) : j.toMoney(t) : c === "enum" ? (t, o, r) => {
|
|
25
25
|
var m;
|
|
26
26
|
if (!t) return "-";
|
|
27
27
|
const n = l;
|
|
@@ -31,50 +31,51 @@ function z({
|
|
|
31
31
|
const f = Array.isArray(t) ? t : t ? [t] : [];
|
|
32
32
|
return typeof n.tagRender == "object" ? /* @__PURE__ */ e(h, { children: /* @__PURE__ */ e(R, { wrap: !0, children: f.map((d, s) => {
|
|
33
33
|
var b, A;
|
|
34
|
-
const v = (b = n.tagRender) == null ? void 0 : b[d], C =
|
|
34
|
+
const v = (b = n.tagRender) == null ? void 0 : b[d], C = g(
|
|
35
35
|
((A = n == null ? void 0 : n.translation) == null ? void 0 : A[d ?? ""]) ?? d
|
|
36
36
|
);
|
|
37
37
|
return v ? /* @__PURE__ */ e(S, { color: v.color, children: C }, s + d) : C;
|
|
38
38
|
}) }) }) : n != null && n.translation ? /* @__PURE__ */ e(h, { children: f == null ? void 0 : f.map(
|
|
39
39
|
(d) => {
|
|
40
40
|
var s;
|
|
41
|
-
return
|
|
41
|
+
return g(((s = n == null ? void 0 : n.translation) == null ? void 0 : s[d ?? ""]) ?? d);
|
|
42
42
|
}
|
|
43
43
|
).join(", ") }) : f == null ? void 0 : f.join(", ");
|
|
44
44
|
}
|
|
45
|
-
const a = ((m = n == null ? void 0 : n.translation) == null ? void 0 : m[t ?? ""]) ?? t,
|
|
45
|
+
const a = ((m = n == null ? void 0 : n.translation) == null ? void 0 : m[t ?? ""]) ?? t, u = g(a);
|
|
46
46
|
if (typeof n.tagRender == "object") {
|
|
47
47
|
const f = n.tagRender[t];
|
|
48
48
|
if (f)
|
|
49
|
-
return /* @__PURE__ */ e(S, { color: f.color, children:
|
|
49
|
+
return /* @__PURE__ */ e(S, { color: f.color, children: u });
|
|
50
50
|
}
|
|
51
|
-
return
|
|
52
|
-
} :
|
|
51
|
+
return u;
|
|
52
|
+
} : c === "date" ? (t, o, r) => {
|
|
53
53
|
if (!t) return "-";
|
|
54
|
-
const n = l != null && l.formatTime ?
|
|
54
|
+
const n = l != null && l.formatTime ? y.formatDateTime(t) : y.formatDate(t);
|
|
55
55
|
return /* @__PURE__ */ e(h, { children: typeof i == "function" ? i(t, o, r) : n });
|
|
56
|
-
} :
|
|
56
|
+
} : c === "checkbox" ? (t, o, r) => typeof i == "function" ? i(t, o, r) : t ? /* @__PURE__ */ e(T, {}) : /* @__PURE__ */ e(F, {}) : c === "image" ? (t, o, r) => t ? /* @__PURE__ */ e(h, { children: typeof i == "function" ? i(t, o, r) : /* @__PURE__ */ e(
|
|
57
57
|
x,
|
|
58
58
|
{
|
|
59
59
|
value: t,
|
|
60
60
|
provider: l.provider
|
|
61
61
|
}
|
|
62
|
-
) }) : "-" :
|
|
62
|
+
) }) : "-" : c === "file" ? (t, o, r) => t ? /* @__PURE__ */ e(h, { children: typeof i == "function" ? i(t, o, r) : /* @__PURE__ */ e(
|
|
63
63
|
k,
|
|
64
64
|
{
|
|
65
65
|
value: t,
|
|
66
66
|
provider: l.provider
|
|
67
67
|
}
|
|
68
|
-
) }) : "" :
|
|
68
|
+
) }) : "" : c === "time" ? (t, o, r) => {
|
|
69
69
|
if (!t) return "-";
|
|
70
|
-
const n = l == null ? void 0 : l.format, a = l == null ? void 0 : l.use12Hours,
|
|
70
|
+
const n = l == null ? void 0 : l.format, a = l == null ? void 0 : l.use12Hours, u = y.formatTime(
|
|
71
71
|
t,
|
|
72
72
|
n || (a ? "hh:mm:ss A" : void 0)
|
|
73
73
|
);
|
|
74
|
-
return /* @__PURE__ */ e(h, { children: typeof i == "function" ? i(t, o, r) :
|
|
75
|
-
} :
|
|
74
|
+
return /* @__PURE__ */ e(h, { children: typeof i == "function" ? i(t, o, r) : u });
|
|
75
|
+
} : c === "color" ? (t, o, r) => t ? typeof i == "function" ? i(t, o, r) : typeof t == "string" && t.startsWith("#") ? /* @__PURE__ */ e(w, { title: t, children: /* @__PURE__ */ e(I, { style: { backgroundColor: t } }) }) : String(t) : "-" : c === "textarea" ? (t, o, r) => {
|
|
76
76
|
if (!t) return "-";
|
|
77
|
-
const n = l, a = n.truncated ?? 1
|
|
77
|
+
const n = l, a = n.truncated ?? 1;
|
|
78
|
+
return typeof i == "function" ? i(t, o, r) : a ? /* @__PURE__ */ e(h, { children: /* @__PURE__ */ e(V, { lines: a === !0 ? 1 : a, children: n.rich ? /* @__PURE__ */ e(
|
|
78
79
|
"div",
|
|
79
80
|
{
|
|
80
81
|
style: { all: "unset" },
|
|
@@ -87,7 +88,6 @@ function z({
|
|
|
87
88
|
dangerouslySetInnerHTML: { __html: t }
|
|
88
89
|
}
|
|
89
90
|
) : t;
|
|
90
|
-
return console.log("component", c), c;
|
|
91
91
|
} : typeof i == "function" ? i : (t, o, r) => t;
|
|
92
92
|
} catch (t) {
|
|
93
93
|
return console.warn(
|
package/dist/crud-component.css
CHANGED
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
* https://quilljs.com/
|
|
4
4
|
* Copyright (c) 2014, Jason Chen
|
|
5
5
|
* Copyright (c) 2013, salesforce.com
|
|
6
|
-
*/.ql-container{box-sizing:border-box;font-family:Helvetica,Arial,sans-serif;font-size:13px;height:100%;margin:0;position:relative}.ql-container.ql-disabled .ql-tooltip{visibility:hidden}.ql-container.ql-disabled .ql-editor ul[data-checked]>li:before{pointer-events:none}.ql-clipboard{left:-100000px;height:1px;overflow-y:hidden;position:absolute;top:50%}.ql-clipboard p{margin:0;padding:0}.ql-editor{box-sizing:border-box;line-height:1.42;height:100%;outline:none;overflow-y:auto;padding:12px 15px;tab-size:4;-moz-tab-size:4;text-align:left;white-space:pre-wrap;word-wrap:break-word}.ql-editor>*{cursor:text}.ql-editor p,.ql-editor ol,.ql-editor ul,.ql-editor pre,.ql-editor blockquote,.ql-editor h1,.ql-editor h2,.ql-editor h3,.ql-editor h4,.ql-editor h5,.ql-editor h6{margin:0;padding:0;counter-reset:list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9}.ql-editor ol,.ql-editor ul{padding-left:1.5em}.ql-editor ol>li,.ql-editor ul>li{list-style-type:none}.ql-editor ul>li:before{content:"•"}.ql-editor ul[data-checked=true],.ql-editor ul[data-checked=false]{pointer-events:none}.ql-editor ul[data-checked=true]>li *,.ql-editor ul[data-checked=false]>li *{pointer-events:all}.ql-editor ul[data-checked=true]>li:before,.ql-editor ul[data-checked=false]>li:before{color:#777;cursor:pointer;pointer-events:all}.ql-editor ul[data-checked=true]>li:before{content:"☑"}.ql-editor ul[data-checked=false]>li:before{content:"☐"}.ql-editor li:before{display:inline-block;white-space:nowrap;width:1.2em}.ql-editor li:not(.ql-direction-rtl):before{margin-left:-1.5em;margin-right:.3em;text-align:right}.ql-editor li.ql-direction-rtl:before{margin-left:.3em;margin-right:-1.5em}.ql-editor ol li:not(.ql-direction-rtl),.ql-editor ul li:not(.ql-direction-rtl){padding-left:1.5em}.ql-editor ol li.ql-direction-rtl,.ql-editor ul li.ql-direction-rtl{padding-right:1.5em}.ql-editor ol li{counter-reset:list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;counter-increment:list-0}.ql-editor ol li:before{content:counter(list-0,decimal) ". "}.ql-editor ol li.ql-indent-1{counter-increment:list-1}.ql-editor ol li.ql-indent-1:before{content:counter(list-1,lower-alpha) ". "}.ql-editor ol li.ql-indent-1{counter-reset:list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-2{counter-increment:list-2}.ql-editor ol li.ql-indent-2:before{content:counter(list-2,lower-roman) ". "}.ql-editor ol li.ql-indent-2{counter-reset:list-3 list-4 list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-3{counter-increment:list-3}.ql-editor ol li.ql-indent-3:before{content:counter(list-3,decimal) ". "}.ql-editor ol li.ql-indent-3{counter-reset:list-4 list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-4{counter-increment:list-4}.ql-editor ol li.ql-indent-4:before{content:counter(list-4,lower-alpha) ". "}.ql-editor ol li.ql-indent-4{counter-reset:list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-5{counter-increment:list-5}.ql-editor ol li.ql-indent-5:before{content:counter(list-5,lower-roman) ". "}.ql-editor ol li.ql-indent-5{counter-reset:list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-6{counter-increment:list-6}.ql-editor ol li.ql-indent-6:before{content:counter(list-6,decimal) ". "}.ql-editor ol li.ql-indent-6{counter-reset:list-7 list-8 list-9}.ql-editor ol li.ql-indent-7{counter-increment:list-7}.ql-editor ol li.ql-indent-7:before{content:counter(list-7,lower-alpha) ". "}.ql-editor ol li.ql-indent-7{counter-reset:list-8 list-9}.ql-editor ol li.ql-indent-8{counter-increment:list-8}.ql-editor ol li.ql-indent-8:before{content:counter(list-8,lower-roman) ". "}.ql-editor ol li.ql-indent-8{counter-reset:list-9}.ql-editor ol li.ql-indent-9{counter-increment:list-9}.ql-editor ol li.ql-indent-9:before{content:counter(list-9,decimal) ". "}.ql-editor .ql-indent-1:not(.ql-direction-rtl){padding-left:3em}.ql-editor li.ql-indent-1:not(.ql-direction-rtl){padding-left:4.5em}.ql-editor .ql-indent-1.ql-direction-rtl.ql-align-right{padding-right:3em}.ql-editor li.ql-indent-1.ql-direction-rtl.ql-align-right{padding-right:4.5em}.ql-editor .ql-indent-2:not(.ql-direction-rtl){padding-left:6em}.ql-editor li.ql-indent-2:not(.ql-direction-rtl){padding-left:7.5em}.ql-editor .ql-indent-2.ql-direction-rtl.ql-align-right{padding-right:6em}.ql-editor li.ql-indent-2.ql-direction-rtl.ql-align-right{padding-right:7.5em}.ql-editor .ql-indent-3:not(.ql-direction-rtl){padding-left:9em}.ql-editor li.ql-indent-3:not(.ql-direction-rtl){padding-left:10.5em}.ql-editor .ql-indent-3.ql-direction-rtl.ql-align-right{padding-right:9em}.ql-editor li.ql-indent-3.ql-direction-rtl.ql-align-right{padding-right:10.5em}.ql-editor .ql-indent-4:not(.ql-direction-rtl){padding-left:12em}.ql-editor li.ql-indent-4:not(.ql-direction-rtl){padding-left:13.5em}.ql-editor .ql-indent-4.ql-direction-rtl.ql-align-right{padding-right:12em}.ql-editor li.ql-indent-4.ql-direction-rtl.ql-align-right{padding-right:13.5em}.ql-editor .ql-indent-5:not(.ql-direction-rtl){padding-left:15em}.ql-editor li.ql-indent-5:not(.ql-direction-rtl){padding-left:16.5em}.ql-editor .ql-indent-5.ql-direction-rtl.ql-align-right{padding-right:15em}.ql-editor li.ql-indent-5.ql-direction-rtl.ql-align-right{padding-right:16.5em}.ql-editor .ql-indent-6:not(.ql-direction-rtl){padding-left:18em}.ql-editor li.ql-indent-6:not(.ql-direction-rtl){padding-left:19.5em}.ql-editor .ql-indent-6.ql-direction-rtl.ql-align-right{padding-right:18em}.ql-editor li.ql-indent-6.ql-direction-rtl.ql-align-right{padding-right:19.5em}.ql-editor .ql-indent-7:not(.ql-direction-rtl){padding-left:21em}.ql-editor li.ql-indent-7:not(.ql-direction-rtl){padding-left:22.5em}.ql-editor .ql-indent-7.ql-direction-rtl.ql-align-right{padding-right:21em}.ql-editor li.ql-indent-7.ql-direction-rtl.ql-align-right{padding-right:22.5em}.ql-editor .ql-indent-8:not(.ql-direction-rtl){padding-left:24em}.ql-editor li.ql-indent-8:not(.ql-direction-rtl){padding-left:25.5em}.ql-editor .ql-indent-8.ql-direction-rtl.ql-align-right{padding-right:24em}.ql-editor li.ql-indent-8.ql-direction-rtl.ql-align-right{padding-right:25.5em}.ql-editor .ql-indent-9:not(.ql-direction-rtl){padding-left:27em}.ql-editor li.ql-indent-9:not(.ql-direction-rtl){padding-left:28.5em}.ql-editor .ql-indent-9.ql-direction-rtl.ql-align-right{padding-right:27em}.ql-editor li.ql-indent-9.ql-direction-rtl.ql-align-right{padding-right:28.5em}.ql-editor .ql-video{display:block;max-width:100%}.ql-editor .ql-video.ql-align-center{margin:0 auto}.ql-editor .ql-video.ql-align-right{margin:0 0 0 auto}.ql-editor .ql-bg-black{background-color:#000}.ql-editor .ql-bg-red{background-color:#e60000}.ql-editor .ql-bg-orange{background-color:#f90}.ql-editor .ql-bg-yellow{background-color:#ff0}.ql-editor .ql-bg-green{background-color:#008a00}.ql-editor .ql-bg-blue{background-color:#06c}.ql-editor .ql-bg-purple{background-color:#93f}.ql-editor .ql-color-white{color:#fff}.ql-editor .ql-color-red{color:#e60000}.ql-editor .ql-color-orange{color:#f90}.ql-editor .ql-color-yellow{color:#ff0}.ql-editor .ql-color-green{color:#008a00}.ql-editor .ql-color-blue{color:#06c}.ql-editor .ql-color-purple{color:#93f}.ql-editor .ql-font-serif{font-family:Georgia,Times New Roman,serif}.ql-editor .ql-font-monospace{font-family:Monaco,Courier New,monospace}.ql-editor .ql-size-small{font-size:.75em}.ql-editor .ql-size-large{font-size:1.5em}.ql-editor .ql-size-huge{font-size:2.5em}.ql-editor .ql-direction-rtl{direction:rtl;text-align:inherit}.ql-editor .ql-align-center{text-align:center}.ql-editor .ql-align-justify{text-align:justify}.ql-editor .ql-align-right{text-align:right}.ql-editor.ql-blank:before{color:#0009;content:attr(data-placeholder);font-style:italic;left:15px;pointer-events:none;position:absolute;right:15px}.ql-snow.ql-toolbar:after,.ql-snow .ql-toolbar:after{clear:both;content:"";display:table}.ql-snow.ql-toolbar button,.ql-snow .ql-toolbar button{background:none;border:none;cursor:pointer;display:inline-block;float:left;height:24px;padding:3px 5px;width:28px}.ql-snow.ql-toolbar button svg,.ql-snow .ql-toolbar button svg{float:left;height:100%}.ql-snow.ql-toolbar button:active:hover,.ql-snow .ql-toolbar button:active:hover{outline:none}.ql-snow.ql-toolbar input.ql-image[type=file],.ql-snow .ql-toolbar input.ql-image[type=file]{display:none}.ql-snow.ql-toolbar button:hover,.ql-snow .ql-toolbar button:hover,.ql-snow.ql-toolbar button:focus,.ql-snow .ql-toolbar button:focus,.ql-snow.ql-toolbar button.ql-active,.ql-snow .ql-toolbar button.ql-active,.ql-snow.ql-toolbar .ql-picker-label:hover,.ql-snow .ql-toolbar .ql-picker-label:hover,.ql-snow.ql-toolbar .ql-picker-label.ql-active,.ql-snow .ql-toolbar .ql-picker-label.ql-active,.ql-snow.ql-toolbar .ql-picker-item:hover,.ql-snow .ql-toolbar .ql-picker-item:hover,.ql-snow.ql-toolbar .ql-picker-item.ql-selected,.ql-snow .ql-toolbar .ql-picker-item.ql-selected{color:#06c}.ql-snow.ql-toolbar button:hover .ql-fill,.ql-snow .ql-toolbar button:hover .ql-fill,.ql-snow.ql-toolbar button:focus .ql-fill,.ql-snow .ql-toolbar button:focus .ql-fill,.ql-snow.ql-toolbar button.ql-active .ql-fill,.ql-snow .ql-toolbar button.ql-active .ql-fill,.ql-snow.ql-toolbar .ql-picker-label:hover .ql-fill,.ql-snow .ql-toolbar .ql-picker-label:hover .ql-fill,.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-fill,.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-fill,.ql-snow.ql-toolbar .ql-picker-item:hover .ql-fill,.ql-snow .ql-toolbar .ql-picker-item:hover .ql-fill,.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-fill,.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-fill,.ql-snow.ql-toolbar button:hover .ql-stroke.ql-fill,.ql-snow .ql-toolbar button:hover .ql-stroke.ql-fill,.ql-snow.ql-toolbar button:focus .ql-stroke.ql-fill,.ql-snow .ql-toolbar button:focus .ql-stroke.ql-fill,.ql-snow.ql-toolbar button.ql-active .ql-stroke.ql-fill,.ql-snow .ql-toolbar button.ql-active .ql-stroke.ql-fill,.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill,.ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill,.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill,.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill,.ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill,.ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill,.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill,.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill{fill:#06c}.ql-snow.ql-toolbar button:hover .ql-stroke,.ql-snow .ql-toolbar button:hover .ql-stroke,.ql-snow.ql-toolbar button:focus .ql-stroke,.ql-snow .ql-toolbar button:focus .ql-stroke,.ql-snow.ql-toolbar button.ql-active .ql-stroke,.ql-snow .ql-toolbar button.ql-active .ql-stroke,.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke,.ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke,.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke,.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke,.ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke,.ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke,.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke,.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke,.ql-snow.ql-toolbar button:hover .ql-stroke-miter,.ql-snow .ql-toolbar button:hover .ql-stroke-miter,.ql-snow.ql-toolbar button:focus .ql-stroke-miter,.ql-snow .ql-toolbar button:focus .ql-stroke-miter,.ql-snow.ql-toolbar button.ql-active .ql-stroke-miter,.ql-snow .ql-toolbar button.ql-active .ql-stroke-miter,.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke-miter,.ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke-miter,.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter,.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter,.ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke-miter,.ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke-miter,.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter,.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter{stroke:#06c}@media (pointer: coarse){.ql-snow.ql-toolbar button:hover:not(.ql-active),.ql-snow .ql-toolbar button:hover:not(.ql-active){color:#444}.ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-fill,.ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-fill,.ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke.ql-fill,.ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke.ql-fill{fill:#444}.ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke,.ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke,.ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke-miter,.ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke-miter{stroke:#444}}.ql-snow,.ql-snow *{box-sizing:border-box}.ql-snow .ql-hidden{display:none}.ql-snow .ql-out-bottom,.ql-snow .ql-out-top{visibility:hidden}.ql-snow .ql-tooltip{position:absolute;transform:translateY(10px)}.ql-snow .ql-tooltip a{cursor:pointer;text-decoration:none}.ql-snow .ql-tooltip.ql-flip{transform:translateY(-10px)}.ql-snow .ql-formats{display:inline-block;vertical-align:middle}.ql-snow .ql-formats:after{clear:both;content:"";display:table}.ql-snow .ql-stroke{fill:none;stroke:#444;stroke-linecap:round;stroke-linejoin:round;stroke-width:2}.ql-snow .ql-stroke-miter{fill:none;stroke:#444;stroke-miterlimit:10;stroke-width:2}.ql-snow .ql-fill,.ql-snow .ql-stroke.ql-fill{fill:#444}.ql-snow .ql-empty{fill:none}.ql-snow .ql-even{fill-rule:evenodd}.ql-snow .ql-thin,.ql-snow .ql-stroke.ql-thin{stroke-width:1}.ql-snow .ql-transparent{opacity:.4}.ql-snow .ql-direction svg:last-child{display:none}.ql-snow .ql-direction.ql-active svg:last-child{display:inline}.ql-snow .ql-direction.ql-active svg:first-child{display:none}.ql-snow .ql-editor h1{font-size:2em}.ql-snow .ql-editor h2{font-size:1.5em}.ql-snow .ql-editor h3{font-size:1.17em}.ql-snow .ql-editor h4{font-size:1em}.ql-snow .ql-editor h5{font-size:.83em}.ql-snow .ql-editor h6{font-size:.67em}.ql-snow .ql-editor a{text-decoration:underline}.ql-snow .ql-editor blockquote{border-left:4px solid #ccc;margin-bottom:5px;margin-top:5px;padding-left:16px}.ql-snow .ql-editor code,.ql-snow .ql-editor pre{background-color:#f0f0f0;border-radius:3px}.ql-snow .ql-editor pre{white-space:pre-wrap;margin-bottom:5px;margin-top:5px;padding:5px 10px}.ql-snow .ql-editor code{font-size:85%;padding:2px 4px}.ql-snow .ql-editor pre.ql-syntax{background-color:#23241f;color:#f8f8f2;overflow:visible}.ql-snow .ql-editor img{max-width:100%}.ql-snow .ql-picker{color:#444;display:inline-block;float:left;font-size:14px;font-weight:500;height:24px;position:relative;vertical-align:middle}.ql-snow .ql-picker-label{cursor:pointer;display:inline-block;height:100%;padding-left:8px;padding-right:2px;position:relative;width:100%}.ql-snow .ql-picker-label:before{display:inline-block;line-height:22px}.ql-snow .ql-picker-options{background-color:#fff;display:none;min-width:100%;padding:4px 8px;position:absolute;white-space:nowrap}.ql-snow .ql-picker-options .ql-picker-item{cursor:pointer;display:block;padding-bottom:5px;padding-top:5px}.ql-snow .ql-picker.ql-expanded .ql-picker-label{color:#ccc;z-index:2}.ql-snow .ql-picker.ql-expanded .ql-picker-label .ql-fill{fill:#ccc}.ql-snow .ql-picker.ql-expanded .ql-picker-label .ql-stroke{stroke:#ccc}.ql-snow .ql-picker.ql-expanded .ql-picker-options{display:block;margin-top:-1px;top:100%;z-index:1}.ql-snow .ql-color-picker,.ql-snow .ql-icon-picker{width:28px}.ql-snow .ql-color-picker .ql-picker-label,.ql-snow .ql-icon-picker .ql-picker-label{padding:2px 4px}.ql-snow .ql-color-picker .ql-picker-label svg,.ql-snow .ql-icon-picker .ql-picker-label svg{right:4px}.ql-snow .ql-icon-picker .ql-picker-options{padding:4px 0}.ql-snow .ql-icon-picker .ql-picker-item{height:24px;width:24px;padding:2px 4px}.ql-snow .ql-color-picker .ql-picker-options{padding:3px 5px;width:152px}.ql-snow .ql-color-picker .ql-picker-item{border:1px solid transparent;float:left;height:16px;margin:2px;padding:0;width:16px}.ql-snow .ql-picker:not(.ql-color-picker):not(.ql-icon-picker) svg{position:absolute;margin-top:-9px;right:0;top:50%;width:18px}.ql-snow .ql-picker.ql-header .ql-picker-label[data-label]:not([data-label=""]):before,.ql-snow .ql-picker.ql-font .ql-picker-label[data-label]:not([data-label=""]):before,.ql-snow .ql-picker.ql-size .ql-picker-label[data-label]:not([data-label=""]):before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-label]:not([data-label=""]):before,.ql-snow .ql-picker.ql-font .ql-picker-item[data-label]:not([data-label=""]):before,.ql-snow .ql-picker.ql-size .ql-picker-item[data-label]:not([data-label=""]):before{content:attr(data-label)}.ql-snow .ql-picker.ql-header{width:98px}.ql-snow .ql-picker.ql-header .ql-picker-label:before,.ql-snow .ql-picker.ql-header .ql-picker-item:before{content:"Normal"}.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="1"]:before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="1"]:before{content:"Heading 1"}.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="2"]:before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]:before{content:"Heading 2"}.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="3"]:before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]:before{content:"Heading 3"}.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="4"]:before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="4"]:before{content:"Heading 4"}.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="5"]:before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="5"]:before{content:"Heading 5"}.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="6"]:before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="6"]:before{content:"Heading 6"}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="1"]:before{font-size:2em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]:before{font-size:1.5em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]:before{font-size:1.17em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="4"]:before{font-size:1em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="5"]:before{font-size:.83em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="6"]:before{font-size:.67em}.ql-snow .ql-picker.ql-font{width:108px}.ql-snow .ql-picker.ql-font .ql-picker-label:before,.ql-snow .ql-picker.ql-font .ql-picker-item:before{content:"Sans Serif"}.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=serif]:before,.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=serif]:before{content:"Serif"}.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=monospace]:before,.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=monospace]:before{content:"Monospace"}.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=serif]:before{font-family:Georgia,Times New Roman,serif}.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=monospace]:before{font-family:Monaco,Courier New,monospace}.ql-snow .ql-picker.ql-size{width:98px}.ql-snow .ql-picker.ql-size .ql-picker-label:before,.ql-snow .ql-picker.ql-size .ql-picker-item:before{content:"Normal"}.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=small]:before,.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=small]:before{content:"Small"}.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=large]:before,.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=large]:before{content:"Large"}.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=huge]:before,.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=huge]:before{content:"Huge"}.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=small]:before{font-size:10px}.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=large]:before{font-size:18px}.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=huge]:before{font-size:32px}.ql-snow .ql-color-picker.ql-background .ql-picker-item{background-color:#fff}.ql-snow .ql-color-picker.ql-color .ql-picker-item{background-color:#000}.ql-toolbar.ql-snow{border:1px solid #ccc;box-sizing:border-box;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;padding:8px}.ql-toolbar.ql-snow .ql-formats{margin-right:15px}.ql-toolbar.ql-snow .ql-picker-label{border:1px solid transparent}.ql-toolbar.ql-snow .ql-picker-options{border:1px solid transparent;box-shadow:#0003 0 2px 8px}.ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-label,.ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-options{border-color:#ccc}.ql-toolbar.ql-snow .ql-color-picker .ql-picker-item.ql-selected,.ql-toolbar.ql-snow .ql-color-picker .ql-picker-item:hover{border-color:#000}.ql-toolbar.ql-snow+.ql-container.ql-snow{border-top:0px}.ql-snow .ql-tooltip{background-color:#fff;border:1px solid #ccc;box-shadow:0 0 5px #ddd;color:#444;padding:5px 12px;white-space:nowrap}.ql-snow .ql-tooltip:before{content:"Visit URL:";line-height:26px;margin-right:8px}.ql-snow .ql-tooltip input[type=text]{display:none;border:1px solid #ccc;font-size:13px;height:26px;margin:0;padding:3px 5px;width:170px}.ql-snow .ql-tooltip a.ql-preview{display:inline-block;max-width:200px;overflow-x:hidden;text-overflow:ellipsis;vertical-align:top}.ql-snow .ql-tooltip a.ql-action:after{border-right:1px solid #ccc;content:"Edit";margin-left:16px;padding-right:8px}.ql-snow .ql-tooltip a.ql-remove:before{content:"Remove";margin-left:8px}.ql-snow .ql-tooltip a{line-height:26px}.ql-snow .ql-tooltip.ql-editing a.ql-preview,.ql-snow .ql-tooltip.ql-editing a.ql-remove{display:none}.ql-snow .ql-tooltip.ql-editing input[type=text]{display:inline-block}.ql-snow .ql-tooltip.ql-editing a.ql-action:after{border-right:0px;content:"Save";padding-right:0}.ql-snow .ql-tooltip[data-mode=link]:before{content:"Enter link:"}.ql-snow .ql-tooltip[data-mode=formula]:before{content:"Enter formula:"}.ql-snow .ql-tooltip[data-mode=video]:before{content:"Enter video:"}.ql-snow a{color:#06c}.ql-container.ql-snow{border:1px solid #ccc}.dark .ql-toolbar.ql-snow,.dark .ql-container.ql-snow{@apply border border-[#424242];}.ql-toolbar.ql-snow{border-top-left-radius:6px;border-top-right-radius:6px;@apply border border-[#d9d9d9];}.ql-container.ql-snow{border-bottom-left-radius:6px;border-bottom-right-radius:6px;@apply border border-[#d9d9d9];}.quill{border-radius:6px}.show-more-less-clickable{color:#209bff;cursor:pointer}.show-more-less-clickable:hover{text-decoration:underline}
|
|
6
|
+
*/.ql-container{box-sizing:border-box;font-family:Helvetica,Arial,sans-serif;font-size:13px;height:100%;margin:0;position:relative}.ql-container.ql-disabled .ql-tooltip{visibility:hidden}.ql-container.ql-disabled .ql-editor ul[data-checked]>li:before{pointer-events:none}.ql-clipboard{left:-100000px;height:1px;overflow-y:hidden;position:absolute;top:50%}.ql-clipboard p{margin:0;padding:0}.ql-editor{box-sizing:border-box;line-height:1.42;height:100%;outline:none;overflow-y:auto;padding:12px 15px;tab-size:4;-moz-tab-size:4;text-align:left;white-space:pre-wrap;word-wrap:break-word}.ql-editor>*{cursor:text}.ql-editor p,.ql-editor ol,.ql-editor ul,.ql-editor pre,.ql-editor blockquote,.ql-editor h1,.ql-editor h2,.ql-editor h3,.ql-editor h4,.ql-editor h5,.ql-editor h6{margin:0;padding:0;counter-reset:list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9}.ql-editor ol,.ql-editor ul{padding-left:1.5em}.ql-editor ol>li,.ql-editor ul>li{list-style-type:none}.ql-editor ul>li:before{content:"•"}.ql-editor ul[data-checked=true],.ql-editor ul[data-checked=false]{pointer-events:none}.ql-editor ul[data-checked=true]>li *,.ql-editor ul[data-checked=false]>li *{pointer-events:all}.ql-editor ul[data-checked=true]>li:before,.ql-editor ul[data-checked=false]>li:before{color:#777;cursor:pointer;pointer-events:all}.ql-editor ul[data-checked=true]>li:before{content:"☑"}.ql-editor ul[data-checked=false]>li:before{content:"☐"}.ql-editor li:before{display:inline-block;white-space:nowrap;width:1.2em}.ql-editor li:not(.ql-direction-rtl):before{margin-left:-1.5em;margin-right:.3em;text-align:right}.ql-editor li.ql-direction-rtl:before{margin-left:.3em;margin-right:-1.5em}.ql-editor ol li:not(.ql-direction-rtl),.ql-editor ul li:not(.ql-direction-rtl){padding-left:1.5em}.ql-editor ol li.ql-direction-rtl,.ql-editor ul li.ql-direction-rtl{padding-right:1.5em}.ql-editor ol li{counter-reset:list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;counter-increment:list-0}.ql-editor ol li:before{content:counter(list-0,decimal) ". "}.ql-editor ol li.ql-indent-1{counter-increment:list-1}.ql-editor ol li.ql-indent-1:before{content:counter(list-1,lower-alpha) ". "}.ql-editor ol li.ql-indent-1{counter-reset:list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-2{counter-increment:list-2}.ql-editor ol li.ql-indent-2:before{content:counter(list-2,lower-roman) ". "}.ql-editor ol li.ql-indent-2{counter-reset:list-3 list-4 list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-3{counter-increment:list-3}.ql-editor ol li.ql-indent-3:before{content:counter(list-3,decimal) ". "}.ql-editor ol li.ql-indent-3{counter-reset:list-4 list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-4{counter-increment:list-4}.ql-editor ol li.ql-indent-4:before{content:counter(list-4,lower-alpha) ". "}.ql-editor ol li.ql-indent-4{counter-reset:list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-5{counter-increment:list-5}.ql-editor ol li.ql-indent-5:before{content:counter(list-5,lower-roman) ". "}.ql-editor ol li.ql-indent-5{counter-reset:list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-6{counter-increment:list-6}.ql-editor ol li.ql-indent-6:before{content:counter(list-6,decimal) ". "}.ql-editor ol li.ql-indent-6{counter-reset:list-7 list-8 list-9}.ql-editor ol li.ql-indent-7{counter-increment:list-7}.ql-editor ol li.ql-indent-7:before{content:counter(list-7,lower-alpha) ". "}.ql-editor ol li.ql-indent-7{counter-reset:list-8 list-9}.ql-editor ol li.ql-indent-8{counter-increment:list-8}.ql-editor ol li.ql-indent-8:before{content:counter(list-8,lower-roman) ". "}.ql-editor ol li.ql-indent-8{counter-reset:list-9}.ql-editor ol li.ql-indent-9{counter-increment:list-9}.ql-editor ol li.ql-indent-9:before{content:counter(list-9,decimal) ". "}.ql-editor .ql-indent-1:not(.ql-direction-rtl){padding-left:3em}.ql-editor li.ql-indent-1:not(.ql-direction-rtl){padding-left:4.5em}.ql-editor .ql-indent-1.ql-direction-rtl.ql-align-right{padding-right:3em}.ql-editor li.ql-indent-1.ql-direction-rtl.ql-align-right{padding-right:4.5em}.ql-editor .ql-indent-2:not(.ql-direction-rtl){padding-left:6em}.ql-editor li.ql-indent-2:not(.ql-direction-rtl){padding-left:7.5em}.ql-editor .ql-indent-2.ql-direction-rtl.ql-align-right{padding-right:6em}.ql-editor li.ql-indent-2.ql-direction-rtl.ql-align-right{padding-right:7.5em}.ql-editor .ql-indent-3:not(.ql-direction-rtl){padding-left:9em}.ql-editor li.ql-indent-3:not(.ql-direction-rtl){padding-left:10.5em}.ql-editor .ql-indent-3.ql-direction-rtl.ql-align-right{padding-right:9em}.ql-editor li.ql-indent-3.ql-direction-rtl.ql-align-right{padding-right:10.5em}.ql-editor .ql-indent-4:not(.ql-direction-rtl){padding-left:12em}.ql-editor li.ql-indent-4:not(.ql-direction-rtl){padding-left:13.5em}.ql-editor .ql-indent-4.ql-direction-rtl.ql-align-right{padding-right:12em}.ql-editor li.ql-indent-4.ql-direction-rtl.ql-align-right{padding-right:13.5em}.ql-editor .ql-indent-5:not(.ql-direction-rtl){padding-left:15em}.ql-editor li.ql-indent-5:not(.ql-direction-rtl){padding-left:16.5em}.ql-editor .ql-indent-5.ql-direction-rtl.ql-align-right{padding-right:15em}.ql-editor li.ql-indent-5.ql-direction-rtl.ql-align-right{padding-right:16.5em}.ql-editor .ql-indent-6:not(.ql-direction-rtl){padding-left:18em}.ql-editor li.ql-indent-6:not(.ql-direction-rtl){padding-left:19.5em}.ql-editor .ql-indent-6.ql-direction-rtl.ql-align-right{padding-right:18em}.ql-editor li.ql-indent-6.ql-direction-rtl.ql-align-right{padding-right:19.5em}.ql-editor .ql-indent-7:not(.ql-direction-rtl){padding-left:21em}.ql-editor li.ql-indent-7:not(.ql-direction-rtl){padding-left:22.5em}.ql-editor .ql-indent-7.ql-direction-rtl.ql-align-right{padding-right:21em}.ql-editor li.ql-indent-7.ql-direction-rtl.ql-align-right{padding-right:22.5em}.ql-editor .ql-indent-8:not(.ql-direction-rtl){padding-left:24em}.ql-editor li.ql-indent-8:not(.ql-direction-rtl){padding-left:25.5em}.ql-editor .ql-indent-8.ql-direction-rtl.ql-align-right{padding-right:24em}.ql-editor li.ql-indent-8.ql-direction-rtl.ql-align-right{padding-right:25.5em}.ql-editor .ql-indent-9:not(.ql-direction-rtl){padding-left:27em}.ql-editor li.ql-indent-9:not(.ql-direction-rtl){padding-left:28.5em}.ql-editor .ql-indent-9.ql-direction-rtl.ql-align-right{padding-right:27em}.ql-editor li.ql-indent-9.ql-direction-rtl.ql-align-right{padding-right:28.5em}.ql-editor .ql-video{display:block;max-width:100%}.ql-editor .ql-video.ql-align-center{margin:0 auto}.ql-editor .ql-video.ql-align-right{margin:0 0 0 auto}.ql-editor .ql-bg-black{background-color:#000}.ql-editor .ql-bg-red{background-color:#e60000}.ql-editor .ql-bg-orange{background-color:#f90}.ql-editor .ql-bg-yellow{background-color:#ff0}.ql-editor .ql-bg-green{background-color:#008a00}.ql-editor .ql-bg-blue{background-color:#06c}.ql-editor .ql-bg-purple{background-color:#93f}.ql-editor .ql-color-white{color:#fff}.ql-editor .ql-color-red{color:#e60000}.ql-editor .ql-color-orange{color:#f90}.ql-editor .ql-color-yellow{color:#ff0}.ql-editor .ql-color-green{color:#008a00}.ql-editor .ql-color-blue{color:#06c}.ql-editor .ql-color-purple{color:#93f}.ql-editor .ql-font-serif{font-family:Georgia,Times New Roman,serif}.ql-editor .ql-font-monospace{font-family:Monaco,Courier New,monospace}.ql-editor .ql-size-small{font-size:.75em}.ql-editor .ql-size-large{font-size:1.5em}.ql-editor .ql-size-huge{font-size:2.5em}.ql-editor .ql-direction-rtl{direction:rtl;text-align:inherit}.ql-editor .ql-align-center{text-align:center}.ql-editor .ql-align-justify{text-align:justify}.ql-editor .ql-align-right{text-align:right}.ql-editor.ql-blank:before{color:#0009;content:attr(data-placeholder);font-style:italic;left:15px;pointer-events:none;position:absolute;right:15px}.ql-snow.ql-toolbar:after,.ql-snow .ql-toolbar:after{clear:both;content:"";display:table}.ql-snow.ql-toolbar button,.ql-snow .ql-toolbar button{background:none;border:none;cursor:pointer;display:inline-block;float:left;height:24px;padding:3px 5px;width:28px}.ql-snow.ql-toolbar button svg,.ql-snow .ql-toolbar button svg{float:left;height:100%}.ql-snow.ql-toolbar button:active:hover,.ql-snow .ql-toolbar button:active:hover{outline:none}.ql-snow.ql-toolbar input.ql-image[type=file],.ql-snow .ql-toolbar input.ql-image[type=file]{display:none}.ql-snow.ql-toolbar button:hover,.ql-snow .ql-toolbar button:hover,.ql-snow.ql-toolbar button:focus,.ql-snow .ql-toolbar button:focus,.ql-snow.ql-toolbar button.ql-active,.ql-snow .ql-toolbar button.ql-active,.ql-snow.ql-toolbar .ql-picker-label:hover,.ql-snow .ql-toolbar .ql-picker-label:hover,.ql-snow.ql-toolbar .ql-picker-label.ql-active,.ql-snow .ql-toolbar .ql-picker-label.ql-active,.ql-snow.ql-toolbar .ql-picker-item:hover,.ql-snow .ql-toolbar .ql-picker-item:hover,.ql-snow.ql-toolbar .ql-picker-item.ql-selected,.ql-snow .ql-toolbar .ql-picker-item.ql-selected{color:#06c}.ql-snow.ql-toolbar button:hover .ql-fill,.ql-snow .ql-toolbar button:hover .ql-fill,.ql-snow.ql-toolbar button:focus .ql-fill,.ql-snow .ql-toolbar button:focus .ql-fill,.ql-snow.ql-toolbar button.ql-active .ql-fill,.ql-snow .ql-toolbar button.ql-active .ql-fill,.ql-snow.ql-toolbar .ql-picker-label:hover .ql-fill,.ql-snow .ql-toolbar .ql-picker-label:hover .ql-fill,.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-fill,.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-fill,.ql-snow.ql-toolbar .ql-picker-item:hover .ql-fill,.ql-snow .ql-toolbar .ql-picker-item:hover .ql-fill,.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-fill,.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-fill,.ql-snow.ql-toolbar button:hover .ql-stroke.ql-fill,.ql-snow .ql-toolbar button:hover .ql-stroke.ql-fill,.ql-snow.ql-toolbar button:focus .ql-stroke.ql-fill,.ql-snow .ql-toolbar button:focus .ql-stroke.ql-fill,.ql-snow.ql-toolbar button.ql-active .ql-stroke.ql-fill,.ql-snow .ql-toolbar button.ql-active .ql-stroke.ql-fill,.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill,.ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill,.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill,.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill,.ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill,.ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill,.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill,.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill{fill:#06c}.ql-snow.ql-toolbar button:hover .ql-stroke,.ql-snow .ql-toolbar button:hover .ql-stroke,.ql-snow.ql-toolbar button:focus .ql-stroke,.ql-snow .ql-toolbar button:focus .ql-stroke,.ql-snow.ql-toolbar button.ql-active .ql-stroke,.ql-snow .ql-toolbar button.ql-active .ql-stroke,.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke,.ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke,.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke,.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke,.ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke,.ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke,.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke,.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke,.ql-snow.ql-toolbar button:hover .ql-stroke-miter,.ql-snow .ql-toolbar button:hover .ql-stroke-miter,.ql-snow.ql-toolbar button:focus .ql-stroke-miter,.ql-snow .ql-toolbar button:focus .ql-stroke-miter,.ql-snow.ql-toolbar button.ql-active .ql-stroke-miter,.ql-snow .ql-toolbar button.ql-active .ql-stroke-miter,.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke-miter,.ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke-miter,.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter,.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter,.ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke-miter,.ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke-miter,.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter,.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter{stroke:#06c}@media (pointer: coarse){.ql-snow.ql-toolbar button:hover:not(.ql-active),.ql-snow .ql-toolbar button:hover:not(.ql-active){color:#444}.ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-fill,.ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-fill,.ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke.ql-fill,.ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke.ql-fill{fill:#444}.ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke,.ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke,.ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke-miter,.ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke-miter{stroke:#444}}.ql-snow,.ql-snow *{box-sizing:border-box}.ql-snow .ql-hidden{display:none}.ql-snow .ql-out-bottom,.ql-snow .ql-out-top{visibility:hidden}.ql-snow .ql-tooltip{position:absolute;transform:translateY(10px)}.ql-snow .ql-tooltip a{cursor:pointer;text-decoration:none}.ql-snow .ql-tooltip.ql-flip{transform:translateY(-10px)}.ql-snow .ql-formats{display:inline-block;vertical-align:middle}.ql-snow .ql-formats:after{clear:both;content:"";display:table}.ql-snow .ql-stroke{fill:none;stroke:#444;stroke-linecap:round;stroke-linejoin:round;stroke-width:2}.ql-snow .ql-stroke-miter{fill:none;stroke:#444;stroke-miterlimit:10;stroke-width:2}.ql-snow .ql-fill,.ql-snow .ql-stroke.ql-fill{fill:#444}.ql-snow .ql-empty{fill:none}.ql-snow .ql-even{fill-rule:evenodd}.ql-snow .ql-thin,.ql-snow .ql-stroke.ql-thin{stroke-width:1}.ql-snow .ql-transparent{opacity:.4}.ql-snow .ql-direction svg:last-child{display:none}.ql-snow .ql-direction.ql-active svg:last-child{display:inline}.ql-snow .ql-direction.ql-active svg:first-child{display:none}.ql-snow .ql-editor h1{font-size:2em}.ql-snow .ql-editor h2{font-size:1.5em}.ql-snow .ql-editor h3{font-size:1.17em}.ql-snow .ql-editor h4{font-size:1em}.ql-snow .ql-editor h5{font-size:.83em}.ql-snow .ql-editor h6{font-size:.67em}.ql-snow .ql-editor a{text-decoration:underline}.ql-snow .ql-editor blockquote{border-left:4px solid #ccc;margin-bottom:5px;margin-top:5px;padding-left:16px}.ql-snow .ql-editor code,.ql-snow .ql-editor pre{background-color:#f0f0f0;border-radius:3px}.ql-snow .ql-editor pre{white-space:pre-wrap;margin-bottom:5px;margin-top:5px;padding:5px 10px}.ql-snow .ql-editor code{font-size:85%;padding:2px 4px}.ql-snow .ql-editor pre.ql-syntax{background-color:#23241f;color:#f8f8f2;overflow:visible}.ql-snow .ql-editor img{max-width:100%}.ql-snow .ql-picker{color:#444;display:inline-block;float:left;font-size:14px;font-weight:500;height:24px;position:relative;vertical-align:middle}.ql-snow .ql-picker-label{cursor:pointer;display:inline-block;height:100%;padding-left:8px;padding-right:2px;position:relative;width:100%}.ql-snow .ql-picker-label:before{display:inline-block;line-height:22px}.ql-snow .ql-picker-options{background-color:#fff;display:none;min-width:100%;padding:4px 8px;position:absolute;white-space:nowrap}.ql-snow .ql-picker-options .ql-picker-item{cursor:pointer;display:block;padding-bottom:5px;padding-top:5px}.ql-snow .ql-picker.ql-expanded .ql-picker-label{color:#ccc;z-index:2}.ql-snow .ql-picker.ql-expanded .ql-picker-label .ql-fill{fill:#ccc}.ql-snow .ql-picker.ql-expanded .ql-picker-label .ql-stroke{stroke:#ccc}.ql-snow .ql-picker.ql-expanded .ql-picker-options{display:block;margin-top:-1px;top:100%;z-index:1}.ql-snow .ql-color-picker,.ql-snow .ql-icon-picker{width:28px}.ql-snow .ql-color-picker .ql-picker-label,.ql-snow .ql-icon-picker .ql-picker-label{padding:2px 4px}.ql-snow .ql-color-picker .ql-picker-label svg,.ql-snow .ql-icon-picker .ql-picker-label svg{right:4px}.ql-snow .ql-icon-picker .ql-picker-options{padding:4px 0}.ql-snow .ql-icon-picker .ql-picker-item{height:24px;width:24px;padding:2px 4px}.ql-snow .ql-color-picker .ql-picker-options{padding:3px 5px;width:152px}.ql-snow .ql-color-picker .ql-picker-item{border:1px solid transparent;float:left;height:16px;margin:2px;padding:0;width:16px}.ql-snow .ql-picker:not(.ql-color-picker):not(.ql-icon-picker) svg{position:absolute;margin-top:-9px;right:0;top:50%;width:18px}.ql-snow .ql-picker.ql-header .ql-picker-label[data-label]:not([data-label=""]):before,.ql-snow .ql-picker.ql-font .ql-picker-label[data-label]:not([data-label=""]):before,.ql-snow .ql-picker.ql-size .ql-picker-label[data-label]:not([data-label=""]):before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-label]:not([data-label=""]):before,.ql-snow .ql-picker.ql-font .ql-picker-item[data-label]:not([data-label=""]):before,.ql-snow .ql-picker.ql-size .ql-picker-item[data-label]:not([data-label=""]):before{content:attr(data-label)}.ql-snow .ql-picker.ql-header{width:98px}.ql-snow .ql-picker.ql-header .ql-picker-label:before,.ql-snow .ql-picker.ql-header .ql-picker-item:before{content:"Normal"}.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="1"]:before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="1"]:before{content:"Heading 1"}.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="2"]:before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]:before{content:"Heading 2"}.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="3"]:before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]:before{content:"Heading 3"}.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="4"]:before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="4"]:before{content:"Heading 4"}.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="5"]:before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="5"]:before{content:"Heading 5"}.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="6"]:before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="6"]:before{content:"Heading 6"}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="1"]:before{font-size:2em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]:before{font-size:1.5em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]:before{font-size:1.17em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="4"]:before{font-size:1em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="5"]:before{font-size:.83em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="6"]:before{font-size:.67em}.ql-snow .ql-picker.ql-font{width:108px}.ql-snow .ql-picker.ql-font .ql-picker-label:before,.ql-snow .ql-picker.ql-font .ql-picker-item:before{content:"Sans Serif"}.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=serif]:before,.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=serif]:before{content:"Serif"}.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=monospace]:before,.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=monospace]:before{content:"Monospace"}.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=serif]:before{font-family:Georgia,Times New Roman,serif}.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=monospace]:before{font-family:Monaco,Courier New,monospace}.ql-snow .ql-picker.ql-size{width:98px}.ql-snow .ql-picker.ql-size .ql-picker-label:before,.ql-snow .ql-picker.ql-size .ql-picker-item:before{content:"Normal"}.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=small]:before,.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=small]:before{content:"Small"}.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=large]:before,.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=large]:before{content:"Large"}.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=huge]:before,.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=huge]:before{content:"Huge"}.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=small]:before{font-size:10px}.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=large]:before{font-size:18px}.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=huge]:before{font-size:32px}.ql-snow .ql-color-picker.ql-background .ql-picker-item{background-color:#fff}.ql-snow .ql-color-picker.ql-color .ql-picker-item{background-color:#000}.ql-toolbar.ql-snow{border:1px solid #ccc;box-sizing:border-box;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;padding:8px}.ql-toolbar.ql-snow .ql-formats{margin-right:15px}.ql-toolbar.ql-snow .ql-picker-label{border:1px solid transparent}.ql-toolbar.ql-snow .ql-picker-options{border:1px solid transparent;box-shadow:#0003 0 2px 8px}.ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-label,.ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-options{border-color:#ccc}.ql-toolbar.ql-snow .ql-color-picker .ql-picker-item.ql-selected,.ql-toolbar.ql-snow .ql-color-picker .ql-picker-item:hover{border-color:#000}.ql-toolbar.ql-snow+.ql-container.ql-snow{border-top:0px}.ql-snow .ql-tooltip{background-color:#fff;border:1px solid #ccc;box-shadow:0 0 5px #ddd;color:#444;padding:5px 12px;white-space:nowrap}.ql-snow .ql-tooltip:before{content:"Visit URL:";line-height:26px;margin-right:8px}.ql-snow .ql-tooltip input[type=text]{display:none;border:1px solid #ccc;font-size:13px;height:26px;margin:0;padding:3px 5px;width:170px}.ql-snow .ql-tooltip a.ql-preview{display:inline-block;max-width:200px;overflow-x:hidden;text-overflow:ellipsis;vertical-align:top}.ql-snow .ql-tooltip a.ql-action:after{border-right:1px solid #ccc;content:"Edit";margin-left:16px;padding-right:8px}.ql-snow .ql-tooltip a.ql-remove:before{content:"Remove";margin-left:8px}.ql-snow .ql-tooltip a{line-height:26px}.ql-snow .ql-tooltip.ql-editing a.ql-preview,.ql-snow .ql-tooltip.ql-editing a.ql-remove{display:none}.ql-snow .ql-tooltip.ql-editing input[type=text]{display:inline-block}.ql-snow .ql-tooltip.ql-editing a.ql-action:after{border-right:0px;content:"Save";padding-right:0}.ql-snow .ql-tooltip[data-mode=link]:before{content:"Enter link:"}.ql-snow .ql-tooltip[data-mode=formula]:before{content:"Enter formula:"}.ql-snow .ql-tooltip[data-mode=video]:before{content:"Enter video:"}.ql-snow a{color:#06c}.ql-container.ql-snow{border:1px solid #ccc}.dark .ql-toolbar.ql-snow,.dark .ql-container.ql-snow{@apply border border-[#424242];}.ql-toolbar.ql-snow{border-top-left-radius:6px;border-top-right-radius:6px;@apply border border-[#d9d9d9];}.ql-container.ql-snow{border-bottom-left-radius:6px;border-bottom-right-radius:6px;@apply border border-[#d9d9d9];}.quill{border-radius:6px}.show-more-container{position:relative}.show-more-less-clickable{cursor:pointer;background:none;border:none;padding:4px 8px;font-size:inherit;text-decoration:none;transition:color .2s ease}.show-more-less-clickable:hover{color:#40a9ff;text-decoration:underline}.show-more-less-clickable:focus{outline:2px solid #1890ff;outline-offset:2px;border-radius:2px}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kingteza/crud-component",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.4.0",
|
|
5
5
|
"description": "React CRUD component library with Ant Design",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"react",
|
|
@@ -69,7 +69,6 @@
|
|
|
69
69
|
"react-i18next": "^15.2.0",
|
|
70
70
|
"react-quill": "^2.0.0",
|
|
71
71
|
"react-responsive": "^10.0.0",
|
|
72
|
-
"react-show-more-text": "^1.7.1",
|
|
73
72
|
"uuid": "^11.0.3"
|
|
74
73
|
},
|
|
75
74
|
"devDependencies": {
|
|
@@ -85,7 +84,6 @@
|
|
|
85
84
|
"@types/path-browserify": "^1.0.3",
|
|
86
85
|
"@types/react": "^18.3.18",
|
|
87
86
|
"@types/react-dom": "^18.3.5",
|
|
88
|
-
"@types/react-show-more-text": "^1.4.5",
|
|
89
87
|
"@types/uuid": "^10.0.0",
|
|
90
88
|
"@vitejs/plugin-react": "^4.3.4",
|
|
91
89
|
"antd": "^5.22.7",
|
package/dist/Play.d.ts
DELETED