kelt-ui-kit-react 2.0.3 → 2.0.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/README.md +26 -0
- package/dist/addressSearch/AddressSearch.d.ts +20 -0
- package/dist/addressSearch/AddressSearch.view.d.ts +1 -0
- package/dist/badge/Badge.d.ts +1 -3
- package/dist/button/Button.d.ts +1 -1
- package/dist/button/button.interface.d.ts +2 -1
- package/dist/card/Card.d.ts +4 -1
- package/dist/dataTable/DataTable.d.ts +14 -17
- package/dist/dataTable/dataTable.interface.d.ts +19 -24
- package/dist/dataTable/dataTableActions/DataTableAction.d.ts +5 -3
- package/dist/dataTable/dataTableColumn/DataTableColumn.d.ts +7 -13
- package/dist/dataTable/dataTableLoading/DataTableLoading.d.ts +3 -1
- package/dist/dataTable/dataTableRow/DataTableRow.d.ts +6 -5
- package/dist/expands/Expands.d.ts +1 -0
- package/dist/expands/expand/expand.d.ts +3 -2
- package/dist/form/Form.d.ts +10 -2
- package/dist/form/form.enum.d.ts +3 -2
- package/dist/form/form.interface.d.ts +22 -3
- package/dist/form/input/Input.d.ts +0 -3
- package/dist/form/inputNumber/InputNumber.d.ts +2 -0
- package/dist/geocoding/GeocodingService.d.ts +13 -0
- package/dist/geocoding/geocoding.interface.d.ts +20 -0
- package/dist/grid/Grid.d.ts +5 -2
- package/dist/grid/col/Col.d.ts +3 -6
- package/dist/grid/col/colStyled/ColStyled.d.ts +8 -5
- package/dist/grid/grid.interface.d.ts +20 -5
- package/dist/grid/row/Row.d.ts +7 -0
- package/dist/header/Header.d.ts +1 -1
- package/dist/header/header.interface.d.ts +2 -1
- package/dist/icon/Icon.d.ts +1 -1
- package/dist/icon/icon.interface.d.ts +0 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +3724 -3628
- package/dist/menus/menu/Menu.d.ts +1 -0
- package/dist/select/Select.d.ts +2 -1
- package/dist/style.css +1 -1
- package/dist/tabs/Tabs.d.ts +1 -2
- package/dist/toaster/store/useToasterStore.d.ts +1 -0
- package/index.html +1 -2
- package/package.json +1 -1
- package/src/App.menu.tsx +8 -0
- package/src/addressSearch/AddressSearch.tsx +246 -0
- package/src/addressSearch/AddressSearch.view.tsx +52 -0
- package/src/addressSearch/addressSearch.css +133 -0
- package/src/badge/Badge.tsx +1 -9
- package/src/badge/badge.css +0 -4
- package/src/button/Button.tsx +3 -1
- package/src/button/button.css +2 -2
- package/src/button/button.interface.tsx +2 -1
- package/src/card/Card.tsx +37 -11
- package/src/card/card.css +7 -28
- package/src/card/cardAction/CardAction.tsx +4 -4
- package/src/damier/Damier.tsx +16 -7
- package/src/damier/damier.css +11 -4
- package/src/dataTable/DataTable.tsx +542 -685
- package/src/dataTable/DataTable.view.tsx +24 -48
- package/src/dataTable/dataTable.css +159 -134
- package/src/dataTable/dataTable.interface.ts +19 -25
- package/src/dataTable/dataTableActions/DataTableAction.tsx +25 -14
- package/src/dataTable/dataTableColumn/DataTableColumn.tsx +14 -64
- package/src/dataTable/dataTableLoading/DataTableLoading.tsx +15 -4
- package/src/dataTable/dataTableRow/DataTableRow.tsx +180 -64
- package/src/expands/Expands.tsx +18 -2
- package/src/expands/expand/expand.tsx +128 -5
- package/src/expands/expands.css +8 -3
- package/src/form/Form.tsx +294 -99
- package/src/form/Form.view.tsx +9 -1
- package/src/form/form.css +64 -1
- package/src/form/form.enum.ts +2 -1
- package/src/form/form.interface.tsx +31 -3
- package/src/form/input/Input.tsx +7 -61
- package/src/form/input/input.css +1 -19
- package/src/form/inputNumber/InputNumber.tsx +11 -6
- package/src/form/inputPrice/InputPrice.tsx +4 -2
- package/src/geocoding/GeocodingService.ts +89 -0
- package/src/geocoding/geocoding.interface.ts +25 -0
- package/src/grid/Grid.tsx +34 -21
- package/src/grid/col/Col.tsx +24 -15
- package/src/grid/col/col.css +3 -0
- package/src/grid/col/colStyled/ColStyled.tsx +59 -41
- package/src/grid/container/container.css +2 -2
- package/src/grid/grid.interface.tsx +25 -5
- package/src/grid/row/Row.tsx +49 -12
- package/src/grid/row/row.css +11 -3
- package/src/header/Header.tsx +4 -2
- package/src/header/header.css +17 -0
- package/src/header/header.interface.tsx +2 -1
- package/src/icon/Icon.tsx +2 -6
- package/src/icon/icon.interface.tsx +0 -1
- package/src/index.css +58 -12
- package/src/index.ts +12 -2
- package/src/menus/Menus.tsx +1 -0
- package/src/menus/menu/Menu.tsx +2 -1
- package/src/select/Select.tsx +5 -3
- package/src/sidebar/Sidebar.tsx +107 -5
- package/src/sidebar/sidebar.css +18 -1
- package/src/tabs/Tabs.tsx +1 -20
- package/src/tabs/tabs.css +9 -3
- package/src/toaster/Toaster.tsx +7 -2
- package/src/toaster/Toaster.view.tsx +1 -0
- package/src/toaster/store/useToasterStore.tsx +2 -0
- package/src/toaster/toaster.css +7 -2
- package/dist/_core/type/generiqueType.d.ts +0 -4
- package/dist/dataTable/dataTableColumn/dataTableColumnFilter/DataTableColumnFilter.d.ts +0 -10
- package/dist/dataTable/dataTableColumn/dataTableColumnFilter/dataTableColumnFilterDate/DataTableColumnFilterDate.d.ts +0 -9
- package/dist/dataTable/dataTableColumn/dataTableColumnFilter/dataTableColumnFilterDateRange/dataTableColumnFilterDateRange.d.ts +0 -9
- package/dist/dataTable/dataTableColumn/dataTableColumnFilter/dataTableColumnFilterEnum/DataTableColumnFilterEnum.d.ts +0 -13
- package/dist/dataTable/dataTableColumn/dataTableColumnFilter/dataTableColumnFilterString/DataTableColumnFilterString.d.ts +0 -9
- package/dist/dataTable/dataTableColumn/dataTableColumnSort/DataTableColumnSort.d.ts +0 -11
- package/dist/dataTable/dataTableFilters/DataTableFilters.d.ts +0 -7
- package/dist/dataTable/dataTableRow/dataTableRowOverlay/DataTableRowOverlay.d.ts +0 -12
- package/dist/dataTable/dataTableRow/dataTableRowValue/DataTableRowValue.d.ts +0 -11
- package/package/package.json +0 -56
- package/package/src/sidebar/Sidebar.tsx +0 -208
- package/package/src/sidebar/sidebar.css +0 -104
- package/src/_core/type/generiqueType.tsx +0 -4
- package/src/dataTable/dataTableColumn/dataTableColumnFilter/DataTableColumnFilter.tsx +0 -36
- package/src/dataTable/dataTableColumn/dataTableColumnFilter/dataTableColumnFilter.css +0 -0
- package/src/dataTable/dataTableColumn/dataTableColumnFilter/dataTableColumnFilterDate/DataTableColumnFilterDate.tsx +0 -39
- package/src/dataTable/dataTableColumn/dataTableColumnFilter/dataTableColumnFilterDateRange/dataTableColumnFilterDateRange.tsx +0 -80
- package/src/dataTable/dataTableColumn/dataTableColumnFilter/dataTableColumnFilterEnum/DataTableColumnFilterEnum.tsx +0 -89
- package/src/dataTable/dataTableColumn/dataTableColumnFilter/dataTableColumnFilterString/DataTableColumnFilterString.tsx +0 -37
- package/src/dataTable/dataTableColumn/dataTableColumnSort/DataTableColumnSort.tsx +0 -42
- package/src/dataTable/dataTableFilters/DataTableFilters.tsx +0 -91
- package/src/dataTable/dataTableFilters/dataTableFilters.css +0 -16
- package/src/dataTable/dataTableRow/dataTableRowOverlay/DataTableRowOverlay.tsx +0 -80
- package/src/dataTable/dataTableRow/dataTableRowValue/DataTableRowValue.tsx +0 -123
package/README.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# Getting Started with Create React App
|
|
2
2
|
|
|
3
|
+
## Address search
|
|
4
|
+
|
|
5
|
+
Use the `ADDRESS` field type to add geocoding directly to an address field.
|
|
6
|
+
The user can keep any manually entered value, while selecting a suggestion can
|
|
7
|
+
populate the rest of the form:
|
|
8
|
+
|
|
9
|
+
```tsx
|
|
10
|
+
{
|
|
11
|
+
name: "adresse1",
|
|
12
|
+
label: "Adresse",
|
|
13
|
+
type: TypeInputEnum.ADDRESS,
|
|
14
|
+
value: "",
|
|
15
|
+
addressSearch: {
|
|
16
|
+
mapAddress: (address) => ({
|
|
17
|
+
adresse1: address.addressLine,
|
|
18
|
+
codePostal: address.postalCode,
|
|
19
|
+
ville: address.city,
|
|
20
|
+
paysIso2: address.countryCode,
|
|
21
|
+
}),
|
|
22
|
+
},
|
|
23
|
+
};
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Use `addressSearch.provider` to inject another service implementing
|
|
27
|
+
`GeocodingProvider`. The default provider does not require an API key.
|
|
28
|
+
|
|
3
29
|
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
|
|
4
30
|
|
|
5
31
|
## Available Scripts
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { GeocodedAddress, GeocodingProvider } from '../geocoding/geocoding.interface';
|
|
2
|
+
|
|
3
|
+
export interface AddressSearchProps {
|
|
4
|
+
id?: string;
|
|
5
|
+
className?: string;
|
|
6
|
+
label?: string;
|
|
7
|
+
placeholder?: string;
|
|
8
|
+
value?: string;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
minimumQueryLength?: number;
|
|
11
|
+
debounceTime?: number;
|
|
12
|
+
limit?: number;
|
|
13
|
+
provider?: GeocodingProvider;
|
|
14
|
+
allowManualEntry?: boolean;
|
|
15
|
+
manualEntryLabel?: string;
|
|
16
|
+
onChange?: (value: string) => void;
|
|
17
|
+
onManualEntry?: (addressLine: string) => void;
|
|
18
|
+
onSelect: (address: GeocodedAddress) => void;
|
|
19
|
+
}
|
|
20
|
+
export declare const AddressSearch: ({ id, className, label, placeholder, value, disabled, minimumQueryLength, debounceTime, limit, provider, allowManualEntry, manualEntryLabel, onChange, onManualEntry, onSelect, }: AddressSearchProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const AddressSearchView: () => import("react/jsx-runtime").JSX.Element;
|
package/dist/badge/Badge.d.ts
CHANGED
|
@@ -4,9 +4,7 @@ export type BadgeInterface = {
|
|
|
4
4
|
className?: string;
|
|
5
5
|
onClick?: (e: React.MouseEvent) => void;
|
|
6
6
|
title?: string;
|
|
7
|
-
color?: string;
|
|
8
|
-
onRemove?: (e: React.MouseEvent) => void;
|
|
9
7
|
sizeIcon?: IconSizeEnum;
|
|
10
8
|
classIcon?: string;
|
|
11
9
|
};
|
|
12
|
-
export declare const Badge: ({ className, onClick,
|
|
10
|
+
export declare const Badge: ({ className, onClick, title, sizeIcon, classIcon, }: BadgeInterface) => import("react/jsx-runtime").JSX.Element;
|
package/dist/button/Button.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ButtonInterface } from './button.interface';
|
|
2
2
|
|
|
3
|
-
export declare const Button: ({ className, onClick, badge, title, sizeIcon, id, classIcon, positionicon, disabled, }: ButtonInterface) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare const Button: ({ className, onClick, badge, title, sizeIcon, id, classIcon, positionicon, disabled, style, }: ButtonInterface) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -5,12 +5,13 @@ export interface ButtonInterface {
|
|
|
5
5
|
className?: string;
|
|
6
6
|
badge?: BadgeInterface;
|
|
7
7
|
id?: string;
|
|
8
|
-
onClick?: (e: React.MouseEvent
|
|
8
|
+
onClick?: (e: React.MouseEvent) => void;
|
|
9
9
|
title: string;
|
|
10
10
|
classIcon?: string;
|
|
11
11
|
positionicon?: number;
|
|
12
12
|
disabled?: boolean;
|
|
13
13
|
sizeIcon?: IconSizeEnum;
|
|
14
|
+
style?: React.CSSProperties;
|
|
14
15
|
}
|
|
15
16
|
export interface buttonActionInterface {
|
|
16
17
|
icon?: string;
|
package/dist/card/Card.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { PositionOverlay } from '../overlayPanel/OverlayPanel';
|
|
2
2
|
import { CardInterface } from './card.interface';
|
|
3
3
|
import { CardActionInterface } from './cardAction.interface';
|
|
4
|
+
import { GridResponsive } from '../grid/grid.interface';
|
|
4
5
|
|
|
5
6
|
type CardProps = {
|
|
6
7
|
item: CardInterface;
|
|
@@ -11,6 +12,8 @@ type CardProps = {
|
|
|
11
12
|
children?: JSX.Element;
|
|
12
13
|
customAction?: JSX.Element;
|
|
13
14
|
positionOverlay?: PositionOverlay;
|
|
15
|
+
/** Largeur sur laquelle se basent les breakpoints du footer, défaut : "app" */
|
|
16
|
+
responsive?: GridResponsive;
|
|
14
17
|
};
|
|
15
|
-
export declare const Card: ({ item, actions, className, handleClick, onClose, customAction, positionOverlay, children, }: CardProps) => JSX.Element;
|
|
18
|
+
export declare const Card: ({ item, actions, className, handleClick, onClose, customAction, positionOverlay, responsive, children, }: CardProps) => JSX.Element;
|
|
16
19
|
export {};
|
|
@@ -1,16 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { dataTableActionsInterface, dataTableColumnsInterface } from './dataTable.interface';
|
|
2
2
|
|
|
3
|
-
export type DataTableDateRangeFilterValue = {
|
|
4
|
-
startDate: string;
|
|
5
|
-
endDate: string;
|
|
6
|
-
};
|
|
7
|
-
export type FilterValue = string | number | boolean | string[] | DataTableDateRangeFilterValue | null;
|
|
8
|
-
export type DataTableFilterState = Record<string, FilterValue>;
|
|
9
|
-
export type DataTableSortDirection = "asc" | "desc";
|
|
10
|
-
export type DataTableSortState = {
|
|
11
|
-
key: string;
|
|
12
|
-
direction: DataTableSortDirection;
|
|
13
|
-
};
|
|
14
3
|
export type DataTableProps<T> = {
|
|
15
4
|
id: string;
|
|
16
5
|
name?: string;
|
|
@@ -19,19 +8,27 @@ export type DataTableProps<T> = {
|
|
|
19
8
|
element?: JSX.Element;
|
|
20
9
|
data: T[];
|
|
21
10
|
emptyMessage?: string;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
11
|
+
actionsColumnWidth?: number;
|
|
12
|
+
actions?: dataTableActionsInterface<T>[];
|
|
13
|
+
footerAction?: (props: {
|
|
14
|
+
close: () => void;
|
|
15
|
+
selectedRows: T[];
|
|
16
|
+
}) => JSX.Element;
|
|
17
|
+
columns: dataTableColumnsInterface<T>[];
|
|
26
18
|
loading?: boolean;
|
|
27
19
|
onRowClick?: (row: any) => void;
|
|
28
20
|
onColumnClick?: (column: any) => void;
|
|
29
|
-
onEditColumnByOverlay?: (row: T) => void;
|
|
30
21
|
onLoadMore?: () => void;
|
|
31
22
|
hasMore?: boolean;
|
|
32
23
|
onSelectionChange?: (selectedRows: T[]) => void;
|
|
24
|
+
autoFocusFirstEditable?: boolean;
|
|
33
25
|
hideToggleAll?: boolean;
|
|
34
26
|
limitSelect?: number;
|
|
35
27
|
getRowId?: (row: T) => string | number;
|
|
28
|
+
onRowStyle?: (row: T) => React.CSSProperties | undefined;
|
|
29
|
+
onRowClassName?: (row: T) => string | undefined;
|
|
30
|
+
rowStyle?: (row: T) => React.CSSProperties | undefined;
|
|
31
|
+
rowClassName?: (row: T) => string | undefined;
|
|
32
|
+
mobileCardView?: boolean;
|
|
36
33
|
};
|
|
37
34
|
export declare function DataTable<T>(props: DataTableProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,53 +1,48 @@
|
|
|
1
1
|
import { HTMLInputTypeAttribute } from 'react';
|
|
2
|
-
import { EnumerableType } from '../_core/type/generiqueType';
|
|
3
|
-
import { TypeInputEnum } from '../form/form.enum';
|
|
4
2
|
|
|
5
|
-
export interface
|
|
3
|
+
export interface dataTableColumnsInterface<T> {
|
|
6
4
|
id: string;
|
|
7
5
|
label: string;
|
|
8
|
-
key?: string;
|
|
9
|
-
name?: string;
|
|
10
|
-
sticky?: boolean;
|
|
11
6
|
minWidth?: number;
|
|
12
7
|
maxWidth?: number;
|
|
13
8
|
width?: number;
|
|
14
9
|
align?: "right" | "left" | "center";
|
|
15
|
-
alignText?: "right" | "left" | "center";
|
|
16
10
|
format?: (value: any) => string;
|
|
17
11
|
sortable?: boolean;
|
|
18
12
|
filterable?: boolean;
|
|
19
|
-
|
|
20
|
-
filterType?: TypeInputEnum;
|
|
13
|
+
filterValue?: string;
|
|
21
14
|
editable?: boolean;
|
|
22
|
-
|
|
15
|
+
enterToNextColumn?: boolean;
|
|
23
16
|
options?: {
|
|
24
17
|
label: string;
|
|
25
18
|
value: string;
|
|
26
19
|
}[];
|
|
27
|
-
displayOverlay?: boolean;
|
|
28
|
-
onEditable?: (value: any, row: T) => boolean;
|
|
29
|
-
onChange?: (value: any, row: T) => void;
|
|
30
|
-
onEditByOverlay?: (value: any, row: T) => void;
|
|
31
20
|
onEdit?: (value: any, row: T) => void;
|
|
21
|
+
onEnter?: (value: any, row: T) => void;
|
|
32
22
|
onDisable?: (row: T) => boolean;
|
|
33
|
-
onEditTrigger?: "change" | "enter";
|
|
34
23
|
onRowStyle?: (row: T) => React.CSSProperties;
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
24
|
+
type: HTMLInputTypeAttribute | "select" | "image";
|
|
25
|
+
imageAlt?: (row: T) => string;
|
|
26
|
+
imageStyle?: React.CSSProperties;
|
|
27
|
+
imageSrc?: (row: T) => string;
|
|
28
|
+
showStepButtons?: boolean | ((row: T) => boolean);
|
|
29
|
+
stepControls?: boolean | ((row: T) => boolean);
|
|
30
|
+
withStepControls?: boolean | ((row: T) => boolean);
|
|
31
|
+
step?: number;
|
|
32
|
+
min?: number;
|
|
33
|
+
max?: number;
|
|
41
34
|
}
|
|
42
|
-
export interface
|
|
35
|
+
export interface dataTableActionsInterface<T> {
|
|
43
36
|
id: string;
|
|
44
37
|
label: string;
|
|
45
38
|
type: "button" | "link" | "icon";
|
|
46
39
|
classIcon?: string;
|
|
47
|
-
onClick: (row: T) => void;
|
|
40
|
+
onClick: (row: T, rowIndex?: number) => void;
|
|
48
41
|
shouldDisplay?: (row: T) => boolean;
|
|
49
42
|
disabled?: boolean;
|
|
50
43
|
labelButton?: (row: T) => string;
|
|
51
44
|
visible?: boolean;
|
|
52
|
-
width?: number;
|
|
45
|
+
width?: string | number;
|
|
46
|
+
minWidth?: string | number;
|
|
47
|
+
focusNextRow?: boolean;
|
|
53
48
|
}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { dataTableActionsInterface } from '../dataTable.interface';
|
|
2
2
|
|
|
3
3
|
type DataTableActionProps = {
|
|
4
|
-
action:
|
|
4
|
+
action: dataTableActionsInterface<any>;
|
|
5
5
|
row: any;
|
|
6
|
+
rowIndex?: number;
|
|
6
7
|
index?: number;
|
|
8
|
+
onFocusNextRow?: (rowIndex: number) => void;
|
|
7
9
|
};
|
|
8
|
-
export declare const DataTableAction: ({ action, row, index, }: DataTableActionProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
10
|
+
export declare const DataTableAction: ({ action, row, rowIndex, index, onFocusNextRow, }: DataTableActionProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
9
11
|
export {};
|
|
@@ -1,15 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { DataTableColumnsInterface } from '../dataTable.interface';
|
|
1
|
+
import { dataTableColumnsInterface } from '../dataTable.interface';
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
column: DataTableColumnsInterface<T>;
|
|
3
|
+
type DataTableColumnProps = {
|
|
4
|
+
column: dataTableColumnsInterface<any>;
|
|
7
5
|
idx: number;
|
|
8
|
-
onColumnClick?: (column:
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
onToggleSort?: (column: DataTableColumnsInterface<T>) => void;
|
|
13
|
-
stickyLeft?: number;
|
|
14
|
-
stickyTop?: number;
|
|
15
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
onColumnClick?: (column: dataTableColumnsInterface<any>) => void;
|
|
7
|
+
};
|
|
8
|
+
export declare const DataTableColumn: ({ column, idx, onColumnClick, }: DataTableColumnProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
type DataTableLoadingProps = {
|
|
2
|
+
columns: any[];
|
|
3
|
+
actions: any[];
|
|
2
4
|
emptyMessage?: string;
|
|
3
5
|
};
|
|
4
|
-
export declare const DataTableLoading: ({ emptyMessage }: DataTableLoadingProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare const DataTableLoading: ({ columns, actions, emptyMessage, }: DataTableLoadingProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
7
|
export {};
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { dataTableColumnsInterface } from '../dataTable.interface';
|
|
2
2
|
|
|
3
3
|
type DataTableRowProps = {
|
|
4
|
-
column:
|
|
4
|
+
column: dataTableColumnsInterface<any>;
|
|
5
5
|
idx: number;
|
|
6
|
+
rowIndex: number;
|
|
6
7
|
row: any;
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
container?: "cell" | "card";
|
|
9
|
+
onEnterNextColumn?: (columnIndex: number, rowIndex: number) => void;
|
|
9
10
|
};
|
|
10
|
-
export declare const DataTableRow: ({ column, idx, row,
|
|
11
|
+
export declare const DataTableRow: ({ column, idx, rowIndex, row, container, onEnterNextColumn, }: DataTableRowProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
12
|
export {};
|
|
@@ -6,6 +6,7 @@ type ExpandProps = {
|
|
|
6
6
|
onChange?: (item: ExpandInterface) => void;
|
|
7
7
|
currentItem?: ExpandInterface;
|
|
8
8
|
showArrow?: boolean;
|
|
9
|
+
catchfocusCapture?: boolean;
|
|
9
10
|
};
|
|
10
11
|
export declare const Expands: (props: ExpandProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
12
|
export type { ExpandProps };
|
|
@@ -5,6 +5,7 @@ export type ExpandProps = {
|
|
|
5
5
|
item: ExpandInterface;
|
|
6
6
|
className?: string;
|
|
7
7
|
showArrow?: boolean;
|
|
8
|
-
|
|
8
|
+
catchfocusCapture?: boolean;
|
|
9
|
+
onChange: (item: ExpandInterface) => void;
|
|
9
10
|
};
|
|
10
|
-
export declare const Expand: ({ currentExpand, item, className, showArrow, onChange, }: ExpandProps) => JSX.Element;
|
|
11
|
+
export declare const Expand: ({ currentExpand, item, className, showArrow, catchfocusCapture, onChange, }: ExpandProps) => JSX.Element;
|
package/dist/form/Form.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { FormInterface, FormValuesInterface } from './form.interface';
|
|
2
|
+
import { FormInterface, FormMode, FormSection, FormValuesInterface } from './form.interface';
|
|
3
|
+
import { GridBreakpoints, GridResponsive } from '../grid/grid.interface';
|
|
3
4
|
|
|
4
5
|
export type FormProps<T extends {
|
|
5
6
|
[key: string]: string | number | boolean | Date | string[];
|
|
@@ -10,8 +11,15 @@ export type FormProps<T extends {
|
|
|
10
11
|
hideSubmit?: boolean;
|
|
11
12
|
autoComplete?: string;
|
|
12
13
|
children?: React.ReactNode;
|
|
13
|
-
initialForm
|
|
14
|
+
initialForm?: FormInterface[];
|
|
15
|
+
sections?: FormSection[];
|
|
14
16
|
disabledSubmit?: boolean;
|
|
17
|
+
mode?: FormMode;
|
|
18
|
+
/** Largeur sur laquelle se basent les breakpoints des champs (col), défaut : "app" */
|
|
19
|
+
responsive?: GridResponsive;
|
|
20
|
+
/** Place le bouton submit dans la grid (dernière ligne) avec ces tailles de col.
|
|
21
|
+
* Ignoré si les champs n'utilisent pas la grid : le bouton reste dans le footer. */
|
|
22
|
+
submitCol?: GridBreakpoints;
|
|
15
23
|
onSubmit?: (values: FormValuesInterface<T>) => void;
|
|
16
24
|
onChange?: (values: FormValuesInterface<T>) => void;
|
|
17
25
|
};
|
package/dist/form/form.enum.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export declare enum TypeInputEnum {
|
|
2
|
+
ADDRESS = "address",
|
|
2
3
|
TEXT = "text",
|
|
3
4
|
BUTTON = "button",
|
|
4
5
|
EMAIL = "email",
|
|
@@ -8,7 +9,7 @@ export declare enum TypeInputEnum {
|
|
|
8
9
|
CHECKBOX = "checkbox",
|
|
9
10
|
RADIO = "radio",
|
|
10
11
|
DATE = "date",
|
|
11
|
-
DATERANGE = "daterange",
|
|
12
12
|
SELECT = "select",
|
|
13
|
-
TEXTAREA = "textarea"
|
|
13
|
+
TEXTAREA = "textarea",
|
|
14
|
+
PRICE = "price"
|
|
14
15
|
}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { TypeInputEnum } from './form.enum';
|
|
2
|
+
import { GridBreakpoints } from '../grid/grid.interface';
|
|
3
|
+
import { GeocodedAddress, GeocodingProvider } from '../geocoding/geocoding.interface';
|
|
2
4
|
|
|
5
|
+
export type FormMode = "read" | "edit";
|
|
3
6
|
export type FormValuesInterface<T extends {
|
|
4
7
|
[key: string]: string | number | boolean | Date | string[];
|
|
5
8
|
}> = Partial<{
|
|
@@ -9,8 +12,13 @@ export interface FormCondition {
|
|
|
9
12
|
errorMessage: string;
|
|
10
13
|
regex: string;
|
|
11
14
|
}
|
|
15
|
+
export interface FormSection {
|
|
16
|
+
title?: React.ReactNode;
|
|
17
|
+
fields: FormInterface[];
|
|
18
|
+
className?: string;
|
|
19
|
+
}
|
|
12
20
|
export interface FormInterface {
|
|
13
|
-
value: string | number | boolean | Date;
|
|
21
|
+
value: string | number | boolean | Date | string[];
|
|
14
22
|
id?: string;
|
|
15
23
|
label?: string;
|
|
16
24
|
focus?: boolean;
|
|
@@ -29,10 +37,21 @@ export interface FormInterface {
|
|
|
29
37
|
label: string;
|
|
30
38
|
}[];
|
|
31
39
|
className?: string;
|
|
40
|
+
col?: GridBreakpoints;
|
|
41
|
+
addressSearch?: {
|
|
42
|
+
minimumQueryLength?: number;
|
|
43
|
+
debounceTime?: number;
|
|
44
|
+
limit?: number;
|
|
45
|
+
provider?: GeocodingProvider;
|
|
46
|
+
manualEntryLabel?: string;
|
|
47
|
+
mapAddress?: (address: GeocodedAddress) => Record<string, string | number | boolean | Date | string[]>;
|
|
48
|
+
onSelect?: (address: GeocodedAddress) => void;
|
|
49
|
+
};
|
|
50
|
+
formatReadValue?: (value: string | number | boolean | Date | string[]) => React.ReactNode;
|
|
32
51
|
autoComplete?: string;
|
|
33
52
|
step?: string;
|
|
34
53
|
onChange?: (value: string | number | boolean | Date | string[], name?: string) => void;
|
|
35
|
-
onRequired?: (value: string | number | boolean | Date) => boolean;
|
|
36
|
-
onDisabled?: (value: string | number | boolean | Date) => boolean;
|
|
54
|
+
onRequired?: (value: string | number | boolean | Date | string[]) => boolean;
|
|
55
|
+
onDisabled?: (value: string | number | boolean | Date | string[]) => boolean;
|
|
37
56
|
onInvalid?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
38
57
|
}
|
|
@@ -12,15 +12,12 @@ export interface InputProps {
|
|
|
12
12
|
disabled?: boolean;
|
|
13
13
|
autoFocus?: boolean;
|
|
14
14
|
required?: boolean;
|
|
15
|
-
disabledDebounce?: boolean;
|
|
16
15
|
minLength?: number;
|
|
17
16
|
maxLength?: number;
|
|
18
|
-
width?: string;
|
|
19
17
|
autoComplete?: string;
|
|
20
18
|
step?: string;
|
|
21
19
|
tabIndex?: number;
|
|
22
20
|
checked?: boolean;
|
|
23
|
-
showClearButton?: boolean;
|
|
24
21
|
handleKeyDown?: (e: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
25
22
|
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
26
23
|
onBlur?: (e: React.FocusEvent<HTMLInputElement>) => void;
|
|
@@ -5,8 +5,10 @@ export type InputNumberProps = {
|
|
|
5
5
|
value?: string;
|
|
6
6
|
placeholder?: string;
|
|
7
7
|
className?: string;
|
|
8
|
+
pattern?: string;
|
|
8
9
|
disabled?: boolean;
|
|
9
10
|
required?: boolean;
|
|
11
|
+
inputMode?: "numeric" | "decimal";
|
|
10
12
|
autoFocus?: boolean;
|
|
11
13
|
maxLength?: number;
|
|
12
14
|
autoComplete?: string;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { GeocodedAddress, GeocodingProvider, GeocodingSearchOptions } from './geocoding.interface';
|
|
2
|
+
|
|
3
|
+
export interface GeocodingServiceOptions {
|
|
4
|
+
baseUrl?: string;
|
|
5
|
+
fetcher?: typeof fetch;
|
|
6
|
+
}
|
|
7
|
+
export declare class GeocodingService implements GeocodingProvider {
|
|
8
|
+
private readonly baseUrl;
|
|
9
|
+
private readonly fetcher;
|
|
10
|
+
constructor(options?: GeocodingServiceOptions);
|
|
11
|
+
search(query: string, options?: GeocodingSearchOptions): Promise<GeocodedAddress[]>;
|
|
12
|
+
}
|
|
13
|
+
export declare const geocodingService: GeocodingService;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface GeocodedAddress {
|
|
2
|
+
id: string;
|
|
3
|
+
label: string;
|
|
4
|
+
addressLine: string;
|
|
5
|
+
postalCode: string;
|
|
6
|
+
city: string;
|
|
7
|
+
cityCode?: string;
|
|
8
|
+
countryCode: string;
|
|
9
|
+
longitude: number;
|
|
10
|
+
latitude: number;
|
|
11
|
+
score?: number;
|
|
12
|
+
type?: string;
|
|
13
|
+
}
|
|
14
|
+
export interface GeocodingSearchOptions {
|
|
15
|
+
limit?: number;
|
|
16
|
+
signal?: AbortSignal;
|
|
17
|
+
}
|
|
18
|
+
export interface GeocodingProvider {
|
|
19
|
+
search(query: string, options?: GeocodingSearchOptions): Promise<GeocodedAddress[]>;
|
|
20
|
+
}
|
package/dist/grid/Grid.d.ts
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import { GridInterface } from './grid.interface';
|
|
1
|
+
import { GridInterface, GridResponsive } from './grid.interface';
|
|
2
|
+
import { GridGap } from './row/Row';
|
|
2
3
|
|
|
3
4
|
type GridProps = {
|
|
4
5
|
items: GridInterface[];
|
|
5
6
|
className?: string;
|
|
6
7
|
scroll?: boolean;
|
|
8
|
+
gap?: GridGap;
|
|
9
|
+
responsive?: GridResponsive;
|
|
7
10
|
};
|
|
8
|
-
export declare const Grid: ({ items, className, scroll }: GridProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare const Grid: ({ items, className, scroll, gap, responsive, }: GridProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
12
|
export {};
|
package/dist/grid/col/Col.d.ts
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
sm?: number;
|
|
5
|
-
md?: number;
|
|
6
|
-
lg?: number;
|
|
1
|
+
import { GridBreakpoints } from '../grid.interface';
|
|
2
|
+
|
|
3
|
+
type ColProps = GridBreakpoints & {
|
|
7
4
|
children: React.ReactNode;
|
|
8
5
|
};
|
|
9
6
|
export declare const Col: React.FC<ColProps>;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
import { GridColumnSpan, GridResponsive } from '../../grid.interface';
|
|
2
|
+
|
|
2
3
|
type ColStyledProps = {
|
|
3
|
-
$
|
|
4
|
-
$
|
|
5
|
-
$
|
|
6
|
-
$
|
|
4
|
+
$responsive: GridResponsive;
|
|
5
|
+
$xs?: GridColumnSpan;
|
|
6
|
+
$sm?: GridColumnSpan;
|
|
7
|
+
$md?: GridColumnSpan;
|
|
8
|
+
$lg?: GridColumnSpan;
|
|
9
|
+
$xl?: GridColumnSpan;
|
|
7
10
|
};
|
|
8
11
|
export declare const ColStyled: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, ColStyledProps>> & string;
|
|
9
12
|
export {};
|
|
@@ -1,8 +1,23 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
/**
|
|
3
|
+
* Largeur de référence pour les breakpoints des Col :
|
|
4
|
+
* - "app" (défaut) : le conteneur app-container
|
|
5
|
+
* - "viewport" : la fenêtre (@media)
|
|
6
|
+
* - "row" : la Row elle-même (utile pour une grid dans une card, un panneau...)
|
|
7
|
+
*/
|
|
8
|
+
export type GridResponsive = "app" | "viewport" | "row";
|
|
9
|
+
/**
|
|
10
|
+
* Nombre de colonnes sur 12, ou "auto" : la colonne partage la place restante
|
|
11
|
+
* de la ligne à parts égales avec les autres "auto" (ex. 5 champs sur une ligne).
|
|
12
|
+
*/
|
|
13
|
+
export type GridColumnSpan = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | "auto";
|
|
14
|
+
export interface GridBreakpoints {
|
|
15
|
+
xs?: GridColumnSpan;
|
|
16
|
+
sm?: GridColumnSpan;
|
|
17
|
+
md?: GridColumnSpan;
|
|
18
|
+
lg?: GridColumnSpan;
|
|
19
|
+
xl?: GridColumnSpan;
|
|
20
|
+
}
|
|
21
|
+
export interface GridInterface extends GridBreakpoints {
|
|
7
22
|
children: React.ReactNode;
|
|
8
23
|
}
|
package/dist/grid/row/Row.d.ts
CHANGED
|
@@ -1,8 +1,15 @@
|
|
|
1
|
+
import { GridResponsive } from '../grid.interface';
|
|
1
2
|
|
|
3
|
+
export type GridGap = boolean | number | string;
|
|
4
|
+
export declare const RowResponsiveContext: import('react').Context<GridResponsive>;
|
|
2
5
|
type RowProps = {
|
|
3
6
|
children: React.ReactNode;
|
|
4
7
|
className?: string;
|
|
5
8
|
scroll?: boolean;
|
|
9
|
+
/** true (défaut) : gap par défaut, false : pas de gap, number : px, string : valeur CSS ("1rem") */
|
|
10
|
+
gap?: GridGap;
|
|
11
|
+
/** Largeur sur laquelle se basent les breakpoints des Col (défaut : "app") */
|
|
12
|
+
responsive?: GridResponsive;
|
|
6
13
|
};
|
|
7
14
|
export declare const Row: React.FC<RowProps>;
|
|
8
15
|
export {};
|
package/dist/header/Header.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { HeaderInterface } from './header.interface';
|
|
2
2
|
|
|
3
|
-
export declare const Header: ({ children, logo, onClickMenu, userChildren, positionFixed, onClickLogo, showBackNavigation, onClickBackNavigation, }: HeaderInterface) => JSX.Element;
|
|
3
|
+
export declare const Header: ({ children, logo, onClickMenu, userChildren, positionFixed, overlayClassName, onClickLogo, showBackNavigation, onClickBackNavigation, }: HeaderInterface) => JSX.Element;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export interface HeaderInterface {
|
|
3
|
-
logo?:
|
|
3
|
+
logo?: React.ReactNode;
|
|
4
4
|
children?: React.ReactNode;
|
|
5
5
|
positionFixed?: boolean;
|
|
6
6
|
onClickMenu?: () => void;
|
|
7
7
|
userChildren?: React.ReactNode;
|
|
8
8
|
onClickLogo?: () => void;
|
|
9
|
+
overlayClassName?: string;
|
|
9
10
|
showBackNavigation?: boolean;
|
|
10
11
|
onClickBackNavigation?: () => void;
|
|
11
12
|
}
|
package/dist/icon/Icon.d.ts
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -11,11 +11,12 @@ export { useToken } from './_core/hooks/useToken';
|
|
|
11
11
|
export { useValidate } from './_core/hooks/useValidate';
|
|
12
12
|
export { WidgetSupport } from './_core/hooks/widgetSupport';
|
|
13
13
|
export { ButtonAction } from './action/ButtonAction';
|
|
14
|
+
export { AddressSearch } from './addressSearch/AddressSearch';
|
|
15
|
+
export type { AddressSearchProps } from './addressSearch/AddressSearch';
|
|
14
16
|
export { Badge } from './badge/Badge';
|
|
15
17
|
export { Button } from './button/Button';
|
|
16
18
|
export { ButtonActions } from './button/buttonActions/ButtonActions';
|
|
17
19
|
export { ButtonFile } from './button/buttonFile/ButtonFile';
|
|
18
|
-
export { ButtonFilters } from './button/buttonFilters/ButtonFilters';
|
|
19
20
|
export { Card } from './card/Card';
|
|
20
21
|
export { Carousel } from './carousel/Carousel';
|
|
21
22
|
export { Damier } from './damier/Damier';
|
|
@@ -25,11 +26,14 @@ export { Expands } from './expands/Expands';
|
|
|
25
26
|
export { FilAriane } from './filAriane/FilAriane';
|
|
26
27
|
export { DynamicForm } from './form/Form';
|
|
27
28
|
export { TypeInputEnum } from './form/form.enum';
|
|
29
|
+
export type { FormMode, FormSection } from './form/form.interface';
|
|
28
30
|
export { Input } from './form/input/Input';
|
|
29
31
|
export { InputNumber } from './form/inputNumber/InputNumber';
|
|
30
32
|
export { InputPrice } from './form/inputPrice/InputPrice';
|
|
31
33
|
export { TextArea } from './form/textArea/TextArea';
|
|
32
34
|
export { Grid } from './grid/Grid';
|
|
35
|
+
export { GeocodingService, geocodingService, } from './geocoding/GeocodingService';
|
|
36
|
+
export type { GeocodedAddress, GeocodingProvider, GeocodingSearchOptions, } from './geocoding/geocoding.interface';
|
|
33
37
|
export { Header } from './header/Header';
|
|
34
38
|
export { Icon } from './icon/Icon';
|
|
35
39
|
export { IconSizeEnum } from './icon/iconSize.enum';
|