@prorobotech/openapi-k8s-toolkit 1.4.0-alpha.14 → 1.4.0-alpha.16

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.
Files changed (92) hide show
  1. package/dist/{index-DuYZpKMC.mjs → index-Cc-4YPOA.mjs} +159 -18
  2. package/dist/{index-DuYZpKMC.mjs.map → index-Cc-4YPOA.mjs.map} +1 -1
  3. package/dist/{index-DcEC4xll.mjs → index-Drku3xGg.mjs} +2 -2
  4. package/dist/{index-DcEC4xll.mjs.map → index-Drku3xGg.mjs.map} +1 -1
  5. package/dist/openapi-k8s-toolkit.es.js +1 -1
  6. package/dist/openapi-k8s-toolkit.umd.js +157 -16
  7. package/dist/openapi-k8s-toolkit.umd.js.map +1 -1
  8. package/dist/types/api/bff/plugins/getPlugins.d.ts +1 -1
  9. package/dist/types/api/bff/scopes/checkScopes.d.ts +1 -1
  10. package/dist/types/api/bff/scopes/filterScopes.d.ts +2 -2
  11. package/dist/types/api/bff/search/getKinds.d.ts +1 -1
  12. package/dist/types/api/bff/swagger/getSwagger.d.ts +1 -1
  13. package/dist/types/api/getClusterList.d.ts +1 -1
  14. package/dist/types/api/permissions.d.ts +1 -1
  15. package/dist/types/components/molecules/BlackholeForm/atoms/CustomCollapse/CustomCollapse.d.ts +1 -1
  16. package/dist/types/components/molecules/BlackholeForm/atoms/DebugNameViewer/DebugNameViewer.d.ts +1 -1
  17. package/dist/types/components/molecules/BlackholeForm/atoms/HiddenContainer/HiddenContainer.d.ts +1 -1
  18. package/dist/types/components/molecules/BlackholeForm/atoms/HiddenContainer/utils.d.ts +1 -1
  19. package/dist/types/components/molecules/BlackholeForm/atoms/PersistedCheckbox/PersistedCheckbox.d.ts +1 -1
  20. package/dist/types/components/molecules/BlackholeForm/molecules/FormArrayHeader/FormArrayHeader.d.ts +1 -1
  21. package/dist/types/components/molecules/BlackholeForm/molecules/FormBooleanInput/FormBooleanInput.d.ts +1 -1
  22. package/dist/types/components/molecules/BlackholeForm/molecules/FormEnumStringInput/FormEnumStringInput.d.ts +1 -1
  23. package/dist/types/components/molecules/BlackholeForm/molecules/FormInlineYamlEditor/FormInlineYamlEditor.d.ts +1 -1
  24. package/dist/types/components/molecules/BlackholeForm/molecules/FormListInput/FormListInput.d.ts +2 -2
  25. package/dist/types/components/molecules/BlackholeForm/molecules/FormNamespaceInput/FormNamespaceInput.d.ts +1 -1
  26. package/dist/types/components/molecules/BlackholeForm/molecules/FormNumberInput/FormNumberInput.d.ts +1 -1
  27. package/dist/types/components/molecules/BlackholeForm/molecules/FormObjectFromSwagger/FormObjectFromSwagger.d.ts +1 -1
  28. package/dist/types/components/molecules/BlackholeForm/molecules/FormObjectFromSwagger/FormObjectFromSwagger.test.d.ts +1 -0
  29. package/dist/types/components/molecules/BlackholeForm/molecules/FormRangeInput/FormRangeInput.d.ts +2 -2
  30. package/dist/types/components/molecules/BlackholeForm/molecules/FormRangeInput/molecules/RangeInput/RangeInput.d.ts +1 -1
  31. package/dist/types/components/molecules/BlackholeForm/molecules/FormRangeInput/utils.d.ts +1 -1
  32. package/dist/types/components/molecules/BlackholeForm/molecules/FormStringInput/FormStringInput.d.ts +1 -1
  33. package/dist/types/components/molecules/BlackholeForm/molecules/FormStringMultilineInput/FormStringMultilineInput.d.ts +1 -1
  34. package/dist/types/components/molecules/BlackholeForm/molecules/helpers/validation.d.ts +1 -1
  35. package/dist/types/components/molecules/BlackholeForm/organisms/BlackholeForm/BlackholeForm.d.ts +3 -3
  36. package/dist/types/components/molecules/BlackholeForm/organisms/BlackholeForm/helpers/casts.d.ts +1 -1
  37. package/dist/types/components/molecules/BlackholeForm/organisms/BlackholeForm/helpers/getSortedPropertyKeys.d.ts +1 -1
  38. package/dist/types/components/molecules/BlackholeForm/organisms/BlackholeForm/helpers/hiddenExpanded.d.ts +1 -1
  39. package/dist/types/components/molecules/BlackholeForm/organisms/BlackholeForm/utils.d.ts +2 -2
  40. package/dist/types/components/molecules/BlackholeForm/organisms/BlackholeForm/utilsErrorHandler.d.ts +1 -1
  41. package/dist/types/components/molecules/BlackholeForm/organisms/BlackholeFormProvider/BlackholeFormProvider.d.ts +2 -2
  42. package/dist/types/components/molecules/EnrichedTable/organisms/EnrichedTable/EnrichedTable.d.ts +1 -1
  43. package/dist/types/components/molecules/EnrichedTable/organisms/EnrichedTable/utils.d.ts +2 -2
  44. package/dist/types/components/molecules/EnrichedTable/organisms/EnrichedTableProvider/EnrichedTableProvider.d.ts +2 -2
  45. package/dist/types/components/molecules/EnrichedTable/organisms/EnrichedTableProvider/utils.d.ts +2 -2
  46. package/dist/types/components/molecules/MarketPlace/molecules/AddEditFormModal/AddEditFormModal.d.ts +1 -1
  47. package/dist/types/components/molecules/MarketPlace/molecules/MarketplaceCard/MarketplaceCard.d.ts +1 -1
  48. package/dist/types/components/molecules/Search/Search.d.ts +1 -1
  49. package/dist/types/components/molecules/YamlEditorSingleton/YamlEditorSingleton.d.ts +1 -1
  50. package/dist/types/components/organisms/DynamicComponents/DynamicComponents.d.ts +1 -1
  51. package/dist/types/components/organisms/DynamicComponents/molecules/ActionsDropdown/ActionsDropdown.test.d.ts +1 -0
  52. package/dist/types/components/organisms/DynamicComponents/molecules/ActionsDropdown/dropdownPlacement.d.ts +12 -0
  53. package/dist/types/components/organisms/DynamicComponents/molecules/ActionsDropdown/dropdownPlacement.test.d.ts +1 -0
  54. package/dist/types/components/organisms/DynamicComponents/molecules/ActionsDropdown/hooks/useActionsDropdownHandlers/helpers.d.ts +5 -4
  55. package/dist/types/components/organisms/DynamicComponents/molecules/ActionsDropdown/hooks/useActionsDropdownHandlers/index.d.ts +1 -1
  56. package/dist/types/components/organisms/DynamicComponents/molecules/ActionsDropdown/permissionsMap.d.ts +1 -1
  57. package/dist/types/components/organisms/DynamicComponents/molecules/PrometheusGraph/helpers.d.ts +1 -1
  58. package/dist/types/components/organisms/DynamicComponents/molecules/UsageGraphCard/atoms/FormattedValue/utils.d.ts +2 -2
  59. package/dist/types/components/organisms/DynamicComponents/types/ActionsDropdown.d.ts +4 -2
  60. package/dist/types/components/organisms/DynamicComponents/types/ContentCard.d.ts +1 -1
  61. package/dist/types/components/organisms/DynamicComponents/types/ConverterBytes.d.ts +1 -1
  62. package/dist/types/components/organisms/DynamicComponents/types/ConverterCores.d.ts +1 -1
  63. package/dist/types/components/organisms/DynamicComponents/types/EnrichedTable.d.ts +1 -1
  64. package/dist/types/components/organisms/DynamicComponents/types/PrometheusGraph.d.ts +1 -1
  65. package/dist/types/components/organisms/DynamicComponents/types/SidebarProvider.d.ts +1 -1
  66. package/dist/types/components/organisms/DynamicComponents/types/Spacer.d.ts +1 -1
  67. package/dist/types/components/organisms/DynamicRenderer/DynamicRenderer.d.ts +1 -1
  68. package/dist/types/components/organisms/DynamicRendererWithProviders/DynamicRendererWithProviders.d.ts +2 -2
  69. package/dist/types/components/organisms/DynamicRendererWithProviders/providers/hybridDataProvider/hybridDataProvider.d.ts +1 -1
  70. package/dist/types/components/organisms/DynamicRendererWithProviders/providers/multiK8sProvider/multiK8sProvider.d.ts +1 -1
  71. package/dist/types/hooks/useApiResource.d.ts +1 -1
  72. package/dist/types/hooks/useBuiltinResourceTypes.d.ts +1 -1
  73. package/dist/types/hooks/useCrdResource.d.ts +1 -1
  74. package/dist/types/hooks/useK8sSmartResource/useK8sSmartResourceWithoutKinds.d.ts +1 -1
  75. package/dist/types/hooks/useListThenWatch/reducer.d.ts +1 -1
  76. package/dist/types/hooks/useListThenWatch/types.d.ts +1 -1
  77. package/dist/types/hooks/useListThenWatch/useListWatch.d.ts +1 -1
  78. package/dist/types/hooks/useListThenWatch/utils.d.ts +1 -1
  79. package/dist/types/hooks/usePermissions.d.ts +1 -1
  80. package/dist/types/localTypes/bff/table.d.ts +1 -1
  81. package/dist/types/localTypes/dynamicRender.d.ts +1 -1
  82. package/dist/types/localTypes/search.d.ts +1 -1
  83. package/dist/types/utils/converterBytes/converterBytes.d.ts +1 -1
  84. package/dist/types/utils/converterCores/converterCores.d.ts +1 -1
  85. package/dist/types/utils/getGroupsByCategory/getGroupsByCategory.d.ts +1 -1
  86. package/dist/types/utils/getSortedKinds/getSortedKinds.d.ts +2 -2
  87. package/dist/types/utils/getSortedKindsAll/getSortedKindsAll.d.ts +2 -2
  88. package/dist/types/utils/getStringByName/getStringByName.d.ts +1 -1
  89. package/dist/types/utils/kindByGvr/kindByGvr.d.ts +1 -1
  90. package/dist/types/utils/namespacedByGvr/namespacedByGvr.d.ts +1 -1
  91. package/dist/types/utils/pluralByKind/pluralByKind.d.ts +1 -1
  92. package/package.json +1 -1
@@ -7977,6 +7977,11 @@ const DeleteModal = ({ name, onClose, endpoint }) => {
7977
7977
  okButtonProps: { danger: true },
7978
7978
  width: 400,
7979
7979
  centered: true,
7980
+ styles: {
7981
+ header: {
7982
+ paddingRight: "30px"
7983
+ }
7984
+ },
7980
7985
  children: error && /* @__PURE__ */ jsxRuntimeExports.jsx(Alert, { type: "error", message: "Error while delete", description: error?.response?.data?.message })
7981
7986
  }
7982
7987
  );
@@ -8014,6 +8019,11 @@ const DeleteModalMany = ({ data, onClose }) => {
8014
8019
  okButtonProps: { danger: true },
8015
8020
  width: 400,
8016
8021
  centered: true,
8022
+ styles: {
8023
+ header: {
8024
+ paddingRight: "30px"
8025
+ }
8026
+ },
8017
8027
  children: error && /* @__PURE__ */ jsxRuntimeExports.jsx(Alert, { type: "error", message: "Error while delete", description: error?.response?.data?.message })
8018
8028
  }
8019
8029
  );
@@ -8043,6 +8053,11 @@ const ConfirmModal = ({
8043
8053
  okButtonProps: { danger },
8044
8054
  width,
8045
8055
  centered: true,
8056
+ styles: {
8057
+ header: {
8058
+ paddingRight: "30px"
8059
+ }
8060
+ },
8046
8061
  children
8047
8062
  }
8048
8063
  );
@@ -43811,6 +43826,11 @@ const YamlEditorSingleton$1 = ({
43811
43826
  title: /* @__PURE__ */ jsxRuntimeExports.jsx(Typography.Text, { type: "danger", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$y.BigText, { children: "Error!" }) }),
43812
43827
  cancelButtonProps: { style: { display: "none" } },
43813
43828
  centered: true,
43829
+ styles: {
43830
+ header: {
43831
+ paddingRight: "30px"
43832
+ }
43833
+ },
43814
43834
  children: [
43815
43835
  "An error has occurred: ",
43816
43836
  error?.response?.data?.message
@@ -44460,6 +44480,11 @@ const LabelsEditModal = ({
44460
44480
  width: editModalWidth || 520,
44461
44481
  destroyOnHidden: true,
44462
44482
  centered: true,
44483
+ styles: {
44484
+ header: {
44485
+ paddingRight: "30px"
44486
+ }
44487
+ },
44463
44488
  children: [
44464
44489
  error && /* @__PURE__ */ jsxRuntimeExports.jsx(Alert, { type: "error", message: "Error while submitting", description: error?.response?.data?.message }),
44465
44490
  modalDescriptionText && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
@@ -44592,6 +44617,11 @@ const TaintsEditModal = ({
44592
44617
  width: editModalWidth || 520,
44593
44618
  destroyOnHidden: true,
44594
44619
  centered: true,
44620
+ styles: {
44621
+ header: {
44622
+ paddingRight: "30px"
44623
+ }
44624
+ },
44595
44625
  children: [
44596
44626
  error && /* @__PURE__ */ jsxRuntimeExports.jsx(Alert, { type: "error", message: "Error while submitting", description: error?.response?.data?.message }),
44597
44627
  modalDescriptionText && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
@@ -44741,6 +44771,11 @@ const TolerationsEditModal = ({
44741
44771
  width: editModalWidth || 520,
44742
44772
  destroyOnHidden: true,
44743
44773
  centered: true,
44774
+ styles: {
44775
+ header: {
44776
+ paddingRight: "30px"
44777
+ }
44778
+ },
44744
44779
  children: [
44745
44780
  error && /* @__PURE__ */ jsxRuntimeExports.jsx(Alert, { type: "error", message: "Error while submitting", description: error?.response?.data?.message }),
44746
44781
  modalDescriptionText && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
@@ -44935,6 +44970,11 @@ const AnnotationsEditModal = ({
44935
44970
  width: editModalWidth || 520,
44936
44971
  destroyOnHidden: true,
44937
44972
  centered: true,
44973
+ styles: {
44974
+ header: {
44975
+ paddingRight: "30px"
44976
+ }
44977
+ },
44938
44978
  children: [
44939
44979
  error && /* @__PURE__ */ jsxRuntimeExports.jsx(Alert, { type: "error", message: "Error while submitting", description: error?.response?.data?.message }),
44940
44980
  modalDescriptionText && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
@@ -44994,6 +45034,11 @@ const ReadOnlyModal = ({
44994
45034
  width: editModalWidth || 520,
44995
45035
  destroyOnHidden: true,
44996
45036
  centered: true,
45037
+ styles: {
45038
+ header: {
45039
+ paddingRight: "30px"
45040
+ }
45041
+ },
44997
45042
  children: [
44998
45043
  modalDescriptionText && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
44999
45044
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: modalDescriptionTextStyle, children: modalDescriptionText }),
@@ -78551,7 +78596,7 @@ const TolerationsModal = ({
78551
78596
  };
78552
78597
 
78553
78598
  const LazyEnrichedTableModal = lazy(
78554
- () => import('./index-DcEC4xll.mjs').then((mod) => ({ default: mod.EnrichedTableModal }))
78599
+ () => import('./index-Drku3xGg.mjs').then((mod) => ({ default: mod.EnrichedTableModal }))
78555
78600
  );
78556
78601
  const renderActiveType = (activeType, extraProps) => {
78557
78602
  if (!activeType) return null;
@@ -79697,15 +79742,26 @@ const parseValueIfString = (value, ctx) => {
79697
79742
  }
79698
79743
  return value;
79699
79744
  };
79700
- const resolveObjectFromTemplate = (template, multiQueryData) => {
79701
- const match = template.match(/^\{reqs\[(\d+)\]\[((?:\s*['"][^'"]+['"]\s*,?)+)\]\}$/);
79702
- if (match) {
79703
- const reqIndex = parseInt(match[1], 10);
79704
- const pathKeys = Array.from(match[2].matchAll(/['"]([^'"]+)['"]/g)).map((m) => m[1]);
79705
- const reqData = multiQueryData[`req${reqIndex}`];
79706
- if (reqData != null) {
79707
- return _$1.get(reqData, pathKeys);
79745
+ const resolveObjectByReqIndexAndJsonPath = ({
79746
+ reqIndex,
79747
+ jsonPathToObj,
79748
+ multiQueryData
79749
+ }) => {
79750
+ const reqIndexNumber = Number(reqIndex);
79751
+ if (!Number.isInteger(reqIndexNumber) || reqIndexNumber < 0) {
79752
+ return void 0;
79753
+ }
79754
+ const jsonRoot = multiQueryData[`req${reqIndexNumber}`];
79755
+ if (jsonRoot === void 0) {
79756
+ return void 0;
79757
+ }
79758
+ try {
79759
+ const value = jp.query(jsonRoot, `$${jsonPathToObj}`)?.[0];
79760
+ if (value && typeof value === "object" && !Array.isArray(value)) {
79761
+ return value;
79708
79762
  }
79763
+ } catch {
79764
+ return void 0;
79709
79765
  }
79710
79766
  return void 0;
79711
79767
  };
@@ -79926,7 +79982,11 @@ const handleOpenKubeletConfigAction = (action, ctx, setActiveAction, setModalOpe
79926
79982
  const fireTriggerRunAction = (action, ctx, multiQueryData, { showSuccess, showError }) => {
79927
79983
  const createEndpointPrepared = parseAll({ text: action.props.createEndpoint, ...ctx });
79928
79984
  const cronJobNamePrepared = parseAll({ text: action.props.cronJobName, ...ctx });
79929
- const jobTemplateObj = resolveObjectFromTemplate(action.props.jobTemplate, multiQueryData);
79985
+ const jobTemplateObj = resolveObjectByReqIndexAndJsonPath({
79986
+ reqIndex: action.props.reqIndex,
79987
+ jsonPathToObj: action.props.jsonPathToObj,
79988
+ multiQueryData
79989
+ });
79930
79990
  if (!jobTemplateObj) {
79931
79991
  showError("Trigger run", new Error("Could not resolve job template from resource data"));
79932
79992
  return;
@@ -80037,7 +80097,11 @@ const useRerunHandlers = (ctx, multiQueryData, { showSuccess, showError }) => {
80037
80097
  const handleRerunLastAction = (action) => {
80038
80098
  const createEndpointPrepared = parseAll({ text: action.props.createEndpoint, ...ctx });
80039
80099
  const sourceJobNamePrepared = parseAll({ text: action.props.sourceJobName, ...ctx });
80040
- const sourceJobObj = resolveObjectFromTemplate(action.props.sourceJobSpec, multiQueryData);
80100
+ const sourceJobObj = resolveObjectByReqIndexAndJsonPath({
80101
+ reqIndex: action.props.reqIndex,
80102
+ jsonPathToObj: action.props.jsonPathToObj,
80103
+ multiQueryData
80104
+ });
80041
80105
  if (!sourceJobObj) {
80042
80106
  showError("Rerun job", new Error("Could not resolve source job spec from resource data"));
80043
80107
  return;
@@ -80560,7 +80624,7 @@ const decodeBase64 = (value) => {
80560
80624
  return bytes;
80561
80625
  };
80562
80626
  const triggerFileDownload = (filename, content) => {
80563
- const blob = typeof content === "string" ? new Blob([content], { type: "text/plain" }) : new Blob([content]);
80627
+ const blob = typeof content === "string" ? new Blob([content], { type: "text/plain" }) : new Blob([Uint8Array.from(content)]);
80564
80628
  const url = URL.createObjectURL(blob);
80565
80629
  const a = document.createElement("a");
80566
80630
  a.href = url;
@@ -80619,6 +80683,11 @@ const DownloadAsFilesModal = ({
80619
80683
  okText: "Download",
80620
80684
  okButtonProps: { disabled: selectedKeys.length === 0 },
80621
80685
  width: 520,
80686
+ styles: {
80687
+ header: {
80688
+ paddingRight: "30px"
80689
+ }
80690
+ },
80622
80691
  children: [
80623
80692
  isLoading && /* @__PURE__ */ jsxRuntimeExports.jsx(Spin, {}),
80624
80693
  isError && /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -80746,6 +80815,11 @@ const ScaleModal = ({ open, onClose, onConfirm, currentReplicas, name, isLoading
80746
80815
  confirmLoading: isLoading,
80747
80816
  okButtonProps: { disabled: !isValidReplicas },
80748
80817
  width: 400,
80818
+ styles: {
80819
+ header: {
80820
+ paddingRight: "30px"
80821
+ }
80822
+ },
80749
80823
  children: [
80750
80824
  /* @__PURE__ */ jsxRuntimeExports.jsxs(Typography.Paragraph, { children: [
80751
80825
  "Current replicas: ",
@@ -80895,6 +80969,11 @@ const CreateFromFilesModal = ({
80895
80969
  confirmLoading: isLoading,
80896
80970
  okButtonProps: { disabled: !isValid },
80897
80971
  width: 600,
80972
+ styles: {
80973
+ header: {
80974
+ paddingRight: "30px"
80975
+ }
80976
+ },
80898
80977
  children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Space, { direction: "vertical", style: { width: "100%" }, size: "middle", children: [
80899
80978
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
80900
80979
  /* @__PURE__ */ jsxRuntimeExports.jsx(Typography.Text, { strong: true, children: "Name" }),
@@ -83825,12 +83904,45 @@ const FormObjectFromSwagger = ({
83825
83904
  onRemoveByMinus
83826
83905
  }) => {
83827
83906
  const designNewLayout = useDesignNewLayout();
83907
+ const form = Form.useFormInstance();
83828
83908
  const [additionalPropValue, setAddditionalPropValue] = useState();
83909
+ const focusFieldInput = (path) => {
83910
+ if (typeof window === "undefined" || typeof document === "undefined") {
83911
+ return;
83912
+ }
83913
+ const tryFocus = (attempt = 0) => {
83914
+ const fieldInstance = form.getFieldInstance(path);
83915
+ if (fieldInstance && typeof fieldInstance.focus === "function") {
83916
+ fieldInstance.focus();
83917
+ return;
83918
+ }
83919
+ const tokens = Array.isArray(path) ? path.map(String) : [String(path)];
83920
+ const fieldId = tokens.join("_");
83921
+ const byId = document.getElementById(fieldId);
83922
+ if (byId && typeof byId.focus === "function") {
83923
+ const focusableById = byId;
83924
+ focusableById.focus();
83925
+ return;
83926
+ }
83927
+ const byIdSuffix = document.querySelector(`[id$="${fieldId}"]`);
83928
+ if (byIdSuffix && typeof byIdSuffix.focus === "function") {
83929
+ const focusableBySuffix = byIdSuffix;
83930
+ focusableBySuffix.focus();
83931
+ return;
83932
+ }
83933
+ if (attempt < 5) {
83934
+ window.requestAnimationFrame(() => tryFocus(attempt + 1));
83935
+ }
83936
+ };
83937
+ window.requestAnimationFrame(() => tryFocus());
83938
+ };
83829
83939
  const additionalPropCreate = () => {
83830
83940
  if (additionalPropValue && additionalPropValue.length > 0) {
83831
83941
  const addProps = inputProps?.additionalProperties;
83942
+ const path = Array.isArray(name) ? [...name, String(collapseTitle)] : [name, String(collapseTitle)];
83943
+ const newFieldPath = [...path, additionalPropValue];
83832
83944
  inputProps?.addField({
83833
- path: Array.isArray(name) ? [...name, String(collapseTitle)] : [name, String(collapseTitle)],
83945
+ path,
83834
83946
  name: additionalPropValue,
83835
83947
  type: addProps.type,
83836
83948
  items: addProps.items,
@@ -83838,6 +83950,7 @@ const FormObjectFromSwagger = ({
83838
83950
  required: addProps.required
83839
83951
  });
83840
83952
  setAddditionalPropValue(void 0);
83953
+ focusFieldInput(newFieldPath);
83841
83954
  }
83842
83955
  };
83843
83956
  const title = /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
@@ -85187,6 +85300,19 @@ const BlackholeForm = ({
85187
85300
  const [form] = Form.useForm();
85188
85301
  const allValues = Form.useWatch([], form);
85189
85302
  const namespaceFromFormData = Form.useWatch(["metadata", "namespace"], form);
85303
+ const resolvedBacklink = useMemo(() => {
85304
+ if (!backlink || !namespaceFromFormData) return backlink;
85305
+ const tablePattern = /(\/api-table\/|\/builtin-table\/)/;
85306
+ const match = backlink.match(tablePattern);
85307
+ if (!match || match.index == null) return backlink;
85308
+ const beforeTable = backlink.substring(0, match.index);
85309
+ const tableAndAfter = backlink.substring(match.index);
85310
+ const segments = beforeTable.split("/").filter(Boolean);
85311
+ if (segments.length <= 2) {
85312
+ return `${beforeTable}/${namespaceFromFormData}${tableAndAfter}`;
85313
+ }
85314
+ return backlink;
85315
+ }, [backlink, namespaceFromFormData]);
85190
85316
  const [properties, setProperties] = useState(staticProperties);
85191
85317
  const [yamlValues, setYamlValues] = useState();
85192
85318
  const debouncedSetYamlValues = useDebounceCallback(setYamlValues, 500);
@@ -85278,8 +85404,8 @@ const BlackholeForm = ({
85278
85404
  if (isCreate) {
85279
85405
  createNewEntry({ endpoint, body }).then((res) => {
85280
85406
  console.log(res);
85281
- if (backlink) {
85282
- navigate(backlink);
85407
+ if (resolvedBacklink) {
85408
+ navigate(resolvedBacklink);
85283
85409
  }
85284
85410
  }).catch((error2) => {
85285
85411
  console.log("Form submit error", error2);
@@ -85293,8 +85419,8 @@ const BlackholeForm = ({
85293
85419
  } else {
85294
85420
  updateEntry({ endpoint, body }).then((res) => {
85295
85421
  console.log(res);
85296
- if (backlink) {
85297
- navigate(backlink);
85422
+ if (resolvedBacklink) {
85423
+ navigate(resolvedBacklink);
85298
85424
  }
85299
85425
  }).catch((error2) => {
85300
85426
  console.log("Form submit error", error2);
@@ -85944,6 +86070,11 @@ const BlackholeForm = ({
85944
86070
  title: /* @__PURE__ */ jsxRuntimeExports.jsx(Typography.Text, { type: "danger", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$h.BigText, { children: "Error!" }) }),
85945
86071
  cancelButtonProps: { style: { display: "none" } },
85946
86072
  centered: true,
86073
+ styles: {
86074
+ header: {
86075
+ paddingRight: "30px"
86076
+ }
86077
+ },
85947
86078
  children: [
85948
86079
  "An error has occurred: ",
85949
86080
  error?.response?.data?.message
@@ -85959,6 +86090,11 @@ const BlackholeForm = ({
85959
86090
  title: "Debug for properties",
85960
86091
  width: "90vw",
85961
86092
  centered: true,
86093
+ styles: {
86094
+ header: {
86095
+ paddingRight: "30px"
86096
+ }
86097
+ },
85962
86098
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$h.DebugContainer, { $designNewLayoutHeight: designNewLayoutHeight, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Suspense, { fallback: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: "Loading..." }), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
85963
86099
  Editor,
85964
86100
  {
@@ -86318,6 +86454,11 @@ const AddEditFormModal = ({
86318
86454
  onCancel: () => setIsOpen(false),
86319
86455
  onOk: () => submit(),
86320
86456
  centered: true,
86457
+ styles: {
86458
+ header: {
86459
+ paddingRight: "30px"
86460
+ }
86461
+ },
86321
86462
  children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Form, { form, name: "control-hooks", initialValues: { ...defaultValues }, children: [
86322
86463
  /* @__PURE__ */ jsxRuntimeExports.jsx(Form.Item, { label: "Name", name: "name", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Input, { required: true }) }),
86323
86464
  /* @__PURE__ */ jsxRuntimeExports.jsx(Form.Item, { label: "Description", name: "description", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Input, { required: true }) }),
@@ -90664,4 +90805,4 @@ const usePluginManifest = ({
90664
90805
  };
90665
90806
 
90666
90807
  export { useInfiniteSentinel as $, getBuiltinResourceTypes as A, getCrdData as B, getDirectUnknownResource as C, DeleteIcon as D, EnrichedTableProvider as E, checkPermission as F, getSwagger as G, filterIfApiInstanceNamespaceScoped as H, filterIfBuiltInInstanceNamespaceScoped as I, checkIfApiInstanceNamespaceScoped as J, checkIfBuiltInInstanceNamespaceScoped as K, getKinds as L, useClusterList as M, useApiResources as N, useApiResourceSingle as O, PaddingContainer as P, useBuiltinResources as Q, ReadOnlyModal as R, useBuiltinResourceSingle as S, useCrdResources as T, useCrdResourceSingle as U, useApisResourceTypes as V, useApiResourceTypesByGroup as W, useBuiltinResourceTypes as X, useCrdData as Y, useListWatch as Z, _$1 as _, useTheme as a, parseQuotaValueCpu as a$, useK8sVerbs as a0, useManyK8sSmartResource as a1, useSmartResourceParams as a2, useResourceScope as a3, useKinds as a4, usePluginManifest as a5, Spacer$1 as a6, TreeWithSearch as a7, ConfirmModal as a8, UpIcon as a9, EnrichedTable as aA, ClusterListTable as aB, getEnrichedColumns as aC, getEnrichedColumnsWithControls as aD, YamlEditorSingleton$1 as aE, BlackholeFormProvider as aF, BlackholeForm as aG, getObjectFormItemsDraft as aH, MarketPlace as aI, MarketplaceCard as aJ, ProjectInfoCard as aK, PodTerminal as aL, NodeTerminal as aM, PodLogs as aN, PodLogsMonaco as aO, VMVNC as aP, Search as aQ, Events as aR, DynamicRenderer as aS, DynamicComponents as aT, DynamicRendererWithProviders as aU, prepareTemplate as aV, isFlatObject as aW, filterSelectOptions as aX, getStringByName as aY, floorToDecimal as aZ, parseQuotaValue as a_, DownIcon as aa, BackToDefaultIcon as ab, SuccessIcon as ac, feedbackIcons as ad, PlusIcon as ae, MinusIcon as af, LockedIcon as ag, UnlockedIcon as ah, PauseCircleIcon as ai, ResumeCircleIcon as aj, LookingGlassIcon as ak, EarthIcon as al, ContentCard$1 as am, FlexGrow as an, UncontrolledSelect as ao, CustomSelect$4 as ap, CursorPointerTag as aq, CursorPointerTagMinContent as ar, CursorDefaultDiv as as, ResourceLink as at, ManageableBreadcrumbsProvider as au, prepareDataForManageableBreadcrumbs as av, ManageableBreadcrumbs as aw, ManageableSidebarProvider as ax, prepareDataForManageableSidebar as ay, ManageableSidebar as az, usePartsOfUrl as b, parseQuotaValueMemoryAndStorage as b0, normalizeValuesForQuotasToNumber as b1, getAllPathsFromObj as b2, getPrefixSubarrays as b3, groupsToTreeData as b4, getBuiltinTreeData as b5, getGroupsByCategory as b6, createContextFactory as b7, prepareUrlsToFetchForDynamicRenderer as b8, deepMerge as b9, getSortedKinds as ba, getSortedKindsAll as bb, hslFromString as bc, getUppercase as bd, kindByGvr as be, pluralByKind as bf, namespacedByGvr as bg, getLinkToBuiltinForm as bh, getLinkToApiForm as bi, isMultilineString as bj, isMultilineFromYaml as bk, includesArray as bl, getResourceLink as bm, getNamespaceLink as bn, convertBytes as bo, formatBytesAuto as bp, toBytes as bq, convertStorage as br, parseValueWithUnit as bs, convertCores as bt, formatCoresAuto as bu, toCores as bv, convertCompute as bw, parseCoresWithUnit as bx, formatDateAuto as by, isValidRFC3339 as bz, usePermissions as c, useDirectUnknownResource as d, useK8sSmartResource as e, jsxRuntimeExports as f, EditIcon as g, getLinkToForm as h, DeleteModal as i, jp as j, DeleteModalMany as k, getClusterList as l, createNewEntry as m, updateEntry as n, deleteEntry as o, parseAll as p, getApiResources as q, getApiResourceSingle as r, serializeLabelsWithNoEncoding$1 as s, getBuiltinResources as t, useMultiQuery as u, getBuiltinResourceSingle as v, getCrdResources as w, getCrdResourceSingle as x, getApiResourceTypes as y, getApiResourceTypesByApiGroup as z };
90667
- //# sourceMappingURL=index-DuYZpKMC.mjs.map
90808
+ //# sourceMappingURL=index-Cc-4YPOA.mjs.map