@evoke-platform/ui-components 1.10.0-dev.17 → 1.10.0-dev.18

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.
@@ -106,6 +106,8 @@ function FormRendererContainer(props) {
106
106
  useEffect(() => {
107
107
  if (dataType === 'documents' || form)
108
108
  return;
109
+ if (actionId && !action)
110
+ return; // Action is loaded in the side effect above; wait for it to complete
109
111
  if (formId || action?.defaultFormId) {
110
112
  apiServices
111
113
  .get(getPrefixedUrl(`/forms/${formId || action?.defaultFormId}`))
@@ -143,7 +145,7 @@ function FormRendererContainer(props) {
143
145
  else {
144
146
  setError('Action form could not be found');
145
147
  }
146
- }, [action, objectId, instance]);
148
+ }, [action, actionId, objectId, instance]);
147
149
  useEffect(() => {
148
150
  if (form?.id === 'documentForm') {
149
151
  setParameters([
@@ -52,6 +52,32 @@ export declare const Editable: import("@storybook/types").AnnotatedStoryFn<impor
52
52
  renderFooter?: ((props: import("../components/custom").FooterProps) => React.ReactNode) | undefined;
53
53
  sx?: import("@mui/material").SxProps<{}> | undefined;
54
54
  }>;
55
+ export declare const DefaultForm: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0fc72a6d").R, import("../components/custom/FormV2/components/types").BaseProps & {
56
+ formId?: string | undefined;
57
+ instanceId?: string | undefined;
58
+ defaultPages?: Record<string, string> | undefined;
59
+ pageNavigation?: string | undefined;
60
+ documentId?: string | undefined;
61
+ dataType?: "documents" | "objectInstances" | undefined;
62
+ display?: {
63
+ fieldHeight?: "medium" | "small" | undefined;
64
+ } | undefined;
65
+ actionId?: string | undefined;
66
+ objectId: string;
67
+ richTextEditor?: React.ComponentType<import("../components/custom/FormV2/components/types").SimpleEditorProps> | undefined;
68
+ onSubmit?: ((submission: Record<string, unknown>, defaultSubmitHandler: (submission: Record<string, unknown>) => Promise<void>) => Promise<void>) | undefined;
69
+ onDiscardChanges?: (() => void) | undefined;
70
+ onSubmitError?: import("react-hook-form").SubmitErrorHandler<import("react-hook-form").FieldValues> | undefined;
71
+ associatedObject?: {
72
+ instanceId?: string | undefined;
73
+ propertyId?: string | undefined;
74
+ } | undefined;
75
+ renderContainer?: ((state: import("../components/custom/FormV2/FormRendererContainer").FormRendererState) => React.ReactNode) | undefined;
76
+ renderHeader?: ((props: import("../components/custom").HeaderProps) => React.ReactNode) | undefined;
77
+ renderBody?: ((props: import("../components/custom").BodyProps) => React.ReactNode) | undefined;
78
+ renderFooter?: ((props: import("../components/custom").FooterProps) => React.ReactNode) | undefined;
79
+ sx?: import("@mui/material").SxProps<{}> | undefined;
80
+ }>;
55
81
  export declare const NoButtons: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0fc72a6d").R, import("../components/custom/FormV2/components/types").BaseProps & {
56
82
  formId?: string | undefined;
57
83
  instanceId?: string | undefined;
@@ -46,6 +46,11 @@ export const Editable = Template.bind({});
46
46
  Editable.args = {
47
47
  ...mockProps,
48
48
  };
49
+ export const DefaultForm = Template.bind({});
50
+ DefaultForm.args = {
51
+ ...mockProps,
52
+ formId: undefined,
53
+ };
49
54
  export const NoButtons = Template.bind({});
50
55
  NoButtons.args = {
51
56
  ...mockProps,
@@ -175,7 +175,7 @@ export const mockGenericEvokeFormObject = {
175
175
  ],
176
176
  outputEvent: 'Update Generic Evoke Form 2',
177
177
  preconditions: {},
178
- defaultFormId: 'UpdateGenericEvokeForm',
178
+ defaultFormId: 'updateGenericEvokeForm',
179
179
  },
180
180
  {
181
181
  id: '_delete',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@evoke-platform/ui-components",
3
- "version": "1.10.0-dev.17",
3
+ "version": "1.10.0-dev.18",
4
4
  "description": "",
5
5
  "main": "dist/published/index.js",
6
6
  "module": "dist/published/index.js",