Skip to content

Commit 5c4d899

Browse files
committed
UI: allow custom date format in DateCell, DateFilter, FilterBox, DateTimeLabel
1 parent fffba96 commit 5c4d899

File tree

26 files changed

+1229
-1128
lines changed

26 files changed

+1229
-1128
lines changed

dist/cjs/index.js

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/cjs/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/cjs/types/components/DateTimePicker/DateTimePicker.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ interface DateTimePickerProps {
1616
disabled?: boolean;
1717
canClear?: boolean;
1818
showNow?: boolean;
19+
enableCustomFormat?: boolean;
20+
customFormat?: string;
1921
}
2022
declare function DateTimePicker(props: DateTimePickerProps): JSX.Element;
2123
export default DateTimePicker;

dist/cjs/types/components/DateTimePicker/components/DateTimeLabel/DateTimeLabel.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ interface DateTimeLabelProps {
66
showSeconds?: boolean;
77
showTime?: boolean;
88
disabled?: boolean;
9+
enableCustomFormat?: boolean;
10+
customFormat?: string;
911
}
1012
declare function DateTimeLabel(props: DateTimeLabelProps): JSX.Element;
1113
export default DateTimeLabel;

dist/cjs/types/components/FilterBox/FilterBox.d.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ interface FilterBoxProps {
44
name: string;
55
value: string | Array<string> | Record<string, unknown>;
66
onDelete: () => void;
7+
hasCustomDateFormat?: boolean;
8+
customDateFormat?: string;
79
}
8-
declare function FilterBox({ name, value: value, onDelete }: FilterBoxProps): JSX.Element;
10+
declare function FilterBox({ name, value: value, onDelete, hasCustomDateFormat, customDateFormat }: FilterBoxProps): JSX.Element;
911
export default FilterBox;

dist/cjs/types/components/Table/Table.d.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,9 @@ interface TableProps<Data extends Record<string, unknown>> {
8989
* Must be memoized
9090
*/
9191
groupBy?: string[];
92+
hasCustomDateFormat?: boolean;
93+
customDateFormat?: string;
9294
}
93-
declare function Table<Values extends Record<string, unknown>>({ columns, data, rowActions, tableActions, title, defaultSort, globalFilter, defaultGlobalFilter, checkRowSelected, checkRowHighlighted, getRowId, addFilterToUrl, RowSubComponent, listenerPrefix, onRowClick, miniTable, filterCategory, fixedPageSize, disableActionsPortal, maxRows, emptyMessage, colPropForShowColumns, manualPagination, itemsAmount, canExpandAll, loading, onFiltersChanged, defaultDescendingSort, customRowActions, manualFilters, extraClasses, initialFilters: initialUserFilters, groupBy }: TableProps<Values>): JSX.Element;
95+
declare function Table<Values extends Record<string, unknown>>({ columns, data, rowActions, tableActions, title, defaultSort, globalFilter, defaultGlobalFilter, checkRowSelected, checkRowHighlighted, getRowId, addFilterToUrl, RowSubComponent, listenerPrefix, onRowClick, miniTable, filterCategory, fixedPageSize, disableActionsPortal, maxRows, emptyMessage, colPropForShowColumns, manualPagination, itemsAmount, canExpandAll, loading, onFiltersChanged, defaultDescendingSort, customRowActions, manualFilters, extraClasses, initialFilters: initialUserFilters, groupBy, hasCustomDateFormat, customDateFormat }: TableProps<Values>): JSX.Element;
9496
declare const _default: React.MemoExoticComponent<typeof Table>;
9597
export default _default;

dist/cjs/types/components/Table/filters/DateFilter/DateFilter.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ interface ExtendedFiltersColumn<T extends object> extends UseFiltersColumnProps<
55
Header: string;
66
id?: string;
77
customTitle?: string;
8+
enableCustomFormat?: boolean;
9+
customFormat?: string;
810
}
911
interface DateFilterProps {
1012
column: ExtendedFiltersColumn<object>;

dist/cjs/types/consts.d.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,12 @@ export declare const TIME_PARTS: {
5555
MINUTE: string;
5656
SECOND: string;
5757
};
58+
export declare const TIME_FORMATS: {
59+
DATE: string;
60+
DATE_TIME: string;
61+
DATE_TIME_SECONDS: string;
62+
DATE_TIME_SECONDS_MS: string;
63+
};
5864
interface SeverityIcons {
5965
[key: string]: any;
6066
}

dist/esm/index.js

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/esm/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)