@parallelworks/ui 0.1.0 → 0.3.0

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 (146) hide show
  1. package/dist/assets/editor.worker-CuBRIwi-.js +14776 -0
  2. package/dist/assets/json.worker-8ytS02vz.js +22161 -0
  3. package/dist/assets/yaml.worker-DJC-VUcv.js +48367 -0
  4. package/dist/chunks/CodePreviewEditor-CSPRILMp.js +61 -0
  5. package/dist/chunks/Indicator-hBSIxOPK.js +39 -0
  6. package/dist/chunks/Loader-DQiZ75fa.js +25 -0
  7. package/dist/chunks/Markdown-C5Re2ezs.js +101 -0
  8. package/dist/chunks/MarkdownImpl-Bq4QhrtA.js +33 -0
  9. package/dist/chunks/Modal-sOUEwebV.js +121 -0
  10. package/dist/chunks/Monaco-CC4ak1JG.js +717 -0
  11. package/dist/chunks/Provider-DvVvScTQ.js +391 -0
  12. package/dist/chunks/StatusBadge-DXp4zkSd.js +46 -0
  13. package/dist/chunks/SwitchToggle-2uRw8ZeJ.js +725 -0
  14. package/dist/chunks/SwitchToggleSmall-FcsaYSTs.js +14 -0
  15. package/dist/chunks/Table-C5z6qWjM.js +91 -0
  16. package/dist/chunks/Tooltip-WgbiC_nd.js +71 -0
  17. package/dist/chunks/editor-D55tumuZ.js +372 -0
  18. package/dist/chunks/lib-DTgL8klR.js +191 -0
  19. package/dist/chunks/list-7PyDF1tz.js +465 -0
  20. package/dist/components/CollapsiblePanel.d.ts +27 -0
  21. package/dist/components/CopyToClipboard.d.ts +17 -0
  22. package/dist/components/Dropdown.d.ts +24 -0
  23. package/dist/components/Indicator.d.ts +4 -0
  24. package/dist/components/Listbox.d.ts +18 -0
  25. package/dist/components/Markdown.d.ts +7 -0
  26. package/dist/components/MarkdownImpl.d.ts +2 -0
  27. package/dist/components/MultiSelect.d.ts +19 -0
  28. package/dist/components/Overview.d.ts +12 -0
  29. package/dist/components/Provider.d.ts +438 -0
  30. package/dist/components/SectionHeader.d.ts +6 -0
  31. package/dist/components/SwitchToggle.d.ts +12 -0
  32. package/dist/components/SwitchToggleSmall.d.ts +6 -0
  33. package/dist/components/dropdownUtils.d.ts +18 -0
  34. package/dist/editor/Editor.d.ts +2 -0
  35. package/dist/editor/EditorField.d.ts +11 -0
  36. package/dist/editor/FormCodePanel.d.ts +8 -0
  37. package/dist/editor/Monaco.d.ts +31 -0
  38. package/dist/editor/index.d.ts +7 -0
  39. package/dist/editor/index.js +2 -0
  40. package/dist/editor/themes.d.ts +4 -0
  41. package/dist/editor/useCssIsDark.d.ts +6 -0
  42. package/dist/editor/workers.d.ts +6 -0
  43. package/dist/file-explorer/FileExplorer.d.ts +23 -0
  44. package/dist/file-explorer/FileExplorerContext.d.ts +17 -0
  45. package/dist/file-explorer/FilePreview/CodePreviewEditor.d.ts +6 -0
  46. package/dist/file-explorer/FilePreview/Inline.d.ts +13 -0
  47. package/dist/file-explorer/FilePreview/StreamedBadge.d.ts +1 -0
  48. package/dist/file-explorer/FilePreview/Viewer.d.ts +15 -0
  49. package/dist/file-explorer/FilePreview/index.d.ts +15 -0
  50. package/dist/file-explorer/FilePreview/parse.d.ts +24 -0
  51. package/dist/file-explorer/FilePreview/previewCache.d.ts +26 -0
  52. package/dist/file-explorer/FilePreview/previewType.d.ts +21 -0
  53. package/dist/file-explorer/FilePreview/readCappedBytes.d.ts +37 -0
  54. package/dist/file-explorer/FilePreview/useObjectBlobUrl.d.ts +16 -0
  55. package/dist/file-explorer/FilePreview/useObjectText.d.ts +23 -0
  56. package/dist/file-explorer/FilePreview/usePresignedUrl.d.ts +12 -0
  57. package/dist/file-explorer/FileRow.d.ts +35 -0
  58. package/dist/file-explorer/FileRowsWindow.d.ts +43 -0
  59. package/dist/file-explorer/FileTable.d.ts +26 -0
  60. package/dist/file-explorer/FileTableHeaders.d.ts +13 -0
  61. package/dist/file-explorer/LoadMoreRow.d.ts +15 -0
  62. package/dist/file-explorer/TreeView.d.ts +28 -0
  63. package/dist/file-explorer/helpers.d.ts +47 -0
  64. package/dist/file-explorer/index.d.ts +10 -0
  65. package/dist/file-explorer/index.js +5646 -0
  66. package/dist/file-explorer/lib/batch.d.ts +3 -0
  67. package/dist/file-explorer/lib/errors.d.ts +3 -0
  68. package/dist/file-explorer/lib/fileExplorer.d.ts +32 -0
  69. package/dist/file-explorer/lib/paging.d.ts +93 -0
  70. package/dist/file-explorer/lib/types.d.ts +92 -0
  71. package/dist/file-explorer/lib/utils.d.ts +37 -0
  72. package/dist/file-explorer/toasts.d.ts +9 -0
  73. package/dist/file-explorer/treeRows.d.ts +35 -0
  74. package/dist/file-explorer/useNearEnd.d.ts +7 -0
  75. package/dist/form/FieldWrapper.d.ts +10 -0
  76. package/dist/form/Fields/BooleanField.d.ts +12 -0
  77. package/dist/form/Fields/BucketReadOnlyField.d.ts +7 -0
  78. package/dist/form/Fields/CheckboxGroupField.d.ts +18 -0
  79. package/dist/form/Fields/ColorField.d.ts +8 -0
  80. package/dist/form/Fields/DropdownField.d.ts +24 -0
  81. package/dist/form/Fields/DurationField.d.ts +13 -0
  82. package/dist/form/Fields/LabelField.d.ts +9 -0
  83. package/dist/form/Fields/MultiDropdownField.d.ts +18 -0
  84. package/dist/form/Fields/NumberField.d.ts +13 -0
  85. package/dist/form/Fields/ObjectField.d.ts +8 -0
  86. package/dist/form/Fields/RadioField.d.ts +9 -0
  87. package/dist/form/Fields/RangeField.d.ts +11 -0
  88. package/dist/form/Fields/ResourceOptionIcon.d.ts +11 -0
  89. package/dist/form/Fields/StepField.d.ts +3 -0
  90. package/dist/form/Fields/StringField.d.ts +17 -0
  91. package/dist/form/Fields/TextAreaField.d.ts +8 -0
  92. package/dist/form/Fields/durationValidity.d.ts +2 -0
  93. package/dist/form/Form.d.ts +105 -0
  94. package/dist/form/SpecialTypes/DropdownWrapper.d.ts +14 -0
  95. package/dist/form/SpecialTypes/FormikCustomDropdown.d.ts +53 -0
  96. package/dist/form/SpecialTypes/FormikCustomInput.d.ts +17 -0
  97. package/dist/form/SpecialTypes/FormikMultiSelectDropdown.d.ts +13 -0
  98. package/dist/form/SpecialTypes/FormikNumericInput.d.ts +9 -0
  99. package/dist/form/SpecialTypes/index.d.ts +3 -0
  100. package/dist/form/Wizard/WizardContainer.d.ts +5 -0
  101. package/dist/form/Wizard/WizardNavigation.d.ts +2 -0
  102. package/dist/form/Wizard/WizardStepContent.d.ts +8 -0
  103. package/dist/form/Wizard/WizardStepIndicator.d.ts +2 -0
  104. package/dist/form/Wizard/types.d.ts +171 -0
  105. package/dist/form/Wizard/useWizardState.d.ts +28 -0
  106. package/dist/form/Wizard/utils.d.ts +2 -0
  107. package/dist/form/fieldRegistry.d.ts +7 -0
  108. package/dist/form/index.d.ts +16 -0
  109. package/dist/form/index.js +2319 -0
  110. package/dist/form/lib.d.ts +15 -0
  111. package/dist/form/types/fieldComponentTypes.d.ts +32 -0
  112. package/dist/form/types/fieldTypes.d.ts +80 -0
  113. package/dist/form/types/workflow-schema.d.ts +1107 -0
  114. package/dist/form/useParsedOpts.d.ts +5 -0
  115. package/dist/form/usePrevious.d.ts +1 -0
  116. package/dist/form/utils/checkShowIfObject.d.ts +1 -0
  117. package/dist/form/utils/getParentValue.d.ts +1 -0
  118. package/dist/form/utils/getPlaceholder.d.ts +2 -0
  119. package/dist/form/utils/getValueUsingPath.d.ts +1 -0
  120. package/dist/form/utils/pwResolver.d.ts +18 -0
  121. package/dist/form/utils/secondaryField.d.ts +8 -0
  122. package/dist/form/utils/slurmDuration.d.ts +15 -0
  123. package/dist/icons.d.ts +1 -1
  124. package/dist/icons.js +2 -2
  125. package/dist/index.d.ts +17 -0
  126. package/dist/index.js +42 -350
  127. package/dist/list/ListTable.d.ts +63 -0
  128. package/dist/list/RowContextMenu.d.ts +113 -0
  129. package/dist/list/index.d.ts +2 -0
  130. package/dist/list/index.js +2 -0
  131. package/dist/logviewer/LogViewer.d.ts +18 -0
  132. package/dist/logviewer/index.d.ts +1 -0
  133. package/dist/logviewer/index.js +534 -0
  134. package/dist/logviewer/logviewer.css +70 -0
  135. package/dist/styles/theme.css +30 -0
  136. package/dist/styles.css +1 -1
  137. package/dist/workflow/AnnotationBanner.d.ts +5 -0
  138. package/dist/workflow/Collapse.d.ts +6 -0
  139. package/dist/workflow/DependencyGraph.d.ts +15 -0
  140. package/dist/workflow/JobSummary.d.ts +38 -0
  141. package/dist/workflow/MatrixGroup.d.ts +41 -0
  142. package/dist/workflow/Reveal.d.ts +7 -0
  143. package/dist/workflow/TreeView.d.ts +42 -0
  144. package/dist/workflow/index.d.ts +1 -0
  145. package/dist/workflow/index.js +2331 -0
  146. package/package.json +71 -6
@@ -0,0 +1,105 @@
1
+ import { type FormikProps, type FormikValues } from 'formik';
2
+ import { type WorkflowVariables } from '@parallelworks/workflow-parser';
3
+ import React, { type SetStateAction } from 'react';
4
+ import { type FieldComponent } from './fieldRegistry.js';
5
+ /** Applies `$meta` overrides for `labelPosition` / `spaceCompact`. */
6
+ export declare function resolveMetaOverrides(options: {
7
+ $meta?: {
8
+ labelPosition?: 'left' | 'top';
9
+ spaceCompact?: boolean;
10
+ };
11
+ } | undefined, labelPosition: 'left' | 'top' | undefined, spaceCompact: boolean): {
12
+ labelPosition: "left" | "top" | undefined;
13
+ spaceCompact: boolean;
14
+ };
15
+ /** Collects every field with a `default` for the form-level sync to track. */
16
+ export declare function collectFieldsWithDefaults(options: Record<string, any>, values?: Record<string, any>, prefix?: string): Array<{
17
+ name: string;
18
+ defaultValue: any;
19
+ }>;
20
+ export declare function defaultReferencesField(defaultValue: unknown, fieldPath: string): boolean;
21
+ export declare function findSelfReferencingFieldNames(schema: Record<string, any>, values?: Record<string, any>): string[];
22
+ /**
23
+ * Re-syncs each field's value when its resolved default changes between
24
+ * renders, unless `meta.touched` (this session) or a synth-touched marker
25
+ * (cross-session, set on first-seen when saved ≠ default) is set. Must be
26
+ * remounted via `key` when the run/config context changes.
27
+ */
28
+ export declare function DynamicDefaultsSync({ options, }: {
29
+ options: Record<string, any>;
30
+ }): null;
31
+ export declare function GroupHeader({ children, open, setOpen, title, }: {
32
+ children?: React.ReactNode;
33
+ open: boolean;
34
+ setOpen: React.Dispatch<SetStateAction<boolean>>;
35
+ title: React.ReactNode;
36
+ }): React.JSX.Element;
37
+ export type TSetFormDirty = (dirty: boolean) => void;
38
+ export declare function getInstanceTypesForForm(instances: Record<string, any>): Record<string, any>;
39
+ export declare function StatusBlock({ status }: {
40
+ status: boolean;
41
+ }): React.JSX.Element;
42
+ export declare function MultiSelectionDropdown({ name, label, invalid, options: initialOptions, setFormDirty, onChange, parentValue, }: {
43
+ name: string;
44
+ label: string;
45
+ invalid?: boolean;
46
+ options?: {
47
+ label: string;
48
+ secondaryLabel?: string;
49
+ value: any;
50
+ selected: boolean;
51
+ }[];
52
+ setFormDirty: TSetFormDirty;
53
+ onChange?: (val: any) => void;
54
+ parentValue?: any;
55
+ className?: string;
56
+ secondaryField?: string;
57
+ }): React.JSX.Element;
58
+ export declare function FieldsFromOptions({ options, values, setFormDirty, setFieldValue, setFieldTouched, parentInfo, labelPosition, missingFields, spaceCompact, workflowForm, }: {
59
+ options: Record<string, any>;
60
+ values: Record<string, any>;
61
+ setFormDirty: TSetFormDirty;
62
+ setFieldValue: (field: string, value: any, shouldValidate?: boolean) => void;
63
+ setFieldTouched: (field: string, touched?: boolean, shouldValidate?: boolean) => void;
64
+ /** If fields are part of other field, this is the info needed*/
65
+ parentInfo?: {
66
+ computeOn?: boolean;
67
+ parentName: string;
68
+ fieldNamePrefix: string;
69
+ arrayIndex?: number;
70
+ onChange?: (fieldName: string, index: number, changeOtherValuesTo?: string | boolean, keepOneValueOf?: string | boolean, currentValue?: string | boolean) => void;
71
+ };
72
+ labelPosition?: 'left' | 'top';
73
+ missingFields?: string[];
74
+ spaceCompact?: boolean;
75
+ /** Prevents deletion of hidden+ignored field values (workflow forms filter at submit time) */
76
+ workflowForm?: boolean;
77
+ }): React.JSX.Element[];
78
+ export interface DynamicFormProps {
79
+ formJSONs: Record<string, any>;
80
+ reinitialize?: boolean;
81
+ setFormDirty?: (dirty: boolean) => void;
82
+ initialValues: Record<string, any>;
83
+ setValues?: (values: Record<string, any>) => void;
84
+ formikRef?: React.RefObject<FormikProps<FormikValues> | null>;
85
+ labelPosition?: 'left' | 'top';
86
+ missingFields?: string[];
87
+ spaceCompact?: boolean;
88
+ organizationVariables?: WorkflowVariables;
89
+ needsOrganizationVariables?: boolean;
90
+ onSubmit?: (values: Record<string, any>) => void;
91
+ submitLabel?: string;
92
+ className?: string;
93
+ /** Prevents deletion of hidden+ignored field values (workflow forms filter at submit time).
94
+ * Also gates the form-level DynamicDefaultsSync — it only runs for workflow forms. */
95
+ workflowForm?: boolean;
96
+ /** Identifier for the load context (e.g. rerun slug, configuration name). When this
97
+ * changes, DynamicDefaultsSync remounts so it re-evaluates its prev-default tracking
98
+ * and saved-vs-default first-seen synthesis against the new context. */
99
+ contextKey?: string;
100
+ /** Skip expression parsing on initial values (for edit forms where saved values may contain user-typed expressions like ${{ var.X }} that should stay literal). Schema-level expressions still resolve. */
101
+ skipValueParse?: boolean;
102
+ /** Host-supplied field components, merged over the core registry by type. */
103
+ fields?: Record<string, FieldComponent>;
104
+ }
105
+ export declare function DynamicForm({ formJSONs: options, reinitialize, initialValues, setValues, setFormDirty, formikRef, labelPosition, missingFields, spaceCompact, organizationVariables, needsOrganizationVariables, onSubmit, submitLabel, className, workflowForm, contextKey, skipValueParse, fields, }: DynamicFormProps): React.JSX.Element;
@@ -0,0 +1,14 @@
1
+ import FormikCustomDropdown from './FormikCustomDropdown.js';
2
+ export default function DropdownWrapper({ options, onChange, fieldObj, setFormDirty, invalid, loading, disabled, allowCustomValue, currentValue, setFieldValue, setFieldTouched, }: {
3
+ options: React.ComponentProps<typeof FormikCustomDropdown>['options'];
4
+ onChange?: (val: string) => void;
5
+ fieldObj: any;
6
+ setFormDirty: React.ComponentProps<typeof FormikCustomDropdown>['setFormDirty'];
7
+ invalid?: boolean;
8
+ loading?: boolean;
9
+ disabled?: boolean;
10
+ allowCustomValue?: boolean;
11
+ currentValue: unknown;
12
+ setFieldValue: React.ComponentProps<typeof FormikCustomDropdown>['setFieldValue'];
13
+ setFieldTouched: React.ComponentProps<typeof FormikCustomDropdown>['setFieldTouched'];
14
+ }): import("react").JSX.Element;
@@ -0,0 +1,53 @@
1
+ import Dropdown from '../../components/Dropdown.js';
2
+ import type { TSetFormDirty } from '../Form.js';
3
+ declare function toComparableOptions(options: React.ComponentProps<typeof Dropdown>['options'] | undefined): (string | {
4
+ category: string | undefined;
5
+ options: ({
6
+ label: string;
7
+ value: unknown;
8
+ disabled: boolean | undefined;
9
+ } | {
10
+ label: string;
11
+ value: unknown;
12
+ disabled: boolean | undefined;
13
+ description: string;
14
+ })[];
15
+ } | {
16
+ label: string;
17
+ value: unknown;
18
+ disabled: boolean | undefined;
19
+ } | {
20
+ category?: undefined;
21
+ options?: undefined;
22
+ label: string;
23
+ value: unknown;
24
+ disabled: boolean | undefined;
25
+ description: string;
26
+ })[] | undefined;
27
+ type FormikCustomDropdownProps = {
28
+ name: string;
29
+ ariaLabel?: string;
30
+ options: React.ComponentProps<typeof Dropdown>['options'];
31
+ setFormDirty: TSetFormDirty;
32
+ onChange?: (val: string) => void;
33
+ parentValue?: any;
34
+ className?: string;
35
+ secondaryField?: string | string[];
36
+ disabled?: boolean;
37
+ resetOnChange?: string;
38
+ loading?: boolean;
39
+ invalid?: boolean;
40
+ autoselect?: boolean;
41
+ value?: string;
42
+ allowCustomValue?: boolean;
43
+ customValueLabel?: string;
44
+ placeholder?: string;
45
+ currentValue: unknown;
46
+ setFieldValue: (field: string, value: unknown, shouldValidate?: boolean) => void;
47
+ setFieldTouched: (field: string, isTouched?: boolean, shouldValidate?: boolean) => void;
48
+ };
49
+ declare const _default: import("react").MemoExoticComponent<({ name, ariaLabel, options, setFormDirty, onChange, parentValue, className, secondaryField, disabled, loading, invalid, autoselect, value, allowCustomValue, customValueLabel, placeholder, currentValue, setFieldValue, setFieldTouched, }: FormikCustomDropdownProps) => import("react").JSX.Element>;
50
+ export default _default;
51
+ export declare const Testables: {
52
+ toComparableOptions: typeof toComparableOptions;
53
+ };
@@ -0,0 +1,17 @@
1
+ export default function FormikCustomInput({ name, type, step, placeholder, onChange, disabled, min, max, sanitize, invalid, lowercase, minLength, maxLength, defaultValue, value, }: {
2
+ name: string;
3
+ type: 'string' | 'number' | 'password';
4
+ placeholder?: string;
5
+ onChange?: (val: string | boolean) => void;
6
+ disabled?: boolean;
7
+ step?: number;
8
+ min?: number;
9
+ max?: number;
10
+ sanitize?: string;
11
+ invalid?: boolean;
12
+ lowercase?: boolean;
13
+ minLength?: number;
14
+ maxLength?: number;
15
+ defaultValue?: any;
16
+ value?: any;
17
+ }): import("react").JSX.Element;
@@ -0,0 +1,13 @@
1
+ import type { ICategory, IOptions } from '../../components/dropdownUtils.js';
2
+ import type { TSetFormDirty } from '../Form.js';
3
+ export default function FormikMultiSelectDropdown<T>({ name, options, setFormDirty, onChange, disabled, loading, invalid, placeholder, compareBy, }: {
4
+ name: string;
5
+ options: (ICategory<T> | IOptions<T>)[];
6
+ setFormDirty: TSetFormDirty;
7
+ onChange?: (val: T[]) => void;
8
+ disabled?: boolean;
9
+ loading?: boolean;
10
+ invalid?: boolean;
11
+ placeholder?: string;
12
+ compareBy?: (a: T, b: T) => boolean;
13
+ }): import("react").JSX.Element;
@@ -0,0 +1,9 @@
1
+ export default function FormikNumericInput({ name, placeholder, onChange, disabled, min, max, invalid, }: {
2
+ name: string;
3
+ placeholder?: string;
4
+ onChange?: (val: number | undefined) => void;
5
+ disabled?: boolean;
6
+ min?: number;
7
+ max?: number;
8
+ invalid?: boolean;
9
+ }): import("react").JSX.Element;
@@ -0,0 +1,3 @@
1
+ export { default as FormikCustomDropdown } from './FormikCustomDropdown.js';
2
+ export { default as FormikCustomInput } from './FormikCustomInput.js';
3
+ export { default as FormikNumericInput } from './FormikNumericInput.js';
@@ -0,0 +1,5 @@
1
+ import type { WizardContainerProps } from './types.js';
2
+ export declare function WizardContainer({ wizardConfig, values, onChange, onSubmit, className, labelPosition, missingFields, spaceCompact, workflowForm, setFieldValue, setFieldTouched, }: WizardContainerProps & {
3
+ setFieldValue: (field: string, value: any, shouldValidate?: boolean) => void;
4
+ setFieldTouched: (field: string, touched?: boolean, shouldValidate?: boolean) => void;
5
+ }): import("react").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import type { WizardNavigationProps } from './types.js';
2
+ export declare function WizardNavigation({ currentStep, stepOrder, canGoToNext, canGoBack, isCurrentStepValid, nextLabel, prevLabel, submitLabel, onNext, onPrevious, onSubmit, }: WizardNavigationProps): import("react").JSX.Element;
@@ -0,0 +1,8 @@
1
+ import type { TSetFormDirty } from '../Form.js';
2
+ import type { WizardStepContentProps } from './types.js';
3
+ export declare function WizardStepContent({ currentStep, stepConfig, flatten, values, onValuesChange, setFormDirty, setFieldValue, setFieldTouched, ...fieldsProps }: WizardStepContentProps & {
4
+ setFormDirty: TSetFormDirty;
5
+ setFieldValue: (field: string, value: any, shouldValidate?: boolean) => void;
6
+ setFieldTouched: (field: string, touched?: boolean, shouldValidate?: boolean) => void;
7
+ flatten?: boolean;
8
+ }): import("react").JSX.Element | null;
@@ -0,0 +1,2 @@
1
+ import type { WizardStepIndicatorProps } from './types.js';
2
+ export declare function WizardStepIndicator({ stepOrder, currentStep, steps, visitedSteps, invalidSteps, onStepClick, allowJump, hideStepNumbers, }: WizardStepIndicatorProps): import("react").JSX.Element;
@@ -0,0 +1,171 @@
1
+ interface WizardNavigation {
2
+ /** Show step indicator (dots with connecting lines) */
3
+ showSteps?: boolean;
4
+ /** Allow clicking on completed steps to jump to them */
5
+ allowJump?: boolean;
6
+ /** Hide step numbers in step dots, show only titles */
7
+ hideStepNumbers?: boolean;
8
+ }
9
+ /**
10
+ * Wizard-specific configuration in $meta
11
+ */
12
+ export interface WizardConfig {
13
+ /** Must be 'wizard' to activate wizard mode */
14
+ mode: 'wizard';
15
+ /** Navigation UI options */
16
+ navigation?: WizardNavigation;
17
+ /** Label for the final submit button */
18
+ submitLabel?: string;
19
+ /** Use URL-based routing instead of component state */
20
+ urlBased?: boolean;
21
+ /** Flatten step fields into top-level inputs (default: true). Set false to preserve step keys as nested objects. */
22
+ flatten?: boolean;
23
+ }
24
+ export interface StepFieldConfig {
25
+ /** Must be 'step' */
26
+ type: 'step';
27
+ /** Title shown in step indicator */
28
+ title: string;
29
+ /** Optional description/subtitle shown below title */
30
+ description?: string;
31
+ /** Schema for fields within this step */
32
+ options: Record<string, any>;
33
+ /** Validate current step before proceeding to next (default: true) */
34
+ validateOnNext?: boolean;
35
+ /** Allow skipping this step without validation */
36
+ canSkip?: boolean;
37
+ /** Custom label for next button on this step */
38
+ nextLabel?: string;
39
+ /** Custom label for previous button on this step */
40
+ prevLabel?: string;
41
+ /** Optional tooltip text */
42
+ tooltip?: string | string[];
43
+ /** Hidden field support */
44
+ hidden?: boolean;
45
+ /** Disable this step */
46
+ disabled?: boolean;
47
+ }
48
+ /**
49
+ * Internal wizard state managed by useWizardState hook
50
+ */
51
+ export interface WizardState {
52
+ /** Current step ID/key */
53
+ currentStep: string;
54
+ /** Set of step IDs that have been visited */
55
+ visitedSteps: Set<string>;
56
+ /** Set of step IDs that have validation errors */
57
+ invalidSteps: Set<string>;
58
+ /** List of all step keys in order */
59
+ stepOrder: string[];
60
+ /** Total number of steps */
61
+ totalSteps: number;
62
+ /** Whether the wizard is on the last step */
63
+ isLastStep: boolean;
64
+ /** Whether the wizard can proceed to next step */
65
+ canProceedToNext: boolean;
66
+ /** Whether user can go back */
67
+ canGoBack: boolean;
68
+ }
69
+ /**
70
+ * Extracted wizard configuration and step information
71
+ */
72
+ export interface ParsedWizardConfig {
73
+ /** Wizard configuration from $meta */
74
+ config: WizardConfig;
75
+ /** Steps keyed by their field name */
76
+ steps: Record<string, StepFieldConfig>;
77
+ /** Ordered list of step keys */
78
+ stepOrder: string[];
79
+ /** Schema for non-step fields (should be none in pure wizard) */
80
+ otherFields: Record<string, any>;
81
+ }
82
+ /**
83
+ * Wizard navigation parameters
84
+ */
85
+ /**
86
+ * Props for WizardContainer component
87
+ */
88
+ export interface WizardContainerProps {
89
+ /** Parsed wizard configuration and steps */
90
+ wizardConfig: ParsedWizardConfig;
91
+ /** Current form values */
92
+ values: Record<string, any>;
93
+ /** Callback when values change */
94
+ onChange?: (values: Record<string, any>) => void;
95
+ /** Callback when wizard is submitted */
96
+ onSubmit?: (values: Record<string, any>) => void;
97
+ /** Additional CSS classes */
98
+ className?: string;
99
+ /** Label position for fields */
100
+ labelPosition?: 'left' | 'top';
101
+ /** Missing fields list */
102
+ missingFields?: string[];
103
+ /** Space compact mode */
104
+ spaceCompact?: boolean;
105
+ /** Workflow form mode */
106
+ workflowForm?: boolean;
107
+ }
108
+ /**
109
+ * Props for WizardStepIndicator component
110
+ */
111
+ export interface WizardStepIndicatorProps {
112
+ /** Ordered list of step keys */
113
+ stepOrder: string[];
114
+ /** Current step key */
115
+ currentStep: string;
116
+ /** Steps configuration */
117
+ steps: Record<string, StepFieldConfig>;
118
+ /** Set of visited step keys */
119
+ visitedSteps: Set<string>;
120
+ /** Set of invalid step keys */
121
+ invalidSteps: Set<string>;
122
+ /** Callback when step is clicked */
123
+ onStepClick?: (stepKey: string) => boolean;
124
+ /** Whether clicking completed steps is allowed */
125
+ allowJump?: boolean;
126
+ /** Hide step numbers */
127
+ hideStepNumbers?: boolean;
128
+ }
129
+ /**
130
+ * Props for WizardNavigation component
131
+ */
132
+ export interface WizardNavigationProps {
133
+ /** Current step key */
134
+ currentStep: string;
135
+ /** List of step keys in order */
136
+ stepOrder: string[];
137
+ /** Whether user can go to next step */
138
+ canGoToNext: boolean;
139
+ /** Whether user can go back */
140
+ canGoBack: boolean;
141
+ /** Whether current step is valid */
142
+ isCurrentStepValid: boolean;
143
+ /** Custom label for next button */
144
+ nextLabel?: string;
145
+ /** Custom label for previous button */
146
+ prevLabel?: string;
147
+ /** Custom label for submit button (on last step) */
148
+ submitLabel?: string;
149
+ /** Callback to go to next step */
150
+ onNext: () => Promise<boolean>;
151
+ /** Callback to go to previous step */
152
+ onPrevious: () => void;
153
+ /** Callback to submit wizard */
154
+ onSubmit: () => Promise<void>;
155
+ }
156
+ /**
157
+ * Props for WizardStepContent component
158
+ */
159
+ export interface WizardStepContentProps {
160
+ /** Current step key */
161
+ currentStep: string;
162
+ /** Current step configuration */
163
+ stepConfig: StepFieldConfig;
164
+ /** Form values */
165
+ values: Record<string, any>;
166
+ /** Update form values */
167
+ onValuesChange?: (values: Record<string, any>) => void;
168
+ /** Additional props to pass to FieldsFromOptions */
169
+ [key: string]: any;
170
+ }
171
+ export {};
@@ -0,0 +1,28 @@
1
+ import type { StepFieldConfig, WizardState } from './types.js';
2
+ interface UseWizardStateProps {
3
+ /** Ordered list of step keys */
4
+ stepOrder: string[];
5
+ /** Step configurations keyed by step ID */
6
+ steps: Record<string, StepFieldConfig>;
7
+ /** Function to validate current step */
8
+ validateStep: (stepKey: string) => Promise<boolean>;
9
+ /** Initial step to start with (default: first step) */
10
+ initialStep?: string;
11
+ }
12
+ export declare function useWizardState({ stepOrder, steps, validateStep, initialStep, }: UseWizardStateProps): {
13
+ currentStep: string;
14
+ visitedSteps: Set<string>;
15
+ invalidSteps: Set<string>;
16
+ isLastStep: boolean;
17
+ canGoBack: boolean;
18
+ currentStepIndex: number;
19
+ totalSteps: number;
20
+ goToNext: () => Promise<boolean>;
21
+ goToPrevious: () => void;
22
+ jumpToStep: (stepKey: string) => boolean;
23
+ reset: () => void;
24
+ markStepVisited: (stepKey: string) => void;
25
+ markStepInvalid: (stepKey: string, invalid: boolean) => void;
26
+ getState: () => WizardState;
27
+ };
28
+ export {};
@@ -0,0 +1,2 @@
1
+ import type { ParsedWizardConfig } from './types.js';
2
+ export declare function parseWizardConfig(options: Record<string, any>): ParsedWizardConfig | null;
@@ -0,0 +1,7 @@
1
+ import type React from 'react';
2
+ import type { FieldComponentProps } from './types/fieldComponentTypes.js';
3
+ export type FieldComponent = React.ComponentType<FieldComponentProps<any, any>>;
4
+ export declare const FieldRegistryContext: React.Context<Record<string, FieldComponent>>;
5
+ /** Returns null for field types no registry knows. Per-form `fields` win over
6
+ * the provider's `slots.formFields`, which win over the core registry. */
7
+ export declare function Registry(props: FieldComponentProps<any>): React.JSX.Element | null;
@@ -0,0 +1,16 @@
1
+ export { DynamicForm, DynamicDefaultsSync, FieldsFromOptions, GroupHeader, MultiSelectionDropdown, StatusBlock, collectFieldsWithDefaults, findSelfReferencingFieldNames, getInstanceTypesForForm, resolveMetaOverrides, type DynamicFormProps, type TSetFormDirty, } from './Form.js';
2
+ export { type FieldComponent, FieldRegistryContext, Registry, } from './fieldRegistry.js';
3
+ export { FieldWrapper } from './FieldWrapper.js';
4
+ export { enforceOneMustBeTrue, flattenGroups, impureSetValueFromPath, initializeValues, resolvedFlag, } from './lib.js';
5
+ export { default as DropdownWrapper } from './SpecialTypes/DropdownWrapper.js';
6
+ export { FormikCustomDropdown, FormikCustomInput, FormikNumericInput, } from './SpecialTypes/index.js';
7
+ export { default as FormikMultiSelectDropdown } from './SpecialTypes/FormikMultiSelectDropdown.js';
8
+ export { resolvePwString, resolvePwValue, type PwResolverOptions, } from './utils/pwResolver.js';
9
+ export { ResourceOptionIcon } from './Fields/ResourceOptionIcon.js';
10
+ export { default as NumberField, type INumberField, } from './Fields/NumberField.js';
11
+ export { getInvalidDurationPaths, setDurationValidity, } from './Fields/durationValidity.js';
12
+ export { FLEX_MAX_DURATION_RANGE, FLEX_WAIT_TIME_RANGE, STANDARD_MAX_DURATION_RANGE, collectPartitionDurationIssues, formatSecondsAsSlurmDuration, parseSlurmDuration, } from './utils/slurmDuration.js';
13
+ export { applySecondaryField } from './utils/secondaryField.js';
14
+ export { useParsedOpts } from './useParsedOpts.js';
15
+ export * from './types/fieldTypes.js';
16
+ export * from './types/fieldComponentTypes.js';