@prorobotech/openapi-k8s-toolkit 1.4.0-alpha.32 → 1.4.0-alpha.34

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.
@@ -1,2 +1,2 @@
1
- export { af as BackToDefaultIcon, aM as BlackholeForm, aL as BlackholeFormProvider, aH as ClusterListTable, ac as ConfirmModal, aq as ContentCard, aw as CursorDefaultDiv, au as CursorPointerTag, av as CursorPointerTagMinContent, at as CustomSelect, D as DeleteIcon, l as DeleteModal, n as DeleteModalMany, ae as DownIcon, aZ as DynamicComponents, aY as DynamicRenderer, a_ as DynamicRendererWithProviders, ap as EarthIcon, h as EditIcon, aG as EnrichedTable, E as EnrichedTableProvider, ay as ErrorBoundary, az as ErrorBoundaryWithDataReset, aX as Events, ar as FlexGrow, ak as LockedIcon, ao as LookingGlassIcon, aC as ManageableBreadcrumbs, aA as ManageableBreadcrumbsProvider, aF as ManageableSidebar, aD as ManageableSidebarProvider, aO as MarketPlace, aP as MarketplaceCard, aj as MinusIcon, aS as NodeTerminal, i as PaddingContainer, am as PauseCircleIcon, ai as PlusIcon, aT as PodLogs, aU as PodLogsMonaco, aR as PodTerminal, aQ as ProjectInfoCard, ax as ResourceLink, an as ResumeCircleIcon, aW as Search, aa as Spacer, ag as SuccessIcon, ab as TreeWithSearch, as as UncontrolledSelect, al as UnlockedIcon, ad as UpIcon, aV as VMVNC, aK as YamlEditorSingleton, M as checkIfApiInstanceNamespaceScoped, N as checkIfBuiltInInstanceNamespaceScoped, I as checkPermission, bu as convertBytes, bC as convertCompute, bz as convertCores, bx as convertStorage, bd as createContextFactory, q as createNewEntry, bf as deepMerge, t as deleteEntry, ah as feedbackIcons, K as filterIfApiInstanceNamespaceScoped, L as filterIfBuiltInInstanceNamespaceScoped, b1 as filterSelectOptions, b3 as floorToDecimal, bv as formatBytesAuto, bA as formatCoresAuto, bE as formatDateAuto, b8 as getAllPathsFromObj, w as getApiResourceSingle, B as getApiResourceTypes, C as getApiResourceTypesByApiGroup, v as getApiResources, y as getBuiltinResourceSingle, F as getBuiltinResourceTypes, x as getBuiltinResources, bb as getBuiltinTreeData, o as getClusterList, G as getCrdData, A as getCrdResourceSingle, z as getCrdResources, H as getDirectUnknownResource, aI as getEnrichedColumns, aJ as getEnrichedColumnsWithControls, bc as getGroupsByCategory, O as getKinds, bo as getLinkToApiForm, bn as getLinkToBuiltinForm, k as getLinkToForm, bt as getNamespaceLink, aN as getObjectFormItemsDraft, b9 as getPrefixSubarrays, bs as getResourceLink, bg as getSortedKinds, bh as getSortedKindsAll, b2 as getStringByName, J as getSwagger, bj as getUppercase, ba as groupsToTreeData, bi as hslFromString, br as includesArray, b0 as isFlatObject, bq as isMultilineFromYaml, bp as isMultilineString, bF as isValidRFC3339, bk as kindByGvr, bm as namespacedByGvr, b7 as normalizeValuesForQuotasToNumber, bD as parseCoresWithUnit, b4 as parseQuotaValue, b5 as parseQuotaValueCpu, b6 as parseQuotaValueMemoryAndStorage, by as parseValueWithUnit, bl as pluralByKind, aB as prepareDataForManageableBreadcrumbs, aE as prepareDataForManageableSidebar, a$ as prepareTemplate, be as prepareUrlsToFetchForDynamicRenderer, bw as toBytes, bB as toCores, r as updateEntry, T as useApiResourceSingle, Z as useApiResourceTypesByGroup, S as useApiResources, Y as useApisResourceTypes, V as useBuiltinResourceSingle, $ as useBuiltinResourceTypes, U as useBuiltinResources, Q as useClusterList, a0 as useCrdData, X as useCrdResourceSingle, W as useCrdResources, e as useDirectUnknownResource, a2 as useInfiniteSentinel, f as useK8sSmartResource, a3 as useK8sVerbs, a7 as useKinds, a8 as useKindsRaw, a1 as useListWatch, a4 as useManyK8sSmartResource, d as usePermissions, a9 as usePluginManifest, a6 as useResourceScope, a5 as useSmartResourceParams } from './index-66OGJ33J.mjs';
1
+ export { af as BackToDefaultIcon, aM as BlackholeForm, aL as BlackholeFormProvider, aH as ClusterListTable, ac as ConfirmModal, aq as ContentCard, aw as CursorDefaultDiv, au as CursorPointerTag, av as CursorPointerTagMinContent, at as CustomSelect, D as DeleteIcon, l as DeleteModal, n as DeleteModalMany, ae as DownIcon, aZ as DynamicComponents, aY as DynamicRenderer, a_ as DynamicRendererWithProviders, ap as EarthIcon, h as EditIcon, aG as EnrichedTable, E as EnrichedTableProvider, ay as ErrorBoundary, az as ErrorBoundaryWithDataReset, aX as Events, ar as FlexGrow, ak as LockedIcon, ao as LookingGlassIcon, aC as ManageableBreadcrumbs, aA as ManageableBreadcrumbsProvider, aF as ManageableSidebar, aD as ManageableSidebarProvider, aO as MarketPlace, aP as MarketplaceCard, aj as MinusIcon, aS as NodeTerminal, i as PaddingContainer, am as PauseCircleIcon, ai as PlusIcon, aT as PodLogs, aU as PodLogsMonaco, aR as PodTerminal, aQ as ProjectInfoCard, ax as ResourceLink, an as ResumeCircleIcon, aW as Search, aa as Spacer, ag as SuccessIcon, ab as TreeWithSearch, as as UncontrolledSelect, al as UnlockedIcon, ad as UpIcon, aV as VMVNC, aK as YamlEditorSingleton, M as checkIfApiInstanceNamespaceScoped, N as checkIfBuiltInInstanceNamespaceScoped, I as checkPermission, bu as convertBytes, bC as convertCompute, bz as convertCores, bx as convertStorage, bd as createContextFactory, q as createNewEntry, bf as deepMerge, t as deleteEntry, ah as feedbackIcons, K as filterIfApiInstanceNamespaceScoped, L as filterIfBuiltInInstanceNamespaceScoped, b1 as filterSelectOptions, b3 as floorToDecimal, bv as formatBytesAuto, bA as formatCoresAuto, bE as formatDateAuto, b8 as getAllPathsFromObj, w as getApiResourceSingle, B as getApiResourceTypes, C as getApiResourceTypesByApiGroup, v as getApiResources, y as getBuiltinResourceSingle, F as getBuiltinResourceTypes, x as getBuiltinResources, bb as getBuiltinTreeData, o as getClusterList, G as getCrdData, A as getCrdResourceSingle, z as getCrdResources, H as getDirectUnknownResource, aI as getEnrichedColumns, aJ as getEnrichedColumnsWithControls, bc as getGroupsByCategory, O as getKinds, bo as getLinkToApiForm, bn as getLinkToBuiltinForm, k as getLinkToForm, bt as getNamespaceLink, aN as getObjectFormItemsDraft, b9 as getPrefixSubarrays, bs as getResourceLink, bg as getSortedKinds, bh as getSortedKindsAll, b2 as getStringByName, J as getSwagger, bj as getUppercase, ba as groupsToTreeData, bi as hslFromString, br as includesArray, b0 as isFlatObject, bq as isMultilineFromYaml, bp as isMultilineString, bF as isValidRFC3339, bk as kindByGvr, bm as namespacedByGvr, b7 as normalizeValuesForQuotasToNumber, bD as parseCoresWithUnit, b4 as parseQuotaValue, b5 as parseQuotaValueCpu, b6 as parseQuotaValueMemoryAndStorage, by as parseValueWithUnit, bl as pluralByKind, aB as prepareDataForManageableBreadcrumbs, aE as prepareDataForManageableSidebar, a$ as prepareTemplate, be as prepareUrlsToFetchForDynamicRenderer, bw as toBytes, bB as toCores, r as updateEntry, T as useApiResourceSingle, Z as useApiResourceTypesByGroup, S as useApiResources, Y as useApisResourceTypes, V as useBuiltinResourceSingle, $ as useBuiltinResourceTypes, U as useBuiltinResources, Q as useClusterList, a0 as useCrdData, X as useCrdResourceSingle, W as useCrdResources, e as useDirectUnknownResource, a2 as useInfiniteSentinel, f as useK8sSmartResource, a3 as useK8sVerbs, a7 as useKinds, a8 as useKindsRaw, a1 as useListWatch, a4 as useManyK8sSmartResource, d as usePermissions, a9 as usePluginManifest, a6 as useResourceScope, a5 as useSmartResourceParams } from './index-bM0NLvVb.mjs';
2
2
  //# sourceMappingURL=openapi-k8s-toolkit.es.js.map
@@ -81701,7 +81701,7 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
81701
81701
  }
81702
81702
  }
81703
81703
  });
81704
- const isLinkableVolumeTypeKey = (typeKey) => typeKey === "configMap" || typeKey === "secret";
81704
+ const isLinkableVolumeTypeKey = (typeKey) => typeKey === "configMap" || typeKey === "secret" || typeKey === "persistentVolumeClaim";
81705
81705
  const isPendingLinkSegment = (value) => !value || value.includes("...") || value.includes("{") || value.includes("}");
81706
81706
  const getVolumeFactoryKey = ({
81707
81707
  apiGroup,
@@ -81881,59 +81881,41 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
81881
81881
  ]);
81882
81882
  const hasLinkableVolumeTypes = dataSourceWithoutHref.some(({ typeKey }) => isLinkableVolumeTypeKey(typeKey));
81883
81883
  const linkableNamespace = dataSourceWithoutHref.find(({ typeKey }) => isLinkableVolumeTypeKey(typeKey))?.namespace;
81884
- const configMapFactoryKey = hasLinkableVolumeTypes && !isNavigationLoading && !isNavigationError ? getVolumeFactoryKey({
81884
+ const baseFactoryKeyParams = {
81885
81885
  apiGroup: void 0,
81886
81886
  apiVersion: "v1",
81887
- resource: "configmaps",
81888
81887
  namespace: linkableNamespace,
81889
81888
  baseFactoriesMapping,
81890
81889
  baseFactoryNamespacedAPIKey,
81891
81890
  baseFactoryClusterSceopedAPIKey,
81892
81891
  baseFactoryNamespacedBuiltinKey,
81893
81892
  baseFactoryClusterSceopedBuiltinKey
81894
- }) : void 0;
81895
- const secretFactoryKey = hasLinkableVolumeTypes && !isNavigationLoading && !isNavigationError ? getVolumeFactoryKey({
81896
- apiGroup: void 0,
81897
- apiVersion: "v1",
81898
- resource: "secrets",
81899
- namespace: linkableNamespace,
81900
- baseFactoriesMapping,
81901
- baseFactoryNamespacedAPIKey,
81902
- baseFactoryClusterSceopedAPIKey,
81903
- baseFactoryNamespacedBuiltinKey,
81904
- baseFactoryClusterSceopedBuiltinKey
81905
- }) : void 0;
81906
- const hasPendingLinkPrefixInputs = hasLinkableVolumeTypes && (isPendingLinkSegment(clusterPrepared) || isPendingLinkSegment(linkableNamespace) || isPendingLinkSegment(configMapFactoryKey) || isPendingLinkSegment(secretFactoryKey));
81893
+ };
81894
+ const canResolveLinkableKeys = hasLinkableVolumeTypes && !isNavigationLoading && !isNavigationError;
81895
+ const configMapFactoryKey = canResolveLinkableKeys ? getVolumeFactoryKey({ ...baseFactoryKeyParams, resource: "configmaps" }) : void 0;
81896
+ const secretFactoryKey = canResolveLinkableKeys ? getVolumeFactoryKey({ ...baseFactoryKeyParams, resource: "secrets" }) : void 0;
81897
+ const pvcFactoryKey = canResolveLinkableKeys ? getVolumeFactoryKey({ ...baseFactoryKeyParams, resource: "persistentvolumeclaims" }) : void 0;
81898
+ const hasPendingLinkPrefixInputs = hasLinkableVolumeTypes && (isPendingLinkSegment(clusterPrepared) || isPendingLinkSegment(linkableNamespace) || isPendingLinkSegment(configMapFactoryKey) || isPendingLinkSegment(secretFactoryKey) || isPendingLinkSegment(pvcFactoryKey));
81907
81899
  const isLinkPrefixLoading = hasLinkableVolumeTypes && !ownReqFailed && !isNavigationError && (isNavigationLoading || hasPendingLinkPrefixInputs);
81908
81900
  const resourceLinkPrefixes = React$1.useMemo(() => {
81909
81901
  if (!hasLinkableVolumeTypes || isLinkPrefixLoading) {
81910
81902
  return void 0;
81911
81903
  }
81904
+ const baseLinkPrefixParams = {
81905
+ baseprefix,
81906
+ cluster: clusterPrepared,
81907
+ namespace: linkableNamespace,
81908
+ apiGroupVersion: "v1",
81909
+ baseFactoryNamespacedAPIKey,
81910
+ baseFactoryClusterSceopedAPIKey,
81911
+ baseFactoryNamespacedBuiltinKey,
81912
+ baseFactoryClusterSceopedBuiltinKey,
81913
+ baseFactoriesMapping
81914
+ };
81912
81915
  return {
81913
- configMap: getVolumeResourceLinkPrefix({
81914
- baseprefix,
81915
- cluster: clusterPrepared,
81916
- namespace: linkableNamespace,
81917
- apiGroupVersion: "v1",
81918
- pluralName: "configmaps",
81919
- baseFactoryNamespacedAPIKey,
81920
- baseFactoryClusterSceopedAPIKey,
81921
- baseFactoryNamespacedBuiltinKey,
81922
- baseFactoryClusterSceopedBuiltinKey,
81923
- baseFactoriesMapping
81924
- }) || "",
81925
- secret: getVolumeResourceLinkPrefix({
81926
- baseprefix,
81927
- cluster: clusterPrepared,
81928
- namespace: linkableNamespace,
81929
- apiGroupVersion: "v1",
81930
- pluralName: "secrets",
81931
- baseFactoryNamespacedAPIKey,
81932
- baseFactoryClusterSceopedAPIKey,
81933
- baseFactoryNamespacedBuiltinKey,
81934
- baseFactoryClusterSceopedBuiltinKey,
81935
- baseFactoriesMapping
81936
- }) || ""
81916
+ configMap: getVolumeResourceLinkPrefix({ ...baseLinkPrefixParams, pluralName: "configmaps" }) || "",
81917
+ secret: getVolumeResourceLinkPrefix({ ...baseLinkPrefixParams, pluralName: "secrets" }) || "",
81918
+ persistentVolumeClaim: getVolumeResourceLinkPrefix({ ...baseLinkPrefixParams, pluralName: "persistentvolumeclaims" }) || ""
81937
81919
  };
81938
81920
  }, [
81939
81921
  hasLinkableVolumeTypes,
@@ -87035,6 +87017,7 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
87035
87017
  const BlackholeFormProvider = ({
87036
87018
  theme,
87037
87019
  cluster,
87020
+ partsOfUrl,
87038
87021
  urlParams,
87039
87022
  urlParamsForPermissions,
87040
87023
  data,
@@ -87051,6 +87034,7 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
87051
87034
  const [isNamespaced, setIsNamespaced] = React$1.useState(false);
87052
87035
  const [isError, setIsError] = React$1.useState(false);
87053
87036
  const hasAppliedBackendModeRef = React$1.useRef(false);
87037
+ const requestIdRef = React$1.useRef(0);
87054
87038
  const { data: overridesData, isLoading: overridesLoading } = useK8sSmartResource({
87055
87039
  cluster,
87056
87040
  apiGroup: forcingCustomization.baseApiGroup,
@@ -87112,18 +87096,25 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
87112
87096
  React$1.useEffect(() => {
87113
87097
  if (!cluster) {
87114
87098
  setIsLoading(false);
87115
- return;
87099
+ return void 0;
87116
87100
  }
87117
- if (!isResolutionReady) return;
87118
- if (customizationId && (!resolvedCustomizationId || !resolvedCustomizationIdPrefill)) return;
87101
+ if (!isResolutionReady) return void 0;
87102
+ if (customizationId && (!resolvedCustomizationId || !resolvedCustomizationIdPrefill)) return void 0;
87103
+ requestIdRef.current += 1;
87104
+ const requestId = requestIdRef.current;
87105
+ let isActive = true;
87106
+ hasAppliedBackendModeRef.current = false;
87107
+ setIsNamespaced(false);
87119
87108
  setIsLoading(true);
87120
87109
  const payload = {
87121
87110
  data,
87122
87111
  cluster,
87112
+ partsOfUrl,
87123
87113
  customizationId: resolvedCustomizationId,
87124
87114
  customizationIdPrefill: resolvedCustomizationIdPrefill
87125
87115
  };
87126
87116
  axios.post(`/api/clusters/${cluster}/openapi-bff/forms/formPrepare/prepareFormProps`, payload).then(({ data: data2 }) => {
87117
+ if (!isActive || requestId !== requestIdRef.current) return;
87127
87118
  if (data2.isNamespaced) {
87128
87119
  setIsNamespaced(true);
87129
87120
  }
@@ -87150,12 +87141,18 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
87150
87141
  setIsError(void 0);
87151
87142
  }
87152
87143
  }).catch((e) => {
87144
+ if (!isActive || requestId !== requestIdRef.current) return;
87153
87145
  setIsError(e.message);
87154
87146
  }).finally(() => {
87147
+ if (!isActive || requestId !== requestIdRef.current) return;
87155
87148
  setIsLoading(false);
87156
87149
  });
87150
+ return () => {
87151
+ isActive = false;
87152
+ };
87157
87153
  }, [
87158
87154
  cluster,
87155
+ partsOfUrl,
87159
87156
  data,
87160
87157
  customizationId,
87161
87158
  resolvedCustomizationId,