@prorobotech/openapi-k8s-toolkit 1.5.0-alpha.8 → 1.5.0-alpha.9

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,10 +1,12 @@
1
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;
2
+ export type TDisplayableDefaultValue = string | number | boolean | string[];
3
+ export declare const hasActionableDefaultValue: (defaultValue: TDisplayableDefaultValue | undefined) => defaultValue is TDisplayableDefaultValue;
4
+ export declare const formatDefaultValue: (defaultValue: TDisplayableDefaultValue) => string;
5
+ export declare const buildPlaceholder: (name: TFormName, defaultValue?: TDisplayableDefaultValue, example?: TDisplayableDefaultValue) => string;
4
6
  /**
5
7
  * Returns a tooltip body with the example when both `default` and `example` are set —
6
8
  * `default` occupies the placeholder, so `example` would otherwise be lost. Returns
7
9
  * `undefined` when no dedicated tooltip is needed (example is either absent or already
8
10
  * surfaced as the placeholder).
9
11
  */
10
- export declare const getExampleTooltip: (defaultValue?: string | number | boolean | string[], example?: string | number | boolean | string[]) => string | undefined;
12
+ export declare const getExampleTooltip: (defaultValue?: TDisplayableDefaultValue, example?: TDisplayableDefaultValue) => string | undefined;
@@ -1,4 +1,5 @@
1
1
  import { TFormName } from '../../../../../localTypes/form';
2
+ import { TDisplayableDefaultValue } from './buildPlaceholder';
2
3
  type TDefaultValueButtonState = {
3
4
  visible: false;
4
5
  } | {
@@ -7,5 +8,5 @@ type TDefaultValueButtonState = {
7
8
  handleApply: () => void;
8
9
  handleClear: () => void;
9
10
  };
10
- export declare const useDefaultValueButton: (formFieldName: TFormName, defaultValue: string | number | boolean | string[] | undefined, nullable?: boolean) => TDefaultValueButtonState;
11
+ export declare const useDefaultValueButton: (formFieldName: TFormName, defaultValue: TDisplayableDefaultValue | undefined, nullable?: boolean) => TDefaultValueButtonState;
11
12
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prorobotech/openapi-k8s-toolkit",
3
- "version": "1.5.0-alpha.8",
3
+ "version": "1.5.0-alpha.9",
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",