@evoke-platform/ui-components 1.6.0-dev.27 → 1.6.0-dev.28
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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { EvokeForm, ObjectInstance } from '@evoke-platform/context';
|
|
2
2
|
import React, { ComponentType } from 'react';
|
|
3
3
|
import { FieldErrors, FieldValues } from 'react-hook-form';
|
|
4
|
-
import { BaseProps,
|
|
4
|
+
import { BaseProps, Document, SimpleEditorProps } from './components/types';
|
|
5
5
|
export type FormProps = BaseProps & {
|
|
6
6
|
richTextEditor?: ComponentType<SimpleEditorProps>;
|
|
7
7
|
hideButtons?: boolean;
|
|
@@ -11,7 +11,7 @@ export type FormProps = BaseProps & {
|
|
|
11
11
|
stickyFooter?: boolean;
|
|
12
12
|
onCancel?: () => void;
|
|
13
13
|
form: EvokeForm;
|
|
14
|
-
instance?: ObjectInstance |
|
|
14
|
+
instance?: ObjectInstance | Document;
|
|
15
15
|
onChange: (id: string, value: unknown) => void;
|
|
16
16
|
onValidationChange?: (errors: FieldErrors) => void;
|
|
17
17
|
};
|
|
@@ -120,12 +120,3 @@ export type SectionsProps = {
|
|
|
120
120
|
triggerFieldReset?: boolean;
|
|
121
121
|
showSubmitError?: boolean;
|
|
122
122
|
};
|
|
123
|
-
export type DocumentInstance = {
|
|
124
|
-
id: string;
|
|
125
|
-
name: string;
|
|
126
|
-
contentType: string;
|
|
127
|
-
size: number;
|
|
128
|
-
uploadedDate: string;
|
|
129
|
-
metadata?: Record<string, string>;
|
|
130
|
-
versionId: string;
|
|
131
|
-
};
|
|
@@ -2,7 +2,7 @@ import { ApiServices, Column, Columns, FormEntry, InputParameter, Obj, ObjectIns
|
|
|
2
2
|
import { LocalDateTime } from '@js-joda/core';
|
|
3
3
|
import { FieldErrors, FieldValues } from 'react-hook-form';
|
|
4
4
|
import { AutocompleteOption } from '../../../core';
|
|
5
|
-
import {
|
|
5
|
+
import { Document } from './types';
|
|
6
6
|
export declare const scrollIntoViewWithOffset: (el: HTMLElement, offset: number, container?: HTMLElement) => void;
|
|
7
7
|
export declare const normalizeDateTime: (dateTime: LocalDateTime) => string;
|
|
8
8
|
export declare function isAddressProperty(key: string): boolean;
|
|
@@ -41,7 +41,7 @@ export declare function getDefaultPages(parameters: InputParameter[], defaultPag
|
|
|
41
41
|
export declare function updateCriteriaInputs(criteria: Record<string, unknown>, data: Record<string, unknown>, user?: UserAccount): Record<string, unknown>;
|
|
42
42
|
export declare function fetchCollectionData(apiServices: ApiServices, fieldDefinition: InputParameter | Property, setFetchedOptions: (newData: FieldValues) => void, instanceId?: string, fetchedOptions?: Record<string, unknown>, initialMiddleObjectInstances?: ObjectInstance[]): Promise<void>;
|
|
43
43
|
export declare const getErrorCountForSection: (section: Section | Column, errors: FieldErrors) => number;
|
|
44
|
-
export declare const convertDocToParameters: (obj:
|
|
44
|
+
export declare const convertDocToParameters: (obj: Document) => InputParameter[];
|
|
45
45
|
export declare const propertyToParameter: (property: Property) => InputParameter;
|
|
46
46
|
export declare const propertyValidationToParameterValidation: (property: Property) => InputParameter['validation'];
|
|
47
47
|
export declare const convertPropertiesToParams: (object: Obj) => InputParameter[] | undefined;
|