@synerise/ds-date-range-picker 0.24.9 → 0.25.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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,28 @@
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.25.0](https://github.com/Synerise/synerise-design/compare/@synerise/ds-date-range-picker@0.24.10...@synerise/ds-date-range-picker@0.25.0) (2023-10-17)
7
+
8
+
9
+ ### Features
10
+
11
+ * **date-range-picker:** display errors in daily / weekly / monthly scheduler ([1bc8695](https://github.com/Synerise/synerise-design/commit/1bc8695af46628b30492fb247a2ddbe5785711b0))
12
+
13
+
14
+
15
+
16
+
17
+ ## [0.24.10](https://github.com/Synerise/synerise-design/compare/@synerise/ds-date-range-picker@0.24.9...@synerise/ds-date-range-picker@0.24.10) (2023-10-11)
18
+
19
+
20
+ ### Bug Fixes
21
+
22
+ * **date-range-picker:** fixed onchange in weekly scheduler ([118fb4f](https://github.com/Synerise/synerise-design/commit/118fb4f2aed37309989a471f129919f920ed2271))
23
+
24
+
25
+
26
+
27
+
6
28
  ## [0.24.9](https://github.com/Synerise/synerise-design/compare/@synerise/ds-date-range-picker@0.24.8...@synerise/ds-date-range-picker@0.24.9) (2023-10-06)
7
29
 
8
30
  **Note:** Version bump only for package @synerise/ds-date-range-picker
@@ -1,4 +1,3 @@
1
- import * as React from 'react';
2
1
  import { DailyProps } from './Daily.types';
3
- declare const Daily: React.FC<DailyProps>;
2
+ declare const Daily: ({ maxEntries, disabled, value, onChange, valueSelectionMode, timeFormat, timePickerProps, errorTexts, }: DailyProps) => JSX.Element;
4
3
  export default Daily;
@@ -4,8 +4,8 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
4
4
 
5
5
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
6
 
7
- import * as React from 'react';
8
- import * as dayjs from 'dayjs';
7
+ import React, { useMemo, useCallback } from 'react';
8
+ import dayjs from 'dayjs';
9
9
  import { useIntl } from 'react-intl';
10
10
  import { DEFAULT_RANGE_END, DEFAULT_RANGE_START, DEFAULT_TIME_FORMAT, DEFAULT_MAX_ENTRIES, NOOP, EMPTY_OBJECT, RENDER_EMPTY_NODE_FN } from '../constants';
11
11
  import * as S from '../../../RangeFilter.styles';
@@ -23,9 +23,11 @@ var Daily = function Daily(_ref) {
23
23
  _ref$valueSelectionMo = _ref.valueSelectionMode,
24
24
  valueSelectionMode = _ref$valueSelectionMo === void 0 ? ['Hour', 'Range'] : _ref$valueSelectionMo,
25
25
  timeFormat = _ref.timeFormat,
26
- timePickerProps = _ref.timePickerProps;
26
+ timePickerProps = _ref.timePickerProps,
27
+ _ref$errorTexts = _ref.errorTexts,
28
+ errorTexts = _ref$errorTexts === void 0 ? [] : _ref$errorTexts;
27
29
  var intl = useIntl();
28
- var defaultDayValue = React.useMemo(function () {
30
+ var defaultDayValue = useMemo(function () {
29
31
  return {
30
32
  start: DEFAULT_RANGE_START,
31
33
  stop: DEFAULT_RANGE_END,
@@ -35,7 +37,7 @@ var Daily = function Daily(_ref) {
35
37
  mode: valueSelectionMode[0]
36
38
  };
37
39
  }, [valueSelectionMode]);
38
- var handleDayTimeChange = React.useCallback(function (dateValueArray, index) {
40
+ var handleDayTimeChange = useCallback(function (dateValueArray, index) {
39
41
  var updatedSchedule = value;
40
42
  updatedSchedule[index] = _objectSpread({}, value[index], {
41
43
  restricted: true,
@@ -43,9 +45,10 @@ var Daily = function Daily(_ref) {
43
45
  stop: dayjs(dateValueArray[1]).format(DEFAULT_TIME_FORMAT),
44
46
  inverted: Boolean(dateValueArray[2])
45
47
  });
46
- }, [value]);
48
+ onChange([].concat(updatedSchedule));
49
+ }, [value, onChange]);
47
50
 
48
- var _getDayValue = React.useCallback(function (index) {
51
+ var _getDayValue = useCallback(function (index) {
49
52
  if (typeof index === 'number' && !!value[index]) {
50
53
  return value[index];
51
54
  }
@@ -53,20 +56,20 @@ var Daily = function Daily(_ref) {
53
56
  return defaultDayValue;
54
57
  }, [value, defaultDayValue]);
55
58
 
56
- var handleModeChange = React.useCallback(function (selectedMode, elementIndex) {
59
+ var handleModeChange = useCallback(function (selectedMode, elementIndex) {
57
60
  var updatedSchedule = value;
58
61
  updatedSchedule[elementIndex] = _objectSpread({}, value[elementIndex], {
59
62
  mode: selectedMode
60
63
  });
61
64
  }, [value]);
62
- var handleRangeDelete = React.useCallback(function (index) {
65
+ var handleRangeDelete = useCallback(function (index) {
63
66
  var updatedSchedule = value;
64
67
  delete updatedSchedule[index];
65
68
  onChange(updatedSchedule.filter(function (s) {
66
69
  return Boolean(s);
67
70
  }));
68
71
  }, [value, onChange]);
69
- var handleRangeAdd = React.useCallback(function () {
72
+ var handleRangeAdd = useCallback(function () {
70
73
  onChange([].concat(value, [_getDayValue()]));
71
74
  }, [onChange, value, _getDayValue]);
72
75
  return /*#__PURE__*/React.createElement(S.NewFilterContainer, null, !!value && value.map(function (s, index) {
@@ -74,6 +77,7 @@ var Daily = function Daily(_ref) {
74
77
  disabled: disabled,
75
78
  days: EMPTY_OBJECT,
76
79
  onChange: NOOP,
80
+ errorTexts: errorTexts[index],
77
81
  onMultipleDayTimeChange: NOOP // eslint-disable-next-line react/no-array-index-key
78
82
  ,
79
83
  key: "range-" + index + "-" + String(s == null ? void 0 : s.start),
@@ -2,10 +2,12 @@ import { FilterBaseProps } from '../Filters.types';
2
2
  import { DateLimitMode } from '../../../Shared/TimeWindow/RangeFormContainer/RangeForm/RangeForm.types';
3
3
  import { DayOptions } from '../../../Shared/TimeWindow/TimeWindow.types';
4
4
  import { WithDisabledProp } from '../../../RangeFilter.types';
5
+ import { FilterErrorType } from '../../../Shared/TimeWindow/RangeFormContainer/RangeFormContainer.types';
5
6
  export type DailySchedule = DayOptions & {
6
7
  mode: DateLimitMode;
7
8
  };
8
9
  export type DailyProps = {
9
10
  value: DailySchedule[];
11
+ errorTexts?: FilterErrorType[];
10
12
  onChange: (value: DailyProps['value']) => void;
11
13
  } & FilterBaseProps & WithDisabledProp;
@@ -1,4 +1,3 @@
1
- import * as React from 'react';
2
1
  import { MonthlyProps } from './Monthly.types';
3
- declare const Monthly: React.FC<MonthlyProps>;
2
+ declare const Monthly: ({ maxEntries, valueSelectionMode, onChange, timeFormat, valueFormatOptions, value, timePickerProps, disabled, periodType, countedFrom, errorTexts, }: MonthlyProps) => JSX.Element;
4
3
  export default Monthly;
@@ -8,7 +8,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
8
8
 
9
9
  import * as React from 'react';
10
10
  import { useIntl } from 'react-intl';
11
- import * as dayjs from 'dayjs';
11
+ import dayjs from 'dayjs';
12
12
  import { v4 as uuid } from 'uuid';
13
13
  import { useDataFormat } from '@synerise/ds-data-format';
14
14
  import RangeFormContainer from '../../../Shared/TimeWindow/RangeFormContainer/RangeFormContainer';
@@ -37,7 +37,8 @@ var Monthly = function Monthly(_ref) {
37
37
  _ref$periodType = _ref.periodType,
38
38
  periodType = _ref$periodType === void 0 ? DAYS_OF_PERIOD_ENUM.DAY_OF_MONTH : _ref$periodType,
39
39
  _ref$countedFrom = _ref.countedFrom,
40
- countedFrom = _ref$countedFrom === void 0 ? COUNTED_FROM_ENUM.BEGINNING : _ref$countedFrom;
40
+ countedFrom = _ref$countedFrom === void 0 ? COUNTED_FROM_ENUM.BEGINNING : _ref$countedFrom,
41
+ errorTexts = _ref.errorTexts;
41
42
  var defaultDayValue = React.useMemo(function () {
42
43
  return {
43
44
  start: DEFAULT_RANGE_START,
@@ -304,6 +305,11 @@ var Monthly = function Monthly(_ref) {
304
305
  var canAddRange = canAddAnotherRange(value, activeDays, maxEntries);
305
306
  var isAnyDaySelected = activeDays.length > 0;
306
307
  var shouldRenderAddButton = isAnyDaySelected && filteredSchedule.length < maxEntries && canAddRange && !disabled;
308
+
309
+ var getErrorTextsForFormRow = function getErrorTextsForFormRow(guid) {
310
+ return activeDays.length === 1 && errorTexts && errorTexts[guid] && errorTexts[guid][activeDays[0]];
311
+ };
312
+
307
313
  return /*#__PURE__*/React.createElement(S.NewFilterContainer, {
308
314
  ref: ref
309
315
  }, /*#__PURE__*/React.createElement(Grid, _extends({
@@ -323,6 +329,7 @@ var Monthly = function Monthly(_ref) {
323
329
  }, getGridSettings())), isAnyDaySelected && filteredSchedule.map(function (guid, index) {
324
330
  return /*#__PURE__*/React.createElement(RangeFormContainer, {
325
331
  days: EMPTY_OBJECT,
332
+ errorTexts: getErrorTextsForFormRow(guid),
326
333
  onChange: NOOP,
327
334
  key: "value-range-" + guid,
328
335
  onDayTimeChange: function onDayTimeChange(dayValue, dayKey) {
@@ -3,6 +3,7 @@ import { DayOptions } from '../../../Shared/TimeWindow/TimeWindow.types';
3
3
  import { DateLimitMode } from '../../../Shared/TimeWindow/RangeFormContainer/RangeForm/RangeForm.types';
4
4
  import { FilterBaseProps } from '../Filters.types';
5
5
  import { WithDisabledProp } from '../../../RangeFilter.types';
6
+ import { FilterErrorType } from '../../../Shared/TimeWindow/RangeFormContainer/RangeFormContainer.types';
6
7
  export type MonthlyScheduleDayValue = DayOptions & {
7
8
  mode: DateLimitMode;
8
9
  };
@@ -12,6 +13,9 @@ export type MonthlySchedule = {
12
13
  export type DayOfMonthIndex = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31;
13
14
  export type MonthlyProps = {
14
15
  value: MonthlySchedule;
16
+ errorTexts?: {
17
+ [guid: string]: FilterErrorType[];
18
+ };
15
19
  periodType: DAYS_OF_PERIOD_ENUM;
16
20
  countedFrom: COUNTED_FROM_ENUM;
17
21
  onChange: (value: MonthlyProps['value']) => void;
@@ -1,4 +1,3 @@
1
- import * as React from 'react';
2
1
  import { WeeklyProps } from './Weekly.types';
3
- declare const Weekly: React.FC<WeeklyProps>;
2
+ declare const Weekly: ({ maxEntries, valueSelectionMode, onChange, timeFormat, valueFormatOptions, value, timePickerProps, disabled, errorTexts, }: WeeklyProps) => JSX.Element;
4
3
  export default Weekly;
@@ -30,7 +30,8 @@ var Weekly = function Weekly(_ref) {
30
30
  valueFormatOptions = _ref.valueFormatOptions,
31
31
  value = _ref.value,
32
32
  timePickerProps = _ref.timePickerProps,
33
- disabled = _ref.disabled;
33
+ disabled = _ref.disabled,
34
+ errorTexts = _ref.errorTexts;
34
35
  var defaultDayValue = React.useMemo(function () {
35
36
  return {
36
37
  start: DEFAULT_RANGE_START,
@@ -239,6 +240,11 @@ var Weekly = function Weekly(_ref) {
239
240
  var canAddRange = canAddAnotherRange(value, activeDays, maxEntries);
240
241
  var isAnyDaySelected = activeDays.length > 0;
241
242
  var shouldRenderAddButton = isAnyDaySelected && filteredSchedule.length < maxEntries && canAddRange && !disabled;
243
+
244
+ var getErrorTextsForFormRow = function getErrorTextsForFormRow(guid) {
245
+ return activeDays.length === 1 && errorTexts && errorTexts[guid] && errorTexts[guid][activeDays[0]];
246
+ };
247
+
242
248
  return /*#__PURE__*/React.createElement(S.NewFilterContainer, {
243
249
  ref: ref
244
250
  }, /*#__PURE__*/React.createElement(Grid, {
@@ -258,6 +264,7 @@ var Weekly = function Weekly(_ref) {
258
264
  return /*#__PURE__*/React.createElement(RangeFormContainer, {
259
265
  days: EMPTY_OBJECT,
260
266
  onChange: NOOP,
267
+ errorTexts: getErrorTextsForFormRow(guid),
261
268
  key: "value-range-" + guid,
262
269
  onDayTimeChange: function onDayTimeChange(dayValue, dayKey) {
263
270
  handleDayTimeChange(dayValue, dayKey, guid);
@@ -2,6 +2,7 @@ import { DayOptions } from '../../../Shared/TimeWindow/TimeWindow.types';
2
2
  import { DateLimitMode } from '../../../Shared/TimeWindow/RangeFormContainer/RangeForm/RangeForm.types';
3
3
  import { FilterBaseProps } from '../Filters.types';
4
4
  import { WithDisabledProp } from '../../../RangeFilter.types';
5
+ import { FilterErrorType } from '../../../Shared/TimeWindow/RangeFormContainer/RangeFormContainer.types';
5
6
  export type WeeklyScheduleDayValue = DayOptions & {
6
7
  mode: DateLimitMode;
7
8
  };
@@ -11,5 +12,8 @@ export type WeeklySchedule = {
11
12
  export type DayOfWeekIndex = 0 | 1 | 2 | 3 | 4 | 5 | 6;
12
13
  export type WeeklyProps = {
13
14
  value: WeeklySchedule;
15
+ errorTexts?: {
16
+ [guid: string]: FilterErrorType[];
17
+ };
14
18
  onChange: (value: WeeklyProps['value']) => void;
15
19
  } & FilterBaseProps & WithDisabledProp;
@@ -1,5 +1,5 @@
1
1
  import { RangeFormProps } from './RangeForm.types';
2
2
  import { FORM_MODES, RANGE_FORM_INTL_KEYS } from './RangeForm.constants';
3
3
  export { FORM_MODES, RANGE_FORM_INTL_KEYS };
4
- declare const RangeForm: ({ onModeChange, disabled, startDate, endDate, onStartChange, onEndChange, onExactHourSelect, onRangeDelete, valueSelectionModes, mode, rangeDisplayMode, isInvertedRange, timePickerProps, texts, valueFormatOptions, }: RangeFormProps) => JSX.Element;
4
+ declare const RangeForm: ({ onModeChange, disabled, startDate, endDate, onStartChange, onEndChange, onExactHourSelect, onRangeDelete, valueSelectionModes, mode, rangeDisplayMode, isInvertedRange, timePickerProps, texts, valueFormatOptions, errorTexts, }: RangeFormProps) => JSX.Element;
5
5
  export default RangeForm;
@@ -34,7 +34,8 @@ var RangeForm = function RangeForm(_ref) {
34
34
  isInvertedRange = _ref.isInvertedRange,
35
35
  timePickerProps = _ref.timePickerProps,
36
36
  texts = _ref.texts,
37
- valueFormatOptions = _ref.valueFormatOptions;
37
+ valueFormatOptions = _ref.valueFormatOptions,
38
+ errorTexts = _ref.errorTexts;
38
39
 
39
40
  var _useDataFormat = useDataFormat(),
40
41
  is12HoursClock = _useDataFormat.is12HoursClock;
@@ -71,8 +72,12 @@ var RangeForm = function RangeForm(_ref) {
71
72
  return node.parentElement != null ? node.parentElement : document.body;
72
73
  };
73
74
 
75
+ var errorForFirstItem = (errorTexts == null ? void 0 : errorTexts.length) && errorTexts[0];
76
+ var errorForSecondItem = (errorTexts == null ? void 0 : errorTexts.length) && errorTexts[1];
77
+
74
78
  var singleHourPicker = function singleHourPicker() {
75
79
  return /*#__PURE__*/React.createElement(TimePicker, _extends({
80
+ errorText: errorForFirstItem,
76
81
  disabled: disabled,
77
82
  clearTooltip: texts == null ? void 0 : texts.clear,
78
83
  onChange: function onChange(date) {
@@ -144,6 +149,7 @@ var RangeForm = function RangeForm(_ref) {
144
149
 
145
150
  var renderRangePicker = function renderRangePicker() {
146
151
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(TimePicker, _extends({
152
+ errorText: errorForFirstItem,
147
153
  disabled: disabled,
148
154
  clearTooltip: texts == null ? void 0 : texts.clear,
149
155
  onChange: function onChange(date) {
@@ -160,6 +166,7 @@ var RangeForm = function RangeForm(_ref) {
160
166
  use12HourClock: is12HoursClock,
161
167
  valueFormatOptions: valueFormatOptions
162
168
  }, timePickerProps)), /*#__PURE__*/React.createElement(S.Separator, null, "-"), /*#__PURE__*/React.createElement(TimePicker, _extends({
169
+ errorText: errorForSecondItem,
163
170
  disabled: disabled,
164
171
  clearTooltip: texts == null ? void 0 : texts.clear,
165
172
  onChange: function onChange(date) {
@@ -1,4 +1,4 @@
1
- import * as React from 'react';
1
+ import { ReactNode } from 'react';
2
2
  import { WithTranslations } from '../../../../../DateRangePicker.types';
3
3
  import { RangeFormContainerProps } from '../RangeFormContainer.types';
4
4
  import { WithDisabledProp } from '../../../../RangeFilter.types';
@@ -7,7 +7,7 @@ export type RangeDisplayMode = 'timepicker' | 'slider';
7
7
  export type RangeFormProps = {
8
8
  mode: DateLimitMode;
9
9
  onModeChange: (mode: DateLimitMode) => void;
10
- title?: React.ReactNode;
10
+ title?: ReactNode;
11
11
  startDate: Date | undefined;
12
12
  endDate: Date | undefined;
13
13
  onStartChange: (value?: Date) => void;
@@ -17,8 +17,8 @@ export type RangeFormProps = {
17
17
  valueSelectionModes: DateLimitMode[];
18
18
  rangeDisplayMode?: RangeDisplayMode;
19
19
  isInvertedRange?: boolean;
20
- } & WithTranslations & WithDisabledProp & Pick<RangeFormContainerProps, 'timePickerProps' | 'valueFormatOptions'>;
20
+ } & WithTranslations & WithDisabledProp & Pick<RangeFormContainerProps, 'timePickerProps' | 'valueFormatOptions' | 'errorTexts'>;
21
21
  export type RangeFormTexts = {
22
- range: React.ReactNode | string;
23
- hour: React.ReactNode | string;
22
+ range: ReactNode | string;
23
+ hour: ReactNode | string;
24
24
  };
@@ -1,3 +1,3 @@
1
1
  import type { RangeFormContainerProps } from './RangeFormContainer.types';
2
- declare const RangeFormContainer: ({ activeDays, disabled, days, dayKeys, getDayValue, getDayLabel, onDayTimeChange, onMultipleDayTimeChange, hideHeader, headerOptions, monthlyFilter, monthlyFilterPeriod, onRangeClear, onRangePaste, onRangeCopy, onRangeDelete, texts, onChange, valueSelectionModes, rangeDisplayMode, onModeChange, timePickerProps, renderSuffix, timeFormat, valueFormatOptions, }: RangeFormContainerProps) => JSX.Element;
2
+ declare const RangeFormContainer: ({ errorTexts, activeDays, disabled, days, dayKeys, getDayValue, getDayLabel, onDayTimeChange, onMultipleDayTimeChange, hideHeader, headerOptions, monthlyFilter, monthlyFilterPeriod, onRangeClear, onRangePaste, onRangeCopy, onRangeDelete, texts, onChange, valueSelectionModes, rangeDisplayMode, onModeChange, timePickerProps, renderSuffix, timeFormat, valueFormatOptions, }: RangeFormContainerProps) => JSX.Element;
3
3
  export default RangeFormContainer;
@@ -16,7 +16,8 @@ import { DEFAULT_LIMIT_MODE } from '../TimeWindow';
16
16
  import * as S from './RangeFormContainer.styles';
17
17
 
18
18
  var RangeFormContainer = function RangeFormContainer(_ref) {
19
- var activeDays = _ref.activeDays,
19
+ var errorTexts = _ref.errorTexts,
20
+ activeDays = _ref.activeDays,
20
21
  disabled = _ref.disabled,
21
22
  days = _ref.days,
22
23
  dayKeys = _ref.dayKeys,
@@ -115,6 +116,7 @@ var RangeFormContainer = function RangeFormContainer(_ref) {
115
116
  return /*#__PURE__*/React.createElement(RangeForm, {
116
117
  disabled: disabled,
117
118
  texts: texts,
119
+ errorTexts: errorTexts,
118
120
  onModeChange: function onModeChange(selected) {
119
121
  setMode(selected);
120
122
  handleModeChange(selected);
@@ -132,7 +134,7 @@ var RangeFormContainer = function RangeFormContainer(_ref) {
132
134
  rangeDisplayMode: rangeDisplayMode,
133
135
  isInvertedRange: Boolean(dayValue == null ? void 0 : dayValue.inverted)
134
136
  });
135
- }, [timeFormat, rangeDisplayMode, valueSelectionModes, handleModeChange, mode, disabled, dayValue, onRangeDelete, texts, timePickerProps, onStartChange, onEndChange, onExactHourSelect, valueFormatOptions]);
137
+ }, [disabled, texts, errorTexts, mode, dayValue.start, dayValue.stop, dayValue == null ? void 0 : dayValue.inverted, timeFormat, onStartChange, onEndChange, onExactHourSelect, onRangeDelete, valueSelectionModes, valueFormatOptions, timePickerProps, rangeDisplayMode, handleModeChange]);
136
138
  var invertedToggleLink = React.useMemo(function () {
137
139
  return /*#__PURE__*/React.createElement(S.InvertAction, {
138
140
  onClick: toggleInverted
@@ -1,14 +1,16 @@
1
- import * as React from 'react';
1
+ import { ReactNode } from 'react';
2
2
  import type { TimePickerProps } from '@synerise/ds-time-picker';
3
3
  import type { DateToFormatOptions } from '@synerise/ds-data-format';
4
4
  import { DayKey, RangeActions, TimeWindowProps, TimeWindowTexts } from '../TimeWindow.types';
5
5
  import { FilterDefinition, WithDisabledProp } from '../../../RangeFilter.types';
6
6
  import { DateLimitMode, RangeDisplayMode } from './RangeForm/RangeForm.types';
7
7
  export type DateValue = [Date | undefined, Date | undefined, boolean | undefined];
8
+ export type FilterErrorType = [ReactNode?, ReactNode?];
8
9
  export type RangeFormContainerProps = {
10
+ errorTexts?: FilterErrorType;
9
11
  activeDays: DayKey[];
10
12
  dayKeys: DayKey | DayKey[];
11
- getDayLabel: (dayKey: DayKey, long?: boolean) => string | object | React.ReactNode;
13
+ getDayLabel: (dayKey: DayKey, long?: boolean) => string | object | ReactNode;
12
14
  getDayValue: (dayKey: DayKey) => Partial<FilterDefinition>;
13
15
  onMultipleDayTimeChange: (value: DateValue) => void;
14
16
  onDayTimeChange: (value: DateValue, dayKey: DayKey) => void;
@@ -23,5 +25,5 @@ export type RangeFormContainerProps = {
23
25
  timeFormat?: string;
24
26
  valueFormatOptions?: DateToFormatOptions;
25
27
  timePickerProps?: Partial<TimePickerProps>;
26
- renderSuffix?: () => React.ReactNode;
28
+ renderSuffix?: () => ReactNode;
27
29
  } & Pick<TimeWindowProps, 'monthlyFilter' | 'monthlyFilterPeriod' | 'hideHeader' | 'headerOptions' | 'onChange' | 'days'> & WithDisabledProp & Partial<RangeActions>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-date-range-picker",
3
- "version": "0.24.9",
3
+ "version": "0.25.0",
4
4
  "description": "Date-Range-Picker UI Component for the Synerise Design System",
5
5
  "license": "ISC",
6
6
  "repository": "Synerise/synerise-design",
@@ -21,6 +21,7 @@
21
21
  "build:js": "babel --root-mode upward src --out-dir dist --extensions '.js,.ts,.tsx'",
22
22
  "build:watch": "npm run build:js -- --watch",
23
23
  "defs": "tsc --declaration --outDir dist/ --emitDeclarationOnly",
24
+ "pack:ci": "npm pack --pack-destination ../../portal/storybook-static/static",
24
25
  "prepublish": "npm run build",
25
26
  "test": "jest",
26
27
  "test:watch": "npm run test -- --watchAll",
@@ -33,25 +34,25 @@
33
34
  "types": "dist/index.d.ts",
34
35
  "dependencies": {
35
36
  "@date-fns/upgrade": "^1.0.3",
36
- "@synerise/ds-badge": "^0.6.38",
37
- "@synerise/ds-button": "^0.18.3",
38
- "@synerise/ds-button-group": "^0.6.31",
39
- "@synerise/ds-data-format": "^0.4.3",
40
- "@synerise/ds-date-picker": "^0.10.19",
41
- "@synerise/ds-dropdown": "^0.17.82",
42
- "@synerise/ds-icon": "^0.58.3",
43
- "@synerise/ds-inline-edit": "^0.6.82",
44
- "@synerise/ds-input": "^0.19.3",
45
- "@synerise/ds-input-number": "^0.8.25",
46
- "@synerise/ds-manageable-list": "^0.26.12",
47
- "@synerise/ds-menu": "^0.18.0",
48
- "@synerise/ds-scrollbar": "^0.6.8",
49
- "@synerise/ds-select": "^0.15.21",
50
- "@synerise/ds-slider": "^0.13.0",
51
- "@synerise/ds-tags": "^0.8.16",
52
- "@synerise/ds-time-picker": "^0.8.10",
53
- "@synerise/ds-tooltip": "^0.14.5",
54
- "@synerise/ds-utils": "^0.24.17",
37
+ "@synerise/ds-badge": "^0.6.39",
38
+ "@synerise/ds-button": "^0.18.4",
39
+ "@synerise/ds-button-group": "^0.6.32",
40
+ "@synerise/ds-data-format": "^0.4.4",
41
+ "@synerise/ds-date-picker": "^0.10.21",
42
+ "@synerise/ds-dropdown": "^0.17.83",
43
+ "@synerise/ds-icon": "^0.58.4",
44
+ "@synerise/ds-inline-edit": "^0.6.83",
45
+ "@synerise/ds-input": "^0.19.4",
46
+ "@synerise/ds-input-number": "^0.8.26",
47
+ "@synerise/ds-manageable-list": "^0.26.13",
48
+ "@synerise/ds-menu": "^0.18.1",
49
+ "@synerise/ds-scrollbar": "^0.6.9",
50
+ "@synerise/ds-select": "^0.15.22",
51
+ "@synerise/ds-slider": "^0.13.1",
52
+ "@synerise/ds-tags": "^0.8.17",
53
+ "@synerise/ds-time-picker": "^0.9.0",
54
+ "@synerise/ds-tooltip": "^0.14.6",
55
+ "@synerise/ds-utils": "^0.24.18",
55
56
  "date-fns": "^2.16.1",
56
57
  "dayjs": "^1.8.35",
57
58
  "lodash": "^4.17.20",
@@ -72,5 +73,5 @@
72
73
  "@testing-library/user-event": "^10.3.1",
73
74
  "@types/ramda": "^0.28.23"
74
75
  },
75
- "gitHead": "d944339a738211d8f74b27360481aafd7ef51ddd"
76
+ "gitHead": "02f0a1dad6df5acf89b3d3defa6993716ba992fb"
76
77
  }