@camstack/ui-library 1.2.251 → 1.2.253
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/composites/addon-global-settings-form.d.ts +6 -1
- package/dist/composites/config-secret-field.d.ts +22 -3
- package/dist/composites/index.d.ts +1 -1
- package/dist/generated/system-hooks.d.ts +2 -0
- package/dist/index.cjs +3083 -3054
- package/dist/index.js +3080 -3055
- package/dist/primitives/badge.d.ts +2 -2
- package/dist/primitives/button.d.ts +1 -1
- package/dist/primitives/icon-button.d.ts +1 -1
- package/dist/primitives/index.d.ts +1 -0
- package/dist/primitives/password-input.d.ts +19 -0
- package/dist/primitives/tooltip.d.ts +4 -1
- package/package.json +1 -1
|
@@ -26,6 +26,11 @@ interface AddonGlobalSettingsFormProps {
|
|
|
26
26
|
readonly onAfterChange?: () => void;
|
|
27
27
|
/** Bump to force refetch (e.g. after an external mutation). */
|
|
28
28
|
readonly refreshToken?: number;
|
|
29
|
+
/**
|
|
30
|
+
* Render only these section ids of the addon's schema (e.g. System → Cluster
|
|
31
|
+
* draws the `system-config` cluster section alone). Absent → every section.
|
|
32
|
+
*/
|
|
33
|
+
readonly sectionIds?: readonly string[];
|
|
29
34
|
/**
|
|
30
35
|
* Render as collapsible. When true, the form body is hidden until
|
|
31
36
|
* the operator expands the header (click). Defaults to open so
|
|
@@ -56,5 +61,5 @@ interface AddonGlobalSettingsFormProps {
|
|
|
56
61
|
*/
|
|
57
62
|
readonly onOverrideChange?: (patch: Record<string, unknown>, effective: Record<string, unknown>) => void;
|
|
58
63
|
}
|
|
59
|
-
export declare function AddonGlobalSettingsForm({ trpc, addonId, nodeId, title, disabled, onAfterChange, refreshToken, collapsible, defaultOpen, mode, onOverrideChange, }: AddonGlobalSettingsFormProps): import("react").JSX.Element;
|
|
64
|
+
export declare function AddonGlobalSettingsForm({ trpc, addonId, nodeId, title, disabled, onAfterChange, refreshToken, sectionIds, collapsible, defaultOpen, mode, onOverrideChange, }: AddonGlobalSettingsFormProps): import("react").JSX.Element;
|
|
60
65
|
export {};
|
|
@@ -1,15 +1,34 @@
|
|
|
1
|
-
import { ConfigField } from '@camstack/types';
|
|
1
|
+
import { ConfigField, SecretFieldView } from '@camstack/types';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
-
/** How long a revealed value stays on screen. */
|
|
4
|
-
export declare const SECRET_REVEAL_MS = 10000;
|
|
5
3
|
/** Returns the stored value of a ref (audited by the host). */
|
|
6
4
|
export type SecretRevealFn = (ref: string) => Promise<string>;
|
|
5
|
+
/** How long the System → Secrets page shows a revealed value. */
|
|
6
|
+
export declare const SECRET_REVEAL_MS = 10000;
|
|
7
|
+
/** What an untouched stored secret shows in place of its value. */
|
|
8
|
+
export declare const SECRET_MASK_PLACEHOLDER = "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022";
|
|
7
9
|
export declare function SecretRevealProvider({ reveal, children, }: {
|
|
8
10
|
readonly reveal: SecretRevealFn;
|
|
9
11
|
readonly children: ReactNode;
|
|
10
12
|
}): import("react").JSX.Element;
|
|
11
13
|
/** Does this value belong to the keychain rendering (a view, or "not set")? */
|
|
12
14
|
export declare function isKeychainFieldValue(value: unknown): boolean;
|
|
15
|
+
/**
|
|
16
|
+
* What the operator has done to the field. `untouched` shows nothing and
|
|
17
|
+
* sends nothing; `visible` holds text the operator can see — revealed (then
|
|
18
|
+
* `revealed` is the stored value) or typed.
|
|
19
|
+
*/
|
|
20
|
+
export type SecretEntry = {
|
|
21
|
+
readonly kind: 'untouched';
|
|
22
|
+
} | {
|
|
23
|
+
readonly kind: 'visible';
|
|
24
|
+
readonly text: string;
|
|
25
|
+
readonly revealed: string | null;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* The value the form sends for an entry. `stored` — something is stored (or
|
|
29
|
+
* already marked for removal) — is what makes an emptied box a CLEAR.
|
|
30
|
+
*/
|
|
31
|
+
export declare function secretSubmitValue(entry: SecretEntry, original: SecretFieldView | null, stored: boolean): unknown;
|
|
13
32
|
export interface SecretFieldProps {
|
|
14
33
|
readonly field: ConfigField;
|
|
15
34
|
/** The view (or null) the form was hydrated with, or what the operator has done since. */
|
|
@@ -55,7 +55,7 @@ export * from './code-block';
|
|
|
55
55
|
export type { TranslationFn } from './config-form-builder';
|
|
56
56
|
export { ConfigFormBuilder } from './config-form-builder';
|
|
57
57
|
export type { ProbeState } from './config-form-field';
|
|
58
|
-
export { isKeychainFieldValue, SECRET_REVEAL_MS, SecretFieldControl, type SecretFieldProps, type SecretRevealFn, SecretRevealProvider, } from './config-secret-field';
|
|
58
|
+
export { isKeychainFieldValue, SECRET_MASK_PLACEHOLDER, SECRET_REVEAL_MS, type SecretEntry, SecretFieldControl, type SecretFieldProps, secretSubmitValue, type SecretRevealFn, SecretRevealProvider, } from './config-secret-field';
|
|
59
59
|
export { ConfigFormField, isFieldVisible, NodeMultiSelectField, NodeSelectField, } from './config-form-field';
|
|
60
60
|
export type { ConfirmActionButtonProps } from './confirm-action-button';
|
|
61
61
|
export { ConfirmActionButton } from './confirm-action-button';
|
|
@@ -791,6 +791,8 @@ export declare const useKeychainAdminListSecrets: typeof trpc.keychainAdmin.list
|
|
|
791
791
|
export declare const useKeychainAdminListAudit: typeof trpc.keychainAdmin.listAudit.useQuery;
|
|
792
792
|
/** Generated alias around `trpc.keychainAdmin.reveal.useMutation`. */
|
|
793
793
|
export declare const useKeychainAdminReveal: typeof trpc.keychainAdmin.reveal.useMutation;
|
|
794
|
+
/** Generated alias around `trpc.keychainAdmin.setSystemSecret.useMutation`. */
|
|
795
|
+
export declare const useKeychainAdminSetSystemSecret: typeof trpc.keychainAdmin.setSystemSecret.useMutation;
|
|
794
796
|
/** Generated alias around `trpc.keychainAdmin.deleteOrphans.useMutation`. */
|
|
795
797
|
export declare const useKeychainAdminDeleteOrphans: typeof trpc.keychainAdmin.deleteOrphans.useMutation;
|
|
796
798
|
/** Generated alias around `trpc.keychainAdmin.rotateMasterKey.useMutation`. */
|