@prorobotech/openapi-k8s-toolkit 1.2.0-alpha.16 → 1.2.0-alpha.17

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.
@@ -35096,6 +35096,7 @@ const EnrichedTable$1 = ({
35096
35096
  k8sResource,
35097
35097
  dataForControls,
35098
35098
  baseprefix,
35099
+ pathToKey,
35099
35100
  ...props
35100
35101
  } = data;
35101
35102
  const theme = useTheme();
@@ -35261,6 +35262,7 @@ const EnrichedTable$1 = ({
35261
35262
  dataForControls: dataForControlsPrepared,
35262
35263
  withoutControls: !dataForControlsPrepared,
35263
35264
  baseprefix,
35265
+ pathToKey,
35264
35266
  ...props
35265
35267
  }
35266
35268
  ),
@@ -77283,6 +77285,7 @@ const EnrichedTable = ({
77283
77285
 
77284
77286
  const prepare = ({
77285
77287
  dataItems,
77288
+ pathToKey,
77286
77289
  resourceSchema,
77287
77290
  dataForControls,
77288
77291
  additionalPrinterColumns
@@ -77353,13 +77356,15 @@ const prepare = ({
77353
77356
  onDeleteHandle: dataForControls.onDeleteHandle,
77354
77357
  permissions: dataForControls.permissions
77355
77358
  };
77359
+ const key2 = pathToKey ? jp.query(el, `$${pathToKey}`)[0] : `${el.metadata.name}${el.metadata.namespace ? `-${el.metadata.namespace}` : ""}`;
77356
77360
  return {
77357
- key: `${el.metadata.name}${el.metadata.namespace ? `-${el.metadata.namespace}` : ""}`,
77361
+ key: key2,
77358
77362
  ...el,
77359
77363
  internalDataForControls
77360
77364
  };
77361
77365
  }
77362
- return { key: JSON.stringify(el), ...el };
77366
+ const key = pathToKey ? jp.query(el, `$${pathToKey}`)[0] : JSON.stringify(el);
77367
+ return { key, ...el };
77363
77368
  }
77364
77369
  return {};
77365
77370
  });
@@ -77436,13 +77441,15 @@ const prepare = ({
77436
77441
  onDeleteHandle: dataForControls.onDeleteHandle,
77437
77442
  permissions: dataForControls.permissions
77438
77443
  };
77444
+ const key2 = pathToKey ? jp.query(el, `$${pathToKey}`)[0] : `${el.metadata.name}${el.metadata.namespace ? `-${el.metadata.namespace}` : ""}`;
77439
77445
  return {
77440
- key: `${el.metadata.name}${el.metadata.namespace ? `-${el.metadata.namespace}` : ""}`,
77446
+ key: key2,
77441
77447
  ...el.spec,
77442
77448
  internalDataForControls
77443
77449
  };
77444
77450
  }
77445
- return { key: JSON.stringify(el.spec), ...el.spec };
77451
+ const key = pathToKey ? jp.query(el, `$${pathToKey}`)[0] : JSON.stringify(el.spec);
77452
+ return { key, ...el.spec };
77446
77453
  }
77447
77454
  return {};
77448
77455
  });
@@ -77467,7 +77474,8 @@ const EnrichedTableProvider = ({
77467
77474
  forceDefaultAdditionalPrinterColumns,
77468
77475
  selectData,
77469
77476
  tableProps,
77470
- withoutControls
77477
+ withoutControls,
77478
+ pathToKey
77471
77479
  }) => {
77472
77480
  const location = useLocation();
77473
77481
  const [preparedProps, setPreparedProps] = useState();
@@ -77530,6 +77538,7 @@ const EnrichedTableProvider = ({
77530
77538
  const fullPath = `${location.pathname}${location.search}`;
77531
77539
  const { dataSource, columns } = prepare({
77532
77540
  dataItems,
77541
+ pathToKey,
77533
77542
  resourceSchema,
77534
77543
  dataForControls: dataForControls ? {
77535
77544
  ...dataForControls,