@datarobot/design-system 29.7.5 → 29.7.6

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.
@@ -1539,7 +1539,7 @@ export type InitialDirection = ValueOf<typeof INITIAL_DIRECTION>;
1539
1539
  export type DateRangePickerProps = {
1540
1540
  onUpdate: (updatedStart: Moment, updatedEnd: Moment) => void;
1541
1541
  validateOnClick?: ValidateOnClick;
1542
- validateOnChange: ValidateOnChange;
1542
+ validateOnChange?: ValidateOnChange;
1543
1543
  start: Moment;
1544
1544
  end: Moment;
1545
1545
  minStart?: Moment;
@@ -1629,12 +1629,12 @@ export type DateRangePickerPanelProps = {
1629
1629
  timeFormat: string | boolean;
1630
1630
  utcSuffix?: string;
1631
1631
  validateOnClick?: ValidateOnClick;
1632
- validateOnChange: ValidateOnChange;
1632
+ validateOnChange?: ValidateOnChange;
1633
1633
  dateStartInputAriaLabel: string;
1634
1634
  dateEndInputAriaLabel: string;
1635
1635
  };
1636
1636
  /** Represents the panel used to select two datetimes that make up a range. */
1637
- function DateRangePickerPanel({ buttonText, cancelButtonText, dateFormat, defaultEnd, defaultStart, initialDirection, initialViewMode, initialTargetInput, maxEnd, minStart, sameDateError, onSubmit, onDismiss, resetText, timeFormat, utcSuffix, validateOnClick: propValidateOnClick, validateOnChange, dateStartInputAriaLabel, dateEndInputAriaLabel, }: DateRangePickerPanelProps): import("react/jsx-runtime").JSX.Element;
1637
+ function DateRangePickerPanel({ buttonText, cancelButtonText, dateFormat, defaultEnd, defaultStart, initialDirection, initialViewMode, initialTargetInput, maxEnd, minStart, sameDateError, onSubmit, onDismiss, resetText, timeFormat, utcSuffix, validateOnClick: propValidateOnClick, validateOnChange: propValidateOnChange, dateStartInputAriaLabel, dateEndInputAriaLabel, }: DateRangePickerPanelProps): import("react/jsx-runtime").JSX.Element;
1638
1638
  export default DateRangePickerPanel;
1639
1639
 
1640
1640
  export function useValidateOnClick(): ({ start, end, minStart, maxEnd, viewMode, dateTimeFormat, sameDateError, }: {
@@ -1658,6 +1658,14 @@ export function useValidateOnClick(): ({ start, end, minStart, maxEnd, viewMode,
1658
1658
  END_AFTER_MAX?: string | undefined;
1659
1659
  };
1660
1660
  };
1661
+ /** Checks whether a string can be strictly parsed as a moment object following a provided datetime format
1662
+ *
1663
+ * @param {string} proposedDateTime
1664
+ * @param {string} dateTimeFormat
1665
+ * @returns {boolean}
1666
+ */
1667
+ export function isValidDateTime(proposedDateTime: string, dateTimeFormat: string): boolean;
1668
+ export function useGetDateTimeValidityError(): (dateTime: string, dateTimeFormat: string) => string | undefined;
1661
1669
  export interface StringToMomentParams {
1662
1670
  dateTimeFormat?: string;
1663
1671
  strictParse?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datarobot/design-system",
3
- "version": "29.7.5",
3
+ "version": "29.7.6",
4
4
  "description": "DataRobot react components library",
5
5
  "scripts": {
6
6
  "build": "node ../../tools/build-lib.js",