sera-components 1.4.2 → 1.4.4
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/dist/components/src/data/inputs/DateInput.d.ts +2 -0
- package/dist/components/src/data/inputs/DateRangeInput.d.ts +5 -0
- package/dist/{data → components/src/data}/inputs/index.d.ts +8 -1
- package/dist/{form → components/src/form}/FormItem.d.ts +2 -3
- package/dist/{index.d.ts → components/src/index.d.ts} +3 -2
- package/dist/{basic → components/src/misc}/Language.d.ts +1 -0
- package/dist/{basic → components/src/misc}/Menu.d.ts +1 -1
- package/dist/components/src/search/Search.d.ts +12 -0
- package/dist/components/src/search/SearchForm.d.ts +27 -0
- package/dist/components/src/search/index.d.ts +2 -0
- package/dist/components/src/search/search-input-components.d.ts +3 -0
- package/dist/index.js +2185 -1707
- package/dist/index.umd.cjs +7 -7
- package/package.json +14 -10
- /package/dist/{data → components/src/data}/display/BooleanDisplay.d.ts +0 -0
- /package/dist/{data → components/src/data}/display/DateTimeDisplay.d.ts +0 -0
- /package/dist/{data → components/src/data}/display/EnumDisplay.d.ts +0 -0
- /package/dist/{data → components/src/data}/display/ForeignKeyDisplay.d.ts +0 -0
- /package/dist/{data → components/src/data}/display/TextDisplay.d.ts +0 -0
- /package/dist/{data → components/src/data}/display/index.d.ts +0 -0
- /package/dist/{data → components/src/data}/index.d.ts +0 -0
- /package/dist/{data → components/src/data}/inputs/BooleanInput.d.ts +0 -0
- /package/dist/{data → components/src/data}/inputs/ForeignKeyInput.d.ts +0 -0
- /package/dist/{data → components/src/data}/inputs/NumberInput.d.ts +0 -0
- /package/dist/{data → components/src/data}/inputs/PhoneNumberInput.d.ts +0 -0
- /package/dist/{data → components/src/data}/inputs/TextInput.d.ts +0 -0
- /package/dist/{form → components/src/form}/Form.d.ts +0 -0
- /package/dist/{form → components/src/form}/FormItemLabel.d.ts +0 -0
- /package/dist/{form → components/src/form}/index.d.ts +0 -0
- /package/dist/{basic → components/src/misc}/CountryFlag.d.ts +0 -0
- /package/dist/{basic → components/src/misc}/Locale.d.ts +0 -0
- /package/dist/{basic → components/src/misc}/Transition.d.ts +0 -0
- /package/dist/{basic → components/src/misc}/index.d.ts +0 -0
- /package/dist/{sera-context.d.ts → components/src/sera-context.d.ts} +0 -0
- /package/dist/{table → components/src/table}/EmbeddedTable.d.ts +0 -0
- /package/dist/{table → components/src/table}/Table.d.ts +0 -0
- /package/dist/{table → components/src/table}/TableAction.d.ts +0 -0
- /package/dist/{table → components/src/table}/TableContent.d.ts +0 -0
- /package/dist/{table → components/src/table}/TablePagination.d.ts +0 -0
- /package/dist/{table → components/src/table}/index.d.ts +0 -0
- /package/dist/{table → components/src/table}/makeColumns.d.ts +0 -0
- /package/dist/{types.d.ts → components/src/types.d.ts} +0 -0
- /package/dist/{misc → components/src/utils}/index.d.ts +0 -0
- /package/dist/{misc → components/src/utils}/trie.d.ts +0 -0
- /package/dist/{misc → components/src/utils}/utils.d.ts +0 -0
- /package/dist/{view → components/src/view}/MultiTabView.d.ts +0 -0
- /package/dist/{view → components/src/view}/View.d.ts +0 -0
- /package/dist/{view → components/src/view}/ViewItem.d.ts +0 -0
- /package/dist/{view → components/src/view}/ViewNestedPropertyItem.d.ts +0 -0
- /package/dist/{view → components/src/view}/ViewTab.d.ts +0 -0
- /package/dist/{view → components/src/view}/index.d.ts +0 -0
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import { DataProperty, DataType, DB, ObjectProperty } from 'sera-db';
|
|
2
|
+
import { BooleanInput } from './BooleanInput';
|
|
3
|
+
import { NumberInput } from './NumberInput';
|
|
4
|
+
import { TextInput } from './TextInput';
|
|
5
|
+
import { DateInput } from './DateInput';
|
|
6
|
+
export { SingleForeignKeyInput, MultiForeignKeyInput } from './ForeignKeyInput';
|
|
7
|
+
export { DateRangeInput } from './DateRangeInput';
|
|
2
8
|
/**
|
|
3
9
|
* Interface for input components in forms
|
|
4
10
|
* @interface InputInterface
|
|
@@ -18,4 +24,5 @@ export type InputInterface<T> = {
|
|
|
18
24
|
/**
|
|
19
25
|
* Mapping of data types to their corresponding input components
|
|
20
26
|
*/
|
|
21
|
-
export declare const
|
|
27
|
+
export declare const DataType2InputComponent: Partial<Record<DataType, React.FC<InputInterface<any>>>>;
|
|
28
|
+
export { NumberInput, BooleanInput, TextInput, DateInput };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { DataProperty, DraftRecord, GenericRecord, ObjectProperty, Table, validators } from 'sera-db';
|
|
2
2
|
import { InputInterface } from '../data/inputs';
|
|
3
|
-
interface FormItemHorizontalLayout {
|
|
3
|
+
export interface FormItemHorizontalLayout {
|
|
4
4
|
type: "horizontal";
|
|
5
5
|
labelCol: number;
|
|
6
6
|
itemCol: number;
|
|
7
7
|
align?: "left" | "right";
|
|
8
8
|
}
|
|
9
|
-
interface FormItemVerticalLayout {
|
|
9
|
+
export interface FormItemVerticalLayout {
|
|
10
10
|
type: "vertical";
|
|
11
11
|
helpAlwaysVisible?: boolean;
|
|
12
12
|
}
|
|
@@ -28,4 +28,3 @@ export interface FormItemProps<ID extends string | number, R extends GenericReco
|
|
|
28
28
|
export declare const FormItem: (<ID extends string | number, R extends GenericRecord<ID, DR>, DR extends DraftRecord<ID>>({ store, record, property, layout, InputComponent, validator, }: FormItemProps<ID, R, DR>) => import("react/jsx-runtime").JSX.Element) & {
|
|
29
29
|
displayName: string;
|
|
30
30
|
};
|
|
31
|
-
export {};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
export * from './
|
|
1
|
+
export * from './misc';
|
|
2
2
|
export * from './data';
|
|
3
3
|
export * from './form';
|
|
4
4
|
export * from './table';
|
|
5
|
+
export * from './search';
|
|
5
6
|
export * from './view';
|
|
6
|
-
export * from './
|
|
7
|
+
export * from './utils';
|
|
7
8
|
export * from './types';
|
|
8
9
|
export * from './sera-context';
|
|
9
10
|
export type { SeraContext } from './sera-context';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { MultiLingualString as MLS } from 'sera-db';
|
|
2
|
+
import { SearchFormProps } from './SearchForm';
|
|
3
|
+
interface SearchInputProps {
|
|
4
|
+
query?: string;
|
|
5
|
+
onChange: (query: string) => void;
|
|
6
|
+
debounceTime?: number;
|
|
7
|
+
searchText?: MLS;
|
|
8
|
+
searchField?: MLS;
|
|
9
|
+
advancedSearch?: SearchFormProps;
|
|
10
|
+
}
|
|
11
|
+
export declare const SeraSearch: ({ query, onChange, debounceTime, searchText, searchField, advancedSearch, }: SearchInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { DataProperty, DB, ObjectProperty, QueryConditions, QueryOp, validators } from 'sera-db';
|
|
2
|
+
import { FormItemHorizontalLayout } from '../form';
|
|
3
|
+
import { InputInterface } from '../data';
|
|
4
|
+
export interface SearchFormItemProps<T> {
|
|
5
|
+
db: DB;
|
|
6
|
+
property: DataProperty | ObjectProperty;
|
|
7
|
+
InputComponent?: React.FC<InputInterface<T>> | React.ComponentType<InputInterface<T>>;
|
|
8
|
+
validator?: validators.ValueValidator;
|
|
9
|
+
layout: FormItemHorizontalLayout;
|
|
10
|
+
value: T;
|
|
11
|
+
onChange: (value: T) => void;
|
|
12
|
+
}
|
|
13
|
+
export declare const SearchFormItem: ({ db, property, InputComponent, layout, validator, value, onChange, }: SearchFormItemProps<any>) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export interface SearchFormProps {
|
|
15
|
+
db: DB;
|
|
16
|
+
properties: {
|
|
17
|
+
property: DataProperty | ObjectProperty;
|
|
18
|
+
InputComponent?: React.FC<InputInterface<any>> | React.ComponentType<InputInterface<any>>;
|
|
19
|
+
toQueryOp?: (value: any) => QueryOp | undefined;
|
|
20
|
+
}[];
|
|
21
|
+
layout: FormItemHorizontalLayout;
|
|
22
|
+
styles?: React.CSSProperties;
|
|
23
|
+
className?: string;
|
|
24
|
+
onChange: (value: QueryConditions<any>) => void;
|
|
25
|
+
queryConditions: QueryConditions<any>;
|
|
26
|
+
}
|
|
27
|
+
export declare const SearchForm: ({ db, properties, styles, className, layout, onChange, queryConditions, }: SearchFormProps) => import("react/jsx-runtime").JSX.Element;
|