@atlaskit/link-datasource 1.27.1 → 1.27.3

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
@@ -1,5 +1,19 @@
1
1
  # @atlaskit/link-datasource
2
2
 
3
+ ## 1.27.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [#91106](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/91106) [`b6ffa30186b9`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/b6ffa30186b9) - Bump ADF-schema package to version 35.0.0
8
+ - [#91203](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/91203) [`3c8348468618`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/3c8348468618) - Minor Typescript changes to improve compatibility with React 18
9
+ - Updated dependencies
10
+
11
+ ## 1.27.2
12
+
13
+ ### Patch Changes
14
+
15
+ - [#90953](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/90953) [`d1d4bbc1afeb`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/d1d4bbc1afeb) - The change here fixes a bug where basic filter dropdown does not show initial options after menu close.
16
+
3
17
  ## 1.27.1
4
18
 
5
19
  ### Patch Changes
@@ -5,14 +5,28 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.SchemaSelectContainer = exports.FormRowContainer = exports.FormContainer = exports.FieldContainer = void 0;
8
- var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
9
8
  var _styled = _interopRequireDefault(require("@emotion/styled"));
10
- var _templateObject, _templateObject2, _templateObject3, _templateObject4;
11
- var FormRowContainer = exports.FormRowContainer = _styled.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n align-items: center;\n display: flex;\n gap: ", ";\n flex-grow: 1;\n width: 100%;\n"])), function (props) {
12
- return props.isNarrowGap ? "var(--ds-space-100, 8px)" : "var(--ds-space-200, 16px)";
9
+ var FormRowContainer = exports.FormRowContainer = _styled.default.div(function (props) {
10
+ return {
11
+ alignItems: 'center',
12
+ display: 'flex',
13
+ gap: props.isNarrowGap ? "var(--ds-space-100, 8px)" : "var(--ds-space-200, 16px)",
14
+ flexGrow: 1,
15
+ width: '100%'
16
+ };
17
+ });
18
+ var FormContainer = exports.FormContainer = _styled.default.form({
19
+ display: 'grid',
20
+ rowGap: "var(--ds-space-200, 16px)",
21
+ width: '100%'
13
22
  });
14
- var FormContainer = exports.FormContainer = _styled.default.form(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n display: grid;\n row-gap: ", ";\n width: 100%;\n"])), "var(--ds-space-200, 16px)");
15
23
 
16
24
  // Override the top margin of fields
17
- var FieldContainer = exports.FieldContainer = _styled.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n flex: 1;\n margin-top: ", ";\n"])), "var(--ds-space-negative-100, -8px)");
18
- var SchemaSelectContainer = exports.SchemaSelectContainer = _styled.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n width: 100%;\n max-width: 386px;\n"])));
25
+ var FieldContainer = exports.FieldContainer = _styled.default.div({
26
+ flex: 1,
27
+ marginTop: "var(--ds-space-negative-100, -8px)"
28
+ });
29
+ var SchemaSelectContainer = exports.SchemaSelectContainer = _styled.default.div({
30
+ width: '100%',
31
+ maxWidth: '386px'
32
+ });
@@ -124,13 +124,17 @@ var FilterPopupSelect = exports.FilterPopupSelect = function FilterPopupSelect(_
124
124
  */
125
125
  if (searchTerm) {
126
126
  setSearchTerm('');
127
+ onInputChange('', {
128
+ action: 'input-change',
129
+ prevInputValue: searchTerm
130
+ });
127
131
  }
128
132
  onMenuClose === null || onMenuClose === void 0 || onMenuClose();
129
133
  fireEvent('ui.dropdown.closed.basicSearchDropdown', {
130
134
  filterName: filterName,
131
135
  selectionCount: selectedOptions.length
132
136
  });
133
- }, [filterName, fireEvent, onMenuClose, searchTerm, selectedOptions.length]);
137
+ }, [filterName, fireEvent, onInputChange, onMenuClose, searchTerm, selectedOptions.length]);
134
138
  var handleInputChange = (0, _react.useCallback)( /*#__PURE__*/function () {
135
139
  var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(newSearchTerm, actionMeta) {
136
140
  return _regenerator.default.wrap(function _callee$(_context) {
@@ -354,7 +354,7 @@ var PlainConfluenceSearchConfigModal = exports.PlainConfluenceSearchConfigModal
354
354
  var shouldShowResultsCount = !!totalCount && currentViewMode === 'table';
355
355
  var onInsertPressed = (0, _react.useCallback)(function (e, analyticsEvent) {
356
356
  var _insertButtonClickedE;
357
- if (!isParametersSet || !cloudId) {
357
+ if (!isParametersSet || !cloudId || !confluenceSearchUrl) {
358
358
  return;
359
359
  }
360
360
  var insertButtonClickedEvent = analyticsEvent.update({
@@ -400,7 +400,7 @@ var PlainConfluenceSearchConfigModal = exports.PlainConfluenceSearchConfigModal
400
400
  })
401
401
  }
402
402
  }]
403
- }), consumerEvent);
403
+ }, confluenceSearchUrl), consumerEvent);
404
404
  }
405
405
  }, [isParametersSet, cloudId, analyticsPayload, totalCount, currentViewMode, onInsert, confluenceSearchUrl, datasourceId, parameters, visibleColumnKeys, columnCustomSizes, wrappedColumnKeys]);
406
406
  var handleViewModeChange = function handleViewModeChange(selectedMode) {
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.default = void 0;
8
- var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
9
8
  var _react = _interopRequireDefault(require("react"));
10
9
  var _styled = _interopRequireDefault(require("@emotion/styled"));
11
10
  var _ = _interopRequireDefault(require("@atlaskit/icon-object/glyph/bug/16"));
@@ -14,8 +13,11 @@ var _3 = _interopRequireDefault(require("@atlaskit/icon-object/glyph/epic/16"));
14
13
  var _4 = _interopRequireDefault(require("@atlaskit/icon-object/glyph/issue/16"));
15
14
  var _5 = _interopRequireDefault(require("@atlaskit/icon-object/glyph/story/16"));
16
15
  var _6 = _interopRequireDefault(require("@atlaskit/icon-object/glyph/task/16"));
17
- var _templateObject;
18
- var IconWrapper = _styled.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: center;\n justify-content: left;\n"])));
16
+ var IconWrapper = _styled.default.div({
17
+ display: 'flex',
18
+ alignItems: 'center',
19
+ justifyContent: 'left'
20
+ });
19
21
  var _default = exports.default = function _default(_ref) {
20
22
  var type = _ref.type;
21
23
  var TypeIcon = function TypeIcon() {
@@ -5,12 +5,14 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.default = exports.ICON_TYPE_TEST_ID = void 0;
8
- var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
9
8
  var _react = _interopRequireDefault(require("react"));
10
9
  var _styled = _interopRequireDefault(require("@emotion/styled"));
11
10
  var _image = _interopRequireDefault(require("@atlaskit/image"));
12
- var _templateObject;
13
- var IconWrapper = _styled.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: center;\n justify-content: left;\n"])));
11
+ var IconWrapper = _styled.default.div({
12
+ display: 'flex',
13
+ alignItems: 'center',
14
+ justifyContent: 'left'
15
+ });
14
16
  var ICON_TYPE_TEST_ID = exports.ICON_TYPE_TEST_ID = 'link-datasource-render-type--icon';
15
17
  var IconRenderType = function IconRenderType(_ref) {
16
18
  var label = _ref.label,
@@ -1,23 +1,23 @@
1
1
  import styled from '@emotion/styled';
2
- export const FormRowContainer = styled.div`
3
- align-items: center;
4
- display: flex;
5
- gap: ${props => props.isNarrowGap ? "var(--ds-space-100, 8px)" : "var(--ds-space-200, 16px)"};
6
- flex-grow: 1;
7
- width: 100%;
8
- `;
9
- export const FormContainer = styled.form`
10
- display: grid;
11
- row-gap: ${"var(--ds-space-200, 16px)"};
12
- width: 100%;
13
- `;
2
+ export const FormRowContainer = styled.div(props => ({
3
+ alignItems: 'center',
4
+ display: 'flex',
5
+ gap: props.isNarrowGap ? "var(--ds-space-100, 8px)" : "var(--ds-space-200, 16px)",
6
+ flexGrow: 1,
7
+ width: '100%'
8
+ }));
9
+ export const FormContainer = styled.form({
10
+ display: 'grid',
11
+ rowGap: "var(--ds-space-200, 16px)",
12
+ width: '100%'
13
+ });
14
14
 
15
15
  // Override the top margin of fields
16
- export const FieldContainer = styled.div`
17
- flex: 1;
18
- margin-top: ${"var(--ds-space-negative-100, -8px)"};
19
- `;
20
- export const SchemaSelectContainer = styled.div`
21
- width: 100%;
22
- max-width: 386px;
23
- `;
16
+ export const FieldContainer = styled.div({
17
+ flex: 1,
18
+ marginTop: "var(--ds-space-negative-100, -8px)"
19
+ });
20
+ export const SchemaSelectContainer = styled.div({
21
+ width: '100%',
22
+ maxWidth: '386px'
23
+ });
@@ -91,13 +91,17 @@ export const FilterPopupSelect = ({
91
91
  */
92
92
  if (searchTerm) {
93
93
  setSearchTerm('');
94
+ onInputChange('', {
95
+ action: 'input-change',
96
+ prevInputValue: searchTerm
97
+ });
94
98
  }
95
99
  onMenuClose === null || onMenuClose === void 0 ? void 0 : onMenuClose();
96
100
  fireEvent('ui.dropdown.closed.basicSearchDropdown', {
97
101
  filterName,
98
102
  selectionCount: selectedOptions.length
99
103
  });
100
- }, [filterName, fireEvent, onMenuClose, searchTerm, selectedOptions.length]);
104
+ }, [filterName, fireEvent, onInputChange, onMenuClose, searchTerm, selectedOptions.length]);
101
105
  const handleInputChange = useCallback(async (newSearchTerm, actionMeta) => {
102
106
  if (actionMeta.action === 'input-change' && newSearchTerm !== searchTerm) {
103
107
  setSearchTerm(newSearchTerm);
@@ -292,7 +292,7 @@ export const PlainConfluenceSearchConfigModal = props => {
292
292
  const shouldShowResultsCount = !!totalCount && currentViewMode === 'table';
293
293
  const onInsertPressed = useCallback((e, analyticsEvent) => {
294
294
  var _insertButtonClickedE;
295
- if (!isParametersSet || !cloudId) {
295
+ if (!isParametersSet || !cloudId || !confluenceSearchUrl) {
296
296
  return;
297
297
  }
298
298
  const insertButtonClickedEvent = analyticsEvent.update({
@@ -342,7 +342,7 @@ export const PlainConfluenceSearchConfigModal = props => {
342
342
  })
343
343
  }
344
344
  }]
345
- }), consumerEvent);
345
+ }, confluenceSearchUrl), consumerEvent);
346
346
  }
347
347
  }, [isParametersSet, cloudId, analyticsPayload, totalCount, currentViewMode, onInsert, confluenceSearchUrl, datasourceId, parameters, visibleColumnKeys, columnCustomSizes, wrappedColumnKeys]);
348
348
  const handleViewModeChange = selectedMode => {
@@ -6,11 +6,11 @@ import Epic16Icon from '@atlaskit/icon-object/glyph/epic/16';
6
6
  import Issue16Icon from '@atlaskit/icon-object/glyph/issue/16';
7
7
  import Story16Icon from '@atlaskit/icon-object/glyph/story/16';
8
8
  import Task16Icon from '@atlaskit/icon-object/glyph/task/16';
9
- const IconWrapper = styled.div`
10
- display: flex;
11
- align-items: center;
12
- justify-content: left;
13
- `;
9
+ const IconWrapper = styled.div({
10
+ display: 'flex',
11
+ alignItems: 'center',
12
+ justifyContent: 'left'
13
+ });
14
14
  export default (({
15
15
  type
16
16
  }) => {
@@ -1,11 +1,11 @@
1
1
  import React from 'react';
2
2
  import styled from '@emotion/styled';
3
3
  import Image from '@atlaskit/image';
4
- const IconWrapper = styled.div`
5
- display: flex;
6
- align-items: center;
7
- justify-content: left;
8
- `;
4
+ const IconWrapper = styled.div({
5
+ display: 'flex',
6
+ alignItems: 'center',
7
+ justifyContent: 'left'
8
+ });
9
9
  export const ICON_TYPE_TEST_ID = 'link-datasource-render-type--icon';
10
10
  const IconRenderType = ({
11
11
  label,
@@ -1,11 +1,25 @@
1
- import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
- var _templateObject, _templateObject2, _templateObject3, _templateObject4;
3
1
  import styled from '@emotion/styled';
4
- export var FormRowContainer = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n align-items: center;\n display: flex;\n gap: ", ";\n flex-grow: 1;\n width: 100%;\n"])), function (props) {
5
- return props.isNarrowGap ? "var(--ds-space-100, 8px)" : "var(--ds-space-200, 16px)";
2
+ export var FormRowContainer = styled.div(function (props) {
3
+ return {
4
+ alignItems: 'center',
5
+ display: 'flex',
6
+ gap: props.isNarrowGap ? "var(--ds-space-100, 8px)" : "var(--ds-space-200, 16px)",
7
+ flexGrow: 1,
8
+ width: '100%'
9
+ };
10
+ });
11
+ export var FormContainer = styled.form({
12
+ display: 'grid',
13
+ rowGap: "var(--ds-space-200, 16px)",
14
+ width: '100%'
6
15
  });
7
- export var FormContainer = styled.form(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: grid;\n row-gap: ", ";\n width: 100%;\n"])), "var(--ds-space-200, 16px)");
8
16
 
9
17
  // Override the top margin of fields
10
- export var FieldContainer = styled.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n flex: 1;\n margin-top: ", ";\n"])), "var(--ds-space-negative-100, -8px)");
11
- export var SchemaSelectContainer = styled.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n width: 100%;\n max-width: 386px;\n"])));
18
+ export var FieldContainer = styled.div({
19
+ flex: 1,
20
+ marginTop: "var(--ds-space-negative-100, -8px)"
21
+ });
22
+ export var SchemaSelectContainer = styled.div({
23
+ width: '100%',
24
+ maxWidth: '386px'
25
+ });
@@ -114,13 +114,17 @@ export var FilterPopupSelect = function FilterPopupSelect(_ref) {
114
114
  */
115
115
  if (searchTerm) {
116
116
  setSearchTerm('');
117
+ onInputChange('', {
118
+ action: 'input-change',
119
+ prevInputValue: searchTerm
120
+ });
117
121
  }
118
122
  onMenuClose === null || onMenuClose === void 0 || onMenuClose();
119
123
  fireEvent('ui.dropdown.closed.basicSearchDropdown', {
120
124
  filterName: filterName,
121
125
  selectionCount: selectedOptions.length
122
126
  });
123
- }, [filterName, fireEvent, onMenuClose, searchTerm, selectedOptions.length]);
127
+ }, [filterName, fireEvent, onInputChange, onMenuClose, searchTerm, selectedOptions.length]);
124
128
  var handleInputChange = useCallback( /*#__PURE__*/function () {
125
129
  var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(newSearchTerm, actionMeta) {
126
130
  return _regeneratorRuntime.wrap(function _callee$(_context) {
@@ -345,7 +345,7 @@ export var PlainConfluenceSearchConfigModal = function PlainConfluenceSearchConf
345
345
  var shouldShowResultsCount = !!totalCount && currentViewMode === 'table';
346
346
  var onInsertPressed = useCallback(function (e, analyticsEvent) {
347
347
  var _insertButtonClickedE;
348
- if (!isParametersSet || !cloudId) {
348
+ if (!isParametersSet || !cloudId || !confluenceSearchUrl) {
349
349
  return;
350
350
  }
351
351
  var insertButtonClickedEvent = analyticsEvent.update({
@@ -391,7 +391,7 @@ export var PlainConfluenceSearchConfigModal = function PlainConfluenceSearchConf
391
391
  })
392
392
  }
393
393
  }]
394
- }), consumerEvent);
394
+ }, confluenceSearchUrl), consumerEvent);
395
395
  }
396
396
  }, [isParametersSet, cloudId, analyticsPayload, totalCount, currentViewMode, onInsert, confluenceSearchUrl, datasourceId, parameters, visibleColumnKeys, columnCustomSizes, wrappedColumnKeys]);
397
397
  var handleViewModeChange = function handleViewModeChange(selectedMode) {
@@ -1,5 +1,3 @@
1
- import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
- var _templateObject;
3
1
  import React from 'react';
4
2
  import styled from '@emotion/styled';
5
3
  import Bug16Icon from '@atlaskit/icon-object/glyph/bug/16';
@@ -8,7 +6,11 @@ import Epic16Icon from '@atlaskit/icon-object/glyph/epic/16';
8
6
  import Issue16Icon from '@atlaskit/icon-object/glyph/issue/16';
9
7
  import Story16Icon from '@atlaskit/icon-object/glyph/story/16';
10
8
  import Task16Icon from '@atlaskit/icon-object/glyph/task/16';
11
- var IconWrapper = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n justify-content: left;\n"])));
9
+ var IconWrapper = styled.div({
10
+ display: 'flex',
11
+ alignItems: 'center',
12
+ justifyContent: 'left'
13
+ });
12
14
  export default (function (_ref) {
13
15
  var type = _ref.type;
14
16
  var TypeIcon = function TypeIcon() {
@@ -1,9 +1,11 @@
1
- import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
- var _templateObject;
3
1
  import React from 'react';
4
2
  import styled from '@emotion/styled';
5
3
  import Image from '@atlaskit/image';
6
- var IconWrapper = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n justify-content: left;\n"])));
4
+ var IconWrapper = styled.div({
5
+ display: 'flex',
6
+ alignItems: 'center',
7
+ justifyContent: 'left'
8
+ });
7
9
  export var ICON_TYPE_TEST_ID = 'link-datasource-render-type--icon';
8
10
  var IconRenderType = function IconRenderType(_ref) {
9
11
  var label = _ref.label,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/link-datasource",
3
- "version": "1.27.1",
3
+ "version": "1.27.3",
4
4
  "description": "UI Components to support linking platform dataset feature",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -31,7 +31,7 @@
31
31
  "analytics:codegen": "yarn workspace @atlassian/analytics-tooling run analytics:codegen link-datasource --output ./src/analytics/generated"
32
32
  },
33
33
  "dependencies": {
34
- "@atlaskit/adf-schema": "^35.8.0",
34
+ "@atlaskit/adf-schema": "^35.9.0",
35
35
  "@atlaskit/analytics-next": "^9.2.0",
36
36
  "@atlaskit/avatar": "^21.5.0",
37
37
  "@atlaskit/avatar-group": "^9.5.0",
@@ -40,7 +40,7 @@
40
40
  "@atlaskit/dropdown-menu": "^12.8.0",
41
41
  "@atlaskit/editor-prosemirror": "3.0.0",
42
42
  "@atlaskit/empty-state": "^7.7.0",
43
- "@atlaskit/form": "^9.1.0",
43
+ "@atlaskit/form": "^9.2.0",
44
44
  "@atlaskit/heading": "^2.1.0",
45
45
  "@atlaskit/icon": "^22.1.0",
46
46
  "@atlaskit/icon-object": "^6.3.0",
@@ -62,7 +62,7 @@
62
62
  "@atlaskit/pragmatic-drag-and-drop-react-drop-indicator": "^1.1.0",
63
63
  "@atlaskit/primitives": "^5.5.0",
64
64
  "@atlaskit/select": "^17.6.0",
65
- "@atlaskit/smart-card": "^26.55.0",
65
+ "@atlaskit/smart-card": "^26.56.0",
66
66
  "@atlaskit/spinner": "^16.0.0",
67
67
  "@atlaskit/tag": "^12.0.0",
68
68
  "@atlaskit/textfield": "6.1.3",