@skedulo/sked-ui 21.9.2 → 21.10.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,5 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { ReactDatePickerProps } from 'react-datepicker';
3
+ import { DateFormats } from '../../utils/config-utils';
3
4
  import { RangeType } from '../calendar-controls/elements/RangePicker';
4
5
  export type LocaleType = 'AU' | 'US' | 'UK';
5
6
  type CustomInputType = React.InputHTMLAttributes<HTMLInputElement> & {
@@ -50,9 +51,13 @@ export interface DatepickerProps {
50
51
  */
51
52
  placeholderText?: string;
52
53
  /**
53
- * The format of the date to display
54
+ * The format of the date to display. Custom date-fns format string
54
55
  */
55
56
  dateFormat?: string;
57
+ /**
58
+ * If provided, the 'dateFormat' prop will be ignored and the format from 'dateFormatPreference' will be used instead.
59
+ */
60
+ dateFormatPreference?: DateFormats;
56
61
  /**
57
62
  * Any additional styling to add to the datepicker
58
63
  */
@@ -100,6 +100,7 @@ export declare class LegacyInfoWindow extends React.PureComponent<ILegacyInfoWin
100
100
  private _cursorPosition;
101
101
  private _triggerRect;
102
102
  private _root;
103
+ private _timeoutId;
103
104
  constructor(props: ILegacyInfoWindowProps);
104
105
  componentDidMount(): void;
105
106
  componentDidUpdate(oldProps: ILegacyInfoWindowProps): void;
@@ -145,7 +146,6 @@ export declare class LegacyInfoWindow extends React.PureComponent<ILegacyInfoWin
145
146
  };
146
147
  removeRenderingContainer(): void;
147
148
  createRenderContainer(): HTMLDivElement;
148
- createRenderRoot(): void;
149
149
  /**
150
150
  * The first render wont be positioned properly since we don't have the width/height to calculate the position.
151
151
  * `runStyleRender` runs a second render when we have the contentContainer rendered to calculate the position.