@crediblemark/build 0.24.5 → 0.24.6
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/ArrayField-2QLVE7PT.mjs +19 -0
- package/dist/{ArrayField-ZD5UTLNU.css → ArrayField-LGEHKPX7.css} +50 -33
- package/dist/{Editor-HOZVZZIZ.mjs → Editor-3EPLDK4J.mjs} +7 -7
- package/dist/{ObjectField-SQKROKJM.css → ObjectField-XRKCCMPB.css} +50 -33
- package/dist/ObjectField-XXOU2VP4.mjs +19 -0
- package/dist/{chunk-VBNE6GK2.mjs → chunk-5JSNFZKX.mjs} +7 -7
- package/dist/{chunk-5VWWS4RS.mjs → chunk-AMHAYK37.mjs} +736 -372
- package/dist/{chunk-WKMRHPOM.mjs → chunk-KUWVOWUV.mjs} +1 -1
- package/dist/{chunk-LBMMY5IM.mjs → chunk-MFTVX2ME.mjs} +1 -1
- package/dist/{ArrayField-F7OLZF6U.mjs → chunk-QBCQ7LDT.mjs} +364 -45
- package/dist/chunk-TE6MUUVZ.mjs +92 -0
- package/dist/{chunk-5OK3IPVN.mjs → chunk-VE6BIQKS.mjs} +1 -1
- package/dist/{chunk-H2LU4EW3.mjs → chunk-WDTSUNWU.mjs} +209 -156
- package/dist/{chunk-2VS2BST6.mjs → chunk-WH3A7FAR.mjs} +1 -1
- package/dist/{chunk-GIUKL443.mjs → chunk-XLNVCM4Q.mjs} +30 -30
- package/dist/{chunk-6RPYD5IO.mjs → chunk-YE4FXNJW.mjs} +2 -2
- package/dist/{full-65U7W6EN.mjs → full-SYDEKGLJ.mjs} +5 -5
- package/dist/index.css +50 -33
- package/dist/index.d.mts +37 -1
- package/dist/index.d.ts +37 -1
- package/dist/index.js +1095 -696
- package/dist/index.mjs +17 -10
- package/dist/{loaded-3NNC6Q35.mjs → loaded-5JH76RZT.mjs} +2 -2
- package/dist/{loaded-2CPFB62H.mjs → loaded-NHGZU7V3.mjs} +2 -2
- package/dist/{loaded-GYA4OMNE.mjs → loaded-ON5OAY2P.mjs} +2 -2
- package/dist/no-external.css +50 -33
- package/dist/no-external.d.mts +1 -1
- package/dist/no-external.d.ts +1 -1
- package/dist/no-external.js +1095 -696
- package/dist/no-external.mjs +17 -10
- package/package.json +1 -1
- package/dist/ObjectField-4SN4ZYFF.mjs +0 -87
- package/dist/chunk-BQW2NTNG.mjs +0 -339
- package/dist/chunk-IRJS3HWQ.mjs +0 -60
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
EditorInner
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-WH3A7FAR.mjs";
|
|
4
4
|
import {
|
|
5
5
|
IconButton,
|
|
6
6
|
LoadedRichTextMenuInner,
|
|
7
7
|
Loader
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-5JSNFZKX.mjs";
|
|
9
9
|
import {
|
|
10
10
|
ChevronDown,
|
|
11
11
|
CircleCheckBig,
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
SlidersHorizontal,
|
|
18
18
|
Type,
|
|
19
19
|
useAppStore
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-XLNVCM4Q.mjs";
|
|
21
21
|
import {
|
|
22
22
|
get_class_name_factory_default
|
|
23
23
|
} from "./chunk-BFHV72KK.mjs";
|
|
@@ -75,7 +75,7 @@ function useFieldStore(selector) {
|
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
// css-module:/home/crediblemark/Project/Credibuild/components/AutoField/styles.module.css#css-module
|
|
78
|
-
var styles_module_default = { "InputWrapper": "
|
|
78
|
+
var styles_module_default = { "InputWrapper": "_InputWrapper_1mz7o_1", "Input-label": "_Input-label_1mz7o_5", "Input-label--noChildren": "_Input-label--noChildren_1mz7o_14", "Input-labelIcon": "_Input-labelIcon_1mz7o_18", "Input-disabledIcon": "_Input-disabledIcon_1mz7o_25", "Input-input": "_Input-input_1mz7o_30", "Input": "_Input_1mz7o_1", "Input--readOnly": "_Input--readOnly_1mz7o_86", "Input-radioGroupItems": "_Input-radioGroupItems_1mz7o_97", "Input-radio": "_Input-radio_1mz7o_97", "Input-radioInner": "_Input-radioInner_1mz7o_114", "Input-radioInput": "_Input-radioInput_1mz7o_159" };
|
|
79
79
|
|
|
80
80
|
// components/AutoField/FieldLabel.tsx
|
|
81
81
|
import { useMemo } from "react";
|
|
@@ -91,7 +91,7 @@ var FieldLabel = ({
|
|
|
91
91
|
}) => {
|
|
92
92
|
const El = el;
|
|
93
93
|
return /* @__PURE__ */ jsxs(El, { className, children: [
|
|
94
|
-
/* @__PURE__ */ jsxs("div", { className: getClassName("label")
|
|
94
|
+
/* @__PURE__ */ jsxs("div", { className: `${getClassName("label")} ${!children ? styles_module_default["Input-label--noChildren"] : ""}`, children: [
|
|
95
95
|
icon ? /* @__PURE__ */ jsx2("div", { className: getClassName("labelIcon"), children: icon }) : /* @__PURE__ */ jsx2(Fragment, {}),
|
|
96
96
|
label,
|
|
97
97
|
readOnly && /* @__PURE__ */ jsx2("div", { className: getClassName("disabledIcon"), title: "Read-only", children: /* @__PURE__ */ jsx2(Lock, { size: "12" }) })
|
|
@@ -261,29 +261,15 @@ var Button = ({
|
|
|
261
261
|
return el;
|
|
262
262
|
};
|
|
263
263
|
|
|
264
|
-
// components/AutoField/
|
|
265
|
-
import {
|
|
266
|
-
useCallback as useCallback4,
|
|
267
|
-
useEffect as useEffect6,
|
|
268
|
-
useMemo as useMemo5
|
|
269
|
-
} from "react";
|
|
270
|
-
|
|
271
|
-
// lib/use-safe-id.ts
|
|
272
|
-
import React2, { useState as useState3 } from "react";
|
|
273
|
-
var useSafeId = () => {
|
|
274
|
-
if (typeof React2.useId !== "undefined") {
|
|
275
|
-
return React2.useId();
|
|
276
|
-
}
|
|
277
|
-
const [id] = useState3(generateId());
|
|
278
|
-
return id;
|
|
279
|
-
};
|
|
264
|
+
// components/AutoField/subfield.tsx
|
|
265
|
+
import { memo as memo2 } from "react";
|
|
280
266
|
|
|
281
267
|
// components/AutoField/AutoFieldInternal.tsx
|
|
282
268
|
import {
|
|
283
269
|
Suspense as Suspense2,
|
|
284
|
-
useCallback as
|
|
285
|
-
useContext as
|
|
286
|
-
useMemo as
|
|
270
|
+
useCallback as useCallback4,
|
|
271
|
+
useContext as useContext5,
|
|
272
|
+
useMemo as useMemo5
|
|
287
273
|
} from "react";
|
|
288
274
|
import { useShallow as useShallow3 } from "zustand/react/shallow";
|
|
289
275
|
import { lazy as lazy2 } from "react";
|
|
@@ -394,14 +380,14 @@ var SelectField = ({
|
|
|
394
380
|
};
|
|
395
381
|
|
|
396
382
|
// components/AutoField/fields/ExternalField/index.tsx
|
|
397
|
-
import { useEffect as
|
|
383
|
+
import { useEffect as useEffect5 } from "react";
|
|
398
384
|
|
|
399
385
|
// components/ExternalInput/index.tsx
|
|
400
386
|
import {
|
|
401
|
-
useMemo as
|
|
402
|
-
useEffect as
|
|
387
|
+
useMemo as useMemo4,
|
|
388
|
+
useEffect as useEffect4,
|
|
403
389
|
useState as useState5,
|
|
404
|
-
useCallback,
|
|
390
|
+
useCallback as useCallback2,
|
|
405
391
|
isValidElement
|
|
406
392
|
} from "react";
|
|
407
393
|
|
|
@@ -409,7 +395,7 @@ import {
|
|
|
409
395
|
var styles_module_default2 = { "ExternalInput-actions": "_ExternalInput-actions_1gpb4_1", "ExternalInput-button": "_ExternalInput-button_1gpb4_5", "ExternalInput--dataSelected": "_ExternalInput--dataSelected_1gpb4_24", "ExternalInput--readOnly": "_ExternalInput--readOnly_1gpb4_31", "ExternalInput-detachButton": "_ExternalInput-detachButton_1gpb4_35", "ExternalInput": "_ExternalInput_1gpb4_1", "ExternalInputModal": "_ExternalInputModal_1gpb4_79", "ExternalInputModal-grid": "_ExternalInputModal-grid_1gpb4_89", "ExternalInputModal--filtersToggled": "_ExternalInputModal--filtersToggled_1gpb4_100", "ExternalInputModal-filters": "_ExternalInputModal-filters_1gpb4_105", "ExternalInputModal-masthead": "_ExternalInputModal-masthead_1gpb4_124", "ExternalInputModal-tableWrapper": "_ExternalInputModal-tableWrapper_1gpb4_133", "ExternalInputModal-table": "_ExternalInputModal-table_1gpb4_133", "ExternalInputModal-thead": "_ExternalInputModal-thead_1gpb4_149", "ExternalInputModal-th": "_ExternalInputModal-th_1gpb4_149", "ExternalInputModal-td": "_ExternalInputModal-td_1gpb4_164", "ExternalInputModal-tr": "_ExternalInputModal-tr_1gpb4_169", "ExternalInputModal-tbody": "_ExternalInputModal-tbody_1gpb4_176", "ExternalInputModal--hasData": "_ExternalInputModal--hasData_1gpb4_202", "ExternalInputModal-loadingBanner": "_ExternalInputModal-loadingBanner_1gpb4_206", "ExternalInputModal--isLoading": "_ExternalInputModal--isLoading_1gpb4_223", "ExternalInputModal-searchForm": "_ExternalInputModal-searchForm_1gpb4_227", "ExternalInputModal-search": "_ExternalInputModal-search_1gpb4_227", "ExternalInputModal-searchIcon": "_ExternalInputModal-searchIcon_1gpb4_264", "ExternalInputModal-searchIconText": "_ExternalInputModal-searchIconText_1gpb4_289", "ExternalInputModal-searchInput": "_ExternalInputModal-searchInput_1gpb4_299", "ExternalInputModal-searchActions": "_ExternalInputModal-searchActions_1gpb4_313", "ExternalInputModal-searchActionIcon": "_ExternalInputModal-searchActionIcon_1gpb4_326", "ExternalInputModal-footerContainer": "_ExternalInputModal-footerContainer_1gpb4_330", "ExternalInputModal-footer": "_ExternalInputModal-footer_1gpb4_330", "ExternalInputModal-field": "_ExternalInputModal-field_1gpb4_343" };
|
|
410
396
|
|
|
411
397
|
// components/Modal/index.tsx
|
|
412
|
-
import { useEffect as useEffect2, useState as
|
|
398
|
+
import { useEffect as useEffect2, useState as useState3 } from "react";
|
|
413
399
|
|
|
414
400
|
// css-module:/home/crediblemark/Project/Credibuild/components/Modal/styles.module.css#css-module
|
|
415
401
|
var styles_module_default3 = { "Modal": "_Modal_b422s_1", "Modal--isOpen": "_Modal--isOpen_b422s_15", "Modal-inner": "_Modal-inner_b422s_19" };
|
|
@@ -423,7 +409,7 @@ var Modal = ({
|
|
|
423
409
|
onClose,
|
|
424
410
|
isOpen
|
|
425
411
|
}) => {
|
|
426
|
-
const [rootEl, setRootEl] =
|
|
412
|
+
const [rootEl, setRootEl] = useState3(null);
|
|
427
413
|
useEffect2(() => {
|
|
428
414
|
setRootEl(document.getElementById("credbuild-portal-root"));
|
|
429
415
|
}, []);
|
|
@@ -462,9 +448,73 @@ var Heading = ({ children, rank, size = "m" }) => {
|
|
|
462
448
|
);
|
|
463
449
|
};
|
|
464
450
|
|
|
451
|
+
// components/AutoField/index.tsx
|
|
452
|
+
import {
|
|
453
|
+
useCallback,
|
|
454
|
+
useEffect as useEffect3,
|
|
455
|
+
useMemo as useMemo3
|
|
456
|
+
} from "react";
|
|
457
|
+
|
|
458
|
+
// lib/use-safe-id.ts
|
|
459
|
+
import React2, { useState as useState4 } from "react";
|
|
460
|
+
var useSafeId = () => {
|
|
461
|
+
if (typeof React2.useId !== "undefined") {
|
|
462
|
+
return React2.useId();
|
|
463
|
+
}
|
|
464
|
+
const [id] = useState4(generateId());
|
|
465
|
+
return id;
|
|
466
|
+
};
|
|
467
|
+
|
|
468
|
+
// components/AutoField/index.tsx
|
|
469
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
470
|
+
var getClassName7 = get_class_name_factory_default("Input", styles_module_default);
|
|
471
|
+
var getClassNameWrapper = get_class_name_factory_default("InputWrapper", styles_module_default);
|
|
472
|
+
function AutoFieldPublicInternal({ value, ...props }) {
|
|
473
|
+
const DefaultLabel = useMemo3(() => {
|
|
474
|
+
const DefaultLabel2 = (labelProps) => /* @__PURE__ */ jsx9(
|
|
475
|
+
"div",
|
|
476
|
+
{
|
|
477
|
+
...labelProps,
|
|
478
|
+
className: getClassName7({ readOnly: props.readOnly })
|
|
479
|
+
}
|
|
480
|
+
);
|
|
481
|
+
return DefaultLabel2;
|
|
482
|
+
}, [props.readOnly]);
|
|
483
|
+
const fieldStore = useFieldStoreApi();
|
|
484
|
+
const { id: propsId, onChange: propsOnChange } = props;
|
|
485
|
+
const onChange = useCallback(
|
|
486
|
+
(value2) => {
|
|
487
|
+
if (!propsId) return;
|
|
488
|
+
fieldStore.setState({ [propsId]: value2 });
|
|
489
|
+
propsOnChange(value2);
|
|
490
|
+
},
|
|
491
|
+
[fieldStore, propsOnChange, propsId]
|
|
492
|
+
);
|
|
493
|
+
useEffect3(() => {
|
|
494
|
+
if (!props.id) return;
|
|
495
|
+
fieldStore.setState({ [props.id]: value });
|
|
496
|
+
}, [props.id, value, fieldStore]);
|
|
497
|
+
return /* @__PURE__ */ jsx9(
|
|
498
|
+
AutoFieldInternal,
|
|
499
|
+
{
|
|
500
|
+
...props,
|
|
501
|
+
onChange,
|
|
502
|
+
Label: DefaultLabel
|
|
503
|
+
}
|
|
504
|
+
);
|
|
505
|
+
}
|
|
506
|
+
function AutoField(props) {
|
|
507
|
+
const id = useSafeId();
|
|
508
|
+
if (props.field.type === "slot") {
|
|
509
|
+
return null;
|
|
510
|
+
}
|
|
511
|
+
const providerValue = useMemo3(() => ({ [id]: props.value }), [id, props.value]);
|
|
512
|
+
return /* @__PURE__ */ jsx9(fieldContextStore.Provider, { value: providerValue, children: /* @__PURE__ */ jsx9(AutoFieldPublicInternal, { ...props, id }) });
|
|
513
|
+
}
|
|
514
|
+
|
|
465
515
|
// components/ExternalInput/index.tsx
|
|
466
|
-
import { Fragment as Fragment2, jsx as
|
|
467
|
-
var
|
|
516
|
+
import { Fragment as Fragment2, jsx as jsx10, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
517
|
+
var getClassName8 = get_class_name_factory_default("ExternalInput", styles_module_default2);
|
|
468
518
|
var getClassNameModal = get_class_name_factory_default("ExternalInputModal", styles_module_default2);
|
|
469
519
|
var dataCache = {};
|
|
470
520
|
var ExternalInput = ({
|
|
@@ -487,10 +537,10 @@ var ExternalInput = ({
|
|
|
487
537
|
const hasFilterFields = !!filterFields;
|
|
488
538
|
const [filters, setFilters] = useState5(field.initialFilters || {});
|
|
489
539
|
const [filtersToggled, setFiltersToggled] = useState5(hasFilterFields);
|
|
490
|
-
const mappedData =
|
|
540
|
+
const mappedData = useMemo4(() => {
|
|
491
541
|
return data.map(mapRow);
|
|
492
542
|
}, [data, mapRow]);
|
|
493
|
-
const keys =
|
|
543
|
+
const keys = useMemo4(() => {
|
|
494
544
|
const validKeys = /* @__PURE__ */ new Set();
|
|
495
545
|
for (const item of mappedData) {
|
|
496
546
|
for (const key of Object.keys(item)) {
|
|
@@ -502,7 +552,7 @@ var ExternalInput = ({
|
|
|
502
552
|
return Array.from(validKeys);
|
|
503
553
|
}, [mappedData]);
|
|
504
554
|
const [searchQuery, setSearchQuery] = useState5(field.initialQuery || "");
|
|
505
|
-
const search =
|
|
555
|
+
const search = useCallback2(
|
|
506
556
|
async (query, filters2) => {
|
|
507
557
|
setIsLoading(true);
|
|
508
558
|
const cacheKey = `${id}-${query}-${JSON.stringify(filters2)}`;
|
|
@@ -522,7 +572,7 @@ var ExternalInput = ({
|
|
|
522
572
|
},
|
|
523
573
|
[id, field, shouldCacheData]
|
|
524
574
|
);
|
|
525
|
-
const Footer =
|
|
575
|
+
const Footer = useCallback2(
|
|
526
576
|
(props) => field.renderFooter ? field.renderFooter(props) : /* @__PURE__ */ jsxs4("span", { className: getClassNameModal("footer"), children: [
|
|
527
577
|
props.items.length,
|
|
528
578
|
" result",
|
|
@@ -530,47 +580,47 @@ var ExternalInput = ({
|
|
|
530
580
|
] }),
|
|
531
581
|
[field]
|
|
532
582
|
);
|
|
533
|
-
|
|
583
|
+
useEffect4(() => {
|
|
534
584
|
search(searchQuery, filters);
|
|
535
585
|
}, [search, searchQuery, filters]);
|
|
536
586
|
return /* @__PURE__ */ jsxs4(
|
|
537
587
|
"div",
|
|
538
588
|
{
|
|
539
|
-
className:
|
|
589
|
+
className: getClassName8({
|
|
540
590
|
dataSelected: !!value,
|
|
541
591
|
modalVisible: isOpen,
|
|
542
592
|
readOnly
|
|
543
593
|
}),
|
|
544
594
|
id,
|
|
545
595
|
children: [
|
|
546
|
-
/* @__PURE__ */ jsxs4("div", { className:
|
|
547
|
-
/* @__PURE__ */
|
|
596
|
+
/* @__PURE__ */ jsxs4("div", { className: getClassName8("actions"), children: [
|
|
597
|
+
/* @__PURE__ */ jsx10(
|
|
548
598
|
"button",
|
|
549
599
|
{
|
|
550
600
|
type: "button",
|
|
551
601
|
onClick: () => setOpen(true),
|
|
552
|
-
className:
|
|
602
|
+
className: getClassName8("button"),
|
|
553
603
|
disabled: readOnly,
|
|
554
604
|
children: value ? field.getItemSummary ? field.getItemSummary(value) : "External item" : /* @__PURE__ */ jsxs4(Fragment2, { children: [
|
|
555
|
-
/* @__PURE__ */
|
|
556
|
-
/* @__PURE__ */
|
|
605
|
+
/* @__PURE__ */ jsx10(Link, { size: "16" }),
|
|
606
|
+
/* @__PURE__ */ jsx10("span", { children: field.placeholder })
|
|
557
607
|
] })
|
|
558
608
|
}
|
|
559
609
|
),
|
|
560
|
-
value && /* @__PURE__ */
|
|
610
|
+
value && /* @__PURE__ */ jsx10(
|
|
561
611
|
"button",
|
|
562
612
|
{
|
|
563
613
|
type: "button",
|
|
564
|
-
className:
|
|
614
|
+
className: getClassName8("detachButton"),
|
|
565
615
|
onClick: () => {
|
|
566
616
|
onChange(null);
|
|
567
617
|
},
|
|
568
618
|
disabled: readOnly,
|
|
569
|
-
children: /* @__PURE__ */
|
|
619
|
+
children: /* @__PURE__ */ jsx10(LockOpen, { size: 16 })
|
|
570
620
|
}
|
|
571
621
|
)
|
|
572
622
|
] }),
|
|
573
|
-
/* @__PURE__ */
|
|
623
|
+
/* @__PURE__ */ jsx10(Modal, { onClose: () => setOpen(false), isOpen, children: /* @__PURE__ */ jsxs4(
|
|
574
624
|
"form",
|
|
575
625
|
{
|
|
576
626
|
className: getClassNameModal({
|
|
@@ -585,11 +635,11 @@ var ExternalInput = ({
|
|
|
585
635
|
search(searchQuery, filters);
|
|
586
636
|
},
|
|
587
637
|
children: [
|
|
588
|
-
/* @__PURE__ */
|
|
638
|
+
/* @__PURE__ */ jsx10("div", { className: getClassNameModal("masthead"), children: field.showSearch ? /* @__PURE__ */ jsxs4("div", { className: getClassNameModal("searchForm"), children: [
|
|
589
639
|
/* @__PURE__ */ jsxs4("label", { className: getClassNameModal("search"), children: [
|
|
590
|
-
/* @__PURE__ */
|
|
591
|
-
/* @__PURE__ */
|
|
592
|
-
/* @__PURE__ */
|
|
640
|
+
/* @__PURE__ */ jsx10("span", { className: getClassNameModal("searchIconText"), children: "Search" }),
|
|
641
|
+
/* @__PURE__ */ jsx10("div", { className: getClassNameModal("searchIcon"), children: /* @__PURE__ */ jsx10(Search, { size: "18" }) }),
|
|
642
|
+
/* @__PURE__ */ jsx10(
|
|
593
643
|
"input",
|
|
594
644
|
{
|
|
595
645
|
className: getClassNameModal("searchInput"),
|
|
@@ -605,8 +655,8 @@ var ExternalInput = ({
|
|
|
605
655
|
)
|
|
606
656
|
] }),
|
|
607
657
|
/* @__PURE__ */ jsxs4("div", { className: getClassNameModal("searchActions"), children: [
|
|
608
|
-
/* @__PURE__ */
|
|
609
|
-
hasFilterFields && /* @__PURE__ */
|
|
658
|
+
/* @__PURE__ */ jsx10(Button, { type: "submit", loading: isLoading, fullWidth: true, children: "Search" }),
|
|
659
|
+
hasFilterFields && /* @__PURE__ */ jsx10("div", { className: getClassNameModal("searchActionIcon"), children: /* @__PURE__ */ jsx10(
|
|
610
660
|
IconButton,
|
|
611
661
|
{
|
|
612
662
|
type: "button",
|
|
@@ -616,19 +666,19 @@ var ExternalInput = ({
|
|
|
616
666
|
e.stopPropagation();
|
|
617
667
|
setFiltersToggled(!filtersToggled);
|
|
618
668
|
},
|
|
619
|
-
children: /* @__PURE__ */
|
|
669
|
+
children: /* @__PURE__ */ jsx10(SlidersHorizontal, { size: 20 })
|
|
620
670
|
}
|
|
621
671
|
) })
|
|
622
672
|
] })
|
|
623
|
-
] }) : /* @__PURE__ */
|
|
673
|
+
] }) : /* @__PURE__ */ jsx10(Heading, { rank: "2", size: "xs", children: field.placeholder || "Select data" }) }),
|
|
624
674
|
/* @__PURE__ */ jsxs4("div", { className: getClassNameModal("grid"), children: [
|
|
625
|
-
hasFilterFields && /* @__PURE__ */
|
|
675
|
+
hasFilterFields && /* @__PURE__ */ jsx10("div", { className: getClassNameModal("filters"), children: hasFilterFields && Object.keys(filterFields).map((fieldName) => {
|
|
626
676
|
const filterField = filterFields[fieldName];
|
|
627
|
-
return /* @__PURE__ */
|
|
677
|
+
return /* @__PURE__ */ jsx10(
|
|
628
678
|
"div",
|
|
629
679
|
{
|
|
630
680
|
className: getClassNameModal("field"),
|
|
631
|
-
children: /* @__PURE__ */
|
|
681
|
+
children: /* @__PURE__ */ jsx10(FieldLabel, { label: filterField.label || fieldName, children: /* @__PURE__ */ jsx10(
|
|
632
682
|
AutoField,
|
|
633
683
|
{
|
|
634
684
|
field: filterField,
|
|
@@ -652,7 +702,7 @@ var ExternalInput = ({
|
|
|
652
702
|
}) }),
|
|
653
703
|
/* @__PURE__ */ jsxs4("div", { className: getClassNameModal("tableWrapper"), children: [
|
|
654
704
|
/* @__PURE__ */ jsxs4("table", { className: getClassNameModal("table"), children: [
|
|
655
|
-
/* @__PURE__ */
|
|
705
|
+
/* @__PURE__ */ jsx10("thead", { className: getClassNameModal("thead"), children: /* @__PURE__ */ jsx10("tr", { className: getClassNameModal("tr"), children: keys.map((key) => /* @__PURE__ */ jsx10(
|
|
656
706
|
"th",
|
|
657
707
|
{
|
|
658
708
|
className: getClassNameModal("th"),
|
|
@@ -661,8 +711,8 @@ var ExternalInput = ({
|
|
|
661
711
|
},
|
|
662
712
|
key
|
|
663
713
|
)) }) }),
|
|
664
|
-
/* @__PURE__ */
|
|
665
|
-
return /* @__PURE__ */
|
|
714
|
+
/* @__PURE__ */ jsx10("tbody", { className: getClassNameModal("tbody"), children: mappedData.map((item, i) => {
|
|
715
|
+
return /* @__PURE__ */ jsx10(
|
|
666
716
|
"tr",
|
|
667
717
|
{
|
|
668
718
|
style: { whiteSpace: "nowrap" },
|
|
@@ -671,16 +721,16 @@ var ExternalInput = ({
|
|
|
671
721
|
onChange(mapProp(data[i]));
|
|
672
722
|
setOpen(false);
|
|
673
723
|
},
|
|
674
|
-
children: keys.map((key) => /* @__PURE__ */
|
|
724
|
+
children: keys.map((key) => /* @__PURE__ */ jsx10("td", { className: getClassNameModal("td"), children: item[key] }, key))
|
|
675
725
|
},
|
|
676
726
|
i
|
|
677
727
|
);
|
|
678
728
|
}) })
|
|
679
729
|
] }),
|
|
680
|
-
/* @__PURE__ */
|
|
730
|
+
/* @__PURE__ */ jsx10("div", { className: getClassNameModal("loadingBanner"), children: /* @__PURE__ */ jsx10(Loader, { size: 24 }) })
|
|
681
731
|
] })
|
|
682
732
|
] }),
|
|
683
|
-
/* @__PURE__ */
|
|
733
|
+
/* @__PURE__ */ jsx10("div", { className: getClassNameModal("footerContainer"), children: /* @__PURE__ */ jsx10(Footer, { items: mappedData }) })
|
|
684
734
|
]
|
|
685
735
|
}
|
|
686
736
|
) })
|
|
@@ -690,7 +740,7 @@ var ExternalInput = ({
|
|
|
690
740
|
};
|
|
691
741
|
|
|
692
742
|
// components/AutoField/fields/ExternalField/index.tsx
|
|
693
|
-
import { jsx as
|
|
743
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
694
744
|
var ExternalField = ({
|
|
695
745
|
field,
|
|
696
746
|
onChange,
|
|
@@ -704,7 +754,7 @@ var ExternalField = ({
|
|
|
704
754
|
const value = useDeepField(name);
|
|
705
755
|
const validField = field;
|
|
706
756
|
const deprecatedField = field;
|
|
707
|
-
|
|
757
|
+
useEffect5(() => {
|
|
708
758
|
if (deprecatedField.adaptor) {
|
|
709
759
|
console.error(
|
|
710
760
|
"Warning: The `adaptor` API is deprecated. Please use updated APIs on the `external` field instead. This will be a breaking change in a future release."
|
|
@@ -714,13 +764,13 @@ var ExternalField = ({
|
|
|
714
764
|
if (field.type !== "external") {
|
|
715
765
|
return null;
|
|
716
766
|
}
|
|
717
|
-
return /* @__PURE__ */
|
|
767
|
+
return /* @__PURE__ */ jsx11(
|
|
718
768
|
Label,
|
|
719
769
|
{
|
|
720
770
|
label: label || name,
|
|
721
|
-
icon: labelIcon || /* @__PURE__ */
|
|
771
|
+
icon: labelIcon || /* @__PURE__ */ jsx11(Link, { size: 16 }),
|
|
722
772
|
el: "div",
|
|
723
|
-
children: /* @__PURE__ */
|
|
773
|
+
children: /* @__PURE__ */ jsx11(
|
|
724
774
|
ExternalInput,
|
|
725
775
|
{
|
|
726
776
|
name,
|
|
@@ -745,7 +795,7 @@ var ExternalField = ({
|
|
|
745
795
|
};
|
|
746
796
|
|
|
747
797
|
// components/AutoField/lib/use-local-value.ts
|
|
748
|
-
import { useCallback as
|
|
798
|
+
import { useCallback as useCallback3, useEffect as useEffect6, useState as useState6 } from "react";
|
|
749
799
|
|
|
750
800
|
// components/AutoField/lib/use-is-focused.ts
|
|
751
801
|
var useIsFocused = (path) => {
|
|
@@ -757,14 +807,14 @@ var useLocalValue = (path, onChange) => {
|
|
|
757
807
|
const value = useDeepField(path);
|
|
758
808
|
const isFocused = useIsFocused(path);
|
|
759
809
|
const [localValue, setLocalValue] = useState6(value?.toString());
|
|
760
|
-
const onChangeLocal =
|
|
810
|
+
const onChangeLocal = useCallback3(
|
|
761
811
|
(val) => {
|
|
762
812
|
setLocalValue(val);
|
|
763
813
|
onChange(val);
|
|
764
814
|
},
|
|
765
815
|
[onChange]
|
|
766
816
|
);
|
|
767
|
-
|
|
817
|
+
useEffect6(() => {
|
|
768
818
|
if (!isFocused) {
|
|
769
819
|
setLocalValue(value);
|
|
770
820
|
}
|
|
@@ -773,8 +823,8 @@ var useLocalValue = (path, onChange) => {
|
|
|
773
823
|
};
|
|
774
824
|
|
|
775
825
|
// components/AutoField/fields/DefaultField/index.tsx
|
|
776
|
-
import { Fragment as Fragment3, jsx as
|
|
777
|
-
var
|
|
826
|
+
import { Fragment as Fragment3, jsx as jsx12, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
827
|
+
var getClassName9 = get_class_name_factory_default("Input", styles_module_default);
|
|
778
828
|
var DefaultField = ({
|
|
779
829
|
field,
|
|
780
830
|
onChange,
|
|
@@ -786,19 +836,19 @@ var DefaultField = ({
|
|
|
786
836
|
Label
|
|
787
837
|
}) => {
|
|
788
838
|
const [localValue, onChangeLocal] = useLocalValue(name, onChange);
|
|
789
|
-
return /* @__PURE__ */
|
|
839
|
+
return /* @__PURE__ */ jsx12(
|
|
790
840
|
Label,
|
|
791
841
|
{
|
|
792
842
|
label: label || name,
|
|
793
843
|
icon: labelIcon || /* @__PURE__ */ jsxs5(Fragment3, { children: [
|
|
794
|
-
field.type === "text" && /* @__PURE__ */
|
|
795
|
-
field.type === "number" && /* @__PURE__ */
|
|
844
|
+
field.type === "text" && /* @__PURE__ */ jsx12(Type, { size: 16 }),
|
|
845
|
+
field.type === "number" && /* @__PURE__ */ jsx12(Hash, { size: 16 })
|
|
796
846
|
] }),
|
|
797
847
|
readOnly,
|
|
798
|
-
children: /* @__PURE__ */
|
|
848
|
+
children: /* @__PURE__ */ jsx12(
|
|
799
849
|
"input",
|
|
800
850
|
{
|
|
801
|
-
className:
|
|
851
|
+
className: getClassName9("input"),
|
|
802
852
|
autoComplete: "off",
|
|
803
853
|
type: field.type,
|
|
804
854
|
title: label || name,
|
|
@@ -832,8 +882,8 @@ var DefaultField = ({
|
|
|
832
882
|
};
|
|
833
883
|
|
|
834
884
|
// components/AutoField/fields/TextareaField/index.tsx
|
|
835
|
-
import { jsx as
|
|
836
|
-
var
|
|
885
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
886
|
+
var getClassName10 = get_class_name_factory_default("Input", styles_module_default);
|
|
837
887
|
var TextareaField = ({
|
|
838
888
|
field,
|
|
839
889
|
onChange,
|
|
@@ -845,17 +895,17 @@ var TextareaField = ({
|
|
|
845
895
|
Label
|
|
846
896
|
}) => {
|
|
847
897
|
const [localValue, onChangeLocal] = useLocalValue(name, onChange);
|
|
848
|
-
return /* @__PURE__ */
|
|
898
|
+
return /* @__PURE__ */ jsx13(
|
|
849
899
|
Label,
|
|
850
900
|
{
|
|
851
901
|
label: label || name,
|
|
852
|
-
icon: labelIcon || /* @__PURE__ */
|
|
902
|
+
icon: labelIcon || /* @__PURE__ */ jsx13(Type, { size: 16 }),
|
|
853
903
|
readOnly,
|
|
854
|
-
children: /* @__PURE__ */
|
|
904
|
+
children: /* @__PURE__ */ jsx13(
|
|
855
905
|
"textarea",
|
|
856
906
|
{
|
|
857
907
|
id,
|
|
858
|
-
className:
|
|
908
|
+
className: getClassName10("input"),
|
|
859
909
|
autoComplete: "off",
|
|
860
910
|
name,
|
|
861
911
|
value: typeof localValue === "undefined" ? "" : localValue,
|
|
@@ -875,14 +925,14 @@ import { lazy, Suspense } from "react";
|
|
|
875
925
|
|
|
876
926
|
// components/RichTextEditor/components/EditorFallback.tsx
|
|
877
927
|
import { memo } from "react";
|
|
878
|
-
import { jsx as
|
|
928
|
+
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
879
929
|
var EditorFallback = memo((props) => {
|
|
880
|
-
return /* @__PURE__ */
|
|
930
|
+
return /* @__PURE__ */ jsx14(
|
|
881
931
|
EditorInner,
|
|
882
932
|
{
|
|
883
933
|
...props,
|
|
884
934
|
editor: null,
|
|
885
|
-
menu: /* @__PURE__ */
|
|
935
|
+
menu: /* @__PURE__ */ jsx14(
|
|
886
936
|
LoadedRichTextMenuInner,
|
|
887
937
|
{
|
|
888
938
|
field: props.field,
|
|
@@ -891,7 +941,7 @@ var EditorFallback = memo((props) => {
|
|
|
891
941
|
readOnly: props.readOnly ?? false
|
|
892
942
|
}
|
|
893
943
|
),
|
|
894
|
-
children: /* @__PURE__ */
|
|
944
|
+
children: /* @__PURE__ */ jsx14(
|
|
895
945
|
"div",
|
|
896
946
|
{
|
|
897
947
|
className: "rich-text",
|
|
@@ -905,9 +955,9 @@ var EditorFallback = memo((props) => {
|
|
|
905
955
|
EditorFallback.displayName = "EditorFallback";
|
|
906
956
|
|
|
907
957
|
// components/AutoField/fields/RichtextField/index.tsx
|
|
908
|
-
import { Fragment as Fragment4, jsx as
|
|
958
|
+
import { Fragment as Fragment4, jsx as jsx15 } from "react/jsx-runtime";
|
|
909
959
|
var Editor = lazy(
|
|
910
|
-
() => import("./Editor-
|
|
960
|
+
() => import("./Editor-3EPLDK4J.mjs").then((m) => ({
|
|
911
961
|
default: m.Editor
|
|
912
962
|
}))
|
|
913
963
|
);
|
|
@@ -930,23 +980,23 @@ var RichtextField = ({
|
|
|
930
980
|
id,
|
|
931
981
|
name
|
|
932
982
|
};
|
|
933
|
-
return /* @__PURE__ */
|
|
983
|
+
return /* @__PURE__ */ jsx15(Fragment4, { children: /* @__PURE__ */ jsx15(
|
|
934
984
|
Label,
|
|
935
985
|
{
|
|
936
986
|
label: label || name,
|
|
937
|
-
icon: labelIcon || /* @__PURE__ */
|
|
987
|
+
icon: labelIcon || /* @__PURE__ */ jsx15(Type, { size: 16 }),
|
|
938
988
|
readOnly,
|
|
939
989
|
el: "div",
|
|
940
|
-
children: /* @__PURE__ */
|
|
990
|
+
children: /* @__PURE__ */ jsx15(Suspense, { fallback: /* @__PURE__ */ jsx15(EditorFallback, { ...editorProps }), children: /* @__PURE__ */ jsx15(Editor, { ...editorProps }) })
|
|
941
991
|
}
|
|
942
992
|
) });
|
|
943
993
|
};
|
|
944
994
|
|
|
945
995
|
// components/AutoField/AutoFieldInternal.tsx
|
|
946
|
-
import { jsx as
|
|
947
|
-
var ArrayField = lazy2(() => import("./ArrayField-
|
|
948
|
-
var ObjectField = lazy2(() => import("./ObjectField-
|
|
949
|
-
var
|
|
996
|
+
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
997
|
+
var ArrayField = lazy2(() => import("./ArrayField-2QLVE7PT.mjs").then((m) => ({ default: m.ArrayField })));
|
|
998
|
+
var ObjectField = lazy2(() => import("./ObjectField-XXOU2VP4.mjs").then((m) => ({ default: m.ObjectField })));
|
|
999
|
+
var getClassNameWrapper2 = get_class_name_factory_default("InputWrapper", styles_module_default);
|
|
950
1000
|
var defaultFields = {
|
|
951
1001
|
array: ArrayField,
|
|
952
1002
|
external: ExternalField,
|
|
@@ -962,14 +1012,14 @@ function AutoFieldInternal(props) {
|
|
|
962
1012
|
const dispatch = useAppStore((s) => s.dispatch);
|
|
963
1013
|
const overrides = useAppStore((s) => s.overrides);
|
|
964
1014
|
const readOnly = useAppStore(useShallow3((s) => s.selectedItem?.readOnly));
|
|
965
|
-
const nestedFieldContext =
|
|
1015
|
+
const nestedFieldContext = useContext5(NestedFieldContext);
|
|
966
1016
|
const { id, Label = FieldLabelInternal } = props;
|
|
967
1017
|
const field = props.field;
|
|
968
1018
|
const label = field.label;
|
|
969
1019
|
const labelIcon = field.labelIcon;
|
|
970
1020
|
const defaultId = useSafeId();
|
|
971
1021
|
const resolvedId = id || defaultId;
|
|
972
|
-
const render =
|
|
1022
|
+
const render = useMemo5(
|
|
973
1023
|
() => ({
|
|
974
1024
|
...overrides.fieldTypes,
|
|
975
1025
|
custom: overrides.fieldTypes?.custom,
|
|
@@ -990,7 +1040,7 @@ function AutoFieldInternal(props) {
|
|
|
990
1040
|
return getDeep(s, props.name ?? resolvedId);
|
|
991
1041
|
}
|
|
992
1042
|
});
|
|
993
|
-
const mergedProps =
|
|
1043
|
+
const mergedProps = useMemo5(
|
|
994
1044
|
() => ({
|
|
995
1045
|
...props,
|
|
996
1046
|
field,
|
|
@@ -1002,7 +1052,7 @@ function AutoFieldInternal(props) {
|
|
|
1002
1052
|
}),
|
|
1003
1053
|
[props, field, label, labelIcon, Label, resolvedId, fieldValue]
|
|
1004
1054
|
);
|
|
1005
|
-
const onFocus =
|
|
1055
|
+
const onFocus = useCallback4(
|
|
1006
1056
|
(e) => {
|
|
1007
1057
|
if (mergedProps.name && (e.target.nodeName === "INPUT" || e.target.nodeName === "TEXTAREA")) {
|
|
1008
1058
|
e.stopPropagation();
|
|
@@ -1016,7 +1066,7 @@ function AutoFieldInternal(props) {
|
|
|
1016
1066
|
},
|
|
1017
1067
|
[dispatch, mergedProps.name]
|
|
1018
1068
|
);
|
|
1019
|
-
const onBlur =
|
|
1069
|
+
const onBlur = useCallback4((e) => {
|
|
1020
1070
|
if ("name" in e.target) {
|
|
1021
1071
|
dispatch({
|
|
1022
1072
|
type: "setUi",
|
|
@@ -1026,7 +1076,7 @@ function AutoFieldInternal(props) {
|
|
|
1026
1076
|
});
|
|
1027
1077
|
}
|
|
1028
1078
|
}, [dispatch]);
|
|
1029
|
-
let Children =
|
|
1079
|
+
let Children = useMemo5(() => {
|
|
1030
1080
|
if (field.type !== "custom" && field.type !== "slot") {
|
|
1031
1081
|
return defaultFields[field.type];
|
|
1032
1082
|
}
|
|
@@ -1034,7 +1084,7 @@ function AutoFieldInternal(props) {
|
|
|
1034
1084
|
}, [field.type]);
|
|
1035
1085
|
const fieldKey = field.type === "custom" ? field.key : void 0;
|
|
1036
1086
|
const fieldRender = field.render;
|
|
1037
|
-
let FieldComponent =
|
|
1087
|
+
let FieldComponent = useMemo5(() => {
|
|
1038
1088
|
if (field.type === "custom" && !render[field.type]) {
|
|
1039
1089
|
if (!fieldRender) {
|
|
1040
1090
|
return null;
|
|
@@ -1054,78 +1104,81 @@ function AutoFieldInternal(props) {
|
|
|
1054
1104
|
if (!FieldComponent) {
|
|
1055
1105
|
throw new Error(`Field type for ${field.type} did not exist.`);
|
|
1056
1106
|
}
|
|
1057
|
-
return /* @__PURE__ */
|
|
1107
|
+
return /* @__PURE__ */ jsx16(
|
|
1058
1108
|
NestedFieldContext.Provider,
|
|
1059
1109
|
{
|
|
1060
1110
|
value: {
|
|
1061
1111
|
readOnlyFields: nestedFieldContext.readOnlyFields || readOnly || {},
|
|
1062
1112
|
localName: nestedFieldContext.localName ?? mergedProps.name
|
|
1063
1113
|
},
|
|
1064
|
-
children: /* @__PURE__ */
|
|
1114
|
+
children: /* @__PURE__ */ jsx16(
|
|
1065
1115
|
"div",
|
|
1066
1116
|
{
|
|
1067
|
-
className:
|
|
1117
|
+
className: getClassNameWrapper2(),
|
|
1068
1118
|
onFocus,
|
|
1069
1119
|
onBlur,
|
|
1070
1120
|
onClick: (e) => {
|
|
1071
1121
|
e.stopPropagation();
|
|
1072
1122
|
},
|
|
1073
|
-
children: /* @__PURE__ */
|
|
1123
|
+
children: /* @__PURE__ */ jsx16(Suspense2, { fallback: null, children: /* @__PURE__ */ jsx16(FieldComponent, { ...mergedProps, children: /* @__PURE__ */ jsx16(Children, { ...mergedProps }) }) })
|
|
1074
1124
|
}
|
|
1075
1125
|
)
|
|
1076
1126
|
}
|
|
1077
1127
|
);
|
|
1078
1128
|
}
|
|
1079
|
-
function
|
|
1080
|
-
return /* @__PURE__ */
|
|
1129
|
+
function AutoFieldPrivate(props) {
|
|
1130
|
+
return /* @__PURE__ */ jsx16(AutoFieldInternal, { ...props });
|
|
1081
1131
|
}
|
|
1082
1132
|
|
|
1083
|
-
// components/AutoField/
|
|
1084
|
-
import { jsx as
|
|
1085
|
-
var
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
}
|
|
1098
|
-
const
|
|
1099
|
-
const
|
|
1100
|
-
const
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
[fieldStore, propsOnChange, propsId]
|
|
1107
|
-
);
|
|
1108
|
-
useEffect6(() => {
|
|
1109
|
-
if (!props.id) return;
|
|
1110
|
-
fieldStore.setState({ [props.id]: value });
|
|
1111
|
-
}, [props.id, value, fieldStore]);
|
|
1112
|
-
return /* @__PURE__ */ jsx16(
|
|
1113
|
-
AutoFieldInternal,
|
|
1133
|
+
// components/AutoField/subfield.tsx
|
|
1134
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
1135
|
+
var SubFieldInternal = ({
|
|
1136
|
+
field,
|
|
1137
|
+
id,
|
|
1138
|
+
index,
|
|
1139
|
+
name,
|
|
1140
|
+
subName,
|
|
1141
|
+
localName,
|
|
1142
|
+
onChange,
|
|
1143
|
+
forceReadOnly
|
|
1144
|
+
}) => {
|
|
1145
|
+
const indexName = typeof index !== "undefined" ? `${name}[${index}]` : name;
|
|
1146
|
+
const subPath = name ? `${indexName}.${subName}` : subName;
|
|
1147
|
+
const localIndexName = typeof index !== "undefined" ? `${localName}[${index}]` : localName ?? subName;
|
|
1148
|
+
const localWildcardName = typeof index !== "undefined" ? `${localName}[*]` : localName;
|
|
1149
|
+
const localSubPath = `${localIndexName}.${subName}`;
|
|
1150
|
+
const localWildcardSubPath = `${localWildcardName}.${subName}`;
|
|
1151
|
+
const { readOnlyFields } = useNestedFieldContext();
|
|
1152
|
+
const subReadOnly = forceReadOnly ? forceReadOnly : typeof readOnlyFields[subPath] !== "undefined" ? readOnlyFields[localSubPath] : readOnlyFields[localWildcardSubPath];
|
|
1153
|
+
const label = field.label || subName;
|
|
1154
|
+
return /* @__PURE__ */ jsx17(
|
|
1155
|
+
NestedFieldProvider,
|
|
1114
1156
|
{
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1157
|
+
name: localIndexName,
|
|
1158
|
+
wildcardName: localWildcardName,
|
|
1159
|
+
subName,
|
|
1160
|
+
readOnlyFields,
|
|
1161
|
+
children: /* @__PURE__ */ jsx17(
|
|
1162
|
+
AutoFieldPrivate,
|
|
1163
|
+
{
|
|
1164
|
+
name: subPath,
|
|
1165
|
+
label,
|
|
1166
|
+
id,
|
|
1167
|
+
readOnly: subReadOnly,
|
|
1168
|
+
field: {
|
|
1169
|
+
...field,
|
|
1170
|
+
label
|
|
1171
|
+
// May be used by custom fields
|
|
1172
|
+
},
|
|
1173
|
+
onChange: (val, ui) => {
|
|
1174
|
+
onChange(val, ui, subName);
|
|
1175
|
+
}
|
|
1176
|
+
}
|
|
1177
|
+
)
|
|
1118
1178
|
}
|
|
1119
1179
|
);
|
|
1120
|
-
}
|
|
1121
|
-
|
|
1122
|
-
const id = useSafeId();
|
|
1123
|
-
if (props.field.type === "slot") {
|
|
1124
|
-
return null;
|
|
1125
|
-
}
|
|
1126
|
-
const providerValue = useMemo5(() => ({ [id]: props.value }), [id, props.value]);
|
|
1127
|
-
return /* @__PURE__ */ jsx16(fieldContextStore.Provider, { value: providerValue, children: /* @__PURE__ */ jsx16(AutoFieldPublicInternal, { ...props, id }) });
|
|
1128
|
-
}
|
|
1180
|
+
};
|
|
1181
|
+
var SubField = memo2(SubFieldInternal);
|
|
1129
1182
|
|
|
1130
1183
|
export {
|
|
1131
1184
|
useSafeId,
|
|
@@ -1136,10 +1189,10 @@ export {
|
|
|
1136
1189
|
FieldLabel,
|
|
1137
1190
|
getDeep,
|
|
1138
1191
|
useNestedFieldContext,
|
|
1139
|
-
NestedFieldProvider,
|
|
1140
1192
|
Heading,
|
|
1141
1193
|
Button,
|
|
1142
1194
|
EditorFallback,
|
|
1143
|
-
|
|
1195
|
+
SubField,
|
|
1196
|
+
AutoFieldPrivate,
|
|
1144
1197
|
AutoField
|
|
1145
1198
|
};
|