@prorobotech/openapi-k8s-toolkit 0.0.1-alpha.93 → 0.0.1-alpha.95
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 +292 -35
- package/dist/openapi-k8s-toolkit.es.js.map +1 -1
- package/dist/openapi-k8s-toolkit.umd.js +292 -34
- package/dist/openapi-k8s-toolkit.umd.js.map +1 -1
- package/dist/types/components/atoms/CustomSelect/CustomSelect.d.ts +3 -0
- package/dist/types/components/atoms/CustomSelect/index.d.ts +1 -0
- package/dist/types/components/atoms/CustomSelect/styled.d.ts +158 -0
- package/dist/types/components/atoms/index.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/Labels/molecules/EditModal/EditModal.d.ts +14 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/Labels/molecules/EditModal/index.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/Labels/molecules/index.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/types.d.ts +10 -0
- package/package.json +3 -3
|
@@ -2504,7 +2504,7 @@ const CustomTreeProvider = st.div`
|
|
|
2504
2504
|
justify-content: center;
|
|
2505
2505
|
}
|
|
2506
2506
|
`;
|
|
2507
|
-
const Styled$
|
|
2507
|
+
const Styled$q = {
|
|
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$q.CustomTreeProvider, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
2573
2573
|
Tree,
|
|
2574
2574
|
{
|
|
2575
2575
|
treeData: loop(treeData),
|
|
@@ -8424,14 +8424,14 @@ const ContentContainer = st.div`
|
|
|
8424
8424
|
display: ${({ $displayFlex }) => $displayFlex ? "flex" : "block"};
|
|
8425
8425
|
flex-flow: ${({ $flexFlow }) => $flexFlow};
|
|
8426
8426
|
`;
|
|
8427
|
-
const Styled$
|
|
8427
|
+
const Styled$p = {
|
|
8428
8428
|
ContentContainer
|
|
8429
8429
|
};
|
|
8430
8430
|
|
|
8431
8431
|
const ContentCard$1 = ({ children, flexGrow, displayFlex, flexFlow, maxHeight }) => {
|
|
8432
8432
|
const { token } = theme.useToken();
|
|
8433
8433
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
8434
|
-
Styled$
|
|
8434
|
+
Styled$p.ContentContainer,
|
|
8435
8435
|
{
|
|
8436
8436
|
$flexGrow: flexGrow,
|
|
8437
8437
|
$bgColor: token.colorBgContainer,
|
|
@@ -8492,13 +8492,63 @@ const UncontrolledSelect$1 = st(Select)`
|
|
|
8492
8492
|
padding-inline: 8px;
|
|
8493
8493
|
}
|
|
8494
8494
|
`;
|
|
8495
|
-
const Styled$
|
|
8495
|
+
const Styled$o = {
|
|
8496
8496
|
UncontrolledSelect: UncontrolledSelect$1
|
|
8497
8497
|
};
|
|
8498
8498
|
|
|
8499
8499
|
const UncontrolledSelect = (props) => {
|
|
8500
8500
|
const { isCursorPointer } = props;
|
|
8501
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$
|
|
8501
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$o.UncontrolledSelect, { ...props, $isCursorPointer: isCursorPointer });
|
|
8502
|
+
};
|
|
8503
|
+
|
|
8504
|
+
const CustomSelect$5 = st(Select)`
|
|
8505
|
+
width: 100%;
|
|
8506
|
+
margin: 0;
|
|
8507
|
+
padding: 4px;
|
|
8508
|
+
|
|
8509
|
+
&& .ant-select-selector {
|
|
8510
|
+
background: none;
|
|
8511
|
+
}
|
|
8512
|
+
|
|
8513
|
+
&& .ant-select-selector,
|
|
8514
|
+
&& .ant-select-focused .ant-select-selector,
|
|
8515
|
+
&& .ant-select-selector:focus,
|
|
8516
|
+
&& .ant-select-selector:active,
|
|
8517
|
+
&& .ant-select-open .ant-select-selector {
|
|
8518
|
+
align-items: flex-start;
|
|
8519
|
+
outline: none !important;
|
|
8520
|
+
outline-color: transparent !important;
|
|
8521
|
+
box-shadow: none !important;
|
|
8522
|
+
padding-inline: 4px !important;
|
|
8523
|
+
padding-block: 4px !important;
|
|
8524
|
+
}
|
|
8525
|
+
|
|
8526
|
+
&& .ant-select-selection-overflow {
|
|
8527
|
+
gap: 4px;
|
|
8528
|
+
}
|
|
8529
|
+
|
|
8530
|
+
&& .ant-select-selection-overflow-item-rest .ant-select-selection-item {
|
|
8531
|
+
background: 0;
|
|
8532
|
+
}
|
|
8533
|
+
|
|
8534
|
+
&& .ant-tag {
|
|
8535
|
+
font-size: 14px;
|
|
8536
|
+
line-height: 22px;
|
|
8537
|
+
border: 0;
|
|
8538
|
+
padding-inline: 8px;
|
|
8539
|
+
}
|
|
8540
|
+
|
|
8541
|
+
&& .ant-select-multiple .ant-select-selection-overflow-item-suffix {
|
|
8542
|
+
min-height: 22px !important;
|
|
8543
|
+
margin-block: 0 !important;
|
|
8544
|
+
}
|
|
8545
|
+
`;
|
|
8546
|
+
const Styled$n = {
|
|
8547
|
+
CustomSelect: CustomSelect$5
|
|
8548
|
+
};
|
|
8549
|
+
|
|
8550
|
+
const CustomSelect$4 = (props) => {
|
|
8551
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Styled$n.CustomSelect, { ...props });
|
|
8502
8552
|
};
|
|
8503
8553
|
|
|
8504
8554
|
const CursorPointerTag = st(Tag)`
|
|
@@ -33418,7 +33468,7 @@ const prepare = ({
|
|
|
33418
33468
|
permissions: dataForControls.permissions
|
|
33419
33469
|
};
|
|
33420
33470
|
return {
|
|
33421
|
-
key: el.metadata.name
|
|
33471
|
+
key: `${el.metadata.name}${el.metadata.namespace ? `-${el.metadata.namespace}` : ""}`,
|
|
33422
33472
|
...el,
|
|
33423
33473
|
internalDataForControls
|
|
33424
33474
|
};
|
|
@@ -33458,7 +33508,7 @@ const prepare = ({
|
|
|
33458
33508
|
permissions: dataForControls.permissions
|
|
33459
33509
|
};
|
|
33460
33510
|
return {
|
|
33461
|
-
key: el.metadata.name
|
|
33511
|
+
key: `${el.metadata.name}${el.metadata.namespace ? `-${el.metadata.namespace}` : ""}`,
|
|
33462
33512
|
...el.spec,
|
|
33463
33513
|
internalDataForControls
|
|
33464
33514
|
};
|
|
@@ -46816,6 +46866,7 @@ const ItemCounter = ({
|
|
|
46816
46866
|
reqIndex,
|
|
46817
46867
|
jsonPathToArray,
|
|
46818
46868
|
text,
|
|
46869
|
+
errorText,
|
|
46819
46870
|
style
|
|
46820
46871
|
} = data;
|
|
46821
46872
|
const { data: multiQueryData, isLoading: isMultiQueryLoading, isError: isMultiQueryErrors, errors } = useMultiQuery();
|
|
@@ -46835,12 +46886,14 @@ const ItemCounter = ({
|
|
|
46835
46886
|
}, {});
|
|
46836
46887
|
const jsonRoot = multiQueryData[`req${reqIndex}`];
|
|
46837
46888
|
if (jsonRoot === void 0) {
|
|
46838
|
-
|
|
46889
|
+
console.log("Item Counter: ${id}: No root for json path");
|
|
46890
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("span", { style, children: errorText });
|
|
46839
46891
|
}
|
|
46840
46892
|
const anythingForNow = jp.query(jsonRoot, `$${jsonPathToArray}`);
|
|
46841
46893
|
const { counter, error: errorArrayOfObjects } = getItemsInside$1(anythingForNow);
|
|
46842
46894
|
if (errorArrayOfObjects) {
|
|
46843
|
-
|
|
46895
|
+
console.log(`Item Counter: ${id}: ${errorArrayOfObjects}`);
|
|
46896
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("span", { style, children: errorText });
|
|
46844
46897
|
}
|
|
46845
46898
|
const parsedText = parseAll({ text, replaceValues, multiQueryData });
|
|
46846
46899
|
const parsedTextWithCounter = parsedText.replace("~counter~", String(counter || 0));
|
|
@@ -46855,7 +46908,7 @@ const getItemsInside = (value) => {
|
|
|
46855
46908
|
return { error: "Value on jsonPath is not an array" };
|
|
46856
46909
|
}
|
|
46857
46910
|
if (typeof value[0] !== "object" || value[0] === null) {
|
|
46858
|
-
return {
|
|
46911
|
+
return { counter: 0 };
|
|
46859
46912
|
}
|
|
46860
46913
|
return { counter: Object.keys(value[0]).length };
|
|
46861
46914
|
};
|
|
@@ -46870,6 +46923,7 @@ const KeyCounter = ({
|
|
|
46870
46923
|
reqIndex,
|
|
46871
46924
|
jsonPathToObj,
|
|
46872
46925
|
text,
|
|
46926
|
+
errorText,
|
|
46873
46927
|
style
|
|
46874
46928
|
} = data;
|
|
46875
46929
|
const { data: multiQueryData, isLoading: isMultiQueryLoading, isError: isMultiQueryErrors, errors } = useMultiQuery();
|
|
@@ -46889,12 +46943,14 @@ const KeyCounter = ({
|
|
|
46889
46943
|
}, {});
|
|
46890
46944
|
const jsonRoot = multiQueryData[`req${reqIndex}`];
|
|
46891
46945
|
if (jsonRoot === void 0) {
|
|
46892
|
-
|
|
46946
|
+
console.log("Key Counter: ${id}: No root for json path");
|
|
46947
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("span", { style, children: errorText });
|
|
46893
46948
|
}
|
|
46894
46949
|
const anythingForNow = jp.query(jsonRoot, `$${jsonPathToObj}`);
|
|
46895
46950
|
const { counter, error: errorArrayOfObjects } = getItemsInside(anythingForNow);
|
|
46896
46951
|
if (errorArrayOfObjects) {
|
|
46897
|
-
|
|
46952
|
+
console.log(`Key Counter: ${id}: ${errorArrayOfObjects}`);
|
|
46953
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("span", { style, children: errorText });
|
|
46898
46954
|
}
|
|
46899
46955
|
const parsedText = parseAll({ text, replaceValues, multiQueryData });
|
|
46900
46956
|
const parsedTextWithCounter = parsedText.replace("~counter~", String(counter || 0));
|
|
@@ -46921,16 +46977,137 @@ const truncate = (text, max) => {
|
|
|
46921
46977
|
return text.length > max ? text.slice(0, max) + "..." : text;
|
|
46922
46978
|
};
|
|
46923
46979
|
|
|
46980
|
+
const EditModal = ({
|
|
46981
|
+
open,
|
|
46982
|
+
close,
|
|
46983
|
+
values,
|
|
46984
|
+
openNotificationSuccess,
|
|
46985
|
+
modalTitle,
|
|
46986
|
+
modalDescriptionText,
|
|
46987
|
+
inputLabel,
|
|
46988
|
+
maxEditTagTextLength,
|
|
46989
|
+
allowClearEditSelect
|
|
46990
|
+
}) => {
|
|
46991
|
+
const [error, setError] = useState();
|
|
46992
|
+
const [isLoading, setIsLoading] = useState(false);
|
|
46993
|
+
const [form] = Form.useForm();
|
|
46994
|
+
const labels = Form.useWatch("labels", form);
|
|
46995
|
+
useEffect(() => {
|
|
46996
|
+
if (open) {
|
|
46997
|
+
form.setFieldsValue({
|
|
46998
|
+
labels: values ? Object.entries(values).map(([key, value]) => `${key}=${value}`) : []
|
|
46999
|
+
});
|
|
47000
|
+
}
|
|
47001
|
+
}, [open, form]);
|
|
47002
|
+
const submit = () => {
|
|
47003
|
+
form.validateFields().then(() => {
|
|
47004
|
+
const result = {};
|
|
47005
|
+
labels.forEach((label) => {
|
|
47006
|
+
const [key, value] = label.split("=");
|
|
47007
|
+
result[key] = value || "";
|
|
47008
|
+
});
|
|
47009
|
+
console.log(JSON.stringify(result));
|
|
47010
|
+
if (openNotificationSuccess) {
|
|
47011
|
+
openNotificationSuccess();
|
|
47012
|
+
}
|
|
47013
|
+
}).catch(() => console.log("Validating error"));
|
|
47014
|
+
};
|
|
47015
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
47016
|
+
Modal,
|
|
47017
|
+
{
|
|
47018
|
+
title: modalTitle,
|
|
47019
|
+
open,
|
|
47020
|
+
onOk: () => submit(),
|
|
47021
|
+
onCancel: () => {
|
|
47022
|
+
close();
|
|
47023
|
+
form.resetFields();
|
|
47024
|
+
setIsLoading(false);
|
|
47025
|
+
setError(void 0);
|
|
47026
|
+
},
|
|
47027
|
+
okText: "Save",
|
|
47028
|
+
confirmLoading: isLoading,
|
|
47029
|
+
maskClosable: false,
|
|
47030
|
+
width: 520,
|
|
47031
|
+
destroyOnHidden: true,
|
|
47032
|
+
centered: true,
|
|
47033
|
+
children: [
|
|
47034
|
+
error && /* @__PURE__ */ jsxRuntimeExports.jsx(Alert, { type: "error", message: "Error while submitting", description: error?.response?.data?.message }),
|
|
47035
|
+
modalDescriptionText && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
47036
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: modalDescriptionText }),
|
|
47037
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Spacer$1, { $space: 10, $samespace: true })
|
|
47038
|
+
] }),
|
|
47039
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs(Form, { form, children: [
|
|
47040
|
+
inputLabel && /* @__PURE__ */ jsxRuntimeExports.jsx(CustomSizeTitle, { $designNewLayout: true, children: inputLabel }),
|
|
47041
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Spacer$1, { $space: 10, $samespace: true }),
|
|
47042
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
47043
|
+
ResetedFormItem,
|
|
47044
|
+
{
|
|
47045
|
+
name: "labels",
|
|
47046
|
+
hasFeedback: true,
|
|
47047
|
+
validateTrigger: "onBlur",
|
|
47048
|
+
rules: [
|
|
47049
|
+
() => ({
|
|
47050
|
+
validator(_, value) {
|
|
47051
|
+
if (Array.isArray(value) && value.every((str) => typeof str === "string" && str.includes("=") && !str.startsWith("="))) {
|
|
47052
|
+
return Promise.resolve();
|
|
47053
|
+
}
|
|
47054
|
+
return Promise.reject(new Error("Please enter key=value style"));
|
|
47055
|
+
}
|
|
47056
|
+
})
|
|
47057
|
+
],
|
|
47058
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
47059
|
+
CustomSelect$4,
|
|
47060
|
+
{
|
|
47061
|
+
mode: "tags",
|
|
47062
|
+
placeholder: "Enter key=value",
|
|
47063
|
+
filterOption: filterSelectOptions,
|
|
47064
|
+
allowClear: allowClearEditSelect,
|
|
47065
|
+
tokenSeparators: [" "],
|
|
47066
|
+
open: false,
|
|
47067
|
+
tagRender: ({ label, closable, onClose }) => {
|
|
47068
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(Popover, { content: label, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
47069
|
+
Tag,
|
|
47070
|
+
{
|
|
47071
|
+
closable,
|
|
47072
|
+
onClose,
|
|
47073
|
+
onClick: (e) => {
|
|
47074
|
+
e.stopPropagation();
|
|
47075
|
+
},
|
|
47076
|
+
children: typeof label === "string" ? truncate(label, maxEditTagTextLength) : "Not a string value"
|
|
47077
|
+
}
|
|
47078
|
+
) });
|
|
47079
|
+
}
|
|
47080
|
+
}
|
|
47081
|
+
)
|
|
47082
|
+
}
|
|
47083
|
+
)
|
|
47084
|
+
] })
|
|
47085
|
+
]
|
|
47086
|
+
}
|
|
47087
|
+
);
|
|
47088
|
+
};
|
|
47089
|
+
|
|
46924
47090
|
const Labels = ({ data, children }) => {
|
|
46925
47091
|
const {
|
|
46926
47092
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
46927
47093
|
id,
|
|
46928
47094
|
reqIndex,
|
|
46929
47095
|
jsonPathToLabels,
|
|
46930
|
-
selectProps
|
|
47096
|
+
selectProps,
|
|
47097
|
+
notificationSuccessMessage,
|
|
47098
|
+
notificationSuccessMessageDescription,
|
|
47099
|
+
modalTitle,
|
|
47100
|
+
modalDescriptionText,
|
|
47101
|
+
inputLabel,
|
|
47102
|
+
containerStyle,
|
|
47103
|
+
maxEditTagTextLength,
|
|
47104
|
+
allowClearEditSelect
|
|
46931
47105
|
} = data;
|
|
47106
|
+
const [api, contextHolder] = notification.useNotification();
|
|
47107
|
+
const [open, setOpen] = useState(false);
|
|
46932
47108
|
const { maxTagTextLength, ...restSelectProps } = selectProps || { maxTagTextLength: void 0 };
|
|
46933
47109
|
const { data: multiQueryData, isLoading: isMultiQueryLoading, isError: isMultiQueryErrors, errors } = useMultiQuery();
|
|
47110
|
+
const partsOfUrl = usePartsOfUrl();
|
|
46934
47111
|
if (isMultiQueryLoading) {
|
|
46935
47112
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: "Loading..." });
|
|
46936
47113
|
}
|
|
@@ -46940,28 +47117,82 @@ const Labels = ({ data, children }) => {
|
|
|
46940
47117
|
/* @__PURE__ */ jsxRuntimeExports.jsx("ul", { children: errors.map((e, i) => e && /* @__PURE__ */ jsxRuntimeExports.jsx("li", { children: e.message }, i)) })
|
|
46941
47118
|
] });
|
|
46942
47119
|
}
|
|
47120
|
+
const replaceValues = partsOfUrl.partsOfUrl.reduce((acc, value, index) => {
|
|
47121
|
+
acc[index.toString()] = value;
|
|
47122
|
+
return acc;
|
|
47123
|
+
}, {});
|
|
46943
47124
|
const jsonRoot = multiQueryData[`req${reqIndex}`];
|
|
46944
47125
|
if (jsonRoot === void 0) {
|
|
46945
47126
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: "No root for json path" });
|
|
46946
47127
|
}
|
|
46947
47128
|
const anythingForNow = jp.query(jsonRoot, `$${jsonPathToLabels}`);
|
|
46948
47129
|
const { data: labelsRaw, error: errorArrayOfObjects } = parseArrayOfAny$1(anythingForNow);
|
|
46949
|
-
const
|
|
46950
|
-
|
|
46951
|
-
|
|
46952
|
-
|
|
46953
|
-
|
|
46954
|
-
|
|
46955
|
-
|
|
46956
|
-
|
|
46957
|
-
|
|
46958
|
-
|
|
46959
|
-
|
|
46960
|
-
|
|
46961
|
-
|
|
46962
|
-
|
|
46963
|
-
|
|
46964
|
-
|
|
47130
|
+
const notificationSuccessMessagePrepared = parseAll({
|
|
47131
|
+
text: notificationSuccessMessage,
|
|
47132
|
+
replaceValues,
|
|
47133
|
+
multiQueryData
|
|
47134
|
+
});
|
|
47135
|
+
const notificationSuccessMessageDescriptionPrepared = parseAll({
|
|
47136
|
+
text: notificationSuccessMessageDescription,
|
|
47137
|
+
replaceValues,
|
|
47138
|
+
multiQueryData
|
|
47139
|
+
});
|
|
47140
|
+
const modalTitlePrepared = parseAll({ text: modalTitle, replaceValues, multiQueryData });
|
|
47141
|
+
const modalDescriptionTextPrepared = modalDescriptionText ? parseAll({ text: modalDescriptionText, replaceValues, multiQueryData }) : void 0;
|
|
47142
|
+
const inputLabelPrepared = inputLabel ? parseAll({ text: inputLabel, replaceValues, multiQueryData }) : void 0;
|
|
47143
|
+
const openNotificationSuccess = () => {
|
|
47144
|
+
api.success({
|
|
47145
|
+
message: notificationSuccessMessagePrepared,
|
|
47146
|
+
description: notificationSuccessMessageDescriptionPrepared,
|
|
47147
|
+
placement: "bottomRight"
|
|
47148
|
+
});
|
|
47149
|
+
};
|
|
47150
|
+
const EmptySelect = /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: containerStyle, children: [
|
|
47151
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Flex, { justify: "flex-end", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
47152
|
+
Button,
|
|
47153
|
+
{
|
|
47154
|
+
type: "text",
|
|
47155
|
+
size: "small",
|
|
47156
|
+
onClick: (e) => {
|
|
47157
|
+
e.stopPropagation();
|
|
47158
|
+
setOpen(true);
|
|
47159
|
+
},
|
|
47160
|
+
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(EditIcon, {})
|
|
47161
|
+
}
|
|
47162
|
+
) }),
|
|
47163
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
47164
|
+
UncontrolledSelect,
|
|
47165
|
+
{
|
|
47166
|
+
mode: "multiple",
|
|
47167
|
+
...restSelectProps,
|
|
47168
|
+
value: [],
|
|
47169
|
+
options: [],
|
|
47170
|
+
open: false,
|
|
47171
|
+
showSearch: false,
|
|
47172
|
+
removeIcon: () => {
|
|
47173
|
+
return null;
|
|
47174
|
+
},
|
|
47175
|
+
suffixIcon: null,
|
|
47176
|
+
isCursorPointer: true
|
|
47177
|
+
}
|
|
47178
|
+
),
|
|
47179
|
+
children,
|
|
47180
|
+
contextHolder,
|
|
47181
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
47182
|
+
EditModal,
|
|
47183
|
+
{
|
|
47184
|
+
open,
|
|
47185
|
+
close: () => setOpen(false),
|
|
47186
|
+
values: labelsRaw,
|
|
47187
|
+
openNotificationSuccess,
|
|
47188
|
+
modalTitle: modalTitlePrepared,
|
|
47189
|
+
modalDescriptionText: modalDescriptionTextPrepared,
|
|
47190
|
+
inputLabel: inputLabelPrepared,
|
|
47191
|
+
maxEditTagTextLength,
|
|
47192
|
+
allowClearEditSelect
|
|
47193
|
+
}
|
|
47194
|
+
)
|
|
47195
|
+
] });
|
|
46965
47196
|
if (!labelsRaw) {
|
|
46966
47197
|
if (errorArrayOfObjects) {
|
|
46967
47198
|
return EmptySelect;
|
|
@@ -46969,7 +47200,19 @@ const Labels = ({ data, children }) => {
|
|
|
46969
47200
|
return EmptySelect;
|
|
46970
47201
|
}
|
|
46971
47202
|
const labels = Object.entries(labelsRaw).map(([key, value]) => `${key}=${value}`);
|
|
46972
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
47203
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: containerStyle, children: [
|
|
47204
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Flex, { justify: "flex-end", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
47205
|
+
Button,
|
|
47206
|
+
{
|
|
47207
|
+
type: "text",
|
|
47208
|
+
size: "small",
|
|
47209
|
+
onClick: (e) => {
|
|
47210
|
+
e.stopPropagation();
|
|
47211
|
+
setOpen(true);
|
|
47212
|
+
},
|
|
47213
|
+
icon: /* @__PURE__ */ jsxRuntimeExports.jsx(EditIcon, {})
|
|
47214
|
+
}
|
|
47215
|
+
) }),
|
|
46973
47216
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
46974
47217
|
UncontrolledSelect,
|
|
46975
47218
|
{
|
|
@@ -46991,11 +47234,25 @@ const Labels = ({ data, children }) => {
|
|
|
46991
47234
|
},
|
|
46992
47235
|
children: typeof label === "string" ? truncate(label, maxTagTextLength) : "Not a string value"
|
|
46993
47236
|
}
|
|
46994
|
-
) })
|
|
46995
|
-
isCursorPointer: true
|
|
47237
|
+
) })
|
|
46996
47238
|
}
|
|
46997
47239
|
),
|
|
46998
|
-
children
|
|
47240
|
+
children,
|
|
47241
|
+
contextHolder,
|
|
47242
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
47243
|
+
EditModal,
|
|
47244
|
+
{
|
|
47245
|
+
open,
|
|
47246
|
+
close: () => setOpen(false),
|
|
47247
|
+
values: labelsRaw,
|
|
47248
|
+
openNotificationSuccess,
|
|
47249
|
+
modalTitle: modalTitlePrepared,
|
|
47250
|
+
modalDescriptionText: modalDescriptionTextPrepared,
|
|
47251
|
+
inputLabel: inputLabelPrepared,
|
|
47252
|
+
maxEditTagTextLength,
|
|
47253
|
+
allowClearEditSelect
|
|
47254
|
+
}
|
|
47255
|
+
)
|
|
46999
47256
|
] });
|
|
47000
47257
|
};
|
|
47001
47258
|
|
|
@@ -47587,5 +47844,5 @@ const useCrdData = ({
|
|
|
47587
47844
|
});
|
|
47588
47845
|
};
|
|
47589
47846
|
|
|
47590
|
-
export { BackToDefaultIcon, BlackholeForm, BlackholeFormDataProvider, ContentCard$1 as ContentCard, CursorPointerTag, DeleteIcon, DeleteModal, DeleteModalMany, DownIcon, DynamicComponents, DynamicRenderer, DynamicRendererWithProviders, EditIcon, EnrichedTable$1 as EnrichedTable, EnrichedTableProvider, FlexGrow, LockedIcon, ManageableBreadcrumbs, ManageableBreadcrumbsWithDataProvider, ManageableSidebar, ManageableSidebarWithDataProvider, MarketPlace, MarketplaceCard$1 as MarketplaceCard, MinusIcon, NodeTerminal$1 as NodeTerminal, PauseCircleIcon, PlusIcon, PodLogs$1 as PodLogs, PodLogsMonaco, PodTerminal$1 as PodTerminal, ProjectInfoCard$1 as ProjectInfoCard, ResumeCircleIcon, Spacer$1 as Spacer, SuccessIcon, TreeWithSearch, UncontrolledSelect, UnlockedIcon, UpIcon, YamlEditorSingleton$1 as YamlEditorSingleton, 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 };
|
|
47847
|
+
export { BackToDefaultIcon, BlackholeForm, BlackholeFormDataProvider, ContentCard$1 as ContentCard, CursorPointerTag, CustomSelect$4 as CustomSelect, DeleteIcon, DeleteModal, DeleteModalMany, DownIcon, DynamicComponents, DynamicRenderer, DynamicRendererWithProviders, EditIcon, EnrichedTable$1 as EnrichedTable, EnrichedTableProvider, FlexGrow, LockedIcon, ManageableBreadcrumbs, ManageableBreadcrumbsWithDataProvider, ManageableSidebar, ManageableSidebarWithDataProvider, MarketPlace, MarketplaceCard$1 as MarketplaceCard, MinusIcon, NodeTerminal$1 as NodeTerminal, PauseCircleIcon, PlusIcon, PodLogs$1 as PodLogs, PodLogsMonaco, PodTerminal$1 as PodTerminal, ProjectInfoCard$1 as ProjectInfoCard, ResumeCircleIcon, Spacer$1 as Spacer, SuccessIcon, TreeWithSearch, UncontrolledSelect, UnlockedIcon, UpIcon, YamlEditorSingleton$1 as YamlEditorSingleton, 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 };
|
|
47591
47848
|
//# sourceMappingURL=openapi-k8s-toolkit.es.js.map
|