@synerise/ds-date-range-picker 0.25.5 → 0.26.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,17 @@
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.26.0](https://github.com/Synerise/synerise-design/compare/@synerise/ds-date-range-picker@0.25.5...@synerise/ds-date-range-picker@0.26.0) (2023-12-06)
7
+
8
+
9
+ ### Features
10
+
11
+ * **date-range-picker:** adds getPopupContainer prop ([7d6a1db](https://github.com/Synerise/synerise-design/commit/7d6a1db80ace779e10236aee42e3f702afb7a55c))
12
+
13
+
14
+
15
+
16
+
6
17
  ## [0.25.5](https://github.com/Synerise/synerise-design/compare/@synerise/ds-date-range-picker@0.25.4...@synerise/ds-date-range-picker@0.25.5) (2023-11-16)
7
18
 
8
19
  **Note:** Version bump only for package @synerise/ds-date-range-picker
package/README.md CHANGED
@@ -41,28 +41,29 @@ const value = {
41
41
 
42
42
  ## API
43
43
 
44
- | Property | Description | Type | Default |
45
- | -------------------- | ------------------------------------------------------------------- | -------------------- | ------------------------------------------------------------- |
46
- | disabledDate | Function to specify if particular dates are disabled or not | (date:Date)=>boolean | - |
47
- | disabledDefaultTexts | Disables the default texts translations provided by `react-intl` | boolean | `false` |
48
- | forceAbsolute | Force the outcome to be converted to an absolute date | boolean | `false` |
49
- | format | Format of the value displayed in the footer | string | "MMM D, YYYY" |
50
- | onApply | Callback executed after applying changes | (date:Date)=>void | - |
51
- | ranges | An array containing custom ranges which may be used as a short-hand | DateRange[] | [] |
52
- | popoverProps | Object representing props applied to the Antd Popover component | AntdPopoverProps | {} |
53
- | rangeUnits | Units available in relative range picker | RelativeUnits[] | ['SECONDS','MINUTES','HOURS','DAYS','WEEKS','MONTHS','YEARS'] |
54
- | relativePast | Enable relative filter for past ranges | boolean | `false` |
55
- | relativeFuture | Enable relative filter for future ranges | boolean | `false` |
56
- | showTime | Enable user to choose particular hour | boolean | `false` |
57
- | showNowButton | Include "now" button to select current time (last minue) | boolean | `true` |
58
- | showFilter | Enable range filtering | boolean | `false` |
59
- | showCustomRange | Enable custom range form in relative range picker | boolean | `true` |
60
- | validate | Function to specify if particular date ranges are correct | (date:Date)=>boolean | - |
61
- | value | Value of the picker | DateRange | |
62
- | defaultValue | Default value of the picker (when value is undefined and when user clears input) | DateRange | |
63
- | startAlwaysOnTheLeft | Enable not to move month from left side to right side | boolean | `false` |
64
- | onVisibleChange | Callback executed when popover with dateRangePicker changes its visibility | (visible: boolean) => void | - |
65
- | filterValueSelectionModes | Allowed modes to display in filter | DateLimitMode[] | ["Range", "Hour"] |
44
+ | Property | Description | Type | Default |
45
+ | ------------------------- | -------------------------------------------------------------------------------- | -------------------------- | ------------------------------------------------------------- |
46
+ | disabledDate | Function to specify if particular dates are disabled or not | (date:Date)=>boolean | - |
47
+ | disabledDefaultTexts | Disables the default texts translations provided by `react-intl` | boolean | `false` |
48
+ | forceAbsolute | Force the outcome to be converted to an absolute date | boolean | `false` |
49
+ | format | Format of the value displayed in the footer | string | "MMM D, YYYY" |
50
+ | onApply | Callback executed after applying changes | (date:Date)=>void | - |
51
+ | ranges | An array containing custom ranges which may be used as a short-hand | DateRange[] | [] |
52
+ | popoverProps | Object representing props applied to the Antd Popover component | AntdPopoverProps | {} |
53
+ | rangeUnits | Units available in relative range picker | RelativeUnits[] | ['SECONDS','MINUTES','HOURS','DAYS','WEEKS','MONTHS','YEARS'] |
54
+ | relativePast | Enable relative filter for past ranges | boolean | `false` |
55
+ | relativeFuture | Enable relative filter for future ranges | boolean | `false` |
56
+ | showTime | Enable user to choose particular hour | boolean | `false` |
57
+ | showNowButton | Include "now" button to select current time (last minue) | boolean | `true` |
58
+ | showFilter | Enable range filtering | boolean | `false` |
59
+ | showCustomRange | Enable custom range form in relative range picker | boolean | `true` |
60
+ | validate | Function to specify if particular date ranges are correct | (date:Date)=>boolean | - |
61
+ | value | Value of the picker | DateRange | |
62
+ | defaultValue | Default value of the picker (when value is undefined and when user clears input) | DateRange | |
63
+ | startAlwaysOnTheLeft | Enable not to move month from left side to right side | boolean | `false` |
64
+ | onVisibleChange | Callback executed when popover with dateRangePicker changes its visibility | (visible: boolean) => void | - |
65
+ | filterValueSelectionModes | Allowed modes to display in filter | DateLimitMode[] | ["Range", "Hour"] |
66
+ | getPopupContainer | Function used to set the container of the date range picker. | Function(triggerNode) | `() => document.body` |
66
67
 
67
68
  ### DateRange
68
69
 
@@ -78,4 +79,4 @@ const value = {
78
79
 
79
80
  ### Undocumented props
80
81
 
81
- * min in `MonthlyFilter` - controls minimal amount of entires in monthly filter, disable with `undefined`, default is `1`
82
+ - min in `MonthlyFilter` - controls minimal amount of entires in monthly filter, disable with `undefined`, default is `1`
@@ -36,7 +36,8 @@ var DateRangePicker = function DateRangePicker(props) {
36
36
  return undefined;
37
37
  } : _props$renderPopoverT,
38
38
  _props$readOnly = props.readOnly,
39
- readOnly = _props$readOnly === void 0 ? false : _props$readOnly;
39
+ readOnly = _props$readOnly === void 0 ? false : _props$readOnly,
40
+ getPopupContainer = props.getPopupContainer;
40
41
  var intl = useIntl();
41
42
  var selectedRange = value || defaultValue;
42
43
 
@@ -105,7 +106,9 @@ var DateRangePicker = function DateRangePicker(props) {
105
106
  texts: allTexts,
106
107
  forceAdjacentMonths: forceAdjacentMonths
107
108
  })),
108
- getPopupContainer: function getPopupContainer(node) {
109
+ getPopupContainer: getPopupContainer !== undefined ? function (node) {
110
+ return getPopupContainer(node);
111
+ } : function (node) {
109
112
  return node.parentElement != null ? node.parentElement : document.body;
110
113
  },
111
114
  trigger: "click",
@@ -72,6 +72,7 @@ export interface DateRangePickerProps extends WrappedComponentProps {
72
72
  isTruncateMs?: boolean;
73
73
  filterValueSelectionModes?: DateLimitMode[];
74
74
  filterRangeDisplayMode?: RangeDisplayMode;
75
+ getPopupContainer?: (node: HTMLElement) => HTMLElement;
75
76
  }
76
77
  /**
77
78
  * @deprecated use `DateRangePickerProps`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-date-range-picker",
3
- "version": "0.25.5",
3
+ "version": "0.26.0",
4
4
  "description": "Date-Range-Picker UI Component for the Synerise Design System",
5
5
  "license": "ISC",
6
6
  "repository": "Synerise/synerise-design",
@@ -34,24 +34,24 @@
34
34
  "types": "dist/index.d.ts",
35
35
  "dependencies": {
36
36
  "@date-fns/upgrade": "^1.0.3",
37
- "@synerise/ds-badge": "^0.6.43",
37
+ "@synerise/ds-badge": "^0.6.44",
38
38
  "@synerise/ds-button": "^0.18.7",
39
39
  "@synerise/ds-button-group": "^0.6.35",
40
40
  "@synerise/ds-data-format": "^0.4.4",
41
- "@synerise/ds-date-picker": "^0.10.26",
42
- "@synerise/ds-dropdown": "^0.17.88",
41
+ "@synerise/ds-date-picker": "^0.10.27",
42
+ "@synerise/ds-dropdown": "^0.17.89",
43
43
  "@synerise/ds-icon": "^0.58.7",
44
- "@synerise/ds-inline-edit": "^0.6.88",
45
- "@synerise/ds-input": "^0.19.9",
46
- "@synerise/ds-input-number": "^0.8.30",
47
- "@synerise/ds-manageable-list": "^0.26.18",
48
- "@synerise/ds-menu": "^0.18.5",
44
+ "@synerise/ds-inline-edit": "^0.6.89",
45
+ "@synerise/ds-input": "^0.19.10",
46
+ "@synerise/ds-input-number": "^0.8.31",
47
+ "@synerise/ds-manageable-list": "^0.26.19",
48
+ "@synerise/ds-menu": "^0.18.6",
49
49
  "@synerise/ds-scrollbar": "^0.6.13",
50
- "@synerise/ds-select": "^0.15.27",
51
- "@synerise/ds-slider": "^0.13.6",
52
- "@synerise/ds-tags": "^0.8.22",
53
- "@synerise/ds-time-picker": "^0.9.5",
54
- "@synerise/ds-tooltip": "^0.14.10",
50
+ "@synerise/ds-select": "^0.15.28",
51
+ "@synerise/ds-slider": "^0.13.7",
52
+ "@synerise/ds-tags": "^0.8.23",
53
+ "@synerise/ds-time-picker": "^0.9.6",
54
+ "@synerise/ds-tooltip": "^0.14.11",
55
55
  "@synerise/ds-utils": "^0.24.21",
56
56
  "date-fns": "^2.16.1",
57
57
  "dayjs": "^1.8.35",
@@ -73,5 +73,5 @@
73
73
  "@testing-library/user-event": "^10.3.1",
74
74
  "@types/ramda": "^0.28.23"
75
75
  },
76
- "gitHead": "7c20a32482f03300c9a6c6cd3c644d307371bb0d"
76
+ "gitHead": "b5c243a1f88351e9bc0185d35fc35ea3673dab89"
77
77
  }