@atlaskit/link-datasource 4.11.11 → 4.11.12
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 +9 -0
- package/dist/cjs/ui/confluence-search-modal/basic-filters/filters/date-range-picker/index.js +3 -0
- package/dist/cjs/ui/issue-like-table/draggable-table-heading.js +9 -5
- package/dist/es2019/ui/confluence-search-modal/basic-filters/filters/date-range-picker/index.js +3 -0
- package/dist/es2019/ui/issue-like-table/draggable-table-heading.js +7 -5
- package/dist/esm/ui/confluence-search-modal/basic-filters/filters/date-range-picker/index.js +3 -0
- package/dist/esm/ui/issue-like-table/draggable-table-heading.js +9 -5
- package/package.json +6 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @atlaskit/link-datasource
|
|
2
2
|
|
|
3
|
+
## 4.11.12
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#170021](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/170021)
|
|
8
|
+
[`d47d7358771ff`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d47d7358771ff) -
|
|
9
|
+
[ux] Adds a property shouldShowCalenderButton on DatePicker behind fg
|
|
10
|
+
platform_linking_set_should_show_calender_button
|
|
11
|
+
|
|
3
12
|
## 4.11.11
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
package/dist/cjs/ui/confluence-search-modal/basic-filters/filters/date-range-picker/index.js
CHANGED
|
@@ -17,6 +17,7 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
|
|
|
17
17
|
var _reactIntlNext = require("react-intl-next");
|
|
18
18
|
var _datetimePicker = require("@atlaskit/datetime-picker");
|
|
19
19
|
var _error = _interopRequireDefault(require("@atlaskit/icon/core/migration/error"));
|
|
20
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
20
21
|
var _popup = _interopRequireDefault(require("@atlaskit/popup"));
|
|
21
22
|
var _colors = require("@atlaskit/theme/colors");
|
|
22
23
|
var _constants = require("@atlaskit/theme/constants");
|
|
@@ -203,6 +204,7 @@ var DateRangePicker = exports.DateRangePicker = function DateRangePicker(_ref6)
|
|
|
203
204
|
}
|
|
204
205
|
}, (0, _utils.getDropdownLabel)(option, formatMessage));
|
|
205
206
|
}), isPickerOpen && isCustomSelected && /*#__PURE__*/_react.default.createElement(CustomDateWrapper, null, /*#__PURE__*/_react.default.createElement(DatePickersWrapper, null, /*#__PURE__*/_react.default.createElement(_datetimePicker.DatePicker, {
|
|
207
|
+
shouldShowCalendarButton: (0, _platformFeatureFlags.fg)('platform_linking_set_should_show_calender_button'),
|
|
206
208
|
maxDate: todayDate,
|
|
207
209
|
innerProps: {
|
|
208
210
|
style: {
|
|
@@ -226,6 +228,7 @@ var DateRangePicker = exports.DateRangePicker = function DateRangePicker(_ref6)
|
|
|
226
228
|
}
|
|
227
229
|
}
|
|
228
230
|
}), /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, _messages.dateRangeMessages.dateRangeToLabel), /*#__PURE__*/_react.default.createElement(_datetimePicker.DatePicker, {
|
|
231
|
+
shouldShowCalendarButton: (0, _platformFeatureFlags.fg)('platform_linking_set_should_show_calender_button'),
|
|
229
232
|
maxDate: todayDate,
|
|
230
233
|
innerProps: {
|
|
231
234
|
style: {
|
|
@@ -20,8 +20,8 @@ var _reactIntlNext = require("react-intl-next");
|
|
|
20
20
|
var _tinyInvariant = _interopRequireDefault(require("tiny-invariant"));
|
|
21
21
|
var _new = _interopRequireDefault(require("@atlaskit/button/new"));
|
|
22
22
|
var _dropdownMenu = _interopRequireWildcard(require("@atlaskit/dropdown-menu"));
|
|
23
|
-
var _chevronDown = _interopRequireDefault(require("@atlaskit/icon/
|
|
24
|
-
var _chevronUp = _interopRequireDefault(require("@atlaskit/icon/
|
|
23
|
+
var _chevronDown = _interopRequireDefault(require("@atlaskit/icon/core/migration/chevron-down"));
|
|
24
|
+
var _chevronUp = _interopRequireDefault(require("@atlaskit/icon/core/migration/chevron-up"));
|
|
25
25
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
26
26
|
var _closestEdge = require("@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge");
|
|
27
27
|
var _box = require("@atlaskit/pragmatic-drag-and-drop-react-drop-indicator/box");
|
|
@@ -292,7 +292,7 @@ var DraggableTableHeading = exports.DraggableTableHeading = function DraggableTa
|
|
|
292
292
|
// We make assumption thus that there is enough width for chevron.
|
|
293
293
|
var isWideEnoughToHaveChevron = !width || width > 76;
|
|
294
294
|
var shouldShowTriggerIcon = (buttonHovered || isDropdownOpen) && isWideEnoughToHaveChevron;
|
|
295
|
-
var
|
|
295
|
+
var TriggerIcon = (0, _react.useMemo)(function () {
|
|
296
296
|
return shouldShowTriggerIcon ? isDropdownOpen ? _chevronUp.default : _chevronDown.default : isWideEnoughToHaveChevron ? _customIcons.GlyphPlaceholder : undefined;
|
|
297
297
|
}, [shouldShowTriggerIcon, isDropdownOpen, isWideEnoughToHaveChevron]);
|
|
298
298
|
var getTriggerButton = (0, _react.useCallback)(function (_ref0) {
|
|
@@ -301,7 +301,11 @@ var DraggableTableHeading = exports.DraggableTableHeading = function DraggableTa
|
|
|
301
301
|
return /*#__PURE__*/React.createElement(_new.default, (0, _extends2.default)({}, props, {
|
|
302
302
|
testId: "".concat(id, "-column-dropdown"),
|
|
303
303
|
shouldFitContainer: true,
|
|
304
|
-
iconAfter:
|
|
304
|
+
iconAfter: TriggerIcon ? function (iconProps) {
|
|
305
|
+
return /*#__PURE__*/React.createElement(TriggerIcon, (0, _extends2.default)({}, iconProps, {
|
|
306
|
+
size: "small"
|
|
307
|
+
}));
|
|
308
|
+
} : undefined,
|
|
305
309
|
ref: triggerRef,
|
|
306
310
|
appearance: "subtle",
|
|
307
311
|
spacing: "compact",
|
|
@@ -312,7 +316,7 @@ var DraggableTableHeading = exports.DraggableTableHeading = function DraggableTa
|
|
|
312
316
|
return setButtonHovered(false);
|
|
313
317
|
}
|
|
314
318
|
}), children);
|
|
315
|
-
}, [children, id,
|
|
319
|
+
}, [children, id, TriggerIcon]);
|
|
316
320
|
var onDropdownOpenChange = (0, _react.useCallback)(function (_ref1) {
|
|
317
321
|
var isOpen = _ref1.isOpen;
|
|
318
322
|
return setIsDropdownOpen(isOpen);
|
package/dist/es2019/ui/confluence-search-modal/basic-filters/filters/date-range-picker/index.js
CHANGED
|
@@ -7,6 +7,7 @@ import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
|
|
7
7
|
import { FormattedMessage, useIntl } from 'react-intl-next';
|
|
8
8
|
import { DatePicker } from '@atlaskit/datetime-picker';
|
|
9
9
|
import ErrorIcon from '@atlaskit/icon/core/migration/error';
|
|
10
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
11
|
import Popup from '@atlaskit/popup';
|
|
11
12
|
import { N0, N20, N30, R400 } from '@atlaskit/theme/colors';
|
|
12
13
|
import { layers } from '@atlaskit/theme/constants';
|
|
@@ -171,6 +172,7 @@ export const DateRangePicker = ({
|
|
|
171
172
|
isSelected: selectedValue ? option === selectedValue : option === defaultOptionValue,
|
|
172
173
|
onClick: () => handleClickFilterOption(option)
|
|
173
174
|
}, getDropdownLabel(option, formatMessage))), isPickerOpen && isCustomSelected && /*#__PURE__*/React.createElement(CustomDateWrapper, null, /*#__PURE__*/React.createElement(DatePickersWrapper, null, /*#__PURE__*/React.createElement(DatePicker, {
|
|
175
|
+
shouldShowCalendarButton: fg('platform_linking_set_should_show_calender_button'),
|
|
174
176
|
maxDate: todayDate,
|
|
175
177
|
innerProps: {
|
|
176
178
|
style: {
|
|
@@ -193,6 +195,7 @@ export const DateRangePicker = ({
|
|
|
193
195
|
}
|
|
194
196
|
}
|
|
195
197
|
}), /*#__PURE__*/React.createElement(FormattedMessage, dateRangeMessages.dateRangeToLabel), /*#__PURE__*/React.createElement(DatePicker, {
|
|
198
|
+
shouldShowCalendarButton: fg('platform_linking_set_should_show_calender_button'),
|
|
196
199
|
maxDate: todayDate,
|
|
197
200
|
innerProps: {
|
|
198
201
|
style: {
|
|
@@ -12,8 +12,8 @@ import { FormattedMessage } from 'react-intl-next';
|
|
|
12
12
|
import invariant from 'tiny-invariant';
|
|
13
13
|
import Button from '@atlaskit/button/new';
|
|
14
14
|
import DropdownMenu, { DropdownItem } from '@atlaskit/dropdown-menu';
|
|
15
|
-
import ChevronDown from '@atlaskit/icon/
|
|
16
|
-
import ChevronUp from '@atlaskit/icon/
|
|
15
|
+
import ChevronDown from '@atlaskit/icon/core/migration/chevron-down';
|
|
16
|
+
import ChevronUp from '@atlaskit/icon/core/migration/chevron-up';
|
|
17
17
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
18
18
|
import { attachClosestEdge, extractClosestEdge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge';
|
|
19
19
|
import { DropIndicator } from '@atlaskit/pragmatic-drag-and-drop-react-drop-indicator/box';
|
|
@@ -271,7 +271,7 @@ export const DraggableTableHeading = ({
|
|
|
271
271
|
// We make assumption thus that there is enough width for chevron.
|
|
272
272
|
const isWideEnoughToHaveChevron = !width || width > 76;
|
|
273
273
|
const shouldShowTriggerIcon = (buttonHovered || isDropdownOpen) && isWideEnoughToHaveChevron;
|
|
274
|
-
const
|
|
274
|
+
const TriggerIcon = useMemo(() => shouldShowTriggerIcon ? isDropdownOpen ? ChevronUp : ChevronDown : isWideEnoughToHaveChevron ? GlyphPlaceholder : undefined, [shouldShowTriggerIcon, isDropdownOpen, isWideEnoughToHaveChevron]);
|
|
275
275
|
const getTriggerButton = useCallback(({
|
|
276
276
|
triggerRef,
|
|
277
277
|
...props
|
|
@@ -279,14 +279,16 @@ export const DraggableTableHeading = ({
|
|
|
279
279
|
return /*#__PURE__*/React.createElement(Button, _extends({}, props, {
|
|
280
280
|
testId: `${id}-column-dropdown`,
|
|
281
281
|
shouldFitContainer: true,
|
|
282
|
-
iconAfter:
|
|
282
|
+
iconAfter: TriggerIcon ? iconProps => /*#__PURE__*/React.createElement(TriggerIcon, _extends({}, iconProps, {
|
|
283
|
+
size: "small"
|
|
284
|
+
})) : undefined,
|
|
283
285
|
ref: triggerRef,
|
|
284
286
|
appearance: "subtle",
|
|
285
287
|
spacing: "compact",
|
|
286
288
|
onMouseEnter: () => setButtonHovered(true),
|
|
287
289
|
onMouseLeave: () => setButtonHovered(false)
|
|
288
290
|
}), children);
|
|
289
|
-
}, [children, id,
|
|
291
|
+
}, [children, id, TriggerIcon]);
|
|
290
292
|
const onDropdownOpenChange = useCallback(({
|
|
291
293
|
isOpen
|
|
292
294
|
}) => setIsDropdownOpen(isOpen), []);
|
package/dist/esm/ui/confluence-search-modal/basic-filters/filters/date-range-picker/index.js
CHANGED
|
@@ -17,6 +17,7 @@ import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
|
|
17
17
|
import { FormattedMessage, useIntl } from 'react-intl-next';
|
|
18
18
|
import { DatePicker } from '@atlaskit/datetime-picker';
|
|
19
19
|
import ErrorIcon from '@atlaskit/icon/core/migration/error';
|
|
20
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
20
21
|
import Popup from '@atlaskit/popup';
|
|
21
22
|
import { N0, N20, N30, R400 } from '@atlaskit/theme/colors';
|
|
22
23
|
import { layers } from '@atlaskit/theme/constants';
|
|
@@ -196,6 +197,7 @@ export var DateRangePicker = function DateRangePicker(_ref6) {
|
|
|
196
197
|
}
|
|
197
198
|
}, getDropdownLabel(option, formatMessage));
|
|
198
199
|
}), isPickerOpen && isCustomSelected && /*#__PURE__*/React.createElement(CustomDateWrapper, null, /*#__PURE__*/React.createElement(DatePickersWrapper, null, /*#__PURE__*/React.createElement(DatePicker, {
|
|
200
|
+
shouldShowCalendarButton: fg('platform_linking_set_should_show_calender_button'),
|
|
199
201
|
maxDate: todayDate,
|
|
200
202
|
innerProps: {
|
|
201
203
|
style: {
|
|
@@ -219,6 +221,7 @@ export var DateRangePicker = function DateRangePicker(_ref6) {
|
|
|
219
221
|
}
|
|
220
222
|
}
|
|
221
223
|
}), /*#__PURE__*/React.createElement(FormattedMessage, dateRangeMessages.dateRangeToLabel), /*#__PURE__*/React.createElement(DatePicker, {
|
|
224
|
+
shouldShowCalendarButton: fg('platform_linking_set_should_show_calender_button'),
|
|
222
225
|
maxDate: todayDate,
|
|
223
226
|
innerProps: {
|
|
224
227
|
style: {
|
|
@@ -20,8 +20,8 @@ import { FormattedMessage } from 'react-intl-next';
|
|
|
20
20
|
import invariant from 'tiny-invariant';
|
|
21
21
|
import Button from '@atlaskit/button/new';
|
|
22
22
|
import DropdownMenu, { DropdownItem } from '@atlaskit/dropdown-menu';
|
|
23
|
-
import ChevronDown from '@atlaskit/icon/
|
|
24
|
-
import ChevronUp from '@atlaskit/icon/
|
|
23
|
+
import ChevronDown from '@atlaskit/icon/core/migration/chevron-down';
|
|
24
|
+
import ChevronUp from '@atlaskit/icon/core/migration/chevron-up';
|
|
25
25
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
26
26
|
import { attachClosestEdge, extractClosestEdge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge';
|
|
27
27
|
import { DropIndicator } from '@atlaskit/pragmatic-drag-and-drop-react-drop-indicator/box';
|
|
@@ -286,7 +286,7 @@ export var DraggableTableHeading = function DraggableTableHeading(_ref3) {
|
|
|
286
286
|
// We make assumption thus that there is enough width for chevron.
|
|
287
287
|
var isWideEnoughToHaveChevron = !width || width > 76;
|
|
288
288
|
var shouldShowTriggerIcon = (buttonHovered || isDropdownOpen) && isWideEnoughToHaveChevron;
|
|
289
|
-
var
|
|
289
|
+
var TriggerIcon = useMemo(function () {
|
|
290
290
|
return shouldShowTriggerIcon ? isDropdownOpen ? ChevronUp : ChevronDown : isWideEnoughToHaveChevron ? GlyphPlaceholder : undefined;
|
|
291
291
|
}, [shouldShowTriggerIcon, isDropdownOpen, isWideEnoughToHaveChevron]);
|
|
292
292
|
var getTriggerButton = useCallback(function (_ref0) {
|
|
@@ -295,7 +295,11 @@ export var DraggableTableHeading = function DraggableTableHeading(_ref3) {
|
|
|
295
295
|
return /*#__PURE__*/React.createElement(Button, _extends({}, props, {
|
|
296
296
|
testId: "".concat(id, "-column-dropdown"),
|
|
297
297
|
shouldFitContainer: true,
|
|
298
|
-
iconAfter:
|
|
298
|
+
iconAfter: TriggerIcon ? function (iconProps) {
|
|
299
|
+
return /*#__PURE__*/React.createElement(TriggerIcon, _extends({}, iconProps, {
|
|
300
|
+
size: "small"
|
|
301
|
+
}));
|
|
302
|
+
} : undefined,
|
|
299
303
|
ref: triggerRef,
|
|
300
304
|
appearance: "subtle",
|
|
301
305
|
spacing: "compact",
|
|
@@ -306,7 +310,7 @@ export var DraggableTableHeading = function DraggableTableHeading(_ref3) {
|
|
|
306
310
|
return setButtonHovered(false);
|
|
307
311
|
}
|
|
308
312
|
}), children);
|
|
309
|
-
}, [children, id,
|
|
313
|
+
}, [children, id, TriggerIcon]);
|
|
310
314
|
var onDropdownOpenChange = useCallback(function (_ref1) {
|
|
311
315
|
var isOpen = _ref1.isOpen;
|
|
312
316
|
return setIsDropdownOpen(isOpen);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/link-datasource",
|
|
3
|
-
"version": "4.11.
|
|
3
|
+
"version": "4.11.12",
|
|
4
4
|
"description": "UI Components to support linking platform dataset feature",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -78,14 +78,14 @@
|
|
|
78
78
|
"@atlaskit/primitives": "^14.8.0",
|
|
79
79
|
"@atlaskit/react-select": "^2.7.0",
|
|
80
80
|
"@atlaskit/select": "^20.7.0",
|
|
81
|
-
"@atlaskit/smart-card": "^38.
|
|
81
|
+
"@atlaskit/smart-card": "^38.9.0",
|
|
82
82
|
"@atlaskit/smart-user-picker": "^8.0.0",
|
|
83
83
|
"@atlaskit/spinner": "^18.0.0",
|
|
84
84
|
"@atlaskit/tag": "^14.0.0",
|
|
85
85
|
"@atlaskit/temp-nav-app-icons": "^0.8.0",
|
|
86
86
|
"@atlaskit/textfield": "^8.0.0",
|
|
87
87
|
"@atlaskit/theme": "^18.0.0",
|
|
88
|
-
"@atlaskit/tokens": "^5.
|
|
88
|
+
"@atlaskit/tokens": "^5.2.0",
|
|
89
89
|
"@atlaskit/tooltip": "^20.3.0",
|
|
90
90
|
"@atlaskit/ufo": "^0.4.0",
|
|
91
91
|
"@atlaskit/width-detector": "^5.0.0",
|
|
@@ -200,6 +200,9 @@
|
|
|
200
200
|
},
|
|
201
201
|
"should-render-to-parent-should-be-true-linking-pla": {
|
|
202
202
|
"type": "boolean"
|
|
203
|
+
},
|
|
204
|
+
"platform_linking_set_should_show_calender_button": {
|
|
205
|
+
"type": "boolean"
|
|
203
206
|
}
|
|
204
207
|
},
|
|
205
208
|
"compassUnitTestMetricSourceId": "ari:cloud:compass:a436116f-02ce-4520-8fbb-7301462a1674:metric-source/c5751cc6-3513-4070-9deb-af31e86aed34/9c893299-a527-4457-9b46-f3bc4c828766"
|