@prorobotech/openapi-k8s-toolkit 0.0.1-alpha.98 → 1.0.3

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.
Files changed (149) hide show
  1. package/dist/openapi-k8s-toolkit.es.js +41828 -37516
  2. package/dist/openapi-k8s-toolkit.es.js.map +1 -1
  3. package/dist/openapi-k8s-toolkit.umd.js +51488 -47155
  4. package/dist/openapi-k8s-toolkit.umd.js.map +1 -1
  5. package/dist/types/api/bff/search/getKinds.d.ts +4 -0
  6. package/dist/types/api/forms.d.ts +4 -4
  7. package/dist/types/api/getApiResource.d.ts +6 -3
  8. package/dist/types/api/getApiResourceTypes.d.ts +2 -2
  9. package/dist/types/api/getBuiltinResource.d.ts +6 -3
  10. package/dist/types/api/getBuiltinResourceTypes.d.ts +1 -1
  11. package/dist/types/api/getCrdData.d.ts +1 -1
  12. package/dist/types/api/getCrdResource.d.ts +2 -2
  13. package/dist/types/api/getDirectUnknownResource.d.ts +1 -1
  14. package/dist/types/api/permissions.d.ts +4 -3
  15. package/dist/types/components/atoms/CursorDefaultDiv/CursorDefaultDiv.d.ts +6 -0
  16. package/dist/types/components/atoms/CursorDefaultDiv/index.d.ts +1 -0
  17. package/dist/types/components/atoms/CursorPointerTagMinContent/CursorPointerTagMinContent.d.ts +285 -0
  18. package/dist/types/components/atoms/CursorPointerTagMinContent/index.d.ts +1 -0
  19. package/dist/types/components/atoms/Icons/BackToDefaultIcon.d.ts +5 -1
  20. package/dist/types/components/atoms/Icons/DeleteIcon.d.ts +6 -1
  21. package/dist/types/components/atoms/Icons/DownIcon.d.ts +5 -1
  22. package/dist/types/components/atoms/Icons/EarthIcon.d.ts +6 -0
  23. package/dist/types/components/atoms/Icons/EditIcon.d.ts +6 -1
  24. package/dist/types/components/atoms/Icons/LockedIcon.d.ts +5 -1
  25. package/dist/types/components/atoms/Icons/LookingGlassIcon.d.ts +7 -0
  26. package/dist/types/components/atoms/Icons/MinusIcon.d.ts +5 -1
  27. package/dist/types/components/atoms/Icons/PauseCircleIcon.d.ts +5 -1
  28. package/dist/types/components/atoms/Icons/PlusIcon.d.ts +5 -1
  29. package/dist/types/components/atoms/Icons/ResumeCircleIcon.d.ts +5 -1
  30. package/dist/types/components/atoms/Icons/SuccessIcon.d.ts +5 -1
  31. package/dist/types/components/atoms/Icons/UnlockedIcon.d.ts +5 -1
  32. package/dist/types/components/atoms/Icons/UpIcon.d.ts +5 -1
  33. package/dist/types/components/atoms/Icons/index.d.ts +2 -0
  34. package/dist/types/components/atoms/PaddingContainer/PaddingContainer.d.ts +6 -0
  35. package/dist/types/components/atoms/PaddingContainer/index.d.ts +1 -0
  36. package/dist/types/components/atoms/index.d.ts +3 -0
  37. package/dist/types/components/molecules/BlackholeForm/atoms/HiddenContainer/HiddenContainer.d.ts +2 -4
  38. package/dist/types/components/molecules/BlackholeForm/atoms/HiddenContainer/utils.d.ts +3 -0
  39. package/dist/types/components/molecules/BlackholeForm/molecules/FormInlineYamlEditor/FormInlineYamlEditor.d.ts +7 -0
  40. package/dist/types/components/molecules/BlackholeForm/molecules/FormInlineYamlEditor/index.d.ts +1 -0
  41. package/dist/types/components/molecules/BlackholeForm/molecules/FormInlineYamlEditor/styled.d.ts +8 -0
  42. package/dist/types/components/molecules/BlackholeForm/molecules/FormListInput/utils.d.ts +5 -0
  43. package/dist/types/components/molecules/BlackholeForm/molecules/FormStringMultilineInput/FormStringMultilineInput.d.ts +20 -0
  44. package/dist/types/components/molecules/BlackholeForm/molecules/FormStringMultilineInput/helpers.d.ts +2 -0
  45. package/dist/types/components/molecules/BlackholeForm/molecules/FormStringMultilineInput/index.d.ts +1 -0
  46. package/dist/types/components/molecules/BlackholeForm/molecules/FormStringMultilineInput/styled.d.ts +548 -0
  47. package/dist/types/components/molecules/BlackholeForm/molecules/YamlEditor/YamlEditor.d.ts +1 -0
  48. package/dist/types/components/molecules/BlackholeForm/molecules/YamlEditor/styled.d.ts +5 -273
  49. package/dist/types/components/molecules/BlackholeForm/molecules/YamlEditorSingleton/YamlEditorSingleton.d.ts +1 -0
  50. package/dist/types/components/molecules/BlackholeForm/molecules/YamlEditorSingleton/styled.d.ts +1 -0
  51. package/dist/types/components/molecules/BlackholeForm/molecules/index.d.ts +2 -0
  52. package/dist/types/components/molecules/BlackholeForm/organisms/BlackholeForm/BlackholeForm.d.ts +1 -0
  53. package/dist/types/components/molecules/BlackholeForm/organisms/BlackholeForm/helpers/casts.d.ts +43 -0
  54. package/dist/types/components/molecules/BlackholeForm/organisms/BlackholeForm/helpers/debugs.d.ts +8 -0
  55. package/dist/types/components/molecules/BlackholeForm/organisms/BlackholeForm/helpers/getSortedPropertyKeys.d.ts +9 -0
  56. package/dist/types/components/molecules/BlackholeForm/organisms/BlackholeForm/helpers/hiddenExpanded.d.ts +8 -0
  57. package/dist/types/components/molecules/BlackholeForm/organisms/BlackholeForm/helpers/prefills.d.ts +10 -0
  58. package/dist/types/components/molecules/BlackholeForm/organisms/BlackholeForm/utils.d.ts +22 -3
  59. package/dist/types/components/molecules/EnrichedTable/molecules/TableFactory/TableFactory.d.ts +9 -0
  60. package/dist/types/components/molecules/EnrichedTable/molecules/TableFactory/index.d.ts +1 -0
  61. package/dist/types/components/molecules/EnrichedTable/molecules/index.d.ts +1 -0
  62. package/dist/types/components/molecules/EnrichedTable/organisms/EnrichedTable/EnrichedTable.d.ts +5 -4
  63. package/dist/types/components/molecules/EnrichedTable/organisms/EnrichedTable/utils.d.ts +16 -2
  64. package/dist/types/components/molecules/EnrichedTable/organisms/EnrichedTableProvider/EnrichedTableProvider.d.ts +10 -8
  65. package/dist/types/components/molecules/Events/Events.d.ts +16 -0
  66. package/dist/types/components/molecules/Events/index.d.ts +1 -0
  67. package/dist/types/components/molecules/Events/molecules/EventRow/EventRow.d.ts +16 -0
  68. package/dist/types/components/molecules/Events/molecules/EventRow/index.d.ts +1 -0
  69. package/dist/types/components/molecules/Events/molecules/EventRow/styled.d.ts +830 -0
  70. package/dist/types/components/molecules/Events/molecules/EventRow/utils.d.ts +24 -0
  71. package/dist/types/components/molecules/Events/molecules/index.d.ts +1 -0
  72. package/dist/types/components/molecules/Events/reducer.d.ts +20 -0
  73. package/dist/types/components/molecules/Events/styled.d.ts +1650 -0
  74. package/dist/types/components/molecules/Events/types.d.ts +57 -0
  75. package/dist/types/components/molecules/Events/utils.d.ts +11 -0
  76. package/dist/types/components/molecules/ManageableSidebar/types.d.ts +1 -0
  77. package/dist/types/components/molecules/ManageableSidebar/utils.d.ts +1 -0
  78. package/dist/types/components/molecules/MarketPlace/MarketPlace.d.ts +2 -0
  79. package/dist/types/components/molecules/MarketPlace/molecules/MarketplaceCard/MarketplaceCard.d.ts +1 -0
  80. package/dist/types/components/molecules/ProjectInfoCard/ProjectInfoCard.d.ts +1 -0
  81. package/dist/types/components/molecules/Search/Search.d.ts +18 -0
  82. package/dist/types/components/molecules/Search/index.d.ts +1 -0
  83. package/dist/types/components/molecules/Search/styled.d.ts +3361 -0
  84. package/dist/types/components/molecules/index.d.ts +2 -0
  85. package/dist/types/components/organisms/DynamicComponents/molecules/Annotations/Annotations.d.ts +6 -0
  86. package/dist/types/components/organisms/DynamicComponents/molecules/Annotations/index.d.ts +1 -0
  87. package/dist/types/components/organisms/DynamicComponents/molecules/Annotations/molecules/EditModal/EditModal.d.ts +19 -0
  88. package/dist/types/components/organisms/DynamicComponents/molecules/Annotations/molecules/EditModal/index.d.ts +1 -0
  89. package/dist/types/components/organisms/DynamicComponents/molecules/Annotations/molecules/EditModal/styled.d.ts +23 -0
  90. package/dist/types/components/organisms/DynamicComponents/molecules/Annotations/molecules/index.d.ts +1 -0
  91. package/dist/types/components/organisms/DynamicComponents/molecules/Annotations/types.d.ts +1 -0
  92. package/dist/types/components/organisms/DynamicComponents/molecules/Annotations/utils.d.ts +6 -0
  93. package/dist/types/components/organisms/DynamicComponents/molecules/ConverterBytes/ConverterBytes.d.ts +5 -0
  94. package/dist/types/components/organisms/DynamicComponents/molecules/ConverterBytes/index.d.ts +1 -0
  95. package/dist/types/components/organisms/DynamicComponents/molecules/ConverterBytes/types.d.ts +10 -0
  96. package/dist/types/components/organisms/DynamicComponents/molecules/ConverterBytes/utils.d.ts +15 -0
  97. package/dist/types/components/organisms/DynamicComponents/molecules/EnrichedTable/utils.d.ts +1 -0
  98. package/dist/types/components/organisms/DynamicComponents/molecules/Events/Events.d.ts +6 -0
  99. package/dist/types/components/organisms/DynamicComponents/molecules/Events/index.d.ts +1 -0
  100. package/dist/types/components/organisms/DynamicComponents/molecules/Events/utils.d.ts +1 -0
  101. package/dist/types/components/organisms/DynamicComponents/molecules/Labels/molecules/EditModal/EditModal.d.ts +3 -1
  102. package/dist/types/components/organisms/DynamicComponents/molecules/LabelsToSearchParams/utils.d.ts +1 -0
  103. package/dist/types/components/organisms/DynamicComponents/molecules/ResourceBadge/ResourceBadge.d.ts +5 -0
  104. package/dist/types/components/organisms/DynamicComponents/molecules/ResourceBadge/index.d.ts +1 -0
  105. package/dist/types/components/organisms/DynamicComponents/molecules/ResourceBadge/styled.d.ts +8 -0
  106. package/dist/types/components/organisms/DynamicComponents/molecules/SecretBase64Plain/SecretBase64Plain.d.ts +5 -0
  107. package/dist/types/components/organisms/DynamicComponents/molecules/SecretBase64Plain/index.d.ts +1 -0
  108. package/dist/types/components/organisms/DynamicComponents/molecules/SecretBase64Plain/styled.d.ts +282 -0
  109. package/dist/types/components/organisms/DynamicComponents/molecules/StatusText/utils.d.ts +4 -2
  110. package/dist/types/components/organisms/DynamicComponents/molecules/Taints/molecules/EditModal/EditModal.d.ts +3 -1
  111. package/dist/types/components/organisms/DynamicComponents/molecules/Tolerations/molecules/EditModal/EditModal.d.ts +3 -1
  112. package/dist/types/components/organisms/DynamicComponents/molecules/index.d.ts +5 -0
  113. package/dist/types/components/organisms/DynamicComponents/types.d.ts +100 -10
  114. package/dist/types/components/organisms/DynamicRendererWithProviders/DynamicRendererWithProviders.d.ts +2 -0
  115. package/dist/types/components/organisms/DynamicRendererWithProviders/multiQueryProvider.d.ts +1 -0
  116. package/dist/types/hooks/useApiResource.d.ts +5 -1
  117. package/dist/types/hooks/useBuiltinResource.d.ts +5 -1
  118. package/dist/types/hooks/useCrdResource.d.ts +2 -1
  119. package/dist/types/hooks/usePermissions.d.ts +5 -4
  120. package/dist/types/index.d.ts +3 -0
  121. package/dist/types/localTypes/bff/form.d.ts +1 -0
  122. package/dist/types/localTypes/bff/search.d.ts +20 -0
  123. package/dist/types/localTypes/bff/table.d.ts +11 -4
  124. package/dist/types/localTypes/formExtensions.d.ts +9 -9
  125. package/dist/types/localTypes/richTable.d.ts +7 -2
  126. package/dist/types/localTypes/search.d.ts +7 -0
  127. package/dist/types/utils/deepMerge/deepMerge.d.ts +7 -0
  128. package/dist/types/utils/deepMerge/index.d.ts +1 -0
  129. package/dist/types/utils/getSortedKinds/getSortedKinds.d.ts +3 -0
  130. package/dist/types/utils/getSortedKinds/index.d.ts +1 -0
  131. package/dist/types/utils/getSortedKindsAll/getSortedKindsAll.d.ts +8 -0
  132. package/dist/types/utils/getSortedKindsAll/index.d.ts +1 -0
  133. package/dist/types/utils/getUppercase/getUppercase.d.ts +1 -0
  134. package/dist/types/utils/getUppercase/index.d.ts +1 -0
  135. package/dist/types/utils/hslFromString/hslFromString.d.ts +9 -0
  136. package/dist/types/utils/hslFromString/index.d.ts +1 -0
  137. package/dist/types/utils/index.d.ts +10 -0
  138. package/dist/types/utils/isMultilineString/index.d.ts +1 -0
  139. package/dist/types/utils/isMultilineString/isMultilineString.d.ts +13 -0
  140. package/dist/types/utils/isMultilineString/isMultilineString.test.d.ts +1 -0
  141. package/dist/types/utils/kindByGvr/index.d.ts +1 -0
  142. package/dist/types/utils/kindByGvr/kindByGvr.d.ts +6 -0
  143. package/dist/types/utils/namespacedByGvr/index.d.ts +1 -0
  144. package/dist/types/utils/namespacedByGvr/namespacedByGvr.d.ts +6 -0
  145. package/dist/types/utils/pluralByKind/index.d.ts +1 -0
  146. package/dist/types/utils/pluralByKind/pluralByKind.d.ts +10 -0
  147. package/dist/types/utils/tableLocations/index.d.ts +1 -0
  148. package/dist/types/utils/tableLocations/tableLocations.d.ts +36 -0
  149. package/package.json +3 -2
@@ -4,6 +4,7 @@ import type { TextProps } from 'antd/es/typography/Text';
4
4
  import type { LinkProps } from 'antd/es/typography/Link';
5
5
  import { TContentCardProps, TSpacerProps } from '../../atoms';
6
6
  import { TManageableSidebarWithDataProviderProps, TEnrichedTableProviderProps } from '../../molecules';
7
+ import { TUnitInput } from './molecules/ConverterBytes/types';
7
8
  export type TDynamicComponentsAppTypeMap = {
8
9
  DefaultDiv: {
9
10
  id: number | string;
@@ -62,6 +63,7 @@ export type TDynamicComponentsAppTypeMap = {
62
63
  mpResourceName: string;
63
64
  accessGroups: string[];
64
65
  baseprefix?: string;
66
+ showZeroResources?: boolean;
65
67
  };
66
68
  MarketplaceCard: {
67
69
  id: number | string;
@@ -73,6 +75,8 @@ export type TDynamicComponentsAppTypeMap = {
73
75
  mpResourceKind: string;
74
76
  baseprefix?: string;
75
77
  standalone?: boolean;
78
+ forceAddedMode?: boolean;
79
+ showZeroResources?: boolean;
76
80
  };
77
81
  ContentCard: {
78
82
  id: number | string;
@@ -82,9 +86,11 @@ export type TDynamicComponentsAppTypeMap = {
82
86
  } & TSpacerProps;
83
87
  StatusText: {
84
88
  id: number | string;
85
- value: string;
89
+ values: string[];
86
90
  criteriaSuccess: 'equals' | 'notEquals';
87
91
  criteriaError: 'equals' | 'notEquals';
92
+ stategySuccess?: 'some' | 'every';
93
+ strategyError?: 'some' | 'every';
88
94
  valueToCompareSuccess: unknown[];
89
95
  valueToCompareError: unknown[];
90
96
  successText: string;
@@ -97,18 +103,15 @@ export type TDynamicComponentsAppTypeMap = {
97
103
  EnrichedTable: {
98
104
  id: number | string;
99
105
  fetchUrl: string;
100
- pathToItems: string[];
106
+ pathToItems: string | string[];
101
107
  clusterNamePartOfUrl: string;
102
- labelsSelector?: Record<string, string>;
103
- labelsSelectorFull?: {
108
+ labelSelector?: Record<string, string>;
109
+ labelSelectorFull?: {
104
110
  reqIndex: number;
105
- pathToLabels: string[];
106
- };
107
- fieldSelector?: {
108
- fieldName: string;
109
- parsedText: string;
111
+ pathToLabels: string | string[];
110
112
  };
111
- } & Omit<TEnrichedTableProviderProps, 'tableMappingsReplaceValues' | 'cluster' | 'theme' | 'tableProps' | 'dataItems' | 'withoutControls'>;
113
+ fieldSelector?: Record<string, string>;
114
+ } & Omit<TEnrichedTableProviderProps, 'tableMappingsReplaceValues' | 'withoutControls' | 'cluster' | 'theme' | 'tableProps' | 'dataItems' | 'dataForControlsInternal'>;
112
115
  PodTerminal: {
113
116
  id: number | string;
114
117
  cluster: string;
@@ -139,6 +142,7 @@ export type TDynamicComponentsAppTypeMap = {
139
142
  typeName: string;
140
143
  prefillValuesRequestIndex: number;
141
144
  substractHeight?: number;
145
+ readOnly?: boolean;
142
146
  };
143
147
  VisibilityContainer: {
144
148
  id: number | string;
@@ -176,13 +180,22 @@ export type TDynamicComponentsAppTypeMap = {
176
180
  id: number | string;
177
181
  reqIndex: string;
178
182
  jsonPathToLabels: string;
183
+ linkPrefix?: string;
179
184
  selectProps?: SelectProps;
185
+ maxTagKeyLength?: number;
186
+ maxTagValueLength?: number;
187
+ verticalViewList?: boolean;
188
+ verticalViewListFlexProps?: FlexProps;
189
+ emptyListMessage?: string;
190
+ emptyListMessageStyle?: CSSProperties;
180
191
  readOnly?: true;
181
192
  notificationSuccessMessage?: string;
182
193
  notificationSuccessMessageDescription?: string;
183
194
  modalTitle?: string;
184
195
  modalDescriptionText?: string;
196
+ modalDescriptionTextStyle?: CSSProperties;
185
197
  inputLabel?: string;
198
+ inputLabelStyle?: CSSProperties;
186
199
  containerStyle?: CSSProperties;
187
200
  maxEditTagTextLength?: number;
188
201
  allowClearEditSelect?: boolean;
@@ -196,6 +209,9 @@ export type TDynamicComponentsAppTypeMap = {
196
209
  reqIndex: string;
197
210
  jsonPathToLabels: string;
198
211
  linkPrefix: string;
212
+ textLink?: string;
213
+ errorText: string;
214
+ maxTextLength?: number;
199
215
  } & Omit<LinkProps, 'id' | 'children' | 'href'>;
200
216
  Taints: {
201
217
  id: number | string;
@@ -208,7 +224,9 @@ export type TDynamicComponentsAppTypeMap = {
208
224
  notificationSuccessMessageDescription?: string;
209
225
  modalTitle?: string;
210
226
  modalDescriptionText?: string;
227
+ modalDescriptionTextStyle?: CSSProperties;
211
228
  inputLabel?: string;
229
+ inputLabelStyle?: CSSProperties;
212
230
  containerStyle?: CSSProperties;
213
231
  endpoint?: string;
214
232
  pathToValue?: string;
@@ -226,10 +244,82 @@ export type TDynamicComponentsAppTypeMap = {
226
244
  notificationSuccessMessageDescription?: string;
227
245
  modalTitle?: string;
228
246
  modalDescriptionText?: string;
247
+ modalDescriptionTextStyle?: CSSProperties;
248
+ inputLabel?: string;
249
+ inputLabelStyle?: CSSProperties;
250
+ endpoint?: string;
251
+ pathToValue?: string;
252
+ editModalWidth?: number | string;
253
+ cols: number[];
254
+ };
255
+ Annotations: {
256
+ id: number | string;
257
+ reqIndex: string;
258
+ jsonPathToObj: string;
259
+ text: string;
260
+ errorText: string;
261
+ containerStyle?: CSSProperties;
262
+ notificationSuccessMessage?: string;
263
+ notificationSuccessMessageDescription?: string;
264
+ modalTitle?: string;
265
+ modalDescriptionText?: string;
266
+ modalDescriptionTextStyle?: CSSProperties;
229
267
  inputLabel?: string;
268
+ inputLabelStyle?: CSSProperties;
230
269
  endpoint?: string;
231
270
  pathToValue?: string;
232
271
  editModalWidth?: number | string;
233
272
  cols: number[];
234
273
  };
274
+ ConverterBytes: {
275
+ id: number | string;
276
+ bytesValue: string;
277
+ unit?: TUnitInput;
278
+ /** If true, returns "12.3 GiB" instead of just 12.3 */
279
+ format?: boolean;
280
+ /** Max fraction digits when formatting (default 2) */
281
+ precision?: number;
282
+ /** Locale for number formatting (default: undefined => user agent) */
283
+ locale?: string;
284
+ standard?: 'si' | 'iec';
285
+ notANumberText?: string;
286
+ style?: CSSProperties;
287
+ };
288
+ SecretBase64Plain: {
289
+ id: number | string;
290
+ base64Value?: string;
291
+ plainTextValue?: string;
292
+ containerStyle?: CSSProperties;
293
+ inputContainerStyle?: CSSProperties;
294
+ flexProps?: Omit<FlexProps, 'children'>;
295
+ niceLooking?: boolean;
296
+ notificationWidth?: string;
297
+ notificationText?: string;
298
+ };
299
+ ResourceBadge: {
300
+ id: number | string;
301
+ value: string;
302
+ abbreviation?: string;
303
+ style?: CSSProperties;
304
+ };
305
+ Events: {
306
+ id: number | string;
307
+ baseprefix?: string;
308
+ clusterNamePartOfUrl: string;
309
+ wsUrl: string;
310
+ pageSize?: number;
311
+ substractHeight?: number;
312
+ limit?: number;
313
+ labelSelector?: Record<string, string>;
314
+ labelSelectorFull?: {
315
+ reqIndex: number;
316
+ pathToLabels: string | string[];
317
+ };
318
+ fieldSelector?: Record<string, string>;
319
+ baseFactoryNamespacedAPIKey: string;
320
+ baseFactoryClusterSceopedAPIKey: string;
321
+ baseFactoryNamespacedBuiltinKey: string;
322
+ baseFactoryClusterSceopedBuiltinKey: string;
323
+ baseNamespaceFactoryKey: string;
324
+ };
235
325
  };
@@ -3,6 +3,8 @@ import { TItemTypeMap } from '../../../localTypes/dynamicRender';
3
3
  import { TDynamicRendererProps } from '../DynamicRenderer';
4
4
  export declare const DynamicRendererWithProviders: <T extends TItemTypeMap>(props: TDynamicRendererProps<T> & {
5
5
  urlsToFetch: string[];
6
+ dataToApplyToContext?: unknown;
6
7
  theme: 'dark' | 'light';
7
8
  nodeTerminalDefaultProfile?: string | undefined;
9
+ disableEventBubbling?: boolean | undefined;
8
10
  }) => ReactElement;
@@ -10,6 +10,7 @@ interface MultiQueryContextType {
10
10
  }
11
11
  type TMultiQueryProviderProps = {
12
12
  urls: string[];
13
+ dataToApplyToContext: unknown;
13
14
  children: ReactNode;
14
15
  };
15
16
  export declare const MultiQueryProvider: FC<TMultiQueryProviderProps>;
@@ -1,12 +1,16 @@
1
1
  import { TApiResources } from '../localTypes/k8s';
2
- export declare const useApiResources: ({ clusterName, namespace, apiGroup, apiVersion, typeName, limit, refetchInterval, }: {
2
+ export declare const useApiResources: ({ clusterName, namespace, apiGroup, apiVersion, typeName, specificName, labels, fields, limit, refetchInterval, isEnabled, }: {
3
3
  clusterName: string;
4
4
  namespace?: string | undefined;
5
5
  apiGroup: string;
6
6
  apiVersion: string;
7
7
  typeName: string;
8
+ specificName?: string | undefined;
9
+ labels?: string[] | undefined;
10
+ fields?: string[] | undefined;
8
11
  limit: string | null;
9
12
  refetchInterval?: number | false | undefined;
13
+ isEnabled?: boolean | undefined;
10
14
  }) => import("@tanstack/react-query/build/legacy/types").UseQueryResult<TApiResources, Error>;
11
15
  export declare const useApiResourceSingle: ({ clusterName, namespace, apiGroup, apiVersion, typeName, entryName, refetchInterval, }: {
12
16
  clusterName: string;
@@ -1,10 +1,14 @@
1
1
  import { TBuiltinResources } from '../localTypes/k8s';
2
- export declare const useBuiltinResources: ({ clusterName, namespace, typeName, limit, refetchInterval, }: {
2
+ export declare const useBuiltinResources: ({ clusterName, namespace, typeName, specificName, labels, fields, limit, refetchInterval, isEnabled, }: {
3
3
  clusterName: string;
4
4
  namespace?: string | undefined;
5
5
  typeName: string;
6
+ specificName?: string | undefined;
7
+ labels?: string[] | undefined;
8
+ fields?: string[] | undefined;
6
9
  limit: string | null;
7
10
  refetchInterval?: number | false | undefined;
11
+ isEnabled?: boolean | undefined;
8
12
  }) => import("@tanstack/react-query/build/legacy/types").UseQueryResult<TBuiltinResources, Error>;
9
13
  export declare const useBuiltinResourceSingle: ({ clusterName, namespace, typeName, entryName, refetchInterval, }: {
10
14
  clusterName: string;
@@ -1,11 +1,12 @@
1
1
  import { TJSON } from '../localTypes/JSON';
2
- export declare const useCrdResources: <T = TJSON[]>({ clusterName, namespace, apiGroup, apiVersion, crdName, refetchInterval, }: {
2
+ export declare const useCrdResources: <T = TJSON[]>({ clusterName, namespace, apiGroup, apiVersion, crdName, refetchInterval, isEnabled, }: {
3
3
  clusterName: string;
4
4
  namespace?: string | undefined;
5
5
  apiGroup: string;
6
6
  apiVersion: string;
7
7
  crdName: string;
8
8
  refetchInterval?: number | false | undefined;
9
+ isEnabled?: boolean | undefined;
9
10
  }) => import("@tanstack/react-query/build/legacy/types").UseQueryResult<{
10
11
  kind: string;
11
12
  apiVersion: string;
@@ -1,8 +1,9 @@
1
- export declare const usePermissions: ({ clusterName, namespace, apiGroup, typeName, verb, refetchInterval, enabler, }: {
1
+ export declare const usePermissions: ({ clusterName, namespace, group, resource, verb, name, refetchInterval, enabler, }: {
2
2
  clusterName: string;
3
- apiGroup: string;
4
- typeName: string;
5
- namespace: string;
3
+ group?: string | undefined;
4
+ resource: string;
5
+ namespace?: string | undefined;
6
+ name?: string | undefined;
6
7
  verb: 'create' | 'delete' | 'patch' | 'update';
7
8
  refetchInterval?: number | false | undefined;
8
9
  enabler?: boolean | undefined;
@@ -13,6 +13,7 @@ export { checkPermission } from './api/permissions';
13
13
  export { getSwagger } from './api/bff/swagger/getSwagger';
14
14
  export { filterIfApiInstanceNamespaceScoped, filterIfBuiltInInstanceNamespaceScoped, } from './api/bff/scopes/filterScopes';
15
15
  export { checkIfApiInstanceNamespaceScoped, checkIfBuiltInInstanceNamespaceScoped } from './api/bff/scopes/checkScopes';
16
+ export { getKinds } from './api/bff/search/getKinds';
16
17
  export { useClusterList } from './hooks/useClusterList';
17
18
  export { useApiResources, useApiResourceSingle } from './hooks/useApiResource';
18
19
  export { useBuiltinResources, useBuiltinResourceSingle } from './hooks/useBuiltinResource';
@@ -32,4 +33,6 @@ export type { TApiGroupList, TApiGroupResourceTypeList, TBuiltinResourceTypeList
32
33
  export type { TMarketPlacePanel, TMarketPlacePanelResource, TMarketPlacePanelResponse } from './localTypes/marketplace';
33
34
  export type { TAdditionalPrinterColumns, TAdditionalPrinterColumnsUndefinedValues, TAdditionalPrinterColumnsTrimLengths, TAdditionalPrinterColumnsColWidths, } from './localTypes/richTable';
34
35
  export type { TFilterIfApiInstanceNamespaceScopedReq, TFilterIfApiInstanceNamespaceScopedRes, TFilterIfBuiltInInstanceNamespaceScopedReq, TFilterIfBuiltInInstanceNamespaceScopedRes, } from './localTypes/bff/scopes';
36
+ export type { TVersionEntry, TKindItem, TKindIndex } from './localTypes/bff/search';
35
37
  export type { TGetDerefedSwaggerRes } from './localTypes/bff/swagger';
38
+ export type { TKindWithVersion } from './localTypes/search';
@@ -34,6 +34,7 @@ export type TPrepareFormRes = {
34
34
  hiddenPaths: string[][] | undefined;
35
35
  expandedPaths: string[][] | undefined;
36
36
  persistedPaths: string[][] | undefined;
37
+ sortPaths: string[][] | undefined;
37
38
  kindName: string | undefined;
38
39
  isNamespaced: boolean;
39
40
  formPrefills?: TFormPrefill;
@@ -0,0 +1,20 @@
1
+ export type TVersionEntry = Readonly<{
2
+ version: string;
3
+ groupVersion: string;
4
+ preferred: boolean;
5
+ namespaced: boolean;
6
+ resource: string;
7
+ verbs?: string[];
8
+ }>;
9
+ export type TKindItem = {
10
+ group: string;
11
+ kind: string;
12
+ versions: TVersionEntry[];
13
+ };
14
+ export type TKindIndex = {
15
+ kind: 'KindIndex';
16
+ apiVersion: 'v1';
17
+ generatedAt: string;
18
+ count: number;
19
+ items: TKindItem[];
20
+ };
@@ -1,16 +1,23 @@
1
- import { TAdditionalPrinterColumns, TAdditionalPrinterColumnsUndefinedValues, TAdditionalPrinterColumnsTrimLengths, TAdditionalPrinterColumnsColWidths } from '../richTable';
1
+ import { TAdditionalPrinterColumns, TAdditionalPrinterColumnsUndefinedValues, TAdditionalPrinterColumnsTrimLengths, TAdditionalPrinterColumnsColWidths, TAdditionalPrinterColumnsKeyTypeProps } from '../richTable';
2
2
  export type TPrepareTableReq = {
3
3
  customizationId?: string;
4
4
  tableMappingsReplaceValues?: Record<string, string | undefined>;
5
5
  forceDefaultAdditionalPrinterColumns?: TAdditionalPrinterColumns;
6
+ namespace?: string;
7
+ k8sResource?: {
8
+ resource: string;
9
+ apiGroup?: string;
10
+ apiVersion: string;
11
+ };
6
12
  };
7
13
  export type TPrepareTableRes = {
8
14
  additionalPrinterColumns: TAdditionalPrinterColumns;
9
15
  additionalPrinterColumnsUndefinedValues?: TAdditionalPrinterColumnsUndefinedValues;
10
16
  additionalPrinterColumnsTrimLengths?: TAdditionalPrinterColumnsTrimLengths;
11
17
  additionalPrinterColumnsColWidths?: TAdditionalPrinterColumnsColWidths;
18
+ additionalPrinterColumnsKeyTypeProps?: TAdditionalPrinterColumnsKeyTypeProps;
12
19
  pathToNavigate?: string;
13
- recordKeysForNavigation?: string[];
14
- recordKeysForNavigationSecond?: string[];
15
- recordKeysForNavigationThird?: string[];
20
+ recordKeysForNavigation?: string | string[];
21
+ recordKeysForNavigationSecond?: string | string[];
22
+ recordKeysForNavigationThird?: string | string[];
16
23
  };
@@ -13,19 +13,19 @@ export type TRangeInputCustomValue = {
13
13
  } | {
14
14
  type: 'substractResourceValues';
15
15
  firstValueUri: string;
16
- firstValuesKeysToValue: string[];
16
+ firstValuesKeysToValue: string | string[];
17
17
  secondValueUri: string;
18
- secondValuesKeysToValue: string[];
18
+ secondValuesKeysToValue: string | string[];
19
19
  } | {
20
20
  type: 'addResourceValues';
21
21
  firstValueUri: string;
22
- firstValuesKeysToValue: string[];
22
+ firstValuesKeysToValue: string | string[];
23
23
  secondValueUri: string;
24
- secondValuesKeysToValue: string[];
24
+ secondValuesKeysToValue: string | string[];
25
25
  } | {
26
26
  type: 'resourceValue';
27
27
  valueUri: string;
28
- keysToValue: string[];
28
+ keysToValue: string | string[];
29
29
  };
30
30
  export type TRangeInputCustomValuesBlock = {
31
31
  min: TRangeInputCustomValue;
@@ -39,14 +39,14 @@ export type TRangeInputCustomProps = {
39
39
  };
40
40
  export type TListInputCustomProps = {
41
41
  valueUri: string;
42
- keysToValue: string[];
43
- keysToLabel?: string[];
42
+ keysToValue: string | string[];
43
+ keysToLabel?: string | string[];
44
44
  mode?: 'multiple' | 'tags';
45
45
  criteria?: {
46
- keysToValue: string[];
46
+ keysToValue: string | string[];
47
47
  type: 'equals' | 'notEquals';
48
48
  value: unknown;
49
49
  keepPrefilled?: boolean;
50
50
  };
51
- relatedValuePath?: string[];
51
+ relatedValuePath?: string;
52
52
  };
@@ -1,7 +1,8 @@
1
1
  export type TAdditionalPrinterColumns = {
2
2
  name: string;
3
- type: string;
4
- jsonPath: string;
3
+ jsonPath?: string;
4
+ type?: string;
5
+ customProps?: unknown;
5
6
  }[];
6
7
  export type TAdditionalPrinterColumnsUndefinedValues = {
7
8
  key: string;
@@ -15,3 +16,7 @@ export type TAdditionalPrinterColumnsColWidths = {
15
16
  key: string;
16
17
  value: string;
17
18
  }[];
19
+ export type TAdditionalPrinterColumnsKeyTypeProps = Record<string, {
20
+ type: string;
21
+ customProps?: unknown;
22
+ }>;
@@ -0,0 +1,7 @@
1
+ import { TVersionEntry } from './bff/search';
2
+ export type TKindWithVersion = {
3
+ group: string;
4
+ kind: string;
5
+ version: TVersionEntry;
6
+ notUnique?: true;
7
+ };
@@ -0,0 +1,7 @@
1
+ type PlainObject = Record<string, any>;
2
+ /**
3
+ * Deeply merges two objects A and B, returning a new object
4
+ * whose type is the intersection A & B.
5
+ */
6
+ export declare const deepMerge: <A extends PlainObject, B extends PlainObject>(a: A, b: B) => A & B;
7
+ export {};
@@ -0,0 +1 @@
1
+ export * from './deepMerge';
@@ -0,0 +1,3 @@
1
+ import { TKindIndex } from '../../localTypes/bff/search';
2
+ import { TKindWithVersion } from '../../localTypes/search';
3
+ export declare const getSortedKinds: (index: TKindIndex) => TKindWithVersion[];
@@ -0,0 +1 @@
1
+ export * from './getSortedKinds';
@@ -0,0 +1,8 @@
1
+ import { TKindIndex } from '../../localTypes/bff/search';
2
+ import { TKindWithVersion } from '../../localTypes/search';
3
+ /**
4
+ * RETURNS ALL VERSIONS (one row per version).
5
+ * The first row for each {group, kind} will be the preferred (if any),
6
+ * otherwise the best-sorted version. Others follow right after.
7
+ */
8
+ export declare const getSortedKindsAll: (index: TKindIndex) => TKindWithVersion[];
@@ -0,0 +1 @@
1
+ export * from './getSortedKindsAll';
@@ -0,0 +1 @@
1
+ export declare const getUppercase: (s: string) => string;
@@ -0,0 +1 @@
1
+ export * from './getUppercase';
@@ -0,0 +1,9 @@
1
+ type Theme = 'light' | 'dark';
2
+ /**
3
+ * Deterministic, functional mapper from (value, theme) -> HSL string.
4
+ * - Hue spans full 0..359 based on a stable FNV-1a hash of the string.
5
+ * - Saturation/Lightness are derived from disjoint hash segments and
6
+ * constrained to your specified ranges per theme.
7
+ */
8
+ export declare const hslFromString: (value: string, theme: Theme) => string;
9
+ export {};
@@ -0,0 +1 @@
1
+ export * from './hslFromString';
@@ -10,3 +10,13 @@ export * from './groupsToTreeData';
10
10
  export * from './getGroupsByCategory';
11
11
  export * from './createContextFactory';
12
12
  export * from './prepareUrlsToFetchForDynamicRenderer';
13
+ export * from './deepMerge';
14
+ export * from './getSortedKinds';
15
+ export * from './getSortedKindsAll';
16
+ export * from './hslFromString';
17
+ export * from './getUppercase';
18
+ export * from './kindByGvr';
19
+ export * from './pluralByKind';
20
+ export * from './namespacedByGvr';
21
+ export * from './tableLocations';
22
+ export * from './isMultilineString';
@@ -0,0 +1 @@
1
+ export { isMultilineString, isMultilineFromYaml } from './isMultilineString';
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Determines if a string should be treated as multiline in YAML
3
+ * @param value - The string value to check
4
+ * @returns true if the string should be multiline, false otherwise
5
+ */
6
+ export declare const isMultilineString: (value: string) => boolean;
7
+ /**
8
+ * Determines if a string should be treated as multiline based on YAML content
9
+ * @param yamlContent - The YAML content to analyze
10
+ * @param fieldPath - The path to the field in the YAML
11
+ * @returns true if the field should be multiline, false otherwise
12
+ */
13
+ export declare const isMultilineFromYaml: (yamlContent: string, fieldPath: string[]) => boolean;
@@ -0,0 +1 @@
1
+ export * from './kindByGvr';
@@ -0,0 +1,6 @@
1
+ import { TKindWithVersion } from '../../localTypes/search';
2
+ /**
3
+ * Build a lookup function: given "group~version~resource" return the unique kind.
4
+ * Functional, side-effect free, and tolerant of empty group (e.g. "~v1~bindings").
5
+ */
6
+ export declare const kindByGvr: (entries: readonly TKindWithVersion[]) => (gvr: string) => string | undefined;
@@ -0,0 +1 @@
1
+ export * from './namespacedByGvr';
@@ -0,0 +1,6 @@
1
+ import { TKindWithVersion } from '../../localTypes/search';
2
+ /**
3
+ * Build a lookup function: given "group~version~resource" return the unique namespaced value.
4
+ * Functional, side-effect free, and tolerant of empty group (e.g. "~v1~bindings").
5
+ */
6
+ export declare const namespacedByGvr: (entries: readonly TKindWithVersion[]) => (gvr: string) => boolean | undefined;
@@ -0,0 +1 @@
1
+ export * from './pluralByKind';
@@ -0,0 +1,10 @@
1
+ import { TKindWithVersion } from '../../localTypes/search';
2
+ type ApiVersion = string;
3
+ /**
4
+ * Build a lookup function: given (kind, apiVersion?) return the plural resource.
5
+ * - apiVersion can be "group/version" or just "v1" for core.
6
+ * - If apiVersion is omitted, we return the plural for the preferred version of that kind.
7
+ * - Returns undefined if not uniquely determined.
8
+ */
9
+ export declare const pluralByKind: (entries: readonly TKindWithVersion[]) => (kind: string, apiVersion?: ApiVersion) => string | undefined;
10
+ export {};
@@ -0,0 +1 @@
1
+ export * from './tableLocations';
@@ -0,0 +1,36 @@
1
+ export declare const getBackLinkToTable: ({ fullPath }: {
2
+ fullPath: string;
3
+ }) => string;
4
+ export declare const getLinkToBuiltinForm: ({ cluster, baseprefix, namespace, syntheticProject, typeName, inside, fullPath, }: {
5
+ cluster: string;
6
+ baseprefix?: string | undefined;
7
+ namespace?: string | undefined;
8
+ syntheticProject?: string | undefined;
9
+ typeName: string;
10
+ inside?: boolean | undefined;
11
+ fullPath: string;
12
+ }) => string;
13
+ export declare const getLinkToApiForm: ({ cluster, baseprefix, namespace, syntheticProject, apiGroup, apiVersion, typeName, inside, fullPath, }: {
14
+ cluster: string;
15
+ baseprefix?: string | undefined;
16
+ namespace?: string | undefined;
17
+ syntheticProject?: string | undefined;
18
+ apiGroup?: string | undefined;
19
+ apiVersion?: string | undefined;
20
+ typeName: string;
21
+ inside?: boolean | undefined;
22
+ fullPath: string;
23
+ searchMount?: boolean | undefined;
24
+ }) => string;
25
+ export declare const getLinkToForm: ({ apiGroup, ...rest }: {
26
+ cluster: string;
27
+ baseprefix?: string | undefined;
28
+ namespace?: string | undefined;
29
+ syntheticProject?: string | undefined;
30
+ apiGroup?: string | undefined;
31
+ apiVersion?: string | undefined;
32
+ typeName: string;
33
+ inside?: boolean | undefined;
34
+ fullPath: string;
35
+ searchMount?: boolean | undefined;
36
+ }) => string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prorobotech/openapi-k8s-toolkit",
3
- "version": "0.0.1-alpha.98",
3
+ "version": "1.0.3",
4
4
  "description": "ProRobotech OpenAPI k8s tools",
5
5
  "main": "dist/openapi-k8s-toolkit.cjs.js",
6
6
  "module": "dist/openapi-k8s-toolkit.es.js",
@@ -47,13 +47,14 @@
47
47
  "@xterm/addon-attach": "0.11.0",
48
48
  "@xterm/addon-fit": "0.10.0",
49
49
  "@xterm/xterm": "5.5.0",
50
- "axios": "1.4.0",
50
+ "axios": "1.12.2",
51
51
  "cross-env": "7.0.3",
52
52
  "dotenv": "16.4.7",
53
53
  "jsonpath": "1.1.1",
54
54
  "lodash": "4.17.21",
55
55
  "openapi-types": "12.1.3",
56
56
  "react-redux": "9.1.2",
57
+ "spoiled": "0.4.0",
57
58
  "styled-components": "6.0.7",
58
59
  "typescript": "4.9.5",
59
60
  "usehooks-ts": "3.1.1",