@synerise/ds-date-picker 0.10.17 → 0.10.19

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/CHANGELOG.md CHANGED
@@ -3,6 +3,22 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [0.10.19](https://github.com/Synerise/synerise-design/compare/@synerise/ds-date-picker@0.10.18...@synerise/ds-date-picker@0.10.19) (2023-10-06)
7
+
8
+ **Note:** Version bump only for package @synerise/ds-date-picker
9
+
10
+
11
+
12
+
13
+
14
+ ## [0.10.18](https://github.com/Synerise/synerise-design/compare/@synerise/ds-date-picker@0.10.17...@synerise/ds-date-picker@0.10.18) (2023-10-02)
15
+
16
+ **Note:** Version bump only for package @synerise/ds-date-picker
17
+
18
+
19
+
20
+
21
+
6
22
  ## [0.10.17](https://github.com/Synerise/synerise-design/compare/@synerise/ds-date-picker@0.10.16...@synerise/ds-date-picker@0.10.17) (2023-09-26)
7
23
 
8
24
  **Note:** Version bump only for package @synerise/ds-date-picker
@@ -2,7 +2,7 @@ import * as React from 'react';
2
2
  import { IntlShape } from 'react-intl';
3
3
  import { DropdownProps } from '@synerise/ds-dropdown/dist/Dropdown';
4
4
  import { DateToFormatOptions } from '@synerise/ds-data-format';
5
- export declare type Props = {
5
+ export type Props = {
6
6
  autoFocus?: boolean;
7
7
  disabled?: boolean;
8
8
  disabledDates?: (date?: Date) => boolean;
@@ -34,7 +34,7 @@ export declare type Props = {
34
34
  hideNow?: boolean;
35
35
  readOnly?: boolean;
36
36
  };
37
- export declare type State = {
37
+ export type State = {
38
38
  mode: string;
39
39
  month: Date;
40
40
  changed: boolean;
@@ -43,7 +43,7 @@ export declare type State = {
43
43
  visible?: boolean;
44
44
  texts: Texts;
45
45
  };
46
- export declare type Modifier = {
46
+ export type Modifier = {
47
47
  start?: Date;
48
48
  end?: Date;
49
49
  entered?: Date;
@@ -51,7 +51,7 @@ export declare type Modifier = {
51
51
  'entered-end'?: Date;
52
52
  disabled: boolean;
53
53
  };
54
- export declare type Texts = {
54
+ export type Texts = {
55
55
  apply: string | React.ReactNode;
56
56
  now: string | React.ReactNode;
57
57
  inputPlaceholder?: string;
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { DayPickerProps } from './DayPicker.types';
3
- declare const _default: React.ForwardRefExoticComponent<Pick<DayPickerProps, "title" | "canChangeMonth" | "disabledDays" | "showOutsideDays" | "fixedWeeks" | "localeUtils" | "modifiers" | "month" | "onDayClick" | "onDayMouseEnter" | "onDayMouseLeave" | "onMonthChange" | "renderDay" | "selectedDays" | "renderNavbar" | "onMonthNameClick" | "onYearNameClick" | "hideLongPrev" | "hideShortPrev" | "hideShortNext" | "hideLongNext"> & {
4
- forwardedRef?: ((instance: any) => void) | React.RefObject<any> | null | undefined;
3
+ declare const _default: React.ForwardRefExoticComponent<import("react-intl").Omit<DayPickerProps, "intl"> & {
4
+ forwardedRef?: React.Ref<any> | undefined;
5
5
  } & React.RefAttributes<any>> & {
6
6
  WrappedComponent: React.ComponentType<DayPickerProps>;
7
7
  };
@@ -2,7 +2,7 @@ import { IntlShape } from 'react-intl';
2
2
  import * as React from 'react';
3
3
  import { DayModifiers, Modifier, Modifiers } from 'react-day-picker/types/Modifiers';
4
4
  import MomentLocaleUtils from 'react-day-picker/moment';
5
- export declare type DayPickerProps = {
5
+ export type DayPickerProps = {
6
6
  month: Date;
7
7
  onMonthChange?: (month: Date) => void;
8
8
  onMonthNameClick?: () => void;
@@ -1,8 +1,8 @@
1
- export declare type DecadePickerProps = {
1
+ export type DecadePickerProps = {
2
2
  value: Date;
3
3
  onChange: (date: Date) => void;
4
4
  onTitleClick?: () => void;
5
5
  };
6
- export declare type DecadePickerState = {
6
+ export type DecadePickerState = {
7
7
  cursor: Date;
8
8
  };
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { Props } from './Footer.types';
3
- declare const _default: React.ForwardRefExoticComponent<Pick<Props, "text" | "mode" | "canApply" | "onApply" | "canSwitchMode" | "onSwitchMode" | "dateOnly" | "message" | "texts" | "hideNow"> & {
4
- forwardedRef?: ((instance: any) => void) | React.RefObject<any> | null | undefined;
3
+ declare const _default: React.ForwardRefExoticComponent<import("react-intl").Omit<Props, "intl"> & {
4
+ forwardedRef?: React.Ref<any> | undefined;
5
5
  } & React.RefAttributes<any>> & {
6
6
  WrappedComponent: React.ComponentType<Props>;
7
7
  };
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import { WrappedComponentProps } from 'react-intl';
3
3
  import { Texts } from '../../DatePicker.types';
4
- export declare type Props = {
4
+ export type Props = {
5
5
  text?: string;
6
6
  mode: string;
7
7
  dateOnly?: boolean;
@@ -1,11 +1,11 @@
1
1
  import * as React from 'react';
2
- export declare type Cell = {
2
+ export type Cell = {
3
3
  disabled?: boolean;
4
4
  key: React.ReactText;
5
5
  outside: boolean;
6
6
  text: React.ReactText;
7
7
  };
8
- export declare type GridPickerProps = {
8
+ export type GridPickerProps = {
9
9
  selectedKey: React.ReactText | null;
10
10
  cells: Cell[];
11
11
  onCellClick: (key: React.ReactText) => void;
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { MonthPickerProps } from './MonthPicker.types';
3
- declare const _default: React.ForwardRefExoticComponent<Pick<MonthPickerProps, "max" | "min" | "onChange" | "value"> & {
4
- forwardedRef?: ((instance: any) => void) | React.RefObject<any> | null | undefined;
3
+ declare const _default: React.ForwardRefExoticComponent<import("react-intl").Omit<MonthPickerProps, "intl"> & {
4
+ forwardedRef?: React.Ref<any> | undefined;
5
5
  } & React.RefAttributes<any>> & {
6
6
  WrappedComponent: React.ComponentType<MonthPickerProps>;
7
7
  };
@@ -1,12 +1,12 @@
1
1
  import { IntlShape } from 'react-intl';
2
- export declare type MonthPickerProps = {
2
+ export type MonthPickerProps = {
3
3
  min?: Date;
4
4
  max?: Date;
5
5
  value: Date;
6
6
  onChange: (date: Date) => void;
7
7
  intl: IntlShape;
8
8
  };
9
- export declare type MonthPickerState = {
9
+ export type MonthPickerState = {
10
10
  cursor: Date;
11
11
  yearMode: boolean;
12
12
  };
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- export declare type NavbarProps = {
2
+ export type NavbarProps = {
3
3
  title?: React.ReactNode | React.ReactText;
4
4
  hidePrev?: boolean;
5
5
  hideNext?: boolean;
@@ -3,21 +3,9 @@ import { Props as DSInputProps } from '@synerise/ds-input/dist/Input.types';
3
3
  import { InputProps as AntdInputProps } from 'antd/lib/input';
4
4
  export declare const Prefixel: import("styled-components").StyledComponent<"div", any, {}, never>;
5
5
  export declare const Suffixel: import("styled-components").StyledComponent<"div", any, {}, never>;
6
- export declare const Input: import("styled-components").StyledComponent<(import("react").ComponentClass<(object & DSInputProps & AntdInputProps) | (object & DSInputProps & AntdInputProps & {
7
- mask: string;
8
- formatCharacters?: object | undefined;
9
- placeholderChar?: string | undefined;
10
- value?: string | undefined;
11
- }) | (object & DSInputProps & import("antd/lib/input").TextAreaProps), any> & {
6
+ export declare const Input: import("styled-components").StyledComponent<import("react").ComponentType<object & import("@synerise/ds-input").EnhancedProps> & {
12
7
  displayName: string;
13
- }) | (import("react").FunctionComponent<(object & DSInputProps & AntdInputProps) | (object & DSInputProps & import("antd/lib/input").TextAreaProps) | (object & DSInputProps & AntdInputProps & {
14
- mask: string;
15
- formatCharacters?: object | undefined;
16
- placeholderChar?: string | undefined;
17
- value?: string | undefined;
18
- })> & {
19
- displayName: string;
20
- }), any, DSInputProps & AntdInputProps & {
8
+ }, any, DSInputProps & AntdInputProps & {
21
9
  active: boolean;
22
10
  }, never>;
23
11
  export declare const PickerInputWrapper: import("styled-components").StyledComponent<"div", any, {
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { DateToFormatOptions } from '@synerise/ds-data-format';
3
- export declare type Props = {
3
+ export type Props = {
4
4
  autoFocus?: boolean;
5
5
  size?: 'large' | 'default' | 'small';
6
6
  /**
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { TimePickerProps } from './TimePicker.types';
3
2
  declare const TimePicker: ({ value, disabledHours, disabledMinutes, disabledSeconds, inactivePrev, inactiveNext, onChange, onShortNext, onShortPrev, }: TimePickerProps) => JSX.Element;
4
3
  export default TimePicker;
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  export declare const Container: import("styled-components").StyledComponent<"div", any, {}, never>;
3
- export declare const Picker: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<Pick<import("@synerise/ds-time-picker").TimePickerProps, "className" | "onChange" | "placeholder" | "disabled" | "value" | "trigger" | "placement" | "overlayClassName" | "use12HourClock" | "units" | "defaultOpen" | "containerStyle" | "timeFormat" | "valueFormatOptions" | "alwaysOpen" | "dropdownProps" | "inputProps" | "disabledHours" | "disabledMinutes" | "disabledSeconds" | "clearTooltip" | "raw" | "onClockModeChange"> & {
4
- forwardedRef?: import("react").RefObject<any> | ((instance: any) => void) | null | undefined;
3
+ export declare const Picker: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("react-intl").Omit<import("@synerise/ds-time-picker").TimePickerProps, "intl"> & {
4
+ forwardedRef?: import("react").Ref<any> | undefined;
5
5
  } & import("react").RefAttributes<any>> & {
6
6
  WrappedComponent: import("react").ComponentType<import("@synerise/ds-time-picker").TimePickerProps>;
7
7
  }, any, {}, never>;
@@ -1,4 +1,4 @@
1
- export declare type TimePickerProps = {
1
+ export type TimePickerProps = {
2
2
  format?: string;
3
3
  value?: Date;
4
4
  onChange: (date?: Date | undefined) => void;
@@ -1,9 +1,9 @@
1
- export declare type YearPickerProps = {
1
+ export type YearPickerProps = {
2
2
  value: Date;
3
3
  onChange: (date: Date) => void;
4
4
  onTitleClick?: () => void;
5
5
  };
6
- export declare type YearPickerState = {
6
+ export type YearPickerState = {
7
7
  cursor: Date;
8
8
  decadeMode: boolean;
9
9
  };
@@ -186,8 +186,7 @@ var RawDatePicker = /*#__PURE__*/function (_React$Component) {
186
186
  });
187
187
 
188
188
  _defineProperty(_assertThisInitialized(_this), "handleDaySwitch", function (day) {
189
- var disabledDates = _this.props.disabledDates; // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
190
- // @ts-ignore
189
+ var disabledDates = _this.props.disabledDates; // @ts-ignore
191
190
 
192
191
  _this.handleDayClick(day, {
193
192
  disabled: disabledDates ? disabledDates(day) : false
@@ -1,2 +1,2 @@
1
1
  import { Props } from '../DatePicker.types';
2
- export declare type RawDatePickerProps = Omit<Props, 'dropdownProps'>;
2
+ export type RawDatePickerProps = Omit<Props, 'dropdownProps'>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-date-picker",
3
- "version": "0.10.17",
3
+ "version": "0.10.19",
4
4
  "description": "DatePicker UI Component for the Synerise Design System",
5
5
  "license": "ISC",
6
6
  "repository": "Synerise/synerise-design",
@@ -33,16 +33,16 @@
33
33
  "types": "dist/index.d.ts",
34
34
  "dependencies": {
35
35
  "@date-fns/upgrade": "^1.0.3",
36
- "@synerise/ds-button": "^0.18.2",
37
- "@synerise/ds-core": "^0.40.2",
38
- "@synerise/ds-data-format": "^0.4.2",
39
- "@synerise/ds-dropdown": "^0.17.80",
40
- "@synerise/ds-icon": "^0.58.2",
41
- "@synerise/ds-input": "^0.19.2",
42
- "@synerise/ds-time-picker": "^0.8.8",
43
- "@synerise/ds-tooltip": "^0.14.4",
44
- "@synerise/ds-utils": "^0.24.16",
45
- "classnames": "^2.2.6",
36
+ "@synerise/ds-button": "^0.18.3",
37
+ "@synerise/ds-core": "^0.40.3",
38
+ "@synerise/ds-data-format": "^0.4.3",
39
+ "@synerise/ds-dropdown": "^0.17.82",
40
+ "@synerise/ds-icon": "^0.58.3",
41
+ "@synerise/ds-input": "^0.19.3",
42
+ "@synerise/ds-time-picker": "^0.8.10",
43
+ "@synerise/ds-tooltip": "^0.14.5",
44
+ "@synerise/ds-utils": "^0.24.17",
45
+ "classnames": "2.3.2",
46
46
  "date-fns": "2.16.1",
47
47
  "lodash": "^4.17.20",
48
48
  "react-day-picker": "^7.4.8",
@@ -55,5 +55,5 @@
55
55
  "react": ">=16.9.0 < 17.0.0",
56
56
  "styled-components": "5.0.1"
57
57
  },
58
- "gitHead": "f1f520c4c5ef9f90bacb5d5e0b2e778ceb8fdf79"
58
+ "gitHead": "d944339a738211d8f74b27360481aafd7ef51ddd"
59
59
  }