@process.co/ui 0.0.13 → 0.0.14
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/README.md +29 -0
- package/dist/components/fields/index.cjs +19 -0
- package/dist/components/fields/index.cjs.map +1 -1
- package/dist/components/fields/index.d.cts +1 -1
- package/dist/components/fields/index.d.ts +1 -1
- package/dist/components/fields/index.js +18 -1
- package/dist/components/fields/index.js.map +1 -1
- package/dist/{index-Bfh9REtO.d.cts → index-pApzdjfp.d.cts} +34 -2
- package/dist/{index-Bfh9REtO.d.ts → index-pApzdjfp.d.ts} +34 -2
- package/dist/index.cjs +23 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +23 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -655,6 +655,36 @@ declare function useClearInferredType(): (fieldName: string) => void;
|
|
|
655
655
|
* Returns a no-op when not inside any provider.
|
|
656
656
|
*/
|
|
657
657
|
declare function useClearAllInferredTypes(): () => void;
|
|
658
|
+
/**
|
|
659
|
+
* Hook to get a function that clears validation errors by field name prefix.
|
|
660
|
+
*
|
|
661
|
+
* Used when dynamic fields (like switch cases/conditions) are removed to clean up
|
|
662
|
+
* any associated validation errors.
|
|
663
|
+
*
|
|
664
|
+
* In development mode (DevProvider), this is a no-op.
|
|
665
|
+
* In production, this clears errors matching the prefix from the validation store.
|
|
666
|
+
*
|
|
667
|
+
* @example
|
|
668
|
+
* ```tsx
|
|
669
|
+
* const clearErrorsByPrefix = useClearValidationErrorsByPrefix();
|
|
670
|
+
*
|
|
671
|
+
* const handleRemoveCase = (caseId: string) => {
|
|
672
|
+
* // Remove the case from state
|
|
673
|
+
* setCases(cases.filter(c => c.id !== caseId));
|
|
674
|
+
* // Clear any validation errors for fields in this case
|
|
675
|
+
* clearErrorsByPrefix(caseId);
|
|
676
|
+
* };
|
|
677
|
+
* ```
|
|
678
|
+
*/
|
|
679
|
+
declare function useClearValidationErrorsByPrefix(): (fieldPrefix: string) => void;
|
|
680
|
+
/**
|
|
681
|
+
* Unified flow editor actions for custom controls (mock/dev).
|
|
682
|
+
*/
|
|
683
|
+
declare function useFlowEditorActions(): {
|
|
684
|
+
triggerLayoutUpdate: () => void;
|
|
685
|
+
triggerValidation: () => void;
|
|
686
|
+
clearValidationErrorsByPrefix: (fieldPrefix: string) => void;
|
|
687
|
+
};
|
|
658
688
|
/**
|
|
659
689
|
* Hook to subscribe to all inferred types.
|
|
660
690
|
*
|
|
@@ -757,8 +787,10 @@ declare const index_parseInferredTypes: typeof parseInferredTypes;
|
|
|
757
787
|
declare const index_useAllInferredTypes: typeof useAllInferredTypes;
|
|
758
788
|
declare const index_useClearAllInferredTypes: typeof useClearAllInferredTypes;
|
|
759
789
|
declare const index_useClearInferredType: typeof useClearInferredType;
|
|
790
|
+
declare const index_useClearValidationErrorsByPrefix: typeof useClearValidationErrorsByPrefix;
|
|
760
791
|
declare const index_useFieldPath: typeof useFieldPath;
|
|
761
792
|
declare const index_useFieldValidation: typeof useFieldValidation;
|
|
793
|
+
declare const index_useFlowEditorActions: typeof useFlowEditorActions;
|
|
762
794
|
declare const index_useInferredType: typeof useInferredType;
|
|
763
795
|
declare const index_useInferredTypes: typeof useInferredTypes;
|
|
764
796
|
declare const index_useIsInNodePropertyProvider: typeof useIsInNodePropertyProvider;
|
|
@@ -770,7 +802,7 @@ declare const index_useSetProperty: typeof useSetProperty;
|
|
|
770
802
|
declare const index_useTemplateFieldContext: typeof useTemplateFieldContext;
|
|
771
803
|
declare const index_useTriggerLayoutUpdate: typeof useTriggerLayoutUpdate;
|
|
772
804
|
declare namespace index {
|
|
773
|
-
export { type index_BaseOperatorType as BaseOperatorType, type index_FieldValidationRule as FieldValidationRule, type index_InferConfig as InferConfig, index_InferredTypesContext as InferredTypesContext, type index_InferredTypesContextValue as InferredTypesContextValue, index_InferredTypesProvider as InferredTypesProvider, type index_InferredTypesProviderProps as InferredTypesProviderProps, index_Input as Input, type index_InputProps as InputProps, index_NestedFieldProvider as NestedFieldProvider, type index_NestedFieldProviderProps as NestedFieldProviderProps, index_NodePropertyProvider as NodePropertyProvider, type index_NodePropertyProviderProps as NodePropertyProviderProps, index_OPERATORS_BY_TYPE as OPERATORS_BY_TYPE, type index_OperatorDef as OperatorDef, type index_ParsedTypes as ParsedTypes, index_Select as Select, type index_SelectOption as SelectOption, type index_SelectProps as SelectProps, type index_SelectRenderProps as SelectRenderProps, type index_TemplateFieldChangeEvent as TemplateFieldChangeEvent, type index_TemplateFieldContextValue as TemplateFieldContextValue, type index_TemplateFieldFocusContext as TemplateFieldFocusContext, index_TemplateFieldProvider as TemplateFieldProvider, type index_TemplateFieldProviderProps as TemplateFieldProviderProps, type index_TemplateFieldValidationError as TemplateFieldValidationError, index_computeExtendedType as computeExtendedType, index_filterOperatorsByType as filterOperatorsByType, index_getNumberConstants as getNumberConstants, index_getOperatorsForType as getOperatorsForType, index_getStringConstants as getStringConstants, index_intersectTypes as intersectTypes, index_parseInferSyntax as parseInferSyntax, index_parseInferredTypes as parseInferredTypes, index_useAllInferredTypes as useAllInferredTypes, index_useClearAllInferredTypes as useClearAllInferredTypes, index_useClearInferredType as useClearInferredType, index_useFieldPath as useFieldPath, index_useFieldValidation as useFieldValidation, index_useInferredType as useInferredType, index_useInferredTypes as useInferredTypes, index_useIsInNodePropertyProvider as useIsInNodePropertyProvider, index_useIsInTemplateFieldProvider as useIsInTemplateFieldProvider, index_useNodeProperties as useNodeProperties, index_useNodeProperty as useNodeProperty, index_useSetInferredType as useSetInferredType, index_useSetProperty as useSetProperty, index_useTemplateFieldContext as useTemplateFieldContext, index_useTriggerLayoutUpdate as useTriggerLayoutUpdate };
|
|
805
|
+
export { type index_BaseOperatorType as BaseOperatorType, type index_FieldValidationRule as FieldValidationRule, type index_InferConfig as InferConfig, index_InferredTypesContext as InferredTypesContext, type index_InferredTypesContextValue as InferredTypesContextValue, index_InferredTypesProvider as InferredTypesProvider, type index_InferredTypesProviderProps as InferredTypesProviderProps, index_Input as Input, type index_InputProps as InputProps, index_NestedFieldProvider as NestedFieldProvider, type index_NestedFieldProviderProps as NestedFieldProviderProps, index_NodePropertyProvider as NodePropertyProvider, type index_NodePropertyProviderProps as NodePropertyProviderProps, index_OPERATORS_BY_TYPE as OPERATORS_BY_TYPE, type index_OperatorDef as OperatorDef, type index_ParsedTypes as ParsedTypes, index_Select as Select, type index_SelectOption as SelectOption, type index_SelectProps as SelectProps, type index_SelectRenderProps as SelectRenderProps, type index_TemplateFieldChangeEvent as TemplateFieldChangeEvent, type index_TemplateFieldContextValue as TemplateFieldContextValue, type index_TemplateFieldFocusContext as TemplateFieldFocusContext, index_TemplateFieldProvider as TemplateFieldProvider, type index_TemplateFieldProviderProps as TemplateFieldProviderProps, type index_TemplateFieldValidationError as TemplateFieldValidationError, index_computeExtendedType as computeExtendedType, index_filterOperatorsByType as filterOperatorsByType, index_getNumberConstants as getNumberConstants, index_getOperatorsForType as getOperatorsForType, index_getStringConstants as getStringConstants, index_intersectTypes as intersectTypes, index_parseInferSyntax as parseInferSyntax, index_parseInferredTypes as parseInferredTypes, index_useAllInferredTypes as useAllInferredTypes, index_useClearAllInferredTypes as useClearAllInferredTypes, index_useClearInferredType as useClearInferredType, index_useClearValidationErrorsByPrefix as useClearValidationErrorsByPrefix, index_useFieldPath as useFieldPath, index_useFieldValidation as useFieldValidation, index_useFlowEditorActions as useFlowEditorActions, index_useInferredType as useInferredType, index_useInferredTypes as useInferredTypes, index_useIsInNodePropertyProvider as useIsInNodePropertyProvider, index_useIsInTemplateFieldProvider as useIsInTemplateFieldProvider, index_useNodeProperties as useNodeProperties, index_useNodeProperty as useNodeProperty, index_useSetInferredType as useSetInferredType, index_useSetProperty as useSetProperty, index_useTemplateFieldContext as useTemplateFieldContext, index_useTriggerLayoutUpdate as useTriggerLayoutUpdate };
|
|
774
806
|
}
|
|
775
807
|
|
|
776
|
-
export { useClearAllInferredTypes as A,
|
|
808
|
+
export { useClearAllInferredTypes as A, useClearValidationErrorsByPrefix as B, useFlowEditorActions as C, useAllInferredTypes as D, useSetProperty as E, useTriggerLayoutUpdate as F, type FieldValidationRule as G, useFieldValidation as H, type InferredTypesContextValue as I, Input as J, type InputProps as K, type SelectProps as L, type SelectOption as M, NestedFieldProvider as N, OPERATORS_BY_TYPE as O, type SelectRenderProps as P, parseInferredTypes as Q, computeExtendedType as R, Select as S, type TemplateFieldContextValue as T, filterOperatorsByType as U, getStringConstants as V, getNumberConstants as W, type BaseOperatorType as X, type OperatorDef as Y, type ParsedTypes as Z, useIsInTemplateFieldProvider as a, useFieldPath as b, TemplateFieldProvider as c, type TemplateFieldProviderProps as d, type NestedFieldProviderProps as e, type TemplateFieldValidationError as f, type TemplateFieldFocusContext as g, type TemplateFieldChangeEvent as h, index as i, InferredTypesContext as j, useInferredTypes as k, type InferredTypesProviderProps as l, InferredTypesProvider as m, intersectTypes as n, type InferConfig as o, parseInferSyntax as p, getOperatorsForType as q, type NodePropertyProviderProps as r, NodePropertyProvider as s, useIsInNodePropertyProvider as t, useTemplateFieldContext as u, useNodeProperty as v, useNodeProperties as w, useInferredType as x, useSetInferredType as y, useClearInferredType as z };
|
|
@@ -655,6 +655,36 @@ declare function useClearInferredType(): (fieldName: string) => void;
|
|
|
655
655
|
* Returns a no-op when not inside any provider.
|
|
656
656
|
*/
|
|
657
657
|
declare function useClearAllInferredTypes(): () => void;
|
|
658
|
+
/**
|
|
659
|
+
* Hook to get a function that clears validation errors by field name prefix.
|
|
660
|
+
*
|
|
661
|
+
* Used when dynamic fields (like switch cases/conditions) are removed to clean up
|
|
662
|
+
* any associated validation errors.
|
|
663
|
+
*
|
|
664
|
+
* In development mode (DevProvider), this is a no-op.
|
|
665
|
+
* In production, this clears errors matching the prefix from the validation store.
|
|
666
|
+
*
|
|
667
|
+
* @example
|
|
668
|
+
* ```tsx
|
|
669
|
+
* const clearErrorsByPrefix = useClearValidationErrorsByPrefix();
|
|
670
|
+
*
|
|
671
|
+
* const handleRemoveCase = (caseId: string) => {
|
|
672
|
+
* // Remove the case from state
|
|
673
|
+
* setCases(cases.filter(c => c.id !== caseId));
|
|
674
|
+
* // Clear any validation errors for fields in this case
|
|
675
|
+
* clearErrorsByPrefix(caseId);
|
|
676
|
+
* };
|
|
677
|
+
* ```
|
|
678
|
+
*/
|
|
679
|
+
declare function useClearValidationErrorsByPrefix(): (fieldPrefix: string) => void;
|
|
680
|
+
/**
|
|
681
|
+
* Unified flow editor actions for custom controls (mock/dev).
|
|
682
|
+
*/
|
|
683
|
+
declare function useFlowEditorActions(): {
|
|
684
|
+
triggerLayoutUpdate: () => void;
|
|
685
|
+
triggerValidation: () => void;
|
|
686
|
+
clearValidationErrorsByPrefix: (fieldPrefix: string) => void;
|
|
687
|
+
};
|
|
658
688
|
/**
|
|
659
689
|
* Hook to subscribe to all inferred types.
|
|
660
690
|
*
|
|
@@ -757,8 +787,10 @@ declare const index_parseInferredTypes: typeof parseInferredTypes;
|
|
|
757
787
|
declare const index_useAllInferredTypes: typeof useAllInferredTypes;
|
|
758
788
|
declare const index_useClearAllInferredTypes: typeof useClearAllInferredTypes;
|
|
759
789
|
declare const index_useClearInferredType: typeof useClearInferredType;
|
|
790
|
+
declare const index_useClearValidationErrorsByPrefix: typeof useClearValidationErrorsByPrefix;
|
|
760
791
|
declare const index_useFieldPath: typeof useFieldPath;
|
|
761
792
|
declare const index_useFieldValidation: typeof useFieldValidation;
|
|
793
|
+
declare const index_useFlowEditorActions: typeof useFlowEditorActions;
|
|
762
794
|
declare const index_useInferredType: typeof useInferredType;
|
|
763
795
|
declare const index_useInferredTypes: typeof useInferredTypes;
|
|
764
796
|
declare const index_useIsInNodePropertyProvider: typeof useIsInNodePropertyProvider;
|
|
@@ -770,7 +802,7 @@ declare const index_useSetProperty: typeof useSetProperty;
|
|
|
770
802
|
declare const index_useTemplateFieldContext: typeof useTemplateFieldContext;
|
|
771
803
|
declare const index_useTriggerLayoutUpdate: typeof useTriggerLayoutUpdate;
|
|
772
804
|
declare namespace index {
|
|
773
|
-
export { type index_BaseOperatorType as BaseOperatorType, type index_FieldValidationRule as FieldValidationRule, type index_InferConfig as InferConfig, index_InferredTypesContext as InferredTypesContext, type index_InferredTypesContextValue as InferredTypesContextValue, index_InferredTypesProvider as InferredTypesProvider, type index_InferredTypesProviderProps as InferredTypesProviderProps, index_Input as Input, type index_InputProps as InputProps, index_NestedFieldProvider as NestedFieldProvider, type index_NestedFieldProviderProps as NestedFieldProviderProps, index_NodePropertyProvider as NodePropertyProvider, type index_NodePropertyProviderProps as NodePropertyProviderProps, index_OPERATORS_BY_TYPE as OPERATORS_BY_TYPE, type index_OperatorDef as OperatorDef, type index_ParsedTypes as ParsedTypes, index_Select as Select, type index_SelectOption as SelectOption, type index_SelectProps as SelectProps, type index_SelectRenderProps as SelectRenderProps, type index_TemplateFieldChangeEvent as TemplateFieldChangeEvent, type index_TemplateFieldContextValue as TemplateFieldContextValue, type index_TemplateFieldFocusContext as TemplateFieldFocusContext, index_TemplateFieldProvider as TemplateFieldProvider, type index_TemplateFieldProviderProps as TemplateFieldProviderProps, type index_TemplateFieldValidationError as TemplateFieldValidationError, index_computeExtendedType as computeExtendedType, index_filterOperatorsByType as filterOperatorsByType, index_getNumberConstants as getNumberConstants, index_getOperatorsForType as getOperatorsForType, index_getStringConstants as getStringConstants, index_intersectTypes as intersectTypes, index_parseInferSyntax as parseInferSyntax, index_parseInferredTypes as parseInferredTypes, index_useAllInferredTypes as useAllInferredTypes, index_useClearAllInferredTypes as useClearAllInferredTypes, index_useClearInferredType as useClearInferredType, index_useFieldPath as useFieldPath, index_useFieldValidation as useFieldValidation, index_useInferredType as useInferredType, index_useInferredTypes as useInferredTypes, index_useIsInNodePropertyProvider as useIsInNodePropertyProvider, index_useIsInTemplateFieldProvider as useIsInTemplateFieldProvider, index_useNodeProperties as useNodeProperties, index_useNodeProperty as useNodeProperty, index_useSetInferredType as useSetInferredType, index_useSetProperty as useSetProperty, index_useTemplateFieldContext as useTemplateFieldContext, index_useTriggerLayoutUpdate as useTriggerLayoutUpdate };
|
|
805
|
+
export { type index_BaseOperatorType as BaseOperatorType, type index_FieldValidationRule as FieldValidationRule, type index_InferConfig as InferConfig, index_InferredTypesContext as InferredTypesContext, type index_InferredTypesContextValue as InferredTypesContextValue, index_InferredTypesProvider as InferredTypesProvider, type index_InferredTypesProviderProps as InferredTypesProviderProps, index_Input as Input, type index_InputProps as InputProps, index_NestedFieldProvider as NestedFieldProvider, type index_NestedFieldProviderProps as NestedFieldProviderProps, index_NodePropertyProvider as NodePropertyProvider, type index_NodePropertyProviderProps as NodePropertyProviderProps, index_OPERATORS_BY_TYPE as OPERATORS_BY_TYPE, type index_OperatorDef as OperatorDef, type index_ParsedTypes as ParsedTypes, index_Select as Select, type index_SelectOption as SelectOption, type index_SelectProps as SelectProps, type index_SelectRenderProps as SelectRenderProps, type index_TemplateFieldChangeEvent as TemplateFieldChangeEvent, type index_TemplateFieldContextValue as TemplateFieldContextValue, type index_TemplateFieldFocusContext as TemplateFieldFocusContext, index_TemplateFieldProvider as TemplateFieldProvider, type index_TemplateFieldProviderProps as TemplateFieldProviderProps, type index_TemplateFieldValidationError as TemplateFieldValidationError, index_computeExtendedType as computeExtendedType, index_filterOperatorsByType as filterOperatorsByType, index_getNumberConstants as getNumberConstants, index_getOperatorsForType as getOperatorsForType, index_getStringConstants as getStringConstants, index_intersectTypes as intersectTypes, index_parseInferSyntax as parseInferSyntax, index_parseInferredTypes as parseInferredTypes, index_useAllInferredTypes as useAllInferredTypes, index_useClearAllInferredTypes as useClearAllInferredTypes, index_useClearInferredType as useClearInferredType, index_useClearValidationErrorsByPrefix as useClearValidationErrorsByPrefix, index_useFieldPath as useFieldPath, index_useFieldValidation as useFieldValidation, index_useFlowEditorActions as useFlowEditorActions, index_useInferredType as useInferredType, index_useInferredTypes as useInferredTypes, index_useIsInNodePropertyProvider as useIsInNodePropertyProvider, index_useIsInTemplateFieldProvider as useIsInTemplateFieldProvider, index_useNodeProperties as useNodeProperties, index_useNodeProperty as useNodeProperty, index_useSetInferredType as useSetInferredType, index_useSetProperty as useSetProperty, index_useTemplateFieldContext as useTemplateFieldContext, index_useTriggerLayoutUpdate as useTriggerLayoutUpdate };
|
|
774
806
|
}
|
|
775
807
|
|
|
776
|
-
export { useClearAllInferredTypes as A,
|
|
808
|
+
export { useClearAllInferredTypes as A, useClearValidationErrorsByPrefix as B, useFlowEditorActions as C, useAllInferredTypes as D, useSetProperty as E, useTriggerLayoutUpdate as F, type FieldValidationRule as G, useFieldValidation as H, type InferredTypesContextValue as I, Input as J, type InputProps as K, type SelectProps as L, type SelectOption as M, NestedFieldProvider as N, OPERATORS_BY_TYPE as O, type SelectRenderProps as P, parseInferredTypes as Q, computeExtendedType as R, Select as S, type TemplateFieldContextValue as T, filterOperatorsByType as U, getStringConstants as V, getNumberConstants as W, type BaseOperatorType as X, type OperatorDef as Y, type ParsedTypes as Z, useIsInTemplateFieldProvider as a, useFieldPath as b, TemplateFieldProvider as c, type TemplateFieldProviderProps as d, type NestedFieldProviderProps as e, type TemplateFieldValidationError as f, type TemplateFieldFocusContext as g, type TemplateFieldChangeEvent as h, index as i, InferredTypesContext as j, useInferredTypes as k, type InferredTypesProviderProps as l, InferredTypesProvider as m, intersectTypes as n, type InferConfig as o, parseInferSyntax as p, getOperatorsForType as q, type NodePropertyProviderProps as r, NodePropertyProvider as s, useIsInNodePropertyProvider as t, useTemplateFieldContext as u, useNodeProperty as v, useNodeProperties as w, useInferredType as x, useSetInferredType as y, useClearInferredType as z };
|
package/dist/index.cjs
CHANGED
|
@@ -5157,12 +5157,18 @@ __export(fields_exports, {
|
|
|
5157
5157
|
useClearInferredType: function() {
|
|
5158
5158
|
return useClearInferredType;
|
|
5159
5159
|
},
|
|
5160
|
+
useClearValidationErrorsByPrefix: function() {
|
|
5161
|
+
return useClearValidationErrorsByPrefix;
|
|
5162
|
+
},
|
|
5160
5163
|
useFieldPath: function() {
|
|
5161
5164
|
return useFieldPath;
|
|
5162
5165
|
},
|
|
5163
5166
|
useFieldValidation: function() {
|
|
5164
5167
|
return useFieldValidation;
|
|
5165
5168
|
},
|
|
5169
|
+
useFlowEditorActions: function() {
|
|
5170
|
+
return useFlowEditorActions;
|
|
5171
|
+
},
|
|
5166
5172
|
useInferredType: function() {
|
|
5167
5173
|
return useInferredType;
|
|
5168
5174
|
},
|
|
@@ -6037,6 +6043,23 @@ function useClearAllInferredTypes() {
|
|
|
6037
6043
|
devContext
|
|
6038
6044
|
]);
|
|
6039
6045
|
}
|
|
6046
|
+
function useClearValidationErrorsByPrefix() {
|
|
6047
|
+
return React2.useCallback(function(fieldPrefix) {
|
|
6048
|
+
console.log('[useClearValidationErrorsByPrefix] Dev mode - clearing errors with prefix "'.concat(fieldPrefix, '" is a no-op'));
|
|
6049
|
+
}, []);
|
|
6050
|
+
}
|
|
6051
|
+
function useFlowEditorActions() {
|
|
6052
|
+
var clearValidationErrorsByPrefix = useClearValidationErrorsByPrefix();
|
|
6053
|
+
return {
|
|
6054
|
+
triggerLayoutUpdate: function() {
|
|
6055
|
+
console.log("[useFlowEditorActions] Dev mode - triggerLayoutUpdate is a no-op");
|
|
6056
|
+
},
|
|
6057
|
+
triggerValidation: function() {
|
|
6058
|
+
console.log("[useFlowEditorActions] Dev mode - triggerValidation is a no-op");
|
|
6059
|
+
},
|
|
6060
|
+
clearValidationErrorsByPrefix: clearValidationErrorsByPrefix
|
|
6061
|
+
};
|
|
6062
|
+
}
|
|
6040
6063
|
function useAllInferredTypes() {
|
|
6041
6064
|
var devContext = React2.useContext(DevContext);
|
|
6042
6065
|
var _React2_useState = _sliced_to_array(React2.useState(function() {
|