@prorobotech/openapi-k8s-toolkit 0.0.1-alpha.156 → 0.0.1-alpha.157
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.
|
@@ -48674,6 +48674,18 @@ const BlackholeForm = ({
|
|
|
48674
48674
|
}
|
|
48675
48675
|
}
|
|
48676
48676
|
}
|
|
48677
|
+
const getArrayItemType = (schemaProps, path) => {
|
|
48678
|
+
let node = { type: "object", properties: schemaProps };
|
|
48679
|
+
for (const seg of path) {
|
|
48680
|
+
if (typeof seg === "string") {
|
|
48681
|
+
node = node?.properties?.[seg];
|
|
48682
|
+
} else {
|
|
48683
|
+
node = node?.items;
|
|
48684
|
+
}
|
|
48685
|
+
if (!node) break;
|
|
48686
|
+
}
|
|
48687
|
+
return node?.type === "array" ? node.items?.type : node?.items?.type ?? node?.type;
|
|
48688
|
+
};
|
|
48677
48689
|
for (const [k, newLen] of newLengths.entries()) {
|
|
48678
48690
|
const prevLen = prevLengths.get(k) ?? 0;
|
|
48679
48691
|
if (newLen > prevLen) {
|
|
@@ -48682,7 +48694,12 @@ const BlackholeForm = ({
|
|
|
48682
48694
|
const itemPath = [...arrayPath, i];
|
|
48683
48695
|
const itemVal = form.getFieldValue(itemPath);
|
|
48684
48696
|
if (typeof itemVal === "undefined") {
|
|
48685
|
-
|
|
48697
|
+
const itemType = getArrayItemType(properties, arrayPath);
|
|
48698
|
+
if (itemType === "object") form.setFieldValue(itemPath, {});
|
|
48699
|
+
else if (itemType === "array") form.setFieldValue(itemPath, []);
|
|
48700
|
+
else if (itemType === "number" || itemType === "integer") form.setFieldValue(itemPath, 0);
|
|
48701
|
+
else if (itemType === "boolean") form.setFieldValue(itemPath, false);
|
|
48702
|
+
else form.setFieldValue(itemPath, "");
|
|
48686
48703
|
}
|
|
48687
48704
|
blockedPathsRef.current.delete(JSON.stringify(itemPath));
|
|
48688
48705
|
applyPrefillForNewArrayItem(arrayPath, i);
|
|
@@ -48971,6 +48988,7 @@ const BlackholeForm = ({
|
|
|
48971
48988
|
console.log(value);
|
|
48972
48989
|
setPersistedKeys([...persistedKeys.filter((arr) => JSON.stringify(arr) !== JSON.stringify(value))]);
|
|
48973
48990
|
};
|
|
48991
|
+
console.log("allValues", allValues);
|
|
48974
48992
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
48975
48993
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(Styled$f.Container, { $designNewLayout: designNewLayout, $designNewLayoutHeight: designNewLayoutHeight, children: [
|
|
48976
48994
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$f.OverflowContainer, { ref: overflowRef, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
|