@firecms/core 3.0.0-canary.94 → 3.0.0-canary.95

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.umd.js CHANGED
@@ -14860,6 +14860,9 @@
14860
14860
  if (a.propertyKey !== b.propertyKey) {
14861
14861
  return false;
14862
14862
  }
14863
+ if (a.index !== b.index) {
14864
+ return false;
14865
+ }
14863
14866
  const aIsBuilder = isPropertyBuilder(a.property) || a.property.fromBuilder;
14864
14867
  const bIsBuilder = isPropertyBuilder(b.property) || b.property.fromBuilder;
14865
14868
  const baseCheck = (aIsBuilder === bIsBuilder || equal(a.property, b.property)) && a.disabled === b.disabled;
@@ -14881,7 +14884,8 @@
14881
14884
  tableMode,
14882
14885
  partOfArray,
14883
14886
  partOfBlock,
14884
- autoFocus
14887
+ autoFocus,
14888
+ index
14885
14889
  }) {
14886
14890
  const customizationController = useCustomizationController();
14887
14891
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -14896,7 +14900,8 @@
14896
14900
  values: fieldProps.form.values,
14897
14901
  path: context.path,
14898
14902
  entityId: context.entityId,
14899
- fields: customizationController.propertyConfigs
14903
+ fields: customizationController.propertyConfigs,
14904
+ index
14900
14905
  });
14901
14906
  if (resolvedProperty === null || isHidden(resolvedProperty)) {
14902
14907
  return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {});
@@ -14918,11 +14923,13 @@
14918
14923
  throw new Error(`INTERNAL: Could not find field config for property ${propertyKey}`);
14919
14924
  }
14920
14925
  const configProperty = resolveProperty({
14926
+ propertyKey,
14921
14927
  propertyOrBuilder: propertyConfig.property,
14922
14928
  values: fieldProps.form.values,
14923
14929
  path: context.path,
14924
14930
  entityId: context.entityId,
14925
- fields: customizationController.propertyConfigs
14931
+ fields: customizationController.propertyConfigs,
14932
+ index
14926
14933
  });
14927
14934
  Component = configProperty.Field;
14928
14935
  }
@@ -15824,7 +15831,7 @@
15824
15831
  partOfBlock: false,
15825
15832
  autoFocus: internalId === lastAddedId
15826
15833
  };
15827
- return /* @__PURE__ */ jsxRuntime.jsx(ErrorBoundary, { children: /* @__PURE__ */ jsxRuntime.jsx(PropertyFieldBinding, { ...fieldProps }) });
15834
+ return /* @__PURE__ */ jsxRuntime.jsx(ErrorBoundary, { children: /* @__PURE__ */ jsxRuntime.jsx(PropertyFieldBinding, { ...fieldProps, index }) });
15828
15835
  };
15829
15836
  const arrayContainer = /* @__PURE__ */ jsxRuntime.jsx(
15830
15837
  FormikArrayContainer,
@@ -17336,15 +17343,16 @@
17336
17343
  };
17337
17344
  } else {
17338
17345
  const of = property.of;
17339
- const resolvedProperties = Array.isArray(propertyValue) ? propertyValue.map((v, index) => resolveProperty({
17340
- propertyKey: `${propertyKey}.${index}`,
17341
- propertyOrBuilder: of,
17342
- ignoreMissingFields,
17343
- ...props,
17344
- index
17345
- })).filter((e) => Boolean(e)) : [];
17346
+ const resolvedProperties = Array.isArray(propertyValue) ? propertyValue.map((v, index) => {
17347
+ return resolveProperty({
17348
+ propertyKey: `${propertyKey}.${index}`,
17349
+ propertyOrBuilder: of,
17350
+ ignoreMissingFields,
17351
+ ...props,
17352
+ index
17353
+ });
17354
+ }).filter((e) => Boolean(e)) : [];
17346
17355
  const ofProperty = resolveProperty({
17347
- propertyKey: `${propertyKey}`,
17348
17356
  propertyOrBuilder: of,
17349
17357
  ignoreMissingFields,
17350
17358
  ...props
@@ -17373,6 +17381,7 @@
17373
17381
  });
17374
17382
  }).filter((e) => Boolean(e)) : [];
17375
17383
  const properties = resolveProperties({
17384
+ propertyKey,
17376
17385
  properties: property.oneOf.properties,
17377
17386
  ignoreMissingFields,
17378
17387
  ...props
@@ -17398,13 +17407,14 @@
17398
17407
  }
17399
17408
  }
17400
17409
  function resolveProperties({
17410
+ propertyKey,
17401
17411
  properties,
17402
17412
  ignoreMissingFields,
17403
17413
  ...props
17404
17414
  }) {
17405
17415
  return Object.entries(properties).map(([key, property]) => {
17406
17416
  const childResolvedProperty = resolveProperty({
17407
- propertyKey: key,
17417
+ propertyKey: propertyKey ? `${propertyKey}.${key}` : void 0,
17408
17418
  propertyOrBuilder: property,
17409
17419
  ignoreMissingFields,
17410
17420
  ...props
@@ -18184,7 +18194,7 @@
18184
18194
  const formFields = /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: getFormFieldKeys(resolvedCollection).map((key) => {
18185
18195
  const property = resolvedCollection.properties[key];
18186
18196
  if (property) {
18187
- const underlyingValueHasChanged = !!underlyingChanges && Object.keys(underlyingChanges).includes(key) && !!formex$1.touched[key];
18197
+ const underlyingValueHasChanged = !!underlyingChanges && Object.keys(underlyingChanges).includes(key) && formex$1.touched[key];
18188
18198
  const disabled2 = !autoSave && formex$1.isSubmitting || isReadOnly(property) || Boolean(property.disabled);
18189
18199
  const hidden = isHidden(property);
18190
18200
  if (hidden) return null;