@firecms/core 3.0.0-rc.3 → 3.0.0-rc.4
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/form/PropertyFieldBinding.d.ts +1 -1
- package/dist/index.es.js +20 -21
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +20 -21
- package/dist/index.umd.js.map +1 -1
- package/dist/types/fields.d.ts +8 -0
- package/package.json +5 -5
- package/src/components/SelectableTable/SelectableTable.tsx +0 -12
- package/src/form/EntityForm.tsx +1 -1
- package/src/form/PropertyFieldBinding.tsx +4 -4
- package/src/form/field_bindings/BlockFieldBinding.tsx +1 -0
- package/src/types/fields.tsx +10 -0
|
@@ -26,5 +26,5 @@ import { CMSType, PropertyFieldBindingProps } from "../types";
|
|
|
26
26
|
* @group Form custom fields
|
|
27
27
|
*/
|
|
28
28
|
export declare const PropertyFieldBinding: typeof PropertyFieldBindingInternal;
|
|
29
|
-
declare function PropertyFieldBindingInternal<T extends CMSType = CMSType, M extends Record<string, any> = any>({ propertyKey, property, context, includeDescription, underlyingValueHasChanged, disabled: disabledProp, partOfArray, minimalistView, autoFocus, index, size, onPropertyChange, }: PropertyFieldBindingProps<T, M>): ReactElement<PropertyFieldBindingProps<T, M>>;
|
|
29
|
+
declare function PropertyFieldBindingInternal<T extends CMSType = CMSType, M extends Record<string, any> = any>({ propertyKey, property, context, includeDescription, underlyingValueHasChanged, disabled: disabledProp, partOfArray, partOfBlock, minimalistView, autoFocus, index, size, onPropertyChange, }: PropertyFieldBindingProps<T, M>): ReactElement<PropertyFieldBindingProps<T, M>>;
|
|
30
30
|
export {};
|
package/dist/index.es.js
CHANGED
|
@@ -16471,7 +16471,7 @@ function EntityForm({
|
|
|
16471
16471
|
/* @__PURE__ */ jsx("div", { id: `form_${path}`, className: cls("relative flex flex-row max-w-4xl lg:max-w-3xl xl:max-w-4xl 2xl:max-w-6xl w-full h-fit"), children: /* @__PURE__ */ jsxs("div", { className: cls("flex flex-col w-full pt-12 pb-16 px-4 sm:px-8 md:px-10"), children: [
|
|
16472
16472
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-row gap-4 self-end sticky top-4 z-10", children: [
|
|
16473
16473
|
manualApplyLocalChanges && hasLocalChanges && /* @__PURE__ */ jsx(LocalChangesMenu, { cacheKey: status === "new" || status === "copy" ? path + "#new" : path + "/" + entityId, properties: resolvedCollection.properties, localChangesData, formex, onClearLocalChanges: () => setLocalChangesCleared(true) }),
|
|
16474
|
-
formex.dirty ? /* @__PURE__ */ jsx(Tooltip, { title: "
|
|
16474
|
+
formex.dirty ? /* @__PURE__ */ jsx(Tooltip, { title: "This form has been modified", children: /* @__PURE__ */ jsx(Chip, { size: "small", className: "py-1", colorScheme: "orangeDarker", children: /* @__PURE__ */ jsx(EditIcon, { size: "smallest" }) }) }) : /* @__PURE__ */ jsx(Tooltip, { title: "The current form is in sync with the database", children: /* @__PURE__ */ jsx(Chip, { size: "small", className: "py-1", children: /* @__PURE__ */ jsx(CheckIcon, { size: "smallest" }) }) })
|
|
16475
16475
|
] }),
|
|
16476
16476
|
formView
|
|
16477
16477
|
] }) }),
|
|
@@ -18636,7 +18636,7 @@ const PropertyFieldBinding = React__default.memo(PropertyFieldBindingInternal, (
|
|
|
18636
18636
|
return false;
|
|
18637
18637
|
});
|
|
18638
18638
|
function PropertyFieldBindingInternal(t0) {
|
|
18639
|
-
const $ = c(
|
|
18639
|
+
const $ = c(19);
|
|
18640
18640
|
const {
|
|
18641
18641
|
propertyKey,
|
|
18642
18642
|
property,
|
|
@@ -18645,6 +18645,7 @@ function PropertyFieldBindingInternal(t0) {
|
|
|
18645
18645
|
underlyingValueHasChanged,
|
|
18646
18646
|
disabled: disabledProp,
|
|
18647
18647
|
partOfArray,
|
|
18648
|
+
partOfBlock,
|
|
18648
18649
|
minimalistView,
|
|
18649
18650
|
autoFocus,
|
|
18650
18651
|
index,
|
|
@@ -18653,15 +18654,8 @@ function PropertyFieldBindingInternal(t0) {
|
|
|
18653
18654
|
} = t0;
|
|
18654
18655
|
const authController = useAuthController();
|
|
18655
18656
|
const customizationController = useCustomizationController();
|
|
18656
|
-
if (propertyKey === "created_by") {
|
|
18657
|
-
console.log("Rendering field for created_by", {
|
|
18658
|
-
propertyKey,
|
|
18659
|
-
property,
|
|
18660
|
-
context
|
|
18661
|
-
});
|
|
18662
|
-
}
|
|
18663
18657
|
let t1;
|
|
18664
|
-
if ($[0] !== authController || $[1] !== autoFocus || $[2] !== context || $[3] !== customizationController.propertyConfigs || $[4] !== disabledProp || $[5] !== includeDescription || $[6] !== index || $[7] !== minimalistView || $[8] !== onPropertyChange || $[9] !== partOfArray || $[10] !==
|
|
18658
|
+
if ($[0] !== authController || $[1] !== autoFocus || $[2] !== context || $[3] !== customizationController.propertyConfigs || $[4] !== disabledProp || $[5] !== includeDescription || $[6] !== index || $[7] !== minimalistView || $[8] !== onPropertyChange || $[9] !== partOfArray || $[10] !== partOfBlock || $[11] !== property || $[12] !== propertyKey || $[13] !== size || $[14] !== underlyingValueHasChanged) {
|
|
18665
18659
|
t1 = (fieldProps) => {
|
|
18666
18660
|
let Component;
|
|
18667
18661
|
const resolvedProperty = resolveProperty({
|
|
@@ -18724,6 +18718,7 @@ function PropertyFieldBindingInternal(t0) {
|
|
|
18724
18718
|
context,
|
|
18725
18719
|
disabled,
|
|
18726
18720
|
partOfArray,
|
|
18721
|
+
partOfBlock,
|
|
18727
18722
|
minimalistView,
|
|
18728
18723
|
autoFocus,
|
|
18729
18724
|
size,
|
|
@@ -18741,22 +18736,23 @@ function PropertyFieldBindingInternal(t0) {
|
|
|
18741
18736
|
$[7] = minimalistView;
|
|
18742
18737
|
$[8] = onPropertyChange;
|
|
18743
18738
|
$[9] = partOfArray;
|
|
18744
|
-
$[10] =
|
|
18745
|
-
$[11] =
|
|
18746
|
-
$[12] =
|
|
18747
|
-
$[13] =
|
|
18748
|
-
$[14] =
|
|
18739
|
+
$[10] = partOfBlock;
|
|
18740
|
+
$[11] = property;
|
|
18741
|
+
$[12] = propertyKey;
|
|
18742
|
+
$[13] = size;
|
|
18743
|
+
$[14] = underlyingValueHasChanged;
|
|
18744
|
+
$[15] = t1;
|
|
18749
18745
|
} else {
|
|
18750
|
-
t1 = $[
|
|
18746
|
+
t1 = $[15];
|
|
18751
18747
|
}
|
|
18752
18748
|
let t2;
|
|
18753
|
-
if ($[
|
|
18749
|
+
if ($[16] !== propertyKey || $[17] !== t1) {
|
|
18754
18750
|
t2 = /* @__PURE__ */ jsx(Field, { name: propertyKey, children: t1 }, propertyKey);
|
|
18755
|
-
$[
|
|
18756
|
-
$[
|
|
18757
|
-
$[
|
|
18751
|
+
$[16] = propertyKey;
|
|
18752
|
+
$[17] = t1;
|
|
18753
|
+
$[18] = t2;
|
|
18758
18754
|
} else {
|
|
18759
|
-
t2 = $[
|
|
18755
|
+
t2 = $[18];
|
|
18760
18756
|
}
|
|
18761
18757
|
return t2;
|
|
18762
18758
|
}
|
|
@@ -18768,6 +18764,7 @@ function FieldInternal({
|
|
|
18768
18764
|
includeDescription,
|
|
18769
18765
|
underlyingValueHasChanged,
|
|
18770
18766
|
partOfArray,
|
|
18767
|
+
partOfBlock,
|
|
18771
18768
|
minimalistView,
|
|
18772
18769
|
autoFocus,
|
|
18773
18770
|
context,
|
|
@@ -18817,6 +18814,7 @@ function FieldInternal({
|
|
|
18817
18814
|
disabled: disabled ?? false,
|
|
18818
18815
|
underlyingValueHasChanged: underlyingValueHasChanged ?? false,
|
|
18819
18816
|
partOfArray: partOfArray ?? false,
|
|
18817
|
+
partOfBlock: partOfBlock ?? false,
|
|
18820
18818
|
minimalistView: minimalistView ?? false,
|
|
18821
18819
|
autoFocus: autoFocus ?? false,
|
|
18822
18820
|
customProps: customFieldProps,
|
|
@@ -20128,6 +20126,7 @@ function BlockEntry(t0) {
|
|
|
20128
20126
|
context,
|
|
20129
20127
|
autoFocus,
|
|
20130
20128
|
partOfArray: false,
|
|
20129
|
+
partOfBlock: true,
|
|
20131
20130
|
minimalistView: true,
|
|
20132
20131
|
onPropertyChange: storeProps
|
|
20133
20132
|
} : void 0;
|