@prorobotech/openapi-k8s-toolkit 1.5.0-alpha.5 → 1.5.0-alpha.7

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 { ai as BackToDefaultIcon, aP as BlackholeForm, aO as BlackholeFormProvider, aK as ClusterListTable, af as ConfirmModal, at as ContentCard, az as CursorDefaultDiv, ax as CursorPointerTag, ay as CursorPointerTagMinContent, aw as CustomSelect, D as DeleteIcon, l as DeleteModal, n as DeleteModalMany, ah as DownIcon, b0 as DynamicComponents, a$ as DynamicRenderer, b1 as DynamicRendererWithProviders, as as EarthIcon, h as EditIcon, aJ as EnrichedTable, E as EnrichedTableProvider, aB as ErrorBoundary, aC as ErrorBoundaryWithDataReset, a_ as Events, au as FlexGrow, an as LockedIcon, ar as LookingGlassIcon, aF as ManageableBreadcrumbs, aD as ManageableBreadcrumbsProvider, aI as ManageableSidebar, aG as ManageableSidebarProvider, aR as MarketPlace, aS as MarketplaceCard, am as MinusIcon, aV as NodeTerminal, i as PaddingContainer, ap as PauseCircleIcon, al as PlusIcon, aW as PodLogs, aX as PodLogsMonaco, aU as PodTerminal, aT as ProjectInfoCard, aA as ResourceLink, aq as ResumeCircleIcon, aZ as Search, ad as Spacer, aj as SuccessIcon, ae as TreeWithSearch, av as UncontrolledSelect, ao as UnlockedIcon, ag as UpIcon, aY as VMVNC, aN as YamlEditorSingleton, Q as checkIfApiInstanceNamespaceScoped, S as checkIfBuiltInInstanceNamespaceScoped, L as checkPermission, bx as convertBytes, bF as convertCompute, bC as convertCores, bA as convertStorage, bg as createContextFactory, q as createNewEntry, bi as deepMerge, t as deleteEntry, ak as feedbackIcons, N as filterIfApiInstanceNamespaceScoped, O as filterIfBuiltInInstanceNamespaceScoped, b4 as filterSelectOptions, b6 as floorToDecimal, by as formatBytesAuto, bD as formatCoresAuto, bH as formatDateAuto, bb as getAllPathsFromObj, z as getApiResourceSingle, G as getApiResourceTypes, H as getApiResourceTypesByApiGroup, y as getApiResources, B as getBuiltinResourceSingle, I as getBuiltinResourceTypes, A as getBuiltinResources, be as getBuiltinTreeData, o as getClusterList, J as getCrdData, F as getCrdResourceSingle, C as getCrdResources, K as getDirectUnknownResource, aL as getEnrichedColumns, aM as getEnrichedColumnsWithControls, bf as getGroupsByCategory, T as getKinds, br as getLinkToApiForm, bq as getLinkToBuiltinForm, k as getLinkToForm, bw as getNamespaceLink, aQ as getObjectFormItemsDraft, bc as getPrefixSubarrays, bv as getResourceLink, bj as getSortedKinds, bk as getSortedKindsAll, b5 as getStringByName, M as getSwagger, bm as getUppercase, bd as groupsToTreeData, bl as hslFromString, bu as includesArray, b3 as isFlatObject, bt as isMultilineFromYaml, bs as isMultilineString, bI as isValidRFC3339, bn as kindByGvr, bp as namespacedByGvr, ba as normalizeValuesForQuotasToNumber, bG as parseCoresWithUnit, b7 as parseQuotaValue, b8 as parseQuotaValueCpu, b9 as parseQuotaValueMemoryAndStorage, bB as parseValueWithUnit, x as patchEntryWithDeleteOp, w as patchEntryWithMergePatch, v as patchEntryWithReplaceOp, bo as pluralByKind, aE as prepareDataForManageableBreadcrumbs, aH as prepareDataForManageableSidebar, b2 as prepareTemplate, bh as prepareUrlsToFetchForDynamicRenderer, bz as toBytes, bE as toCores, r as updateEntry, W as useApiResourceSingle, a1 as useApiResourceTypesByGroup, V as useApiResources, a0 as useApisResourceTypes, Y as useBuiltinResourceSingle, a2 as useBuiltinResourceTypes, X as useBuiltinResources, U as useClusterList, a3 as useCrdData, $ as useCrdResourceSingle, Z as useCrdResources, e as useDirectUnknownResource, a5 as useInfiniteSentinel, f as useK8sSmartResource, a6 as useK8sVerbs, aa as useKinds, ab as useKindsRaw, a4 as useListWatch, a7 as useManyK8sSmartResource, d as usePermissions, ac as usePluginManifest, a9 as useResourceScope, a8 as useSmartResourceParams } from './index-gq5MnduZ.mjs';
1
+ export { ai as BackToDefaultIcon, aP as BlackholeForm, aO as BlackholeFormProvider, aK as ClusterListTable, af as ConfirmModal, at as ContentCard, az as CursorDefaultDiv, ax as CursorPointerTag, ay as CursorPointerTagMinContent, aw as CustomSelect, D as DeleteIcon, l as DeleteModal, n as DeleteModalMany, ah as DownIcon, b0 as DynamicComponents, a$ as DynamicRenderer, b1 as DynamicRendererWithProviders, as as EarthIcon, h as EditIcon, aJ as EnrichedTable, E as EnrichedTableProvider, aB as ErrorBoundary, aC as ErrorBoundaryWithDataReset, a_ as Events, au as FlexGrow, an as LockedIcon, ar as LookingGlassIcon, aF as ManageableBreadcrumbs, aD as ManageableBreadcrumbsProvider, aI as ManageableSidebar, aG as ManageableSidebarProvider, aR as MarketPlace, aS as MarketplaceCard, am as MinusIcon, aV as NodeTerminal, i as PaddingContainer, ap as PauseCircleIcon, al as PlusIcon, aW as PodLogs, aX as PodLogsMonaco, aU as PodTerminal, aT as ProjectInfoCard, aA as ResourceLink, aq as ResumeCircleIcon, aZ as Search, ad as Spacer, aj as SuccessIcon, ae as TreeWithSearch, av as UncontrolledSelect, ao as UnlockedIcon, ag as UpIcon, aY as VMVNC, aN as YamlEditorSingleton, Q as checkIfApiInstanceNamespaceScoped, S as checkIfBuiltInInstanceNamespaceScoped, L as checkPermission, bx as convertBytes, bF as convertCompute, bC as convertCores, bA as convertStorage, bg as createContextFactory, q as createNewEntry, bi as deepMerge, t as deleteEntry, ak as feedbackIcons, N as filterIfApiInstanceNamespaceScoped, O as filterIfBuiltInInstanceNamespaceScoped, b4 as filterSelectOptions, b6 as floorToDecimal, by as formatBytesAuto, bD as formatCoresAuto, bH as formatDateAuto, bb as getAllPathsFromObj, z as getApiResourceSingle, G as getApiResourceTypes, H as getApiResourceTypesByApiGroup, y as getApiResources, B as getBuiltinResourceSingle, I as getBuiltinResourceTypes, A as getBuiltinResources, be as getBuiltinTreeData, o as getClusterList, J as getCrdData, F as getCrdResourceSingle, C as getCrdResources, K as getDirectUnknownResource, aL as getEnrichedColumns, aM as getEnrichedColumnsWithControls, bf as getGroupsByCategory, T as getKinds, br as getLinkToApiForm, bq as getLinkToBuiltinForm, k as getLinkToForm, bw as getNamespaceLink, aQ as getObjectFormItemsDraft, bc as getPrefixSubarrays, bv as getResourceLink, bj as getSortedKinds, bk as getSortedKindsAll, b5 as getStringByName, M as getSwagger, bm as getUppercase, bd as groupsToTreeData, bl as hslFromString, bu as includesArray, b3 as isFlatObject, bt as isMultilineFromYaml, bs as isMultilineString, bI as isValidRFC3339, bn as kindByGvr, bp as namespacedByGvr, ba as normalizeValuesForQuotasToNumber, bG as parseCoresWithUnit, b7 as parseQuotaValue, b8 as parseQuotaValueCpu, b9 as parseQuotaValueMemoryAndStorage, bB as parseValueWithUnit, x as patchEntryWithDeleteOp, w as patchEntryWithMergePatch, v as patchEntryWithReplaceOp, bo as pluralByKind, aE as prepareDataForManageableBreadcrumbs, aH as prepareDataForManageableSidebar, b2 as prepareTemplate, bh as prepareUrlsToFetchForDynamicRenderer, bz as toBytes, bE as toCores, r as updateEntry, W as useApiResourceSingle, a1 as useApiResourceTypesByGroup, V as useApiResources, a0 as useApisResourceTypes, Y as useBuiltinResourceSingle, a2 as useBuiltinResourceTypes, X as useBuiltinResources, U as useClusterList, a3 as useCrdData, $ as useCrdResourceSingle, Z as useCrdResources, e as useDirectUnknownResource, a5 as useInfiniteSentinel, f as useK8sSmartResource, a6 as useK8sVerbs, aa as useKinds, ab as useKindsRaw, a4 as useListWatch, a7 as useManyK8sSmartResource, d as usePermissions, ac as usePluginManifest, a9 as useResourceScope, a8 as useSmartResourceParams } from './index-DxI19K37.mjs';
2
2
  //# sourceMappingURL=openapi-k8s-toolkit.es.js.map
@@ -34587,6 +34587,18 @@
34587
34587
  && .ant-table-expanded-row-fixed {
34588
34588
  width: auto !important;
34589
34589
  }
34590
+
34591
+ /* Virtual tables keep rc-virtual-list's own scrollbar; the custom synced scrollbar is disabled for them. */
34592
+ && .ant-table:not(.ant-table-virtual) .ant-table-content,
34593
+ && .ant-table:not(.ant-table-virtual) .ant-table-body {
34594
+ scrollbar-width: none;
34595
+ }
34596
+
34597
+ && .ant-table:not(.ant-table-virtual) .ant-table-content::-webkit-scrollbar,
34598
+ && .ant-table:not(.ant-table-virtual) .ant-table-body::-webkit-scrollbar {
34599
+ height: 0;
34600
+ width: 0;
34601
+ }
34590
34602
  `;
34591
34603
  const HideableControls = styled.div`
34592
34604
  && .ant-table-row .hideable {
@@ -34656,6 +34668,196 @@
34656
34668
  return /* @__PURE__ */ jsxRuntimeExports.jsx(antd.Flex, { wrap: "nowrap", gap: "4px", children: renderTableTags(tags) });
34657
34669
  };
34658
34670
 
34671
+ const SCROLLABLE_TABLE_SELECTOR = ".ant-table-body, .ant-table-content";
34672
+ const EMPTY_SCROLLBAR_METRICS = {
34673
+ clientWidth: 0,
34674
+ scrollWidth: 0,
34675
+ visible: false
34676
+ };
34677
+ const HorizontalScrollbar = styled.div`
34678
+ position: sticky;
34679
+ bottom: var(--enriched-table-scrollbar-bottom-offset, 0px);
34680
+ z-index: 1056;
34681
+ height: 14px;
34682
+ overflow-x: auto;
34683
+ overflow-y: hidden;
34684
+ background: transparent;
34685
+ scrollbar-width: thin;
34686
+ scrollbar-color: rgba(0, 0, 0, 0.35) transparent;
34687
+
34688
+ &::-webkit-scrollbar {
34689
+ height: 12px;
34690
+ }
34691
+
34692
+ &::-webkit-scrollbar-track {
34693
+ background: transparent;
34694
+ }
34695
+
34696
+ &::-webkit-scrollbar-thumb {
34697
+ background-color: rgba(0, 0, 0, 0.35);
34698
+ background-clip: content-box;
34699
+ border: 3px solid transparent;
34700
+ border-radius: 999px;
34701
+ }
34702
+ `;
34703
+ const HorizontalScrollbarInner = styled.div`
34704
+ height: 1px;
34705
+ `;
34706
+ const SyncedHorizontalScrollbar = ({
34707
+ tableContainerRef,
34708
+ disabled = false
34709
+ }) => {
34710
+ const scrollbarRef = React$1.useRef(null);
34711
+ const tableScrollerRef = React$1.useRef(null);
34712
+ const isSyncingRef = React$1.useRef(false);
34713
+ const refreshRafRef = React$1.useRef(null);
34714
+ const [metrics, setMetrics] = React$1.useState(EMPTY_SCROLLBAR_METRICS);
34715
+ const [scrollerBinding, setScrollerBinding] = React$1.useState({
34716
+ scroller: null,
34717
+ content: null
34718
+ });
34719
+ const releaseSyncLock = React$1.useCallback(() => {
34720
+ if (typeof window.requestAnimationFrame !== "function") {
34721
+ isSyncingRef.current = false;
34722
+ return;
34723
+ }
34724
+ window.requestAnimationFrame(() => {
34725
+ isSyncingRef.current = false;
34726
+ });
34727
+ }, []);
34728
+ const bindTableScroller = React$1.useCallback((tableScroller) => {
34729
+ const tableScrollerContent = tableScroller?.firstElementChild || null;
34730
+ tableScrollerRef.current = tableScroller;
34731
+ setScrollerBinding(
34732
+ (currentBinding) => currentBinding.scroller === tableScroller && currentBinding.content === tableScrollerContent ? currentBinding : {
34733
+ scroller: tableScroller,
34734
+ content: tableScrollerContent
34735
+ }
34736
+ );
34737
+ }, []);
34738
+ const findTableScroller = React$1.useCallback(
34739
+ () => disabled ? null : tableContainerRef.current?.querySelector(SCROLLABLE_TABLE_SELECTOR) || null,
34740
+ [disabled, tableContainerRef]
34741
+ );
34742
+ const updateMetrics = React$1.useCallback((tableScroller) => {
34743
+ tableScrollerRef.current = tableScroller;
34744
+ if (!tableScroller) {
34745
+ setMetrics((currentMetrics) => currentMetrics.visible ? EMPTY_SCROLLBAR_METRICS : currentMetrics);
34746
+ return;
34747
+ }
34748
+ const nextMetrics = {
34749
+ clientWidth: tableScroller.clientWidth,
34750
+ scrollWidth: tableScroller.scrollWidth,
34751
+ visible: tableScroller.scrollWidth > tableScroller.clientWidth + 1
34752
+ };
34753
+ setMetrics(
34754
+ (currentMetrics) => currentMetrics.clientWidth === nextMetrics.clientWidth && currentMetrics.scrollWidth === nextMetrics.scrollWidth && currentMetrics.visible === nextMetrics.visible ? currentMetrics : nextMetrics
34755
+ );
34756
+ if (scrollbarRef.current && scrollbarRef.current.scrollLeft !== tableScroller.scrollLeft) {
34757
+ scrollbarRef.current.scrollLeft = tableScroller.scrollLeft;
34758
+ }
34759
+ }, []);
34760
+ const refreshTableScroller = React$1.useCallback(() => {
34761
+ const tableScroller = findTableScroller();
34762
+ bindTableScroller(tableScroller);
34763
+ updateMetrics(tableScroller);
34764
+ }, [bindTableScroller, findTableScroller, updateMetrics]);
34765
+ const cancelScheduledRefresh = React$1.useCallback(() => {
34766
+ if (refreshRafRef.current === null || typeof window.cancelAnimationFrame !== "function") {
34767
+ return;
34768
+ }
34769
+ window.cancelAnimationFrame(refreshRafRef.current);
34770
+ refreshRafRef.current = null;
34771
+ }, []);
34772
+ const scheduleRefreshTableScroller = React$1.useCallback(() => {
34773
+ if (typeof window.requestAnimationFrame !== "function") {
34774
+ refreshTableScroller();
34775
+ return;
34776
+ }
34777
+ if (refreshRafRef.current !== null) {
34778
+ return;
34779
+ }
34780
+ refreshRafRef.current = window.requestAnimationFrame(() => {
34781
+ refreshRafRef.current = null;
34782
+ refreshTableScroller();
34783
+ });
34784
+ }, [refreshTableScroller]);
34785
+ React$1.useLayoutEffect(() => {
34786
+ refreshTableScroller();
34787
+ }, [refreshTableScroller]);
34788
+ React$1.useEffect(() => {
34789
+ refreshTableScroller();
34790
+ }, [refreshTableScroller]);
34791
+ React$1.useEffect(() => {
34792
+ if (disabled || !tableContainerRef.current || typeof MutationObserver !== "function") {
34793
+ return void 0;
34794
+ }
34795
+ const mutationObserver = new MutationObserver(scheduleRefreshTableScroller);
34796
+ mutationObserver.observe(tableContainerRef.current, {
34797
+ childList: true,
34798
+ subtree: true
34799
+ });
34800
+ return () => {
34801
+ cancelScheduledRefresh();
34802
+ mutationObserver.disconnect();
34803
+ };
34804
+ }, [cancelScheduledRefresh, disabled, scheduleRefreshTableScroller, tableContainerRef]);
34805
+ React$1.useEffect(() => cancelScheduledRefresh, [cancelScheduledRefresh]);
34806
+ React$1.useEffect(() => {
34807
+ const { scroller: tableScroller, content: tableScrollerContent } = scrollerBinding;
34808
+ if (disabled) {
34809
+ updateMetrics(null);
34810
+ return void 0;
34811
+ }
34812
+ if (!tableScroller) {
34813
+ return void 0;
34814
+ }
34815
+ const syncFromTable = () => {
34816
+ if (isSyncingRef.current || !scrollbarRef.current) {
34817
+ return;
34818
+ }
34819
+ isSyncingRef.current = true;
34820
+ scrollbarRef.current.scrollLeft = tableScroller.scrollLeft;
34821
+ releaseSyncLock();
34822
+ };
34823
+ tableScroller.addEventListener("scroll", syncFromTable, { passive: true });
34824
+ window.addEventListener("resize", scheduleRefreshTableScroller);
34825
+ const resizeObserver = typeof ResizeObserver === "function" ? new ResizeObserver(() => updateMetrics(tableScroller)) : void 0;
34826
+ resizeObserver?.observe(tableScroller);
34827
+ if (tableScrollerContent) {
34828
+ resizeObserver?.observe(tableScrollerContent);
34829
+ }
34830
+ updateMetrics(tableScroller);
34831
+ return () => {
34832
+ tableScroller.removeEventListener("scroll", syncFromTable);
34833
+ window.removeEventListener("resize", scheduleRefreshTableScroller);
34834
+ resizeObserver?.disconnect();
34835
+ };
34836
+ }, [disabled, releaseSyncLock, scheduleRefreshTableScroller, scrollerBinding, updateMetrics]);
34837
+ const syncFromScrollbar = React$1.useCallback(() => {
34838
+ const tableScroller = tableScrollerRef.current;
34839
+ if (isSyncingRef.current || !tableScroller || !scrollbarRef.current) {
34840
+ return;
34841
+ }
34842
+ isSyncingRef.current = true;
34843
+ tableScroller.scrollLeft = scrollbarRef.current.scrollLeft;
34844
+ releaseSyncLock();
34845
+ }, [releaseSyncLock]);
34846
+ if (!metrics.visible) {
34847
+ return null;
34848
+ }
34849
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
34850
+ HorizontalScrollbar,
34851
+ {
34852
+ ref: scrollbarRef,
34853
+ "aria-hidden": "true",
34854
+ "data-testid": "enriched-table-horizontal-scrollbar",
34855
+ onScroll: syncFromScrollbar,
34856
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(HorizontalScrollbarInner, { style: { width: metrics.scrollWidth } })
34857
+ }
34858
+ );
34859
+ };
34860
+
34659
34861
  const isFlatObject = (obj) => {
34660
34862
  return Object.entries(obj).every(([, value]) => {
34661
34863
  return value === null || typeof value !== "object";
@@ -82289,6 +82491,73 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
82289
82491
  );
82290
82492
  };
82291
82493
 
82494
+ const DEFAULT_FIXED_NAME_COLUMN_WIDTH = 240;
82495
+ const DEFAULT_FIXED_ACTIONS_COLUMN_WIDTH = 60;
82496
+ const stringifyColumnValue = (value) => {
82497
+ if (typeof value === "string" || typeof value === "number") {
82498
+ return String(value).trim().toLowerCase();
82499
+ }
82500
+ return void 0;
82501
+ };
82502
+ const getColumnDataPath = (dataIndex) => {
82503
+ if (Array.isArray(dataIndex)) {
82504
+ return dataIndex.map(String).join(".").trim().toLowerCase();
82505
+ }
82506
+ return stringifyColumnValue(dataIndex);
82507
+ };
82508
+ const isNameColumn = (column) => {
82509
+ const key = stringifyColumnValue(column.key);
82510
+ const title = stringifyColumnValue(column.title);
82511
+ const dataPath = getColumnDataPath(column.dataIndex);
82512
+ return key === "name" || title === "name" || dataPath === "name" || dataPath === "metadata.name";
82513
+ };
82514
+ const hasFactoryItemOfType = (customProps, itemType) => {
82515
+ if (typeof customProps !== "object" || customProps === null) {
82516
+ return false;
82517
+ }
82518
+ if (!("items" in customProps) || !Array.isArray(customProps.items)) {
82519
+ return false;
82520
+ }
82521
+ return customProps.items.some(
82522
+ (item) => typeof item === "object" && item !== null && "type" in item && item.type === itemType
82523
+ );
82524
+ };
82525
+ const getFixedColumnSide = ({
82526
+ shouldFixNameColumn,
82527
+ shouldFixActionsColumn,
82528
+ currentFixed
82529
+ }) => {
82530
+ if (currentFixed !== void 0) {
82531
+ return currentFixed;
82532
+ }
82533
+ if (shouldFixNameColumn) {
82534
+ return "left";
82535
+ }
82536
+ if (shouldFixActionsColumn) {
82537
+ return "right";
82538
+ }
82539
+ return void 0;
82540
+ };
82541
+ const getFixedColumnWidth = ({
82542
+ possibleColWidth,
82543
+ currentWidth,
82544
+ shouldFixNameColumn,
82545
+ shouldFixActionsColumn
82546
+ }) => {
82547
+ if (possibleColWidth !== void 0) {
82548
+ return possibleColWidth;
82549
+ }
82550
+ if (currentWidth !== void 0) {
82551
+ return currentWidth;
82552
+ }
82553
+ if (shouldFixNameColumn) {
82554
+ return DEFAULT_FIXED_NAME_COLUMN_WIDTH;
82555
+ }
82556
+ if (shouldFixActionsColumn) {
82557
+ return DEFAULT_FIXED_ACTIONS_COLUMN_WIDTH;
82558
+ }
82559
+ return void 0;
82560
+ };
82292
82561
  const getCellRender = ({
82293
82562
  value,
82294
82563
  record,
@@ -82390,6 +82659,7 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
82390
82659
  if (!columns) {
82391
82660
  return void 0;
82392
82661
  }
82662
+ let hasFixedNameColumn = false;
82393
82663
  return columns.map((el, colIndex) => {
82394
82664
  const possibleAdditionalPrinterColumnsCustomSortersAndFiltersType = additionalPrinterColumnsCustomSortersAndFilters?.find(({ key }) => key === el.key)?.type;
82395
82665
  const isSortersAndFiltersDisabled = possibleAdditionalPrinterColumnsCustomSortersAndFiltersType === "disabled";
@@ -82401,6 +82671,13 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
82401
82671
  const possibleTooltip = additionalPrinterColumnsTooltips?.find(({ key }) => key === el.key)?.value;
82402
82672
  const possibleCustomTypeWithProps = additionalPrinterColumnsKeyTypeProps && el.key ? additionalPrinterColumnsKeyTypeProps[el.key.toString()] : void 0;
82403
82673
  const originalRender = el.render;
82674
+ const columnIsNameColumn = isNameColumn(el);
82675
+ const canAutoFixColumn = el.fixed === void 0;
82676
+ const shouldFixNameColumn = canAutoFixColumn && !hasFixedNameColumn && columnIsNameColumn;
82677
+ const shouldFixActionsColumn = canAutoFixColumn && possibleCustomTypeWithProps?.type === "factory" && hasFactoryItemOfType(possibleCustomTypeWithProps.customProps, "ActionsDropdown");
82678
+ if (columnIsNameColumn && !hasFixedNameColumn) {
82679
+ hasFixedNameColumn = true;
82680
+ }
82404
82681
  const useFactorySearch = possibleCustomTypeWithProps?.type === "factory";
82405
82682
  const colKey = el.key != null && String(el.key) || (Array.isArray(el.dataIndex) ? el.dataIndex.join(".") : String(el.dataIndex ?? colIndex));
82406
82683
  const getCellTextFromRecord = (record) => {
@@ -82499,7 +82776,17 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
82499
82776
  theme
82500
82777
  });
82501
82778
  },
82502
- width: possibleColWidth,
82779
+ fixed: getFixedColumnSide({
82780
+ shouldFixNameColumn,
82781
+ shouldFixActionsColumn,
82782
+ currentFixed: el.fixed
82783
+ }),
82784
+ width: getFixedColumnWidth({
82785
+ possibleColWidth,
82786
+ currentWidth: el.width,
82787
+ shouldFixNameColumn,
82788
+ shouldFixActionsColumn
82789
+ }),
82503
82790
  // for factory search
82504
82791
  onCell: (record) => {
82505
82792
  const rowKey = getRowKey(record);
@@ -82630,6 +82917,7 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
82630
82917
  dataIndex: "internalDataForControls",
82631
82918
  key: "controls",
82632
82919
  className: "controls",
82920
+ fixed: "right",
82633
82921
  width: 60,
82634
82922
  render: (value) => {
82635
82923
  return (
@@ -82713,6 +83001,7 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
82713
83001
  tableProps
82714
83002
  }) => {
82715
83003
  const navigate = reactRouterDom.useNavigate();
83004
+ const tableContainerRef = React$1.useRef(null);
82716
83005
  if (!columns) {
82717
83006
  return null;
82718
83007
  }
@@ -82768,56 +83057,62 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
82768
83057
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
82769
83058
  TableComponents.TableContainer,
82770
83059
  {
83060
+ ref: tableContainerRef,
82771
83061
  $isDark: theme === "dark",
82772
83062
  $isCursorPointer: Boolean(pathToNavigate || rowClickable),
82773
83063
  $borderless: tableProps?.borderless,
82774
83064
  $isTotalLeft: tableProps?.isTotalLeft,
82775
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(TableComponents.HideableControls, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
82776
- antd.Table,
82777
- {
82778
- rowKey,
82779
- dataSource,
82780
- columns: columnsWithControls,
82781
- pagination: tableProps?.disablePagination ? false : {
82782
- position: tableProps?.paginationPosition || ["bottomLeft"],
82783
- showSizeChanger: true,
82784
- defaultPageSize: 10,
82785
- hideOnSinglePage: false,
82786
- showTotal
82787
- },
82788
- scroll: { x: "max-content", y: tableProps?.maxHeight },
82789
- virtual: tableProps?.virtual,
82790
- rowClassName,
82791
- rowSelection: selectData ? {
82792
- type: "checkbox",
82793
- columnWidth: 48,
82794
- selectedRowKeys: selectData.selectedRowKeys,
82795
- onChange: (selectedRowKeys, selectedRows) => {
82796
- const rows = selectedRows;
82797
- selectData.onChange(
82798
- selectedRowKeys,
82799
- rows.map(({ internalDataForControls }) => ({
82800
- name: internalDataForControls.name,
82801
- endpoint: `${internalDataForControls.deletePathPrefix}/${internalDataForControls.apiGroupAndVersion}${internalDataForControls.namespace ? `/namespaces/${internalDataForControls.namespace}` : ""}/${internalDataForControls.plural}/${internalDataForControls.name}`
82802
- }))
82803
- );
82804
- }
82805
- } : void 0,
82806
- onRow: (record) => {
82807
- const consumerRowProps = onRow?.(record, void 0);
82808
- const navigationClickHandler = buildNavigationClickHandler(record);
82809
- return {
82810
- ...consumerRowProps,
82811
- onClick: (event) => {
82812
- consumerRowProps?.onClick?.(event);
82813
- if (!event.defaultPrevented) {
82814
- navigationClickHandler();
82815
- }
83065
+ children: /* @__PURE__ */ jsxRuntimeExports.jsxs(TableComponents.HideableControls, { children: [
83066
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
83067
+ antd.Table,
83068
+ {
83069
+ rowKey,
83070
+ dataSource,
83071
+ columns: columnsWithControls,
83072
+ pagination: tableProps?.disablePagination ? false : {
83073
+ position: tableProps?.paginationPosition || ["bottomLeft"],
83074
+ showSizeChanger: true,
83075
+ defaultPageSize: 10,
83076
+ hideOnSinglePage: false,
83077
+ showTotal
83078
+ },
83079
+ scroll: { x: "max-content", y: tableProps?.maxHeight },
83080
+ virtual: tableProps?.virtual,
83081
+ rowClassName,
83082
+ rowSelection: selectData ? {
83083
+ type: "checkbox",
83084
+ // Keep selection controls aligned with the fixed Name column.
83085
+ fixed: "left",
83086
+ columnWidth: 48,
83087
+ selectedRowKeys: selectData.selectedRowKeys,
83088
+ onChange: (selectedRowKeys, selectedRows) => {
83089
+ const rows = selectedRows;
83090
+ selectData.onChange(
83091
+ selectedRowKeys,
83092
+ rows.map(({ internalDataForControls }) => ({
83093
+ name: internalDataForControls.name,
83094
+ endpoint: `${internalDataForControls.deletePathPrefix}/${internalDataForControls.apiGroupAndVersion}${internalDataForControls.namespace ? `/namespaces/${internalDataForControls.namespace}` : ""}/${internalDataForControls.plural}/${internalDataForControls.name}`
83095
+ }))
83096
+ );
82816
83097
  }
82817
- };
83098
+ } : void 0,
83099
+ onRow: (record) => {
83100
+ const consumerRowProps = onRow?.(record, void 0);
83101
+ const navigationClickHandler = buildNavigationClickHandler(record);
83102
+ return {
83103
+ ...consumerRowProps,
83104
+ onClick: (event) => {
83105
+ consumerRowProps?.onClick?.(event);
83106
+ if (!event.defaultPrevented) {
83107
+ navigationClickHandler();
83108
+ }
83109
+ }
83110
+ };
83111
+ }
82818
83112
  }
82819
- }
82820
- ) })
83113
+ ),
83114
+ /* @__PURE__ */ jsxRuntimeExports.jsx(SyncedHorizontalScrollbar, { disabled: tableProps?.virtual, tableContainerRef })
83115
+ ] })
82821
83116
  }
82822
83117
  );
82823
83118
  };
@@ -82835,6 +83130,7 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
82835
83130
  tableProps
82836
83131
  }) => {
82837
83132
  const navigate = reactRouterDom.useNavigate();
83133
+ const tableContainerRef = React$1.useRef(null);
82838
83134
  if (!columns) {
82839
83135
  return null;
82840
83136
  }
@@ -82875,54 +83171,58 @@ Take a look at the reducer(s) handling this action type: ${action.type}.
82875
83171
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
82876
83172
  TableComponents.TableContainer,
82877
83173
  {
83174
+ ref: tableContainerRef,
82878
83175
  $isDark: theme === "dark",
82879
83176
  $isCursorPointer: Boolean(
82880
83177
  recordKeysForNavigation && (!!pathToNavigate || !!navigationSettings) || rowClickable
82881
83178
  ),
82882
83179
  $borderless: tableProps?.borderless,
82883
83180
  $isTotalLeft: tableProps?.isTotalLeft,
82884
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(TableComponents.HideableControls, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
82885
- antd.Table,
82886
- {
82887
- rowKey,
82888
- dataSource,
82889
- columns: enrichedColumns,
82890
- pagination: tableProps?.disablePagination ? false : {
82891
- position: tableProps?.paginationPosition || ["bottomLeft"],
82892
- showSizeChanger: true,
82893
- defaultPageSize: 10,
82894
- hideOnSinglePage: false,
82895
- showTotal
82896
- },
82897
- scroll: { x: "max-content", y: tableProps?.maxHeight },
82898
- virtual: tableProps?.virtual,
82899
- rowClassName,
82900
- onRow: (record) => {
82901
- const consumerRowProps = onRow?.(record, void 0);
82902
- return {
82903
- ...consumerRowProps,
82904
- onClick: async (event) => {
82905
- consumerRowProps?.onClick?.(event);
82906
- if (event.defaultPrevented) {
82907
- return;
82908
- }
82909
- if (recordKeysForNavigation) {
82910
- const recordValueRaw = Array.isArray(recordKeysForNavigation) ? lodashExports.get(record, recordKeysForNavigation) : jp.query(record || {}, `$${recordKeysForNavigation}`)[0];
82911
- const clusterName = typeof recordValueRaw === "string" ? recordValueRaw : void 0;
82912
- const recordValue = typeof recordValueRaw === "string" ? recordValueRaw : JSON.stringify(recordValueRaw);
82913
- const fetchedPathToNavigate = await tryGetPathFromNavigationResource(clusterName);
82914
- const finalPathToNavigate = fetchedPathToNavigate || pathToNavigate;
82915
- if (!finalPathToNavigate) {
83181
+ children: /* @__PURE__ */ jsxRuntimeExports.jsxs(TableComponents.HideableControls, { children: [
83182
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
83183
+ antd.Table,
83184
+ {
83185
+ rowKey,
83186
+ dataSource,
83187
+ columns: enrichedColumns,
83188
+ pagination: tableProps?.disablePagination ? false : {
83189
+ position: tableProps?.paginationPosition || ["bottomLeft"],
83190
+ showSizeChanger: true,
83191
+ defaultPageSize: 10,
83192
+ hideOnSinglePage: false,
83193
+ showTotal
83194
+ },
83195
+ scroll: { x: "max-content", y: tableProps?.maxHeight },
83196
+ virtual: tableProps?.virtual,
83197
+ rowClassName,
83198
+ onRow: (record) => {
83199
+ const consumerRowProps = onRow?.(record, void 0);
83200
+ return {
83201
+ ...consumerRowProps,
83202
+ onClick: async (event) => {
83203
+ consumerRowProps?.onClick?.(event);
83204
+ if (event.defaultPrevented) {
82916
83205
  return;
82917
83206
  }
82918
- const newPath = finalPathToNavigate.replaceAll("~recordValue~", recordValue);
82919
- navigate(newPath);
83207
+ if (recordKeysForNavigation) {
83208
+ const recordValueRaw = Array.isArray(recordKeysForNavigation) ? lodashExports.get(record, recordKeysForNavigation) : jp.query(record || {}, `$${recordKeysForNavigation}`)[0];
83209
+ const clusterName = typeof recordValueRaw === "string" ? recordValueRaw : void 0;
83210
+ const recordValue = typeof recordValueRaw === "string" ? recordValueRaw : JSON.stringify(recordValueRaw);
83211
+ const fetchedPathToNavigate = await tryGetPathFromNavigationResource(clusterName);
83212
+ const finalPathToNavigate = fetchedPathToNavigate || pathToNavigate;
83213
+ if (!finalPathToNavigate) {
83214
+ return;
83215
+ }
83216
+ const newPath = finalPathToNavigate.replaceAll("~recordValue~", recordValue);
83217
+ navigate(newPath);
83218
+ }
82920
83219
  }
82921
- }
82922
- };
83220
+ };
83221
+ }
82923
83222
  }
82924
- }
82925
- ) })
83223
+ ),
83224
+ /* @__PURE__ */ jsxRuntimeExports.jsx(SyncedHorizontalScrollbar, { disabled: tableProps?.virtual, tableContainerRef })
83225
+ ] })
82926
83226
  }
82927
83227
  );
82928
83228
  };