@fattureincloud/fic-design-system 0.4.9-expenses.1.4 → 0.4.10
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/components/form/datepicker/DatePickerImpl.d.ts +1 -1
- package/dist/components/form/datepicker/hooks/useFormattedDate.d.ts +12 -0
- package/dist/components/form/datepicker/index.d.ts +2 -2
- package/dist/components/form/datepicker/types.d.ts +3 -0
- package/dist/components/form/datepicker/utils.d.ts +2 -0
- package/dist/components/form/fileUploader/styled.d.ts +2 -0
- package/dist/components/form/fileUploader/types.d.ts +2 -2
- package/dist/components/table/Table.d.ts +2 -2
- package/dist/components/table/components/tableBody/TableBody.d.ts +2 -1
- package/dist/components/table/index.d.ts +2 -2
- package/dist/components/table/types.d.ts +1 -0
- package/dist/components/table/utils.d.ts +2 -0
- package/dist/index.d.ts +3 -3
- package/dist/index.esm.js +5 -5
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
@@ -6,7 +6,7 @@ export declare type CustomButtonProps = {
|
|
6
6
|
text: string;
|
7
7
|
onClick: (props: RenderCustomFooterProps) => void;
|
8
8
|
};
|
9
|
-
export interface DatePickerImplProps extends ReactDatePickerProps, CommonFormTypes {
|
9
|
+
export interface DatePickerImplProps extends Omit<ReactDatePickerProps, 'onChange'>, CommonFormTypes {
|
10
10
|
date: Date | null;
|
11
11
|
setDate: Dispatch<SetStateAction<Date | null>>;
|
12
12
|
allowMonthView?: boolean;
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import { Dispatch, SetStateAction } from 'react';
|
2
|
+
import { DateFormats } from '../types';
|
3
|
+
declare type ReturnType = [Date | null, Dispatch<SetStateAction<Date | null>>, string | null, string];
|
4
|
+
/**
|
5
|
+
* Hook to manage a date in string format
|
6
|
+
* @param {string|null} initialValue Initial string value representing a date
|
7
|
+
* @param {DateFormats} allowedFormats Array of allowed formats, the hook will try to parse the initial value using this formats
|
8
|
+
* @param {dateFormat} outputFormat The string value returned by the hook will be formatted with this format
|
9
|
+
* @returns {[Date|null, function, string|null, string]} Returns an array with a Date object, the function to update it, a string representation of the date (formatted using the third parameter of the hook) and the currently used format
|
10
|
+
*/
|
11
|
+
declare const useFormattedDate: (initialValue?: string | null | undefined, allowedFormats?: DateFormats | null | undefined, outputFormat?: string | undefined) => ReturnType;
|
12
|
+
export default useFormattedDate;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import DatePicker, { DatePickerProps } from './DatePicker';
|
2
2
|
import datePickerPalette, { DatePickerPalette } from './datePickerPalette';
|
3
|
-
import
|
3
|
+
import useFormattedDate from './hooks/useFormattedDate';
|
4
4
|
import { timeConversionOptions } from './utils';
|
5
|
-
export { datePickerPalette, DatePickerProps, DatePickerPalette, DatePicker,
|
5
|
+
export { datePickerPalette, DatePickerProps, DatePickerPalette, DatePicker, useFormattedDate, timeConversionOptions };
|
@@ -1 +1,4 @@
|
|
1
1
|
export declare type datePickerStatus = 'dayPicker' | 'monthPicker' | 'yearPicker';
|
2
|
+
export declare const dateFormatsArray: [string, ...string[]];
|
3
|
+
export declare type dateFormat = typeof dateFormatsArray[number];
|
4
|
+
export declare type DateFormats = [dateFormat, ...dateFormat[]];
|
@@ -1,7 +1,9 @@
|
|
1
|
+
import { paletteColor } from '../../../styles/types';
|
1
2
|
import { FileUploaderSize, statuses } from './types';
|
2
3
|
interface ContainerProps {
|
3
4
|
status: statuses;
|
4
5
|
size: FileUploaderSize;
|
6
|
+
backgroundColor: paletteColor;
|
5
7
|
}
|
6
8
|
export declare const Container: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, ContainerProps, never>;
|
7
9
|
export declare const OnDraggingOverlay: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, ContainerProps, never>;
|
@@ -4,14 +4,14 @@ export declare type FileUploaderStatus = typeof uploaderStatusesArray[number];
|
|
4
4
|
export declare type statuses = FileUploaderStatus | 'dragging';
|
5
5
|
export declare const uploaderSize: readonly ["small", "normal"];
|
6
6
|
export declare type FileUploaderSize = typeof uploaderSize[number];
|
7
|
-
export declare const typesArray: readonly ["unknown", "pdf", "image", "zip", "archive", "text", "document", "spreadsheet", "presentation", "xml", "csv"];
|
7
|
+
export declare const typesArray: readonly ["unknown", "pdf", "image", "zip", "archive", "text", "document", "spreadsheet", "presentation", "xml", "p7m", "csv"];
|
8
8
|
export declare type FileType = typeof typesArray[number];
|
9
9
|
declare type TypeDefinition = {
|
10
10
|
mimeTypes: string[];
|
11
11
|
extensions: string[];
|
12
12
|
};
|
13
13
|
export declare type FileTypesMap = Record<FileType, TypeDefinition>;
|
14
|
-
export declare type CustomPaletteParts = Pick<FileUploaderParts, 'text' | 'caption' | 'icon'>;
|
14
|
+
export declare type CustomPaletteParts = Pick<FileUploaderParts, 'text' | 'caption' | 'icon' | 'background'>;
|
15
15
|
export declare type CustomPalette = {
|
16
16
|
[key in statuses]?: Partial<CustomPaletteParts>;
|
17
17
|
};
|
@@ -1,7 +1,7 @@
|
|
1
1
|
/// <reference types="react" />
|
2
2
|
import { Row, UseTableOptions } from 'react-table';
|
3
3
|
import { EmptyTablePageProps } from './components/EmptyState';
|
4
|
-
import { ManualPagination, OnSort, RowActions, TableData } from './types';
|
4
|
+
import { ManualPagination, OnSelectionChange, OnSort, RowActions, TableData } from './types';
|
5
5
|
export interface TableProps<T extends TableData> extends UseTableOptions<T> {
|
6
6
|
sortable?: boolean;
|
7
7
|
onSort?: OnSort<T>;
|
@@ -10,7 +10,7 @@ export interface TableProps<T extends TableData> extends UseTableOptions<T> {
|
|
10
10
|
onScroll?: () => void;
|
11
11
|
selectableRows?: boolean;
|
12
12
|
preSelectAllRows?: boolean;
|
13
|
-
onSelectionChange?:
|
13
|
+
onSelectionChange?: OnSelectionChange<T>;
|
14
14
|
onRowClick?: (row: Row<T>) => void;
|
15
15
|
globalFilter?: string;
|
16
16
|
hideHeader?: boolean;
|
@@ -7,6 +7,7 @@ interface Props<T extends TableData> {
|
|
7
7
|
isLoading: boolean;
|
8
8
|
onRowClick?: (row: Row<T>) => void;
|
9
9
|
rowHeight?: number | string;
|
10
|
+
selectableRows?: boolean;
|
10
11
|
}
|
11
|
-
declare const TableBody: <T extends TableData>({ isLoading,
|
12
|
+
declare const TableBody: <T extends TableData>({ isLoading, onRowClick, prepareRow, rowHeight, rows, selectableRows, selectedRowsIds, }: Props<T>) => JSX.Element;
|
12
13
|
export default TableBody;
|
@@ -3,5 +3,5 @@ import useTableValues from './hooks/useTableValues';
|
|
3
3
|
import Table from './Table';
|
4
4
|
import { TableProps } from './Table';
|
5
5
|
import tablePalette, { TablePalette } from './tablePalette';
|
6
|
-
import { ManualPagination, OnSort, RowActions, TableData } from './types';
|
7
|
-
export { Table, TableProps, TableData, tablePalette, useTableValues, TablePalette, RowActions, ManualPagination, OnSort, Row, Column, };
|
6
|
+
import { ManualPagination, OnSelectionChange, OnSort, RowActions, TableData } from './types';
|
7
|
+
export { Table, TableProps, TableData, tablePalette, useTableValues, TablePalette, RowActions, ManualPagination, OnSelectionChange, OnSort, Row, Column, };
|
@@ -24,4 +24,5 @@ interface ManualPaginationConfig {
|
|
24
24
|
}
|
25
25
|
export declare type ManualPagination = ManualPaginationConfig | undefined;
|
26
26
|
export declare type OnSort<T extends TableData> = (sortBy: Array<SortingRule<T>>) => void;
|
27
|
+
export declare type OnSelectionChange<T extends TableData> = (rows: Row<T>[], addedRows: Row<T>[], removedRows: Row<T>[]) => void;
|
27
28
|
export {};
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import { Row, TableData } from 'index';
|
1
2
|
import { DefaultTheme } from 'styled-components';
|
2
3
|
import { paletteColor } from '../../styles/types';
|
3
4
|
import { TableBodyTrProps } from './components/tableBody/TableBodyTr';
|
@@ -12,4 +13,5 @@ export interface TableBodyTrStyles {
|
|
12
13
|
}
|
13
14
|
export declare const getTableBodyTrStyles: ({ theme, isDisabled, isSelected, }: GetTableBodyTrStylesParams) => TableBodyTrStyles;
|
14
15
|
export declare const isNumber: (n: number | string | undefined) => boolean;
|
16
|
+
export declare const getIdsFromRows: <T extends TableData>(rows: Row<T>[] | undefined) => string[];
|
15
17
|
export {};
|
package/dist/index.d.ts
CHANGED
@@ -8,7 +8,7 @@ import { Drawer } from './components/drawer';
|
|
8
8
|
import { closeDropdownType, Dropdown, DropdownItemProps, DropdownPalette, renderContentType } from './components/dropdown';
|
9
9
|
import { WithBadge } from './components/floatingBadge';
|
10
10
|
import { Checkbox, CheckboxPalette, CheckboxProps, checkboxStatus, useCheckboxValue } from './components/form/checkbox';
|
11
|
-
import { DatePicker, DatePickerPalette, DatePickerProps, timeConversionOptions,
|
11
|
+
import { DatePicker, DatePickerPalette, DatePickerProps, timeConversionOptions, useFormattedDate } from './components/form/datepicker';
|
12
12
|
import { FileRejection, FileUploader, fileUploaderOnDrop, FileUploaderPalette, FileUploaderProps } from './components/form/fileUploader';
|
13
13
|
import { InputHelper, InputHelperPalette, InputHelperProps } from './components/form/inputHelper';
|
14
14
|
import { InputText, InputTextPalette, InputTextProps, UnitDropdownProps } from './components/form/inputText';
|
@@ -29,7 +29,7 @@ import { Pagination } from './components/pagination';
|
|
29
29
|
import { Progressbar } from './components/progressbar';
|
30
30
|
import { RadioButton } from './components/radioButton';
|
31
31
|
import { Stepper, StepperPalette, StepperProps } from './components/stepper';
|
32
|
-
import { Column, ManualPagination, OnSort, Row, RowActions, Table, TableData, TablePalette, TableProps, useTableValues } from './components/table';
|
32
|
+
import { Column, ManualPagination, OnSelectionChange, OnSort, Row, RowActions, Table, TableData, TablePalette, TableProps, useTableValues } from './components/table';
|
33
33
|
import { DropdownTabs, ScrollableTabs, TabsItem } from './components/tabs';
|
34
34
|
import { Tag, TagPalette, TagProps } from './components/tag';
|
35
35
|
import { ThemeProvider } from './components/themeProvider';
|
@@ -39,4 +39,4 @@ import { Tooltip, TooltipPalette, TooltipProps } from './components/tooltip';
|
|
39
39
|
import { autocompleteYellow } from './styles/defaultPalette/colors/others';
|
40
40
|
import { Theme } from './styles/theme';
|
41
41
|
import { Palette, paletteColor } from './styles/types';
|
42
|
-
export { autocompleteYellow, paletteColor, Avatar, Banner, BannerProps, Button, ButtonProps, IconButton, IconButtonProps, Icon, IconProps, IconPalette, IconBackground, IconBackgroundPalette, Table, TableProps, TableData, useTableValues, Row, Column, TablePalette, RowActions, ManualPagination, OnSort, Checkbox, useCheckboxValue, CheckboxProps, CheckboxPalette, checkboxStatus, Select, CreatableSelect, AsyncSelect, AsyncCreatableSelect, SelectProps, AsyncSelectProps, AsyncCreatableSelectProps, useSelectSimpleValue, isSimpleValue, simpleValue, CreatableSelectProps, useSelectValue, useSelectMultiValues, SelectPalette, SelectComponentsType, OptionType, PageEmptySet, Modal, ModalBody, ModalSearchable, Tooltip, TooltipProps, TooltipPalette, Accordion, Progressbar, Drawer, Chip, RadioButton, RadioButtonGroup, InlineMessage, Badge, BadgeProps, Dropdown, DropdownItemProps, DropdownPalette, closeDropdownType, renderContentType, DropdownTabs, ScrollableTabs, SidebarItem, sidebarItemHeight, SidebarItemPalette, SidebarItemProps, CustomSidebarItemProps, TabsItem, Stepper, StepperProps, StepperPalette, Tip, ShortcutTip, ThemeProvider, Theme, Palette, GroupedList, ItemType, GroupType, WithBadge, Pagination, Toast, ToastProps, ConfirmationModal, MicroTag, MicroTagProps, MicroTagPalette, Tag, TagProps, TagPalette, InputText, InputTextProps, InputTextPalette, UnitDropdownProps, DatePickerProps, DatePickerPalette, DatePicker,
|
42
|
+
export { autocompleteYellow, paletteColor, Avatar, Banner, BannerProps, Button, ButtonProps, IconButton, IconButtonProps, Icon, IconProps, IconPalette, IconBackground, IconBackgroundPalette, Table, TableProps, TableData, useTableValues, Row, Column, TablePalette, RowActions, ManualPagination, OnSelectionChange, OnSort, Checkbox, useCheckboxValue, CheckboxProps, CheckboxPalette, checkboxStatus, Select, CreatableSelect, AsyncSelect, AsyncCreatableSelect, SelectProps, AsyncSelectProps, AsyncCreatableSelectProps, useSelectSimpleValue, isSimpleValue, simpleValue, CreatableSelectProps, useSelectValue, useSelectMultiValues, SelectPalette, SelectComponentsType, OptionType, PageEmptySet, Modal, ModalBody, ModalSearchable, Tooltip, TooltipProps, TooltipPalette, Accordion, Progressbar, Drawer, Chip, RadioButton, RadioButtonGroup, InlineMessage, Badge, BadgeProps, Dropdown, DropdownItemProps, DropdownPalette, closeDropdownType, renderContentType, DropdownTabs, ScrollableTabs, SidebarItem, sidebarItemHeight, SidebarItemPalette, SidebarItemProps, CustomSidebarItemProps, TabsItem, Stepper, StepperProps, StepperPalette, Tip, ShortcutTip, ThemeProvider, Theme, Palette, GroupedList, ItemType, GroupType, WithBadge, Pagination, Toast, ToastProps, ConfirmationModal, MicroTag, MicroTagProps, MicroTagPalette, Tag, TagProps, TagPalette, InputText, InputTextProps, InputTextPalette, UnitDropdownProps, DatePickerProps, DatePickerPalette, DatePicker, useFormattedDate, timeConversionOptions, InputHelper, InputHelperProps, InputHelperPalette, TextArea, TextAreaProps, TextAreaPalette, FileUploader, FileUploaderProps, FileUploaderPalette, FileRejection, fileUploaderOnDrop, };
|