@evoke-platform/ui-components 1.10.0-testing.17 → 1.10.0-testing.19

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.
@@ -123,49 +123,26 @@ function FormRendererContainer(props) {
123
123
  onError(error);
124
124
  });
125
125
  }
126
- else if (action) {
127
- apiServices
128
- .get(getPrefixedUrl('/forms'), {
129
- params: {
130
- filter: {
131
- where: {
132
- actionId: action.id,
133
- objectId: objectId,
134
- },
126
+ else if (action?.type === 'delete' && instance) {
127
+ setForm({
128
+ id: '',
129
+ name: '',
130
+ entries: [
131
+ {
132
+ type: 'content',
133
+ html: `<p>You are about to delete <strong>${instance.name}</strong>. Deleted records can't be restored. Are you sure you want to continue?</p>`,
135
134
  },
135
+ ],
136
+ objectId: objectId,
137
+ actionId: '_delete',
138
+ display: {
139
+ submitLabel: 'Delete',
136
140
  },
137
- })
138
- .then((matchingForms) => {
139
- if (matchingForms.length === 1) {
140
- const form = matchingForms[0];
141
- setForm(form);
142
- // use this default form if no delete form is found
143
- }
144
- else if (action.type === 'delete' && instance) {
145
- setForm({
146
- id: '',
147
- name: '',
148
- entries: [
149
- {
150
- type: 'content',
151
- html: `<p>You are about to delete <strong>${instance.name}</strong>. Deleted records can't be restored. Are you sure you want to continue?</p>`,
152
- },
153
- ],
154
- objectId: objectId,
155
- actionId: '_delete',
156
- display: {
157
- submitLabel: 'Delete',
158
- },
159
- });
160
- }
161
- else if (instance || action.type === 'create') {
162
- setError('Default action form could not be found');
163
- }
164
- })
165
- .catch((error) => {
166
- onError(error);
167
141
  });
168
142
  }
143
+ else {
144
+ setError('Action form could not be found');
145
+ }
169
146
  }, [action, objectId, instance]);
170
147
  useEffect(() => {
171
148
  if (form?.id === 'documentForm') {
@@ -76,27 +76,6 @@ const RepeatableField = (props) => {
76
76
  console.error(error);
77
77
  });
78
78
  }
79
- else if (action) {
80
- apiServices
81
- .get(getPrefixedUrl('/forms'), {
82
- params: {
83
- filter: {
84
- where: {
85
- actionId: action.id,
86
- objectId: fieldDefinition.objectId,
87
- },
88
- },
89
- },
90
- })
91
- .then((matchingForms) => {
92
- if (matchingForms.length === 1) {
93
- setForm(matchingForms[0]);
94
- }
95
- })
96
- .catch((error) => {
97
- console.error(error);
98
- });
99
- }
100
79
  }
101
80
  const fetchRelatedInstances = useCallback(async (refetch = false) => {
102
81
  let relatedObject;
@@ -171,21 +171,6 @@ const ObjectPropertyInput = (props) => {
171
171
  if (formId || action?.defaultFormId) {
172
172
  evokeForm = await apiServices.get(getPrefixedUrl(`/forms/${formId || action?.defaultFormId}`));
173
173
  }
174
- else if (action) {
175
- const matchingForms = await apiServices.get(getPrefixedUrl('/forms'), {
176
- params: {
177
- filter: {
178
- where: {
179
- actionId: action.id,
180
- objectId: fieldDefinition.objectId,
181
- },
182
- },
183
- },
184
- });
185
- if (matchingForms.length === 1) {
186
- evokeForm = matchingForms[0];
187
- }
188
- }
189
174
  if (evokeForm) {
190
175
  setForm(evokeForm);
191
176
  setFetchedOptions({
@@ -1,2 +1,3 @@
1
1
  export { default as ViewOnlyEntryRenderer } from './InstanceEntryRenderer';
2
- export { default as ViewDetailsV2Container } from './ViewDetailsV2Renderer';
2
+ export { default as ViewDetailsV2Container } from './ViewDetailsV2Container';
3
+ export type { ViewDetailsV2ContainerProps } from './ViewDetailsV2Container';
@@ -1,2 +1,2 @@
1
1
  export { default as ViewOnlyEntryRenderer } from './InstanceEntryRenderer';
2
- export { default as ViewDetailsV2Container } from './ViewDetailsV2Renderer';
2
+ export { default as ViewDetailsV2Container } from './ViewDetailsV2Container';
@@ -15,3 +15,4 @@ export { ResponsiveOverflow } from './ResponsiveOverflow';
15
15
  export { RichTextViewer } from './RichTextViewer';
16
16
  export { UserAvatar } from './UserAvatar';
17
17
  export { ViewDetailsV2Container, ViewOnlyEntryRenderer } from './ViewDetailsV2';
18
+ export type { ViewDetailsV2ContainerProps } from './ViewDetailsV2';
@@ -1,15 +1,15 @@
1
1
  export { ClickAwayListener, createTheme, darken, lighten, styled, Toolbar, useMediaQuery, useTheme, } from '@mui/material';
2
+ export type { AutocompleteRenderGroupParams, ButtonBaseActions, ButtonBaseClasses, FormControlProps, FormHelperTextProps, GridSize, MenuItemClasses, TextFieldProps, Theme, } from '@mui/material';
3
+ export type { TouchRippleActions, TouchRippleProps } from '@mui/material/ButtonBase/TouchRipple';
4
+ export type { CommonProps } from '@mui/material/OverridableComponent';
5
+ export type { SxProps } from '@mui/system';
2
6
  export { CalendarPicker, DateTimePicker, MonthPicker, PickersDay, StaticDateTimePicker, StaticTimePicker, TimePicker, YearPicker, } from '@mui/x-date-pickers';
3
7
  export * from './colors';
4
8
  export * from './components/core';
5
9
  export { BuilderGrid, CriteriaBuilder, DataGrid, ErrorComponent, Form, FormContext, FormField, FormRenderer, FormRendererContainer, getReadableQuery, HistoryLog, MenuBar, MultiSelect, RecursiveEntryRenderer, RepeatableField, ResponsiveOverflow, RichTextViewer, UserAvatar, ViewDetailsV2Container, ViewOnlyEntryRenderer, } from './components/custom';
6
- export type { BodyProps, FooterProps, FormRef, GridSortModel, HeaderProps } from './components/custom';
10
+ export type { BodyProps, FooterProps, FormRef, GridSortModel, HeaderProps, ViewDetailsV2ContainerProps, } from './components/custom';
7
11
  export { NumericFormat } from './components/custom/FormField/InputFieldComponent';
8
12
  export { Box, Container, Grid, Stack } from './components/layout';
9
13
  export * from './theme';
10
14
  export * as EVOKE_TYPES from './types';
11
15
  export * from './util';
12
- export type { AutocompleteRenderGroupParams, ButtonBaseActions, ButtonBaseClasses, FormControlProps, FormHelperTextProps, GridSize, MenuItemClasses, TextFieldProps, Theme, } from '@mui/material';
13
- export type { TouchRippleActions, TouchRippleProps } from '@mui/material/ButtonBase/TouchRipple';
14
- export type { CommonProps } from '@mui/material/OverridableComponent';
15
- export type { SxProps } from '@mui/system';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@evoke-platform/ui-components",
3
- "version": "1.10.0-testing.17",
3
+ "version": "1.10.0-testing.19",
4
4
  "description": "",
5
5
  "main": "dist/published/index.js",
6
6
  "module": "dist/published/index.js",
@@ -1,6 +1,6 @@
1
1
  import React, { ComponentType } from 'react';
2
- import { FormRendererProps } from '../FormV2/FormRenderer';
3
2
  import { BaseProps, SimpleEditorProps } from '../FormV2/components/types';
3
+ import { FormRendererProps } from '../FormV2/FormRenderer';
4
4
  export type ViewDetailsV2ContainerProps = BaseProps & {
5
5
  panelLayoutId?: string;
6
6
  instanceId?: string;