@prorobotech/openapi-k8s-toolkit 1.4.0-alpha.9 → 1.5.0-alpha.2
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/{index-BwCZPalv.mjs → index-BYGA57EJ.mjs} +4914 -1052
- package/dist/index-BYGA57EJ.mjs.map +1 -0
- package/dist/{index-85og70S2.mjs → index-DoND5hQh.mjs} +29 -3
- package/dist/index-DoND5hQh.mjs.map +1 -0
- package/dist/openapi-k8s-toolkit.es.js +1 -1
- package/dist/openapi-k8s-toolkit.umd.js +4943 -1048
- package/dist/openapi-k8s-toolkit.umd.js.map +1 -1
- package/dist/types/api/bff/search/getKindsRaw.d.ts +4 -0
- package/dist/types/components/atoms/ErrorBoundary/ErrorBoundary.d.ts +38 -0
- package/dist/types/components/atoms/ErrorBoundary/ErrorBoundary.test.d.ts +1 -0
- package/dist/types/components/atoms/ErrorBoundary/ErrorBoundaryWithDataReset.d.ts +14 -0
- package/dist/types/components/atoms/ErrorBoundary/index.d.ts +2 -0
- package/dist/types/components/atoms/index.d.ts +1 -0
- package/dist/types/components/molecules/BlackholeForm/atoms/DefaultValueButton/DefaultValueButton.d.ts +10 -0
- package/dist/types/components/molecules/BlackholeForm/atoms/DefaultValueButton/DefaultValueButton.test.d.ts +1 -0
- package/dist/types/components/molecules/BlackholeForm/atoms/DefaultValueButton/index.d.ts +1 -0
- package/dist/types/components/molecules/BlackholeForm/atoms/ExampleTooltipIcon/ExampleTooltipIcon.d.ts +6 -0
- package/dist/types/components/molecules/BlackholeForm/atoms/ExampleTooltipIcon/ExampleTooltipIcon.test.d.ts +1 -0
- package/dist/types/components/molecules/BlackholeForm/atoms/ExampleTooltipIcon/index.d.ts +1 -0
- package/dist/types/components/molecules/BlackholeForm/atoms/ExampleTooltipIcon/styled.d.ts +380 -0
- package/dist/types/components/molecules/BlackholeForm/atoms/NullToggleButton/NullToggleButton.d.ts +9 -0
- package/dist/types/components/molecules/BlackholeForm/atoms/NullToggleButton/NullToggleButton.test.d.ts +1 -0
- package/dist/types/components/molecules/BlackholeForm/atoms/NullToggleButton/index.d.ts +1 -0
- package/dist/types/components/molecules/BlackholeForm/atoms/index.d.ts +3 -0
- package/dist/types/components/molecules/BlackholeForm/molecules/FormBooleanInput/FormBooleanInput.d.ts +1 -0
- package/dist/types/components/molecules/BlackholeForm/molecules/FormBooleanInput/FormBooleanInput.test.d.ts +1 -0
- package/dist/types/components/molecules/BlackholeForm/molecules/FormEnumStringInput/FormEnumStringInput.d.ts +3 -0
- package/dist/types/components/molecules/BlackholeForm/molecules/FormListInput/FormListInput.d.ts +1 -0
- package/dist/types/components/molecules/BlackholeForm/molecules/FormNamespaceInput/FormNamespaceInput.d.ts +5 -0
- package/dist/types/components/molecules/BlackholeForm/molecules/FormNumberInput/FormNumberInput.d.ts +3 -0
- package/dist/types/components/molecules/BlackholeForm/molecules/FormObjectFromSwagger/FormObjectFromSwagger.d.ts +6 -6
- package/dist/types/components/molecules/BlackholeForm/molecules/FormObjectFromSwagger/FormObjectFromSwagger.test.d.ts +1 -0
- package/dist/types/components/molecules/BlackholeForm/molecules/FormStringInput/FormStringInput.d.ts +3 -0
- package/dist/types/components/molecules/BlackholeForm/molecules/FormStringMultilineInput/FormStringMultilineInput.d.ts +3 -0
- package/dist/types/components/molecules/BlackholeForm/molecules/helpers/buildPlaceholder.d.ts +10 -0
- package/dist/types/components/molecules/BlackholeForm/molecules/helpers/buildPlaceholder.test.d.ts +1 -0
- package/dist/types/components/molecules/BlackholeForm/molecules/helpers/useDefaultValueButton.d.ts +11 -0
- package/dist/types/components/molecules/BlackholeForm/molecules/helpers/useDefaultValueButton.test.d.ts +1 -0
- package/dist/types/components/molecules/BlackholeForm/molecules/helpers/useNullToggleButton.d.ts +16 -0
- package/dist/types/components/molecules/BlackholeForm/molecules/helpers/useNullToggleButton.test.d.ts +1 -0
- package/dist/types/components/molecules/BlackholeForm/molecules/helpers/validation.d.ts +17 -4
- package/dist/types/components/molecules/BlackholeForm/organisms/BlackholeForm/BlackholeForm.d.ts +2 -2
- package/dist/types/components/molecules/BlackholeForm/organisms/BlackholeForm/helpers/casts.d.ts +4 -4
- package/dist/types/components/molecules/BlackholeForm/organisms/BlackholeForm/helpers/extractDefaultValue.d.ts +4 -0
- package/dist/types/components/molecules/BlackholeForm/organisms/BlackholeForm/helpers/extractDefaultValue.test.d.ts +1 -0
- package/dist/types/components/molecules/BlackholeForm/organisms/BlackholeForm/helpers/getSortedPropertyKeys.d.ts +2 -4
- package/dist/types/components/molecules/BlackholeForm/organisms/BlackholeForm/helpers/prefills.d.ts +6 -3
- package/dist/types/components/molecules/BlackholeForm/organisms/BlackholeForm/utils.d.ts +37 -29
- package/dist/types/components/molecules/BlackholeForm/organisms/BlackholeFormProvider/BlackholeFormProvider.d.ts +1 -0
- package/dist/types/components/molecules/EnrichedTable/index.d.ts +2 -2
- package/dist/types/components/molecules/EnrichedTable/organisms/ClusterListTable/ClusterListTable.d.ts +27 -0
- package/dist/types/components/molecules/EnrichedTable/organisms/ClusterListTable/ClusterListTable.test.d.ts +1 -0
- package/dist/types/components/molecules/EnrichedTable/organisms/ClusterListTable/index.d.ts +2 -0
- package/dist/types/components/molecules/EnrichedTable/organisms/EnrichedTable/EnrichedTable.d.ts +11 -6
- package/dist/types/components/molecules/EnrichedTable/organisms/EnrichedTable/EnrichedTable.test.d.ts +1 -0
- package/dist/types/components/molecules/EnrichedTable/organisms/EnrichedTable/atoms/TrimmedTags/styled.d.ts +851 -0
- package/dist/types/components/molecules/EnrichedTable/organisms/EnrichedTable/utils.d.ts +10 -8
- package/dist/types/components/molecules/EnrichedTable/organisms/index.d.ts +2 -0
- package/dist/types/components/molecules/Events/Events.error.test.d.ts +2 -0
- package/dist/types/components/molecules/Events/types.d.ts +12 -1
- package/dist/types/components/molecules/YamlEditorSingleton/utils.d.ts +5 -1
- package/dist/types/components/molecules/index.d.ts +2 -2
- package/dist/types/components/organisms/DynamicComponents/molecules/ActionsDropdown/ActionsDropdown.test.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/ActionsDropdown/dropdownPlacement.d.ts +12 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/ActionsDropdown/dropdownPlacement.test.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/ActionsDropdown/hooks/useActionsDropdownHandlers/actionHandlers.d.ts +23 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/ActionsDropdown/hooks/useActionsDropdownHandlers/handlers/index.d.ts +6 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/ActionsDropdown/hooks/useActionsDropdownHandlers/handlers/useCreateFromFilesHandlers.d.ts +11 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/ActionsDropdown/hooks/useActionsDropdownHandlers/handlers/useDrainHandlers.d.ts +12 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/ActionsDropdown/hooks/useActionsDropdownHandlers/handlers/useEvictHandlers.d.ts +9 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/ActionsDropdown/hooks/useActionsDropdownHandlers/handlers/useRerunHandlers.d.ts +11 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/ActionsDropdown/hooks/useActionsDropdownHandlers/handlers/useRollbackHandlers.d.ts +11 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/ActionsDropdown/hooks/useActionsDropdownHandlers/handlers/useScaleHandlers.d.ts +11 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/ActionsDropdown/hooks/useActionsDropdownHandlers/helpers.d.ts +25 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/ActionsDropdown/hooks/useActionsDropdownHandlers/index.d.ts +3 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/ActionsDropdown/hooks/useActionsDropdownHandlers/types.d.ts +65 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/ActionsDropdown/hooks/useActionsDropdownHandlers/useActionsDropdownHandlers.d.ts +38 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/ActionsDropdown/modals/CreateFromFilesModal.d.ts +12 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/ActionsDropdown/modals/CreateFromFilesModal.test.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/ActionsDropdown/modals/DownloadAsFilesModal.d.ts +11 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/ActionsDropdown/modals/DownloadAsFilesModal.test.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/AntdResult/AntdResult.d.ts +6 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/AntdResult/AntdResult.test.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/AntdResult/index.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/AntdResult/styled.d.ts +548 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/AntdResult/utils.d.ts +33 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/AntdResult/utils.test.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/EnrichedTable/EnrichedTable.error.test.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/Events/Events.permissions.test.d.ts +2 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/MappedParsedText/MappedParsedText.d.ts +5 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/MappedParsedText/index.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/ParsedText/ParsedText.test.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PerRequestError/PerRequestError.d.ts +7 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PerRequestError/PerRequestError.test.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/PerRequestError/index.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/Volumes/Volumes.d.ts +6 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/Volumes/Volumes.test.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/Volumes/index.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/Volumes/utils.d.ts +46 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/hooks/index.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/hooks/mergePerRequestErrors.d.ts +10 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/hooks/types.d.ts +5 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/hooks/useAutoPerRequestError.d.ts +15 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/hooks/useAutoPerRequestError.test.d.ts +1 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/index.d.ts +3 -0
- package/dist/types/components/organisms/DynamicComponents/molecules/utils.d.ts +19 -0
- package/dist/types/components/organisms/DynamicComponents/types/ActionsDropdown.d.ts +22 -2
- package/dist/types/components/organisms/DynamicComponents/types/MappedParsedText.d.ts +7 -0
- package/dist/types/components/organisms/DynamicComponents/types/Volumes.d.ts +19 -0
- package/dist/types/components/organisms/DynamicComponents/types/antdComponents.d.ts +22 -1
- package/dist/types/components/organisms/DynamicComponents/types/index.d.ts +6 -1
- package/dist/types/components/organisms/DynamicComponents/types/parsedText.d.ts +1 -0
- package/dist/types/components/organisms/DynamicRendererWithProviders/DynamicRendererWithProviders.d.ts +2 -0
- package/dist/types/components/organisms/DynamicRendererWithProviders/EffectiveAntdResultWrapper/EffectiveAntdResultWrapper.d.ts +8 -0
- package/dist/types/components/organisms/DynamicRendererWithProviders/EffectiveAntdResultWrapper/EffectiveAntdResultWrapper.test.d.ts +1 -0
- package/dist/types/components/organisms/DynamicRendererWithProviders/EffectiveAntdResultWrapper/index.d.ts +1 -0
- package/dist/types/components/organisms/DynamicRendererWithProviders/providers/hybridDataProvider/hybridDataProvider.d.ts +4 -0
- package/dist/types/hooks/useApiResource.d.ts +2 -1
- package/dist/types/hooks/useApisResourceTypes.d.ts +4 -2
- package/dist/types/hooks/useBuiltinResource.d.ts +2 -1
- package/dist/types/hooks/useBuiltinResourceTypes.d.ts +2 -1
- package/dist/types/hooks/useClusterList.d.ts +6 -3
- package/dist/types/hooks/useDirectUnknownResource.d.ts +2 -1
- package/dist/types/hooks/useK8sSmartResource/useSmartResourceParams.d.ts +3 -2
- package/dist/types/hooks/useKindsRaw.d.ts +8 -0
- package/dist/types/hooks/useListThenWatch/types.d.ts +2 -0
- package/dist/types/hooks/useResourceScope/useResourceScope.d.ts +2 -1
- package/dist/types/index.d.ts +2 -1
- package/dist/types/localTypes/bff/form.d.ts +6 -6
- package/dist/types/localTypes/bff/table.d.ts +2 -1
- package/dist/types/localTypes/clusterList.d.ts +3 -2
- package/dist/types/localTypes/dynamicRender.d.ts +5 -0
- package/dist/types/localTypes/formSchema.d.ts +27 -0
- package/dist/types/localTypes/richTable.d.ts +4 -0
- package/dist/types/utils/normalizeValuesForQuotas/normalizeValuesForQuotas.d.ts +2 -2
- package/package.json +1 -1
- package/dist/index-85og70S2.mjs.map +0 -1
- package/dist/index-BwCZPalv.mjs.map +0 -1
- package/dist/types/components/organisms/DynamicComponents/molecules/ActionsDropdown/hooks/useActionsDropdownHandlers.d.ts +0 -77
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { TFormName } from '../../../../../localTypes/form';
|
|
2
|
+
export declare const formatDefaultValue: (defaultValue: string | number | boolean | string[]) => string;
|
|
3
|
+
export declare const buildPlaceholder: (name: TFormName, defaultValue?: string | number | boolean | string[], example?: string | number | boolean | string[]) => string;
|
|
4
|
+
/**
|
|
5
|
+
* Returns a tooltip body with the example when both `default` and `example` are set —
|
|
6
|
+
* `default` occupies the placeholder, so `example` would otherwise be lost. Returns
|
|
7
|
+
* `undefined` when no dedicated tooltip is needed (example is either absent or already
|
|
8
|
+
* surfaced as the placeholder).
|
|
9
|
+
*/
|
|
10
|
+
export declare const getExampleTooltip: (defaultValue?: string | number | boolean | string[], example?: string | number | boolean | string[]) => string | undefined;
|
package/dist/types/components/molecules/BlackholeForm/molecules/helpers/buildPlaceholder.test.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/types/components/molecules/BlackholeForm/molecules/helpers/useDefaultValueButton.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { TFormName } from '../../../../../localTypes/form';
|
|
2
|
+
type TDefaultValueButtonState = {
|
|
3
|
+
visible: false;
|
|
4
|
+
} | {
|
|
5
|
+
visible: true;
|
|
6
|
+
isApplied: boolean;
|
|
7
|
+
handleApply: () => void;
|
|
8
|
+
handleClear: () => void;
|
|
9
|
+
};
|
|
10
|
+
export declare const useDefaultValueButton: (formFieldName: TFormName, defaultValue: string | number | boolean | string[] | undefined, nullable?: boolean) => TDefaultValueButtonState;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/types/components/molecules/BlackholeForm/molecules/helpers/useNullToggleButton.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { TFormName } from '../../../../../localTypes/form';
|
|
2
|
+
type TNullToggleButtonState = {
|
|
3
|
+
visible: false;
|
|
4
|
+
} | {
|
|
5
|
+
visible: true;
|
|
6
|
+
isNull: boolean;
|
|
7
|
+
handleSetNull: () => void;
|
|
8
|
+
handleClear: () => void;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Surfaces a "Set null / Clear null" control only for schema nodes marked `nullable: true`.
|
|
12
|
+
* `null` is a distinct, persisted value (not the same as empty-and-omitted); consumers must
|
|
13
|
+
* propagate it through the submit pipeline for nullable paths.
|
|
14
|
+
*/
|
|
15
|
+
export declare const useNullToggleButton: (formFieldName: TFormName, nullable?: boolean) => TNullToggleButtonState;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,6 +1,19 @@
|
|
|
1
|
+
import { Rule } from 'antd/es/form';
|
|
2
|
+
import { TFormSchemaProperties } from '../../../../../localTypes/formSchema';
|
|
1
3
|
import { TFormName } from '../../../../../localTypes/form';
|
|
2
4
|
export declare const prettyFieldPath: (name: TFormName) => string;
|
|
3
|
-
export declare const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
export declare const collectOneOfRequiredGroupStates: ({ properties, values, currentPath, }: {
|
|
6
|
+
properties: TFormSchemaProperties;
|
|
7
|
+
values: Record<string, unknown>;
|
|
8
|
+
currentPath?: (string | number)[] | undefined;
|
|
9
|
+
}) => {
|
|
10
|
+
name: TFormName;
|
|
11
|
+
errors: string[];
|
|
12
|
+
}[];
|
|
13
|
+
/**
|
|
14
|
+
* Returns an antd Form rule for a required field. When `nullable` is true, an explicit
|
|
15
|
+
* `null` is accepted as a valid value (it will be serialized as JSON null in the payload).
|
|
16
|
+
* For non-nullable fields, the standard antd `required: true` semantics apply — null is
|
|
17
|
+
* treated as empty, same as undefined/''/[].
|
|
18
|
+
*/
|
|
19
|
+
export declare const getRequiredRule: (isRequired: boolean, name: TFormName, nullable?: boolean) => Rule;
|
package/dist/types/components/molecules/BlackholeForm/organisms/BlackholeForm/BlackholeForm.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
-
import { OpenAPIV2 } from 'openapi-types';
|
|
3
2
|
import { TJSON } from '../../../../../localTypes/JSON';
|
|
4
3
|
import { TUrlParams } from '../../../../../localTypes/form';
|
|
5
4
|
import { TFormPrefill } from '../../../../../localTypes/formExtensions';
|
|
5
|
+
import { TFormSchemaProperties } from '../../../../../localTypes/formSchema';
|
|
6
6
|
export type TBlackholeFormProps = {
|
|
7
7
|
cluster: string;
|
|
8
8
|
theme: 'light' | 'dark';
|
|
@@ -12,7 +12,7 @@ export type TBlackholeFormProps = {
|
|
|
12
12
|
plural?: string;
|
|
13
13
|
};
|
|
14
14
|
formsPrefills?: TFormPrefill;
|
|
15
|
-
staticProperties:
|
|
15
|
+
staticProperties: TFormSchemaProperties;
|
|
16
16
|
required: string[];
|
|
17
17
|
hiddenPaths?: string[][];
|
|
18
18
|
expandedPaths: string[][];
|
package/dist/types/components/molecules/BlackholeForm/organisms/BlackholeForm/helpers/casts.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MutableRefObject } from 'react';
|
|
2
|
-
import { OpenAPIV2 } from 'openapi-types';
|
|
3
2
|
import { TFormName } from '../../../../../../localTypes/form';
|
|
3
|
+
import { TFormSchemaProperties } from '../../../../../../localTypes/formSchema';
|
|
4
4
|
export declare const pathKey: (p: (string | number)[]) => string;
|
|
5
5
|
/**
|
|
6
6
|
* Recursively prunes schema properties that are marked as "additional"
|
|
@@ -10,7 +10,7 @@ export declare const pathKey: (p: (string | number)[]) => string;
|
|
|
10
10
|
* @param values - The actual data values that correspond to the schema.
|
|
11
11
|
* @returns A new pruned copy of the schema `properties`.
|
|
12
12
|
*/
|
|
13
|
-
export declare const pruneAdditionalForValues: (props:
|
|
13
|
+
export declare const pruneAdditionalForValues: (props: TFormSchemaProperties, values: Record<string, unknown>, blockedPathsRef: MutableRefObject<Set<string>>) => TFormSchemaProperties;
|
|
14
14
|
/**
|
|
15
15
|
* Dynamically materializes (adds) new schema properties from the `values` object
|
|
16
16
|
* whenever those properties correspond to `additionalProperties` in an OpenAPI schema.
|
|
@@ -36,8 +36,8 @@ export declare const pruneAdditionalForValues: (props: OpenAPIV2.SchemaObject['p
|
|
|
36
36
|
* - `toExpand`: list of field paths that should be expanded (e.g., in a UI)
|
|
37
37
|
* - `toPersist`: list of field paths that should be persisted (saved)
|
|
38
38
|
*/
|
|
39
|
-
export declare const materializeAdditionalFromValues: (props:
|
|
40
|
-
props:
|
|
39
|
+
export declare const materializeAdditionalFromValues: (props: TFormSchemaProperties, values: Record<string, unknown>, blockedPathsRef: MutableRefObject<Set<string>>) => {
|
|
40
|
+
props: TFormSchemaProperties;
|
|
41
41
|
toExpand: TFormName[];
|
|
42
42
|
toPersist: TFormName[];
|
|
43
43
|
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const extractStringDefault: (value: unknown) => string | undefined;
|
|
2
|
+
export declare const extractNumberDefault: (value: unknown) => number | undefined;
|
|
3
|
+
export declare const extractBooleanDefault: (value: unknown) => boolean | undefined;
|
|
4
|
+
export declare const extractListInputDefault: (value: unknown) => string | string[] | undefined;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import { OpenAPIV2 } from 'openapi-types';
|
|
2
1
|
import { TFormName } from '../../../../../../localTypes/form';
|
|
2
|
+
import { TFormSchemaProperties } from '../../../../../../localTypes/formSchema';
|
|
3
3
|
export declare const getSortedPropertyKeys: ({ name, sortPaths, properties, }: {
|
|
4
4
|
name: TFormName;
|
|
5
5
|
sortPaths?: string[][] | undefined;
|
|
6
|
-
properties:
|
|
7
|
-
[name: string]: OpenAPIV2.SchemaObject;
|
|
8
|
-
};
|
|
6
|
+
properties: TFormSchemaProperties;
|
|
9
7
|
}) => (string | number)[];
|
package/dist/types/components/molecules/BlackholeForm/organisms/BlackholeForm/helpers/prefills.d.ts
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
export declare const pathKey: (p: (string | number)[]) => string;
|
|
2
2
|
export declare const toWildcardPath: (p: (string | number)[]) => string[];
|
|
3
|
-
export type
|
|
3
|
+
export type TWildcardTemplate = {
|
|
4
4
|
wildcardPath: (string | number)[];
|
|
5
|
+
};
|
|
6
|
+
export type TTemplate = TWildcardTemplate & {
|
|
5
7
|
value: unknown;
|
|
6
8
|
};
|
|
7
9
|
export declare const collectArrayLengths: (obj: unknown, base?: (string | number)[], out?: Map<string, number>) => Map<string, number>;
|
|
8
|
-
export declare const templateMatchesArray: (tpl:
|
|
9
|
-
export declare const buildConcretePathForNewItem: (tpl:
|
|
10
|
+
export declare const templateMatchesArray: (tpl: TWildcardTemplate, arrayPath: (string | number)[]) => boolean;
|
|
11
|
+
export declare const buildConcretePathForNewItem: (tpl: TWildcardTemplate, arrayPath: (string | number)[], newIndex: number) => (string | number)[];
|
|
12
|
+
export declare const getConcretePathsForNewArrayItem: (templates: TWildcardTemplate[], arrayPath: (string | number)[], newIndex: number) => (string | number)[][];
|
|
10
13
|
export declare const scrubLiteralWildcardKeys: <T>(input: T) => T;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { OpenAPIV2 } from 'openapi-types';
|
|
2
1
|
import { TListInputCustomProps, TRangeInputCustomProps } from '../../../../../localTypes/formExtensions';
|
|
3
2
|
import { TFormName, TExpandedControls, TNamespaceData, TPersistedControls, TUrlParams } from '../../../../../localTypes/form';
|
|
4
|
-
|
|
3
|
+
import { TFormSchemaNode, TFormSchemaProperties } from '../../../../../localTypes/formSchema';
|
|
4
|
+
export declare const getStringFormItemFromSwagger: ({ name, arrKey, arrName, persistName, required, forceNonRequired, description, namespaceData, isAdditionalProperties, removeField, persistedControls, onRemoveByMinus, defaultValue, example, nullable, }: {
|
|
5
5
|
name: TFormName;
|
|
6
6
|
arrKey?: number | undefined;
|
|
7
7
|
arrName?: TFormName | undefined;
|
|
@@ -16,8 +16,11 @@ export declare const getStringFormItemFromSwagger: ({ name, arrKey, arrName, per
|
|
|
16
16
|
}) => void;
|
|
17
17
|
persistedControls: TPersistedControls;
|
|
18
18
|
onRemoveByMinus?: (() => void) | undefined;
|
|
19
|
+
defaultValue?: string | undefined;
|
|
20
|
+
example?: string | undefined;
|
|
21
|
+
nullable?: boolean | undefined;
|
|
19
22
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
20
|
-
export declare const getEnumStringFormItemFromSwagger: ({ name, arrKey, arrName, persistName, required, forceNonRequired, description, isAdditionalProperties, removeField, options, persistedControls, onRemoveByMinus, }: {
|
|
23
|
+
export declare const getEnumStringFormItemFromSwagger: ({ name, arrKey, arrName, persistName, required, forceNonRequired, description, isAdditionalProperties, removeField, options, persistedControls, onRemoveByMinus, defaultValue, example, nullable, }: {
|
|
21
24
|
name: TFormName;
|
|
22
25
|
arrKey?: number | undefined;
|
|
23
26
|
arrName?: TFormName | undefined;
|
|
@@ -32,8 +35,11 @@ export declare const getEnumStringFormItemFromSwagger: ({ name, arrKey, arrName,
|
|
|
32
35
|
options: string[];
|
|
33
36
|
persistedControls: TPersistedControls;
|
|
34
37
|
onRemoveByMinus?: (() => void) | undefined;
|
|
38
|
+
defaultValue?: string | undefined;
|
|
39
|
+
example?: string | undefined;
|
|
40
|
+
nullable?: boolean | undefined;
|
|
35
41
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
36
|
-
export declare const getNumberFormItemFromSwagger: ({ isNumber, name, arrKey, arrName, persistName, required, forceNonRequired, description, isAdditionalProperties, removeField, persistedControls, onRemoveByMinus, }: {
|
|
42
|
+
export declare const getNumberFormItemFromSwagger: ({ isNumber, name, arrKey, arrName, persistName, required, forceNonRequired, description, isAdditionalProperties, removeField, persistedControls, onRemoveByMinus, defaultValue, example, nullable, }: {
|
|
37
43
|
isNumber?: boolean | undefined;
|
|
38
44
|
name: TFormName;
|
|
39
45
|
arrKey?: number | undefined;
|
|
@@ -48,6 +54,9 @@ export declare const getNumberFormItemFromSwagger: ({ isNumber, name, arrKey, ar
|
|
|
48
54
|
}) => void;
|
|
49
55
|
persistedControls: TPersistedControls;
|
|
50
56
|
onRemoveByMinus?: (() => void) | undefined;
|
|
57
|
+
defaultValue?: number | undefined;
|
|
58
|
+
example?: number | undefined;
|
|
59
|
+
nullable?: boolean | undefined;
|
|
51
60
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
52
61
|
export declare const getRangeInputFormItemFromSwagger: ({ name, arrKey, arrName, persistName, required, forceNonRequired, description, isEdit, persistedControls, customProps, urlParams, onRemoveByMinus, }: {
|
|
53
62
|
name: TFormName;
|
|
@@ -63,7 +72,7 @@ export declare const getRangeInputFormItemFromSwagger: ({ name, arrKey, arrName,
|
|
|
63
72
|
urlParams: TUrlParams;
|
|
64
73
|
onRemoveByMinus?: (() => void) | undefined;
|
|
65
74
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
66
|
-
export declare const getStringMultilineFormItemFromSwagger: ({ name, arrKey, arrName, persistName, required, forceNonRequired, description, isAdditionalProperties, removeField, persistedControls, onRemoveByMinus, isBase64, }: {
|
|
75
|
+
export declare const getStringMultilineFormItemFromSwagger: ({ name, arrKey, arrName, persistName, required, forceNonRequired, description, isAdditionalProperties, removeField, persistedControls, onRemoveByMinus, isBase64, defaultValue, example, nullable, }: {
|
|
67
76
|
name: TFormName;
|
|
68
77
|
arrKey?: number | undefined;
|
|
69
78
|
arrName?: TFormName | undefined;
|
|
@@ -78,8 +87,11 @@ export declare const getStringMultilineFormItemFromSwagger: ({ name, arrKey, arr
|
|
|
78
87
|
persistedControls: TPersistedControls;
|
|
79
88
|
onRemoveByMinus?: (() => void) | undefined;
|
|
80
89
|
isBase64?: boolean | undefined;
|
|
90
|
+
defaultValue?: string | undefined;
|
|
91
|
+
example?: string | undefined;
|
|
92
|
+
nullable?: boolean | undefined;
|
|
81
93
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
82
|
-
export declare const getListInputFormItemFromSwagger: ({ name, arrKey, arrName, persistName, required, forceNonRequired, description, isAdditionalProperties, removeField, persistedControls, customProps, urlParams, onRemoveByMinus, }: {
|
|
94
|
+
export declare const getListInputFormItemFromSwagger: ({ name, arrKey, arrName, persistName, required, forceNonRequired, description, isAdditionalProperties, removeField, persistedControls, customProps, urlParams, onRemoveByMinus, defaultValue, }: {
|
|
83
95
|
name: TFormName;
|
|
84
96
|
arrKey?: number | undefined;
|
|
85
97
|
arrName?: TFormName | undefined;
|
|
@@ -95,8 +107,9 @@ export declare const getListInputFormItemFromSwagger: ({ name, arrKey, arrName,
|
|
|
95
107
|
customProps: TListInputCustomProps;
|
|
96
108
|
urlParams: TUrlParams;
|
|
97
109
|
onRemoveByMinus?: (() => void) | undefined;
|
|
110
|
+
defaultValue?: string | string[] | undefined;
|
|
98
111
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
99
|
-
export declare const getBooleanFormItemFromSwagger: ({ name, arrKey, arrName, description, makeValueUndefined, isAdditionalProperties, removeField, onRemoveByMinus, }: {
|
|
112
|
+
export declare const getBooleanFormItemFromSwagger: ({ name, arrKey, arrName, description, makeValueUndefined, isAdditionalProperties, removeField, onRemoveByMinus, defaultValue, }: {
|
|
100
113
|
name: TFormName;
|
|
101
114
|
arrKey?: number | undefined;
|
|
102
115
|
arrName?: TFormName | undefined;
|
|
@@ -107,9 +120,10 @@ export declare const getBooleanFormItemFromSwagger: ({ name, arrKey, arrName, de
|
|
|
107
120
|
path: TFormName;
|
|
108
121
|
}) => void;
|
|
109
122
|
onRemoveByMinus?: (() => void) | undefined;
|
|
123
|
+
defaultValue?: boolean | undefined;
|
|
110
124
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
111
|
-
export declare const getArrayFormItemFromSwagger: ({ schema, name, arrKey, arrName, expandName, persistName, required, forceNonRequired, description, makeValueUndefined, addField, isAdditionalProperties, removeField, isEdit, expandedControls, persistedControls, sortPaths, urlParams, onRemoveByMinus, }: {
|
|
112
|
-
schema:
|
|
125
|
+
export declare const getArrayFormItemFromSwagger: ({ schema, name, arrKey, arrName, expandName, persistName, required, forceNonRequired, description, makeValueUndefined, addField, isAdditionalProperties, removeField, isEdit, expandedControls, persistedControls, objectValidationErrors, sortPaths, urlParams, onRemoveByMinus, }: {
|
|
126
|
+
schema: TFormSchemaNode;
|
|
113
127
|
name: TFormName;
|
|
114
128
|
arrKey?: number | undefined;
|
|
115
129
|
arrName?: TFormName | undefined;
|
|
@@ -123,10 +137,8 @@ export declare const getArrayFormItemFromSwagger: ({ schema, name, arrKey, arrNa
|
|
|
123
137
|
path: TFormName;
|
|
124
138
|
name: string;
|
|
125
139
|
type: string;
|
|
126
|
-
items?:
|
|
127
|
-
|
|
128
|
-
} | undefined;
|
|
129
|
-
nestedProperties?: OpenAPIV2.SchemaObject['properties'];
|
|
140
|
+
items?: TFormSchemaNode | undefined;
|
|
141
|
+
nestedProperties?: TFormSchemaProperties | undefined;
|
|
130
142
|
required?: string | undefined;
|
|
131
143
|
}) => void;
|
|
132
144
|
isAdditionalProperties?: boolean | undefined;
|
|
@@ -136,14 +148,13 @@ export declare const getArrayFormItemFromSwagger: ({ schema, name, arrKey, arrNa
|
|
|
136
148
|
isEdit: boolean;
|
|
137
149
|
expandedControls: TExpandedControls;
|
|
138
150
|
persistedControls: TPersistedControls;
|
|
151
|
+
objectValidationErrors?: Record<string, string[]> | undefined;
|
|
139
152
|
sortPaths?: string[][] | undefined;
|
|
140
153
|
urlParams: TUrlParams;
|
|
141
154
|
onRemoveByMinus?: (() => void) | undefined;
|
|
142
155
|
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
143
|
-
export declare const getObjectFormItemsDraft: ({ properties, name, arrKey, arrName, expandName, persistName, required, forceNonRequired, description, namespaceData, makeValueUndefined, addField, removeField, isEdit, expandedControls, persistedControls, sortPaths, urlParams, }: {
|
|
144
|
-
properties:
|
|
145
|
-
[name: string]: OpenAPIV2.SchemaObject;
|
|
146
|
-
};
|
|
156
|
+
export declare const getObjectFormItemsDraft: ({ properties, name, arrKey, arrName, expandName, persistName, required, forceNonRequired, description, namespaceData, makeValueUndefined, addField, removeField, isEdit, expandedControls, persistedControls, objectValidationErrors, sortPaths, urlParams, }: {
|
|
157
|
+
properties: TFormSchemaProperties;
|
|
147
158
|
name: TFormName;
|
|
148
159
|
arrKey?: number | undefined;
|
|
149
160
|
arrName?: TFormName | undefined;
|
|
@@ -158,10 +169,8 @@ export declare const getObjectFormItemsDraft: ({ properties, name, arrKey, arrNa
|
|
|
158
169
|
path: TFormName;
|
|
159
170
|
name: string;
|
|
160
171
|
type: string;
|
|
161
|
-
items?:
|
|
162
|
-
|
|
163
|
-
} | undefined;
|
|
164
|
-
nestedProperties?: OpenAPIV2.SchemaObject['properties'];
|
|
172
|
+
items?: TFormSchemaNode | undefined;
|
|
173
|
+
nestedProperties?: TFormSchemaProperties | undefined;
|
|
165
174
|
required?: string | undefined;
|
|
166
175
|
}) => void;
|
|
167
176
|
removeField: ({ path }: {
|
|
@@ -170,13 +179,14 @@ export declare const getObjectFormItemsDraft: ({ properties, name, arrKey, arrNa
|
|
|
170
179
|
isEdit: boolean;
|
|
171
180
|
expandedControls: TExpandedControls;
|
|
172
181
|
persistedControls: TPersistedControls;
|
|
182
|
+
objectValidationErrors?: Record<string, string[]> | undefined;
|
|
173
183
|
sortPaths?: string[][] | undefined;
|
|
174
184
|
urlParams: TUrlParams;
|
|
175
185
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
176
|
-
export declare const getObjectFormItemFromSwagger: ({ properties, name, arrKey, arrName, expandName, persistName, selfRequired, required, forceNonRequired, description, namespaceData, makeValueUndefined, addField, isAdditionalProperties, removeField, isEdit, expandedControls, persistedControls, sortPaths, urlParams, onRemoveByMinus, }: {
|
|
177
|
-
properties:
|
|
178
|
-
|
|
179
|
-
|
|
186
|
+
export declare const getObjectFormItemFromSwagger: ({ properties, oneOfRequiredGroups, objectValidationErrors, name, arrKey, arrName, expandName, persistName, selfRequired, required, forceNonRequired, description, namespaceData, makeValueUndefined, addField, isAdditionalProperties, removeField, isEdit, expandedControls, persistedControls, sortPaths, urlParams, onRemoveByMinus, }: {
|
|
187
|
+
properties: TFormSchemaProperties;
|
|
188
|
+
oneOfRequiredGroups?: string[][] | undefined;
|
|
189
|
+
objectValidationErrors?: Record<string, string[]> | undefined;
|
|
180
190
|
name: TFormName;
|
|
181
191
|
arrKey?: number | undefined;
|
|
182
192
|
arrName?: TFormName | undefined;
|
|
@@ -192,10 +202,8 @@ export declare const getObjectFormItemFromSwagger: ({ properties, name, arrKey,
|
|
|
192
202
|
path: TFormName;
|
|
193
203
|
name: string;
|
|
194
204
|
type: string;
|
|
195
|
-
items?:
|
|
196
|
-
|
|
197
|
-
} | undefined;
|
|
198
|
-
nestedProperties?: OpenAPIV2.SchemaObject['properties'];
|
|
205
|
+
items?: TFormSchemaNode | undefined;
|
|
206
|
+
nestedProperties?: TFormSchemaProperties | undefined;
|
|
199
207
|
required?: string | undefined;
|
|
200
208
|
}) => void;
|
|
201
209
|
isAdditionalProperties?: boolean | undefined;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { EnrichedTableProvider, EnrichedTable, getEnrichedColumns, getEnrichedColumnsWithControls } from './organisms';
|
|
2
|
-
export type { TEnrichedTableProviderProps, TEnrichedTableProps } from './organisms';
|
|
1
|
+
export { EnrichedTableProvider, EnrichedTable, ClusterListTable, getEnrichedColumns, getEnrichedColumnsWithControls, } from './organisms';
|
|
2
|
+
export type { TEnrichedTableProviderProps, TEnrichedTableProps, TClusterListTableProps } from './organisms';
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { TableProps, TablePaginationConfig } from 'antd';
|
|
2
|
+
import { AnyObject } from 'antd/es/_util/type';
|
|
3
|
+
export type TClusterListTableProps<T extends AnyObject = AnyObject> = {
|
|
4
|
+
theme: 'light' | 'dark';
|
|
5
|
+
dataSource: TableProps<T>['dataSource'];
|
|
6
|
+
columns: TableProps<T>['columns'];
|
|
7
|
+
pathToNavigate?: string;
|
|
8
|
+
recordKeysForNavigation?: string | string[];
|
|
9
|
+
rowClassName?: TableProps<T>['rowClassName'];
|
|
10
|
+
onRow?: TableProps<T>['onRow'];
|
|
11
|
+
rowClickable?: boolean;
|
|
12
|
+
navigationSettings?: {
|
|
13
|
+
apiGroup: string;
|
|
14
|
+
apiVersion: string;
|
|
15
|
+
plural: string;
|
|
16
|
+
resourceName: string;
|
|
17
|
+
};
|
|
18
|
+
tableProps?: {
|
|
19
|
+
borderless?: boolean;
|
|
20
|
+
paginationPosition?: TablePaginationConfig['position'];
|
|
21
|
+
isTotalLeft?: boolean;
|
|
22
|
+
maxHeight?: number;
|
|
23
|
+
virtual?: boolean;
|
|
24
|
+
disablePagination?: boolean;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
export declare const ClusterListTable: <T extends AnyObject = AnyObject>({ theme, dataSource, columns, pathToNavigate, recordKeysForNavigation, rowClassName, onRow, rowClickable, navigationSettings, tableProps, }: TClusterListTableProps<T>) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
package/dist/types/components/molecules/EnrichedTable/organisms/EnrichedTable/EnrichedTable.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
2
|
import { TableProps, TablePaginationConfig } from 'antd';
|
|
3
|
-
import {
|
|
4
|
-
|
|
3
|
+
import { AnyObject } from 'antd/es/_util/type';
|
|
4
|
+
import { TAdditionalPrinterColumnsColWidths, TAdditionalPrinterColumnsKeyTypeProps, TAdditionalPrinterColumnsTrimLengths, TAdditionalPrinterColumnsUndefinedValues, TAdditionalPrinterColumnsCustomSortersAndFilters, TAdditionalPrinterColumnsTooltips } from '../../../../../localTypes/richTable';
|
|
5
|
+
export type TEnrichedTableProps<T extends AnyObject = AnyObject> = {
|
|
5
6
|
theme: 'light' | 'dark';
|
|
6
7
|
baseprefix?: string;
|
|
7
|
-
dataSource: TableProps['dataSource'];
|
|
8
|
-
columns: TableProps['columns'];
|
|
8
|
+
dataSource: TableProps<T>['dataSource'];
|
|
9
|
+
columns: TableProps<T>['columns'];
|
|
9
10
|
pathToNavigate?: string;
|
|
10
11
|
recordKeysForNavigation?: string | string[];
|
|
11
12
|
recordKeysForNavigationSecond?: string | string[];
|
|
@@ -13,6 +14,7 @@ export type TEnrichedTableProps = {
|
|
|
13
14
|
additionalPrinterColumnsUndefinedValues?: TAdditionalPrinterColumnsUndefinedValues;
|
|
14
15
|
additionalPrinterColumnsTrimLengths?: TAdditionalPrinterColumnsTrimLengths;
|
|
15
16
|
additionalPrinterColumnsColWidths?: TAdditionalPrinterColumnsColWidths;
|
|
17
|
+
additionalPrinterColumnsTooltips?: TAdditionalPrinterColumnsTooltips;
|
|
16
18
|
additionalPrinterColumnsKeyTypeProps?: TAdditionalPrinterColumnsKeyTypeProps;
|
|
17
19
|
additionalPrinterColumnsCustomSortersAndFilters?: TAdditionalPrinterColumnsCustomSortersAndFilters;
|
|
18
20
|
selectData?: {
|
|
@@ -23,6 +25,9 @@ export type TEnrichedTableProps = {
|
|
|
23
25
|
selectedRowKeys: React.Key[];
|
|
24
26
|
};
|
|
25
27
|
withoutControls?: boolean;
|
|
28
|
+
rowClassName?: TableProps<T>['rowClassName'];
|
|
29
|
+
onRow?: TableProps<T>['onRow'];
|
|
30
|
+
rowClickable?: boolean;
|
|
26
31
|
tableProps?: {
|
|
27
32
|
borderless?: boolean;
|
|
28
33
|
paginationPosition?: TablePaginationConfig['position'];
|
|
@@ -34,4 +39,4 @@ export type TEnrichedTableProps = {
|
|
|
34
39
|
disablePagination?: boolean;
|
|
35
40
|
};
|
|
36
41
|
};
|
|
37
|
-
export declare const EnrichedTable:
|
|
42
|
+
export declare const EnrichedTable: <T extends AnyObject = AnyObject>({ theme, baseprefix, dataSource, columns, pathToNavigate, recordKeysForNavigation, recordKeysForNavigationSecond, recordKeysForNavigationThird, additionalPrinterColumnsUndefinedValues, additionalPrinterColumnsTrimLengths, additionalPrinterColumnsColWidths, additionalPrinterColumnsTooltips, additionalPrinterColumnsKeyTypeProps, additionalPrinterColumnsCustomSortersAndFilters, selectData, withoutControls, rowClassName, onRow, rowClickable, tableProps, }: TEnrichedTableProps<T>) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|