sera-components 1.8.1 → 1.8.3
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/form/composite-items/address-form-item/address-form-field.d.ts +13 -0
- package/dist/form/composite-items/address-form-item/index.d.ts +4 -0
- package/dist/form/composite-items/address-form-item/select-input.d.ts +16 -0
- package/dist/form/composite-items/address-form-item/types.d.ts +137 -0
- package/dist/form/index.d.ts +1 -0
- package/dist/index.js +6163 -2873
- package/dist/index.umd.cjs +36 -7
- package/dist/search/search.d.ts +4 -2
- package/dist/table/foreign-key-prefetch.d.ts +2 -0
- package/dist/table/make-columns.d.ts +2 -0
- package/dist/table/table-action.d.ts +9 -1
- package/package.json +2 -2
package/dist/search/search.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { TextInputProps } from '@mantine/core';
|
|
1
2
|
import { MultiLingualString as MLS } from 'sera-db';
|
|
2
3
|
import { SearchFormProps } from './search-form';
|
|
3
|
-
interface SearchInputProps {
|
|
4
|
+
interface SearchInputProps extends Omit<TextInputProps, "onChange" | "value"> {
|
|
5
|
+
label?: React.ReactNode | null;
|
|
4
6
|
query?: string;
|
|
5
7
|
onChange: (query: string) => void;
|
|
6
8
|
debounceTime?: number;
|
|
@@ -8,5 +10,5 @@ interface SearchInputProps {
|
|
|
8
10
|
searchField?: MLS;
|
|
9
11
|
advancedSearch?: SearchFormProps;
|
|
10
12
|
}
|
|
11
|
-
export declare const SeraSearch: ({ query, onChange, debounceTime, searchText, searchField, advancedSearch, }: SearchInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare const SeraSearch: ({ query, onChange, debounceTime, searchText, searchField, label, advancedSearch, ...others }: SearchInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
14
|
export {};
|
|
@@ -29,6 +29,8 @@ export interface SeraColumn<R> {
|
|
|
29
29
|
* - >1: this cell spans that many columns
|
|
30
30
|
*/
|
|
31
31
|
colSpan?: (record: R, rowIndex: number) => number | undefined;
|
|
32
|
+
property?: DOP;
|
|
33
|
+
db?: DB;
|
|
32
34
|
}
|
|
33
35
|
/**
|
|
34
36
|
* Creates a table column configuration for displaying entity properties in a data table.
|
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
import { MantineSize } from '@mantine/core';
|
|
2
|
+
export interface SeraDeleteActionConfig<ID extends string | number> {
|
|
3
|
+
/** Callback to delete selected row ids */
|
|
4
|
+
onClick: (ids: ID[]) => void;
|
|
5
|
+
/** Maximum number of selected rows allowed for deletion */
|
|
6
|
+
maxItems?: number;
|
|
7
|
+
/** Whether to show confirmation popup before delete. Defaults to true. */
|
|
8
|
+
confirm?: boolean;
|
|
9
|
+
}
|
|
2
10
|
export interface SeraActionConfig<ID extends string | number> {
|
|
3
11
|
add?: () => void;
|
|
4
12
|
edit?: (id: ID) => void;
|
|
5
|
-
delete?: (ids: ID[]) => void
|
|
13
|
+
delete?: ((ids: ID[]) => void) | SeraDeleteActionConfig<ID>;
|
|
6
14
|
export?: () => void;
|
|
7
15
|
reload?: boolean;
|
|
8
16
|
import?: () => void;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sera-components",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.8.
|
|
4
|
+
"version": "1.8.3",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
7
7
|
"dist"
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"react-dom": "^19.2.3",
|
|
47
47
|
"react-imask": "^7.6.1",
|
|
48
48
|
"react-router": "^7.7.1",
|
|
49
|
-
"sera-db": "^1.13.
|
|
49
|
+
"sera-db": "^1.13.3",
|
|
50
50
|
"throttle-debounce": "^5.0.2"
|
|
51
51
|
}
|
|
52
52
|
}
|