@atlaskit/link-datasource 7.5.2 → 7.5.4
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 +20 -0
- package/compass.yml +1 -1
- package/dist/cjs/ui/assets-modal/search-container/index.js +13 -2
- package/dist/cjs/ui/assets-modal/search-container/object-schema-select/index.js +5 -1
- package/dist/cjs/ui/issue-like-table/edit-type/icon/index.js +2 -4
- package/dist/cjs/ui/issue-like-table/edit-type/inline-edit-layer/index.js +49 -0
- package/dist/cjs/ui/issue-like-table/edit-type/status/index.js +2 -4
- package/dist/cjs/ui/issue-like-table/edit-type/text/index.js +2 -4
- package/dist/cjs/ui/issue-like-table/edit-type/user/index.js +2 -4
- package/dist/es2019/ui/assets-modal/search-container/index.js +13 -2
- package/dist/es2019/ui/assets-modal/search-container/object-schema-select/index.js +7 -1
- package/dist/es2019/ui/issue-like-table/edit-type/icon/index.js +2 -4
- package/dist/es2019/ui/issue-like-table/edit-type/inline-edit-layer/index.js +43 -0
- package/dist/es2019/ui/issue-like-table/edit-type/status/index.js +2 -4
- package/dist/es2019/ui/issue-like-table/edit-type/text/index.js +2 -4
- package/dist/es2019/ui/issue-like-table/edit-type/user/index.js +2 -4
- package/dist/esm/ui/assets-modal/search-container/index.js +13 -2
- package/dist/esm/ui/assets-modal/search-container/object-schema-select/index.js +5 -1
- package/dist/esm/ui/issue-like-table/edit-type/icon/index.js +2 -4
- package/dist/esm/ui/issue-like-table/edit-type/inline-edit-layer/index.js +42 -0
- package/dist/esm/ui/issue-like-table/edit-type/status/index.js +2 -4
- package/dist/esm/ui/issue-like-table/edit-type/text/index.js +2 -4
- package/dist/esm/ui/issue-like-table/edit-type/user/index.js +2 -4
- package/dist/types/ui/assets-modal/search-container/index.d.ts +1 -1
- package/dist/types/ui/assets-modal/search-container/object-schema-select/index.d.ts +3 -2
- package/dist/types/ui/issue-like-table/edit-type/inline-edit-layer/index.d.ts +7 -0
- package/package.json +14 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @atlaskit/link-datasource
|
|
2
2
|
|
|
3
|
+
## 7.5.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`007cec4e0b312`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/007cec4e0b312) -
|
|
8
|
+
Assets config modal: selecting an object schema now populates the AQL input with objectSchema =
|
|
9
|
+
"<schema name>" and runs the search immediately, so the schema's objects are shown without the
|
|
10
|
+
user having to type a query first. Any existing AQL is replaced when the schema changes. Behind
|
|
11
|
+
platform_lp_sllv_assets_default_schema_aql.
|
|
12
|
+
|
|
13
|
+
## 7.5.3
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- [`0cc2e73141eea`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0cc2e73141eea) -
|
|
18
|
+
Behind the `platform-dst-top-layer` feature gate, no longer uses `@atlaskit/layering`. Open
|
|
19
|
+
overlays are found with the `@atlaskit/top-layer/page-surface` entry points instead
|
|
20
|
+
(`platform-dst-top-layer-tooltip` for tooltip). Behaviour with the gate off is unchanged.
|
|
21
|
+
- Updated dependencies
|
|
22
|
+
|
|
3
23
|
## 7.5.2
|
|
4
24
|
|
|
5
25
|
### Patch Changes
|
package/compass.yml
CHANGED
|
@@ -27,7 +27,7 @@ links:
|
|
|
27
27
|
url: https://opsj.atlassian.net/jira/ops/teams/62c5672c-3754-4ebe-8a0f-4d1c87ded5b5/on-call
|
|
28
28
|
- name: Slack Channel
|
|
29
29
|
type: CHAT_CHANNEL
|
|
30
|
-
url: https://atlassian.enterprise.slack.com/archives/C09LKUEEPGT #
|
|
30
|
+
url: https://atlassian.enterprise.slack.com/archives/C09LKUEEPGT #rovo-growth
|
|
31
31
|
- name: Link Datasource
|
|
32
32
|
type: REPOSITORY
|
|
33
33
|
url: https://bitbucket.org/atlassian/atlassian-frontend-monorepo/src/master/platform/packages/linking-platform/link-datasource
|
|
@@ -15,8 +15,10 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
15
15
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
16
16
|
var _form = _interopRequireDefault(require("@atlaskit/form/form"));
|
|
17
17
|
var _closeButton = require("@atlaskit/modal-dialog/close-button");
|
|
18
|
+
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
18
19
|
var _flex = require("@atlaskit/primitives/compiled/flex");
|
|
19
20
|
var _analytics = require("../../../analytics");
|
|
21
|
+
var _types = require("../../../types/assets/types");
|
|
20
22
|
var _aqlSearchInput = require("./aql-search-input");
|
|
21
23
|
var _objectSchemaSelect = require("./object-schema-select");
|
|
22
24
|
var _styled = require("./styled");
|
|
@@ -66,7 +68,15 @@ var AssetsSearchContainer = exports.AssetsSearchContainer = function AssetsSearc
|
|
|
66
68
|
onSubmit: onFormSubmit
|
|
67
69
|
}, function (_ref2) {
|
|
68
70
|
var _initialSearchData$ob, _initialSearchData$ob2, _initialSearchData$aq;
|
|
69
|
-
var formProps = _ref2.formProps
|
|
71
|
+
var formProps = _ref2.formProps,
|
|
72
|
+
setFieldValue = _ref2.setFieldValue;
|
|
73
|
+
var onSchemaChange = function onSchemaChange(schema) {
|
|
74
|
+
if ((0, _fg.fg)('platform_lp_sllv_assets_default_schema_aql')) {
|
|
75
|
+
var defaultAql = "objectSchema = \"".concat(schema.label, "\"");
|
|
76
|
+
setFieldValue(_types.aqlKey, defaultAql);
|
|
77
|
+
onSearch(defaultAql, schema.value);
|
|
78
|
+
}
|
|
79
|
+
};
|
|
70
80
|
return /*#__PURE__*/React.createElement(FormContainer, (0, _extends2.default)({}, formProps, {
|
|
71
81
|
id: SEARCH_FORM_ID
|
|
72
82
|
}), /*#__PURE__*/React.createElement(_styled.FormRowContainer, {
|
|
@@ -86,7 +96,8 @@ var AssetsSearchContainer = exports.AssetsSearchContainer = function AssetsSearc
|
|
|
86
96
|
value: (_initialSearchData$ob = initialSearchData.objectSchema) !== null && _initialSearchData$ob !== void 0 ? _initialSearchData$ob : undefined,
|
|
87
97
|
workspaceId: workspaceId,
|
|
88
98
|
initialObjectSchemas: (_initialSearchData$ob2 = initialSearchData.objectSchemas) !== null && _initialSearchData$ob2 !== void 0 ? _initialSearchData$ob2 : undefined,
|
|
89
|
-
classNamePrefix: "assets-datasource-modal--object-schema-select"
|
|
99
|
+
classNamePrefix: "assets-datasource-modal--object-schema-select",
|
|
100
|
+
onSchemaChange: onSchemaChange
|
|
90
101
|
})))), /*#__PURE__*/React.createElement(_styled.FormRowContainer, null, /*#__PURE__*/React.createElement(_aqlSearchInput.AqlSearchInput, {
|
|
91
102
|
value: (_initialSearchData$aq = initialSearchData.aql) !== null && _initialSearchData$aq !== void 0 ? _initialSearchData$aq : DEFAULT_AQL_QUERY,
|
|
92
103
|
workspaceId: workspaceId,
|
|
@@ -74,6 +74,7 @@ var AssetsObjectSchemaSelect = exports.AssetsObjectSchemaSelect = function Asset
|
|
|
74
74
|
var value = _ref2.value,
|
|
75
75
|
workspaceId = _ref2.workspaceId,
|
|
76
76
|
initialObjectSchemas = _ref2.initialObjectSchemas,
|
|
77
|
+
onSchemaChange = _ref2.onSchemaChange,
|
|
77
78
|
_ref2$classNamePrefix = _ref2.classNamePrefix,
|
|
78
79
|
_classNamePrefix = _ref2$classNamePrefix === void 0 ? 'assets-datasource-modal--object-schema-select' : _ref2$classNamePrefix,
|
|
79
80
|
_ref2$testId = _ref2.testId,
|
|
@@ -185,7 +186,10 @@ var AssetsObjectSchemaSelect = exports.AssetsObjectSchemaSelect = function Asset
|
|
|
185
186
|
options: options,
|
|
186
187
|
placeholder: formatMessage(_messages.objectSchemaSelectMessages.placeholder),
|
|
187
188
|
onChange: function onChange(newOption) {
|
|
188
|
-
|
|
189
|
+
if (newOption) {
|
|
190
|
+
_onChange(newOption);
|
|
191
|
+
onSchemaChange === null || onSchemaChange === void 0 || onSchemaChange(newOption);
|
|
192
|
+
}
|
|
189
193
|
},
|
|
190
194
|
inputValue: searchTerm,
|
|
191
195
|
onInputChange: handleInputChange,
|
|
@@ -8,7 +8,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
exports.default = void 0;
|
|
9
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
-
var _layering = require("@atlaskit/layering/layering");
|
|
12
11
|
var _default2 = _interopRequireDefault(require("@atlaskit/select/default"));
|
|
13
12
|
var _Tooltip = _interopRequireDefault(require("@atlaskit/tooltip/Tooltip"));
|
|
14
13
|
var _failUfoExperience = require("../../../../analytics/ufoExperiences/failUfoExperience");
|
|
@@ -18,6 +17,7 @@ var _useLoadOptions2 = require("../../../../hooks/useLoadOptions");
|
|
|
18
17
|
var _getCleanedSelectProps = require("../../get-cleaned-select-props");
|
|
19
18
|
var _icon = require("../../shared-components/icon");
|
|
20
19
|
var _inlineEdit = require("../../table-cell-content/inline-edit");
|
|
20
|
+
var _inlineEditLayer = require("../inline-edit-layer");
|
|
21
21
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
22
22
|
var IconEditType = function IconEditType(props) {
|
|
23
23
|
var _currentValue$values;
|
|
@@ -45,9 +45,7 @@ var IconEditType = function IconEditType(props) {
|
|
|
45
45
|
}, experienceId);
|
|
46
46
|
}
|
|
47
47
|
}, [experienceId, isLoading, hasFailed]);
|
|
48
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
49
|
-
isDisabled: false
|
|
50
|
-
}, /*#__PURE__*/_react.default.createElement(_default2.default, (0, _extends2.default)({}, (0, _getCleanedSelectProps.getCleanedSelectProps)(props), {
|
|
48
|
+
return /*#__PURE__*/_react.default.createElement(_inlineEditLayer.InlineEditLayer, null, /*#__PURE__*/_react.default.createElement(_default2.default, (0, _extends2.default)({}, (0, _getCleanedSelectProps.getCleanedSelectProps)(props), {
|
|
51
49
|
menuPortalTarget: document.body,
|
|
52
50
|
autoFocus: true,
|
|
53
51
|
blurInputOnSelect: true,
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.InlineEditLayer = void 0;
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
var _layering = require("@atlaskit/layering/layering");
|
|
10
|
+
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
11
|
+
var _hasOpenDialogOrPopover = require("@atlaskit/top-layer/page-surface/has-open-dialog-or-popover");
|
|
12
|
+
var _requestClosePopovers = require("@atlaskit/top-layer/page-surface/request-close-popovers");
|
|
13
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
14
|
+
/**
|
|
15
|
+
* Wraps an inline edit view, so that Escape cancels the edit and does not close a containing modal.
|
|
16
|
+
*/
|
|
17
|
+
var InlineEditLayer = exports.InlineEditLayer = function InlineEditLayer(_ref) {
|
|
18
|
+
var children = _ref.children;
|
|
19
|
+
var onKeyDown = (0, _react.useCallback)(function (event) {
|
|
20
|
+
if (event.key !== 'Escape') {
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// An open menu takes the first Escape, and the edit stays open (as with layering).
|
|
25
|
+
if ((0, _hasOpenDialogOrPopover.hasOpenDialogOrPopover)({
|
|
26
|
+
within: event.currentTarget
|
|
27
|
+
})) {
|
|
28
|
+
event.stopPropagation();
|
|
29
|
+
event.preventDefault();
|
|
30
|
+
(0, _requestClosePopovers.requestClosePopovers)({
|
|
31
|
+
within: event.currentTarget
|
|
32
|
+
});
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// The inline edit form still cancels the edit. A containing modal ignores a prevented Escape.
|
|
37
|
+
event.preventDefault();
|
|
38
|
+
}, []);
|
|
39
|
+
if (!(0, _fg.fg)('platform-dst-top-layer')) {
|
|
40
|
+
// The Escape handler of a containing modal yields while this layer is open.
|
|
41
|
+
return /*#__PURE__*/_react.default.createElement(_layering.Layering, {
|
|
42
|
+
isDisabled: false
|
|
43
|
+
}, children);
|
|
44
|
+
}
|
|
45
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
46
|
+
role: "presentation",
|
|
47
|
+
onKeyDown: onKeyDown
|
|
48
|
+
}, children);
|
|
49
|
+
};
|
|
@@ -8,7 +8,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
exports.default = void 0;
|
|
9
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
-
var _layering = require("@atlaskit/layering/layering");
|
|
12
11
|
var _lozenge = _interopRequireDefault(require("@atlaskit/lozenge/new/lozenge"));
|
|
13
12
|
var _default2 = _interopRequireDefault(require("@atlaskit/select/default"));
|
|
14
13
|
var _Tooltip = _interopRequireDefault(require("@atlaskit/tooltip/Tooltip"));
|
|
@@ -18,6 +17,7 @@ var _useDatasourceExperienceId = require("../../../../contexts/datasource-experi
|
|
|
18
17
|
var _useLoadOptions2 = require("../../../../hooks/useLoadOptions");
|
|
19
18
|
var _getCleanedSelectProps = require("../../get-cleaned-select-props");
|
|
20
19
|
var _inlineEdit = require("../../table-cell-content/inline-edit");
|
|
20
|
+
var _inlineEditLayer = require("../inline-edit-layer");
|
|
21
21
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
22
22
|
var StatusEditType = function StatusEditType(props) {
|
|
23
23
|
var _currentValue$values;
|
|
@@ -45,9 +45,7 @@ var StatusEditType = function StatusEditType(props) {
|
|
|
45
45
|
}, experienceId);
|
|
46
46
|
}
|
|
47
47
|
}, [experienceId, isLoading, hasFailed]);
|
|
48
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
49
|
-
isDisabled: false
|
|
50
|
-
}, /*#__PURE__*/_react.default.createElement(_default2.default, (0, _extends2.default)({}, (0, _getCleanedSelectProps.getCleanedSelectProps)(props), {
|
|
48
|
+
return /*#__PURE__*/_react.default.createElement(_inlineEditLayer.InlineEditLayer, null, /*#__PURE__*/_react.default.createElement(_default2.default, (0, _extends2.default)({}, (0, _getCleanedSelectProps.getCleanedSelectProps)(props), {
|
|
51
49
|
menuPortalTarget: document.body,
|
|
52
50
|
autoFocus: true,
|
|
53
51
|
options: options,
|
|
@@ -8,10 +8,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
exports.default = void 0;
|
|
9
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
-
var _layering = require("@atlaskit/layering/layering");
|
|
12
11
|
var _textField = _interopRequireDefault(require("@atlaskit/textfield/text-field"));
|
|
13
12
|
var _succeedUfoExperience = require("../../../../analytics/ufoExperiences/succeedUfoExperience");
|
|
14
13
|
var _useDatasourceExperienceId = require("../../../../contexts/datasource-experience-id/use-datasource-experience-id");
|
|
14
|
+
var _inlineEditLayer = require("../inline-edit-layer");
|
|
15
15
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
16
16
|
var TextEditType = function TextEditType(props) {
|
|
17
17
|
var _currentValue$values$, _currentValue$values;
|
|
@@ -25,9 +25,7 @@ var TextEditType = function TextEditType(props) {
|
|
|
25
25
|
}, experienceId);
|
|
26
26
|
}
|
|
27
27
|
}, [experienceId]);
|
|
28
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
29
|
-
isDisabled: false
|
|
30
|
-
}, /*#__PURE__*/_react.default.createElement(_textField.default, (0, _extends2.default)({}, props, {
|
|
28
|
+
return /*#__PURE__*/_react.default.createElement(_inlineEditLayer.InlineEditLayer, null, /*#__PURE__*/_react.default.createElement(_textField.default, (0, _extends2.default)({}, props, {
|
|
31
29
|
autoFocus: true,
|
|
32
30
|
isCompact: true,
|
|
33
31
|
testId: "inline-edit-text",
|
|
@@ -13,7 +13,6 @@ var _reactIntl = require("react-intl");
|
|
|
13
13
|
var _useDebounce = require("use-debounce");
|
|
14
14
|
var _avatar = _interopRequireDefault(require("@atlaskit/avatar/avatar"));
|
|
15
15
|
var _avatarItem = _interopRequireDefault(require("@atlaskit/avatar/avatar-item"));
|
|
16
|
-
var _layering = require("@atlaskit/layering/layering");
|
|
17
16
|
var _default2 = _interopRequireDefault(require("@atlaskit/select/default"));
|
|
18
17
|
var _Tooltip = _interopRequireDefault(require("@atlaskit/tooltip/Tooltip"));
|
|
19
18
|
var _failUfoExperience = require("../../../../analytics/ufoExperiences/failUfoExperience");
|
|
@@ -25,6 +24,7 @@ var _getCleanedSelectProps = require("../../get-cleaned-select-props");
|
|
|
25
24
|
var _user = require("../../render-type/user");
|
|
26
25
|
var _messages = require("../../render-type/user/messages");
|
|
27
26
|
var _inlineEdit = require("../../table-cell-content/inline-edit");
|
|
27
|
+
var _inlineEditLayer = require("../inline-edit-layer");
|
|
28
28
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
29
29
|
var UserEditType = function UserEditType(props) {
|
|
30
30
|
var _currentValue$values;
|
|
@@ -76,9 +76,7 @@ var UserEditType = function UserEditType(props) {
|
|
|
76
76
|
}, experienceId);
|
|
77
77
|
}
|
|
78
78
|
}, [experienceId, isLoading, hasFailed]);
|
|
79
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
80
|
-
isDisabled: false
|
|
81
|
-
}, /*#__PURE__*/_react.default.createElement(_default2.default, (0, _extends2.default)({}, (0, _getCleanedSelectProps.getCleanedSelectProps)(props), {
|
|
79
|
+
return /*#__PURE__*/_react.default.createElement(_inlineEditLayer.InlineEditLayer, null, /*#__PURE__*/_react.default.createElement(_default2.default, (0, _extends2.default)({}, (0, _getCleanedSelectProps.getCleanedSelectProps)(props), {
|
|
82
80
|
menuPortalTarget: document.body,
|
|
83
81
|
autoFocus: true,
|
|
84
82
|
defaultMenuIsOpen: true,
|
|
@@ -6,8 +6,10 @@ import * as React from 'react';
|
|
|
6
6
|
import { ax, ix } from "@compiled/react/runtime";
|
|
7
7
|
import Form from '@atlaskit/form/form';
|
|
8
8
|
import { CloseButton } from '@atlaskit/modal-dialog/close-button';
|
|
9
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
9
10
|
import { Flex } from '@atlaskit/primitives/compiled/flex';
|
|
10
11
|
import { useDatasourceAnalyticsEvents } from '../../../analytics';
|
|
12
|
+
import { aqlKey } from '../../../types/assets/types';
|
|
11
13
|
import { AqlSearchInput } from './aql-search-input';
|
|
12
14
|
import { AssetsObjectSchemaSelect } from './object-schema-select';
|
|
13
15
|
import { FormRowContainer } from './styled';
|
|
@@ -59,9 +61,17 @@ export const AssetsSearchContainer = props => {
|
|
|
59
61
|
return /*#__PURE__*/React.createElement(Form, {
|
|
60
62
|
onSubmit: onFormSubmit
|
|
61
63
|
}, ({
|
|
62
|
-
formProps
|
|
64
|
+
formProps,
|
|
65
|
+
setFieldValue
|
|
63
66
|
}) => {
|
|
64
67
|
var _initialSearchData$ob, _initialSearchData$ob2, _initialSearchData$aq;
|
|
68
|
+
const onSchemaChange = schema => {
|
|
69
|
+
if (fg('platform_lp_sllv_assets_default_schema_aql')) {
|
|
70
|
+
const defaultAql = `objectSchema = "${schema.label}"`;
|
|
71
|
+
setFieldValue(aqlKey, defaultAql);
|
|
72
|
+
onSearch(defaultAql, schema.value);
|
|
73
|
+
}
|
|
74
|
+
};
|
|
65
75
|
return /*#__PURE__*/React.createElement(FormContainer, _extends({}, formProps, {
|
|
66
76
|
id: SEARCH_FORM_ID
|
|
67
77
|
}), /*#__PURE__*/React.createElement(FormRowContainer, {
|
|
@@ -81,7 +91,8 @@ export const AssetsSearchContainer = props => {
|
|
|
81
91
|
value: (_initialSearchData$ob = initialSearchData.objectSchema) !== null && _initialSearchData$ob !== void 0 ? _initialSearchData$ob : undefined,
|
|
82
92
|
workspaceId: workspaceId,
|
|
83
93
|
initialObjectSchemas: (_initialSearchData$ob2 = initialSearchData.objectSchemas) !== null && _initialSearchData$ob2 !== void 0 ? _initialSearchData$ob2 : undefined,
|
|
84
|
-
classNamePrefix: "assets-datasource-modal--object-schema-select"
|
|
94
|
+
classNamePrefix: "assets-datasource-modal--object-schema-select",
|
|
95
|
+
onSchemaChange: onSchemaChange
|
|
85
96
|
})))), /*#__PURE__*/React.createElement(FormRowContainer, null, /*#__PURE__*/React.createElement(AqlSearchInput, {
|
|
86
97
|
value: (_initialSearchData$aq = initialSearchData.aql) !== null && _initialSearchData$aq !== void 0 ? _initialSearchData$aq : DEFAULT_AQL_QUERY,
|
|
87
98
|
workspaceId: workspaceId,
|
|
@@ -55,6 +55,7 @@ export const AssetsObjectSchemaSelect = ({
|
|
|
55
55
|
value,
|
|
56
56
|
workspaceId,
|
|
57
57
|
initialObjectSchemas,
|
|
58
|
+
onSchemaChange,
|
|
58
59
|
classNamePrefix: _classNamePrefix = 'assets-datasource-modal--object-schema-select',
|
|
59
60
|
testId = 'assets-datasource-modal--object-schema-select'
|
|
60
61
|
}) => {
|
|
@@ -117,7 +118,12 @@ export const AssetsObjectSchemaSelect = ({
|
|
|
117
118
|
isLoading: objectSchemasLoading,
|
|
118
119
|
options: options,
|
|
119
120
|
placeholder: formatMessage(objectSchemaSelectMessages.placeholder),
|
|
120
|
-
onChange: newOption =>
|
|
121
|
+
onChange: newOption => {
|
|
122
|
+
if (newOption) {
|
|
123
|
+
onChange(newOption);
|
|
124
|
+
onSchemaChange === null || onSchemaChange === void 0 ? void 0 : onSchemaChange(newOption);
|
|
125
|
+
}
|
|
126
|
+
},
|
|
121
127
|
inputValue: searchTerm,
|
|
122
128
|
onInputChange: handleInputChange,
|
|
123
129
|
onMenuClose: onClose
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React, { useEffect } from 'react';
|
|
3
|
-
import { Layering } from '@atlaskit/layering/layering';
|
|
4
3
|
import Select from '@atlaskit/select/default';
|
|
5
4
|
import Tooltip from '@atlaskit/tooltip/Tooltip';
|
|
6
5
|
import { failUfoExperience } from '../../../../analytics/ufoExperiences/failUfoExperience';
|
|
@@ -10,6 +9,7 @@ import { useLoadOptions } from '../../../../hooks/useLoadOptions';
|
|
|
10
9
|
import { getCleanedSelectProps } from '../../get-cleaned-select-props';
|
|
11
10
|
import { SharedIconComponent } from '../../shared-components/icon';
|
|
12
11
|
import { InlineEditUFOExperience } from '../../table-cell-content/inline-edit';
|
|
12
|
+
import { InlineEditLayer } from '../inline-edit-layer';
|
|
13
13
|
const IconEditType = props => {
|
|
14
14
|
var _currentValue$values;
|
|
15
15
|
const {
|
|
@@ -39,9 +39,7 @@ const IconEditType = props => {
|
|
|
39
39
|
}, experienceId);
|
|
40
40
|
}
|
|
41
41
|
}, [experienceId, isLoading, hasFailed]);
|
|
42
|
-
return /*#__PURE__*/React.createElement(
|
|
43
|
-
isDisabled: false
|
|
44
|
-
}, /*#__PURE__*/React.createElement(Select, _extends({}, getCleanedSelectProps(props), {
|
|
42
|
+
return /*#__PURE__*/React.createElement(InlineEditLayer, null, /*#__PURE__*/React.createElement(Select, _extends({}, getCleanedSelectProps(props), {
|
|
45
43
|
menuPortalTarget: document.body,
|
|
46
44
|
autoFocus: true,
|
|
47
45
|
blurInputOnSelect: true,
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import React, { useCallback } from 'react';
|
|
2
|
+
import { Layering } from '@atlaskit/layering/layering';
|
|
3
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
4
|
+
import { hasOpenDialogOrPopover } from '@atlaskit/top-layer/page-surface/has-open-dialog-or-popover';
|
|
5
|
+
import { requestClosePopovers } from '@atlaskit/top-layer/page-surface/request-close-popovers';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Wraps an inline edit view, so that Escape cancels the edit and does not close a containing modal.
|
|
9
|
+
*/
|
|
10
|
+
export const InlineEditLayer = ({
|
|
11
|
+
children
|
|
12
|
+
}) => {
|
|
13
|
+
const onKeyDown = useCallback(event => {
|
|
14
|
+
if (event.key !== 'Escape') {
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
// An open menu takes the first Escape, and the edit stays open (as with layering).
|
|
19
|
+
if (hasOpenDialogOrPopover({
|
|
20
|
+
within: event.currentTarget
|
|
21
|
+
})) {
|
|
22
|
+
event.stopPropagation();
|
|
23
|
+
event.preventDefault();
|
|
24
|
+
requestClosePopovers({
|
|
25
|
+
within: event.currentTarget
|
|
26
|
+
});
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// The inline edit form still cancels the edit. A containing modal ignores a prevented Escape.
|
|
31
|
+
event.preventDefault();
|
|
32
|
+
}, []);
|
|
33
|
+
if (!fg('platform-dst-top-layer')) {
|
|
34
|
+
// The Escape handler of a containing modal yields while this layer is open.
|
|
35
|
+
return /*#__PURE__*/React.createElement(Layering, {
|
|
36
|
+
isDisabled: false
|
|
37
|
+
}, children);
|
|
38
|
+
}
|
|
39
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
40
|
+
role: "presentation",
|
|
41
|
+
onKeyDown: onKeyDown
|
|
42
|
+
}, children);
|
|
43
|
+
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React, { useEffect } from 'react';
|
|
3
|
-
import { Layering } from '@atlaskit/layering/layering';
|
|
4
3
|
import Lozenge from '@atlaskit/lozenge/new/lozenge';
|
|
5
4
|
import Select from '@atlaskit/select/default';
|
|
6
5
|
import Tooltip from '@atlaskit/tooltip/Tooltip';
|
|
@@ -10,6 +9,7 @@ import { useDatasourceExperienceId } from '../../../../contexts/datasource-exper
|
|
|
10
9
|
import { useLoadOptions } from '../../../../hooks/useLoadOptions';
|
|
11
10
|
import { getCleanedSelectProps } from '../../get-cleaned-select-props';
|
|
12
11
|
import { InlineEditUFOExperience } from '../../table-cell-content/inline-edit';
|
|
12
|
+
import { InlineEditLayer } from '../inline-edit-layer';
|
|
13
13
|
const StatusEditType = props => {
|
|
14
14
|
var _currentValue$values;
|
|
15
15
|
const {
|
|
@@ -39,9 +39,7 @@ const StatusEditType = props => {
|
|
|
39
39
|
}, experienceId);
|
|
40
40
|
}
|
|
41
41
|
}, [experienceId, isLoading, hasFailed]);
|
|
42
|
-
return /*#__PURE__*/React.createElement(
|
|
43
|
-
isDisabled: false
|
|
44
|
-
}, /*#__PURE__*/React.createElement(Select, _extends({}, getCleanedSelectProps(props), {
|
|
42
|
+
return /*#__PURE__*/React.createElement(InlineEditLayer, null, /*#__PURE__*/React.createElement(Select, _extends({}, getCleanedSelectProps(props), {
|
|
45
43
|
menuPortalTarget: document.body,
|
|
46
44
|
autoFocus: true,
|
|
47
45
|
options: options,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React, { useEffect } from 'react';
|
|
3
|
-
import { Layering } from '@atlaskit/layering/layering';
|
|
4
3
|
import Textfield from '@atlaskit/textfield/text-field';
|
|
5
4
|
import { succeedUfoExperience } from '../../../../analytics/ufoExperiences/succeedUfoExperience';
|
|
6
5
|
import { useDatasourceExperienceId } from '../../../../contexts/datasource-experience-id/use-datasource-experience-id';
|
|
6
|
+
import { InlineEditLayer } from '../inline-edit-layer';
|
|
7
7
|
const TextEditType = props => {
|
|
8
8
|
var _currentValue$values$, _currentValue$values;
|
|
9
9
|
const experienceId = useDatasourceExperienceId();
|
|
@@ -18,9 +18,7 @@ const TextEditType = props => {
|
|
|
18
18
|
}, experienceId);
|
|
19
19
|
}
|
|
20
20
|
}, [experienceId]);
|
|
21
|
-
return /*#__PURE__*/React.createElement(
|
|
22
|
-
isDisabled: false
|
|
23
|
-
}, /*#__PURE__*/React.createElement(Textfield, _extends({}, props, {
|
|
21
|
+
return /*#__PURE__*/React.createElement(InlineEditLayer, null, /*#__PURE__*/React.createElement(Textfield, _extends({}, props, {
|
|
24
22
|
autoFocus: true,
|
|
25
23
|
isCompact: true,
|
|
26
24
|
testId: "inline-edit-text",
|
|
@@ -4,7 +4,6 @@ import { useIntl } from 'react-intl';
|
|
|
4
4
|
import { useDebouncedCallback } from 'use-debounce';
|
|
5
5
|
import Avatar from '@atlaskit/avatar/avatar';
|
|
6
6
|
import AvatarItem from '@atlaskit/avatar/avatar-item';
|
|
7
|
-
import { Layering } from '@atlaskit/layering/layering';
|
|
8
7
|
import Select from '@atlaskit/select/default';
|
|
9
8
|
import Tooltip from '@atlaskit/tooltip/Tooltip';
|
|
10
9
|
import { failUfoExperience } from '../../../../analytics/ufoExperiences/failUfoExperience';
|
|
@@ -16,6 +15,7 @@ import { getCleanedSelectProps } from '../../get-cleaned-select-props';
|
|
|
16
15
|
import { USER_TYPE_TEST_ID } from '../../render-type/user';
|
|
17
16
|
import { userTypeMessages } from '../../render-type/user/messages';
|
|
18
17
|
import { InlineEditUFOExperience } from '../../table-cell-content/inline-edit';
|
|
18
|
+
import { InlineEditLayer } from '../inline-edit-layer';
|
|
19
19
|
const UserEditType = props => {
|
|
20
20
|
var _currentValue$values;
|
|
21
21
|
const {
|
|
@@ -61,9 +61,7 @@ const UserEditType = props => {
|
|
|
61
61
|
}, experienceId);
|
|
62
62
|
}
|
|
63
63
|
}, [experienceId, isLoading, hasFailed]);
|
|
64
|
-
return /*#__PURE__*/React.createElement(
|
|
65
|
-
isDisabled: false
|
|
66
|
-
}, /*#__PURE__*/React.createElement(Select, _extends({}, getCleanedSelectProps(props), {
|
|
64
|
+
return /*#__PURE__*/React.createElement(InlineEditLayer, null, /*#__PURE__*/React.createElement(Select, _extends({}, getCleanedSelectProps(props), {
|
|
67
65
|
menuPortalTarget: document.body,
|
|
68
66
|
autoFocus: true,
|
|
69
67
|
defaultMenuIsOpen: true,
|
|
@@ -8,8 +8,10 @@ import * as React from 'react';
|
|
|
8
8
|
import { ax, ix } from "@compiled/react/runtime";
|
|
9
9
|
import Form from '@atlaskit/form/form';
|
|
10
10
|
import { CloseButton } from '@atlaskit/modal-dialog/close-button';
|
|
11
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
11
12
|
import { Flex } from '@atlaskit/primitives/compiled/flex';
|
|
12
13
|
import { useDatasourceAnalyticsEvents } from '../../../analytics';
|
|
14
|
+
import { aqlKey } from '../../../types/assets/types';
|
|
13
15
|
import { AqlSearchInput } from './aql-search-input';
|
|
14
16
|
import { AssetsObjectSchemaSelect } from './object-schema-select';
|
|
15
17
|
import { FormRowContainer } from './styled';
|
|
@@ -57,7 +59,15 @@ export var AssetsSearchContainer = function AssetsSearchContainer(props) {
|
|
|
57
59
|
onSubmit: onFormSubmit
|
|
58
60
|
}, function (_ref2) {
|
|
59
61
|
var _initialSearchData$ob, _initialSearchData$ob2, _initialSearchData$aq;
|
|
60
|
-
var formProps = _ref2.formProps
|
|
62
|
+
var formProps = _ref2.formProps,
|
|
63
|
+
setFieldValue = _ref2.setFieldValue;
|
|
64
|
+
var onSchemaChange = function onSchemaChange(schema) {
|
|
65
|
+
if (fg('platform_lp_sllv_assets_default_schema_aql')) {
|
|
66
|
+
var defaultAql = "objectSchema = \"".concat(schema.label, "\"");
|
|
67
|
+
setFieldValue(aqlKey, defaultAql);
|
|
68
|
+
onSearch(defaultAql, schema.value);
|
|
69
|
+
}
|
|
70
|
+
};
|
|
61
71
|
return /*#__PURE__*/React.createElement(FormContainer, _extends({}, formProps, {
|
|
62
72
|
id: SEARCH_FORM_ID
|
|
63
73
|
}), /*#__PURE__*/React.createElement(FormRowContainer, {
|
|
@@ -77,7 +87,8 @@ export var AssetsSearchContainer = function AssetsSearchContainer(props) {
|
|
|
77
87
|
value: (_initialSearchData$ob = initialSearchData.objectSchema) !== null && _initialSearchData$ob !== void 0 ? _initialSearchData$ob : undefined,
|
|
78
88
|
workspaceId: workspaceId,
|
|
79
89
|
initialObjectSchemas: (_initialSearchData$ob2 = initialSearchData.objectSchemas) !== null && _initialSearchData$ob2 !== void 0 ? _initialSearchData$ob2 : undefined,
|
|
80
|
-
classNamePrefix: "assets-datasource-modal--object-schema-select"
|
|
90
|
+
classNamePrefix: "assets-datasource-modal--object-schema-select",
|
|
91
|
+
onSchemaChange: onSchemaChange
|
|
81
92
|
})))), /*#__PURE__*/React.createElement(FormRowContainer, null, /*#__PURE__*/React.createElement(AqlSearchInput, {
|
|
82
93
|
value: (_initialSearchData$aq = initialSearchData.aql) !== null && _initialSearchData$aq !== void 0 ? _initialSearchData$aq : DEFAULT_AQL_QUERY,
|
|
83
94
|
workspaceId: workspaceId,
|
|
@@ -68,6 +68,7 @@ export var AssetsObjectSchemaSelect = function AssetsObjectSchemaSelect(_ref2) {
|
|
|
68
68
|
var value = _ref2.value,
|
|
69
69
|
workspaceId = _ref2.workspaceId,
|
|
70
70
|
initialObjectSchemas = _ref2.initialObjectSchemas,
|
|
71
|
+
onSchemaChange = _ref2.onSchemaChange,
|
|
71
72
|
_ref2$classNamePrefix = _ref2.classNamePrefix,
|
|
72
73
|
_classNamePrefix = _ref2$classNamePrefix === void 0 ? 'assets-datasource-modal--object-schema-select' : _ref2$classNamePrefix,
|
|
73
74
|
_ref2$testId = _ref2.testId,
|
|
@@ -179,7 +180,10 @@ export var AssetsObjectSchemaSelect = function AssetsObjectSchemaSelect(_ref2) {
|
|
|
179
180
|
options: options,
|
|
180
181
|
placeholder: formatMessage(objectSchemaSelectMessages.placeholder),
|
|
181
182
|
onChange: function onChange(newOption) {
|
|
182
|
-
|
|
183
|
+
if (newOption) {
|
|
184
|
+
_onChange(newOption);
|
|
185
|
+
onSchemaChange === null || onSchemaChange === void 0 || onSchemaChange(newOption);
|
|
186
|
+
}
|
|
183
187
|
},
|
|
184
188
|
inputValue: searchTerm,
|
|
185
189
|
onInputChange: handleInputChange,
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React, { useEffect } from 'react';
|
|
3
|
-
import { Layering } from '@atlaskit/layering/layering';
|
|
4
3
|
import Select from '@atlaskit/select/default';
|
|
5
4
|
import Tooltip from '@atlaskit/tooltip/Tooltip';
|
|
6
5
|
import { failUfoExperience } from '../../../../analytics/ufoExperiences/failUfoExperience';
|
|
@@ -10,6 +9,7 @@ import { useLoadOptions } from '../../../../hooks/useLoadOptions';
|
|
|
10
9
|
import { getCleanedSelectProps } from '../../get-cleaned-select-props';
|
|
11
10
|
import { SharedIconComponent } from '../../shared-components/icon';
|
|
12
11
|
import { InlineEditUFOExperience } from '../../table-cell-content/inline-edit';
|
|
12
|
+
import { InlineEditLayer } from '../inline-edit-layer';
|
|
13
13
|
var IconEditType = function IconEditType(props) {
|
|
14
14
|
var _currentValue$values;
|
|
15
15
|
var currentValue = props.currentValue,
|
|
@@ -36,9 +36,7 @@ var IconEditType = function IconEditType(props) {
|
|
|
36
36
|
}, experienceId);
|
|
37
37
|
}
|
|
38
38
|
}, [experienceId, isLoading, hasFailed]);
|
|
39
|
-
return /*#__PURE__*/React.createElement(
|
|
40
|
-
isDisabled: false
|
|
41
|
-
}, /*#__PURE__*/React.createElement(Select, _extends({}, getCleanedSelectProps(props), {
|
|
39
|
+
return /*#__PURE__*/React.createElement(InlineEditLayer, null, /*#__PURE__*/React.createElement(Select, _extends({}, getCleanedSelectProps(props), {
|
|
42
40
|
menuPortalTarget: document.body,
|
|
43
41
|
autoFocus: true,
|
|
44
42
|
blurInputOnSelect: true,
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import React, { useCallback } from 'react';
|
|
2
|
+
import { Layering } from '@atlaskit/layering/layering';
|
|
3
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
4
|
+
import { hasOpenDialogOrPopover } from '@atlaskit/top-layer/page-surface/has-open-dialog-or-popover';
|
|
5
|
+
import { requestClosePopovers } from '@atlaskit/top-layer/page-surface/request-close-popovers';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Wraps an inline edit view, so that Escape cancels the edit and does not close a containing modal.
|
|
9
|
+
*/
|
|
10
|
+
export var InlineEditLayer = function InlineEditLayer(_ref) {
|
|
11
|
+
var children = _ref.children;
|
|
12
|
+
var onKeyDown = useCallback(function (event) {
|
|
13
|
+
if (event.key !== 'Escape') {
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// An open menu takes the first Escape, and the edit stays open (as with layering).
|
|
18
|
+
if (hasOpenDialogOrPopover({
|
|
19
|
+
within: event.currentTarget
|
|
20
|
+
})) {
|
|
21
|
+
event.stopPropagation();
|
|
22
|
+
event.preventDefault();
|
|
23
|
+
requestClosePopovers({
|
|
24
|
+
within: event.currentTarget
|
|
25
|
+
});
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// The inline edit form still cancels the edit. A containing modal ignores a prevented Escape.
|
|
30
|
+
event.preventDefault();
|
|
31
|
+
}, []);
|
|
32
|
+
if (!fg('platform-dst-top-layer')) {
|
|
33
|
+
// The Escape handler of a containing modal yields while this layer is open.
|
|
34
|
+
return /*#__PURE__*/React.createElement(Layering, {
|
|
35
|
+
isDisabled: false
|
|
36
|
+
}, children);
|
|
37
|
+
}
|
|
38
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
39
|
+
role: "presentation",
|
|
40
|
+
onKeyDown: onKeyDown
|
|
41
|
+
}, children);
|
|
42
|
+
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React, { useEffect } from 'react';
|
|
3
|
-
import { Layering } from '@atlaskit/layering/layering';
|
|
4
3
|
import Lozenge from '@atlaskit/lozenge/new/lozenge';
|
|
5
4
|
import Select from '@atlaskit/select/default';
|
|
6
5
|
import Tooltip from '@atlaskit/tooltip/Tooltip';
|
|
@@ -10,6 +9,7 @@ import { useDatasourceExperienceId } from '../../../../contexts/datasource-exper
|
|
|
10
9
|
import { useLoadOptions } from '../../../../hooks/useLoadOptions';
|
|
11
10
|
import { getCleanedSelectProps } from '../../get-cleaned-select-props';
|
|
12
11
|
import { InlineEditUFOExperience } from '../../table-cell-content/inline-edit';
|
|
12
|
+
import { InlineEditLayer } from '../inline-edit-layer';
|
|
13
13
|
var StatusEditType = function StatusEditType(props) {
|
|
14
14
|
var _currentValue$values;
|
|
15
15
|
var currentValue = props.currentValue,
|
|
@@ -36,9 +36,7 @@ var StatusEditType = function StatusEditType(props) {
|
|
|
36
36
|
}, experienceId);
|
|
37
37
|
}
|
|
38
38
|
}, [experienceId, isLoading, hasFailed]);
|
|
39
|
-
return /*#__PURE__*/React.createElement(
|
|
40
|
-
isDisabled: false
|
|
41
|
-
}, /*#__PURE__*/React.createElement(Select, _extends({}, getCleanedSelectProps(props), {
|
|
39
|
+
return /*#__PURE__*/React.createElement(InlineEditLayer, null, /*#__PURE__*/React.createElement(Select, _extends({}, getCleanedSelectProps(props), {
|
|
42
40
|
menuPortalTarget: document.body,
|
|
43
41
|
autoFocus: true,
|
|
44
42
|
options: options,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React, { useEffect } from 'react';
|
|
3
|
-
import { Layering } from '@atlaskit/layering/layering';
|
|
4
3
|
import Textfield from '@atlaskit/textfield/text-field';
|
|
5
4
|
import { succeedUfoExperience } from '../../../../analytics/ufoExperiences/succeedUfoExperience';
|
|
6
5
|
import { useDatasourceExperienceId } from '../../../../contexts/datasource-experience-id/use-datasource-experience-id';
|
|
6
|
+
import { InlineEditLayer } from '../inline-edit-layer';
|
|
7
7
|
var TextEditType = function TextEditType(props) {
|
|
8
8
|
var _currentValue$values$, _currentValue$values;
|
|
9
9
|
var experienceId = useDatasourceExperienceId();
|
|
@@ -16,9 +16,7 @@ var TextEditType = function TextEditType(props) {
|
|
|
16
16
|
}, experienceId);
|
|
17
17
|
}
|
|
18
18
|
}, [experienceId]);
|
|
19
|
-
return /*#__PURE__*/React.createElement(
|
|
20
|
-
isDisabled: false
|
|
21
|
-
}, /*#__PURE__*/React.createElement(Textfield, _extends({}, props, {
|
|
19
|
+
return /*#__PURE__*/React.createElement(InlineEditLayer, null, /*#__PURE__*/React.createElement(Textfield, _extends({}, props, {
|
|
22
20
|
autoFocus: true,
|
|
23
21
|
isCompact: true,
|
|
24
22
|
testId: "inline-edit-text",
|
|
@@ -5,7 +5,6 @@ import { useIntl } from 'react-intl';
|
|
|
5
5
|
import { useDebouncedCallback } from 'use-debounce';
|
|
6
6
|
import Avatar from '@atlaskit/avatar/avatar';
|
|
7
7
|
import AvatarItem from '@atlaskit/avatar/avatar-item';
|
|
8
|
-
import { Layering } from '@atlaskit/layering/layering';
|
|
9
8
|
import Select from '@atlaskit/select/default';
|
|
10
9
|
import Tooltip from '@atlaskit/tooltip/Tooltip';
|
|
11
10
|
import { failUfoExperience } from '../../../../analytics/ufoExperiences/failUfoExperience';
|
|
@@ -17,6 +16,7 @@ import { getCleanedSelectProps } from '../../get-cleaned-select-props';
|
|
|
17
16
|
import { USER_TYPE_TEST_ID } from '../../render-type/user';
|
|
18
17
|
import { userTypeMessages } from '../../render-type/user/messages';
|
|
19
18
|
import { InlineEditUFOExperience } from '../../table-cell-content/inline-edit';
|
|
19
|
+
import { InlineEditLayer } from '../inline-edit-layer';
|
|
20
20
|
var UserEditType = function UserEditType(props) {
|
|
21
21
|
var _currentValue$values;
|
|
22
22
|
var currentValue = props.currentValue,
|
|
@@ -67,9 +67,7 @@ var UserEditType = function UserEditType(props) {
|
|
|
67
67
|
}, experienceId);
|
|
68
68
|
}
|
|
69
69
|
}, [experienceId, isLoading, hasFailed]);
|
|
70
|
-
return /*#__PURE__*/React.createElement(
|
|
71
|
-
isDisabled: false
|
|
72
|
-
}, /*#__PURE__*/React.createElement(Select, _extends({}, getCleanedSelectProps(props), {
|
|
70
|
+
return /*#__PURE__*/React.createElement(InlineEditLayer, null, /*#__PURE__*/React.createElement(Select, _extends({}, getCleanedSelectProps(props), {
|
|
73
71
|
menuPortalTarget: document.body,
|
|
74
72
|
autoFocus: true,
|
|
75
73
|
defaultMenuIsOpen: true,
|
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
* @jsxRuntime classic
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
|
-
import { type ObjectSchema } from '../../../../types/assets/types';
|
|
5
|
+
import { type ObjectSchema, type ObjectSchemaOption } from '../../../../types/assets/types';
|
|
6
6
|
type AssetsObjectSchemaSelectProps = {
|
|
7
7
|
classNamePrefix?: string;
|
|
8
8
|
initialObjectSchemas: ObjectSchema[] | undefined;
|
|
9
|
+
onSchemaChange?: (schema: ObjectSchemaOption) => void;
|
|
9
10
|
testId?: string;
|
|
10
11
|
value: ObjectSchema | undefined;
|
|
11
12
|
workspaceId: string;
|
|
@@ -21,5 +22,5 @@ export declare const selectInAModalStyleFixProps: {
|
|
|
21
22
|
menuPortal: (base: any) => any;
|
|
22
23
|
};
|
|
23
24
|
};
|
|
24
|
-
export declare const AssetsObjectSchemaSelect: ({ value, workspaceId, initialObjectSchemas, classNamePrefix: _classNamePrefix, testId, }: AssetsObjectSchemaSelectProps) => JSX.Element;
|
|
25
|
+
export declare const AssetsObjectSchemaSelect: ({ value, workspaceId, initialObjectSchemas, onSchemaChange, classNamePrefix: _classNamePrefix, testId, }: AssetsObjectSchemaSelectProps) => JSX.Element;
|
|
25
26
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/link-datasource",
|
|
3
|
-
"version": "7.5.
|
|
3
|
+
"version": "7.5.4",
|
|
4
4
|
"description": "UI Components to support linking platform dataset feature",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"@atlaskit/avatar": "^30.0.0",
|
|
47
47
|
"@atlaskit/avatar-group": "^14.4.0",
|
|
48
48
|
"@atlaskit/badge": "^22.0.0",
|
|
49
|
-
"@atlaskit/button": "^25.
|
|
49
|
+
"@atlaskit/button": "^25.6.0",
|
|
50
50
|
"@atlaskit/css": "^1.1.0",
|
|
51
51
|
"@atlaskit/datetime-picker": "^19.3.0",
|
|
52
52
|
"@atlaskit/dropdown-menu": "^21.0.0",
|
|
@@ -61,9 +61,9 @@
|
|
|
61
61
|
"@atlaskit/inline-edit": "^16.4.0",
|
|
62
62
|
"@atlaskit/intl-messages-provider": "^5.0.0",
|
|
63
63
|
"@atlaskit/jql-ast": "^4.2.0",
|
|
64
|
-
"@atlaskit/jql-editor": "^8.
|
|
64
|
+
"@atlaskit/jql-editor": "^8.5.0",
|
|
65
65
|
"@atlaskit/jql-editor-autocomplete-rest": "^4.6.0",
|
|
66
|
-
"@atlaskit/layering": "^6.
|
|
66
|
+
"@atlaskit/layering": "^6.1.0",
|
|
67
67
|
"@atlaskit/link": "^5.1.0",
|
|
68
68
|
"@atlaskit/link-client-extension": "^8.0.0",
|
|
69
69
|
"@atlaskit/link-provider": "^6.0.0",
|
|
@@ -93,10 +93,11 @@
|
|
|
93
93
|
"@atlaskit/textfield": "^10.2.0",
|
|
94
94
|
"@atlaskit/theme": "^28.2.0",
|
|
95
95
|
"@atlaskit/toggle": "^17.3.0",
|
|
96
|
-
"@atlaskit/tokens": "^20.
|
|
96
|
+
"@atlaskit/tokens": "^20.7.0",
|
|
97
97
|
"@atlaskit/tooltip": "^24.4.0",
|
|
98
|
+
"@atlaskit/top-layer": "^6.6.0",
|
|
98
99
|
"@atlaskit/ufo": "^2.0.0",
|
|
99
|
-
"@atlaskit/user-picker": "^14.
|
|
100
|
+
"@atlaskit/user-picker": "^14.3.0",
|
|
100
101
|
"@atlaskit/visually-hidden": "^4.4.0",
|
|
101
102
|
"@atlaskit/width-detector": "^7.2.0",
|
|
102
103
|
"@babel/runtime": "^7.0.0",
|
|
@@ -120,6 +121,7 @@
|
|
|
120
121
|
"@af/integration-testing": "workspace:^",
|
|
121
122
|
"@af/visual-regression": "workspace:^",
|
|
122
123
|
"@atlaskit/code": "^20.0.0",
|
|
124
|
+
"@atlaskit/docs": "^12.3.0",
|
|
123
125
|
"@atlaskit/json-ld-types": "^2.1.0",
|
|
124
126
|
"@atlaskit/link-test-helpers": "^11.2.0",
|
|
125
127
|
"@atlaskit/radio": "^10.2.0",
|
|
@@ -176,9 +178,15 @@
|
|
|
176
178
|
"astral_units_workspace_host_resolver": {
|
|
177
179
|
"type": "boolean"
|
|
178
180
|
},
|
|
181
|
+
"platform_lp_sllv_assets_default_schema_aql": {
|
|
182
|
+
"type": "boolean"
|
|
183
|
+
},
|
|
179
184
|
"electric_issue_like_table_xpc_url_wrapping": {
|
|
180
185
|
"type": "boolean"
|
|
181
186
|
},
|
|
187
|
+
"platform-dst-top-layer": {
|
|
188
|
+
"type": "boolean"
|
|
189
|
+
},
|
|
182
190
|
"platform-dst-top-layer-tooltip": {
|
|
183
191
|
"type": "boolean",
|
|
184
192
|
"referenceOnly": true
|