@bioturing/components 0.46.4 → 0.47.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/components/base-menu/component.js +19 -21
- package/dist/components/base-menu/component.js.map +1 -1
- package/dist/components/base-menu/index.js +12 -7
- package/dist/components/base-menu/index.js.map +1 -1
- package/dist/components/checkbox/component.d.ts +2 -2
- package/dist/components/checkbox/component.d.ts.map +1 -1
- package/dist/components/checkbox/component.js.map +1 -1
- package/dist/components/choice-list/component.js +12 -12
- package/dist/components/data-table/component.d.ts.map +1 -1
- package/dist/components/data-table/component.js +73 -64
- package/dist/components/data-table/component.js.map +1 -1
- package/dist/components/data-table/components/TableBody.d.ts +1 -1
- package/dist/components/data-table/components/TableBody.d.ts.map +1 -1
- package/dist/components/data-table/components/TableBody.js +62 -53
- package/dist/components/data-table/components/TableBody.js.map +1 -1
- package/dist/components/data-table/components/TableHeader.d.ts +1 -1
- package/dist/components/data-table/components/TableHeader.d.ts.map +1 -1
- package/dist/components/data-table/components/TableHeader.js +46 -46
- package/dist/components/data-table/components/TableHeader.js.map +1 -1
- package/dist/components/data-table/components/TablePagination.d.ts.map +1 -1
- package/dist/components/data-table/components/TablePagination.js +22 -28
- package/dist/components/data-table/components/TablePagination.js.map +1 -1
- package/dist/components/data-table/hooks.d.ts.map +1 -1
- package/dist/components/data-table/hooks.js +15 -14
- package/dist/components/data-table/hooks.js.map +1 -1
- package/dist/components/data-table/style.css +1 -1
- package/dist/components/data-table/types.d.ts +1 -1
- package/dist/components/data-table/types.d.ts.map +1 -1
- package/dist/components/data-table/variant-minimal.css +1 -0
- package/dist/components/data-table/variant-zebra.css +1 -0
- package/dist/components/dialog/Dialog.js +46 -46
- package/dist/components/dialog/Dialog.js.map +1 -1
- package/dist/components/dialog/dialog.css +1 -1
- package/dist/components/form/FormItem/ItemHolder.d.ts +6 -5
- package/dist/components/form/FormItem/ItemHolder.d.ts.map +1 -1
- package/dist/components/form/FormItem/ItemHolder.js +32 -29
- package/dist/components/form/FormItem/ItemHolder.js.map +1 -1
- package/dist/components/form/FormItem/index.d.ts +6 -0
- package/dist/components/form/FormItem/index.d.ts.map +1 -1
- package/dist/components/form/FormItem/index.js +138 -127
- package/dist/components/form/FormItem/index.js.map +1 -1
- package/dist/components/form/FormValidationContext.d.ts +5 -0
- package/dist/components/form/FormValidationContext.d.ts.map +1 -0
- package/dist/components/form/FormValidationContext.js +7 -0
- package/dist/components/form/FormValidationContext.js.map +1 -0
- package/dist/components/form/component.d.ts +6 -1
- package/dist/components/form/component.d.ts.map +1 -1
- package/dist/components/form/component.js +30 -20
- package/dist/components/form/component.js.map +1 -1
- package/dist/components/form/formValidationRule.d.ts +19 -0
- package/dist/components/form/formValidationRule.d.ts.map +1 -0
- package/dist/components/form/formValidationRule.js +22 -0
- package/dist/components/form/formValidationRule.js.map +1 -0
- package/dist/components/form/index.d.ts +2 -0
- package/dist/components/form/index.d.ts.map +1 -1
- package/dist/components/form/useFormValidation.d.ts +3 -0
- package/dist/components/form/useFormValidation.d.ts.map +1 -0
- package/dist/components/form/useFormValidation.js +18 -0
- package/dist/components/form/useFormValidation.js.map +1 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/keyboard-shortcut/component.d.ts +2 -0
- package/dist/components/keyboard-shortcut/component.d.ts.map +1 -1
- package/dist/components/keyboard-shortcut/component.js +69 -49
- package/dist/components/keyboard-shortcut/component.js.map +1 -1
- package/dist/components/modal/Modal.d.ts +1 -1
- package/dist/components/modal/Modal.js +9 -9
- package/dist/components/modal/Modal.js.map +1 -1
- package/dist/components/modal/style.css +1 -1
- package/dist/components/theme-provider/component.d.ts +3 -1
- package/dist/components/theme-provider/component.d.ts.map +1 -1
- package/dist/components/theme-provider/component.js +32 -31
- package/dist/components/theme-provider/component.js.map +1 -1
- package/dist/components/theme-provider/context/index.d.ts +2 -1
- package/dist/components/theme-provider/context/index.d.ts.map +1 -1
- package/dist/components/theme-provider/context/provider.d.ts +2 -3
- package/dist/components/theme-provider/context/provider.d.ts.map +1 -1
- package/dist/components/theme-provider/context/provider.js +13 -6
- package/dist/components/theme-provider/context/provider.js.map +1 -1
- package/dist/components/theme-provider/context/themeStore.d.ts +15 -0
- package/dist/components/theme-provider/context/themeStore.d.ts.map +1 -1
- package/dist/components/theme-provider/context/themeStore.js +10 -9
- package/dist/components/theme-provider/context/themeStore.js.map +1 -1
- package/dist/components/theme-provider/style.css +1 -1
- package/dist/components/tooltip/component.d.ts.map +1 -1
- package/dist/components/tooltip/component.js +23 -12
- package/dist/components/tooltip/component.js.map +1 -1
- package/dist/index.js +286 -275
- package/dist/index.js.map +1 -1
- package/dist/metadata.d.ts +9 -0
- package/dist/metadata.d.ts.map +1 -1
- package/dist/metadata.js +14 -0
- package/dist/metadata.js.map +1 -1
- package/dist/stats.html +1 -1
- package/package.json +6 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer components{.ds-dialog-mask{position:fixed;inset:0;z-index:var(--ds-z-index-modal-mask);background-color:var(--ds-color-bg-mask);transition:opacity .2s var(--ds-motion-ease-out)}.ds-dialog-mask[data-starting-style],.ds-dialog-mask[data-ending-style]{opacity:0}.ds-dialog-wrap{
|
|
1
|
+
@layer components{.ds-dialog-mask{position:fixed;inset:0;z-index:var(--ds-z-index-modal-mask);background-color:var(--ds-color-bg-mask);transition:opacity .2s var(--ds-motion-ease-out)}.ds-dialog-mask[data-starting-style],.ds-dialog-mask[data-ending-style]{opacity:0}.ds-dialog-wrap{position:fixed;inset:0;z-index:var(--ds-z-index-modal);display:flex;overflow-y:auto;padding:var(--ds-modal-edge-padding);outline:0;-webkit-overflow-scrolling:touch}.ds-dialog-centered{align-items:center;justify-content:center}.ds-dialog-top-aligned{align-items:flex-start;justify-content:center;padding-top:calc(var(--ds-modal-edge-padding) + 4rem)}.ds-dialog-wrap-fullscreen{padding:0}.ds-dialog{width:min(var(--ds-dialog-width),calc(100vw - var(--ds-modal-edge-padding) * 2));max-width:100%;max-height:calc(100vh - var(--ds-modal-edge-padding) * 2);margin:auto;padding-bottom:0;pointer-events:none;position:relative;top:0;transform-origin:center;transition:transform .2s var(--ds-motion-ease-out),opacity .2s var(--ds-motion-ease-out)}.ds-dialog[data-starting-style],.ds-dialog[data-ending-style]{transform:scale(.96);opacity:0}.ds-dialog-content{width:100%;max-height:inherit;display:flex;flex-direction:column;overflow:hidden;border-radius:var(--ds-border-radius-lg);background:var(--ds-dialog-bg, var(--ds-color-bg-elevated));box-shadow:var(--ds-box-shadow-secondary);color:var(--ds-color-text);pointer-events:auto}.ds-dialog-content:focus,.ds-dialog-content:focus-visible{outline:none}.ds-dialog-size-fullscreen{width:100vw;max-width:100vw;height:100vh;height:100dvh;max-height:100vh;max-height:100dvh;top:0}.ds-dialog-size-fullscreen .ds-dialog-content{width:100%;height:100%;max-height:100%;border-radius:0}.ds-dialog-header,.ds-dialog-footer{flex:0 0 auto;background:transparent}.ds-dialog-header{padding-block:var(--ds-modal-header-padding-block);padding-inline:var(--ds-modal-padding)}.ds-dialog-footer{padding-block:var(--ds-modal-footer-padding-block);padding-inline:var(--ds-modal-padding)}.ds-dialog-fixed .ds-dialog-header{border-bottom:1px solid var(--ds-color-split);padding-block:var(--ds-modal-fixed-header-padding-block);padding-inline:var(--ds-modal-padding)}.ds-dialog-fixed .ds-dialog-footer{border-top:1px solid var(--ds-color-split);padding-block:var(--ds-modal-fixed-footer-padding-block);padding-inline:var(--ds-modal-padding)}.ds-dialog-title-row{min-width:0}.ds-dialog-title{display:block;min-width:0;color:var(--ds-color-text);font-size:var(--ds-font-size-lg);font-weight:600;line-height:var(--ds-line-height-lg)}.ds-dialog-header-after-title{margin-top:var(--ds-modal-fixed-header-padding-block)}.ds-dialog-close{flex-shrink:0}.ds-dialog-body-wrapper{display:flex;flex-direction:column;flex:1 1 auto;min-height:0;position:relative}.ds-dialog-body{flex:1 1 auto;min-height:0;overflow:auto;padding:var(--ds-dialog-body-content-padding, var(--ds-modal-padding))}.ds-dialog-no-body-scroll .ds-dialog{max-height:100%}.ds-dialog-no-body-scroll .ds-dialog-body{overflow:hidden;display:grid}.ds-dialog-no-body-scroll .ds-dialog-body>*{min-height:0}.ds-dialog-footer-actions{display:flex;justify-content:flex-end;align-items:center;gap:8px}.ds-dialog-loading-overlay{position:absolute;inset:0;z-index:10;display:flex;align-items:center;justify-content:center;background-color:color-mix(in oklab,var(--ds-dialog-bg) 60%,transparent);margin-top:calc(var(--ds-dialog-header-height, 0));margin-bottom:calc(var(--ds-dialog-footer-height, 0))}}
|
|
@@ -11,7 +11,7 @@ import { ReportMetaChange } from 'antd/es/form/context';
|
|
|
11
11
|
*
|
|
12
12
|
* Last synced with antd version: 5.x-stable (2025-02-04)
|
|
13
13
|
*/
|
|
14
|
-
import * as React from
|
|
14
|
+
import * as React from "react";
|
|
15
15
|
export interface ItemHolderProps extends FormItemProps {
|
|
16
16
|
prefixCls: string;
|
|
17
17
|
className?: string;
|
|
@@ -24,10 +24,11 @@ export interface ItemHolderProps extends FormItemProps {
|
|
|
24
24
|
fieldId?: string;
|
|
25
25
|
isRequired?: boolean;
|
|
26
26
|
onSubItemMetaChange: ReportMetaChange;
|
|
27
|
-
classNames?: FormItemProps[
|
|
28
|
-
optionalMark?: FormItemProps[
|
|
29
|
-
requiredMark?: FormItemProps[
|
|
30
|
-
labelRender?: FormItemProps[
|
|
27
|
+
classNames?: FormItemProps["classNames"];
|
|
28
|
+
optionalMark?: FormItemProps["optionalMark"];
|
|
29
|
+
requiredMark?: FormItemProps["requiredMark"];
|
|
30
|
+
labelRender?: FormItemProps["labelRender"];
|
|
31
|
+
ignoreDefaultRules?: string[];
|
|
31
32
|
}
|
|
32
33
|
export default function ItemHolder(props: ItemHolderProps): import("react/jsx-runtime").JSX.Element;
|
|
33
34
|
//# sourceMappingURL=ItemHolder.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ItemHolder.d.ts","sourceRoot":"","sources":["../../../../src/components/form/FormItem/ItemHolder.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,6BAA6B,CAAC;AASxD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,GAAG,CAAC;AAEvC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAU7D,MAAM,WAAW,eAAgB,SAAQ,aAAa;IACpD,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,MAAM,EAAE,KAAK,CAAC,SAAS,EAAE,CAAC;IAC1B,QAAQ,EAAE,KAAK,CAAC,SAAS,EAAE,CAAC;IAC5B,IAAI,EAAE,IAAI,CAAC;IACX,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,mBAAmB,EAAE,gBAAgB,CAAC;IAGtC,UAAU,CAAC,EAAE,aAAa,CAAC,YAAY,CAAC,CAAC;IACzC,YAAY,CAAC,EAAE,aAAa,CAAC,cAAc,CAAC,CAAC;IAC7C,YAAY,CAAC,EAAE,aAAa,CAAC,cAAc,CAAC,CAAC;IAC7C,WAAW,CAAC,EAAE,aAAa,CAAC,aAAa,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"ItemHolder.d.ts","sourceRoot":"","sources":["../../../../src/components/form/FormItem/ItemHolder.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,6BAA6B,CAAC;AASxD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,GAAG,CAAC;AAEvC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAU7D,MAAM,WAAW,eAAgB,SAAQ,aAAa;IACpD,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,MAAM,EAAE,KAAK,CAAC,SAAS,EAAE,CAAC;IAC1B,QAAQ,EAAE,KAAK,CAAC,SAAS,EAAE,CAAC;IAC5B,IAAI,EAAE,IAAI,CAAC;IACX,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,mBAAmB,EAAE,gBAAgB,CAAC;IAGtC,UAAU,CAAC,EAAE,aAAa,CAAC,YAAY,CAAC,CAAC;IACzC,YAAY,CAAC,EAAE,aAAa,CAAC,cAAc,CAAC,CAAC;IAC7C,YAAY,CAAC,EAAE,aAAa,CAAC,cAAc,CAAC,CAAC;IAC7C,WAAW,CAAC,EAAE,aAAa,CAAC,aAAa,CAAC,CAAC;IAC3C,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAC;CAE/B;AAED,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,KAAK,EAAE,eAAe,2CAwLxD"}
|
|
@@ -12,45 +12,46 @@ import re from "antd/es/form/FormItem/StatusProvider";
|
|
|
12
12
|
import te from "./FormItemInput.js";
|
|
13
13
|
import ae from "./FormItemLabel.js";
|
|
14
14
|
import { clsx as N } from "../../utils/cn.js";
|
|
15
|
-
function
|
|
15
|
+
function be(l) {
|
|
16
16
|
const {
|
|
17
17
|
prefixCls: i,
|
|
18
18
|
className: $,
|
|
19
19
|
rootClassName: x,
|
|
20
|
-
style:
|
|
20
|
+
style: R,
|
|
21
21
|
help: m,
|
|
22
22
|
errors: h,
|
|
23
23
|
warnings: v,
|
|
24
|
-
validateStatus:
|
|
24
|
+
validateStatus: F,
|
|
25
25
|
meta: r,
|
|
26
|
-
hasFeedback:
|
|
27
|
-
hidden:
|
|
28
|
-
children:
|
|
29
|
-
fieldId:
|
|
30
|
-
required:
|
|
31
|
-
isRequired:
|
|
26
|
+
hasFeedback: u,
|
|
27
|
+
hidden: I,
|
|
28
|
+
children: V,
|
|
29
|
+
fieldId: k,
|
|
30
|
+
required: q,
|
|
31
|
+
isRequired: M,
|
|
32
32
|
onSubItemMetaChange: P,
|
|
33
33
|
layout: E,
|
|
34
34
|
name: L,
|
|
35
35
|
// ============ BioTuring Custom: Extract classNames ============
|
|
36
36
|
classNames: n,
|
|
37
37
|
optionalMark: B,
|
|
38
|
-
requiredMark:
|
|
39
|
-
labelRender:
|
|
38
|
+
requiredMark: D,
|
|
39
|
+
labelRender: _,
|
|
40
|
+
ignoreDefaultRules: oe,
|
|
40
41
|
// ============ End Custom ============
|
|
41
|
-
...
|
|
42
|
-
} = l, e = `${i}-item`, { requiredMark:
|
|
42
|
+
...j
|
|
43
|
+
} = l, e = `${i}-item`, { requiredMark: H, layout: W } = p.useContext(Y), c = E || W, z = c === "vertical", o = p.useRef(null), d = C(h), g = C(v), b = m != null, S = !!(b || h.length || v.length), A = !!o.current && G(o.current), [f, w] = p.useState(null);
|
|
43
44
|
J(() => {
|
|
44
45
|
if (S && o.current) {
|
|
45
46
|
const a = getComputedStyle(o.current);
|
|
46
47
|
w(Number.parseInt(a.marginBottom, 10));
|
|
47
48
|
}
|
|
48
|
-
}, [S,
|
|
49
|
+
}, [S, A]);
|
|
49
50
|
const K = (a) => {
|
|
50
51
|
a || w(null);
|
|
51
52
|
}, t = ((a = !1) => {
|
|
52
53
|
const T = a ? d : r.errors, U = a ? g : r.warnings;
|
|
53
|
-
return ee(T, U, r, "", !!
|
|
54
|
+
return ee(T, U, r, "", !!u, F);
|
|
54
55
|
})(), O = N(
|
|
55
56
|
e,
|
|
56
57
|
$,
|
|
@@ -58,21 +59,21 @@ function ve(l) {
|
|
|
58
59
|
n?.root,
|
|
59
60
|
(b || d.length || g.length) && `${e}-with-help`,
|
|
60
61
|
// Status
|
|
61
|
-
t &&
|
|
62
|
+
t && u && `${e}-has-feedback`,
|
|
62
63
|
t === "success" && `${e}-has-success`,
|
|
63
64
|
t === "warning" && `${e}-has-warning`,
|
|
64
65
|
t === "error" && `${e}-has-error`,
|
|
65
66
|
t === "validating" && `${e}-is-validating`,
|
|
66
|
-
|
|
67
|
+
I && `${e}-hidden`,
|
|
67
68
|
// Layout
|
|
68
|
-
|
|
69
|
+
c && `${e}-${c}`
|
|
69
70
|
);
|
|
70
|
-
return /* @__PURE__ */ y("div", { className: O, style:
|
|
71
|
+
return /* @__PURE__ */ y("div", { className: O, style: R, ref: o, children: [
|
|
71
72
|
/* @__PURE__ */ y(
|
|
72
73
|
X,
|
|
73
74
|
{
|
|
74
75
|
className: N(`${e}-row`, n?.row),
|
|
75
|
-
...Q(
|
|
76
|
+
...Q(j, [
|
|
76
77
|
"_internalItemRender",
|
|
77
78
|
"colon",
|
|
78
79
|
"dependencies",
|
|
@@ -103,21 +104,23 @@ function ve(l) {
|
|
|
103
104
|
"validateTrigger",
|
|
104
105
|
"valuePropName",
|
|
105
106
|
"wrapperCol",
|
|
106
|
-
"validateDebounce"
|
|
107
|
+
"validateDebounce",
|
|
108
|
+
"ignoreDefaultRules",
|
|
109
|
+
"labelRender"
|
|
107
110
|
]),
|
|
108
111
|
children: [
|
|
109
112
|
/* @__PURE__ */ s(
|
|
110
113
|
ae,
|
|
111
114
|
{
|
|
112
|
-
htmlFor:
|
|
115
|
+
htmlFor: k,
|
|
113
116
|
...l,
|
|
114
|
-
requiredMark:
|
|
115
|
-
required:
|
|
117
|
+
requiredMark: D ?? H,
|
|
118
|
+
required: q ?? M,
|
|
116
119
|
prefixCls: i,
|
|
117
|
-
vertical:
|
|
120
|
+
vertical: z,
|
|
118
121
|
classNames: n,
|
|
119
122
|
optionalMark: B,
|
|
120
|
-
labelRender:
|
|
123
|
+
labelRender: _
|
|
121
124
|
}
|
|
122
125
|
),
|
|
123
126
|
/* @__PURE__ */ s(
|
|
@@ -140,10 +143,10 @@ function ve(l) {
|
|
|
140
143
|
meta: r,
|
|
141
144
|
errors: r.errors,
|
|
142
145
|
warnings: r.warnings,
|
|
143
|
-
hasFeedback:
|
|
146
|
+
hasFeedback: u,
|
|
144
147
|
validateStatus: t,
|
|
145
148
|
name: L,
|
|
146
|
-
children:
|
|
149
|
+
children: V
|
|
147
150
|
}
|
|
148
151
|
) })
|
|
149
152
|
}
|
|
@@ -163,6 +166,6 @@ function ve(l) {
|
|
|
163
166
|
] });
|
|
164
167
|
}
|
|
165
168
|
export {
|
|
166
|
-
|
|
169
|
+
be as default
|
|
167
170
|
};
|
|
168
171
|
//# sourceMappingURL=ItemHolder.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ItemHolder.js","sources":["../../../../src/components/form/FormItem/ItemHolder.tsx"],"sourcesContent":["/**\n * This file is copied from Ant Design 5.x-stable\n * Source: https://github.com/ant-design/ant-design/blob/5.x-stable/components/form/FormItem/ItemHolder.tsx\n * \n * Customizations for @bioturing/components:\n * - Added `classNames` prop support for styling sub-elements\n * - Pass custom props (optionalMark, requiredMark, labelRender) to FormItemLabel\n * \n * Last synced with antd version: 5.x-stable (2025-02-04)\n */\n\n\"use client\";\n\nimport * as React from 'react';\nimport type { Meta } from 'rc-field-form/lib/interface';\nimport isVisible from 'rc-util/es/Dom/isVisible';\nimport useLayoutEffect from 'rc-util/es/hooks/useLayoutEffect';\nimport omit from 'rc-util/es/omit';\n\n// ============ BioTuring Utils ============\nimport { clsx as classNames } from '../../utils';\n\n// ============ Ant Design Imports ============\nimport type { FormItemProps } from '.';\nimport { Row } from 'antd/es/grid';\nimport type { ReportMetaChange } from 'antd/es/form/context';\nimport { FormContext, NoStyleItemContext } from 'antd/es/form/context';\nimport useDebounce from 'antd/es/form/hooks/useDebounce';\nimport { getStatus } from 'antd/es/form/util';\nimport StatusProvider from 'antd/es/form/FormItem/StatusProvider';\n\n// ============ BioTuring Custom Imports ============\nimport FormItemInput from './FormItemInput';\nimport FormItemLabel from './FormItemLabel';\n\nexport interface ItemHolderProps extends FormItemProps {\n prefixCls: string;\n className?: string;\n rootClassName?: string;\n style?: React.CSSProperties;\n errors: React.ReactNode[];\n warnings: React.ReactNode[];\n meta: Meta;\n children?: React.ReactNode;\n fieldId?: string;\n isRequired?: boolean;\n onSubItemMetaChange: ReportMetaChange;\n \n // ============ BioTuring Custom Props ============\n classNames?: FormItemProps['classNames'];\n optionalMark?: FormItemProps['optionalMark'];\n requiredMark?: FormItemProps['requiredMark'];\n labelRender?: FormItemProps['labelRender'];\n // ============ End Custom Props ============\n}\n\nexport default function ItemHolder(props: ItemHolderProps) {\n const {\n prefixCls,\n className,\n rootClassName,\n style,\n help,\n errors,\n warnings,\n validateStatus,\n meta,\n hasFeedback,\n hidden,\n children,\n fieldId,\n required,\n isRequired,\n onSubItemMetaChange,\n layout: propsLayout,\n name,\n // ============ BioTuring Custom: Extract classNames ============\n classNames: customClassNames,\n optionalMark,\n requiredMark,\n labelRender,\n // ============ End Custom ============\n ...restProps\n } = props;\n\n const itemPrefixCls = `${prefixCls}-item`;\n const { requiredMark: contextRequiredMark, layout: formLayout } = React.useContext(FormContext);\n const layout = propsLayout || formLayout;\n\n const vertical = layout === 'vertical';\n\n // ======================== Margin ========================\n const itemRef = React.useRef<HTMLDivElement>(null);\n const debounceErrors = useDebounce(errors);\n const debounceWarnings = useDebounce(warnings);\n const hasHelp = help !== undefined && help !== null;\n const hasError = !!(hasHelp || errors.length || warnings.length);\n const isOnScreen = !!itemRef.current && isVisible(itemRef.current);\n const [marginBottom, setMarginBottom] = React.useState<number | null>(null);\n\n useLayoutEffect(() => {\n if (hasError && itemRef.current) {\n // The element must be part of the DOMTree to use getComputedStyle\n // https://stackoverflow.com/questions/35360711/getcomputedstyle-returns-a-cssstyledeclaration-but-all-properties-are-empty-on-a\n const itemStyle = getComputedStyle(itemRef.current);\n setMarginBottom(Number.parseInt(itemStyle.marginBottom, 10));\n }\n }, [hasError, isOnScreen]);\n\n const onErrorVisibleChanged = (nextVisible: boolean) => {\n if (!nextVisible) {\n setMarginBottom(null);\n }\n };\n\n // ======================== Status ========================\n\n const getValidateState = (isDebounce = false) => {\n const _errors = isDebounce ? debounceErrors : meta.errors;\n const _warnings = isDebounce ? debounceWarnings : meta.warnings;\n\n return getStatus(_errors, _warnings, meta, '', !!hasFeedback, validateStatus);\n };\n\n const mergedValidateStatus = getValidateState();\n\n // ======================== Render ========================\n // ============ BioTuring Custom: Apply root className ============\n const itemClassName = classNames(\n itemPrefixCls,\n className,\n rootClassName,\n customClassNames?.root,\n (hasHelp || debounceErrors.length || debounceWarnings.length) && `${itemPrefixCls}-with-help`,\n // Status\n mergedValidateStatus && hasFeedback && `${itemPrefixCls}-has-feedback`,\n mergedValidateStatus === 'success' && `${itemPrefixCls}-has-success`,\n mergedValidateStatus === 'warning' && `${itemPrefixCls}-has-warning`,\n mergedValidateStatus === 'error' && `${itemPrefixCls}-has-error`,\n mergedValidateStatus === 'validating' && `${itemPrefixCls}-is-validating`,\n hidden && `${itemPrefixCls}-hidden`,\n // Layout\n layout && `${itemPrefixCls}-${layout}`,\n );\n // ============ End Custom ============\n\n return (\n <div className={itemClassName} style={style} ref={itemRef}>\n {/* ============ BioTuring Custom: Apply row className ============ */}\n <Row\n className={classNames(`${itemPrefixCls}-row`, customClassNames?.row)}\n {...omit(restProps, [\n '_internalItemRender' as any,\n 'colon',\n 'dependencies',\n 'extra',\n 'fieldKey',\n 'getValueFromEvent',\n 'getValueProps',\n 'htmlFor',\n 'id', // It is deprecated because `htmlFor` is its replacement.\n 'initialValue',\n 'isListField',\n 'label',\n 'labelAlign',\n 'labelCol',\n 'labelWrap',\n 'messageVariables',\n 'name',\n 'normalize',\n 'noStyle',\n 'preserve',\n 'requiredMark',\n 'rules',\n 'shouldUpdate',\n 'trigger',\n 'tooltip',\n 'validateFirst',\n 'validateTrigger',\n 'valuePropName',\n 'wrapperCol',\n 'validateDebounce',\n ])}\n >\n {/* Label */}\n <FormItemLabel\n htmlFor={fieldId}\n {...props}\n requiredMark={requiredMark ?? contextRequiredMark}\n required={required ?? isRequired}\n prefixCls={prefixCls}\n vertical={vertical}\n classNames={customClassNames}\n optionalMark={optionalMark}\n labelRender={labelRender}\n />\n {/* Input Group */}\n <FormItemInput\n {...props}\n {...meta}\n errors={debounceErrors}\n warnings={debounceWarnings}\n prefixCls={prefixCls}\n status={mergedValidateStatus}\n help={help}\n marginBottom={marginBottom}\n onErrorVisibleChanged={onErrorVisibleChanged}\n classNames={customClassNames}\n >\n <NoStyleItemContext.Provider value={onSubItemMetaChange}>\n <StatusProvider\n prefixCls={prefixCls}\n meta={meta}\n errors={meta.errors}\n warnings={meta.warnings}\n hasFeedback={hasFeedback}\n // Already calculated\n validateStatus={mergedValidateStatus}\n name={name}\n >\n {children}\n </StatusProvider>\n </NoStyleItemContext.Provider>\n </FormItemInput>\n </Row>\n {/* ============ End Custom ============ */}\n\n {!!marginBottom && (\n <div\n className={`${itemPrefixCls}-margin-offset`}\n style={{\n marginBottom: -marginBottom,\n }}\n />\n )}\n </div>\n );\n}\n"],"names":["ItemHolder","props","prefixCls","className","rootClassName","style","help","errors","warnings","validateStatus","meta","hasFeedback","hidden","children","fieldId","required","isRequired","onSubItemMetaChange","propsLayout","name","customClassNames","optionalMark","requiredMark","labelRender","restProps","itemPrefixCls","contextRequiredMark","formLayout","React","FormContext","layout","vertical","itemRef","debounceErrors","useDebounce","debounceWarnings","hasHelp","hasError","isOnScreen","isVisible","marginBottom","setMarginBottom","useLayoutEffect","itemStyle","onErrorVisibleChanged","nextVisible","mergedValidateStatus","isDebounce","_errors","_warnings","getStatus","itemClassName","classNames","jsxs","Row","omit","jsx","FormItemLabel","FormItemInput","NoStyleItemContext","StatusProvider"],"mappings":";;;;;;;;;;;;;;AAwDA,SA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AAAA,UAAA,gBAAAgC;AAAA,YAACC;AAAA,YAAA;AAAA,cACC,SAAS3C;AAAA,cACR,GAAGb;AAAA,cACJ,cAAcqB,KAAgBI;AAAA,cAC9B,UAAUX,KAAYC;AAAA,cACtB,WAAAd;AAAA,cACA,UAAA6B;AAAA,cACA,YAAYX;AAAA,cACZ,cAAAC;AAAA,cACA,aAAAE;AAAA,YAAA;AAAA,UAAA;AAAA,UAGF,gBAAAiC;AAAA,YAACE;AAAA,YAAA;AAAA,cACE,GAAGzD;AAAA,cACH,GAAGS;AAAA,cACJ,QAAQuB;AAAA,cACR,UAAUE;AAAA,cACV,WAAAjC;AAAA,cACA,QAAQ4C;AAAA,cACR,MAAAxC;AAAA,cACA,cAAAkC;AAAA,cACA,uBAAAI;AAAA,cACA,YAAYxB;AAAA,cAEZ,UAAA,gBAAAoC,EAACG,EAAmB,UAAnB,EAA4B,OAAO1C,GAClC,UAAA,gBAAAuC;AAAA,gBAACI;AAAA,gBAAA;AAAA,kBACC,WAAA1D;AAAA,kBACA,MAAAQ;AAAA,kBACA,QAAQA,EAAK;AAAA,kBACb,UAAUA,EAAK;AAAA,kBACf,aAAAC;AAAA,kBAEA,gBAAgBmC;AAAA,kBAChB,MAAA3B;AAAA,kBAEC,UAAAN;AAAA,gBAAA;AAAA,cAAA,EACH,CACF;AAAA,YAAA;AAAA,UAAA;AAAA,QACF;AAAA,MAAA;AAAA,IAAA;AAAA,IAID,CAAC,CAAC2B,KACD,gBAAAgB;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,WAAW,GAAG/B,CAAa;AAAA,QAC3B,OAAO;AAAA,UACL,cAAc,CAACe;AAAA,QAAA;AAAA,MACjB;AAAA,IAAA;AAAA,EACF,GAEJ;AAEJ;"}
|
|
1
|
+
{"version":3,"file":"ItemHolder.js","sources":["../../../../src/components/form/FormItem/ItemHolder.tsx"],"sourcesContent":["/**\n * This file is copied from Ant Design 5.x-stable\n * Source: https://github.com/ant-design/ant-design/blob/5.x-stable/components/form/FormItem/ItemHolder.tsx\n *\n * Customizations for @bioturing/components:\n * - Added `classNames` prop support for styling sub-elements\n * - Pass custom props (optionalMark, requiredMark, labelRender) to FormItemLabel\n *\n * Last synced with antd version: 5.x-stable (2025-02-04)\n */\n\n\"use client\";\n\nimport * as React from \"react\";\nimport type { Meta } from \"rc-field-form/lib/interface\";\nimport isVisible from \"rc-util/es/Dom/isVisible\";\nimport useLayoutEffect from \"rc-util/es/hooks/useLayoutEffect\";\nimport omit from \"rc-util/es/omit\";\n\n// ============ BioTuring Utils ============\nimport { clsx as classNames } from \"../../utils\";\n\n// ============ Ant Design Imports ============\nimport type { FormItemProps } from \".\";\nimport { Row } from \"antd/es/grid\";\nimport type { ReportMetaChange } from \"antd/es/form/context\";\nimport { FormContext, NoStyleItemContext } from \"antd/es/form/context\";\nimport useDebounce from \"antd/es/form/hooks/useDebounce\";\nimport { getStatus } from \"antd/es/form/util\";\nimport StatusProvider from \"antd/es/form/FormItem/StatusProvider\";\n\n// ============ BioTuring Custom Imports ============\nimport FormItemInput from \"./FormItemInput\";\nimport FormItemLabel from \"./FormItemLabel\";\n\nexport interface ItemHolderProps extends FormItemProps {\n prefixCls: string;\n className?: string;\n rootClassName?: string;\n style?: React.CSSProperties;\n errors: React.ReactNode[];\n warnings: React.ReactNode[];\n meta: Meta;\n children?: React.ReactNode;\n fieldId?: string;\n isRequired?: boolean;\n onSubItemMetaChange: ReportMetaChange;\n\n // ============ BioTuring Custom Props ============\n classNames?: FormItemProps[\"classNames\"];\n optionalMark?: FormItemProps[\"optionalMark\"];\n requiredMark?: FormItemProps[\"requiredMark\"];\n labelRender?: FormItemProps[\"labelRender\"];\n ignoreDefaultRules?: string[];\n // ============ End Custom Props ============\n}\n\nexport default function ItemHolder(props: ItemHolderProps) {\n const {\n prefixCls,\n className,\n rootClassName,\n style,\n help,\n errors,\n warnings,\n validateStatus,\n meta,\n hasFeedback,\n hidden,\n children,\n fieldId,\n required,\n isRequired,\n onSubItemMetaChange,\n layout: propsLayout,\n name,\n // ============ BioTuring Custom: Extract classNames ============\n classNames: customClassNames,\n optionalMark,\n requiredMark,\n labelRender,\n ignoreDefaultRules,\n // ============ End Custom ============\n ...restProps\n } = props;\n\n const itemPrefixCls = `${prefixCls}-item`;\n const { requiredMark: contextRequiredMark, layout: formLayout } = React.useContext(FormContext);\n const layout = propsLayout || formLayout;\n\n const vertical = layout === \"vertical\";\n\n // ======================== Margin ========================\n const itemRef = React.useRef<HTMLDivElement>(null);\n const debounceErrors = useDebounce(errors);\n const debounceWarnings = useDebounce(warnings);\n const hasHelp = help !== undefined && help !== null;\n const hasError = !!(hasHelp || errors.length || warnings.length);\n const isOnScreen = !!itemRef.current && isVisible(itemRef.current);\n const [marginBottom, setMarginBottom] = React.useState<number | null>(null);\n\n useLayoutEffect(() => {\n if (hasError && itemRef.current) {\n // The element must be part of the DOMTree to use getComputedStyle\n // https://stackoverflow.com/questions/35360711/getcomputedstyle-returns-a-cssstyledeclaration-but-all-properties-are-empty-on-a\n const itemStyle = getComputedStyle(itemRef.current);\n setMarginBottom(Number.parseInt(itemStyle.marginBottom, 10));\n }\n }, [hasError, isOnScreen]);\n\n const onErrorVisibleChanged = (nextVisible: boolean) => {\n if (!nextVisible) {\n setMarginBottom(null);\n }\n };\n\n // ======================== Status ========================\n\n const getValidateState = (isDebounce = false) => {\n const _errors = isDebounce ? debounceErrors : meta.errors;\n const _warnings = isDebounce ? debounceWarnings : meta.warnings;\n\n return getStatus(_errors, _warnings, meta, \"\", !!hasFeedback, validateStatus);\n };\n\n const mergedValidateStatus = getValidateState();\n\n // ======================== Render ========================\n // ============ BioTuring Custom: Apply root className ============\n const itemClassName = classNames(\n itemPrefixCls,\n className,\n rootClassName,\n customClassNames?.root,\n (hasHelp || debounceErrors.length || debounceWarnings.length) && `${itemPrefixCls}-with-help`,\n // Status\n mergedValidateStatus && hasFeedback && `${itemPrefixCls}-has-feedback`,\n mergedValidateStatus === \"success\" && `${itemPrefixCls}-has-success`,\n mergedValidateStatus === \"warning\" && `${itemPrefixCls}-has-warning`,\n mergedValidateStatus === \"error\" && `${itemPrefixCls}-has-error`,\n mergedValidateStatus === \"validating\" && `${itemPrefixCls}-is-validating`,\n hidden && `${itemPrefixCls}-hidden`,\n // Layout\n layout && `${itemPrefixCls}-${layout}`,\n );\n // ============ End Custom ============\n\n return (\n <div className={itemClassName} style={style} ref={itemRef}>\n {/* ============ BioTuring Custom: Apply row className ============ */}\n <Row\n className={classNames(`${itemPrefixCls}-row`, customClassNames?.row)}\n {...omit(restProps, [\n \"_internalItemRender\" as any,\n \"colon\",\n \"dependencies\",\n \"extra\",\n \"fieldKey\",\n \"getValueFromEvent\",\n \"getValueProps\",\n \"htmlFor\",\n \"id\", // It is deprecated because `htmlFor` is its replacement.\n \"initialValue\",\n \"isListField\",\n \"label\",\n \"labelAlign\",\n \"labelCol\",\n \"labelWrap\",\n \"messageVariables\",\n \"name\",\n \"normalize\",\n \"noStyle\",\n \"preserve\",\n \"requiredMark\",\n \"rules\",\n \"shouldUpdate\",\n \"trigger\",\n \"tooltip\",\n \"validateFirst\",\n \"validateTrigger\",\n \"valuePropName\",\n \"wrapperCol\",\n \"validateDebounce\",\n \"ignoreDefaultRules\",\n \"labelRender\",\n ])}\n >\n {/* Label */}\n <FormItemLabel\n htmlFor={fieldId}\n {...props}\n requiredMark={requiredMark ?? contextRequiredMark}\n required={required ?? isRequired}\n prefixCls={prefixCls}\n vertical={vertical}\n classNames={customClassNames}\n optionalMark={optionalMark}\n labelRender={labelRender}\n />\n {/* Input Group */}\n <FormItemInput\n {...props}\n {...meta}\n errors={debounceErrors}\n warnings={debounceWarnings}\n prefixCls={prefixCls}\n status={mergedValidateStatus}\n help={help}\n marginBottom={marginBottom}\n onErrorVisibleChanged={onErrorVisibleChanged}\n classNames={customClassNames}\n >\n <NoStyleItemContext.Provider value={onSubItemMetaChange}>\n <StatusProvider\n prefixCls={prefixCls}\n meta={meta}\n errors={meta.errors}\n warnings={meta.warnings}\n hasFeedback={hasFeedback}\n // Already calculated\n validateStatus={mergedValidateStatus}\n name={name}\n >\n {children}\n </StatusProvider>\n </NoStyleItemContext.Provider>\n </FormItemInput>\n </Row>\n {/* ============ End Custom ============ */}\n\n {!!marginBottom && (\n <div\n className={`${itemPrefixCls}-margin-offset`}\n style={{\n marginBottom: -marginBottom,\n }}\n />\n )}\n </div>\n );\n}\n"],"names":["ItemHolder","props","prefixCls","className","rootClassName","style","help","errors","warnings","validateStatus","meta","hasFeedback","hidden","children","fieldId","required","isRequired","onSubItemMetaChange","propsLayout","name","customClassNames","optionalMark","requiredMark","labelRender","ignoreDefaultRules","restProps","itemPrefixCls","contextRequiredMark","formLayout","React","FormContext","layout","vertical","itemRef","debounceErrors","useDebounce","debounceWarnings","hasHelp","hasError","isOnScreen","isVisible","marginBottom","setMarginBottom","useLayoutEffect","itemStyle","onErrorVisibleChanged","nextVisible","mergedValidateStatus","isDebounce","_errors","_warnings","getStatus","itemClassName","classNames","jsxs","Row","omit","jsx","FormItemLabel","FormItemInput","NoStyleItemContext","StatusProvider"],"mappings":";;;;;;;;;;;;;;AAyDA,SAAwBA,GAAWC,GAAwB;AACzD,QAAM;AAAA,IACJ,WAAAC;AAAA,IACA,WAAAC;AAAA,IACA,eAAAC;AAAA,IACA,OAAAC;AAAA,IACA,MAAAC;AAAA,IACA,QAAAC;AAAA,IACA,UAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,MAAAC;AAAA,IACA,aAAAC;AAAA,IACA,QAAAC;AAAA,IACA,UAAAC;AAAA,IACA,SAAAC;AAAA,IACA,UAAAC;AAAA,IACA,YAAAC;AAAA,IACA,qBAAAC;AAAA,IACA,QAAQC;AAAA,IACR,MAAAC;AAAA;AAAA,IAEA,YAAYC;AAAA,IACZ,cAAAC;AAAA,IACA,cAAAC;AAAA,IACA,aAAAC;AAAA,IACA,oBAAAC;AAAA;AAAA,IAEA,GAAGC;AAAA,EAAA,IACDxB,GAEEyB,IAAgB,GAAGxB,CAAS,SAC5B,EA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AEZ,UAAA,gBAAAqC,EAACG,EAAmB,UAAnB,EAA4B,OAAO3C,GAClC,UAAA,gBAAAwC;AAAA,gBAACI;AAAA,gBAAA;AAAA,kBACC,WAAA3D;AAAA,kBACA,MAAAQ;AAAA,kBACA,QAAQA,EAAK;AAAA,kBACb,UAAUA,EAAK;AAAA,kBACf,aAAAC;AAAA,kBAEA,gBAAgBoC;AAAA,kBAChB,MAAA5B;AAAA,kBAEC,UAAAN;AAAA,gBAAA;AAAA,cAAA,EACH,CACF;AAAA,YAAA;AAAA,UAAA;AAAA,QACF;AAAA,MAAA;AAAA,IAAA;AAAA,IAID,CAAC,CAAC4B,KACD,gBAAAgB;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,WAAW,GAAG/B,CAAa;AAAA,QAC3B,OAAO;AAAA,UACL,cAAc,CAACe;AAAA,QAAA;AAAA,MACjB;AAAA,IAAA;AAAA,EACF,GAEJ;AAEJ;"}
|
|
@@ -95,6 +95,12 @@ export interface FormItemProps<Values = any> extends Omit<FormItemLabelProps, 'r
|
|
|
95
95
|
* @custom BioTuring addition
|
|
96
96
|
*/
|
|
97
97
|
labelRender?: (label: React.ReactElement) => React.ReactElement;
|
|
98
|
+
/**
|
|
99
|
+
* Rule keys to ignore from `componentConfig.formValidation`. Use `BLOCKED_CHARS_KEY` to skip blocked characters validation.
|
|
100
|
+
* @default undefined
|
|
101
|
+
* @custom BioTuring addition
|
|
102
|
+
*/
|
|
103
|
+
ignoreDefaultRules?: string[];
|
|
98
104
|
}
|
|
99
105
|
declare function InternalFormItem<Values = any>(props: FormItemProps<Values>): React.ReactElement;
|
|
100
106
|
type InternalFormItemType = typeof InternalFormItem;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/form/FormItem/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAIH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EAA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