schummar-table 0.33.0 → 0.34.0

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.
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import type { CommonFilterProps } from '../types';
3
3
  import type { DatePickerProps, DateRange } from './datePicker';
4
- export declare function DateFilter<T, V>({ locale, firstDayOfWeek, defaultDateInView, quickOptions, singleSelect, filterBy, minDate, maxDate, ...props }: {
4
+ export declare function DateFilter<T, V>({ locale, firstDayOfWeek, defaultDateInView, quickOptions, singleSelect, filterBy, minDate, maxDate, showCalendarWeek, ...props }: {
5
5
  /** If enabled, only single days can be selected. Ranges otherwise. */
6
6
  singleSelect?: boolean;
7
- } & Pick<DatePickerProps, 'locale' | 'firstDayOfWeek' | 'defaultDateInView' | 'quickOptions' | 'minDate' | 'maxDate'> & CommonFilterProps<T, V, Date | DateRange | null, Date | DateRange | null>): JSX.Element;
7
+ } & Pick<DatePickerProps, 'locale' | 'firstDayOfWeek' | 'defaultDateInView' | 'quickOptions' | 'minDate' | 'maxDate' | 'showCalendarWeek'> & CommonFilterProps<T, V, Date | DateRange | null, Date | DateRange | null>): JSX.Element;
@@ -1,4 +1,4 @@
1
- import type { ReactNode } from 'react';
1
+ import { ReactNode } from 'react';
2
2
  export type DateRange = {
3
3
  min: Date;
4
4
  max: Date;
@@ -24,8 +24,12 @@ export type DatePickerProps = {
24
24
  defaultDateInView?: Date;
25
25
  /** Show buttons to quickly select suggested dates or date ranges */
26
26
  quickOptions?: DatePickerQuickOption[];
27
+ /** Minimum selectable date */
27
28
  minDate?: Date;
29
+ /** Maximum selectable date */
28
30
  maxDate?: Date;
31
+ /** Whether to show the calendar week in the first column */
32
+ showCalendarWeek?: boolean;
29
33
  };
30
34
  /** Rounds a date down to the start of the day. */
31
35
  export declare const startOfDay: (d: Date) => Date;
@@ -36,6 +40,7 @@ export declare const today: () => DateRange;
36
40
  export declare const thisWeek: (delta?: number, firstDayOfWeek?: number) => DateRange;
37
41
  export declare const thisMonth: (delta?: number) => DateRange;
38
42
  export declare const thisYear: (delta?: number) => DateRange;
43
+ export declare const getCalendarWeek: (date: Date) => number;
39
44
  export declare const commonQuickOptions: {
40
45
  today: {
41
46
  label: import("@emotion/react/jsx-runtime").JSX.Element;
@@ -39,6 +39,7 @@ export interface TableTheme<T = unknown> {
39
39
  resetAll: ReactNode;
40
40
  rangeMin: ReactNode;
41
41
  rangeMax: ReactNode;
42
+ calendarWeek: ReactNode;
42
43
  };
43
44
  /** Define styles. */
44
45
  classes?: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "schummar-table",
3
- "version": "0.33.0",
3
+ "version": "0.34.0",
4
4
  "description": "",
5
5
  "license": "ISC",
6
6
  "repository": "schummar/schummar-table",
@@ -82,36 +82,36 @@
82
82
  "@emotion/react": ">=11.11.1",
83
83
  "dayzed": ">=3.2.3",
84
84
  "immer": ">=9.0.21",
85
- "nanoid": ">=4.0.2",
86
- "schummar-state": "0.2.1-experimental-13"
85
+ "nanoid": ">=4.0.2"
87
86
  },
88
87
  "devDependencies": {
89
- "@emotion/styled": "11.10.6",
88
+ "schummar-state": "0.2.1-experimental-13",
89
+ "@emotion/styled": "11.11.0",
90
90
  "@material-ui/core": "4.12.4",
91
- "@mui/material": "5.12.1",
91
+ "@mui/material": "5.14.18",
92
92
  "@schummar/eslint-config": "github:schummar/eslint-config",
93
93
  "@schummar/prettier-config": "github:schummar/prettier-config",
94
- "@schummar/runp": "1.12.0",
95
- "@types/react": "18.0.37",
96
- "@types/react-dom": "18.0.11",
97
- "@typescript-eslint/parser": "6.6.0",
98
- "@vitejs/plugin-react": "3.1.0",
99
- "eslint": "8.38.0",
100
- "eslint-plugin-storybook": "0.6.11",
101
- "prettier": "2.8.7",
94
+ "@schummar/runp": "2.0.1",
95
+ "@types/react": "18.2.37",
96
+ "@types/react-dom": "18.2.15",
97
+ "@typescript-eslint/parser": "6.11.0",
98
+ "@vitejs/plugin-react": "4.1.1",
99
+ "eslint": "8.53.0",
100
+ "eslint-plugin-storybook": "0.6.15",
101
+ "prettier": "3.1.0",
102
102
  "react": "18.2.0",
103
103
  "react-dom": "18.2.0",
104
- "rimraf": "5.0.0",
105
- "semantic-release": "21.0.1",
106
- "typescript": "5.0.4",
107
- "vite": "4.2.1"
104
+ "rimraf": "5.0.5",
105
+ "semantic-release": "22.0.7",
106
+ "typescript": "5.2.2",
107
+ "vite": "4.5.0"
108
108
  },
109
109
  "workspaces": [
110
110
  "docs"
111
111
  ],
112
112
  "volta": {
113
- "node": "18.16.0",
114
- "npm": "9.6.4"
113
+ "node": "20.9.0",
114
+ "npm": "10.2.4"
115
115
  },
116
116
  "eslintConfig": {
117
117
  "extends": [