@prorobotech/openapi-k8s-toolkit 0.0.1-alpha.124 → 0.0.1-alpha.125

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,8 +1,8 @@
1
1
  import o, { useRef, useContext, useDebugValue, createElement, useState, useLayoutEffect, useEffect, Fragment, createContext, useMemo, isValidElement, cloneElement, useCallback, useInsertionEffect, useSyncExternalStore, memo, Suspense } from 'react';
2
2
  import { Input, Tree, Modal, Alert, theme, Select, Tag, Breadcrumb, Spin, Menu, Tooltip, Space, Button, Flex, Typography, Card, Row, Col, Tabs, Form, Popover, notification, Table, Slider, InputNumber, Switch, Dropdown, Result, Progress, Checkbox } from 'antd';
3
- import { LoadingOutlined, ExclamationCircleFilled, CloseCircleFilled, CheckCircleFilled, CaretDownOutlined, CaretRightOutlined, InfoCircleOutlined, EyeOutlined, EyeInvisibleOutlined, SearchOutlined, EditOutlined, DeleteOutlined, CheckOutlined, CloseOutlined, BugOutlined, PlusOutlined, EllipsisOutlined } from '@ant-design/icons';
3
+ import { LoadingOutlined, ExclamationCircleFilled, CloseCircleFilled, CheckCircleFilled, CaretDownOutlined, CaretRightOutlined, InfoCircleOutlined, EyeOutlined, EyeInvisibleOutlined, SearchOutlined, EditOutlined, DeleteOutlined, CheckOutlined, CloseOutlined, BugOutlined, PlusOutlined, EllipsisOutlined, ClearOutlined } from '@ant-design/icons';
4
4
  import { useQuery, useQueries, useQueryClient } from '@tanstack/react-query';
5
- import { Link, useLocation, useNavigate } from 'react-router-dom';
5
+ import { Link, useLocation, useNavigate, useSearchParams } 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;
@@ -8431,6 +8431,17 @@ const ResumeCircleIcon = () => {
8431
8431
  ) });
8432
8432
  };
8433
8433
 
8434
+ const LookingGlassIcon = ({ width, height }) => {
8435
+ return /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: width ?? 36, height: height ?? 37, viewBox: "0 0 36 37", fill: "none", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
8436
+ "path",
8437
+ {
8438
+ d: "M35.7507 33.7958L24.1569 22.202C25.9561 19.8761 26.9293 17.0324 26.9293 14.0413C26.9293 10.4609 25.5319 7.10379 23.0052 4.57254C20.4784 2.04129 17.1123 0.648438 13.5364 0.648438C9.96052 0.648438 6.59445 2.04576 4.06766 4.57254C1.53641 7.09933 0.143555 10.4609 0.143555 14.0413C0.143555 17.6172 1.54088 20.9833 4.06766 23.51C6.59445 26.0413 9.95605 27.4342 13.5364 27.4342C16.5275 27.4342 19.3668 26.4609 21.6927 24.6663L33.2864 36.2556C33.3204 36.2896 33.3608 36.3166 33.4052 36.335C33.4496 36.3534 33.4972 36.3629 33.5453 36.3629C33.5934 36.3629 33.6411 36.3534 33.6855 36.335C33.7299 36.3166 33.7703 36.2896 33.8043 36.2556L35.7507 34.3136C35.7847 34.2796 35.8117 34.2393 35.8301 34.1948C35.8485 34.1504 35.858 34.1028 35.858 34.0547C35.858 34.0066 35.8485 33.959 35.8301 33.9146C35.8117 33.8701 35.7847 33.8298 35.7507 33.7958ZM20.6078 21.1127C18.715 23.0011 16.2061 24.0413 13.5364 24.0413C10.8668 24.0413 8.35784 23.0011 6.46498 21.1127C4.57659 19.2199 3.53641 16.7109 3.53641 14.0413C3.53641 11.3717 4.57659 8.85826 6.46498 6.96987C8.35784 5.08147 10.8668 4.04129 13.5364 4.04129C16.2061 4.04129 18.7194 5.07701 20.6078 6.96987C22.4962 8.86272 23.5364 11.3717 23.5364 14.0413C23.5364 16.7109 22.4962 19.2243 20.6078 21.1127Z",
8439
+ fill: "currentColor",
8440
+ fillOpacity: "0.88"
8441
+ }
8442
+ ) });
8443
+ };
8444
+
8434
8445
  const ContentContainer = st$1.div`
8435
8446
  border: 1px solid ${({ $borderColor }) => $borderColor};
8436
8447
  border-radius: 6px;
@@ -36882,8 +36893,8 @@ const pickInRange = (u32, min, max) => min + u32 % (max - min + 1);
36882
36893
  const hslFromString = (value, theme) => {
36883
36894
  const hash = fnv1a32(value);
36884
36895
  const hue = hash % 345;
36885
- const [sMin, sMax] = theme === "light" ? [90, 100] : [80, 100];
36886
- const [lMin, lMax] = theme === "light" ? [78, 80] : [35, 50];
36896
+ const [sMin, sMax] = theme === "light" ? [90, 100] : [78, 80];
36897
+ const [lMin, lMax] = theme === "light" ? [78, 80] : [35, 40];
36887
36898
  const s = pickInRange(hash >>> 8, sMin, sMax);
36888
36899
  const l = pickInRange(hash >>> 16, lMin, lMax);
36889
36900
  return `hsl(${hue}, ${s}%, ${l}%)`;
@@ -49724,6 +49735,7 @@ const MaxTagPlacheolderLength = st$1.span`
49724
49735
  padding-left: 4px;
49725
49736
  border: 1px solid ${({ $colorBorder }) => $colorBorder};
49726
49737
  border-radius: 20px;
49738
+ margin-right: 8px;
49727
49739
  `;
49728
49740
  const OptionLabelKind = st$1.div`
49729
49741
  font-size: 14px;
@@ -49740,14 +49752,16 @@ const OptionLabelVersion = st$1.div`
49740
49752
  const BackgroundContainer = st$1.div`
49741
49753
  width: 100%;
49742
49754
  gap: 8px;
49743
- border: 1px solid ${({ $colorBorder }) => $colorBorder};
49755
+ border: 1px solid
49756
+ ${({ $visibleBackground, $colorBorder }) => $visibleBackground && $colorBorder ? $colorBorder : "transparent"};
49744
49757
  border-radius: 6px;
49745
- background: ${({ $colorBgLayout }) => $colorBgLayout};
49758
+ background: ${({ $visibleBackground, $colorBgLayout }) => $visibleBackground && $colorBgLayout ? $colorBgLayout : "initial"};
49746
49759
  padding: 8px;
49747
49760
  `;
49748
49761
  const FormContainer = st$1.div`
49749
49762
  display: grid;
49750
- grid-template-columns: 3fr 9fr;
49763
+ /* grid-template-columns: 3fr 9fr; */
49764
+ grid-template-columns: 3fr 130px 9fr;
49751
49765
  gap: 8px;
49752
49766
  `;
49753
49767
  const ResetedFormItem = st$1(Form.Item)`
@@ -49756,41 +49770,38 @@ const ResetedFormItem = st$1(Form.Item)`
49756
49770
  const HideableContainer = st$1.div`
49757
49771
  display: ${({ $isHidden }) => $isHidden ? "none" : "initial"};
49758
49772
  `;
49759
- const CompoundItem = st$1.div`
49773
+ const BottomTagsContainer = st$1.div`
49760
49774
  display: grid;
49761
- grid-template-columns: 130px 1fr;
49775
+ grid-template-columns: 1fr 50px;
49776
+ gap: 8px;
49777
+ margin-top: 8px;
49762
49778
  `;
49763
- const LeftSideSelect = st$1(Select)`
49764
- /* stylelint-disable declaration-no-important */
49765
-
49766
- .ant-select-selector {
49767
- border-top-right-radius: 0 !important;
49768
- border-bottom-right-radius: 0 !important;
49769
- border-right-width: 0 !important;
49770
- height: 32px !important;
49771
- }
49779
+ const OptionsFlex = st$1.div`
49780
+ display: flex;
49781
+ flex-flow: column;
49782
+ gap: 8px;
49772
49783
  `;
49773
- const RightSideInput = st$1(Input)`
49774
- &&&.ant-input-outlined {
49775
- border-top-left-radius: 0 !important;
49776
- border-bottom-left-radius: 0 !important;
49777
- border-left-width: 0 !important;
49778
- height: 32px !important;
49779
- }
49784
+ const BottomTagsRow = st$1.div`
49785
+ display: grid;
49786
+ grid-template-columns: 45px 1fr;
49787
+ gap: 4px;
49780
49788
  `;
49781
- const RightSideSelect = st$1(Select)`
49782
- .ant-select-selector {
49783
- border-top-left-radius: 0 !important;
49784
- border-bottom-left-radius: 0 !important;
49785
- border-left-width: 0 !important;
49786
- height: 32px !important;
49787
- }
49789
+ const BottomTagsRowText = st$1.div`
49790
+ color: ${({ $colorDescription }) => $colorDescription};
49791
+ font-size: 12px;
49792
+ font-style: italic;
49793
+ font-weight: 400;
49794
+ line-height: 14px; /* 116.667% */
49795
+ display: flex;
49796
+ justify-content: flex-end;
49797
+ align-items: flex-start;
49798
+ height: 100%;
49799
+ padding-top: 5px;
49788
49800
  `;
49789
49801
  const BottomTagsHolder = st$1.div`
49790
49802
  display: flex;
49791
49803
  gap: 4px;
49792
49804
  flex-wrap: wrap;
49793
- margin-top: 8px;
49794
49805
  `;
49795
49806
  const CustomTag = st$1(Tag)`
49796
49807
  font-size: 14px;
@@ -49800,13 +49811,14 @@ const CustomTag = st$1(Tag)`
49800
49811
  const Abbr = st$1.span`
49801
49812
  background-color: ${({ $bgColor }) => $bgColor};
49802
49813
  border-radius: 13px;
49803
- padding: 2px 5px;
49814
+ padding: 1px 5px;
49815
+ font-size: 13px;
49804
49816
  height: min-content;
49817
+ margin-right: 4px;
49805
49818
  `;
49806
49819
  const ClearButtonHolder = st$1.div`
49807
49820
  display: flex;
49808
49821
  justify-content: flex-end;
49809
- margin-top: 8px;
49810
49822
  `;
49811
49823
  const Styled = {
49812
49824
  SelectTag,
@@ -49819,10 +49831,14 @@ const Styled = {
49819
49831
  FormContainer,
49820
49832
  ResetedFormItem,
49821
49833
  HideableContainer,
49822
- CompoundItem,
49823
- LeftSideSelect,
49824
- RightSideInput,
49825
- RightSideSelect,
49834
+ // CompoundItem,
49835
+ // LeftSideSelect,
49836
+ // RightSideInput,
49837
+ // RightSideSelect,
49838
+ BottomTagsContainer,
49839
+ OptionsFlex,
49840
+ BottomTagsRow,
49841
+ BottomTagsRowText,
49826
49842
  BottomTagsHolder,
49827
49843
  CustomTag,
49828
49844
  Abbr,
@@ -49831,6 +49847,7 @@ const Styled = {
49831
49847
 
49832
49848
  const Search = ({ theme: theme$1, form, constants, kindsWithVersion }) => {
49833
49849
  const { token } = theme.useToken();
49850
+ const [sp, setSearchParams] = useSearchParams();
49834
49851
  const { FIELD_NAME, FIELD_NAME_STRING, FIELD_NAME_LABELS, FIELD_NAME_FIELDS, TYPE_SELECTOR } = constants;
49835
49852
  const watchedKinds = Form.useWatch(FIELD_NAME, form);
49836
49853
  const watchedName = Form.useWatch(FIELD_NAME_STRING, form);
@@ -49839,7 +49856,7 @@ const Search = ({ theme: theme$1, form, constants, kindsWithVersion }) => {
49839
49856
  const watchedTypedSelector = Form.useWatch(TYPE_SELECTOR, form);
49840
49857
  const options = kindsWithVersion.filter(({ version }) => version.verbs && version.verbs.includes("list")).map(({ kind, group, version }) => {
49841
49858
  const abbr = getUppercase(kind);
49842
- const bgColor = kind && kind.length ? hslFromString(abbr, theme$1) : "";
49859
+ const bgColor = kind && kind.length ? hslFromString(kind, theme$1) : "";
49843
49860
  return {
49844
49861
  label: /* @__PURE__ */ jsxRuntimeExports.jsxs(Flex, { gap: 8, align: "center", children: [
49845
49862
  bgColor.length && /* @__PURE__ */ jsxRuntimeExports.jsx(Styled.Abbr, { $bgColor: bgColor, children: abbr }),
@@ -49893,199 +49910,214 @@ const Search = ({ theme: theme$1, form, constants, kindsWithVersion }) => {
49893
49910
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: option.label })
49894
49911
  ] });
49895
49912
  };
49896
- return /* @__PURE__ */ jsxRuntimeExports.jsxs(Styled.BackgroundContainer, { $colorBorder: token.colorBorder, $colorBgLayout: token.colorBgLayout, children: [
49897
- /* @__PURE__ */ jsxRuntimeExports.jsx(Form, { form, layout: "vertical", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Styled.FormContainer, { children: [
49898
- /* @__PURE__ */ jsxRuntimeExports.jsx(Styled.ResetedFormItem, { name: FIELD_NAME, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
49899
- Select,
49900
- {
49901
- mode: "multiple",
49902
- placeholder: "Select",
49903
- options,
49904
- filterOption: (input, option) => (option?.value || "").toString().toLowerCase().includes(input.toLowerCase()),
49905
- allowClear: true,
49906
- showSearch: true,
49907
- maxTagCount: 0,
49908
- maxTagPlaceholder,
49909
- tagRender: maxTagTagRender,
49910
- menuItemSelectedIcon: null,
49911
- optionRender: kindOptionRender
49912
- }
49913
- ) }),
49914
- /* @__PURE__ */ jsxRuntimeExports.jsxs(Styled.CompoundItem, { children: [
49915
- /* @__PURE__ */ jsxRuntimeExports.jsx(Styled.ResetedFormItem, { name: TYPE_SELECTOR, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
49916
- Styled.LeftSideSelect,
49917
- {
49918
- placeholder: "Select",
49919
- options: [
49920
- { label: "Name", value: "name" },
49921
- { label: "Labels", value: "labels" },
49922
- { label: "Fields", value: "fields" }
49923
- ],
49924
- defaultValue: "name",
49925
- filterOption: filterSelectOptions,
49926
- showSearch: true
49927
- }
49928
- ) }),
49929
- /* @__PURE__ */ jsxRuntimeExports.jsx(
49930
- Styled.HideableContainer,
49931
- {
49932
- $isHidden: watchedTypedSelector === "labels" || watchedTypedSelector === "fields",
49933
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(Styled.ResetedFormItem, { name: FIELD_NAME_STRING, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Styled.RightSideInput, { allowClear: true, placeholder: "Name", disabled: !watchedKinds || !watchedKinds.length }) })
49934
- }
49935
- ),
49936
- /* @__PURE__ */ jsxRuntimeExports.jsx(
49937
- Styled.HideableContainer,
49938
- {
49939
- $isHidden: watchedTypedSelector === "name" || watchedTypedSelector === "fields" || watchedTypedSelector === void 0,
49940
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(
49941
- Styled.ResetedFormItem,
49942
- {
49943
- name: FIELD_NAME_LABELS,
49944
- validateTrigger: "onBlur",
49945
- rules: [
49946
- () => ({
49947
- validator(_, value) {
49948
- if (Array.isArray(value) && value.every((str) => typeof str === "string" && str.includes("=") && !str.startsWith("="))) {
49949
- return Promise.resolve();
49913
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs(
49914
+ Styled.BackgroundContainer,
49915
+ {
49916
+ $colorBorder: token.colorBorder,
49917
+ $colorBgLayout: token.colorBgLayout,
49918
+ $visibleBackground: Boolean(
49919
+ watchedKinds && watchedKinds.length || watchedName && watchedName.length || watchedLabels && watchedLabels.length || watchedFields && watchedFields.length
49920
+ ),
49921
+ children: [
49922
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Form, { form, layout: "vertical", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Styled.FormContainer, { children: [
49923
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Styled.ResetedFormItem, { name: FIELD_NAME, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
49924
+ Select,
49925
+ {
49926
+ mode: "multiple",
49927
+ placeholder: "Select kinds",
49928
+ options,
49929
+ filterOption: (input, option) => (option?.value || "").toString().toLowerCase().includes(input.toLowerCase()),
49930
+ allowClear: true,
49931
+ showSearch: true,
49932
+ maxTagCount: 0,
49933
+ maxTagPlaceholder,
49934
+ tagRender: maxTagTagRender,
49935
+ menuItemSelectedIcon: null,
49936
+ optionRender: kindOptionRender
49937
+ }
49938
+ ) }),
49939
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Styled.ResetedFormItem, { name: TYPE_SELECTOR, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
49940
+ Select,
49941
+ {
49942
+ placeholder: "Select",
49943
+ options: [
49944
+ { label: "Name", value: "name" },
49945
+ { label: "Labels", value: "labels" },
49946
+ { label: "Fields", value: "fields" }
49947
+ ],
49948
+ defaultValue: "name",
49949
+ filterOption: filterSelectOptions,
49950
+ showSearch: true
49951
+ }
49952
+ ) }),
49953
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Styled.HideableContainer, { $isHidden: watchedTypedSelector === "labels" || watchedTypedSelector === "fields", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Styled.ResetedFormItem, { name: FIELD_NAME_STRING, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Input, { allowClear: true, placeholder: "Name", disabled: !watchedKinds || !watchedKinds.length }) }) }),
49954
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
49955
+ Styled.HideableContainer,
49956
+ {
49957
+ $isHidden: watchedTypedSelector === "name" || watchedTypedSelector === "fields" || watchedTypedSelector === void 0,
49958
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(
49959
+ Styled.ResetedFormItem,
49960
+ {
49961
+ name: FIELD_NAME_LABELS,
49962
+ validateTrigger: "onBlur",
49963
+ rules: [
49964
+ () => ({
49965
+ validator(_, value) {
49966
+ if (Array.isArray(value) && value.every((str) => typeof str === "string" && str.includes("=") && !str.startsWith("="))) {
49967
+ return Promise.resolve();
49968
+ }
49969
+ return Promise.reject(new Error("Please enter key=value style"));
49950
49970
  }
49951
- return Promise.reject(new Error("Please enter key=value style"));
49971
+ })
49972
+ ],
49973
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(
49974
+ Select,
49975
+ {
49976
+ mode: "tags",
49977
+ allowClear: true,
49978
+ placeholder: "Key=Value",
49979
+ tokenSeparators: [",", " ", " "],
49980
+ suffixIcon: null,
49981
+ filterOption: filterSelectOptions,
49982
+ tagRender,
49983
+ maxTagCount: "responsive",
49984
+ disabled: !watchedKinds || !watchedKinds.length
49952
49985
  }
49953
- })
49954
- ],
49955
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(
49956
- Styled.RightSideSelect,
49957
- {
49958
- mode: "tags",
49959
- allowClear: true,
49960
- placeholder: "Key=Value",
49961
- tokenSeparators: [",", " ", " "],
49962
- suffixIcon: null,
49963
- filterOption: filterSelectOptions,
49964
- tagRender,
49965
- maxTagCount: "responsive",
49966
- disabled: !watchedKinds || !watchedKinds.length
49967
- }
49968
- )
49969
- }
49970
- )
49971
- }
49972
- ),
49973
- /* @__PURE__ */ jsxRuntimeExports.jsx(
49974
- Styled.HideableContainer,
49975
- {
49976
- $isHidden: watchedTypedSelector === "name" || watchedTypedSelector === "labels" || watchedTypedSelector === void 0,
49977
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(
49978
- Styled.ResetedFormItem,
49979
- {
49980
- name: FIELD_NAME_FIELDS,
49981
- validateTrigger: "onBlur",
49982
- rules: [
49983
- () => ({
49984
- validator(_, value) {
49985
- if (Array.isArray(value) && value.every((str) => typeof str === "string" && str.includes("=") && !str.startsWith("="))) {
49986
- return Promise.resolve();
49986
+ )
49987
+ }
49988
+ )
49989
+ }
49990
+ ),
49991
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
49992
+ Styled.HideableContainer,
49993
+ {
49994
+ $isHidden: watchedTypedSelector === "name" || watchedTypedSelector === "labels" || watchedTypedSelector === void 0,
49995
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(
49996
+ Styled.ResetedFormItem,
49997
+ {
49998
+ name: FIELD_NAME_FIELDS,
49999
+ validateTrigger: "onBlur",
50000
+ rules: [
50001
+ () => ({
50002
+ validator(_, value) {
50003
+ if (Array.isArray(value) && value.every((str) => typeof str === "string" && str.includes("=") && !str.startsWith("="))) {
50004
+ return Promise.resolve();
50005
+ }
50006
+ return Promise.reject(new Error("Please enter key=value style"));
49987
50007
  }
49988
- return Promise.reject(new Error("Please enter key=value style"));
50008
+ })
50009
+ ],
50010
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(
50011
+ Select,
50012
+ {
50013
+ mode: "tags",
50014
+ allowClear: true,
50015
+ placeholder: "Key=Value",
50016
+ tokenSeparators: [",", " ", " "],
50017
+ suffixIcon: null,
50018
+ filterOption: filterSelectOptions,
50019
+ tagRender,
50020
+ maxTagCount: "responsive",
50021
+ disabled: !watchedKinds || !watchedKinds.length
49989
50022
  }
49990
- })
49991
- ],
49992
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(
49993
- Styled.RightSideSelect,
50023
+ )
50024
+ }
50025
+ )
50026
+ }
50027
+ )
50028
+ ] }) }),
50029
+ watchedKinds && watchedKinds.length || watchedName && watchedName.length || watchedLabels && watchedLabels.length || watchedFields && watchedFields.length ? /* @__PURE__ */ jsxRuntimeExports.jsxs(Styled.BottomTagsContainer, { children: [
50030
+ /* @__PURE__ */ jsxRuntimeExports.jsxs(Styled.OptionsFlex, { children: [
50031
+ watchedKinds && watchedKinds.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs(Styled.BottomTagsRow, { children: [
50032
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Styled.BottomTagsRowText, { $colorDescription: token.colorTextDescription, children: "Kinds:" }),
50033
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Styled.BottomTagsHolder, { children: watchedKinds.map((fullKindName) => {
50034
+ const kind = getKindByGvr(fullKindName);
50035
+ const abbr = getUppercase(kind && kind.length ? kind : "Loading");
50036
+ const bgColor = kind && kind.length ? hslFromString(kind, theme$1) : "";
50037
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs(
50038
+ Styled.CustomTag,
49994
50039
  {
49995
- mode: "tags",
49996
- allowClear: true,
49997
- placeholder: "Key=Value",
49998
- tokenSeparators: [",", " ", " "],
49999
- suffixIcon: null,
50000
- filterOption: filterSelectOptions,
50001
- tagRender,
50002
- maxTagCount: "responsive",
50003
- disabled: !watchedKinds || !watchedKinds.length
50004
- }
50005
- )
50006
- }
50007
- )
50008
- }
50009
- )
50010
- ] })
50011
- ] }) }),
50012
- watchedKinds && watchedKinds.length || watchedName && watchedName.length || watchedLabels && watchedLabels.length || watchedFields && watchedFields.length ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
50013
- /* @__PURE__ */ jsxRuntimeExports.jsxs(Styled.BottomTagsHolder, { children: [
50014
- watchedKinds && watchedKinds.map((fullKindName) => {
50015
- const kind = getKindByGvr(fullKindName);
50016
- const abbr = getUppercase(kind && kind.length ? kind : "Loading");
50017
- const bgColor = kind && kind.length ? hslFromString(abbr, theme$1) : "";
50018
- return /* @__PURE__ */ jsxRuntimeExports.jsxs(
50019
- Styled.CustomTag,
50040
+ onClose: (e) => {
50041
+ e.preventDefault();
50042
+ removeKind(fullKindName);
50043
+ },
50044
+ closable: true,
50045
+ children: [
50046
+ kind && kind.length && bgColor.length && /* @__PURE__ */ jsxRuntimeExports.jsx(Styled.Abbr, { $bgColor: bgColor, children: abbr }),
50047
+ kind
50048
+ ]
50049
+ },
50050
+ fullKindName
50051
+ );
50052
+ }) })
50053
+ ] }),
50054
+ watchedName && watchedName.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs(Styled.BottomTagsRow, { children: [
50055
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Styled.BottomTagsRowText, { $colorDescription: token.colorTextDescription, children: "Name:" }),
50056
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Styled.BottomTagsHolder, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
50057
+ Styled.CustomTag,
50058
+ {
50059
+ onClose: (e) => {
50060
+ e.preventDefault();
50061
+ clearName();
50062
+ },
50063
+ closable: true,
50064
+ children: watchedName
50065
+ }
50066
+ ) })
50067
+ ] }),
50068
+ watchedLabels && watchedLabels.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs(Styled.BottomTagsRow, { children: [
50069
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Styled.BottomTagsRowText, { $colorDescription: token.colorTextDescription, children: "Labels:" }),
50070
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Styled.BottomTagsHolder, { children: watchedLabels.map((label) => /* @__PURE__ */ jsxRuntimeExports.jsx(
50071
+ Styled.CustomTag,
50072
+ {
50073
+ onClose: (e) => {
50074
+ e.preventDefault();
50075
+ removeLabel(label);
50076
+ },
50077
+ closable: true,
50078
+ children: label
50079
+ },
50080
+ label
50081
+ )) })
50082
+ ] }),
50083
+ watchedFields && watchedFields.length > 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs(Styled.BottomTagsRow, { children: [
50084
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Styled.BottomTagsRowText, { $colorDescription: token.colorTextDescription, children: "Fields:" }),
50085
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Styled.BottomTagsHolder, { children: watchedFields.map((field) => /* @__PURE__ */ jsxRuntimeExports.jsx(
50086
+ Styled.CustomTag,
50087
+ {
50088
+ onClose: (e) => {
50089
+ e.preventDefault();
50090
+ removeField(field);
50091
+ },
50092
+ closable: true,
50093
+ children: field
50094
+ },
50095
+ field
50096
+ )) })
50097
+ ] })
50098
+ ] }),
50099
+ /* @__PURE__ */ jsxRuntimeExports.jsx(Styled.ClearButtonHolder, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
50100
+ Button,
50020
50101
  {
50021
- onClose: (e) => {
50022
- e.preventDefault();
50023
- removeKind(fullKindName);
50102
+ type: "primary",
50103
+ onClick: () => {
50104
+ setSearchParams(new URLSearchParams());
50105
+ form.setFieldsValue({
50106
+ [FIELD_NAME]: [],
50107
+ [FIELD_NAME_STRING]: "",
50108
+ [FIELD_NAME_LABELS]: [],
50109
+ [FIELD_NAME_FIELDS]: [],
50110
+ [TYPE_SELECTOR]: "name"
50111
+ // reset selector to default
50112
+ });
50024
50113
  },
50025
- closable: true,
50026
- children: [
50027
- kind && kind.length && bgColor.length && /* @__PURE__ */ jsxRuntimeExports.jsx(Styled.Abbr, { $bgColor: bgColor, children: abbr }),
50028
- kind
50029
- ]
50030
- },
50031
- fullKindName
50032
- );
50033
- }),
50034
- watchedName && /* @__PURE__ */ jsxRuntimeExports.jsx(
50035
- Styled.CustomTag,
50036
- {
50037
- onClose: (e) => {
50038
- e.preventDefault();
50039
- clearName();
50040
- },
50041
- closable: true,
50042
- children: watchedName
50043
- }
50044
- ),
50045
- watchedLabels && watchedLabels.map((label) => /* @__PURE__ */ jsxRuntimeExports.jsx(
50046
- Styled.CustomTag,
50047
- {
50048
- onClose: (e) => {
50049
- e.preventDefault();
50050
- removeLabel(label);
50051
- },
50052
- closable: true,
50053
- children: label
50054
- },
50055
- label
50056
- )),
50057
- watchedFields && watchedFields.map((field) => /* @__PURE__ */ jsxRuntimeExports.jsx(
50058
- Styled.CustomTag,
50059
- {
50060
- onClose: (e) => {
50061
- e.preventDefault();
50062
- removeField(field);
50063
- },
50064
- closable: true,
50065
- children: field
50066
- },
50067
- field
50068
- ))
50069
- ] }),
50070
- /* @__PURE__ */ jsxRuntimeExports.jsx(Styled.ClearButtonHolder, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
50071
- Button,
50072
- {
50073
- type: "primary",
50074
- onClick: () => {
50075
- form.setFieldsValue({
50076
- [FIELD_NAME]: [],
50077
- [FIELD_NAME_STRING]: "",
50078
- [FIELD_NAME_LABELS]: [],
50079
- [FIELD_NAME_FIELDS]: [],
50080
- [TYPE_SELECTOR]: "name"
50081
- // reset selector to default
50082
- });
50083
- },
50084
- children: "Clear"
50085
- }
50086
- ) })
50087
- ] }) : void 0
50088
- ] });
50114
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(ClearOutlined, {})
50115
+ }
50116
+ ) })
50117
+ ] }) : void 0
50118
+ ]
50119
+ }
50120
+ );
50089
50121
  };
50090
50122
 
50091
50123
  const isLeafNode = (value) => {
@@ -50668,5 +50700,5 @@ const useCrdData = ({
50668
50700
  });
50669
50701
  };
50670
50702
 
50671
- export { BackToDefaultIcon, BlackholeForm, BlackholeFormDataProvider, ContentCard$1 as ContentCard, CursorDefaultDiv, CursorPointerTag, CustomSelect$4 as CustomSelect, DeleteIcon, DeleteModal, DeleteModalMany, DownIcon, DynamicComponents, DynamicRenderer, DynamicRendererWithProviders, EditIcon, EnrichedTable, EnrichedTableProvider, FlexGrow, LockedIcon, ManageableBreadcrumbs, ManageableBreadcrumbsWithDataProvider, ManageableSidebar, ManageableSidebarWithDataProvider, MarketPlace, MarketplaceCard, MinusIcon, NodeTerminal, PauseCircleIcon, PlusIcon, PodLogs, PodLogsMonaco, PodTerminal, ProjectInfoCard, ResumeCircleIcon, Search, Spacer$1 as Spacer, SuccessIcon, TreeWithSearch, UncontrolledSelect, UnlockedIcon, UpIcon, YamlEditorSingleton, checkIfApiInstanceNamespaceScoped, checkIfBuiltInInstanceNamespaceScoped, checkPermission, createContextFactory, createNewEntry, deepMerge, deleteEntry, feedbackIcons, filterIfApiInstanceNamespaceScoped, filterIfBuiltInInstanceNamespaceScoped, filterSelectOptions, floorToDecimal, getAllPathsFromObj, getApiResourceSingle, getApiResourceTypes, getApiResourceTypesByApiGroup, getApiResources, getBuiltinResourceSingle, getBuiltinResourceTypes, getBuiltinResources, getBuiltinTreeData, getClusterList, getCrdData, getCrdResourceSingle, getCrdResources, getDirectUnknownResource, getEnrichedColumns, getEnrichedColumnsWithControls, getGroupsByCategory, getKinds, getObjectFormItemsDraft, getPrefixSubarrays, getSortedKinds, getStringByName, getSwagger, getUppercase, groupsToTreeData, hslFromString, isFlatObject, kindByGvr, namespacedByGvr, normalizeValuesForQuotasToNumber, parseQuotaValue, parseQuotaValueCpu, parseQuotaValueMemoryAndStorage, prepareDataForManageableBreadcrumbs, prepareDataForManageableSidebar, prepareTemplate, prepareUrlsToFetchForDynamicRenderer, updateEntry, useApiResourceSingle, useApiResourceTypesByGroup, useApiResources, useApisResourceTypes, useBuiltinResourceSingle, useBuiltinResourceTypes, useBuiltinResources, useClusterList, useCrdData, useCrdResourceSingle, useCrdResources, useDirectUnknownResource, usePermissions };
50703
+ export { BackToDefaultIcon, BlackholeForm, BlackholeFormDataProvider, ContentCard$1 as ContentCard, CursorDefaultDiv, CursorPointerTag, CustomSelect$4 as CustomSelect, DeleteIcon, DeleteModal, DeleteModalMany, DownIcon, DynamicComponents, DynamicRenderer, DynamicRendererWithProviders, EditIcon, EnrichedTable, EnrichedTableProvider, FlexGrow, LockedIcon, LookingGlassIcon, ManageableBreadcrumbs, ManageableBreadcrumbsWithDataProvider, ManageableSidebar, ManageableSidebarWithDataProvider, MarketPlace, MarketplaceCard, MinusIcon, NodeTerminal, PauseCircleIcon, PlusIcon, PodLogs, PodLogsMonaco, PodTerminal, ProjectInfoCard, ResumeCircleIcon, Search, Spacer$1 as Spacer, SuccessIcon, TreeWithSearch, UncontrolledSelect, UnlockedIcon, UpIcon, YamlEditorSingleton, checkIfApiInstanceNamespaceScoped, checkIfBuiltInInstanceNamespaceScoped, checkPermission, createContextFactory, createNewEntry, deepMerge, deleteEntry, feedbackIcons, filterIfApiInstanceNamespaceScoped, filterIfBuiltInInstanceNamespaceScoped, filterSelectOptions, floorToDecimal, getAllPathsFromObj, getApiResourceSingle, getApiResourceTypes, getApiResourceTypesByApiGroup, getApiResources, getBuiltinResourceSingle, getBuiltinResourceTypes, getBuiltinResources, getBuiltinTreeData, getClusterList, getCrdData, getCrdResourceSingle, getCrdResources, getDirectUnknownResource, getEnrichedColumns, getEnrichedColumnsWithControls, getGroupsByCategory, getKinds, getObjectFormItemsDraft, getPrefixSubarrays, getSortedKinds, getStringByName, getSwagger, getUppercase, groupsToTreeData, hslFromString, isFlatObject, kindByGvr, namespacedByGvr, normalizeValuesForQuotasToNumber, parseQuotaValue, parseQuotaValueCpu, parseQuotaValueMemoryAndStorage, prepareDataForManageableBreadcrumbs, prepareDataForManageableSidebar, prepareTemplate, prepareUrlsToFetchForDynamicRenderer, updateEntry, useApiResourceSingle, useApiResourceTypesByGroup, useApiResources, useApisResourceTypes, useBuiltinResourceSingle, useBuiltinResourceTypes, useBuiltinResources, useClusterList, useCrdData, useCrdResourceSingle, useCrdResources, useDirectUnknownResource, usePermissions };
50672
50704
  //# sourceMappingURL=openapi-k8s-toolkit.es.js.map