@react-form-builder/components-rsuite 3.5.0 → 3.6.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/index.js +26 -28
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -258,8 +258,11 @@ const F = J.withEditorProps({ min: 0 }), lt = J.withEditorProps({ min: 1 }), lA
|
|
|
258
258
|
size: B.hinted("A picker size"),
|
|
259
259
|
value: q.valued.hinted("Value (Controlled)")
|
|
260
260
|
}), SA = ({ data: A, onLoadData: e, value: t, preload: n, ...o }) => {
|
|
261
|
-
const [s, d] = g(""), [i, f] = g(A ?? []), [u, E] = g(!1), M = (R) => R.value === t
|
|
262
|
-
|
|
261
|
+
const [s, d] = g(""), [i, f] = g(A ?? []), [u, E] = g(!1), M = (R) => R.value === t, p = (R) => {
|
|
262
|
+
let k = i;
|
|
263
|
+
t && R.some(M) && (k = i.filter((Q) => !M(Q))), f([...k, ...R]), E(!1);
|
|
264
|
+
};
|
|
265
|
+
return Y(() => {
|
|
263
266
|
n && (e == null || e("", p, 0));
|
|
264
267
|
}, [n, e]), Y(() => {
|
|
265
268
|
const R = t && !(A != null && A.some(M)) ? [{ value: t, label: t }] : [];
|
|
@@ -269,12 +272,7 @@ const F = J.withEditorProps({ min: 0 }), lt = J.withEditorProps({ min: 1 }), lA
|
|
|
269
272
|
]);
|
|
270
273
|
}, [A]), Y(() => {
|
|
271
274
|
s && (e && E(!0), e == null || e(s, p, 0));
|
|
272
|
-
}, [s])
|
|
273
|
-
const p = (R) => {
|
|
274
|
-
let k = i;
|
|
275
|
-
t && R.some(M) && (k = i.filter((Q) => !M(Q))), f([...k, ...R]), E(!1);
|
|
276
|
-
};
|
|
277
|
-
return { data: i, value: t, loading: u, listProps: {
|
|
275
|
+
}, [s]), { data: i, value: t, loading: u, listProps: {
|
|
278
276
|
onItemsRendered: ({ visibleStopIndex: R }) => {
|
|
279
277
|
e && R >= i.length - 1 && (E(!0), e(s, p, i.length));
|
|
280
278
|
}
|
|
@@ -319,15 +317,15 @@ const F = J.withEditorProps({ min: 0 }), lt = J.withEditorProps({ min: 1 }), lA
|
|
|
319
317
|
preload: a.default(!1),
|
|
320
318
|
label: l.default("Select"),
|
|
321
319
|
data: y.default(X(["a", "b", "c"]))
|
|
322
|
-
}), Ot = (A) => /* @__PURE__ */ r(N, { children: "Dropzone" }), gt = h(Ot, "RsDropzone").name("Dropzone"), Yt =
|
|
323
|
-
e,
|
|
324
|
-
/* @__PURE__ */ r(K.ErrorMessage, { show: !!A, placement: t ?? "bottomStart", children: A })
|
|
325
|
-
] }), Ut = C.div`
|
|
320
|
+
}), Ot = (A) => /* @__PURE__ */ r(N, { children: "Dropzone" }), gt = h(Ot, "RsDropzone").name("Dropzone"), Yt = C.div`
|
|
326
321
|
display: flex;
|
|
327
322
|
flex-direction: column;
|
|
328
323
|
width: 100%;
|
|
329
324
|
height: 100%;
|
|
330
|
-
`,
|
|
325
|
+
`, Ut = ({ error: A, children: e, placement: t, className: n }) => /* @__PURE__ */ S(Yt, { className: QA(n, A ? "rs-form-control-wrapper" : void 0), children: [
|
|
326
|
+
e,
|
|
327
|
+
/* @__PURE__ */ r(K.ErrorMessage, { show: !!A, placement: t ?? "bottomStart", children: A })
|
|
328
|
+
] }), Tt = h(Ut, "RsErrorMessage").name("Error message").props({
|
|
331
329
|
placement: lA.default("bottomStart"),
|
|
332
330
|
className: l
|
|
333
331
|
}), Ft = (A) => /* @__PURE__ */ r(Se, { children: /* @__PURE__ */ S(ke, { children: [
|
|
@@ -549,19 +547,7 @@ const jn = ({ style: A, className: e, label: t, onChange: n, value: o, ...s }) =
|
|
|
549
547
|
onChange: c,
|
|
550
548
|
items: y.default(X(["a", "b", "c"])),
|
|
551
549
|
value: l.valued.hinted("Radio group value")
|
|
552
|
-
}), Jn =
|
|
553
|
-
const { loading: f, onOpen: u, ...E } = SA({ data: A, onLoadData: t, onSearch: n, value: o, preload: d }), M = (j) => {
|
|
554
|
-
var P;
|
|
555
|
-
return (P = E.data) != null && P.length ? j : null;
|
|
556
|
-
}, p = W(i, "onClean"), m = f ? DA : Qe;
|
|
557
|
-
return /* @__PURE__ */ S(z, { className: s, children: [
|
|
558
|
-
/* @__PURE__ */ r(K.ControlLabel, { children: e }),
|
|
559
|
-
/* @__PURE__ */ S(Dn, { children: [
|
|
560
|
-
/* @__PURE__ */ r(Ln, { ...i, ...E, onClean: p, renderMenu: M, caretAs: Jn }),
|
|
561
|
-
!(i.cleanable && o) && /* @__PURE__ */ r(m, { className: "search-icon" })
|
|
562
|
-
] })
|
|
563
|
-
] });
|
|
564
|
-
}, Dn = C.div`
|
|
550
|
+
}), Jn = C.div`
|
|
565
551
|
display: flex;
|
|
566
552
|
flex: 1;
|
|
567
553
|
|
|
@@ -575,9 +561,21 @@ const jn = ({ style: A, className: e, label: t, onChange: n, value: o, ...s }) =
|
|
|
575
561
|
height: 16px !important;
|
|
576
562
|
width: 16px !important;
|
|
577
563
|
}
|
|
578
|
-
`,
|
|
564
|
+
`, yn = C(LA)`
|
|
579
565
|
flex: 1;
|
|
580
|
-
`,
|
|
566
|
+
`, Dn = () => null, Ln = ({ data: A, label: e, onLoadData: t, onSearch: n, value: o = "", className: s, preload: d, ...i }) => {
|
|
567
|
+
const { loading: f, onOpen: u, ...E } = SA({ data: A, onLoadData: t, onSearch: n, value: o, preload: d }), M = (j) => {
|
|
568
|
+
var P;
|
|
569
|
+
return (P = E.data) != null && P.length ? j : null;
|
|
570
|
+
}, p = W(i, "onClean"), m = f ? DA : Qe;
|
|
571
|
+
return /* @__PURE__ */ S(z, { className: s, children: [
|
|
572
|
+
/* @__PURE__ */ r(K.ControlLabel, { children: e }),
|
|
573
|
+
/* @__PURE__ */ S(Jn, { children: [
|
|
574
|
+
/* @__PURE__ */ r(yn, { ...i, ...E, onClean: p, renderMenu: M, caretAs: Dn }),
|
|
575
|
+
!(i.cleanable && o) && /* @__PURE__ */ r(m, { className: "search-icon" })
|
|
576
|
+
] })
|
|
577
|
+
] });
|
|
578
|
+
}, Nn = h(Ln, "RsSearch").name("Search").props({
|
|
581
579
|
...nA,
|
|
582
580
|
preload: a.default(!1),
|
|
583
581
|
label: l.default("Search"),
|