@prorobotech/openapi-k8s-toolkit 0.0.1-alpha.157 → 0.0.1-alpha.158
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/openapi-k8s-toolkit.es.js +100 -1
- package/dist/openapi-k8s-toolkit.es.js.map +1 -1
- package/dist/openapi-k8s-toolkit.umd.js +100 -1
- package/dist/openapi-k8s-toolkit.umd.js.map +1 -1
- package/dist/types/components/molecules/BlackholeForm/molecules/FormStringMultilineInput/FormStringMultilineInput.d.ts +19 -0
- package/dist/types/components/molecules/BlackholeForm/molecules/FormStringMultilineInput/index.d.ts +1 -0
- package/dist/types/components/molecules/BlackholeForm/molecules/index.d.ts +1 -0
- package/dist/types/components/molecules/BlackholeForm/organisms/BlackholeForm/utils.d.ts +15 -0
- package/package.json +1 -1
|
@@ -46783,6 +46783,48 @@ const FormNamespaceInput = ({
|
|
|
46783
46783
|
] });
|
|
46784
46784
|
};
|
|
46785
46785
|
|
|
46786
|
+
const FormStringInput = ({
|
|
46787
|
+
name,
|
|
46788
|
+
arrKey,
|
|
46789
|
+
arrName,
|
|
46790
|
+
persistName,
|
|
46791
|
+
required,
|
|
46792
|
+
forceNonRequired,
|
|
46793
|
+
description,
|
|
46794
|
+
isAdditionalProperties,
|
|
46795
|
+
removeField,
|
|
46796
|
+
persistedControls,
|
|
46797
|
+
onRemoveByMinus
|
|
46798
|
+
}) => {
|
|
46799
|
+
const designNewLayout = useDesignNewLayout();
|
|
46800
|
+
const fixedName = name === "nodeName" ? "nodeNameBecauseOfSuddenBug" : name;
|
|
46801
|
+
const title = /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
46802
|
+
getStringByName(name),
|
|
46803
|
+
required?.includes(getStringByName(name)) && /* @__PURE__ */ jsxRuntimeExports.jsx(Typography.Text, { type: "danger", children: "*" })
|
|
46804
|
+
] });
|
|
46805
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(HiddenContainer, { name, children: [
|
|
46806
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(Flex, { justify: "space-between", children: [
|
|
46807
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(CustomSizeTitle, { $designNewLayout: designNewLayout, children: description ? /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip, { title: description, children: title }) : title }),
|
|
46808
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(Flex, { gap: 4, children: [
|
|
46809
|
+
isAdditionalProperties && /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { size: "small", type: "text", onClick: () => removeField({ path: name }), children: /* @__PURE__ */ jsxRuntimeExports.jsx(MinusIcon, {}) }),
|
|
46810
|
+
onRemoveByMinus && /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { size: "small", type: "text", onClick: onRemoveByMinus, children: /* @__PURE__ */ jsxRuntimeExports.jsx(MinusIcon, {}) }),
|
|
46811
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(PersistedCheckbox, { formName: persistName || name, persistedControls, type: "str" })
|
|
46812
|
+
] })
|
|
46813
|
+
] }),
|
|
46814
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
46815
|
+
ResetedFormItem$1,
|
|
46816
|
+
{
|
|
46817
|
+
name: arrName || fixedName,
|
|
46818
|
+
rules: [{ required: forceNonRequired === false && required?.includes(getStringByName(name)) }],
|
|
46819
|
+
validateTrigger: "onBlur",
|
|
46820
|
+
hasFeedback: designNewLayout ? { icons: feedbackIcons } : true,
|
|
46821
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Input, { placeholder: getStringByName(name) })
|
|
46822
|
+
},
|
|
46823
|
+
arrKey !== void 0 ? arrKey : Array.isArray(name) ? name.slice(-1)[0] : name
|
|
46824
|
+
)
|
|
46825
|
+
] });
|
|
46826
|
+
};
|
|
46827
|
+
|
|
46786
46828
|
const isMultilineString = (value) => {
|
|
46787
46829
|
if (!value || typeof value !== "string") {
|
|
46788
46830
|
return false;
|
|
@@ -46818,7 +46860,7 @@ const isMultilineFromYaml = (yamlContent, fieldPath) => {
|
|
|
46818
46860
|
}
|
|
46819
46861
|
};
|
|
46820
46862
|
|
|
46821
|
-
const
|
|
46863
|
+
const FormStringMultilineInput = ({
|
|
46822
46864
|
name,
|
|
46823
46865
|
arrKey,
|
|
46824
46866
|
arrName,
|
|
@@ -47485,6 +47527,37 @@ const getRangeInputFormItemFromSwagger = ({
|
|
|
47485
47527
|
`${arrKey}-${JSON.stringify(name)}`
|
|
47486
47528
|
);
|
|
47487
47529
|
};
|
|
47530
|
+
const getStringMultilineFormItemFromSwagger = ({
|
|
47531
|
+
name,
|
|
47532
|
+
arrKey,
|
|
47533
|
+
arrName,
|
|
47534
|
+
persistName,
|
|
47535
|
+
required,
|
|
47536
|
+
forceNonRequired,
|
|
47537
|
+
description,
|
|
47538
|
+
isAdditionalProperties,
|
|
47539
|
+
removeField,
|
|
47540
|
+
persistedControls,
|
|
47541
|
+
onRemoveByMinus
|
|
47542
|
+
}) => {
|
|
47543
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
47544
|
+
FormStringMultilineInput,
|
|
47545
|
+
{
|
|
47546
|
+
name,
|
|
47547
|
+
arrKey,
|
|
47548
|
+
arrName,
|
|
47549
|
+
persistName,
|
|
47550
|
+
required,
|
|
47551
|
+
forceNonRequired,
|
|
47552
|
+
description,
|
|
47553
|
+
isAdditionalProperties,
|
|
47554
|
+
removeField,
|
|
47555
|
+
persistedControls,
|
|
47556
|
+
onRemoveByMinus
|
|
47557
|
+
},
|
|
47558
|
+
`${arrKey}-${JSON.stringify(name)}`
|
|
47559
|
+
);
|
|
47560
|
+
};
|
|
47488
47561
|
const getListInputFormItemFromSwagger = ({
|
|
47489
47562
|
name,
|
|
47490
47563
|
arrKey,
|
|
@@ -47651,6 +47724,17 @@ const getArrayFormItemFromSwagger = ({
|
|
|
47651
47724
|
urlParams,
|
|
47652
47725
|
onRemoveByMinus: () => remove(field.name)
|
|
47653
47726
|
}),
|
|
47727
|
+
fieldType === "multilineString" && getStringMultilineFormItemFromSwagger({
|
|
47728
|
+
name: Array.isArray(name) ? [...name, field.name] : [name, field.name],
|
|
47729
|
+
arrKey: field.key,
|
|
47730
|
+
// arrName: [field.name, getStringByName(name)],
|
|
47731
|
+
arrName: [field.name],
|
|
47732
|
+
persistName: persistName ? Array.isArray(persistName) ? [...persistName, field.name] : [persistName, field.name] : Array.isArray(name) ? [...name, field.name] : [name, field.name],
|
|
47733
|
+
description: description2,
|
|
47734
|
+
removeField,
|
|
47735
|
+
persistedControls,
|
|
47736
|
+
onRemoveByMinus: () => remove(field.name)
|
|
47737
|
+
}),
|
|
47654
47738
|
fieldType === "boolean" && getBooleanFormItemFromSwagger({
|
|
47655
47739
|
name: Array.isArray(name) ? [...name, field.name] : [name, field.name],
|
|
47656
47740
|
arrKey: field.key,
|
|
@@ -47853,6 +47937,21 @@ const getObjectFormItemsDraft = ({
|
|
|
47853
47937
|
urlParams
|
|
47854
47938
|
});
|
|
47855
47939
|
}
|
|
47940
|
+
if (properties[el].type === "multilineString") {
|
|
47941
|
+
return getStringMultilineFormItemFromSwagger({
|
|
47942
|
+
name: Array.isArray(name) ? [...name, String(el)] : [name, String(el)],
|
|
47943
|
+
arrKey,
|
|
47944
|
+
arrName: Array.isArray(arrName) ? [...arrName, String(el)] : void 0,
|
|
47945
|
+
persistName: persistName ? Array.isArray(persistName) ? [...persistName, String(el)] : [persistName, String(el)] : void 0,
|
|
47946
|
+
// required: required?.includes(getStringByName(objName)) ? [String(el)] : undefined,
|
|
47947
|
+
required: required?.includes(el) ? [String(el)] : void 0,
|
|
47948
|
+
forceNonRequired,
|
|
47949
|
+
description: properties[el].description,
|
|
47950
|
+
isAdditionalProperties: properties[el].isAdditionalProperties,
|
|
47951
|
+
removeField,
|
|
47952
|
+
persistedControls
|
|
47953
|
+
});
|
|
47954
|
+
}
|
|
47856
47955
|
if (properties[el].type === "boolean") {
|
|
47857
47956
|
return getBooleanFormItemFromSwagger({
|
|
47858
47957
|
name: Array.isArray(name) ? [...name, String(el)] : [name, String(el)],
|