@prorobotech/openapi-k8s-toolkit 0.0.1-alpha.51 → 0.0.1-alpha.53
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 +156 -159
- package/dist/openapi-k8s-toolkit.es.js.map +1 -1
- package/dist/openapi-k8s-toolkit.umd.js +153 -163
- package/dist/openapi-k8s-toolkit.umd.js.map +1 -1
- package/dist/types/components/molecules/BlackholeForm/organisms/BlackholeForm/styled.d.ts +272 -0
- package/dist/types/components/molecules/EnrichedTable/index.d.ts +1 -3
- package/dist/types/components/molecules/EnrichedTable/{EnrichedTable.d.ts → organisms/EnrichedTable/EnrichedTable.d.ts} +2 -1
- package/dist/types/components/molecules/EnrichedTable/{atoms → organisms/EnrichedTable/atoms}/TinyButton/TinyButton.d.ts +3 -1
- package/dist/types/components/molecules/EnrichedTable/organisms/EnrichedTable/index.d.ts +3 -0
- package/dist/types/components/molecules/EnrichedTable/{utils.d.ts → organisms/EnrichedTable/utils.d.ts} +1 -1
- package/dist/types/components/molecules/{EnrichedTableProvider → EnrichedTable/organisms/EnrichedTableProvider}/EnrichedTableProvider.d.ts +7 -8
- package/dist/types/components/molecules/{EnrichedTableProvider → EnrichedTable/organisms/EnrichedTableProvider}/index.d.ts +0 -1
- package/dist/types/components/molecules/{EnrichedTableProvider → EnrichedTable/organisms/EnrichedTableProvider}/utils.d.ts +3 -3
- package/dist/types/components/molecules/EnrichedTable/organisms/index.d.ts +2 -0
- package/dist/types/components/molecules/ManageableBreadcrumbs/molecules/CollapsibleBreadcrumb/CollapsibleBreadcrumb.d.ts +7 -0
- package/dist/types/components/molecules/ManageableBreadcrumbs/molecules/CollapsibleBreadcrumb/index.d.ts +1 -0
- package/dist/types/components/molecules/ManageableBreadcrumbs/molecules/CollapsibleBreadcrumb/styled.d.ts +820 -0
- package/dist/types/components/molecules/ManageableBreadcrumbs/molecules/index.d.ts +1 -0
- package/dist/types/components/molecules/MarketPlace/atoms/AddCard/styled.d.ts +3 -16
- package/dist/types/components/molecules/MarketPlace/molecules/MarketplaceCard/styled.d.ts +1 -0
- package/dist/types/components/molecules/index.d.ts +0 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/localTypes/bff/table.d.ts +14 -0
- package/dist/types/localTypes/richTable.d.ts +0 -14
- package/dist/types/utils/index.d.ts +0 -2
- package/package.json +3 -3
- package/dist/types/utils/parseColumnsOverrides/guards.d.ts +0 -21
- package/dist/types/utils/parseColumnsOverrides/index.d.ts +0 -2
- package/dist/types/utils/parseColumnsOverrides/parseColumnsOverrides.d.ts +0 -22
- package/dist/types/utils/prepareTableMappings/index.d.ts +0 -1
- package/dist/types/utils/prepareTableMappings/prepareTableMappings.d.ts +0 -20
- /package/dist/types/components/molecules/EnrichedTable/{atoms → organisms/EnrichedTable/atoms}/FilterDropdown/FilterDropdown.d.ts +0 -0
- /package/dist/types/components/molecules/EnrichedTable/{atoms → organisms/EnrichedTable/atoms}/FilterDropdown/index.d.ts +0 -0
- /package/dist/types/components/molecules/EnrichedTable/{atoms → organisms/EnrichedTable/atoms}/ShortenedTextWithTooltip/ShortenedTextWithTooltip.d.ts +0 -0
- /package/dist/types/components/molecules/EnrichedTable/{atoms → organisms/EnrichedTable/atoms}/ShortenedTextWithTooltip/index.d.ts +0 -0
- /package/dist/types/components/molecules/EnrichedTable/{atoms → organisms/EnrichedTable/atoms}/ShortenedTextWithTooltip/styled.d.ts +0 -0
- /package/dist/types/components/molecules/EnrichedTable/{atoms → organisms/EnrichedTable/atoms}/TableComponents/TableComponents.d.ts +0 -0
- /package/dist/types/components/molecules/EnrichedTable/{atoms → organisms/EnrichedTable/atoms}/TableComponents/index.d.ts +0 -0
- /package/dist/types/components/molecules/EnrichedTable/{atoms → organisms/EnrichedTable/atoms}/TextAlignContainer/TextAlignContainer.d.ts +0 -0
- /package/dist/types/components/molecules/EnrichedTable/{atoms → organisms/EnrichedTable/atoms}/TextAlignContainer/index.d.ts +0 -0
- /package/dist/types/components/molecules/EnrichedTable/{atoms → organisms/EnrichedTable/atoms}/TinyButton/index.d.ts +0 -0
- /package/dist/types/components/molecules/EnrichedTable/{atoms → organisms/EnrichedTable/atoms}/TrimmedTags/TrimmedTags.d.ts +0 -0
- /package/dist/types/components/molecules/EnrichedTable/{atoms → organisms/EnrichedTable/atoms}/TrimmedTags/index.d.ts +0 -0
- /package/dist/types/components/molecules/EnrichedTable/{atoms → organisms/EnrichedTable/atoms}/index.d.ts +0 -0
- /package/dist/types/components/molecules/EnrichedTable/{types.d.ts → organisms/EnrichedTable/types.d.ts} +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import o, { useDebugValue, createElement, useRef, useContext, useState, useEffect, useMemo, memo, useCallback, createContext, Suspense, Fragment } from 'react';
|
|
1
|
+
import o, { useDebugValue, createElement, useRef, useContext, useState, useLayoutEffect, useEffect, useMemo, memo, useCallback, createContext, Suspense, Fragment } from 'react';
|
|
2
2
|
import { Input, Tree, Modal, Alert, theme, Breadcrumb, Spin, Menu, Tooltip, Space, Button, Flex, Tag, Table, Form, Typography, Select, Row, Col, Slider, InputNumber, Switch, Card, notification, Dropdown, Tabs } from 'antd';
|
|
3
3
|
import { LoadingOutlined, ExclamationCircleFilled, CloseCircleFilled, CheckCircleFilled, SearchOutlined, CheckOutlined, CloseOutlined, EditOutlined, DeleteOutlined, CaretDownOutlined, CaretRightOutlined, BugOutlined, PlusOutlined, EllipsisOutlined } from '@ant-design/icons';
|
|
4
4
|
import { useQuery, useQueries } from '@tanstack/react-query';
|
|
5
|
-
import { Link, useNavigate, useLocation
|
|
5
|
+
import { Link, useNavigate, useLocation } from 'react-router-dom';
|
|
6
6
|
|
|
7
7
|
function getDefaultExportFromCjs$1 (x) {
|
|
8
8
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
@@ -2504,7 +2504,7 @@ const CustomTreeProvider = st.div`
|
|
|
2504
2504
|
justify-content: center;
|
|
2505
2505
|
}
|
|
2506
2506
|
`;
|
|
2507
|
-
const Styled$
|
|
2507
|
+
const Styled$f = {
|
|
2508
2508
|
CustomTreeProvider
|
|
2509
2509
|
};
|
|
2510
2510
|
|
|
@@ -2569,7 +2569,7 @@ const TreeWithSearch = ({ treeData, onSelect }) => {
|
|
|
2569
2569
|
});
|
|
2570
2570
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
2571
2571
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Search, { style: { marginBottom: 8 }, placeholder: "Search", onChange }),
|
|
2572
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
2572
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$f.CustomTreeProvider, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
2573
2573
|
Tree,
|
|
2574
2574
|
{
|
|
2575
2575
|
treeData: loop(treeData),
|
|
@@ -8399,14 +8399,14 @@ const ContentContainer = st.div`
|
|
|
8399
8399
|
display: ${({ $displayFlex }) => $displayFlex ? "flex" : "block"};
|
|
8400
8400
|
flex-flow: ${({ $flexFlow }) => $flexFlow};
|
|
8401
8401
|
`;
|
|
8402
|
-
const Styled$
|
|
8402
|
+
const Styled$e = {
|
|
8403
8403
|
ContentContainer
|
|
8404
8404
|
};
|
|
8405
8405
|
|
|
8406
8406
|
const ContentCard$1 = ({ children, flexGrow, displayFlex, flexFlow }) => {
|
|
8407
8407
|
const { token } = theme.useToken();
|
|
8408
8408
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
8409
|
-
Styled$
|
|
8409
|
+
Styled$e.ContentContainer,
|
|
8410
8410
|
{
|
|
8411
8411
|
$flexGrow: flexGrow,
|
|
8412
8412
|
$bgColor: token.colorBgContainer,
|
|
@@ -8496,6 +8496,80 @@ const prepareDataForManageableBreadcrumbs = ({
|
|
|
8496
8496
|
return result;
|
|
8497
8497
|
};
|
|
8498
8498
|
|
|
8499
|
+
const PositionRelativeContainer = st.div`
|
|
8500
|
+
position: relative;
|
|
8501
|
+
`;
|
|
8502
|
+
const FullWidthContainer = st.div`
|
|
8503
|
+
width: 100%;
|
|
8504
|
+
|
|
8505
|
+
.ant-dropdown-trigger svg {
|
|
8506
|
+
display: none;
|
|
8507
|
+
}
|
|
8508
|
+
`;
|
|
8509
|
+
const NoWrapContainer = st.div`
|
|
8510
|
+
position: absolute;
|
|
8511
|
+
visibility: hidden;
|
|
8512
|
+
pointer-events: none;
|
|
8513
|
+
|
|
8514
|
+
/* stylelint-disable declaration-no-important */
|
|
8515
|
+
|
|
8516
|
+
* {
|
|
8517
|
+
white-space: nowrap !important;
|
|
8518
|
+
}
|
|
8519
|
+
|
|
8520
|
+
ol {
|
|
8521
|
+
flex-wrap: nowrap !important;
|
|
8522
|
+
}
|
|
8523
|
+
`;
|
|
8524
|
+
const Styled$d = {
|
|
8525
|
+
PositionRelativeContainer,
|
|
8526
|
+
FullWidthContainer,
|
|
8527
|
+
NoWrapContainer
|
|
8528
|
+
};
|
|
8529
|
+
|
|
8530
|
+
const CollapsibleBreadcrumb = ({ items }) => {
|
|
8531
|
+
const [isCollapsed, setIsCollapsed] = useState(false);
|
|
8532
|
+
const containerRef = useRef(null);
|
|
8533
|
+
const breadcrumbRef = useRef(null);
|
|
8534
|
+
useLayoutEffect(() => {
|
|
8535
|
+
const checkWidth = () => {
|
|
8536
|
+
if (containerRef.current && breadcrumbRef.current) {
|
|
8537
|
+
const containerWidth = containerRef.current.clientWidth;
|
|
8538
|
+
const breadcrumbWidth = breadcrumbRef.current.scrollWidth;
|
|
8539
|
+
setIsCollapsed(breadcrumbWidth > containerWidth);
|
|
8540
|
+
}
|
|
8541
|
+
};
|
|
8542
|
+
checkWidth();
|
|
8543
|
+
window.addEventListener("resize", checkWidth);
|
|
8544
|
+
return () => window.removeEventListener("resize", checkWidth);
|
|
8545
|
+
}, [items]);
|
|
8546
|
+
const renderItems = () => {
|
|
8547
|
+
if (!isCollapsed) {
|
|
8548
|
+
return items;
|
|
8549
|
+
}
|
|
8550
|
+
if (items.length <= 2) {
|
|
8551
|
+
return items;
|
|
8552
|
+
}
|
|
8553
|
+
const firstItem = items[0];
|
|
8554
|
+
const lastItem = items[items.length - 1];
|
|
8555
|
+
const hiddenItems = items.slice(1, -1);
|
|
8556
|
+
const menuItems = hiddenItems.map((item, index) => ({
|
|
8557
|
+
key: String(index),
|
|
8558
|
+
label: item.href ? /* @__PURE__ */ jsxRuntimeExports.jsx("a", { href: item.href, children: item.title }) : item.title
|
|
8559
|
+
}));
|
|
8560
|
+
const ellipsisItem = {
|
|
8561
|
+
title: "...",
|
|
8562
|
+
menu: { items: menuItems },
|
|
8563
|
+
dropdownProps: { arrow: false }
|
|
8564
|
+
};
|
|
8565
|
+
return [firstItem, ellipsisItem, lastItem];
|
|
8566
|
+
};
|
|
8567
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(Styled$d.PositionRelativeContainer, { children: [
|
|
8568
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$d.FullWidthContainer, { ref: containerRef, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Breadcrumb, { separator: ">", items: renderItems() }) }),
|
|
8569
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Styled$d.NoWrapContainer, { ref: breadcrumbRef, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Breadcrumb, { separator: ">", items, style: { display: "flex", flexWrap: "nowrap" } }) })
|
|
8570
|
+
] });
|
|
8571
|
+
};
|
|
8572
|
+
|
|
8499
8573
|
const HeightDiv = st.div`
|
|
8500
8574
|
min-height: 22px;
|
|
8501
8575
|
width: 100%;
|
|
@@ -8505,7 +8579,7 @@ const Styled$c = {
|
|
|
8505
8579
|
};
|
|
8506
8580
|
|
|
8507
8581
|
const ManageableBreadcrumbs = ({ data }) => {
|
|
8508
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$c.HeightDiv, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
8582
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$c.HeightDiv, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(CollapsibleBreadcrumb, { items: data.breadcrumbItems }) });
|
|
8509
8583
|
};
|
|
8510
8584
|
const ManageableBreadcrumbsWithDataProvider = ({
|
|
8511
8585
|
uri,
|
|
@@ -26304,7 +26378,8 @@ const EnrichedTable = ({
|
|
|
26304
26378
|
additionalPrinterColumnsColWidths,
|
|
26305
26379
|
selectData,
|
|
26306
26380
|
withoutControls = false,
|
|
26307
|
-
tableProps
|
|
26381
|
+
tableProps,
|
|
26382
|
+
maxHeight
|
|
26308
26383
|
}) => {
|
|
26309
26384
|
const navigate = useNavigate();
|
|
26310
26385
|
if (!columns) {
|
|
@@ -26342,22 +26417,25 @@ const EnrichedTable = ({
|
|
|
26342
26417
|
{
|
|
26343
26418
|
dataSource,
|
|
26344
26419
|
columns: columnsWithControls,
|
|
26345
|
-
pagination: {
|
|
26420
|
+
pagination: maxHeight ? false : {
|
|
26346
26421
|
position: tableProps?.paginationPosition || ["bottomLeft"],
|
|
26347
26422
|
showSizeChanger: true,
|
|
26348
26423
|
defaultPageSize: 10,
|
|
26349
26424
|
hideOnSinglePage: false,
|
|
26350
26425
|
showTotal
|
|
26351
26426
|
},
|
|
26352
|
-
scroll: { x: "max-content" },
|
|
26427
|
+
scroll: { x: maxHeight ? void 0 : "max-content", y: maxHeight },
|
|
26428
|
+
virtual: !!maxHeight,
|
|
26353
26429
|
rowSelection: selectData ? {
|
|
26354
26430
|
type: "checkbox",
|
|
26431
|
+
columnWidth: 48,
|
|
26355
26432
|
selectedRowKeys: selectData.selectedRowKeys,
|
|
26356
26433
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
26357
26434
|
onChange: (selectedRowKeys, selectedRows) => {
|
|
26435
|
+
const rows = selectedRows;
|
|
26358
26436
|
selectData.onChange(
|
|
26359
26437
|
selectedRowKeys,
|
|
26360
|
-
|
|
26438
|
+
rows.map(({ internalDataForControls }) => ({
|
|
26361
26439
|
name: internalDataForControls.entryName,
|
|
26362
26440
|
endpoint: `${internalDataForControls.deletePathPrefix}/${internalDataForControls.apiGroupAndVersion}${internalDataForControls.namespace ? `/namespaces/${internalDataForControls.namespace}` : ""}/${internalDataForControls.typeName}/${internalDataForControls.entryName}`
|
|
26363
26441
|
}))
|
|
@@ -33192,7 +33270,7 @@ var jsonpath = {exports: {}};
|
|
|
33192
33270
|
var jsonpathExports = jsonpath.exports;
|
|
33193
33271
|
const jp = /*@__PURE__*/getDefaultExportFromCjs(jsonpathExports);
|
|
33194
33272
|
|
|
33195
|
-
const
|
|
33273
|
+
const prepare = ({
|
|
33196
33274
|
dataItems,
|
|
33197
33275
|
resourceSchema,
|
|
33198
33276
|
dataForControls,
|
|
@@ -33223,7 +33301,7 @@ const prepareDataForEnrichedColumns = ({
|
|
|
33223
33301
|
}))
|
|
33224
33302
|
];
|
|
33225
33303
|
}
|
|
33226
|
-
let dataSource;
|
|
33304
|
+
let dataSource = [];
|
|
33227
33305
|
if (additionalPrinterColumns) {
|
|
33228
33306
|
dataSource = dataItems.map((el) => {
|
|
33229
33307
|
if (typeof el === "object" && el !== null) {
|
|
@@ -33296,28 +33374,52 @@ const prepareDataForEnrichedColumns = ({
|
|
|
33296
33374
|
};
|
|
33297
33375
|
|
|
33298
33376
|
const EnrichedTableProvider = ({
|
|
33377
|
+
cluster,
|
|
33299
33378
|
theme,
|
|
33300
33379
|
baseprefix,
|
|
33301
33380
|
dataItems,
|
|
33302
33381
|
resourceSchema,
|
|
33303
33382
|
dataForControls,
|
|
33304
|
-
|
|
33305
|
-
|
|
33306
|
-
|
|
33307
|
-
additionalPrinterColumnsUndefinedValues,
|
|
33308
|
-
additionalPrinterColumnsTrimLengths,
|
|
33309
|
-
additionalPrinterColumnsColWidths,
|
|
33383
|
+
customizationId,
|
|
33384
|
+
tableMappingsReplaceValues,
|
|
33385
|
+
forceDefaultAdditionalPrinterColumns,
|
|
33310
33386
|
selectData,
|
|
33311
|
-
tableProps
|
|
33387
|
+
tableProps,
|
|
33388
|
+
maxHeight
|
|
33312
33389
|
}) => {
|
|
33313
|
-
|
|
33314
|
-
|
|
33390
|
+
const [preparedProps, setPreparedProps] = useState();
|
|
33391
|
+
const [isLoading, setIsLoading] = useState(false);
|
|
33392
|
+
const [isError, setIsError] = useState(false);
|
|
33393
|
+
useEffect(() => {
|
|
33394
|
+
setIsError(void 0);
|
|
33395
|
+
const payload = {
|
|
33396
|
+
customizationId,
|
|
33397
|
+
tableMappingsReplaceValues,
|
|
33398
|
+
forceDefaultAdditionalPrinterColumns
|
|
33399
|
+
};
|
|
33400
|
+
axios.post(`/api/clusters/${cluster}/openapi-bff/tables/tablePrepare/prepareTableProps`, payload).then(({ data }) => {
|
|
33401
|
+
setPreparedProps(data);
|
|
33402
|
+
setIsError(void 0);
|
|
33403
|
+
}).catch((e) => {
|
|
33404
|
+
setIsError(e.message);
|
|
33405
|
+
}).finally(() => {
|
|
33406
|
+
setIsLoading(false);
|
|
33407
|
+
});
|
|
33408
|
+
}, [cluster, customizationId, tableMappingsReplaceValues, forceDefaultAdditionalPrinterColumns]);
|
|
33409
|
+
if (!preparedProps && isLoading) {
|
|
33410
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Flex, { justify: "center", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Spin, {}) });
|
|
33411
|
+
}
|
|
33412
|
+
if (isError) {
|
|
33413
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Alert, { message: isError, type: "error" });
|
|
33414
|
+
}
|
|
33415
|
+
if (!preparedProps) {
|
|
33416
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Flex, { justify: "center", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Spin, {}) });
|
|
33315
33417
|
}
|
|
33316
|
-
const { dataSource, columns } =
|
|
33418
|
+
const { dataSource, columns } = prepare({
|
|
33317
33419
|
dataItems,
|
|
33318
33420
|
resourceSchema,
|
|
33319
33421
|
dataForControls,
|
|
33320
|
-
additionalPrinterColumns
|
|
33422
|
+
additionalPrinterColumns: preparedProps.additionalPrinterColumns
|
|
33321
33423
|
});
|
|
33322
33424
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
33323
33425
|
EnrichedTable,
|
|
@@ -33326,13 +33428,14 @@ const EnrichedTableProvider = ({
|
|
|
33326
33428
|
baseprefix,
|
|
33327
33429
|
dataSource,
|
|
33328
33430
|
columns,
|
|
33329
|
-
pathToNavigate,
|
|
33330
|
-
recordKeysForNavigation,
|
|
33331
|
-
additionalPrinterColumnsUndefinedValues,
|
|
33332
|
-
additionalPrinterColumnsTrimLengths,
|
|
33333
|
-
additionalPrinterColumnsColWidths,
|
|
33431
|
+
pathToNavigate: preparedProps.pathToNavigate,
|
|
33432
|
+
recordKeysForNavigation: preparedProps.recordKeysForNavigation,
|
|
33433
|
+
additionalPrinterColumnsUndefinedValues: preparedProps.additionalPrinterColumnsUndefinedValues,
|
|
33434
|
+
additionalPrinterColumnsTrimLengths: preparedProps.additionalPrinterColumnsTrimLengths,
|
|
33435
|
+
additionalPrinterColumnsColWidths: preparedProps.additionalPrinterColumnsColWidths,
|
|
33334
33436
|
selectData,
|
|
33335
|
-
tableProps
|
|
33437
|
+
tableProps,
|
|
33438
|
+
maxHeight
|
|
33336
33439
|
}
|
|
33337
33440
|
);
|
|
33338
33441
|
};
|
|
@@ -33880,6 +33983,8 @@ const parseQuotaValueMemoryAndStorage = (val) => {
|
|
|
33880
33983
|
numericValue *= 1.125899907;
|
|
33881
33984
|
} else if (val.endsWith("Ei")) {
|
|
33882
33985
|
numericValue *= 1.152921505;
|
|
33986
|
+
} else if (val === "0") {
|
|
33987
|
+
return 0;
|
|
33883
33988
|
} else {
|
|
33884
33989
|
throw new Error("Invalid value");
|
|
33885
33990
|
}
|
|
@@ -42648,12 +42753,17 @@ const ControlsRowContainer = st.div`
|
|
|
42648
42753
|
const DebugContainer = st.div`
|
|
42649
42754
|
height: ${({ $designNewLayoutHeight }) => $designNewLayoutHeight ? `${$designNewLayoutHeight}px` : "75vh"};
|
|
42650
42755
|
`;
|
|
42756
|
+
const BigText = st.div`
|
|
42757
|
+
font-size: 16px;
|
|
42758
|
+
line-height: 24px;
|
|
42759
|
+
`;
|
|
42651
42760
|
const Styled$4 = {
|
|
42652
42761
|
ResetedFormList,
|
|
42653
42762
|
Container,
|
|
42654
42763
|
OverflowContainer: OverflowContainer$1,
|
|
42655
42764
|
ControlsRowContainer,
|
|
42656
|
-
DebugContainer
|
|
42765
|
+
DebugContainer,
|
|
42766
|
+
BigText
|
|
42657
42767
|
};
|
|
42658
42768
|
|
|
42659
42769
|
const getStringFormItemFromSwagger = ({
|
|
@@ -43420,13 +43530,6 @@ const BlackholeForm = ({
|
|
|
43420
43530
|
}).catch((error2) => {
|
|
43421
43531
|
console.log("Form submit error", error2);
|
|
43422
43532
|
setIsLoading(false);
|
|
43423
|
-
if (overflowRef.current) {
|
|
43424
|
-
const { scrollHeight, clientHeight } = overflowRef.current;
|
|
43425
|
-
overflowRef.current.scrollTo({
|
|
43426
|
-
top: scrollHeight - clientHeight,
|
|
43427
|
-
behavior: "smooth"
|
|
43428
|
-
});
|
|
43429
|
-
}
|
|
43430
43533
|
if (isAxiosError(error2) && error2.response?.data.message.includes("Required value")) {
|
|
43431
43534
|
const keys = handleSubmitError({ error: error2, expandedKeys });
|
|
43432
43535
|
setExpandedKeys([...keys]);
|
|
@@ -43442,13 +43545,6 @@ const BlackholeForm = ({
|
|
|
43442
43545
|
}).catch((error2) => {
|
|
43443
43546
|
console.log("Form submit error", error2);
|
|
43444
43547
|
setIsLoading(false);
|
|
43445
|
-
if (overflowRef.current) {
|
|
43446
|
-
const { scrollHeight, clientHeight } = overflowRef.current;
|
|
43447
|
-
overflowRef.current.scrollTo({
|
|
43448
|
-
top: scrollHeight - clientHeight,
|
|
43449
|
-
behavior: "smooth"
|
|
43450
|
-
});
|
|
43451
|
-
}
|
|
43452
43548
|
if (isAxiosError(error2) && error2.response?.data.message.includes("Required value")) {
|
|
43453
43549
|
const keys = handleSubmitError({ error: error2, expandedKeys });
|
|
43454
43550
|
setExpandedKeys([...keys]);
|
|
@@ -43674,10 +43770,6 @@ const BlackholeForm = ({
|
|
|
43674
43770
|
!isCreate && updatePermission.data?.status.allowed === false && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
43675
43771
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Spacer$1, { $space: 10, $samespace: true }),
|
|
43676
43772
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Alert, { type: "warning", message: "Insufficient rights to edit" })
|
|
43677
|
-
] }),
|
|
43678
|
-
error && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
43679
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Spacer$1, { $space: 10, $samespace: true }),
|
|
43680
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(Alert, { message: `An error has occurred: ${error?.response?.data?.message} `, type: "error" })
|
|
43681
43773
|
] })
|
|
43682
43774
|
]
|
|
43683
43775
|
}
|
|
@@ -43690,13 +43782,26 @@ const BlackholeForm = ({
|
|
|
43690
43782
|
/* @__PURE__ */ jsxRuntimeExports.jsx(Button, { onClick: () => setIsDebugModalOpen(true), icon: /* @__PURE__ */ jsxRuntimeExports.jsx(BugOutlined, {}) }),
|
|
43691
43783
|
designNewLayout && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsx(Typography.Text, { children: "Only the data from the form will be sent. Empty fields will be removed recursively." }) })
|
|
43692
43784
|
] }) }),
|
|
43785
|
+
error && /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
43786
|
+
Modal,
|
|
43787
|
+
{
|
|
43788
|
+
open: !!error,
|
|
43789
|
+
onOk: () => setError(void 0),
|
|
43790
|
+
onCancel: () => setError(void 0),
|
|
43791
|
+
title: /* @__PURE__ */ jsxRuntimeExports.jsx(Typography.Text, { type: "danger", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$4.BigText, { children: "Error!" }) }),
|
|
43792
|
+
cancelButtonProps: { style: { display: "none" } },
|
|
43793
|
+
children: [
|
|
43794
|
+
"An error has occurred: ",
|
|
43795
|
+
error?.response?.data?.message
|
|
43796
|
+
]
|
|
43797
|
+
}
|
|
43798
|
+
),
|
|
43693
43799
|
isDebugModalOpen && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
43694
43800
|
Modal,
|
|
43695
43801
|
{
|
|
43696
43802
|
open: isDebugModalOpen,
|
|
43697
43803
|
onOk: () => setIsDebugModalOpen(false),
|
|
43698
43804
|
onCancel: () => setIsDebugModalOpen(false),
|
|
43699
|
-
onClose: () => setIsDebugModalOpen(false),
|
|
43700
43805
|
title: "Debug for properties",
|
|
43701
43806
|
width: "90vw",
|
|
43702
43807
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$4.DebugContainer, { $designNewLayoutHeight: designNewLayoutHeight, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Suspense, { fallback: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: "Loading..." }), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -45298,114 +45403,6 @@ const getGroupsByCategory = async ({
|
|
|
45298
45403
|
return { crdGroups, nonCrdGroups, builtinGroups: filteredBuiltinData, apiExtensionVersion };
|
|
45299
45404
|
};
|
|
45300
45405
|
|
|
45301
|
-
const prepareTableMappings = ({
|
|
45302
|
-
data,
|
|
45303
|
-
clusterName,
|
|
45304
|
-
projectName,
|
|
45305
|
-
instanceName,
|
|
45306
|
-
namespace,
|
|
45307
|
-
syntheticProject,
|
|
45308
|
-
entryType,
|
|
45309
|
-
apiGroup,
|
|
45310
|
-
apiVersion,
|
|
45311
|
-
typeName,
|
|
45312
|
-
entryName,
|
|
45313
|
-
apiExtensionVersion,
|
|
45314
|
-
crdName,
|
|
45315
|
-
pathname
|
|
45316
|
-
}) => {
|
|
45317
|
-
const preparedData = data.map(({ pathToMatch, pathToNavigate, keysToParse }) => ({
|
|
45318
|
-
pathToMatch: pathToMatch ? prepareTemplate({
|
|
45319
|
-
template: pathToMatch,
|
|
45320
|
-
replaceValues: {
|
|
45321
|
-
clusterName,
|
|
45322
|
-
projectName,
|
|
45323
|
-
instanceName,
|
|
45324
|
-
namespace,
|
|
45325
|
-
syntheticProject,
|
|
45326
|
-
entryType,
|
|
45327
|
-
apiGroup,
|
|
45328
|
-
apiVersion,
|
|
45329
|
-
typeName,
|
|
45330
|
-
entryName,
|
|
45331
|
-
apiExtensionVersion,
|
|
45332
|
-
crdName
|
|
45333
|
-
}
|
|
45334
|
-
}) : void 0,
|
|
45335
|
-
pathToNavigate: pathToNavigate ? prepareTemplate({
|
|
45336
|
-
template: pathToNavigate,
|
|
45337
|
-
replaceValues: {
|
|
45338
|
-
clusterName,
|
|
45339
|
-
projectName,
|
|
45340
|
-
instanceName,
|
|
45341
|
-
namespace,
|
|
45342
|
-
syntheticProject,
|
|
45343
|
-
entryType,
|
|
45344
|
-
apiGroup,
|
|
45345
|
-
apiVersion,
|
|
45346
|
-
typeName,
|
|
45347
|
-
entryName,
|
|
45348
|
-
apiExtensionVersion,
|
|
45349
|
-
crdName
|
|
45350
|
-
}
|
|
45351
|
-
}) : void 0,
|
|
45352
|
-
keysToParse
|
|
45353
|
-
}));
|
|
45354
|
-
return preparedData.find(({ pathToMatch }) => pathToMatch ? matchPath(pathToMatch, pathname) : false);
|
|
45355
|
-
};
|
|
45356
|
-
|
|
45357
|
-
const isWithAdditionalPrinterColumns = (x) => {
|
|
45358
|
-
if (typeof x === "object" && !Array.isArray(x) && x !== null && x.spec && typeof x.spec === "object" && !Array.isArray(x.spec) && x.spec !== null && Array.isArray(x.spec.additionalPrinterColumns) && x.spec.additionalPrinterColumns.every(
|
|
45359
|
-
(el) => Object.keys(el).includes("name") && Object.keys(el).includes("jsonPath")
|
|
45360
|
-
)) {
|
|
45361
|
-
return true;
|
|
45362
|
-
}
|
|
45363
|
-
return false;
|
|
45364
|
-
};
|
|
45365
|
-
const isWithAdditionalPrinterColumnsUndefinedValues = (x) => {
|
|
45366
|
-
if (typeof x === "object" && !Array.isArray(x) && x !== null && x.spec && typeof x.spec === "object" && !Array.isArray(x.spec) && x.spec !== null && Array.isArray(x.spec.additionalPrinterColumnsUndefinedValues) && x.spec.additionalPrinterColumnsUndefinedValues.every(
|
|
45367
|
-
(el) => Object.keys(el).includes("key") && Object.keys(el).includes("value")
|
|
45368
|
-
)) {
|
|
45369
|
-
return true;
|
|
45370
|
-
}
|
|
45371
|
-
return false;
|
|
45372
|
-
};
|
|
45373
|
-
const isWithAdditionalPrinterColumnsTrimLengths = (x) => {
|
|
45374
|
-
if (typeof x === "object" && !Array.isArray(x) && x !== null && x.spec && typeof x.spec === "object" && !Array.isArray(x.spec) && x.spec !== null && Array.isArray(x.spec.additionalPrinterColumnsTrimLengths) && x.spec.additionalPrinterColumnsTrimLengths.every(
|
|
45375
|
-
(el) => Object.keys(el).includes("key") && Object.keys(el).includes("value")
|
|
45376
|
-
)) {
|
|
45377
|
-
return true;
|
|
45378
|
-
}
|
|
45379
|
-
return false;
|
|
45380
|
-
};
|
|
45381
|
-
const isWithAdditionalPrinterColumnsColWidths = (x) => {
|
|
45382
|
-
if (typeof x === "object" && !Array.isArray(x) && x !== null && x.spec && typeof x.spec === "object" && !Array.isArray(x.spec) && x.spec !== null && Array.isArray(x.spec.additionalPrinterColumnsColWidths) && x.spec.additionalPrinterColumnsColWidths.every(
|
|
45383
|
-
(el) => Object.keys(el).includes("key") && Object.keys(el).includes("value")
|
|
45384
|
-
)) {
|
|
45385
|
-
return true;
|
|
45386
|
-
}
|
|
45387
|
-
return false;
|
|
45388
|
-
};
|
|
45389
|
-
|
|
45390
|
-
const parseCustomOverrides = ({
|
|
45391
|
-
columnsOverridesData,
|
|
45392
|
-
overrideType
|
|
45393
|
-
}) => {
|
|
45394
|
-
const specificCustomOverrides = columnsOverridesData?.items.find(
|
|
45395
|
-
(item) => typeof item === "object" && !Array.isArray(item) && item !== null && item.spec && typeof item.spec === "object" && !Array.isArray(item.spec) && item.spec !== null && typeof item.spec.overrideType === "string" && item.spec.overrideType === overrideType
|
|
45396
|
-
);
|
|
45397
|
-
const ensuredCustomOverrides = isWithAdditionalPrinterColumns(specificCustomOverrides) ? specificCustomOverrides.spec.additionalPrinterColumns : void 0;
|
|
45398
|
-
const ensuredCustomOverridesUndefinedValues = isWithAdditionalPrinterColumnsUndefinedValues(specificCustomOverrides) ? specificCustomOverrides.spec.additionalPrinterColumnsUndefinedValues : void 0;
|
|
45399
|
-
const ensuredCustomOverridesTrimLengths = isWithAdditionalPrinterColumnsTrimLengths(specificCustomOverrides) ? specificCustomOverrides.spec.additionalPrinterColumnsTrimLengths : void 0;
|
|
45400
|
-
const ensuredCustomOverridesColWidths = isWithAdditionalPrinterColumnsColWidths(specificCustomOverrides) ? specificCustomOverrides.spec.additionalPrinterColumnsColWidths : void 0;
|
|
45401
|
-
return {
|
|
45402
|
-
ensuredCustomOverrides,
|
|
45403
|
-
ensuredCustomOverridesUndefinedValues,
|
|
45404
|
-
ensuredCustomOverridesTrimLengths,
|
|
45405
|
-
ensuredCustomOverridesColWidths
|
|
45406
|
-
};
|
|
45407
|
-
};
|
|
45408
|
-
|
|
45409
45406
|
const getClusterList = async () => {
|
|
45410
45407
|
return axios.get("/clusterlist");
|
|
45411
45408
|
};
|
|
@@ -45767,5 +45764,5 @@ const useCrdData = ({
|
|
|
45767
45764
|
});
|
|
45768
45765
|
};
|
|
45769
45766
|
|
|
45770
|
-
export { BackToDefaultIcon, BlackholeForm, BlackholeFormDataProvider, ContentCard$1 as ContentCard, DeleteIcon, DeleteModal, DeleteModalMany, DownIcon, DynamicComponents, DynamicRenderer, DynamicRendererWithProviders, EditIcon, EnrichedTable, EnrichedTableProvider, LockedIcon, ManageableBreadcrumbs, ManageableBreadcrumbsWithDataProvider, ManageableSidebar, ManageableSidebarWithDataProvider, MarketPlace, MarketplaceCard$1 as MarketplaceCard, MinusIcon, PlusIcon, ProjectInfoCard$1 as ProjectInfoCard, Spacer$1 as Spacer, SuccessIcon, TreeWithSearch, UnlockedIcon, UpIcon, checkIfApiInstanceNamespaceScoped, checkIfBuiltInInstanceNamespaceScoped, checkPermission, createContextFactory, createNewEntry, deleteEntry, feedbackIcons, filterIfApiInstanceNamespaceScoped, filterIfBuiltInInstanceNamespaceScoped, filterSelectOptions, floorToDecimal, getAllPathsFromObj, getApiResourceSingle, getApiResourceTypes, getApiResourceTypesByApiGroup, getApiResources, getBuiltinResourceSingle, getBuiltinResourceTypes, getBuiltinResources, getBuiltinTreeData, getClusterList, getCrdData, getCrdResourceSingle, getCrdResources, getDirectUnknownResource, getEnrichedColumns, getEnrichedColumnsWithControls, getGroupsByCategory, getObjectFormItemsDraft, getPrefixSubarrays, getStringByName, getSwagger, groupsToTreeData, isFlatObject,
|
|
45767
|
+
export { BackToDefaultIcon, BlackholeForm, BlackholeFormDataProvider, ContentCard$1 as ContentCard, DeleteIcon, DeleteModal, DeleteModalMany, DownIcon, DynamicComponents, DynamicRenderer, DynamicRendererWithProviders, EditIcon, EnrichedTable, EnrichedTableProvider, LockedIcon, ManageableBreadcrumbs, ManageableBreadcrumbsWithDataProvider, ManageableSidebar, ManageableSidebarWithDataProvider, MarketPlace, MarketplaceCard$1 as MarketplaceCard, MinusIcon, PlusIcon, ProjectInfoCard$1 as ProjectInfoCard, Spacer$1 as Spacer, SuccessIcon, TreeWithSearch, UnlockedIcon, UpIcon, checkIfApiInstanceNamespaceScoped, checkIfBuiltInInstanceNamespaceScoped, checkPermission, createContextFactory, createNewEntry, deleteEntry, feedbackIcons, filterIfApiInstanceNamespaceScoped, filterIfBuiltInInstanceNamespaceScoped, filterSelectOptions, floorToDecimal, getAllPathsFromObj, getApiResourceSingle, getApiResourceTypes, getApiResourceTypesByApiGroup, getApiResources, getBuiltinResourceSingle, getBuiltinResourceTypes, getBuiltinResources, getBuiltinTreeData, getClusterList, getCrdData, getCrdResourceSingle, getCrdResources, getDirectUnknownResource, getEnrichedColumns, getEnrichedColumnsWithControls, getGroupsByCategory, getObjectFormItemsDraft, getPrefixSubarrays, getStringByName, getSwagger, groupsToTreeData, isFlatObject, normalizeValuesForQuotasToNumber, parseQuotaValue, parseQuotaValueCpu, parseQuotaValueMemoryAndStorage, prepareDataForManageableBreadcrumbs, prepareDataForManageableSidebar, prepareTemplate, prepareUrlsToFetchForDynamicRenderer, updateEntry, useApiResourceSingle, useApiResourceTypesByGroup, useApiResources, useApisResourceTypes, useBuiltinResourceSingle, useBuiltinResourceTypes, useBuiltinResources, useClusterList, useCrdData, useCrdResourceSingle, useCrdResources, useDirectUnknownResource, usePermissions };
|
|
45771
45768
|
//# sourceMappingURL=openapi-k8s-toolkit.es.js.map
|